@carbon/charts 1.22.13 → 1.22.15

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.
@@ -4886,12 +4886,15 @@ const Q = {
4886
4886
  G: function(t, e, n) {
4887
4887
  const r = t.getFullYear() > 0 ? 1 : 0;
4888
4888
  switch (e) {
4889
+ // AD, BC
4889
4890
  case "G":
4890
4891
  case "GG":
4891
4892
  case "GGG":
4892
4893
  return n.era(r, { width: "abbreviated" });
4894
+ // A, B
4893
4895
  case "GGGGG":
4894
4896
  return n.era(r, { width: "narrow" });
4897
+ // Anno Domini, Before Christ
4895
4898
  case "GGGG":
4896
4899
  default:
4897
4900
  return n.era(r, { width: "wide" });
@@ -4936,22 +4939,28 @@ const Q = {
4936
4939
  Q: function(t, e, n) {
4937
4940
  const r = Math.ceil((t.getMonth() + 1) / 3);
4938
4941
  switch (e) {
4942
+ // 1, 2, 3, 4
4939
4943
  case "Q":
4940
4944
  return String(r);
4945
+ // 01, 02, 03, 04
4941
4946
  case "QQ":
4942
4947
  return x(r, 2);
4948
+ // 1st, 2nd, 3rd, 4th
4943
4949
  case "Qo":
4944
4950
  return n.ordinalNumber(r, { unit: "quarter" });
4951
+ // Q1, Q2, Q3, Q4
4945
4952
  case "QQQ":
4946
4953
  return n.quarter(r, {
4947
4954
  width: "abbreviated",
4948
4955
  context: "formatting"
4949
4956
  });
4957
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
4950
4958
  case "QQQQQ":
4951
4959
  return n.quarter(r, {
4952
4960
  width: "narrow",
4953
4961
  context: "formatting"
4954
4962
  });
4963
+ // 1st quarter, 2nd quarter, ...
4955
4964
  case "QQQQ":
4956
4965
  default:
4957
4966
  return n.quarter(r, {
@@ -4964,22 +4973,28 @@ const Q = {
4964
4973
  q: function(t, e, n) {
4965
4974
  const r = Math.ceil((t.getMonth() + 1) / 3);
4966
4975
  switch (e) {
4976
+ // 1, 2, 3, 4
4967
4977
  case "q":
4968
4978
  return String(r);
4979
+ // 01, 02, 03, 04
4969
4980
  case "qq":
4970
4981
  return x(r, 2);
4982
+ // 1st, 2nd, 3rd, 4th
4971
4983
  case "qo":
4972
4984
  return n.ordinalNumber(r, { unit: "quarter" });
4985
+ // Q1, Q2, Q3, Q4
4973
4986
  case "qqq":
4974
4987
  return n.quarter(r, {
4975
4988
  width: "abbreviated",
4976
4989
  context: "standalone"
4977
4990
  });
4991
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
4978
4992
  case "qqqqq":
4979
4993
  return n.quarter(r, {
4980
4994
  width: "narrow",
4981
4995
  context: "standalone"
4982
4996
  });
4997
+ // 1st quarter, 2nd quarter, ...
4983
4998
  case "qqqq":
4984
4999
  default:
4985
5000
  return n.quarter(r, {
@@ -4995,18 +5010,22 @@ const Q = {
4995
5010
  case "M":
4996
5011
  case "MM":
4997
5012
  return Q.M(t, e);
5013
+ // 1st, 2nd, ..., 12th
4998
5014
  case "Mo":
4999
5015
  return n.ordinalNumber(r + 1, { unit: "month" });
5016
+ // Jan, Feb, ..., Dec
5000
5017
  case "MMM":
5001
5018
  return n.month(r, {
5002
5019
  width: "abbreviated",
5003
5020
  context: "formatting"
5004
5021
  });
5022
+ // J, F, ..., D
5005
5023
  case "MMMMM":
5006
5024
  return n.month(r, {
5007
5025
  width: "narrow",
5008
5026
  context: "formatting"
5009
5027
  });
5028
+ // January, February, ..., December
5010
5029
  case "MMMM":
5011
5030
  default:
5012
5031
  return n.month(r, { width: "wide", context: "formatting" });
@@ -5016,22 +5035,28 @@ const Q = {
5016
5035
  L: function(t, e, n) {
5017
5036
  const r = t.getMonth();
5018
5037
  switch (e) {
5038
+ // 1, 2, ..., 12
5019
5039
  case "L":
5020
5040
  return String(r + 1);
5041
+ // 01, 02, ..., 12
5021
5042
  case "LL":
5022
5043
  return x(r + 1, 2);
5044
+ // 1st, 2nd, ..., 12th
5023
5045
  case "Lo":
5024
5046
  return n.ordinalNumber(r + 1, { unit: "month" });
5047
+ // Jan, Feb, ..., Dec
5025
5048
  case "LLL":
5026
5049
  return n.month(r, {
5027
5050
  width: "abbreviated",
5028
5051
  context: "standalone"
5029
5052
  });
5053
+ // J, F, ..., D
5030
5054
  case "LLLLL":
5031
5055
  return n.month(r, {
5032
5056
  width: "narrow",
5033
5057
  context: "standalone"
5034
5058
  });
5059
+ // January, February, ..., December
5035
5060
  case "LLLL":
5036
5061
  default:
5037
5062
  return n.month(r, { width: "wide", context: "standalone" });
@@ -5060,6 +5085,7 @@ const Q = {
5060
5085
  E: function(t, e, n) {
5061
5086
  const r = t.getDay();
5062
5087
  switch (e) {
5088
+ // Tue
5063
5089
  case "E":
5064
5090
  case "EE":
5065
5091
  case "EEE":
@@ -5067,16 +5093,19 @@ const Q = {
5067
5093
  width: "abbreviated",
5068
5094
  context: "formatting"
5069
5095
  });
5096
+ // T
5070
5097
  case "EEEEE":
5071
5098
  return n.day(r, {
5072
5099
  width: "narrow",
5073
5100
  context: "formatting"
5074
5101
  });
5102
+ // Tu
5075
5103
  case "EEEEEE":
5076
5104
  return n.day(r, {
5077
5105
  width: "short",
5078
5106
  context: "formatting"
5079
5107
  });
5108
+ // Tuesday
5080
5109
  case "EEEE":
5081
5110
  default:
5082
5111
  return n.day(r, {
@@ -5089,10 +5118,13 @@ const Q = {
5089
5118
  e: function(t, e, n, r) {
5090
5119
  const i = t.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
5091
5120
  switch (e) {
5121
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
5092
5122
  case "e":
5093
5123
  return String(a);
5124
+ // Padded numerical value
5094
5125
  case "ee":
5095
5126
  return x(a, 2);
5127
+ // 1st, 2nd, ..., 7th
5096
5128
  case "eo":
5097
5129
  return n.ordinalNumber(a, { unit: "day" });
5098
5130
  case "eee":
@@ -5100,16 +5132,19 @@ const Q = {
5100
5132
  width: "abbreviated",
5101
5133
  context: "formatting"
5102
5134
  });
5135
+ // T
5103
5136
  case "eeeee":
5104
5137
  return n.day(i, {
5105
5138
  width: "narrow",
5106
5139
  context: "formatting"
5107
5140
  });
5141
+ // Tu
5108
5142
  case "eeeeee":
5109
5143
  return n.day(i, {
5110
5144
  width: "short",
5111
5145
  context: "formatting"
5112
5146
  });
5147
+ // Tuesday
5113
5148
  case "eeee":
5114
5149
  default:
5115
5150
  return n.day(i, {
@@ -5122,10 +5157,13 @@ const Q = {
5122
5157
  c: function(t, e, n, r) {
5123
5158
  const i = t.getDay(), a = (i - r.weekStartsOn + 8) % 7 || 7;
5124
5159
  switch (e) {
5160
+ // Numerical value (same as in `e`)
5125
5161
  case "c":
5126
5162
  return String(a);
5163
+ // Padded numerical value
5127
5164
  case "cc":
5128
5165
  return x(a, e.length);
5166
+ // 1st, 2nd, ..., 7th
5129
5167
  case "co":
5130
5168
  return n.ordinalNumber(a, { unit: "day" });
5131
5169
  case "ccc":
@@ -5133,16 +5171,19 @@ const Q = {
5133
5171
  width: "abbreviated",
5134
5172
  context: "standalone"
5135
5173
  });
5174
+ // T
5136
5175
  case "ccccc":
5137
5176
  return n.day(i, {
5138
5177
  width: "narrow",
5139
5178
  context: "standalone"
5140
5179
  });
5180
+ // Tu
5141
5181
  case "cccccc":
5142
5182
  return n.day(i, {
5143
5183
  width: "short",
5144
5184
  context: "standalone"
5145
5185
  });
5186
+ // Tuesday
5146
5187
  case "cccc":
5147
5188
  default:
5148
5189
  return n.day(i, {
@@ -5155,27 +5196,34 @@ const Q = {
5155
5196
  i: function(t, e, n) {
5156
5197
  const r = t.getDay(), i = r === 0 ? 7 : r;
5157
5198
  switch (e) {
5199
+ // 2
5158
5200
  case "i":
5159
5201
  return String(i);
5202
+ // 02
5160
5203
  case "ii":
5161
5204
  return x(i, e.length);
5205
+ // 2nd
5162
5206
  case "io":
5163
5207
  return n.ordinalNumber(i, { unit: "day" });
5208
+ // Tue
5164
5209
  case "iii":
5165
5210
  return n.day(r, {
5166
5211
  width: "abbreviated",
5167
5212
  context: "formatting"
5168
5213
  });
5214
+ // T
5169
5215
  case "iiiii":
5170
5216
  return n.day(r, {
5171
5217
  width: "narrow",
5172
5218
  context: "formatting"
5173
5219
  });
5220
+ // Tu
5174
5221
  case "iiiiii":
5175
5222
  return n.day(r, {
5176
5223
  width: "short",
5177
5224
  context: "formatting"
5178
5225
  });
5226
+ // Tuesday
5179
5227
  case "iiii":
5180
5228
  default:
5181
5229
  return n.day(r, {
@@ -5306,13 +5354,21 @@ const Q = {
5306
5354
  if (r === 0)
5307
5355
  return "Z";
5308
5356
  switch (e) {
5357
+ // Hours and optional minutes
5309
5358
  case "X":
5310
5359
  return Hr(r);
5360
+ // Hours, minutes and optional seconds without `:` delimiter
5361
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
5362
+ // so this token always has the same output as `XX`
5311
5363
  case "XXXX":
5312
5364
  case "XX":
5313
5365
  return tt(r);
5366
+ // Hours, minutes and optional seconds with `:` delimiter
5367
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
5368
+ // so this token always has the same output as `XXX`
5314
5369
  case "XXXXX":
5315
5370
  case "XXX":
5371
+ // Hours and minutes with `:` delimiter
5316
5372
  default:
5317
5373
  return tt(r, ":");
5318
5374
  }
@@ -5321,13 +5377,21 @@ const Q = {
5321
5377
  x: function(t, e, n) {
5322
5378
  const r = t.getTimezoneOffset();
5323
5379
  switch (e) {
5380
+ // Hours and optional minutes
5324
5381
  case "x":
5325
5382
  return Hr(r);
5383
+ // Hours, minutes and optional seconds without `:` delimiter
5384
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
5385
+ // so this token always has the same output as `xx`
5326
5386
  case "xxxx":
5327
5387
  case "xx":
5328
5388
  return tt(r);
5389
+ // Hours, minutes and optional seconds with `:` delimiter
5390
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
5391
+ // so this token always has the same output as `xxx`
5329
5392
  case "xxxxx":
5330
5393
  case "xxx":
5394
+ // Hours and minutes with `:` delimiter
5331
5395
  default:
5332
5396
  return tt(r, ":");
5333
5397
  }
@@ -5336,10 +5400,12 @@ const Q = {
5336
5400
  O: function(t, e, n) {
5337
5401
  const r = t.getTimezoneOffset();
5338
5402
  switch (e) {
5403
+ // Short
5339
5404
  case "O":
5340
5405
  case "OO":
5341
5406
  case "OOO":
5342
5407
  return "GMT" + Yr(r, ":");
5408
+ // Long
5343
5409
  case "OOOO":
5344
5410
  default:
5345
5411
  return "GMT" + tt(r, ":");
@@ -5349,10 +5415,12 @@ const Q = {
5349
5415
  z: function(t, e, n) {
5350
5416
  const r = t.getTimezoneOffset();
5351
5417
  switch (e) {
5418
+ // Short
5352
5419
  case "z":
5353
5420
  case "zz":
5354
5421
  case "zzz":
5355
5422
  return "GMT" + Yr(r, ":");
5423
+ // Long
5356
5424
  case "zzzz":
5357
5425
  default:
5358
5426
  return "GMT" + tt(r, ":");
@@ -5725,4 +5793,4 @@ export {
5725
5793
  Em as y,
5726
5794
  Cm as z
5727
5795
  };
5728
- //# sourceMappingURL=color-scale-utils-Bxw257YA.mjs.map
5796
+ //# sourceMappingURL=color-scale-utils-BW_t5gbK.mjs.map