@ebay/skin 16.6.0 → 16.7.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 (214) hide show
  1. package/.storybook/preview-head.html +189 -31
  2. package/.stylelintrc +1 -4
  3. package/_cdn/skin/v16.7.0-0/skin-default.min.css +28 -0
  4. package/_cdn/skin/v16.7.0-0/skin-full.min.css +62 -0
  5. package/_cdn/skin/v16.7.0-0/skin-headless.min.css +6 -0
  6. package/_cdn/skin/v16.7.0-0/skin-legacy.min.css +28 -0
  7. package/chip.browser.json +1 -0
  8. package/chip.css +1 -0
  9. package/chip.js +1 -0
  10. package/chip.mjs +1 -0
  11. package/dist/alert-dialog/alert-dialog.css +2 -2
  12. package/dist/chip/chip.css +46 -0
  13. package/dist/confirm-dialog/confirm-dialog.css +2 -2
  14. package/dist/icon/icon.css +96 -0
  15. package/dist/legacy-tokens/ds4-light.css +33 -0
  16. package/dist/lightbox-dialog/lightbox-dialog.css +50 -2
  17. package/dist/section-notice/section-notice.css +9 -3
  18. package/dist/svg/icon/icon-ai-16.svg +7 -0
  19. package/dist/svg/icon/icon-ai-20.svg +7 -0
  20. package/dist/svg/icon/icon-ai-24.svg +7 -0
  21. package/dist/svg/icon/icon-ai-filled-16.svg +5 -0
  22. package/dist/svg/icon/icon-ai-filled-20.svg +5 -0
  23. package/dist/svg/icon/icon-ai-filled-24.svg +5 -0
  24. package/dist/svg/icon/icon-ai-thin-16.svg +7 -0
  25. package/dist/svg/icon/icon-arrows-expand-16.svg +7 -0
  26. package/dist/svg/icon/icon-arrows-expand-24.svg +7 -0
  27. package/dist/svg/icon/icon-avatar-signed-out.svg +17 -4
  28. package/dist/svg/icon/icon-background-removal-24.svg +7 -0
  29. package/dist/svg/icon/icon-car-brake-16.svg +7 -0
  30. package/dist/svg/icon/icon-car-brake-24.svg +7 -0
  31. package/dist/svg/icon/icon-chinese-coin-16.svg +7 -0
  32. package/dist/svg/icon/icon-chinese-coin-24.svg +7 -0
  33. package/dist/svg/icon/icon-close-12.svg +3 -0
  34. package/dist/svg/icon/icon-eek-arrow.svg +1 -1
  35. package/dist/svg/icon/icon-eek-range-arrow.svg +1 -1
  36. package/dist/svg/icon/icon-fingerprint-24.svg +4 -8
  37. package/dist/svg/icon/icon-graph-16.svg +7 -0
  38. package/dist/svg/icon/icon-graph-24.svg +7 -0
  39. package/dist/svg/icon/icon-headlight-16.svg +7 -0
  40. package/dist/svg/icon/icon-headlight-24.svg +7 -0
  41. package/dist/svg/icon/icon-home-24.svg +4 -2
  42. package/dist/svg/icon/icon-home-filled-24.svg +4 -2
  43. package/dist/svg/icon/icon-notification-16.svg +1 -1
  44. package/dist/svg/icon/icon-notification-20.svg +1 -1
  45. package/dist/svg/icon/icon-notification-24.svg +4 -2
  46. package/dist/svg/icon/icon-notification-64.svg +1 -1
  47. package/dist/svg/icon/icon-notification-filled-24.svg +4 -2
  48. package/dist/svg/icon/icon-selling-16.svg +1 -2
  49. package/dist/svg/icon/icon-selling-20.svg +2 -3
  50. package/dist/svg/icon/icon-selling-24.svg +4 -2
  51. package/dist/svg/icon/icon-selling-filled-24.svg +4 -2
  52. package/dist/svg/icon/icon-sparkline-up-filled-24.svg +7 -0
  53. package/dist/svg/icon/icon-spinner-20.svg +16 -4
  54. package/dist/svg/icon/icon-spinner-24.svg +16 -4
  55. package/dist/svg/icon/icon-spinner-30.svg +1 -1
  56. package/dist/svg/icon/icon-split-payment-16.svg +7 -0
  57. package/dist/svg/icon/icon-split-payment-24.svg +7 -0
  58. package/dist/svg/icon/icon-star-dynamic.svg +8 -6
  59. package/dist/svg/icon/icon-stepper-attention-24.svg +1 -1
  60. package/dist/svg/icon/icon-stepper-confirmation-24.svg +1 -1
  61. package/dist/svg/icon/icon-stepper-current-24.svg +1 -1
  62. package/dist/svg/icon/icon-stepper-upcoming-24.svg +6 -3
  63. package/dist/svg/icon/icon-store-16.svg +3 -5
  64. package/dist/svg/icon/icon-store-24.svg +2 -5
  65. package/dist/svg/icon/icon-store-64.svg +2 -5
  66. package/dist/svg/icon/icon-store-filled-24.svg +7 -0
  67. package/dist/svg/icon/icon-text-messaging-20.svg +7 -0
  68. package/dist/svg/icon/icon-twitter-24.svg +2 -2
  69. package/dist/svg/icon/image-placeholder.svg +9 -2
  70. package/dist/svg/icon/star-rating-0-5.svg +18 -1
  71. package/dist/svg/icon/star-rating-0.svg +8 -1
  72. package/dist/svg/icon/star-rating-1-5.svg +22 -1
  73. package/dist/svg/icon/star-rating-1.svg +12 -1
  74. package/dist/svg/icon/star-rating-2-5.svg +22 -1
  75. package/dist/svg/icon/star-rating-2.svg +12 -1
  76. package/dist/svg/icon/star-rating-3-5.svg +22 -1
  77. package/dist/svg/icon/star-rating-3.svg +12 -1
  78. package/dist/svg/icon/star-rating-4-5.svg +16 -1
  79. package/dist/svg/icon/star-rating-4.svg +12 -1
  80. package/dist/svg/icon/star-rating-5.svg +6 -1
  81. package/dist/svg/icon/star-rating-small-0-5.svg +18 -1
  82. package/dist/svg/icon/star-rating-small-0.svg +8 -1
  83. package/dist/svg/icon/star-rating-small-1-5.svg +22 -1
  84. package/dist/svg/icon/star-rating-small-1.svg +12 -1
  85. package/dist/svg/icon/star-rating-small-2-5.svg +22 -1
  86. package/dist/svg/icon/star-rating-small-2.svg +12 -1
  87. package/dist/svg/icon/star-rating-small-3-5.svg +22 -1
  88. package/dist/svg/icon/star-rating-small-3.svg +12 -1
  89. package/dist/svg/icon/star-rating-small-4-5.svg +16 -1
  90. package/dist/svg/icon/star-rating-small-4.svg +12 -1
  91. package/dist/svg/icon/star-rating-small-5.svg +6 -1
  92. package/dist/svg/icons.svg +189 -31
  93. package/dist/tokens/evo-core.css +12 -0
  94. package/dist/tokens/evo-dark.css +44 -0
  95. package/dist/tokens/evo-light.css +33 -0
  96. package/dist/variables/variables.less +1 -0
  97. package/index.browser.json +1 -0
  98. package/index.css +1 -0
  99. package/index.js +1 -0
  100. package/index.mjs +1 -0
  101. package/package.json +9 -9
  102. package/scripts/generate-bundle.js +18 -14
  103. package/scripts/generate-images.js +22 -24
  104. package/scripts/generate-imports/index.js +10 -10
  105. package/scripts/generate-imports/module-builder.js +13 -13
  106. package/scripts/split-icon.js +3 -3
  107. package/src/less/bundles/skin-headless.less +1 -0
  108. package/src/less/button/button.less +2 -1
  109. package/src/less/carousel/carousel.less +6 -2
  110. package/src/less/chip/chip.less +52 -0
  111. package/src/less/chip/stories/interactive-chip.stories.js +170 -0
  112. package/src/less/chip/stories/static-chip.stories.js +155 -0
  113. package/src/less/eek/eek.less +5 -2
  114. package/src/less/floating-label/floating-label.less +2 -1
  115. package/src/less/icon/generated/icon.less +96 -0
  116. package/src/less/lightbox-dialog/lightbox-dialog.less +55 -0
  117. package/src/less/lightbox-dialog/stories/lightbox-dialog.stories.js +80 -0
  118. package/src/less/marketsans/marketsans.less +4 -2
  119. package/src/less/mixins/private/dialog-mixins.less +7 -2
  120. package/src/less/section-notice/section-notice.less +17 -3
  121. package/src/less/section-notice/stories/icon-16.stories.js +156 -0
  122. package/src/less/section-notice/stories/icon-24.stories.js +251 -0
  123. package/src/less/section-notice/stories/iconless.stories.js +116 -0
  124. package/src/less/section-notice/stories/legacy.stories.js +32 -0
  125. package/src/less/section-notice/stories/test.stories.js +19 -78
  126. package/src/less/snackbar-dialog/snackbar-dialog.less +2 -1
  127. package/src/less/switch/switch.less +2 -1
  128. package/src/less/toast-dialog/toast-dialog.less +2 -1
  129. package/src/less/variables/variables.less +1 -0
  130. package/src/svg/icon/icon-ai-16.svg +7 -0
  131. package/src/svg/icon/icon-ai-20.svg +7 -0
  132. package/src/svg/icon/icon-ai-24.svg +7 -0
  133. package/src/svg/icon/icon-ai-filled-16.svg +5 -0
  134. package/src/svg/icon/icon-ai-filled-20.svg +5 -0
  135. package/src/svg/icon/icon-ai-filled-24.svg +5 -0
  136. package/src/svg/icon/icon-ai-thin-16.svg +7 -0
  137. package/src/svg/icon/icon-arrows-expand-16.svg +7 -0
  138. package/src/svg/icon/icon-arrows-expand-24.svg +7 -0
  139. package/src/svg/icon/icon-avatar-signed-out.svg +17 -4
  140. package/src/svg/icon/icon-background-removal-24.svg +7 -0
  141. package/src/svg/icon/icon-car-brake-16.svg +7 -0
  142. package/src/svg/icon/icon-car-brake-24.svg +7 -0
  143. package/src/svg/icon/icon-chinese-coin-16.svg +7 -0
  144. package/src/svg/icon/icon-chinese-coin-24.svg +7 -0
  145. package/src/svg/icon/icon-close-12.svg +3 -0
  146. package/src/svg/icon/icon-eek-arrow.svg +1 -1
  147. package/src/svg/icon/icon-eek-range-arrow.svg +1 -1
  148. package/src/svg/icon/icon-fingerprint-24.svg +4 -8
  149. package/src/svg/icon/icon-graph-16.svg +7 -0
  150. package/src/svg/icon/icon-graph-24.svg +7 -0
  151. package/src/svg/icon/icon-headlight-16.svg +7 -0
  152. package/src/svg/icon/icon-headlight-24.svg +7 -0
  153. package/src/svg/icon/icon-home-24.svg +4 -2
  154. package/src/svg/icon/icon-home-filled-24.svg +4 -2
  155. package/src/svg/icon/icon-notification-16.svg +1 -1
  156. package/src/svg/icon/icon-notification-20.svg +1 -1
  157. package/src/svg/icon/icon-notification-24.svg +4 -2
  158. package/src/svg/icon/icon-notification-64.svg +1 -1
  159. package/src/svg/icon/icon-notification-filled-24.svg +4 -2
  160. package/src/svg/icon/icon-selling-16.svg +1 -2
  161. package/src/svg/icon/icon-selling-20.svg +2 -3
  162. package/src/svg/icon/icon-selling-24.svg +4 -2
  163. package/src/svg/icon/icon-selling-filled-24.svg +4 -2
  164. package/src/svg/icon/icon-sparkline-up-filled-24.svg +7 -0
  165. package/src/svg/icon/icon-spinner-20.svg +16 -4
  166. package/src/svg/icon/icon-spinner-24.svg +16 -4
  167. package/src/svg/icon/icon-spinner-30.svg +1 -1
  168. package/src/svg/icon/icon-split-payment-16.svg +7 -0
  169. package/src/svg/icon/icon-split-payment-24.svg +7 -0
  170. package/src/svg/icon/icon-star-dynamic.svg +8 -6
  171. package/src/svg/icon/icon-stepper-attention-24.svg +1 -1
  172. package/src/svg/icon/icon-stepper-confirmation-24.svg +1 -1
  173. package/src/svg/icon/icon-stepper-current-24.svg +1 -1
  174. package/src/svg/icon/icon-stepper-upcoming-24.svg +6 -3
  175. package/src/svg/icon/icon-store-16.svg +3 -5
  176. package/src/svg/icon/icon-store-24.svg +2 -5
  177. package/src/svg/icon/icon-store-64.svg +2 -5
  178. package/src/svg/icon/icon-store-filled-24.svg +7 -0
  179. package/src/svg/icon/icon-text-messaging-20.svg +7 -0
  180. package/src/svg/icon/icon-twitter-24.svg +2 -2
  181. package/src/svg/icon/image-placeholder.svg +9 -2
  182. package/src/svg/icon/star-rating-0-5.svg +18 -1
  183. package/src/svg/icon/star-rating-0.svg +8 -1
  184. package/src/svg/icon/star-rating-1-5.svg +22 -1
  185. package/src/svg/icon/star-rating-1.svg +12 -1
  186. package/src/svg/icon/star-rating-2-5.svg +22 -1
  187. package/src/svg/icon/star-rating-2.svg +12 -1
  188. package/src/svg/icon/star-rating-3-5.svg +22 -1
  189. package/src/svg/icon/star-rating-3.svg +12 -1
  190. package/src/svg/icon/star-rating-4-5.svg +16 -1
  191. package/src/svg/icon/star-rating-4.svg +12 -1
  192. package/src/svg/icon/star-rating-5.svg +6 -1
  193. package/src/svg/icon/star-rating-small-0-5.svg +18 -1
  194. package/src/svg/icon/star-rating-small-0.svg +8 -1
  195. package/src/svg/icon/star-rating-small-1-5.svg +22 -1
  196. package/src/svg/icon/star-rating-small-1.svg +12 -1
  197. package/src/svg/icon/star-rating-small-2-5.svg +22 -1
  198. package/src/svg/icon/star-rating-small-2.svg +12 -1
  199. package/src/svg/icon/star-rating-small-3-5.svg +22 -1
  200. package/src/svg/icon/star-rating-small-3.svg +12 -1
  201. package/src/svg/icon/star-rating-small-4-5.svg +16 -1
  202. package/src/svg/icon/star-rating-small-4.svg +12 -1
  203. package/src/svg/icon/star-rating-small-5.svg +6 -1
  204. package/src/svg/icons.svg +189 -31
  205. package/src/tokens/evo-core.css +12 -0
  206. package/src/tokens/evo-dark.css +44 -0
  207. package/src/tokens/evo-light.css +33 -0
  208. package/svg.svg +189 -31
  209. package/_cdn/skin/v16.6.0/skin-default.min.css +0 -6
  210. package/_cdn/skin/v16.6.0/skin-full.min.css +0 -6
  211. package/_cdn/skin/v16.6.0/skin-headless.min.css +0 -6
  212. package/_cdn/skin/v16.6.0/skin-legacy.min.css +0 -6
  213. package/src/less/section-notice/stories/rtl.stories.js +0 -66
  214. package/src/less/section-notice/stories/section-notice.stories.js +0 -186
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": "16.6.0",
4
+ "version": "16.7.0-0",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",
7
7
  "maintainers": [
@@ -75,8 +75,8 @@
75
75
  "cross-env": "^7",
76
76
  "eslint": "^8.40.0",
77
77
  "eslint-config-ebay": "^1",
78
- "eslint-config-prettier": "^8",
79
- "eslint-plugin-prettier": "^4",
78
+ "eslint-config-prettier": "^9",
79
+ "eslint-plugin-prettier": "^5",
80
80
  "gulp": "^4",
81
81
  "gulp-banner": "~0.1.3",
82
82
  "gulp-clean-css": "^4",
@@ -88,7 +88,7 @@
88
88
  "less-loader": "^11.1.0",
89
89
  "less-plugin-autoprefix": "^2",
90
90
  "less-plugin-clean-css": "^1.5.1",
91
- "lint-staged": "^13.2.2",
91
+ "lint-staged": "^14.0.1",
92
92
  "makeup-alert-dialog": "~0.2.0",
93
93
  "makeup-combobox": "~0.3.0",
94
94
  "makeup-confirm-dialog": "~0.2.0",
@@ -117,14 +117,14 @@
117
117
  "npm-run-all": "^4",
118
118
  "postcss-less": "^6.0.0",
119
119
  "postcss-loader": "^7.3.0",
120
- "prettier": "^2.8.8",
120
+ "prettier": "^3.0.2",
121
121
  "rimraf": "^5",
122
- "storybook": "^7.0.12",
122
+ "storybook": "~7.1.1",
123
123
  "stylelint": "^15.6.2",
124
- "stylelint-config-standard": "^33",
125
- "stylelint-no-unsupported-browser-features": "^6.0.1",
124
+ "stylelint-config-standard": "^34",
125
+ "stylelint-no-unsupported-browser-features": "^7",
126
126
  "stylelint-order": "^6",
127
- "stylelint-prettier": "^3",
127
+ "stylelint-prettier": "^4",
128
128
  "svgo": "^3.0.1",
129
129
  "webpack": "^5.83.0",
130
130
  "webpack-cli": "^5.1.1",
@@ -52,7 +52,7 @@ class CssProcesser {
52
52
  return this.generateLESS()
53
53
  .then((raw) => this.compileLess(raw))
54
54
  .then((raw) =>
55
- this.minify ? cleanCSSInstance.minify(raw) : { styles: raw }
55
+ this.minify ? cleanCSSInstance.minify(raw) : { styles: raw },
56
56
  )
57
57
  .then((raw) => this.writeAllFiles(raw.styles))
58
58
  .catch((e) => console.error(e));
@@ -144,21 +144,21 @@ class CssProcesser {
144
144
 
145
145
  if (this.args.modules.length > 0 || this.args.verbose) {
146
146
  console.log(
147
- `Processed ${processed.length} modules for ${tokensFile}`
147
+ `Processed ${processed.length} modules for ${tokensFile}`,
148
148
  );
149
149
  }
150
150
  if (this.args.verbose) {
151
151
  console.log(
152
152
  `Modules processed: ${processed.join(
153
- ","
154
- )} for ${tokensFile}`
153
+ ",",
154
+ )} for ${tokensFile}`,
155
155
  );
156
156
 
157
157
  console.log(
158
- `Skipped ${skipped.length} modules for ${tokensFile}`
158
+ `Skipped ${skipped.length} modules for ${tokensFile}`,
159
159
  );
160
160
  console.log(
161
- `Modules skipped: ${skipped.join(",")} for ${tokensFile}`
161
+ `Modules skipped: ${skipped.join(",")} for ${tokensFile}`,
162
162
  );
163
163
  }
164
164
  resolve(compiled);
@@ -167,7 +167,7 @@ class CssProcesser {
167
167
 
168
168
  generateLESS() {
169
169
  return this.getDistCss(this.tokensFile).then((files) =>
170
- this.processFiles(files)
170
+ this.processFiles(files),
171
171
  );
172
172
  }
173
173
 
@@ -183,8 +183,8 @@ class CssProcesser {
183
183
  `${cdnPath}/skin-${this.tokensDir}.${
184
184
  this.minify ? "min." : ""
185
185
  }css`,
186
- `/* autoprefixer: off */\n${raw}\n/* autoprefixer: on */`
187
- )
186
+ `/* autoprefixer: off */\n${raw}\n/* autoprefixer: on */`,
187
+ ),
188
188
  );
189
189
  }
190
190
  }
@@ -249,11 +249,11 @@ function runCSSBuild(name, args) {
249
249
  const cssProcesser = new CssProcesser(
250
250
  token,
251
251
  tokensDirList[index],
252
- args
252
+ args,
253
253
  );
254
254
  return cssProcesser.run();
255
- })
256
- )
255
+ }),
256
+ ),
257
257
  )
258
258
  .then(() => {
259
259
  console.log(`Bundles created successfully!
@@ -267,8 +267,12 @@ Please upload the ./_cdn/${args.name}/v${pkg.version} directory to CDN
267
267
 
268
268
  async function listBundles(argv) {
269
269
  await prebuild();
270
- tokensList.forEach((tokensFile) => {
271
- const cssProcesser = new CssProcesser(tokensFile, argv);
270
+ tokensList.forEach((tokensFile, index) => {
271
+ const cssProcesser = new CssProcesser(
272
+ tokensFile,
273
+ tokensDirList[index],
274
+ argv,
275
+ );
272
276
  cssProcesser.getDistCss().then((files) => {
273
277
  console.log(`======================`);
274
278
  console.log(`${tokensFile} - modules avaiable`);
@@ -22,7 +22,7 @@ async function getFiles(dir) {
22
22
  dirents.map((dirent) => {
23
23
  const res = path.resolve(dir, dirent.name);
24
24
  return dirent.isDirectory() ? getFiles(res) : res;
25
- })
25
+ }),
26
26
  );
27
27
  return Array.prototype.concat(...files);
28
28
  }
@@ -53,30 +53,29 @@ async function prefixIcon(fileDir, fileBase) {
53
53
  " > " +
54
54
  config.icons.prefix +
55
55
  "-" +
56
- fileBase
56
+ fileBase,
57
57
  );
58
58
  });
59
59
  }
60
60
 
61
61
  async function normalizeFiles(svgs) {
62
62
  const svgFiles = svgs.filter(
63
- (f) => f.endsWith(".svg") && f !== "icons.svg"
63
+ (f) => f.endsWith(".svg") && f !== "icons.svg",
64
64
  );
65
65
 
66
- svgFiles.map(async (filePath) => {
66
+ await svgFiles.map(async (filePath) => {
67
67
  const fileDir = path.parse(filePath).dir;
68
68
  const fileBase = path.parse(filePath).base;
69
69
  const data = await fs.promises.readFile(filePath, "utf8");
70
70
  const svgJsDom = new JSDOM(data, { contentType: "text/xml" });
71
71
  const querySelector = svgJsDom.window.document.querySelector("svg");
72
- if (
73
- querySelector.hasAttribute("height") ||
74
- querySelector.hasAttribute("width")
75
- ) {
72
+
73
+ querySelector.hasAttribute("height") &&
76
74
  querySelector.removeAttribute("height");
75
+ querySelector.hasAttribute("width") &&
77
76
  querySelector.removeAttribute("width");
78
- await fs.promises.writeFile(filePath, html2xhtml(svgJsDom, true));
79
- }
77
+
78
+ await fs.promises.writeFile(filePath, await html2xhtml(svgJsDom, true));
80
79
 
81
80
  if (
82
81
  !fileBase.startsWith("icon-") &&
@@ -104,7 +103,7 @@ class GenerateImages {
104
103
  constructor(files, masterIconFile) {
105
104
  this.imageList = [];
106
105
  this.svgs = files.filter(
107
- (f) => f.endsWith(".svg") && f !== "icons.svg"
106
+ (f) => f.endsWith(".svg") && f !== "icons.svg",
108
107
  );
109
108
  this.masterIconSymbols = new JSDOM(masterIconFile);
110
109
  this.masterDocument = this.masterIconSymbols.window.document;
@@ -138,7 +137,7 @@ class GenerateImages {
138
137
  ) {
139
138
  this.imageList.push(nameObj.fullName);
140
139
  }
141
-
140
+ console.log("Processing SVG:", symbol, filename);
142
141
  // Need to parse it before pushing
143
142
  this.masterList.push(this.processSymbolToSVG(symbol, filename));
144
143
 
@@ -173,19 +172,20 @@ class GenerateImages {
173
172
  this.svgs.map(async (filePath) => {
174
173
  const filename = path.parse(filePath).name;
175
174
  await this.processSvg(filePath, filename, lessFile);
176
- })
175
+ }),
177
176
  );
178
177
 
179
178
  lessFile.sort(sortMethod);
180
179
 
180
+ const prettierFormat = await prettier.format(
181
+ [`/* ${genText} */`]
182
+ .concat(lessFile.map(({ data }) => data))
183
+ .join("\n"),
184
+ { parser: "less", tabWidth: 4 },
185
+ );
181
186
  await fs.promises.writeFile(
182
187
  `src/less/icon/generated/icon.less`,
183
- prettier.format(
184
- [`/* ${genText} */`]
185
- .concat(lessFile.map(({ data }) => data))
186
- .join("\n"),
187
- { parser: "less", tabWidth: 4 }
188
- )
188
+ prettierFormat,
189
189
  );
190
190
 
191
191
  this.imageList.sort();
@@ -198,16 +198,14 @@ class GenerateImages {
198
198
  this.masterDocument.querySelector("svg").appendChild(symbol);
199
199
  });
200
200
 
201
- await fs.promises.writeFile(
202
- masterIconPath,
203
- html2xhtml(this.masterIconSymbols)
204
- );
201
+ const fileOutput = await html2xhtml(this.masterIconSymbols);
202
+ await fs.promises.writeFile(masterIconPath, fileOutput);
205
203
  }
206
204
  }
207
205
 
208
206
  function stripName(name, mappedPrefix, mappedPostfix) {
209
207
  const matcher = new RegExp(
210
- `^((?:icon-|program-badge-|star-rating-)?)([\\w-]+?)((?:|-small))$`
208
+ `^((?:icon-|program-badge-|star-rating-)?)([\\w-]+?)((?:|-small))$`,
211
209
  );
212
210
  const nameMatch = name.match(matcher);
213
211
  if (nameMatch) {
@@ -9,14 +9,14 @@ const files = fs
9
9
  .readdirSync(distDir)
10
10
  .filter(
11
11
  (filename) =>
12
- config.skip.indexOf(filename) === -1 && !config.nested[filename]
12
+ config.skip.indexOf(filename) === -1 && !config.nested[filename],
13
13
  );
14
14
  const indexFiles = fs
15
15
  .readdirSync(distDir)
16
16
  .filter(
17
17
  (filename) =>
18
18
  config.skip.indexOf(filename) === -1 &&
19
- config.skipIndex.indexOf(filename) === -1
19
+ config.skipIndex.indexOf(filename) === -1,
20
20
  );
21
21
 
22
22
  const { ModuleBuilder } = require("./module-builder");
@@ -47,23 +47,23 @@ async function generateTopLevelFiles() {
47
47
  .join("");
48
48
  await fs.promises.writeFile(
49
49
  path.join(currentDir, "browser.json"),
50
- prettier.format(JSON.stringify(browser), { parser: "json" })
50
+ await prettier.format(JSON.stringify(browser), { parser: "json" }),
51
51
  );
52
52
  await fs.promises.writeFile(path.join(currentDir, "index.js"), contentJS);
53
53
  await fs.promises.writeFile(path.join(currentDir, "index.mjs"), contentMJS);
54
54
  await fs.promises.writeFile(path.join(currentDir, "index.css"), contentCSS);
55
55
  await fs.promises.writeFile(
56
56
  path.join(currentDir, "index.browser.json"),
57
- prettier.format(`{ "dependencies": [ ${contentBrowser} ]}`, {
57
+ await prettier.format(`{ "dependencies": [ ${contentBrowser} ]}`, {
58
58
  parser: "json",
59
- })
59
+ }),
60
60
  );
61
61
 
62
62
  // Generate SVGs
63
63
  const svgDistDir = path.join(distDir, "svg");
64
64
  await fs.promises.copyFile(
65
65
  path.join(svgDistDir, "icons.svg"),
66
- path.join(currentDir, "svg.svg")
66
+ path.join(currentDir, "svg.svg"),
67
67
  );
68
68
  }
69
69
 
@@ -81,14 +81,14 @@ const moduleData = [].concat(
81
81
  (moduleName) =>
82
82
  new ModuleBuilder(moduleName, config, {
83
83
  distDir,
84
- })
84
+ }),
85
85
  ),
86
86
  Object.keys(config.modules).map(
87
87
  (moduleName) =>
88
88
  new ModuleBuilder(moduleName, config, {
89
89
  hasBaseModule: false,
90
90
  distDir,
91
- })
91
+ }),
92
92
  ),
93
93
  Object.keys(config.nested).map(
94
94
  (moduleName) =>
@@ -96,8 +96,8 @@ const moduleData = [].concat(
96
96
  isNested: true,
97
97
  distDir,
98
98
  addIndexModules: config.nested[moduleName],
99
- })
100
- )
99
+ }),
100
+ ),
101
101
  );
