@ebay/skin 17.0.1 → 17.1.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/ICON-CREATION.md +10 -0
  2. package/_cdn/skin/v17.1.0-0/skin-default.min.css +69 -0
  3. package/_cdn/skin/v17.1.0-0/skin-full.min.css +151 -0
  4. package/_cdn/skin/v17.1.0-0/skin-headless.min.css +6 -0
  5. package/dist/avatar/avatar.css +20 -16
  6. package/dist/eek/eek.css +2 -2
  7. package/dist/field/field.css +5 -1
  8. package/dist/floating-label/floating-label.css +2 -2
  9. package/dist/icon/icon.css +1 -2
  10. package/dist/listbox-button/listbox-button.css +14 -5
  11. package/dist/skeleton/skeleton.css +15 -15
  12. package/dist/tokens/evo-light.css +1 -0
  13. package/package.json +9 -6
  14. package/src/less/avatar/avatar.less +39 -16
  15. package/src/less/eek/eek.less +1 -1
  16. package/src/less/field/field.less +6 -1
  17. package/src/less/field/stories/stacked.stories.js +65 -5
  18. package/src/less/floating-label/floating-label.less +5 -2
  19. package/src/less/icon/icon.less +1 -2
  20. package/src/less/listbox-button/listbox-button.less +13 -2
  21. package/src/less/listbox-button/stories/base.stories.js +78 -0
  22. package/src/less/listbox-button/stories/error/error.base.stories.js +325 -0
  23. package/src/less/listbox-button/stories/error/error.cascade.stories.js +133 -0
  24. package/src/less/listbox-button/stories/error/error.dimensions.stories.js +43 -0
  25. package/src/less/listbox-button/stories/error/error.form.stories.js +97 -0
  26. package/src/less/skeleton/skeleton.less +14 -14
  27. package/src/tokens/evo-light.css +1 -0
  28. package/_cdn/skin/v17.0.1/skin-default.min.css +0 -69
  29. package/_cdn/skin/v17.0.1/skin-full.min.css +0 -151
  30. package/_cdn/skin/v17.0.1/skin-headless.min.css +0 -6
@@ -68,10 +68,10 @@ label.floating-label__label--invalid {
68
68
  padding-top: 23px;
69
69
  }
70
70
  .floating-label .select select {
71
- line-height: 52px;
71
+ line-height: 52px !important;
72
72
  }
73
73
  .floating-label .select--large select {
74
- line-height: 60px;
74
+ line-height: 60px !important;
75
75
  }
