@jetbrains/ring-ui 5.0.0-beta.13 → 5.0.0-beta.14

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.
@@ -54,13 +54,13 @@ const Sizes = {
54
54
  };
55
55
  const sizeKeys = Object.keys(Sizes).map(Number);
56
56
  function extractLetters(name) {
57
- const names = name.split(/[\s._]+/).filter(Boolean);
57
+ const names = name.split(/[\s._]+/).filter(Boolean).map(word => Array.from(word));
58
58
  if (names.length >= 2) {
59
59
  return names[0][0].toUpperCase() + names[1][0].toUpperCase();
60
60
  }
61
61
  else if (names.length === 1) {
62
62
  if (names[0].length >= 2) {
63
- return names[0].slice(0, 2).toUpperCase();
63
+ return names[0].slice(0, 2).join('').toUpperCase();
64
64
  }
65
65
  else {
66
66
  return `${names[0][0].toUpperCase()}X`;
@@ -55,13 +55,13 @@ const Sizes = {
55
55
  const sizeKeys = Object.keys(Sizes).map(Number);
56
56
 
57
57
  function extractLetters(name) {
58
- const names = name.split(/[\s._]+/).filter(Boolean);
58
+ const names = name.split(/[\s._]+/).filter(Boolean).map(word => Array.from(word));
59
59
 
60
60
  if (names.length >= 2) {
61
61
  return names[0][0].toUpperCase() + names[1][0].toUpperCase();
62
62
  } else if (names.length === 1) {
63
63
  if (names[0].length >= 2) {
64
- return names[0].slice(0, 2).toUpperCase();
64
+ return names[0].slice(0, 2).join('').toUpperCase();
65
65
  } else {
66
66
  return `${names[0][0].toUpperCase()}X`;
67
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.0.0-beta.13",
3
+ "version": "5.0.0-beta.14",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -246,5 +246,5 @@
246
246
  "node": ">=7.4",
247
247
  "npm": ">=6.0.0"
248
248
  },
249
- "gitHead": "06a95773f98674b12437a7999e51fb383c847917"
249
+ "gitHead": "55999c117e3279ceaf0930ab50ef218067c42c64"
250
250
  }