102
102
 
103
103
  async function generateTopLevel() {
@@ -64,7 +64,7 @@ class ModuleBuilder {
64
64
  distDir: "",
65
65
  addIndexModules: null,
66
66
  },
67
- options
67
+ options,
68
68
  );
69
69
  }
70
70
 
@@ -122,7 +122,7 @@ class ModuleBuilder {
122
122
  });
123
123
  // Get all modules now in directory
124
124
  const moduleList = await fs.promises.readdir(
125
- path.join(this.options.distDir, this.moduleName)
125
+ path.join(this.options.distDir, this.moduleName),
126
126
  );
127
127
 
128
128
  if (this.options.addIndexModules) {
@@ -133,7 +133,7 @@ class ModuleBuilder {
133
133
  this.options.addIndexModules[file],
134
134
  async () => {
135
135
  await this.writeModuleFiles(file);
136
- }
136
+ },
137
137
  );
138
138
  } else {
139
139
  await this.overrideData(
@@ -142,7 +142,7 @@ class ModuleBuilder {
142
142
  async () => {
143
143
  await this.writeBrowserJSON(file);
144
144
  await this.writeModuleFiles(file);
145
- }
145
+ },
146
146
  );
147
147
  }
148
148
  }
@@ -165,22 +165,22 @@ class ModuleBuilder {
165
165
 
166
166
  async writeBrowserJSON(currentModule) {
167
167
  const additionalRequires = this.additionalModules.map((addFile) =>
168
- getBrowserRequireSyntax(addFile)
168
+ getBrowserRequireSyntax(addFile),
169
169
  );
170
170
  const filename = currentModule || this.moduleName;
171
171
  const requires = additionalRequires.concat(
172
172
  this.options.hasBaseModule
173
173
  ? [getBrowserRequireSyntax(filename)]
174
- : []
174
+ : [],
175
175
  );
176
176
 
177
177
  const content = { dependencies: requires };
178
178
  return await fs.promises.writeFile(
179
179
  getBrowserFileName(
180
180
  filename,
181
- this.options.isNested && this.moduleName
181
+ this.options.isNested && this.moduleName,
182
182
  ),
183
- prettier.format(JSON.stringify(content), { parser: "json" })
183
+ await prettier.format(JSON.stringify(content), { parser: "json" }),
184
184
  );
185
185
  }
186
186
 
@@ -197,7 +197,7 @@ class ModuleBuilder {
197
197
  this.parseAdditionalModules(getJSRequireSyntax, "js", {
198
198
  modules,
199
199
  filename,
200
- })
200
+ }),
201
201
  );
