@stackoverflow/stacks 2.5.3 → 2.5.5

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 (101) hide show
  1. package/LICENSE.MD +9 -9
  2. package/README.md +180 -180
  3. package/dist/css/stacks.css +104 -122
  4. package/dist/css/stacks.min.css +1 -1
  5. package/lib/atomic/border.less +139 -139
  6. package/lib/atomic/color.less +36 -36
  7. package/lib/atomic/flex.less +426 -426
  8. package/lib/atomic/gap.less +44 -44
  9. package/lib/atomic/grid.less +139 -139
  10. package/lib/atomic/misc.less +374 -374
  11. package/lib/atomic/spacing.less +98 -98
  12. package/lib/atomic/typography.less +264 -264
  13. package/lib/atomic/width-height.less +194 -194
  14. package/lib/base/body.less +44 -44
  15. package/lib/base/configuration-static.less +61 -61
  16. package/lib/base/fieldset.less +5 -5
  17. package/lib/base/icon.less +11 -11
  18. package/lib/base/internal.less +220 -220
  19. package/lib/base/reset-meyer.less +64 -64
  20. package/lib/base/reset-normalize.less +449 -449
  21. package/lib/base/reset.less +20 -20
  22. package/lib/components/activity-indicator/activity-indicator.less +53 -53
  23. package/lib/components/anchor/anchor.less +78 -68
  24. package/lib/components/avatar/avatar.less +108 -108
  25. package/lib/components/award-bling/award-bling.less +31 -31
  26. package/lib/components/badge/badge.less +258 -258
  27. package/lib/components/banner/banner.less +44 -44
  28. package/lib/components/banner/banner.ts +149 -149
  29. package/lib/components/block-link/block-link.less +82 -82
  30. package/lib/components/breadcrumbs/breadcrumbs.less +41 -41
  31. package/lib/components/button/button.less +473 -473
  32. package/lib/components/button-group/button-group.less +82 -82
  33. package/lib/components/card/card.less +37 -37
  34. package/lib/components/check-control/check-control.less +17 -17
  35. package/lib/components/check-group/check-group.less +19 -19
  36. package/lib/components/checkbox_radio/checkbox_radio.less +159 -159
  37. package/lib/components/code-block/code-block.fixtures.ts +88 -88
  38. package/lib/components/code-block/code-block.less +116 -116
  39. package/lib/components/description/description.less +9 -9
  40. package/lib/components/empty-state/empty-state.less +16 -16
  41. package/lib/components/expandable/expandable.less +118 -118
  42. package/lib/components/expandable/expandable.ts +238 -238
  43. package/lib/components/input-fill/input-fill.less +35 -35
  44. package/lib/components/input-icon/input-icon.less +45 -45
  45. package/lib/components/input-message/input-message.less +49 -49
  46. package/lib/components/input_textarea/input_textarea.less +150 -150
  47. package/lib/components/label/label.less +110 -110
  48. package/lib/components/link/link.less +135 -120
  49. package/lib/components/link-preview/link-preview.less +148 -148
  50. package/lib/components/menu/menu.less +41 -41
  51. package/lib/components/modal/modal.less +118 -118
  52. package/lib/components/modal/modal.ts +383 -383
  53. package/lib/components/navigation/navigation.less +136 -136
  54. package/lib/components/navigation/navigation.ts +128 -128
  55. package/lib/components/notice/notice.less +195 -195
  56. package/lib/components/page-title/page-title.less +51 -51
  57. package/lib/components/pagination/pagination.less +65 -65
  58. package/lib/components/popover/popover.less +159 -157
  59. package/lib/components/popover/popover.ts +651 -651
  60. package/lib/components/popover/tooltip.ts +343 -343
  61. package/lib/components/post-summary/post-summary.less +457 -447
  62. package/lib/components/progress-bar/progress-bar.less +291 -291
  63. package/lib/components/prose/prose.less +452 -452
  64. package/lib/components/select/select.less +138 -138
  65. package/lib/components/sidebar-widget/sidebar-widget.less +257 -257
  66. package/lib/components/spinner/spinner.less +103 -103
  67. package/lib/components/table/table.less +307 -307
  68. package/lib/components/table/table.ts +296 -296
  69. package/lib/components/table-container/table-container.less +4 -4
  70. package/lib/components/tag/tag.less +186 -186
  71. package/lib/components/toast/toast.less +35 -35
  72. package/lib/components/toast/toast.ts +357 -357
  73. package/lib/components/toggle-switch/toggle-switch.less +104 -104
  74. package/lib/components/topbar/topbar.less +553 -553
  75. package/lib/components/uploader/uploader.less +205 -205
  76. package/lib/components/uploader/uploader.ts +207 -207
  77. package/lib/components/user-card/user-card.less +129 -129
  78. package/lib/controllers.ts +33 -33
  79. package/lib/exports/color-mixins.less +283 -283
  80. package/lib/exports/color-sets.less +711 -711
  81. package/lib/exports/color.less +65 -65
  82. package/lib/exports/constants-helpers.less +108 -108
  83. package/lib/exports/constants-type.less +155 -155
  84. package/lib/exports/exports.less +15 -15
  85. package/lib/exports/mixins.less +333 -333
  86. package/lib/exports/spacing-mixins.less +67 -67
  87. package/lib/index.ts +32 -32
  88. package/lib/input-utils.less +41 -41
  89. package/lib/stacks-dynamic.less +24 -24
  90. package/lib/stacks-static.less +93 -93
  91. package/lib/stacks.less +13 -13
  92. package/lib/stacks.ts +113 -113
  93. package/lib/test/a11y-test-utils.ts +94 -94
  94. package/lib/test/assertions.ts +36 -36
  95. package/lib/test/less-test-utils.ts +28 -28
  96. package/lib/test/open-wc-testing-patch.d.ts +26 -26
  97. package/lib/test/test-utils.ts +364 -364
  98. package/lib/test/visual-test-utils.ts +58 -58
  99. package/lib/tsconfig.build.json +4 -4
  100. package/lib/tsconfig.json +17 -17
  101. package/package.json +115 -115