76
76
  [dir="rtl"] label.floating-label__label {
77
77
  left: initial;
@@ -2816,8 +2816,7 @@ svg.icon {
2816
2816
  vertical-align: middle;
2817
2817
  }
2818
2818
  svg.icon--disabled {
2819
- color: var(--color-foreground-disabled);
2820
- fill: currentColor;
2819
+ filter: var(--color-icon-disabled-filter);
2821
2820
  }
2822
2821
  svg.icon--attention-filled-16,
2823
2822
  svg.icon--attention-filled-24 {
@@ -44,12 +44,12 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
44
44
  .listbox-button button[aria-invalid="true"] {
45
45
  border-color: var(--listbox-button-invalid-border-color, var(--color-stroke-attention));
46
46
  }
47
- .listbox-button button.btn--form {
47
+ .listbox-button:not(.listbox-button--error) button.btn--form {
48
48
  border-color: var(--listbox-button-border-color, var(--color-stroke-default));
49
49
  }
50
- .listbox-button button.btn--form:hover,
51
- .listbox-button button.btn--form:focus,
52
- .listbox-button button.btn--form:active {
50
+ .listbox-button:not(.listbox-button--error) button.btn--form:hover,
51
+ .listbox-button:not(.listbox-button--error) button.btn--form:focus,
52
+ .listbox-button:not(.listbox-button--error) button.btn--form:active {
53
53
  border-color: inherit;
54
54
  }
55
55
  .listbox-button button.expand-btn--borderless,
@@ -71,11 +71,12 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
71
71
  .listbox-button.listbox-button--form button {
72
72
  background-color: var(--listbox-button-background-color, var(--color-background-secondary));
73
73
  border-color: var(--listbox-button-border-color, var(--color-stroke-default));
74
+ color: var(--listbox-button-foreground-color, var(--color-foreground-primary));
74
75
  }
75
76
  .listbox-button.listbox-button--form button[disabled],
76
77
  .listbox-button.listbox-button--form button[aria-disabled="true"] {
77
78
  border-color: var(--listbox-button-disabled-border-color, var(--color-background-disabled));
78
- color: var(--listbox-button-disabled-foreground-color, var(--color-foreground-disabled));
79
+ color: var(--listbox-button-disabled-foreground-color, var(--color-foreground-primary));
79
80
  }
80
81
  .listbox-button.listbox-button--form button:focus {
81
82
  background-color: var(--combobox-textbox-focus-background-color, var(--color-background-primary));
@@ -83,6 +84,10 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
83
84
  .listbox-button.listbox-button--form button[aria-invalid="true"] {
84
85
  border-color: var(--listbox-button-invalid-border-color, var(--color-stroke-attention));
85
86
  }
87
+ .listbox-button.listbox-button--error button:not(.btn--borderless) {
88
+ background-color: var(--listbox-button-background-color, var(--color-background-secondary));
89
+ border-color: var(--listbox-button-border-color, var(--color-stroke-attention));
90
+ }
86
91
  .listbox-button .btn__label {
87
92
  color: var(--listbox-button-label-color, var(--color-foreground-secondary));
88
93
  margin-right: 3px;
@@ -90,6 +95,10 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
90
95
  .listbox-button--expanded .btn__label {
91
96
  color: var(--listbox-button-label-color, var(--color-foreground-primary));
92
97
  }
98
+ .listbox-button.listbox-button--error button .btn__label,
99
+ .listbox-button.listbox-button--error button .btn__floating-label {
100
+ color: var(--listbox-button-label-color, var(--color-foreground-attention));
101
+ }
93
102
  .listbox-button .btn__text {
94
103
  font-weight: bold;
95
104
  margin-right: auto;
@@ -84,21 +84,21 @@ span.skeleton__image,
84
84
  span.skeleton__textbox {
85
85
  display: inline-block;
86
86
  }
87
- span.skeleton__avatar + span,
88
- span.skeleton__button + span,
89
- span.skeleton__text + span,
90
- span.skeleton__image + span,
91
- span.skeleton__textbox + span {
92
- -webkit-margin-start: var(--spacing-100);
93
- margin-inline-start: var(--spacing-100);
94
- }
95
- div.skeleton__avatar,
96
- div.skeleton__button,
97
- div.skeleton__text,
98
- div.skeleton__image,
99
- div.skeleton__textbox {
100
- -webkit-margin-before: var(--spacing-150);
101
- margin-block-start: var(--spacing-150);
87
+ span.skeleton__avatar:not(:last-child),
88
+ span.skeleton__button:not(:last-child),
89
+ span.skeleton__text:not(:last-child),
90
+ span.skeleton__image:not(:last-child),
91
+ span.skeleton__textbox:not(:last-child) {
92
+ -webkit-margin-end: var(--spacing-100);
93
+ margin-inline-end: var(--spacing-100);
94
+ }
95
+ div.skeleton__avatar:not(:last-child),
96
+ div.skeleton__button:not(:last-child),
97
+ div.skeleton__text:not(:last-child),
98
+ div.skeleton__image:not(:last-child),
99
+ div.skeleton__textbox:not(:last-child) {
100
+ -webkit-margin-after: var(--spacing-150);
101
+ margin-block-end: var(--spacing-150);
102
102
  }
103
103
  .skeleton--elevated {
104
104
  --skeleton-background: var(--color-loading-fill-elevated);
@@ -172,4 +172,5 @@
172
172
  var(--color-ai-solid-green-subtle) 66%,
173
173
  var(--color-ai-solid-green-subtle) 100%
174
174
  );
175
+ --color-icon-disabled-filter: grayscale(1) opacity(0.25);
175
176
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ebay/skin",
3
3
  "description": "Skin - CSS modules that represent the brand eBay",
4
- "version": "17.0.1",
4
+ "version": "17.1.0-0",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",
7
7
  "maintainers": [
@@ -69,7 +69,7 @@
69
69
  "@storybook/html": "^7.5.3",
70
70
  "@storybook/html-webpack5": "^7.5.3",
71
71
  "babel-loader": "^9.1.2",
72
- "browser-sync": "^2.29.3",
72
+ "browser-sync": "^3.0.2",
73
73
  "btoa": "^1",
74
74
  "cross-env": "^7",
75
75
  "eslint": "^8.54.0",
@@ -119,11 +119,11 @@
119
119
  "prettier": "^3.1.0",
120
120
  "rimraf": "^5",
121
121
  "storybook": "^7.5.3",
122
- "stylelint": "^15.6.2",
123
- "stylelint-config-standard": "^34",
124
- "stylelint-no-unsupported-browser-features": "^7",
122
+ "stylelint": "^16.1.0",
123
+ "stylelint-config-standard": "^36",
124
+ "stylelint-no-unsupported-browser-features": "^8",
125
125
  "stylelint-order": "^6",
126
- "stylelint-prettier": "^4",
126
+ "stylelint-prettier": "^5",
127
127
  "svgo": "^3.0.4",
128
128
  "webpack": "^5.83.0",
129
129
  "webpack-cli": "^5.1.1",
@@ -152,5 +152,8 @@
152
152
  "lint-staged": {
153
153
  "*.{js,css,md,less,json}": "prettier --write",
154
154
  "*.{css,less}": "stylelint --config .stylelintrc"
155
+ },
156
+ "dependencies": {
157
+ "-": "^0.0.1"
155
158
  }
156
159
  }
@@ -1,10 +1,28 @@
1
1
  @import "../variables/variables.less";
2
2
 
3
+ // These are temporary colors until we get the new palette
4
+ @_avatar-teal-foreground-color: #002a69;
5
+ @_avatar-teal-background-color: #84b4fb;
6
+ @_avatar-light-teal-foreground-color: #07465a;
7
+ @_avatar-light-teal-background-color: #44ccd5;
8
+ @_avatar-green-foreground-color: #1b561a;
9
+ @_avatar-green-background-color: #4ce160;
10
+ @_avatar-lime-foreground-color: #4e4e0c;
11
+ @_avatar-lime-background-color: #c1d737;
12
+ @_avatar-yellow-foreground-color: #553b06;
13
+ @_avatar-yellow-background-color: #ffbd14;
14
+ @_avatar-orange-foreground-color: #562501;
15
+ @_avatar-orange-background-color: #ff8806;
16
+ @_avatar-pink-foreground-color: #4b112d;
17
+ @_avatar-pink-background-color: #f79cc8;
18
+ @_avatar-magenta-foreground-color: #3e135f;
19
+ @_avatar-magenta-background-color: #cc9ef0;
20
+
3
21
  .avatar {
4
22
  align-items: center;
5
- background-color: var(--color-marketing-teal-background-5);
23
+ background-color: @_avatar-teal-background-color;
6
24
  border-radius: 50%;
7
- color: var(--color-marketing-teal-foreground-5);
25
+ color: @_avatar-teal-foreground-color;
8
26
  display: inline-flex;
9
27
  font-size: var(--font-size-large-2);
10
28
  font-weight: var(--font-weight-bold);
@@ -26,38 +44,43 @@
26
44
  }
27
45
 
28
46
  .avatar--teal {
29
- background-color: var(--color-marketing-teal-background-5);
30
- color: var(--color-marketing-teal-foreground-5);
47
+ background-color: @_avatar-teal-background-color;
48
+ color: @_avatar-teal-foreground-color;
31
49
  }
32
50
 
33
51
  .avatar--light-teal {
34
- background-color: var(--color-marketing-teal-background-3);
35
- color: var(--color-marketing-teal-foreground-3);
52
+ background-color: @_avatar-light-teal-background-color;
53
+ color: @_avatar-light-teal-foreground-color;
36
54
  }
37
55
 
38
56
  .avatar--green {
39
- background-color: var(--color-marketing-green-background-3);
40
- color: var(--color-marketing-green-foreground-3);
57
+ background-color: @_avatar-green-background-color;
58
+ color: @_avatar-green-foreground-color;
41
59
  }
42
60
 
43
61
  .avatar--lime {
44
- background-color: var(--color-marketing-lime-background-4);
45
- color: var(--color-marketing-lime-foreground-4);
62
+ background-color: @_avatar-lime-background-color;
63
+ color: @_avatar-lime-foreground-color;
46
64
  }
47
65
 
48
66
  .avatar--yellow {
49
- background-color: var(--color-marketing-yellow-background-3);
50
- color: var(--color-marketing-yellow-foreground-3);
67
+ background-color: @_avatar-yellow-background-color;
68
+ color: @_avatar-yellow-foreground-color;
51
69
  }
52
70
 
53
71
  .avatar--orange {
54
- background-color: var(--color-marketing-orange-background-3);
55
- color: var(--color-marketing-orange-foreground-3);
72
+ background-color: @_avatar-orange-background-color;
73
+ color: @_avatar-orange-foreground-color;
56
74
  }
57
75
 
58
76
  .avatar--magenta {
59
- background-color: var(--color-marketing-magenta-background-4);
60
- color: var(--color-marketing-magenta-foreground-4);
77
+ background-color: @_avatar-magenta-background-color;
78
+ color: @_avatar-magenta-foreground-color;
79
+ }
80
+
81
+ .avatar--pink {
82
+ background-color: @_avatar-pink-background-color;
83
+ color: @_avatar-pink-foreground-color;
61
84
  }
62
85
 
63
86
  .avatar--32,
@@ -6,7 +6,7 @@
6
6
  @eek-arrow-size: unit(sqrt(392), px);
7
7
  // These are custom colors not part of ebay palette
8
8
  @eek-rating-color-1: #00a650;
9
- @eek-rating-color-2: #adbd38;
9
+ @eek-rating-color-2: #4dbd38;
10
10
  @eek-rating-color-3: #b3db18;
11
11
  @eek-rating-color-4: #fff200;
12
12
  @eek-rating-color-5: #fab20b;
@@ -90,9 +90,14 @@ div.field__group {
90
90
  margin-left: 8px;
91
91
  }
92
92
 
93
+ .field__description .icon {
94
+ display: inline-block;
95
+ margin-right: var(--spacing-50);
96
+ }
97
+
93
98
  // if using a div for description, it implies it's always at bottom of field
94
99
  div.field__description {
95
- margin: 2px 0 0;
100
+ margin: var(--spacing-100) 0 0;
96
101
  }
97
102
 
98
103
  .field__row {
@@ -95,7 +95,7 @@ export const group = () => `
95
95
 
96
96
  export const descriptions = () => `
97
97
  <div class="field">
98
- <label class="field__label field__label--stacked" for="field-descriptions-1">Field 1</label>
98
+ <label class="field__label field__label--stacked" for="field-descriptions-1">Textbox Field - Default</label>
99
99
  <div class="field__control textbox">
100
100
  <input aria-describedby="field-descriptions-1-description" class="textbox__control textbox__control--fluid" id="field-descriptions-1" type="text" />
101
101
  </div>
@@ -104,7 +104,7 @@ export const descriptions = () => `
104
104
  </div>
105
105
  </div>
106
106
  <div class="field">
107
- <label class="field__label field__label--stacked" for="field-descriptions-2">Field 2</label>
107
+ <label class="field__label field__label--stacked" for="field-descriptions-2">Textbox Field - Confirmation</label>
108
108
  <div class="field__control textbox">
109
109
  <input aria-describedby="field-descriptions-2-description" class="textbox__control textbox__control--fluid" id="field-descriptions-2" type="text" />
110
110
  </div>
@@ -113,7 +113,7 @@ export const descriptions = () => `
113
113
  </div>
114
114
  </div>
115
115
  <div class="field">
116
- <label class="field__label field__label--stacked" for="field-descriptions-3">Field 3</label>
116
+ <label class="field__label field__label--stacked" for="field-descriptions-3">Textbox Field - Information</label>
117
117
  <div class="field__control textbox">
118
118
  <input aria-describedby="field-descriptions-3-description" class="textbox__control textbox__control--fluid" id="field-descriptions-3" type="text" />
119
119
  </div>
@@ -122,12 +122,72 @@ export const descriptions = () => `
122
122
  </div>
123
123
  </div>
124
124
  <div class="field">
125
- <label class="field__label field__label--stacked" for="field-descriptions-4">Field 4</label>
125
+ <label class="field__label field__label--stacked" for="field-descriptions-4">Textbox Field - Error</label>
126
126
  <div class="field__control textbox">
127
- <input aria-describedby="field-descriptions-4-description" class="textbox__control textbox__control--fluid" id="field-descriptions-4" type="text" />
127
+ <input aria-describedby="field-descriptions-4-description" class="textbox__control textbox__control--fluid" id="field-descriptions-4" type="text" aria-invalid="true" />
128
128
  </div>
129
129
  <div class="field__description field__description--attention" id="field-descriptions-4-description">
130
+ <svg class="icon icon--attention-filled-16" focusable="false" height="10" width="14" aria-hidden="true">
131
+ <use href="#icon-attention-filled-16"></use>
132
+ </svg>
130
133
  <span>Field description - error</span>
131
134
  </div>
132
135
  </div>
136
+
137
+ <span class="field">
138
+ <label class="field__label field__label--stacked" for="field-listbox-button-1">Listbox Button Field - Error</label>
139
+ <div class="field__control textbox">
140
+ <span class="listbox-button listbox-button--form listbox-button--error" data-makeup-auto-select="false">
141
+ <button class="btn btn--form" style="min-width: 150px" aria-expanded="false" aria-haspopup="listbox" aria-describedby="field-listbox-button-1-description">
142
+ <span class="btn__cell">
143
+ <span class="btn__label">Color: </span>
144
+ <span class="btn__text">-</span>
145
+ <svg class="icon icon--chevron-down-12" focusable="false" height="10" width="14" aria-hidden="true">
146
+ <use href="#icon-chevron-down-12"></use>
147
+ </svg>
148
+ </span>
149
+ </button>
150
+ <div class="listbox-button__listbox">
151
+ <div class="listbox-button__options" role="listbox">
152
+ <div class="listbox-button__option" role="option">
153
+ <span class="listbox-button__value">Red</span>
154
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
155
+ <use href="#icon-tick-16"></use>
156
+ </svg>
157
+ </div>
158
+ <div class="listbox-button__option" role="option">
159
+ <span class="listbox-button__value">Blue</span>
160
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
161
+ <use href="#icon-tick-16"></use>
162
+ </svg>
163
+ </div>
164
+ <div class="listbox-button__option" role="option" aria-disabled="true">
165
+ <span class="listbox-button__value">Yellow</span>
166
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
167
+ <use href="#icon-tick-16"></use>
168
+ </svg>
169
+ </div>
170
+ <div class="listbox-button__option" role="option">
171
+ <span class="listbox-button__value">Green</span>
172
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
173
+ <use href="#icon-tick-16"></use>
174
+ </svg>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <select id="field-listbox-button-1" hidden="" class="listbox__native">
179
+ <option value="1"></option>
180
+ <option value="2"></option>
181
+ <option value="3"></option>
182
+ <option value="4"></option>
183
+ </select>
184
+ </span>
185
+ </div>
186
+ <div class="field__description field__description--attention" id="field-listbox-button-1-description">
187
+ <svg class="icon icon--attention-filled-16" focusable="false" height="10" width="14" aria-hidden="true">
188
+ <use href="#icon-attention-filled-16"></use>
189
+ </svg>
190
+ <span>There was an error</span>
191
+ </div>
192
+ </span>
133
193
  `;
@@ -91,12 +91,15 @@ label.floating-label__label--invalid {
91
91
  padding-top: 23px;
92
92
  }
93
93
 
94
+ // We are setting line-height to important because WCAG specs allow setting 1.5 times the line height
95
+ // If we do not set it to important, the line height will be overridden causing text-overlap
96
+ // See https://github.com/eBay/skin/issues/2253
94
97
  .floating-label .select select {
95
- line-height: 52px;
98
+ line-height: 52px !important;
96
99
  }
97
100
 
98
101
  .floating-label .select--large select {
99
- line-height: 60px;
102
+ line-height: 60px !important;
100
103
  }
101
104
 
102
105
  // RTL
@@ -7,8 +7,7 @@ svg {
7
7
  .icon-base-mixin();
8
8
  }
9
9
  &.icon--disabled {
10
- .color-token(color-foreground-disabled);
11
- fill: currentColor;
10
+ filter: var(--color-icon-disabled-filter);
12
11
  }
13
12
  &.icon--attention-filled-16,
14
13
  &.icon--attention-filled-24 {
@@ -42,7 +42,7 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
42
42
  .border-color-token(listbox-button-invalid-border-color, color-stroke-attention);
43
43
  }
44
44
 
45
- .listbox-button button.btn--form {
45
+ .listbox-button:not(.listbox-button--error) button.btn--form {
46
46
  .border-color-token(listbox-button-border-color, color-stroke-default);
47
47
 
48
48
  &:hover,
@@ -72,12 +72,13 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
72
72
  .listbox-button.listbox-button--form button {
73
73
  .background-color-token(listbox-button-background-color, color-background-secondary);
74
74
  .border-color-token(listbox-button-border-color, color-stroke-default);
75
+ .color-token(listbox-button-foreground-color, color-foreground-primary);
75
76
  }
76
77
 
77
78
  .listbox-button.listbox-button--form button[disabled],
78
79
  .listbox-button.listbox-button--form button[aria-disabled="true"] {
79
80
  .border-color-token(listbox-button-disabled-border-color, color-background-disabled);
80
- .color-token(listbox-button-disabled-foreground-color, color-foreground-disabled);
81
+ .color-token(listbox-button-disabled-foreground-color, color-foreground-primary);
81
82
  }
82
83
 
83
84
  .listbox-button.listbox-button--form button:focus {
@@ -88,6 +89,11 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
88
89
  .border-color-token(listbox-button-invalid-border-color, color-stroke-attention);
89
90
  }
90
91
 
92
+ .listbox-button.listbox-button--error button:not(.btn--borderless) {
93
+ .background-color-token(listbox-button-background-color, color-background-secondary);
94
+ .border-color-token(listbox-button-border-color, color-stroke-attention);
95
+ }
96
+
91
97
  .listbox-button .btn__label {
92
98
  .color-token(listbox-button-label-color, color-foreground-secondary);
93
99
  margin-right: 3px;
@@ -97,6 +103,11 @@ button.expand-btn[aria-expanded="true"] ~ div.listbox-button__listbox,
97
103
  .color-token(listbox-button-label-color, color-foreground-primary);
98
104
  }
99
105
 
106
+ .listbox-button.listbox-button--error button .btn__label,
107
+ .listbox-button.listbox-button--error button .btn__floating-label {
108
+ .color-token(listbox-button-label-color, color-foreground-attention);
109
+ }
110
+
100
111
  .listbox-button .btn__text {
101
112
  font-weight: bold;
102
113
  margin-right: auto;
@@ -287,3 +287,81 @@ export const longOption = () => `
287
287
  </div>
288
288
  </span>
289
289
  `;
290
+
291
+ export const borderless = () => `
292
+ <span class="listbox-button">
293
+ <button class="btn btn--borderless" style="min-width: 150px" aria-expanded="false" aria-haspopup="listbox">
294
+ <span class="btn__cell">
295
+ <span class="btn__label">Quantity: </span>
296
+ <span class="btn__text">1</span>
297
+ <svg class="icon icon--chevron-down-12" focusable="false" height="10" width="14" aria-hidden="true">
298
+ <use href="#icon-chevron-down-12"></use>
299
+ </svg>
300
+ </span>
301
+ </button>
302
+ <div class="listbox-button__listbox">
303
+ <div class="listbox-button__options" role="listbox" tabindex="0">
304
+ <div class="listbox-button__option" role="option">
305
+ <span class="listbox-button__value">1</span>
306
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
307
+ <use href="#icon-tick-16"></use>
308
+ </svg>
309
+ </div>
310
+ <div class="listbox-button__option" role="option">
311
+ <span class="listbox-button__value">2</span>
312
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
313
+ <use href="#icon-tick-16"></use>
314
+ </svg>
315
+ </div>
316
+ <div class="listbox-button__option" role="option">
317
+ <span class="listbox-button__value">3</span>
318
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
319
+ <use href="#icon-tick-16"></use>
320
+ </svg>
321
+ </div>
322
+ </div>
323
+ </div>
324
+ </span>
325
+ `;
326
+
327
+ export const floatingLabelSelected = () => `
328
+ <span class="listbox-button">
329
+ <button class="btn btn--form btn--floating-label" style="min-width: 150px" aria-expanded="false" aria-haspopup="listbox">
330
+ <span class="btn__cell">
331
+ <span class="btn__floating-label">Color:</span>
332
+ <span class="btn__text">Blue</span>
333
+ <svg class="icon icon--chevron-down-12" focusable="false" height="10" width="14" aria-hidden="true">
334
+ <use href="#icon-chevron-down-12"></use>
335
+ </svg>
336
+ </span>
337
+ </button>
338
+ <div class="listbox-button__listbox">
339
+ <div class="listbox-button__options" role="listbox" tabindex="0">
340
+ <div class="listbox-button__option" role="option">
341
+ <span class="listbox-button__value">Red</span>
342
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
343
+ <use href="#icon-tick-16"></use>
344
+ </svg>
345
+ </div>
346
+ <div class="listbox-button__option" role="option" aria-selected="true">
347
+ <span class="listbox-button__value">Blue</span>
348
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
349
+ <use href="#icon-tick-16"></use>
350
+ </svg>
351
+ </div>
352
+ <div class="listbox-button__option" role="option">
353
+ <span class="listbox-button__value">Yellow</span>
354
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
355
+ <use href="#icon-tick-16"></use>
356
+ </svg>
357
+ </div>
358
+ <div class="listbox-button__option" role="option">
359
+ <span class="listbox-button__value">Green</span>
360
+ <svg class="icon icon--tick-16" focusable="false" height="10" width="14">
361
+ <use href="#icon-tick-16"></use>
362
+ </svg>
363
+ </div>
364
+ </div>
365
+ </div>
366
+ </span>
367
+ `;