202
202
 
203
203
  await fs.promises.writeFile(
@@ -205,7 +205,7 @@ class ModuleBuilder {
205
205
  this.parseAdditionalModules(getCSSRequireSyntax, "css", {
206
206
  modules,
207
207
  filename,
208
- })
208
+ }),
209
209
  );
210
210
 
211
211
  await fs.promises.writeFile(
@@ -213,16 +213,16 @@ class ModuleBuilder {
213
213
  this.parseAdditionalModules(getMJSRequireSyntax, "css", {
214
214
  modules,
215
215
  filename,
216
- })
216
+ }),
217
217
  );
218
218
  }
219
219
 
220
220
  parseAdditionalModules(getSyntax, ext, { modules, filename }) {
221
221
  const additioanlContent = modules.map((addFile) =>
222
- getSyntax(addFile, ext)
222
+ getSyntax(addFile, ext),
223
223
  );
224
224
  const content = additioanlContent.concat(
225
- filename ? [getSyntax(filename, "css")] : []
225
+ filename ? [getSyntax(filename, "css")] : [],
226
226
  );
227
227
  return content.join("");
228
228
  }
@@ -14,7 +14,7 @@ const { html2xhtml2 } = require("./util");
14
14
  async function splitter(file, argv) {
15
15
  const skinFile = await fs.promises.readFile(
16
16
  path.resolve(svgDir, `${file}.svg`),
17
- "utf8"
17
+ "utf8",
18
18
  );
19
19
 
20
20
  const symbols = JSDOM.fragment(skinFile);
@@ -26,9 +26,9 @@ async function splitter(file, argv) {
26
26
 
27
27
  await fs.promises.writeFile(
28
28
  path.resolve(svgDir, "icon", `${symbolId}.svg`),
29
- html2xhtml2(symbol)
29
+ await html2xhtml2(symbol)
30
30
  .replace("<symbol", "<svg")
31
- .replace("</symbol>", "</svg>")
31
+ .replace("</symbol>", "</svg>"),
32
32
  );
33
33
  }
34
34
  }