@@ -1,238 +1,238 @@
1
- import * as Stacks from "../../stacks";
2
-
3
- // Radio buttons only trigger a change event when they're *checked*, but not when
4
- // they're *unchecked*. Therefore, if we have an active `s-expandable-control` in
5
- // the document, we listen for change events on *all* radio buttons and find any
6
- // other radio buttons in the same `name` group, triggering a custom event on all
7
- // of them so the controller can re-evaluate.
8
- //
9
- // We're keeping a count of how many of these controllers are connected to the DOM,
10
- // so only have this global listener when we actually need it.
11
- const RADIO_OFF_EVENT = "s-expandable-control:radio-off";
12
-
13
- function globalChangeListener(e: UIEvent) {
14
- const target = e.target;
15
- if (
16
- !(target instanceof HTMLInputElement) ||
17
- target.nodeName !== "INPUT" ||
18
- target.type !== "radio"
19
- ) {
20
- return;
21
- }
22
- document
23
- .querySelectorAll('input[type="radio"][name="' + target.name + '"]')
24
- .forEach(function (other) {
25
- if (other === e.target) {
26
- return;
27
- }
28
- let customEvent;
29
- try {
30
- customEvent = new Event(RADIO_OFF_EVENT);
31
- } catch (ex) {
32
- // Internet Explorer
33
- customEvent = document.createEvent("Event");
34
- customEvent.initEvent(RADIO_OFF_EVENT, true, true);
35
- }
36
- other.dispatchEvent(customEvent);
37
- });
38
- }
39
-
40
- let refCount = 0;
41
- function globalChangeListenerRequired(required: boolean) {
42
- if (required) {
43
- refCount++;
44
- if (refCount === 1) {
45
- document.body.addEventListener(
46
- "change",
47
- globalChangeListener as EventListener
48
- );
49
- }
50
- } else {
51
- refCount--;
52
- if (refCount === 0) {
53
- document.body.removeEventListener(
54
- "change",
55
- globalChangeListener as EventListener
56
- );
57
- }
58
- }
59
- }
60
-
61
- export class ExpandableController extends Stacks.StacksController {
62
- private isCollapsed!: () => boolean;
63
- private events!: string[];
64
- private isCheckable!: boolean;
65
- private isRadio!: boolean;
66
- private lastKeydownClickTimestamp = 0;
67
-
68
- initialize() {
69
- if (
70
- this.element.nodeName === "INPUT" &&
71
- ["radio", "checkbox"].indexOf(
72
- (<HTMLInputElement>this.element).type
73
- ) >= 0
74
- ) {
75
- this.isCollapsed = this._isCollapsedForCheckable.bind(this);
76
- this.events = ["change", RADIO_OFF_EVENT];
77
- this.isCheckable = true;
78
- this.isRadio = (<HTMLInputElement>this.element).type === "radio";
79
- } else {
80
- this.isCollapsed = this._isCollapsedForClickable.bind(this);
81
- this.events = ["click", "keydown"];
82
- }
83
- this.listener = this.listener.bind(this);
84
- }
85
-
86
- // for non-checkable elements, the initial source of truth is the collapsed/expanded
87
- // state of the controlled element (unless the element doesn't exist)
88
- _isCollapsedForClickable() {
89
- const cc = this.controlledExpandables;
90
- // the element is considered collapsed if *any* target element is collapsed
91
- return cc.length > 0
92
- ? !cc.every((element) => element.classList.contains("is-expanded"))
93
- : this.element.getAttribute("aria-expanded") === "false";
94
- }
95
-
96
- // for checkable elements, the initial source of truth is the checked state
97
- _isCollapsedForCheckable() {
98
- return !(<HTMLInputElement>this.element).checked;
99
- }
100
-
101
- get controlledExpandables() {
102
- const attr = this.element.getAttribute("aria-controls");
103
- if (!attr) {
104
- throw `[aria-controls="targetId1 ... targetIdN"] attribute required`;
105
- }
106
- const result = attr
107
- .split(/\s+/g)
108
- .map((s) => document.getElementById(s))
109
- .filter((e): e is HTMLElement => !!e);
110
- if (!result.length) {
111
- throw "couldn't find controls";
112
- }
113
- return result;
114
- }
115
-
116
- _dispatchShowHideEvent(isShow: boolean) {
117
- this.triggerEvent(isShow ? "show" : "hide");
118
- }
119
-
120
- _toggleClass(doAdd: boolean) {
121
- if (!this.data.has("toggle-class")) {
122
- return;
123
- }
124
- const cl = this.element.classList;
125
- const toggleClass = this.data.get("toggle-class");
126
- if (!toggleClass) {
127
- throw "couldn't find toggle class";
128
- }
129
- toggleClass.split(/\s+/).forEach(function (cls) {
130
- cl.toggle(cls, !!doAdd);
131
- });
132
- }
133
-
134
- listener(e: Event) {
135
- let newCollapsed;
136
- if (this.isCheckable) {
137
- newCollapsed = !(<HTMLInputElement>this.element).checked;
138
- } else {
139
- if (
140
- e.type == "keydown" &&
141
- e instanceof KeyboardEvent &&
142
- e.keyCode != 13 &&
143
- e.keyCode != 32
144
- ) {
145
- return;
146
- }
147
- if (
148
- e.target !== e.currentTarget &&
149
- ["A", "BUTTON"].indexOf((<HTMLElement>e.target).nodeName) >= 0
150
- ) {
151
- return;
152
- }
153
-
154
- e.preventDefault();
155
-
156
- // Prevent "click" events from toggling the expandable within 300ms of "keydown".
157
- // e.preventDefault() should have done the same, but https://bugzilla.mozilla.org/show_bug.cgi?id=1487102
158
- // doesn't guarantee it.
159
- if (e.type == "keydown") {
160
- this.lastKeydownClickTimestamp = Date.now();
161
- } else if (
162
- e.type == "click" &&
163
- Date.now() - this.lastKeydownClickTimestamp < 300
164
- ) {
165
- return;
166
- }
167
- newCollapsed =
168
- this.element.getAttribute("aria-expanded") === "true";
169
- if (e.type === "click") {
170
- (<HTMLInputElement>this.element).blur();
171
- }
172
- }
173
- this.element.setAttribute(
174
- "aria-expanded",
175
- newCollapsed ? "false" : "true"
176
- );
177
- for (const controlledElement of this.controlledExpandables) {
178
- controlledElement.classList.toggle("is-expanded", !newCollapsed);
179
- }
180
- this._dispatchShowHideEvent(!newCollapsed);
181
- this._toggleClass(!newCollapsed);
182
- }
183
-
184
- connect() {
185
- this.events.forEach((e) => {
186
- this.element.addEventListener(e, this.listener.bind(this));
187
- }, this);
188
-
189
- if (this.isRadio) {
190
- globalChangeListenerRequired(true);
191
- }
192
-
193
- // synchronize state -- in all cases, this means setting the correct `aria-expanded`
194
- // attribute; for checkable controls this also means setting the `is-collapsed` class.
195
- // Note: aria-expanded is currently an invalid attribute on radio elements
196
- // Support for aria-expanded is being debated by the W3C https://github.com/w3c/aria/issues/1404 as recently as June 2022
197
- if (!this.isRadio) {
198
- this.element.setAttribute(
199
- "aria-expanded",
200
- this.isCollapsed() ? "false" : "true"
201
- );
202
- }
203
- if (this.isCheckable) {
204
- const cc = this.controlledExpandables;
205
- if (cc.length) {
206
- const expected = !this.isCollapsed();
207
- // if any element does not match the expected state, set them all to the expected state
208
- if (
209
- cc.some(
210
- (element) =>
211
- element.classList.contains("is-expanded") !==
212
- expected
213
- )
214
- ) {
215
- for (const controlledElement of this
216
- .controlledExpandables) {
217
- controlledElement.classList.toggle(
218
- "is-expanded",
219
- expected
220
- );
221
- }
222
- this._dispatchShowHideEvent(expected);
223
- this._toggleClass(expected);
224
- }
225
- }
226
- }
227
- }
228
-
229
- disconnect() {
230
- this.events.forEach((e) => {
231
- this.element.removeEventListener(e, this.listener.bind(this));
232
- }, this);
233
-
234
- if (this.isRadio) {
235
- globalChangeListenerRequired(false);
236
- }
237
- }
238
- }
1
+ import * as Stacks from "../../stacks";
2
+
3
+ // Radio buttons only trigger a change event when they're *checked*, but not when
4
+ // they're *unchecked*. Therefore, if we have an active `s-expandable-control` in
5
+ // the document, we listen for change events on *all* radio buttons and find any
6
+ // other radio buttons in the same `name` group, triggering a custom event on all
7
+ // of them so the controller can re-evaluate.
8
+ //
9
+ // We're keeping a count of how many of these controllers are connected to the DOM,
10
+ // so only have this global listener when we actually need it.
11
+ const RADIO_OFF_EVENT = "s-expandable-control:radio-off";
12
+
13
+ function globalChangeListener(e: UIEvent) {
14
+ const target = e.target;
15
+ if (
16
+ !(target instanceof HTMLInputElement) ||
17
+ target.nodeName !== "INPUT" ||
18
+ target.type !== "radio"
19
+ ) {
20
+ return;
21
+ }
22
+ document
23
+ .querySelectorAll('input[type="radio"][name="' + target.name + '"]')
24
+ .forEach(function (other) {
25
+ if (other === e.target) {
26
+ return;
27
+ }
28
+ let customEvent;
29
+ try {
30
+ customEvent = new Event(RADIO_OFF_EVENT);
31
+ } catch (ex) {
32
+ // Internet Explorer
33
+ customEvent = document.createEvent("Event");
34
+ customEvent.initEvent(RADIO_OFF_EVENT, true, true);
35
+ }
36
+ other.dispatchEvent(customEvent);
37
+ });
38
+ }
39
+
40
+ let refCount = 0;
41
+ function globalChangeListenerRequired(required: boolean) {
42
+ if (required) {
43
+ refCount++;
44
+ if (refCount === 1) {
45
+ document.body.addEventListener(
46
+ "change",
47
+ globalChangeListener as EventListener
48
+ );
49
+ }
50
+ } else {
51
+ refCount--;
52
+ if (refCount === 0) {
53
+ document.body.removeEventListener(
54
+ "change",
55
+ globalChangeListener as EventListener
56
+ );
57
+ }
58
+ }
59
+ }
60
+
61
+ export class ExpandableController extends Stacks.StacksController {
62
+ private isCollapsed!: () => boolean;
63
+ private events!: string[];
64
+ private isCheckable!: boolean;
65
+ private isRadio!: boolean;
66
+ private lastKeydownClickTimestamp = 0;
67
+
68
+ initialize() {
69
+ if (
70
+ this.element.nodeName === "INPUT" &&
71
+ ["radio", "checkbox"].indexOf(
72
+ (<HTMLInputElement>this.element).type
73
+ ) >= 0
74
+ ) {
75
+ this.isCollapsed = this._isCollapsedForCheckable.bind(this);
76
+ this.events = ["change", RADIO_OFF_EVENT];
77
+ this.isCheckable = true;
78
+ this.isRadio = (<HTMLInputElement>this.element).type === "radio";
79
+ } else {
80
+ this.isCollapsed = this._isCollapsedForClickable.bind(this);
81
+ this.events = ["click", "keydown"];
82
+ }
83
+ this.listener = this.listener.bind(this);
84
+ }
85
+
86
+ // for non-checkable elements, the initial source of truth is the collapsed/expanded
87
+ // state of the controlled element (unless the element doesn't exist)
88
+ _isCollapsedForClickable() {
89
+ const cc = this.controlledExpandables;
90
+ // the element is considered collapsed if *any* target element is collapsed
91
+ return cc.length > 0
92
+ ? !cc.every((element) => element.classList.contains("is-expanded"))
93
+ : this.element.getAttribute("aria-expanded") === "false";
94
+ }
95
+
96
+ // for checkable elements, the initial source of truth is the checked state
97
+ _isCollapsedForCheckable() {
98
+ return !(<HTMLInputElement>this.element).checked;
99
+ }
100
+
101
+ get controlledExpandables() {
102
+ const attr = this.element.getAttribute("aria-controls");
103
+ if (!attr) {
104
+ throw `[aria-controls="targetId1 ... targetIdN"] attribute required`;
105
+ }
106
+ const result = attr
107
+ .split(/\s+/g)
108
+ .map((s) => document.getElementById(s))
109
+ .filter((e): e is HTMLElement => !!e);
110
+ if (!result.length) {
111
+ throw "couldn't find controls";
112
+ }
113
+ return result;
114
+ }
115
+
116
+ _dispatchShowHideEvent(isShow: boolean) {
117
+ this.triggerEvent(isShow ? "show" : "hide");
118
+ }
119
+
120
+ _toggleClass(doAdd: boolean) {
121
+ if (!this.data.has("toggle-class")) {
122
+ return;
123
+ }
124
+ const cl = this.element.classList;
125
+ const toggleClass = this.data.get("toggle-class");
126
+ if (!toggleClass) {
127
+ throw "couldn't find toggle class";
128
+ }
129
+ toggleClass.split(/\s+/).forEach(function (cls) {
130
+ cl.toggle(cls, !!doAdd);
131
+ });
132
+ }
133
+
134
+ listener(e: Event) {
135
+ let newCollapsed;
136
+ if (this.isCheckable) {
137
+ newCollapsed = !(<HTMLInputElement>this.element).checked;
138
+ } else {
139
+ if (
140
+ e.type == "keydown" &&
141
+ e instanceof KeyboardEvent &&
142
+ e.keyCode != 13 &&
143
+ e.keyCode != 32
144
+ ) {
145
+ return;
146
+ }
147
+ if (
148
+ e.target !== e.currentTarget &&
149
+ ["A", "BUTTON"].indexOf((<HTMLElement>e.target).nodeName) >= 0
150
+ ) {
151
+ return;
152
+ }
153
+
154
+ e.preventDefault();
155
+
156
+ // Prevent "click" events from toggling the expandable within 300ms of "keydown".
157
+ // e.preventDefault() should have done the same, but https://bugzilla.mozilla.org/show_bug.cgi?id=1487102
158
+ // doesn't guarantee it.
159
+ if (e.type == "keydown") {
160
+ this.lastKeydownClickTimestamp = Date.now();
161
+ } else if (
162
+ e.type == "click" &&
163
+ Date.now() - this.lastKeydownClickTimestamp < 300
164
+ ) {
165
+ return;
166
+ }
167
+ newCollapsed =
168
+ this.element.getAttribute("aria-expanded") === "true";
169
+ if (e.type === "click") {
170
+ (<HTMLInputElement>this.element).blur();
171
+ }
172
+ }
173
+ this.element.setAttribute(
174
+ "aria-expanded",
175
+ newCollapsed ? "false" : "true"
176
+ );
177
+ for (const controlledElement of this.controlledExpandables) {
178
+ controlledElement.classList.toggle("is-expanded", !newCollapsed);
179
+ }
180
+ this._dispatchShowHideEvent(!newCollapsed);
181
+ this._toggleClass(!newCollapsed);
182
+ }
183
+
184
+ connect() {
185
+ this.events.forEach((e) => {
186
+ this.element.addEventListener(e, this.listener.bind(this));
187
+ }, this);
188
+
189
+ if (this.isRadio) {
190
+ globalChangeListenerRequired(true);
191
+ }
192
+
193
+ // synchronize state -- in all cases, this means setting the correct `aria-expanded`
194
+ // attribute; for checkable controls this also means setting the `is-collapsed` class.
195
+ // Note: aria-expanded is currently an invalid attribute on radio elements
196
+ // Support for aria-expanded is being debated by the W3C https://github.com/w3c/aria/issues/1404 as recently as June 2022
197
+ if (!this.isRadio) {
198
+ this.element.setAttribute(
199
+ "aria-expanded",
200
+ this.isCollapsed() ? "false" : "true"
201
+ );
202
+ }
203
+ if (this.isCheckable) {
204
+ const cc = this.controlledExpandables;
205
+ if (cc.length) {
206
+ const expected = !this.isCollapsed();
207
+ // if any element does not match the expected state, set them all to the expected state
208
+ if (
209
+ cc.some(
210
+ (element) =>
211
+ element.classList.contains("is-expanded") !==
212
+ expected
213
+ )
214
+ ) {
215
+ for (const controlledElement of this
216
+ .controlledExpandables) {
217
+ controlledElement.classList.toggle(
218
+ "is-expanded",
219
+ expected
220
+ );
221
+ }
222
+ this._dispatchShowHideEvent(expected);
223
+ this._toggleClass(expected);
224
+ }
225
+ }
226
+ }
227
+ }
228
+
229
+ disconnect() {
230
+ this.events.forEach((e) => {
231
+ this.element.removeEventListener(e, this.listener.bind(this));
232
+ }, this);
233
+
234
+ if (this.isRadio) {
235
+ globalChangeListenerRequired(false);
236
+ }
237
+ }
238
+ }
@@ -1,35 +1,35 @@
1
- .s-input-fill {
2
- --_if-bc: var(--bc-dark);
3
- --_if-bg: var(--black-150);
4
- --_if-blw: 0;
5
- --_if-blr: 0;
6
- --_if-brr: 0;
7
- --_if-brw: 0;
8
-
9
- &&__clear {
10
- --_if-bc: transparent;
11
- --_if-bg: transparent;
12
- }
13
-
14
- &.order-first {
15
- --_if-blw: var(--su-static1);
16
- --_if-blr: var(--br-md);
17
- }
18
-
19
- &.order-last {
20
- --_if-brw: var(--su-static1);
21
- --_if-brr: var(--br-md);
22
- }
23
-
24
- background-color: var(--_if-bg);
25
- border: var(--su-static1) solid var(--_if-bc);
26
- border-left-width: var(--_if-blw);
27
- border-right-width: var(--_if-brw);
28
- border-radius: var(--_if-blr) var(--_if-brr) var(--_if-brr) var(--_if-blr);
29
-
30
- color: var(--fc-medium);
31
- font-family: inherit;
32
- line-height: var(--lh-sm);
33
- padding: 0.6em 0.7em;
34
- white-space: nowrap;
35
- }
1
+ .s-input-fill {
2
+ --_if-bc: var(--bc-dark);
3
+ --_if-bg: var(--black-150);
4
+ --_if-blw: 0;
5
+ --_if-blr: 0;
6
+ --_if-brr: 0;
7
+ --_if-brw: 0;
8
+
9
+ &&__clear {
10
+ --_if-bc: transparent;
11
+ --_if-bg: transparent;
12
+ }
13
+
14
+ &.order-first {
15
+ --_if-blw: var(--su-static1);
16
+ --_if-blr: var(--br-md);
17
+ }
18
+
19
+ &.order-last {
20
+ --_if-brw: var(--su-static1);
21
+ --_if-brr: var(--br-md);
22
+ }
23
+
24
+ background-color: var(--_if-bg);
25
+ border: var(--su-static1) solid var(--_if-bc);
26
+ border-left-width: var(--_if-blw);
27
+ border-right-width: var(--_if-brw);
28
+ border-radius: var(--_if-blr) var(--_if-brr) var(--_if-brr) var(--_if-blr);
29
+
30
+ color: var(--fc-medium);
31
+ font-family: inherit;
32
+ line-height: var(--lh-sm);
33
+ padding: 0.6em 0.7em;
34
+ white-space: nowrap;
35
+ }
@@ -1,45 +1,45 @@
1
- .s-input-icon {
2
- --_ii-fc: unset;
3
- --_ii-r: 0.7em;
4
-
5
- // MODIFIERS
6
- .has-error & {
7
- --_ii-fc: var(--red-400);
8
- }
9
-
10
- .has-success & {
11
- --_ii-fc: var(--green-400);
12
- }
13
-
14
- .has-warning & {
15
- --_ii-fc: var(--yellow-400);
16
- }
17
-
18
- .is-disabled & {
19
- --_ii-fc: var(--black-400);
20
- }
21
-
22
- .is-readonly & {
23
- --_ii-fc: var(--black-300);
24
-
25
- .highcontrast-mode({
26
- --_ii-fc: var(--fc-light);
27
- });
28
- }
29
-
30
- &&__creditcard,
31
- &&__search {
32
- --_ii-r: auto;
33
-
34
- color: var(--black-400);
35
- left: 0.7em;
36
- }
37
-
38
- color: var(--_ii-fc);
39
- right: var(--_ii-r);
40
-
41
- margin-top: calc((var(--su-static8) + var(--su-static1)) * -1); // -9px - Half the icon's height at 18px for centering;
42
- pointer-events: none;
43
- position: absolute;
44
- top: 50%;
45
- }
1
+ .s-input-icon {
2
+ --_ii-fc: unset;
3
+ --_ii-r: 0.7em;
4
+
5
+ // MODIFIERS
6
+ .has-error & {
7
+ --_ii-fc: var(--red-400);
8
+ }
9
+
10
+ .has-success & {
11
+ --_ii-fc: var(--green-400);
12
+ }
13
+
14
+ .has-warning & {
15
+ --_ii-fc: var(--yellow-400);
16
+ }
17
+
18
+ .is-disabled & {
19
+ --_ii-fc: var(--black-400);
20
+ }
21
+
22
+ .is-readonly & {
23
+ --_ii-fc: var(--black-300);
24
+
25
+ .highcontrast-mode({
26
+ --_ii-fc: var(--fc-light);
27
+ });
28
+ }
29
+
30
+ &&__creditcard,
31
+ &&__search {
32
+ --_ii-r: auto;
33
+
34
+ color: var(--black-400);
35
+ left: 0.7em;
36
+ }
37
+
38
+ color: var(--_ii-fc);
39
+ right: var(--_ii-r);
40
+
41
+ margin-top: calc((var(--su-static8) + var(--su-static1)) * -1); // -9px - Half the icon's height at 18px for centering;
42
+ pointer-events: none;
43
+ position: absolute;
44
+ top: 50%;
45
+ }