@gitlab/ui 87.7.0 → 88.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 (31) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/bin/migrate_custom_utils_to_tw.bundled.mjs +51 -46
  3. package/dist/index.css +2 -2
  4. package/dist/index.css.map +1 -1
  5. package/dist/tokens/build/js/tokens.dark.js +100 -82
  6. package/dist/tokens/build/js/tokens.js +100 -82
  7. package/dist/tokens/css/tokens.css +99 -81
  8. package/dist/tokens/css/tokens.dark.css +99 -81
  9. package/dist/tokens/js/tokens.dark.js +99 -81
  10. package/dist/tokens/js/tokens.js +99 -81
  11. package/dist/tokens/json/tokens.dark.json +6215 -5799
  12. package/dist/tokens/json/tokens.json +6215 -5799
  13. package/dist/tokens/scss/_tokens.dark.scss +99 -81
  14. package/dist/tokens/scss/_tokens.scss +99 -81
  15. package/dist/tokens/scss/_tokens_custom_properties.scss +99 -81
  16. package/package.json +5 -5
  17. package/src/components/base/avatars_inline/avatars_inline.scss +2 -2
  18. package/src/components/base/badge/badge.scss +63 -63
  19. package/src/components/base/tooltip/tooltip.scss +6 -6
  20. package/src/tokens/build/css/tokens.css +99 -81
  21. package/src/tokens/build/css/tokens.dark.css +99 -81
  22. package/src/tokens/build/js/tokens.dark.js +99 -81
  23. package/src/tokens/build/js/tokens.js +99 -81
  24. package/src/tokens/build/json/tokens.dark.json +6215 -5799
  25. package/src/tokens/build/json/tokens.json +6215 -5799
  26. package/src/tokens/build/scss/_tokens.dark.scss +99 -81
  27. package/src/tokens/build/scss/_tokens.scss +99 -81
  28. package/src/tokens/build/scss/_tokens_custom_properties.scss +99 -81
  29. package/src/tokens/contextual/badge.tokens.json +704 -0
  30. package/src/tokens/feedback.tokens.json +13 -19
  31. package/src/tokens/status.tokens.json +90 -640
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ # [88.0.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v87.8.0...v88.0.0) (2024-08-06)
2
+
3
+
4
+ ### Features
5
+
6
+ * **DesignTokens:** Restructure feedback tokens for improved clarity ([73e0a26](https://gitlab.com/gitlab-org/gitlab-ui/commit/73e0a26436094e703060f4b96889b7286cb3b7b5))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * **DesignTokens:** This commit introduces a new naming structure
12
+ for feedback-related design tokens. The new structure improves
13
+ clarity and reduces potential misuse of tokens.
14
+
15
+ # [87.8.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v87.7.0...v87.8.0) (2024-08-02)
16
+
17
+
18
+ ### Features
19
+
20
+ * **DesignTokens:** separate badge from status design tokens ([280f390](https://gitlab.com/gitlab-org/gitlab-ui/commit/280f390f9a978362c71871beea8b7400832828e8))
21
+
1
22
  # [87.7.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v87.6.1...v87.7.0) (2024-08-01)
2
23
 
3
24
 
@@ -91778,7 +91778,7 @@ var require_utils5 = __commonJS({
91778
91778
  return (Number(max) - Number(min)) / Number(step) >= limit;
91779
91779
  };
91780
91780
  exports.escapeNode = (block, n = 0, type2) => {
91781
- let node = block.nodes[n];
91781
+ const node = block.nodes[n];
91782
91782
  if (!node)
91783
91783
  return;
91784
91784
  if (type2 && node.type === type2 || node.type === "open" || node.type === "close") {
@@ -91829,8 +91829,14 @@ var require_utils5 = __commonJS({
91829
91829
  const result = [];
91830
91830
  const flat = (arr) => {
91831
91831
  for (let i3 = 0; i3 < arr.length; i3++) {
91832
- let ele = arr[i3];
91833
- Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
91832
+ const ele = arr[i3];
91833
+ if (Array.isArray(ele)) {
91834
+ flat(ele);
91835
+ continue;
91836
+ }
91837
+ if (ele !== void 0) {
91838
+ result.push(ele);
91839
+ }
91834
91840
  }
91835
91841
  return result;
91836
91842
  };
@@ -91846,9 +91852,9 @@ var require_stringify2 = __commonJS({
91846
91852
  "use strict";
91847
91853
  var utils2 = require_utils5();
91848
91854
  module.exports = (ast, options8 = {}) => {
91849
- let stringify = (node, parent = {}) => {
91850
- let invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
91851
- let invalidNode = node.invalid === true && options8.escapeInvalid === true;
91855
+ const stringify = (node, parent = {}) => {
91856
+ const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
91857
+ const invalidNode = node.invalid === true && options8.escapeInvalid === true;
91852
91858
  let output = "";
91853
91859
  if (node.value) {
91854
91860
  if ((invalidBlock || invalidNode) && utils2.isOpenOrClose(node)) {
@@ -91860,7 +91866,7 @@ var require_stringify2 = __commonJS({
91860
91866
  return node.value;
91861
91867
  }
91862
91868
  if (node.nodes) {
91863
- for (let child of node.nodes) {
91869
+ for (const child of node.nodes) {
91864
91870
  output += stringify(child);
91865
91871
  }
91866
91872
  }
@@ -92152,7 +92158,7 @@ var require_fill_range2 = __commonJS({
92152
92158
  input = "0" + input;
92153
92159
  return negative ? "-" + input : input;
92154
92160
  };
92155
- var toSequence = (parts, options8) => {
92161
+ var toSequence = (parts, options8, maxLen) => {
92156
92162
  parts.negatives.sort((a3, b6) => a3 < b6 ? -1 : a3 > b6 ? 1 : 0);
92157
92163
  parts.positives.sort((a3, b6) => a3 < b6 ? -1 : a3 > b6 ? 1 : 0);
92158
92164
  let prefix = options8.capture ? "" : "?:";
@@ -92160,10 +92166,10 @@ var require_fill_range2 = __commonJS({
92160
92166
  let negatives = "";
92161
92167
  let result;
92162
92168
  if (parts.positives.length) {
92163
- positives = parts.positives.join("|");
92169
+ positives = parts.positives.map((v5) => toMaxLen(String(v5), maxLen)).join("|");
92164
92170
  }
92165
92171
  if (parts.negatives.length) {
92166
- negatives = `-(${prefix}${parts.negatives.join("|")})`;
92172
+ negatives = `-(${prefix}${parts.negatives.map((v5) => toMaxLen(String(v5), maxLen)).join("|")})`;
92167
92173
  }
92168
92174
  if (positives && negatives) {
92169
92175
  result = `${positives}|${negatives}`;
@@ -92245,7 +92251,7 @@ var require_fill_range2 = __commonJS({
92245
92251
  index++;
92246
92252
  }
92247
92253
  if (options8.toRegex === true) {
92248
- return step > 1 ? toSequence(parts, options8) : toRegex(range, null, { wrap: false, ...options8 });
92254
+ return step > 1 ? toSequence(parts, options8, maxLen) : toRegex(range, null, { wrap: false, ...options8 });
92249
92255
  }
92250
92256
  return range;
92251
92257
  };
@@ -92312,16 +92318,17 @@ var require_compile2 = __commonJS({
92312
92318
  var fill3 = require_fill_range2();
92313
92319
  var utils2 = require_utils5();
92314
92320
  var compile = (ast, options8 = {}) => {
92315
- let walk = (node, parent = {}) => {
92316
- let invalidBlock = utils2.isInvalidBrace(parent);
92317
- let invalidNode = node.invalid === true && options8.escapeInvalid === true;
92318
- let invalid = invalidBlock === true || invalidNode === true;
92319
- let prefix = options8.escapeInvalid === true ? "\\" : "";
92321
+ const walk = (node, parent = {}) => {
92322
+ const invalidBlock = utils2.isInvalidBrace(parent);
92323
+ const invalidNode = node.invalid === true && options8.escapeInvalid === true;
92324
+ const invalid = invalidBlock === true || invalidNode === true;
92325
+ const prefix = options8.escapeInvalid === true ? "\\" : "";
92320
92326
  let output = "";
92321
92327
  if (node.isOpen === true) {
92322
92328
  return prefix + node.value;
92323
92329
  }
92324
92330
  if (node.isClose === true) {
92331
+ console.log("node.isClose", prefix, node.value);
92325
92332
  return prefix + node.value;
92326
92333
  }
92327
92334
  if (node.type === "open") {
@@ -92337,14 +92344,14 @@ var require_compile2 = __commonJS({
92337
92344
  return node.value;
92338
92345
  }
92339
92346
  if (node.nodes && node.ranges > 0) {
92340
- let args = utils2.reduce(node.nodes);
92341
- let range = fill3(...args, { ...options8, wrap: false, toRegex: true });
92347
+ const args = utils2.reduce(node.nodes);
92348
+ const range = fill3(...args, { ...options8, wrap: false, toRegex: true, strictZeros: true });
92342
92349
  if (range.length !== 0) {
92343
92350
  return args.length > 1 && range.length > 1 ? `(${range})` : range;
92344
92351
  }
92345
92352
  }
92346
92353
  if (node.nodes) {
92347
- for (let child of node.nodes) {
92354
+ for (const child of node.nodes) {
92348
92355
  output += walk(child, node);
92349
92356
  }
92350
92357
  }
@@ -92364,7 +92371,7 @@ var require_expand2 = __commonJS({
92364
92371
  var stringify = require_stringify2();
92365
92372
  var utils2 = require_utils5();
92366
92373
  var append = (queue = "", stash = "", enclose = false) => {
92367
- let result = [];
92374
+ const result = [];
92368
92375
  queue = [].concat(queue);
92369
92376
  stash = [].concat(stash);
92370
92377
  if (!stash.length)
@@ -92372,9 +92379,9 @@ var require_expand2 = __commonJS({
92372
92379
  if (!queue.length) {
92373
92380
  return enclose ? utils2.flatten(stash).map((ele) => `{${ele}}`) : stash;
92374
92381
  }
92375
- for (let item of queue) {
92382
+ for (const item of queue) {
92376
92383
  if (Array.isArray(item)) {
92377
- for (let value2 of item) {
92384
+ for (const value2 of item) {
92378
92385
  result.push(append(value2, stash, enclose));
92379
92386
  }
92380
92387
  } else {
@@ -92388,8 +92395,8 @@ var require_expand2 = __commonJS({
92388
92395
  return utils2.flatten(result);
92389
92396
  };
92390
92397
  var expand = (ast, options8 = {}) => {
92391
- let rangeLimit = options8.rangeLimit === void 0 ? 1e3 : options8.rangeLimit;
92392
- let walk = (node, parent = {}) => {
92398
+ const rangeLimit = options8.rangeLimit === void 0 ? 1e3 : options8.rangeLimit;
92399
+ const walk = (node, parent = {}) => {
92393
92400
  node.queue = [];
92394
92401
  let p4 = parent;
92395
92402
  let q11 = parent.queue;
@@ -92406,7 +92413,7 @@ var require_expand2 = __commonJS({
92406
92413
  return;
92407
92414
  }
92408
92415
  if (node.nodes && node.ranges > 0) {
92409
- let args = utils2.reduce(node.nodes);
92416
+ const args = utils2.reduce(node.nodes);
92410
92417
  if (utils2.exceedsLimit(...args, options8.step, rangeLimit)) {
92411
92418
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
92412
92419
  }
@@ -92418,7 +92425,7 @@ var require_expand2 = __commonJS({
92418
92425
  node.nodes = [];
92419
92426
  return;
92420
92427
  }
92421
- let enclose = utils2.encloseBrace(node);
92428
+ const enclose = utils2.encloseBrace(node);
92422
92429
  let queue = node.queue;
92423
92430
  let block = node;
92424
92431
  while (block.type !== "brace" && block.type !== "root" && block.parent) {
@@ -92426,7 +92433,7 @@ var require_expand2 = __commonJS({
92426
92433
  queue = block.queue;
92427
92434
  }
92428
92435
  for (let i3 = 0; i3 < node.nodes.length; i3++) {
92429
- let child = node.nodes[i3];
92436
+ const child = node.nodes[i3];
92430
92437
  if (child.type === "comma" && node.type === "brace") {
92431
92438
  if (i3 === 1)
92432
92439
  queue.push("");
@@ -92458,7 +92465,7 @@ var require_constants5 = __commonJS({
92458
92465
  "node_modules/braces/lib/constants.js"(exports, module) {
92459
92466
  "use strict";
92460
92467
  module.exports = {
92461
- MAX_LENGTH: 1024 * 64,
92468
+ MAX_LENGTH: 1e4,
92462
92469
  // Digits
92463
92470
  CHAR_0: "0",
92464
92471
  /* 0 */
@@ -92592,21 +92599,20 @@ var require_parse3 = __commonJS({
92592
92599
  if (typeof input !== "string") {
92593
92600
  throw new TypeError("Expected a string");
92594
92601
  }
92595
- let opts = options8 || {};
92596
- let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
92602
+ const opts = options8 || {};
92603
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
92597
92604
  if (input.length > max) {
92598
92605
  throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
92599
92606
  }
92600
- let ast = { type: "root", input, nodes: [] };
92601
- let stack2 = [ast];
92607
+ const ast = { type: "root", input, nodes: [] };
92608
+ const stack2 = [ast];
92602
92609
  let block = ast;
92603
92610
  let prev = ast;
92604
92611
  let brackets = 0;
92605
- let length = input.length;
92612
+ const length = input.length;
92606
92613
  let index = 0;
92607
92614
  let depth = 0;
92608
92615
  let value2;
92609
- let memo = {};
92610
92616
  const advance = () => input[index++];
92611
92617
  const push2 = (node) => {
92612
92618
  if (node.type === "text" && prev.type === "dot") {
@@ -92639,7 +92645,6 @@ var require_parse3 = __commonJS({
92639
92645
  }
92640
92646
  if (value2 === CHAR_LEFT_SQUARE_BRACKET) {
92641
92647
  brackets++;
92642
- let closed = true;
92643
92648
  let next;
92644
92649
  while (index < length && (next = advance())) {
92645
92650
  value2 += next;
@@ -92678,7 +92683,7 @@ var require_parse3 = __commonJS({
92678
92683
  continue;
92679
92684
  }
92680
92685
  if (value2 === CHAR_DOUBLE_QUOTE || value2 === CHAR_SINGLE_QUOTE || value2 === CHAR_BACKTICK) {
92681
- let open = value2;
92686
+ const open = value2;
92682
92687
  let next;
92683
92688
  if (options8.keepQuotes !== true) {
92684
92689
  value2 = "";
@@ -92700,8 +92705,8 @@ var require_parse3 = __commonJS({
92700
92705
  }
92701
92706
  if (value2 === CHAR_LEFT_CURLY_BRACE) {
92702
92707
  depth++;
92703
- let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
92704
- let brace = {
92708
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
92709
+ const brace = {
92705
92710
  type: "brace",
92706
92711
  open: true,
92707
92712
  close: false,
@@ -92721,7 +92726,7 @@ var require_parse3 = __commonJS({
92721
92726
  push2({ type: "text", value: value2 });
92722
92727
  continue;
92723
92728
  }
92724
- let type2 = "close";
92729
+ const type2 = "close";
92725
92730
  block = stack2.pop();
92726
92731
  block.close = true;
92727
92732
  push2({ type: type2, value: value2 });
@@ -92732,7 +92737,7 @@ var require_parse3 = __commonJS({
92732
92737
  if (value2 === CHAR_COMMA && depth > 0) {
92733
92738
  if (block.ranges > 0) {
92734
92739
  block.ranges = 0;
92735
- let open = block.nodes.shift();
92740
+ const open = block.nodes.shift();
92736
92741
  block.nodes = [open, { type: "text", value: stringify(block) }];
92737
92742
  }
92738
92743
  push2({ type: "comma", value: value2 });
@@ -92740,7 +92745,7 @@ var require_parse3 = __commonJS({
92740
92745
  continue;
92741
92746
  }
92742
92747
  if (value2 === CHAR_DOT && depth > 0 && block.commas === 0) {
92743
- let siblings = block.nodes;
92748
+ const siblings = block.nodes;
92744
92749
  if (depth === 0 || siblings.length === 0) {
92745
92750
  push2({ type: "text", value: value2 });
92746
92751
  continue;
@@ -92761,7 +92766,7 @@ var require_parse3 = __commonJS({
92761
92766
  }
92762
92767
  if (prev.type === "range") {
92763
92768
  siblings.pop();
92764
- let before = siblings[siblings.length - 1];
92769
+ const before = siblings[siblings.length - 1];
92765
92770
  before.value += prev.value + value2;
92766
92771
  prev = before;
92767
92772
  block.ranges--;
@@ -92786,8 +92791,8 @@ var require_parse3 = __commonJS({
92786
92791
  node.invalid = true;
92787
92792
  }
92788
92793
  });
92789
- let parent = stack2[stack2.length - 1];
92790
- let index2 = parent.nodes.indexOf(block);
92794
+ const parent = stack2[stack2.length - 1];
92795
+ const index2 = parent.nodes.indexOf(block);
92791
92796
  parent.nodes.splice(index2, 1, ...block.nodes);
92792
92797
  }
92793
92798
  } while (stack2.length > 0);
@@ -92809,8 +92814,8 @@ var require_braces2 = __commonJS({
92809
92814
  var braces = (input, options8 = {}) => {
92810
92815
  let output = [];
92811
92816
  if (Array.isArray(input)) {
92812
- for (let pattern of input) {
92813
- let result = braces.create(pattern, options8);
92817
+ for (const pattern of input) {
92818
+ const result = braces.create(pattern, options8);
92814
92819
  if (Array.isArray(result)) {
92815
92820
  output.push(...result);
92816
92821
  } else {