@@ -10,6 +10,7 @@
10
10
  @import "../carousel/carousel.less";
11
11
  @import "../calendar/calendar.less";
12
12
  @import "../checkbox/checkbox.less";
13
+ @import "../chip/chip.less";
13
14
  @import "../combobox/combobox.less";
14
15
  @import "../confirm-dialog/confirm-dialog.less";
15
16
  @import "../cta-button/cta-button.less";
@@ -468,7 +468,8 @@ button.btn--floating-label .btn__floating-label {
468
468
  }
469
469
 
470
470
  button.btn--floating-label .btn__floating-label--animate {
471
- transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
471
+ transition:
472
+ transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
472
473
  bottom 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
473
474
  }
474
475
 
@@ -46,7 +46,9 @@
46
46
  border: 1px solid;
47
47
  .border-color-token(carousel-paddle-border-color, color-stroke-subtle);
48
48
  border-radius: 16px;
49
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.24), 0 0 2px 0 rgba(0, 0, 0, 0.12);
49
+ box-shadow:
50
+ 0 2px 2px 0 rgba(0, 0, 0, 0.24),
51
+ 0 0 2px 0 rgba(0, 0, 0, 0.12);
50
52
  display: flex;
51
53
  font-size: 18px;
52
54
  height: 32px;
@@ -294,7 +296,9 @@ span.carousel__container {
294
296
  /* stylelint-enable declaration-block-no-duplicate-properties */
295
297
  scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
296
298
  scrollbar-width: thin; // Firefox scrollbar
297
- transition: border-color 0.5s, scrollbar-color 0.5s,
299
+ transition:
300
+ border-color 0.5s,
301
+ scrollbar-color 0.5s,
298
302
  transform @ebay-carousel-transition-time
299
303
  @ebay-carousel-transition-function;
300
304
 
@@ -0,0 +1,52 @@
1
+ @import "../variables/variables.less";
2
+
3
+ .chip {
4
+ align-items: center;
5
+ background-color: var(--color-background-tertiary);
6
+ border-radius: @spacing-400;
7
+ color: var(--color-foreground-primary);
8
+ display: inline-flex;
9
+ font-size: @font-size-14;
10
+ gap: 2px;
11
+ justify-content: space-between;
12
+ max-width: 296px;
13
+ min-height: @spacing-250;
14
+ min-width: 32px;
15
+ padding: 0 @spacing-150;
16
+ }
17
+
18
+ .chip__text {
19
+ overflow: hidden;
20
+ padding: @spacing-75 0;
21
+ text-overflow: ellipsis;
22
+ white-space: nowrap;
23
+ }
24
+
25
+ button.chip__button {
26
+ background-color: transparent;
27
+ border: none;
28
+ border-radius: 50px;
29
+ box-sizing: border-box;
30
+ flex-shrink: 0;
31
+ height: @spacing-300;
32
+ line-height: 0;
33
+ margin-inline-end: -8px;
34
+ padding: 0;
35
+ width: @spacing-300;
36
+ }
37
+
38
+ button.chip__button:focus-visible {
39
+ background-color: var(--state-layer-focus);
40
+ outline-color: var(--color-state-focus-stroke);
41
+ outline-offset: -2px;
42
+ outline-style: solid;
43
+ outline-width: 2px;
44
+ }
45
+
46
+ button.chip__button:hover {
47
+ background-color: var(--state-layer-hover);
48
+ }
49
+
50
+ button.chip__button > svg {
51
+ fill: var(--color-foreground-on-primary);
52
+ }