@carbon/type 11.55.0 → 11.56.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 (4) hide show
  1. package/es/index.js +796 -799
  2. package/lib/index.js +860 -859
  3. package/package.json +5 -5
  4. package/umd/index.js +902 -900
package/es/index.js CHANGED
@@ -1,839 +1,836 @@
1
- import { px, baseFontSize, rem, breakpoint, breakpoints } from '@carbon/layout';
1
+ import { baseFontSize, breakpoint, breakpoints, px, rem } from "@carbon/layout";
2
2
 
3
- /**
4
- * Copyright IBM Corp. 2018, 2023
5
- *
6
- * This source code is licensed under the Apache-2.0 license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
3
+ //#region \0rolldown/runtime.js
4
+ var __defProp = Object.defineProperty;
5
+ var __exportAll = (all, no_symbols) => {
6
+ let target = {};
7
+ for (var name in all) {
8
+ __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ }
13
+ if (!no_symbols) {
14
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ }
16
+ return target;
17
+ };
9
18
 
10
- // Font family fallbacks for: IBM Plex Mono, IBM Plex Sans, IBM Plex Sans
11
- // Condensed, IBM Plex Sans Hebrew, and IBM Plex Serif
12
- var fontFamilies = {
13
- mono: "'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",
14
- sans: "'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif",
15
- sansCondensed: "'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif",
16
- sansHebrew: "'IBM Plex Sans Hebrew', 'Helvetica Hebrew', 'Arial Hebrew', sans-serif",
17
- serif: "'IBM Plex Serif', 'Georgia', Times, serif"
19
+ //#endregion
20
+ //#region src/fontFamily.js
21
+ /**
22
+ * Copyright IBM Corp. 2018, 2023
23
+ *
24
+ * This source code is licensed under the Apache-2.0 license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */
27
+ const fontFamilies = {
28
+ mono: "'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",
29
+ sans: "'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif",
30
+ sansCondensed: "'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif",
31
+ sansHebrew: "'IBM Plex Sans Hebrew', 'Helvetica Hebrew', 'Arial Hebrew', sans-serif",
32
+ serif: "'IBM Plex Serif', 'Georgia', Times, serif"
18
33
  };
19
34
  function fontFamily(name) {
20
- if (!fontFamilies[name]) {
21
- throw new Error("Unable to find font family: `".concat(name, "`. Expected one of: ") + "[".concat(Object.keys(fontFamilies).join(', '), "]"));
22
- }
23
- return {
24
- fontFamily: fontFamilies[name]
25
- };
35
+ if (!fontFamilies[name]) throw new Error(`Unable to find font family: \`${name}\`. Expected one of: [${Object.keys(fontFamilies).join(", ")}]`);
36
+ return { fontFamily: fontFamilies[name] };
26
37
  }
27
38
 
39
+ //#endregion
40
+ //#region src/fontWeight.js
28
41
  /**
29
- * Copyright IBM Corp. 2018, 2023
30
- *
31
- * This source code is licensed under the Apache-2.0 license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */
34
-
35
- var fontWeights = {
36
- light: 300,
37
- regular: 400,
38
- semibold: 600
42
+ * Copyright IBM Corp. 2018, 2023
43
+ *
44
+ * This source code is licensed under the Apache-2.0 license found in the
45
+ * LICENSE file in the root directory of this source tree.
46
+ */
47
+ const fontWeights = {
48
+ light: 300,
49
+ regular: 400,
50
+ semibold: 600
39
51
  };
40
52
  function fontWeight(weight) {
41
- if (!fontWeights[weight]) {
42
- throw new Error("Unable to find font weight: `".concat(weight, "`. Expected one of: ") + "[".concat(Object.keys(fontWeights).join(', '), "]"));
43
- }
44
- return {
45
- fontWeight: fontWeights[weight]
46
- };
53
+ if (!fontWeights[weight]) throw new Error(`Unable to find font weight: \`${weight}\`. Expected one of: [${Object.keys(fontWeights).join(", ")}]`);
54
+ return { fontWeight: fontWeights[weight] };
47
55
  }
48
56
 
57
+ //#endregion
58
+ //#region src/print.js
49
59
  /**
50
- * Copyright IBM Corp. 2018, 2023
51
- *
52
- * This source code is licensed under the Apache-2.0 license found in the
53
- * LICENSE file in the root directory of this source tree.
54
- */
55
-
60
+ * Copyright IBM Corp. 2018, 2023
61
+ *
62
+ * This source code is licensed under the Apache-2.0 license found in the
63
+ * LICENSE file in the root directory of this source tree.
64
+ */
56
65
  function print(block) {
57
- return Object.keys(block).reduce(function (acc, key, index) {
58
- // Short-circuit on the foreign key 'breakpoints'. This is used in our
59
- // tokens for fluid type and should not be printed. In the future, we should
60
- // tie this to media query outputs.
61
- if (key === 'breakpoints') {
62
- return acc;
63
- }
64
- var property = "".concat(paramCase(key), ": ").concat(block[key], ";");
65
- if (index === 0) {
66
- return property;
67
- }
68
- return acc + '\n' + property;
69
- }, '');
66
+ return Object.keys(block).reduce((acc, key, index) => {
67
+ if (key === "breakpoints") return acc;
68
+ const property = `${paramCase(key)}: ${block[key]};`;
69
+ if (index === 0) return property;
70
+ return acc + "\n" + property;
71
+ }, "");
70
72
  }
71
73
  function paramCase(string) {
72
- var result = '';
73
- for (var i = 0; i < string.length; i++) {
74
- var character = string[i];
75
- if (character === character.toUpperCase()) {
76
- result += '-' + character.toLowerCase();
77
- continue;
78
- }
79
- result += character;
80
- }
81
- return result;
74
+ let result = "";
75
+ for (let i = 0; i < string.length; i++) {
76
+ const character = string[i];
77
+ if (character === character.toUpperCase()) {
78
+ result += "-" + character.toLowerCase();
79
+ continue;
80
+ }
81
+ result += character;
82
+ }
83
+ return result;
82
84
  }
83
85
 
86
+ //#endregion
87
+ //#region src/reset.js
84
88
  /**
85
- * Copyright IBM Corp. 2018, 2023
86
- *
87
- * This source code is licensed under the Apache-2.0 license found in the
88
- * LICENSE file in the root directory of this source tree.
89
- */
90
-
91
- var reset = {
92
- html: {
93
- fontSize: px(baseFontSize)
94
- },
95
- body: {
96
- fontFamily: fontFamilies.sans,
97
- fontWeight: fontWeights.regular,
98
- textRendering: 'optimizeLegibility',
99
- '-webkit-font-smoothing': 'antialiased',
100
- '-moz-osx-font-smoothing': 'grayscale'
101
- },
102
- strong: {
103
- fontWeight: fontWeights.semibold
104
- },
105
- code: {
106
- fontFamily: fontFamilies.mono
107
- }
89
+ * Copyright IBM Corp. 2018, 2023
90
+ *
91
+ * This source code is licensed under the Apache-2.0 license found in the
92
+ * LICENSE file in the root directory of this source tree.
93
+ */
94
+ const reset = {
95
+ html: { fontSize: px(baseFontSize) },
96
+ body: {
97
+ fontFamily: fontFamilies.sans,
98
+ fontWeight: fontWeights.regular,
99
+ textRendering: "optimizeLegibility",
100
+ "-webkit-font-smoothing": "antialiased",
101
+ "-moz-osx-font-smoothing": "grayscale"
102
+ },
103
+ strong: { fontWeight: fontWeights.semibold },
104
+ code: { fontFamily: fontFamilies.mono }
108
105
  };
109
106
 
107
+ //#endregion
108
+ //#region src/scale.js
110
109
  /**
111
- * Copyright IBM Corp. 2018, 2023
112
- *
113
- * This source code is licensed under the Apache-2.0 license found in the
114
- * LICENSE file in the root directory of this source tree.
115
- */
116
-
110
+ * Copyright IBM Corp. 2018, 2023
111
+ *
112
+ * This source code is licensed under the Apache-2.0 license found in the
113
+ * LICENSE file in the root directory of this source tree.
114
+ */
117
115
  /**
118
- * Get the type size for the given step
119
- * @param {number} step
120
- * @returns {number}
121
- */
116
+ * Get the type size for the given step
117
+ * @param {number} step
118
+ * @returns {number}
119
+ */
122
120
  function getTypeSize(step) {
123
- if (step <= 1) {
124
- return 12;
125
- }
126
- // Yn = Yn-1 + {FLOOR[(n - 2) / 4] + 1} * 2
127
- return getTypeSize(step - 1) + Math.floor((step - 2) / 4 + 1) * 2;
121
+ if (step <= 1) return 12;
122
+ return getTypeSize(step - 1) + Math.floor((step - 2) / 4 + 1) * 2;
128
123
  }
129
-
130
124
  /**
131
- * The default type scale for 23 steps. Inlined as an array here through running
132
- * the follow step:
133
- *
134
- * > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
135
- */
136
- var scale = [12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 54, 60, 68, 76, 84, 92, 102, 112, 122, 132, 144, 156];
137
-
138
- function _defineProperty(e, r, t) {
139
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
140
- value: t,
141
- enumerable: true,
142
- configurable: true,
143
- writable: true
144
- }) : e[r] = t, e;
145
- }
146
- function ownKeys(e, r) {
147
- var t = Object.keys(e);
148
- if (Object.getOwnPropertySymbols) {
149
- var o = Object.getOwnPropertySymbols(e);
150
- r && (o = o.filter(function (r) {
151
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
152
- })), t.push.apply(t, o);
153
- }
154
- return t;
155
- }
156
- function _objectSpread2(e) {
157
- for (var r = 1; r < arguments.length; r++) {
158
- var t = null != arguments[r] ? arguments[r] : {};
159
- r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
160
- _defineProperty(e, r, t[r]);
161
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
162
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
163
- });
164
- }
165
- return e;
166
- }
167
- function _objectWithoutProperties(e, t) {
168
- if (null == e) return {};
169
- var o,
170
- r,
171
- i = _objectWithoutPropertiesLoose(e, t);
172
- if (Object.getOwnPropertySymbols) {
173
- var n = Object.getOwnPropertySymbols(e);
174
- for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
175
- }
176
- return i;
177
- }
178
- function _objectWithoutPropertiesLoose(r, e) {
179
- if (null == r) return {};
180
- var t = {};
181
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
182
- if (-1 !== e.indexOf(n)) continue;
183
- t[n] = r[n];
184
- }
185
- return t;
186
- }
187
- function _toPrimitive(t, r) {
188
- if ("object" != typeof t || !t) return t;
189
- var e = t[Symbol.toPrimitive];
190
- if (void 0 !== e) {
191
- var i = e.call(t, r);
192
- if ("object" != typeof i) return i;
193
- throw new TypeError("@@toPrimitive must return a primitive value.");
194
- }
195
- return ("string" === r ? String : Number)(t);
196
- }
197
- function _toPropertyKey(t) {
198
- var i = _toPrimitive(t, "string");
199
- return "symbol" == typeof i ? i : i + "";
200
- }
201
- function _typeof(o) {
202
- "@babel/helpers - typeof";
125
+ * The default type scale for 23 steps. Inlined as an array here through running
126
+ * the follow step:
127
+ *
128
+ * > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
129
+ */
130
+ const scale = [
131
+ 12,
132
+ 14,
133
+ 16,
134
+ 18,
135
+ 20,
136
+ 24,
137
+ 28,
138
+ 32,
139
+ 36,
140
+ 42,
141
+ 48,
142
+ 54,
143
+ 60,
144
+ 68,
145
+ 76,
146
+ 84,
147
+ 92,
148
+ 102,
149
+ 112,
150
+ 122,
151
+ 132,
152
+ 144,
153
+ 156
154
+ ];
203
155
 
204
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
205
- return typeof o;
206
- } : function (o) {
207
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
208
- }, _typeof(o);
209
- }
210
-
211
- var caption01$1 = {
212
- fontSize: rem(scale[0]),
213
- fontWeight: fontWeights.regular,
214
- lineHeight: 1.33333,
215
- letterSpacing: px(0.32)
216
- };
217
- var caption02$1 = {
218
- fontSize: rem(scale[1]),
219
- fontWeight: fontWeights.regular,
220
- lineHeight: 1.28572,
221
- letterSpacing: px(0.32)
222
- };
223
- var label01$1 = {
224
- fontSize: rem(scale[0]),
225
- fontWeight: fontWeights.regular,
226
- lineHeight: 1.33333,
227
- letterSpacing: px(0.32)
228
- };
229
- var label02$1 = {
230
- fontSize: rem(scale[1]),
231
- fontWeight: fontWeights.regular,
232
- lineHeight: 1.28572,
233
- letterSpacing: px(0.16)
234
- };
235
- var helperText01$1 = {
236
- fontSize: rem(scale[0]),
237
- lineHeight: 1.33333,
238
- letterSpacing: px(0.32)
239
- };
240
- var helperText02$1 = {
241
- fontSize: rem(scale[1]),
242
- lineHeight: 1.28572,
243
- letterSpacing: px(0.16)
244
- };
245
- var bodyShort01$1 = {
246
- fontSize: rem(scale[1]),
247
- fontWeight: fontWeights.regular,
248
- lineHeight: 1.28572,
249
- letterSpacing: px(0.16)
250
- };
251
- var bodyLong01$1 = {
252
- fontSize: rem(scale[1]),
253
- fontWeight: fontWeights.regular,
254
- lineHeight: 1.42857,
255
- letterSpacing: px(0.16)
256
- };
257
- var bodyShort02$1 = {
258
- fontSize: rem(scale[2]),
259
- fontWeight: fontWeights.regular,
260
- lineHeight: 1.375,
261
- letterSpacing: 0
262
- };
263
- var bodyLong02$1 = {
264
- fontSize: rem(scale[2]),
265
- fontWeight: fontWeights.regular,
266
- lineHeight: 1.5,
267
- letterSpacing: 0
268
- };
269
- var code01$1 = {
270
- fontFamily: fontFamilies.mono,
271
- fontSize: rem(scale[0]),
272
- fontWeight: fontWeights.regular,
273
- lineHeight: 1.33333,
274
- letterSpacing: px(0.32)
275
- };
276
- var code02$1 = {
277
- fontFamily: fontFamilies.mono,
278
- fontSize: rem(scale[1]),
279
- fontWeight: fontWeights.regular,
280
- lineHeight: 1.42857,
281
- letterSpacing: px(0.32)
282
- };
283
- var heading01$1 = {
284
- fontSize: rem(scale[1]),
285
- fontWeight: fontWeights.semibold,
286
- lineHeight: 1.42857,
287
- letterSpacing: px(0.16)
288
- };
289
- var productiveHeading01$1 = {
290
- fontSize: rem(scale[1]),
291
- fontWeight: fontWeights.semibold,
292
- lineHeight: 1.28572,
293
- letterSpacing: px(0.16)
294
- };
295
- var heading02$1 = {
296
- fontSize: rem(scale[2]),
297
- fontWeight: fontWeights.semibold,
298
- lineHeight: 1.5,
299
- letterSpacing: 0
300
- };
301
- var productiveHeading02$1 = {
302
- fontSize: rem(scale[2]),
303
- fontWeight: fontWeights.semibold,
304
- lineHeight: 1.375,
305
- letterSpacing: 0
306
- };
307
- var productiveHeading03$1 = {
308
- fontSize: rem(scale[4]),
309
- fontWeight: fontWeights.regular,
310
- lineHeight: 1.4,
311
- letterSpacing: 0
312
- };
313
- var productiveHeading04$1 = {
314
- fontSize: rem(scale[6]),
315
- fontWeight: fontWeights.regular,
316
- lineHeight: 1.28572,
317
- letterSpacing: 0
318
- };
319
- var productiveHeading05$1 = {
320
- fontSize: rem(scale[7]),
321
- fontWeight: fontWeights.regular,
322
- lineHeight: 1.25,
323
- letterSpacing: 0
324
- };
325
- var productiveHeading06$1 = {
326
- fontSize: rem(scale[9]),
327
- fontWeight: fontWeights.light,
328
- lineHeight: 1.199,
329
- letterSpacing: 0
330
- };
331
- var productiveHeading07$1 = {
332
- fontSize: rem(scale[11]),
333
- fontWeight: fontWeights.light,
334
- lineHeight: 1.199,
335
- letterSpacing: 0
336
- };
337
- var expressiveHeading01$1 = _objectSpread2(_objectSpread2({}, heading01$1), {}, {
338
- lineHeight: 1.25
339
- });
340
- var expressiveHeading02$1 = _objectSpread2(_objectSpread2({}, heading02$1), {}, {
341
- lineHeight: 1.5
342
- });
343
- var expressiveHeading03$1 = {
344
- fontSize: rem(scale[4]),
345
- fontWeight: fontWeights.regular,
346
- lineHeight: 1.4,
347
- letterSpacing: 0,
348
- breakpoints: {
349
- xlg: {
350
- fontSize: rem(scale[4]),
351
- lineHeight: 1.4
352
- },
353
- max: {
354
- fontSize: rem(scale[5]),
355
- lineHeight: 1.334
356
- }
357
- }
358
- };
359
- var expressiveHeading04$1 = {
360
- fontSize: rem(scale[6]),
361
- fontWeight: fontWeights.regular,
362
- lineHeight: 1.28572,
363
- letterSpacing: 0,
364
- breakpoints: {
365
- xlg: {
366
- fontSize: rem(scale[7]),
367
- fontWeight: fontWeights.regular,
368
- lineHeight: 1.25
369
- },
370
- max: {
371
- fontSize: rem(scale[7]),
372
- fontWeight: fontWeights.regular
373
- }
374
- }
375
- };
376
- var expressiveHeading05$1 = {
377
- fontSize: rem(scale[7]),
378
- fontWeight: fontWeights.regular,
379
- lineHeight: 1.25,
380
- letterSpacing: 0,
381
- breakpoints: {
382
- md: {
383
- fontSize: rem(scale[8]),
384
- fontWeight: fontWeights.light,
385
- lineHeight: 1.22,
386
- letterSpacing: 0
387
- },
388
- lg: {
389
- fontSize: rem(scale[9]),
390
- lineHeight: 1.19,
391
- letterSpacing: 0
392
- },
393
- xlg: {
394
- fontSize: rem(scale[10]),
395
- lineHeight: 1.17,
396
- letterSpacing: 0
397
- },
398
- max: {
399
- fontSize: rem(scale[12]),
400
- letterSpacing: 0
401
- }
402
- }
403
- };
404
- var expressiveHeading06$1 = {
405
- fontSize: rem(scale[7]),
406
- fontWeight: fontWeights.semibold,
407
- lineHeight: 1.25,
408
- letterSpacing: 0,
409
- breakpoints: {
410
- md: {
411
- fontSize: rem(scale[8]),
412
- fontWeight: fontWeights.semibold,
413
- lineHeight: 1.22,
414
- letterSpacing: 0
415
- },
416
- lg: {
417
- fontSize: rem(scale[9]),
418
- fontWeight: fontWeights.semibold,
419
- lineHeight: 1.19,
420
- letterSpacing: 0
421
- },
422
- xlg: {
423
- fontSize: rem(scale[10]),
424
- fontWeight: fontWeights.semibold,
425
- lineHeight: 1.17,
426
- letterSpacing: 0
427
- },
428
- max: {
429
- fontSize: rem(scale[12]),
430
- fontWeight: fontWeights.semibold,
431
- letterSpacing: 0
432
- }
433
- }
434
- };
435
- var expressiveParagraph01$1 = {
436
- fontSize: rem(scale[5]),
437
- fontWeight: fontWeights.light,
438
- lineHeight: 1.334,
439
- letterSpacing: 0,
440
- breakpoints: {
441
- lg: {
442
- fontSize: rem(scale[6]),
443
- lineHeight: 1.28572
444
- },
445
- max: {
446
- fontSize: rem(scale[7]),
447
- lineHeight: 1.25
448
- }
449
- }
450
- };
451
- var quotation01$1 = {
452
- fontFamily: fontFamilies.serif,
453
- fontSize: rem(scale[4]),
454
- fontWeight: fontWeights.regular,
455
- lineHeight: 1.3,
456
- letterSpacing: 0,
457
- breakpoints: {
458
- md: {
459
- fontSize: rem(scale[4]),
460
- fontWeight: fontWeights.regular,
461
- letterSpacing: 0
462
- },
463
- lg: {
464
- fontSize: rem(scale[5]),
465
- fontWeight: fontWeights.regular,
466
- lineHeight: 1.334,
467
- letterSpacing: 0
468
- },
469
- xlg: {
470
- fontSize: rem(scale[6]),
471
- fontWeight: fontWeights.regular,
472
- lineHeight: 1.28572,
473
- letterSpacing: 0
474
- },
475
- max: {
476
- fontSize: rem(scale[7]),
477
- fontWeight: fontWeights.regular,
478
- lineHeight: 1.25,
479
- letterSpacing: 0
480
- }
481
- }
482
- };
483
- var quotation02$1 = {
484
- fontFamily: fontFamilies.serif,
485
- fontSize: rem(scale[7]),
486
- fontWeight: fontWeights.light,
487
- lineHeight: 1.25,
488
- letterSpacing: 0,
489
- breakpoints: {
490
- md: {
491
- fontSize: rem(scale[8]),
492
- lineHeight: 1.22
493
- },
494
- lg: {
495
- fontSize: rem(scale[9]),
496
- lineHeight: 1.19
497
- },
498
- xlg: {
499
- fontSize: rem(scale[10]),
500
- lineHeight: 1.17
501
- },
502
- max: {
503
- fontSize: rem(scale[12])
504
- }
505
- }
506
- };
507
- var display01$1 = {
508
- fontSize: rem(scale[9]),
509
- fontWeight: fontWeights.light,
510
- lineHeight: 1.19,
511
- letterSpacing: 0,
512
- breakpoints: {
513
- md: {
514
- fontSize: rem(scale[9])
515
- },
516
- lg: {
517
- fontSize: rem(scale[11])
518
- },
519
- xlg: {
520
- fontSize: rem(scale[12]),
521
- lineHeight: 1.17
522
- },
523
- max: {
524
- fontSize: rem(scale[14]),
525
- lineHeight: 1.13
526
- }
527
- }
528
- };
529
- var display02$1 = {
530
- fontSize: rem(scale[9]),
531
- fontWeight: fontWeights.semibold,
532
- lineHeight: 1.19,
533
- letterSpacing: 0,
534
- breakpoints: {
535
- md: {
536
- fontSize: rem(scale[9])
537
- },
538
- lg: {
539
- fontSize: rem(scale[11])
540
- },
541
- xlg: {
542
- fontSize: rem(scale[12]),
543
- lineHeight: 1.16
544
- },
545
- max: {
546
- fontSize: rem(scale[14]),
547
- lineHeight: 1.13
548
- }
549
- }
550
- };
551
- var display03$1 = {
552
- fontSize: rem(scale[9]),
553
- fontWeight: fontWeights.light,
554
- lineHeight: 1.19,
555
- letterSpacing: 0,
556
- breakpoints: {
557
- md: {
558
- fontSize: rem(scale[11]),
559
- lineHeight: 1.18
560
- },
561
- lg: {
562
- fontSize: rem(scale[12]),
563
- lineHeight: 1.16,
564
- letterSpacing: px(-0.64)
565
- },
566
- xlg: {
567
- fontSize: rem(scale[14]),
568
- lineHeight: 1.13
569
- },
570
- max: {
571
- fontSize: rem(scale[15]),
572
- lineHeight: 1.11,
573
- letterSpacing: px(-0.96)
574
- }
575
- }
576
- };
577
- var display04$1 = {
578
- fontSize: rem(scale[9]),
579
- fontWeight: fontWeights.light,
580
- lineHeight: 1.19,
581
- letterSpacing: 0,
582
- breakpoints: {
583
- md: {
584
- fontSize: rem(scale[13]),
585
- lineHeight: 1.15
586
- },
587
- lg: {
588
- fontSize: rem(scale[16]),
589
- lineHeight: 1.11,
590
- letterSpacing: px(-0.64)
591
- },
592
- xlg: {
593
- fontSize: rem(scale[19]),
594
- lineHeight: 1.07,
595
- letterSpacing: px(-0.64)
596
- },
597
- max: {
598
- fontSize: rem(scale[22]),
599
- lineHeight: 1.05,
600
- letterSpacing: px(-0.96)
601
- }
602
- }
603
- };
604
-
605
- // Type changes - V11
606
-
607
- // Small styles
608
- // No changes for code-01, code-02, label-01, label-02
609
- var legal01$1 = {
610
- fontSize: rem(scale[0]),
611
- fontWeight: fontWeights.regular,
612
- lineHeight: 1.33333,
613
- letterSpacing: px(0.32)
614
- };
615
- var legal02$1 = {
616
- fontSize: rem(scale[1]),
617
- fontWeight: fontWeights.regular,
618
- lineHeight: 1.28572,
619
- letterSpacing: px(0.16)
620
- };
621
-
622
- // Body styles
623
- var bodyCompact01$1 = bodyShort01$1;
624
- var bodyCompact02$1 = bodyShort02$1;
625
- var body01$1 = bodyLong01$1;
626
- var body02$1 = bodyLong02$1;
627
-
628
- // Fixed heading styles
629
- var headingCompact01$1 = productiveHeading01$1;
630
- var headingCompact02$1 = productiveHeading02$1;
631
- var heading03$1 = productiveHeading03$1;
632
- var heading04$1 = productiveHeading04$1;
633
- var heading05$1 = productiveHeading05$1;
634
- var heading06$1 = productiveHeading06$1;
635
- var heading07$1 = productiveHeading07$1;
636
-
637
- // Fluid heading styles
638
- var fluidHeading03$1 = expressiveHeading03$1;
639
- var fluidHeading04$1 = expressiveHeading04$1;
640
- var fluidHeading05$1 = expressiveHeading05$1;
641
- var fluidHeading06$1 = expressiveHeading06$1;
642
-
643
- // Additional fluid styles
644
- var fluidParagraph01$1 = expressiveParagraph01$1;
645
- var fluidQuotation01$1 = quotation01$1;
646
- var fluidQuotation02$1 = quotation02$1;
647
- var fluidDisplay01$1 = display01$1;
648
- var fluidDisplay02$1 = display02$1;
649
- var fluidDisplay03$1 = display03$1;
650
- var fluidDisplay04$1 = display04$1;
651
-
652
- var styles = /*#__PURE__*/Object.freeze({
653
- __proto__: null,
654
- body01: body01$1,
655
- body02: body02$1,
656
- bodyCompact01: bodyCompact01$1,
657
- bodyCompact02: bodyCompact02$1,
658
- bodyLong01: bodyLong01$1,
659
- bodyLong02: bodyLong02$1,
660
- bodyShort01: bodyShort01$1,
661
- bodyShort02: bodyShort02$1,
662
- caption01: caption01$1,
663
- caption02: caption02$1,
664
- code01: code01$1,
665
- code02: code02$1,
666
- display01: display01$1,
667
- display02: display02$1,
668
- display03: display03$1,
669
- display04: display04$1,
670
- expressiveHeading01: expressiveHeading01$1,
671
- expressiveHeading02: expressiveHeading02$1,
672
- expressiveHeading03: expressiveHeading03$1,
673
- expressiveHeading04: expressiveHeading04$1,
674
- expressiveHeading05: expressiveHeading05$1,
675
- expressiveHeading06: expressiveHeading06$1,
676
- expressiveParagraph01: expressiveParagraph01$1,
677
- fluidDisplay01: fluidDisplay01$1,
678
- fluidDisplay02: fluidDisplay02$1,
679
- fluidDisplay03: fluidDisplay03$1,
680
- fluidDisplay04: fluidDisplay04$1,
681
- fluidHeading03: fluidHeading03$1,
682
- fluidHeading04: fluidHeading04$1,
683
- fluidHeading05: fluidHeading05$1,
684
- fluidHeading06: fluidHeading06$1,
685
- fluidParagraph01: fluidParagraph01$1,
686
- fluidQuotation01: fluidQuotation01$1,
687
- fluidQuotation02: fluidQuotation02$1,
688
- heading01: heading01$1,
689
- heading02: heading02$1,
690
- heading03: heading03$1,
691
- heading04: heading04$1,
692
- heading05: heading05$1,
693
- heading06: heading06$1,
694
- heading07: heading07$1,
695
- headingCompact01: headingCompact01$1,
696
- headingCompact02: headingCompact02$1,
697
- helperText01: helperText01$1,
698
- helperText02: helperText02$1,
699
- label01: label01$1,
700
- label02: label02$1,
701
- legal01: legal01$1,
702
- legal02: legal02$1,
703
- productiveHeading01: productiveHeading01$1,
704
- productiveHeading02: productiveHeading02$1,
705
- productiveHeading03: productiveHeading03$1,
706
- productiveHeading04: productiveHeading04$1,
707
- productiveHeading05: productiveHeading05$1,
708
- productiveHeading06: productiveHeading06$1,
709
- productiveHeading07: productiveHeading07$1,
710
- quotation01: quotation01$1,
711
- quotation02: quotation02$1
156
+ //#endregion
157
+ //#region src/styles.js
158
+ /**
159
+ * Copyright IBM Corp. 2018, 2023
160
+ *
161
+ * This source code is licensed under the Apache-2.0 license found in the
162
+ * LICENSE file in the root directory of this source tree.
163
+ */
164
+ var styles_exports = /* @__PURE__ */ __exportAll({
165
+ body01: () => body01,
166
+ body02: () => body02,
167
+ bodyCompact01: () => bodyCompact01,
168
+ bodyCompact02: () => bodyCompact02,
169
+ bodyLong01: () => bodyLong01,
170
+ bodyLong02: () => bodyLong02,
171
+ bodyShort01: () => bodyShort01,
172
+ bodyShort02: () => bodyShort02,
173
+ caption01: () => caption01,
174
+ caption02: () => caption02,
175
+ code01: () => code01,
176
+ code02: () => code02,
177
+ display01: () => display01,
178
+ display02: () => display02,
179
+ display03: () => display03,
180
+ display04: () => display04,
181
+ expressiveHeading01: () => expressiveHeading01,
182
+ expressiveHeading02: () => expressiveHeading02,
183
+ expressiveHeading03: () => expressiveHeading03,
184
+ expressiveHeading04: () => expressiveHeading04,
185
+ expressiveHeading05: () => expressiveHeading05,
186
+ expressiveHeading06: () => expressiveHeading06,
187
+ expressiveParagraph01: () => expressiveParagraph01,
188
+ fluidDisplay01: () => fluidDisplay01,
189
+ fluidDisplay02: () => fluidDisplay02,
190
+ fluidDisplay03: () => fluidDisplay03,
191
+ fluidDisplay04: () => fluidDisplay04,
192
+ fluidHeading03: () => fluidHeading03,
193
+ fluidHeading04: () => fluidHeading04,
194
+ fluidHeading05: () => fluidHeading05,
195
+ fluidHeading06: () => fluidHeading06,
196
+ fluidParagraph01: () => fluidParagraph01,
197
+ fluidQuotation01: () => fluidQuotation01,
198
+ fluidQuotation02: () => fluidQuotation02,
199
+ heading01: () => heading01,
200
+ heading02: () => heading02,
201
+ heading03: () => heading03,
202
+ heading04: () => heading04,
203
+ heading05: () => heading05,
204
+ heading06: () => heading06,
205
+ heading07: () => heading07,
206
+ headingCompact01: () => headingCompact01,
207
+ headingCompact02: () => headingCompact02,
208
+ helperText01: () => helperText01,
209
+ helperText02: () => helperText02,
210
+ label01: () => label01,
211
+ label02: () => label02,
212
+ legal01: () => legal01,
213
+ legal02: () => legal02,
214
+ productiveHeading01: () => productiveHeading01,
215
+ productiveHeading02: () => productiveHeading02,
216
+ productiveHeading03: () => productiveHeading03,
217
+ productiveHeading04: () => productiveHeading04,
218
+ productiveHeading05: () => productiveHeading05,
219
+ productiveHeading06: () => productiveHeading06,
220
+ productiveHeading07: () => productiveHeading07,
221
+ quotation01: () => quotation01,
222
+ quotation02: () => quotation02
712
223
  });
224
+ const caption01 = {
225
+ fontSize: rem(scale[0]),
226
+ fontWeight: fontWeights.regular,
227
+ lineHeight: 1.33333,
228
+ letterSpacing: px(.32)
229
+ };
230
+ const caption02 = {
231
+ fontSize: rem(scale[1]),
232
+ fontWeight: fontWeights.regular,
233
+ lineHeight: 1.28572,
234
+ letterSpacing: px(.32)
235
+ };
236
+ const label01 = {
237
+ fontSize: rem(scale[0]),
238
+ fontWeight: fontWeights.regular,
239
+ lineHeight: 1.33333,
240
+ letterSpacing: px(.32)
241
+ };
242
+ const label02 = {
243
+ fontSize: rem(scale[1]),
244
+ fontWeight: fontWeights.regular,
245
+ lineHeight: 1.28572,
246
+ letterSpacing: px(.16)
247
+ };
248
+ const helperText01 = {
249
+ fontSize: rem(scale[0]),
250
+ lineHeight: 1.33333,
251
+ letterSpacing: px(.32)
252
+ };
253
+ const helperText02 = {
254
+ fontSize: rem(scale[1]),
255
+ lineHeight: 1.28572,
256
+ letterSpacing: px(.16)
257
+ };
258
+ const bodyShort01 = {
259
+ fontSize: rem(scale[1]),
260
+ fontWeight: fontWeights.regular,
261
+ lineHeight: 1.28572,
262
+ letterSpacing: px(.16)
263
+ };
264
+ const bodyLong01 = {
265
+ fontSize: rem(scale[1]),
266
+ fontWeight: fontWeights.regular,
267
+ lineHeight: 1.42857,
268
+ letterSpacing: px(.16)
269
+ };
270
+ const bodyShort02 = {
271
+ fontSize: rem(scale[2]),
272
+ fontWeight: fontWeights.regular,
273
+ lineHeight: 1.375,
274
+ letterSpacing: 0
275
+ };
276
+ const bodyLong02 = {
277
+ fontSize: rem(scale[2]),
278
+ fontWeight: fontWeights.regular,
279
+ lineHeight: 1.5,
280
+ letterSpacing: 0
281
+ };
282
+ const code01 = {
283
+ fontFamily: fontFamilies.mono,
284
+ fontSize: rem(scale[0]),
285
+ fontWeight: fontWeights.regular,
286
+ lineHeight: 1.33333,
287
+ letterSpacing: px(.32)
288
+ };
289
+ const code02 = {
290
+ fontFamily: fontFamilies.mono,
291
+ fontSize: rem(scale[1]),
292
+ fontWeight: fontWeights.regular,
293
+ lineHeight: 1.42857,
294
+ letterSpacing: px(.32)
295
+ };
296
+ const heading01 = {
297
+ fontSize: rem(scale[1]),
298
+ fontWeight: fontWeights.semibold,
299
+ lineHeight: 1.42857,
300
+ letterSpacing: px(.16)
301
+ };
302
+ const productiveHeading01 = {
303
+ fontSize: rem(scale[1]),
304
+ fontWeight: fontWeights.semibold,
305
+ lineHeight: 1.28572,
306
+ letterSpacing: px(.16)
307
+ };
308
+ const heading02 = {
309
+ fontSize: rem(scale[2]),
310
+ fontWeight: fontWeights.semibold,
311
+ lineHeight: 1.5,
312
+ letterSpacing: 0
313
+ };
314
+ const productiveHeading02 = {
315
+ fontSize: rem(scale[2]),
316
+ fontWeight: fontWeights.semibold,
317
+ lineHeight: 1.375,
318
+ letterSpacing: 0
319
+ };
320
+ const productiveHeading03 = {
321
+ fontSize: rem(scale[4]),
322
+ fontWeight: fontWeights.regular,
323
+ lineHeight: 1.4,
324
+ letterSpacing: 0
325
+ };
326
+ const productiveHeading04 = {
327
+ fontSize: rem(scale[6]),
328
+ fontWeight: fontWeights.regular,
329
+ lineHeight: 1.28572,
330
+ letterSpacing: 0
331
+ };
332
+ const productiveHeading05 = {
333
+ fontSize: rem(scale[7]),
334
+ fontWeight: fontWeights.regular,
335
+ lineHeight: 1.25,
336
+ letterSpacing: 0
337
+ };
338
+ const productiveHeading06 = {
339
+ fontSize: rem(scale[9]),
340
+ fontWeight: fontWeights.light,
341
+ lineHeight: 1.199,
342
+ letterSpacing: 0
343
+ };
344
+ const productiveHeading07 = {
345
+ fontSize: rem(scale[11]),
346
+ fontWeight: fontWeights.light,
347
+ lineHeight: 1.199,
348
+ letterSpacing: 0
349
+ };
350
+ const expressiveHeading01 = {
351
+ ...heading01,
352
+ lineHeight: 1.25
353
+ };
354
+ const expressiveHeading02 = {
355
+ ...heading02,
356
+ lineHeight: 1.5
357
+ };
358
+ const expressiveHeading03 = {
359
+ fontSize: rem(scale[4]),
360
+ fontWeight: fontWeights.regular,
361
+ lineHeight: 1.4,
362
+ letterSpacing: 0,
363
+ breakpoints: {
364
+ xlg: {
365
+ fontSize: rem(scale[4]),
366
+ lineHeight: 1.4
367
+ },
368
+ max: {
369
+ fontSize: rem(scale[5]),
370
+ lineHeight: 1.334
371
+ }
372
+ }
373
+ };
374
+ const expressiveHeading04 = {
375
+ fontSize: rem(scale[6]),
376
+ fontWeight: fontWeights.regular,
377
+ lineHeight: 1.28572,
378
+ letterSpacing: 0,
379
+ breakpoints: {
380
+ xlg: {
381
+ fontSize: rem(scale[7]),
382
+ fontWeight: fontWeights.regular,
383
+ lineHeight: 1.25
384
+ },
385
+ max: {
386
+ fontSize: rem(scale[7]),
387
+ fontWeight: fontWeights.regular
388
+ }
389
+ }
390
+ };
391
+ const expressiveHeading05 = {
392
+ fontSize: rem(scale[7]),
393
+ fontWeight: fontWeights.regular,
394
+ lineHeight: 1.25,
395
+ letterSpacing: 0,
396
+ breakpoints: {
397
+ md: {
398
+ fontSize: rem(scale[8]),
399
+ fontWeight: fontWeights.light,
400
+ lineHeight: 1.22,
401
+ letterSpacing: 0
402
+ },
403
+ lg: {
404
+ fontSize: rem(scale[9]),
405
+ lineHeight: 1.19,
406
+ letterSpacing: 0
407
+ },
408
+ xlg: {
409
+ fontSize: rem(scale[10]),
410
+ lineHeight: 1.17,
411
+ letterSpacing: 0
412
+ },
413
+ max: {
414
+ fontSize: rem(scale[12]),
415
+ letterSpacing: 0
416
+ }
417
+ }
418
+ };
419
+ const expressiveHeading06 = {
420
+ fontSize: rem(scale[7]),
421
+ fontWeight: fontWeights.semibold,
422
+ lineHeight: 1.25,
423
+ letterSpacing: 0,
424
+ breakpoints: {
425
+ md: {
426
+ fontSize: rem(scale[8]),
427
+ fontWeight: fontWeights.semibold,
428
+ lineHeight: 1.22,
429
+ letterSpacing: 0
430
+ },
431
+ lg: {
432
+ fontSize: rem(scale[9]),
433
+ fontWeight: fontWeights.semibold,
434
+ lineHeight: 1.19,
435
+ letterSpacing: 0
436
+ },
437
+ xlg: {
438
+ fontSize: rem(scale[10]),
439
+ fontWeight: fontWeights.semibold,
440
+ lineHeight: 1.17,
441
+ letterSpacing: 0
442
+ },
443
+ max: {
444
+ fontSize: rem(scale[12]),
445
+ fontWeight: fontWeights.semibold,
446
+ letterSpacing: 0
447
+ }
448
+ }
449
+ };
450
+ const expressiveParagraph01 = {
451
+ fontSize: rem(scale[5]),
452
+ fontWeight: fontWeights.light,
453
+ lineHeight: 1.334,
454
+ letterSpacing: 0,
455
+ breakpoints: {
456
+ lg: {
457
+ fontSize: rem(scale[6]),
458
+ lineHeight: 1.28572
459
+ },
460
+ max: {
461
+ fontSize: rem(scale[7]),
462
+ lineHeight: 1.25
463
+ }
464
+ }
465
+ };
466
+ const quotation01 = {
467
+ fontFamily: fontFamilies.serif,
468
+ fontSize: rem(scale[4]),
469
+ fontWeight: fontWeights.regular,
470
+ lineHeight: 1.3,
471
+ letterSpacing: 0,
472
+ breakpoints: {
473
+ md: {
474
+ fontSize: rem(scale[4]),
475
+ fontWeight: fontWeights.regular,
476
+ letterSpacing: 0
477
+ },
478
+ lg: {
479
+ fontSize: rem(scale[5]),
480
+ fontWeight: fontWeights.regular,
481
+ lineHeight: 1.334,
482
+ letterSpacing: 0
483
+ },
484
+ xlg: {
485
+ fontSize: rem(scale[6]),
486
+ fontWeight: fontWeights.regular,
487
+ lineHeight: 1.28572,
488
+ letterSpacing: 0
489
+ },
490
+ max: {
491
+ fontSize: rem(scale[7]),
492
+ fontWeight: fontWeights.regular,
493
+ lineHeight: 1.25,
494
+ letterSpacing: 0
495
+ }
496
+ }
497
+ };
498
+ const quotation02 = {
499
+ fontFamily: fontFamilies.serif,
500
+ fontSize: rem(scale[7]),
501
+ fontWeight: fontWeights.light,
502
+ lineHeight: 1.25,
503
+ letterSpacing: 0,
504
+ breakpoints: {
505
+ md: {
506
+ fontSize: rem(scale[8]),
507
+ lineHeight: 1.22
508
+ },
509
+ lg: {
510
+ fontSize: rem(scale[9]),
511
+ lineHeight: 1.19
512
+ },
513
+ xlg: {
514
+ fontSize: rem(scale[10]),
515
+ lineHeight: 1.17
516
+ },
517
+ max: { fontSize: rem(scale[12]) }
518
+ }
519
+ };
520
+ const display01 = {
521
+ fontSize: rem(scale[9]),
522
+ fontWeight: fontWeights.light,
523
+ lineHeight: 1.19,
524
+ letterSpacing: 0,
525
+ breakpoints: {
526
+ md: { fontSize: rem(scale[9]) },
527
+ lg: { fontSize: rem(scale[11]) },
528
+ xlg: {
529
+ fontSize: rem(scale[12]),
530
+ lineHeight: 1.17
531
+ },
532
+ max: {
533
+ fontSize: rem(scale[14]),
534
+ lineHeight: 1.13
535
+ }
536
+ }
537
+ };
538
+ const display02 = {
539
+ fontSize: rem(scale[9]),
540
+ fontWeight: fontWeights.semibold,
541
+ lineHeight: 1.19,
542
+ letterSpacing: 0,
543
+ breakpoints: {
544
+ md: { fontSize: rem(scale[9]) },
545
+ lg: { fontSize: rem(scale[11]) },
546
+ xlg: {
547
+ fontSize: rem(scale[12]),
548
+ lineHeight: 1.16
549
+ },
550
+ max: {
551
+ fontSize: rem(scale[14]),
552
+ lineHeight: 1.13
553
+ }
554
+ }
555
+ };
556
+ const display03 = {
557
+ fontSize: rem(scale[9]),
558
+ fontWeight: fontWeights.light,
559
+ lineHeight: 1.19,
560
+ letterSpacing: 0,
561
+ breakpoints: {
562
+ md: {
563
+ fontSize: rem(scale[11]),
564
+ lineHeight: 1.18
565
+ },
566
+ lg: {
567
+ fontSize: rem(scale[12]),
568
+ lineHeight: 1.16,
569
+ letterSpacing: px(-.64)
570
+ },
571
+ xlg: {
572
+ fontSize: rem(scale[14]),
573
+ lineHeight: 1.13
574
+ },
575
+ max: {
576
+ fontSize: rem(scale[15]),
577
+ lineHeight: 1.11,
578
+ letterSpacing: px(-.96)
579
+ }
580
+ }
581
+ };
582
+ const display04 = {
583
+ fontSize: rem(scale[9]),
584
+ fontWeight: fontWeights.light,
585
+ lineHeight: 1.19,
586
+ letterSpacing: 0,
587
+ breakpoints: {
588
+ md: {
589
+ fontSize: rem(scale[13]),
590
+ lineHeight: 1.15
591
+ },
592
+ lg: {
593
+ fontSize: rem(scale[16]),
594
+ lineHeight: 1.11,
595
+ letterSpacing: px(-.64)
596
+ },
597
+ xlg: {
598
+ fontSize: rem(scale[19]),
599
+ lineHeight: 1.07,
600
+ letterSpacing: px(-.64)
601
+ },
602
+ max: {
603
+ fontSize: rem(scale[22]),
604
+ lineHeight: 1.05,
605
+ letterSpacing: px(-.96)
606
+ }
607
+ }
608
+ };
609
+ const legal01 = {
610
+ fontSize: rem(scale[0]),
611
+ fontWeight: fontWeights.regular,
612
+ lineHeight: 1.33333,
613
+ letterSpacing: px(.32)
614
+ };
615
+ const legal02 = {
616
+ fontSize: rem(scale[1]),
617
+ fontWeight: fontWeights.regular,
618
+ lineHeight: 1.28572,
619
+ letterSpacing: px(.16)
620
+ };
621
+ const bodyCompact01 = bodyShort01;
622
+ const bodyCompact02 = bodyShort02;
623
+ const body01 = bodyLong01;
624
+ const body02 = bodyLong02;
625
+ const headingCompact01 = productiveHeading01;
626
+ const headingCompact02 = productiveHeading02;
627
+ const heading03 = productiveHeading03;
628
+ const heading04 = productiveHeading04;
629
+ const heading05 = productiveHeading05;
630
+ const heading06 = productiveHeading06;
631
+ const heading07 = productiveHeading07;
632
+ const fluidHeading03 = expressiveHeading03;
633
+ const fluidHeading04 = expressiveHeading04;
634
+ const fluidHeading05 = expressiveHeading05;
635
+ const fluidHeading06 = expressiveHeading06;
636
+ const fluidParagraph01 = expressiveParagraph01;
637
+ const fluidQuotation01 = quotation01;
638
+ const fluidQuotation02 = quotation02;
639
+ const fluidDisplay01 = display01;
640
+ const fluidDisplay02 = display02;
641
+ const fluidDisplay03 = display03;
642
+ const fluidDisplay04 = display04;
713
643
 
714
- var _excluded = ["breakpoints"];
715
- var breakpointNames = Object.keys(breakpoints);
644
+ //#endregion
645
+ //#region src/fluid.js
646
+ /**
647
+ * Copyright IBM Corp. 2018, 2023
648
+ *
649
+ * This source code is licensed under the Apache-2.0 license found in the
650
+ * LICENSE file in the root directory of this source tree.
651
+ */
652
+ const breakpointNames = Object.keys(breakpoints);
716
653
  function next(name) {
717
- return breakpointNames[breakpointNames.indexOf(name) + 1];
654
+ return breakpointNames[breakpointNames.indexOf(name) + 1];
718
655
  }
719
656
  function fluid(selector) {
720
- var fluidBreakpoints = selector.breakpoints,
721
- styles = _objectWithoutProperties(selector, _excluded);
722
- if (_typeof(fluidBreakpoints) !== 'object') {
723
- return styles;
724
- }
725
- var fluidBreakpointNames = Object.keys(fluidBreakpoints);
726
- if (fluidBreakpointNames.length === 0) {
727
- return styles;
728
- }
729
- styles.fontSize = fluidTypeSize(styles, 'sm', fluidBreakpoints);
730
- fluidBreakpointNames.forEach(function (name) {
731
- styles[breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
732
- fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
733
- });
734
- });
735
- return styles;
657
+ const { breakpoints: fluidBreakpoints, ...styles } = selector;
658
+ if (typeof fluidBreakpoints !== "object") return styles;
659
+ const fluidBreakpointNames = Object.keys(fluidBreakpoints);
660
+ if (fluidBreakpointNames.length === 0) return styles;
661
+ styles.fontSize = fluidTypeSize(styles, "sm", fluidBreakpoints);
662
+ fluidBreakpointNames.forEach((name) => {
663
+ styles[breakpoint(name)] = {
664
+ ...fluidBreakpoints[name],
665
+ fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
666
+ };
667
+ });
668
+ return styles;
736
669
  }
737
670
  function fluidTypeSize(defaultStyles, fluidBreakpointName, fluidBreakpoints) {
738
- var breakpoint = breakpoints[fluidBreakpointName];
739
- var fluidBreakpoint = fluidBreakpointName === 'sm' ? defaultStyles : fluidBreakpoints[fluidBreakpointName];
740
- var maxFontSize = defaultStyles.fontSize;
741
- var minFontSize = defaultStyles.fontSize;
742
- if (fluidBreakpoint.fontSize) {
743
- minFontSize = fluidBreakpoint.fontSize;
744
- }
745
- var maxViewportWidth = breakpoint.width;
746
- var minViewportWidth = breakpoint.width;
747
- var nextBreakpointAvailable = next(fluidBreakpointName);
748
- var nextFluidBreakpointName = null;
749
- while (nextBreakpointAvailable) {
750
- if (fluidBreakpoints[nextBreakpointAvailable]) {
751
- nextFluidBreakpointName = nextBreakpointAvailable;
752
- break;
753
- }
754
- nextBreakpointAvailable = next(nextBreakpointAvailable);
755
- }
756
- if (nextFluidBreakpointName) {
757
- var nextFluidBreakpoint = breakpoints[nextFluidBreakpointName];
758
- maxFontSize = fluidBreakpoints[nextFluidBreakpointName].fontSize;
759
- maxViewportWidth = nextFluidBreakpoint.width;
760
- return "calc(".concat(minFontSize, " + ").concat(subtract(maxFontSize, minFontSize), " * ((100vw - ").concat(minViewportWidth, ") / ").concat(subtract(maxViewportWidth, minViewportWidth), "))");
761
- }
762
- return minFontSize;
671
+ const breakpoint = breakpoints[fluidBreakpointName];
672
+ const fluidBreakpoint = fluidBreakpointName === "sm" ? defaultStyles : fluidBreakpoints[fluidBreakpointName];
673
+ let maxFontSize = defaultStyles.fontSize;
674
+ let minFontSize = defaultStyles.fontSize;
675
+ if (fluidBreakpoint.fontSize) minFontSize = fluidBreakpoint.fontSize;
676
+ let maxViewportWidth = breakpoint.width;
677
+ let minViewportWidth = breakpoint.width;
678
+ let nextBreakpointAvailable = next(fluidBreakpointName);
679
+ let nextFluidBreakpointName = null;
680
+ while (nextBreakpointAvailable) {
681
+ if (fluidBreakpoints[nextBreakpointAvailable]) {
682
+ nextFluidBreakpointName = nextBreakpointAvailable;
683
+ break;
684
+ }
685
+ nextBreakpointAvailable = next(nextBreakpointAvailable);
686
+ }
687
+ if (nextFluidBreakpointName) {
688
+ const nextFluidBreakpoint = breakpoints[nextFluidBreakpointName];
689
+ maxFontSize = fluidBreakpoints[nextFluidBreakpointName].fontSize;
690
+ maxViewportWidth = nextFluidBreakpoint.width;
691
+ return `calc(${minFontSize} + ${subtract(maxFontSize, minFontSize)} * ((100vw - ${minViewportWidth}) / ${subtract(maxViewportWidth, minViewportWidth)}))`;
692
+ }
693
+ return minFontSize;
763
694
  }
764
695
  function subtract(a, b) {
765
- return parseFloat(a) - parseFloat(b);
696
+ return parseFloat(a) - parseFloat(b);
766
697
  }
767
698
 
699
+ //#endregion
700
+ //#region src/tokens.js
768
701
  /**
769
- * Copyright IBM Corp. 2018, 2023
770
- *
771
- * This source code is licensed under the Apache-2.0 license found in the
772
- * LICENSE file in the root directory of this source tree.
773
- */
702
+ * Copyright IBM Corp. 2018, 2023
703
+ *
704
+ * This source code is licensed under the Apache-2.0 license found in the
705
+ * LICENSE file in the root directory of this source tree.
706
+ */
707
+ const caption01$1 = "caption01";
708
+ const caption02$1 = "caption02";
709
+ const label01$1 = "label01";
710
+ const label02$1 = "label02";
711
+ const helperText01$1 = "helperText01";
712
+ const helperText02$1 = "helperText02";
713
+ const bodyShort01$1 = "bodyShort01";
714
+ const bodyLong01$1 = "bodyLong01";
715
+ const bodyShort02$1 = "bodyShort02";
716
+ const bodyLong02$1 = "bodyLong02";
717
+ const code01$1 = "code01";
718
+ const code02$1 = "code02";
719
+ const heading01$1 = "heading01";
720
+ const productiveHeading01$1 = "productiveHeading01";
721
+ const heading02$1 = "heading02";
722
+ const productiveHeading02$1 = "productiveHeading02";
723
+ const productiveHeading03$1 = "productiveHeading03";
724
+ const productiveHeading04$1 = "productiveHeading04";
725
+ const productiveHeading05$1 = "productiveHeading05";
726
+ const productiveHeading06$1 = "productiveHeading06";
727
+ const productiveHeading07$1 = "productiveHeading07";
728
+ const expressiveHeading01$1 = "expressiveHeading01";
729
+ const expressiveHeading02$1 = "expressiveHeading02";
730
+ const expressiveHeading03$1 = "expressiveHeading03";
731
+ const expressiveHeading04$1 = "expressiveHeading04";
732
+ const expressiveHeading05$1 = "expressiveHeading05";
733
+ const expressiveHeading06$1 = "expressiveHeading06";
734
+ const expressiveParagraph01$1 = "expressiveParagraph01";
735
+ const quotation01$1 = "quotation01";
736
+ const quotation02$1 = "quotation02";
737
+ const display01$1 = "display01";
738
+ const display02$1 = "display02";
739
+ const display03$1 = "display03";
740
+ const display04$1 = "display04";
741
+ const legal01$1 = "legal01";
742
+ const legal02$1 = "legal02";
743
+ const bodyCompact01$1 = "bodyCompact01";
744
+ const bodyCompact02$1 = "bodyCompact02";
745
+ const body01$1 = "body01";
746
+ const body02$1 = "body02";
747
+ const headingCompact01$1 = "headingCompact01";
748
+ const headingCompact02$1 = "headingCompact02";
749
+ const heading03$1 = "heading03";
750
+ const heading04$1 = "heading04";
751
+ const heading05$1 = "heading05";
752
+ const heading06$1 = "heading06";
753
+ const heading07$1 = "heading07";
754
+ const fluidHeading03$1 = "fluidHeading03";
755
+ const fluidHeading04$1 = "fluidHeading04";
756
+ const fluidHeading05$1 = "fluidHeading05";
757
+ const fluidHeading06$1 = "fluidHeading06";
758
+ const fluidParagraph01$1 = "fluidParagraph01";
759
+ const fluidQuotation01$1 = "fluidQuotation01";
760
+ const fluidQuotation02$1 = "fluidQuotation02";
761
+ const fluidDisplay01$1 = "fluidDisplay01";
762
+ const fluidDisplay02$1 = "fluidDisplay02";
763
+ const fluidDisplay03$1 = "fluidDisplay03";
764
+ const fluidDisplay04$1 = "fluidDisplay04";
765
+ const unstable_tokens = [
766
+ caption01$1,
767
+ caption02$1,
768
+ label01$1,
769
+ label02$1,
770
+ helperText01$1,
771
+ helperText02$1,
772
+ bodyShort01$1,
773
+ bodyLong01$1,
774
+ bodyShort02$1,
775
+ bodyLong02$1,
776
+ code01$1,
777
+ code02$1,
778
+ heading01$1,
779
+ productiveHeading01$1,
780
+ heading02$1,
781
+ productiveHeading02$1,
782
+ productiveHeading03$1,
783
+ productiveHeading04$1,
784
+ productiveHeading05$1,
785
+ productiveHeading06$1,
786
+ productiveHeading07$1,
787
+ expressiveHeading01$1,
788
+ expressiveHeading02$1,
789
+ expressiveHeading03$1,
790
+ expressiveHeading04$1,
791
+ expressiveHeading05$1,
792
+ expressiveHeading06$1,
793
+ expressiveParagraph01$1,
794
+ quotation01$1,
795
+ quotation02$1,
796
+ display01$1,
797
+ display02$1,
798
+ display03$1,
799
+ display04$1,
800
+ legal01$1,
801
+ legal02$1,
802
+ bodyCompact01$1,
803
+ bodyCompact02$1,
804
+ body01$1,
805
+ body02$1,
806
+ headingCompact01$1,
807
+ headingCompact02$1,
808
+ heading03$1,
809
+ heading04$1,
810
+ heading05$1,
811
+ heading06$1,
812
+ heading07$1,
813
+ fluidHeading03$1,
814
+ fluidHeading04$1,
815
+ fluidHeading05$1,
816
+ fluidHeading06$1,
817
+ fluidParagraph01$1,
818
+ fluidQuotation01$1,
819
+ fluidQuotation02$1,
820
+ fluidDisplay01$1,
821
+ fluidDisplay02$1,
822
+ fluidDisplay03$1,
823
+ fluidDisplay04$1
824
+ ];
774
825
 
775
- // Unstable tokens
776
- var caption01 = 'caption01';
777
- var caption02 = 'caption02';
778
- var label01 = 'label01';
779
- var label02 = 'label02';
780
- var helperText01 = 'helperText01';
781
- var helperText02 = 'helperText02';
782
- var bodyShort01 = 'bodyShort01';
783
- var bodyLong01 = 'bodyLong01';
784
- var bodyShort02 = 'bodyShort02';
785
- var bodyLong02 = 'bodyLong02';
786
- var code01 = 'code01';
787
- var code02 = 'code02';
788
- var heading01 = 'heading01';
789
- var productiveHeading01 = 'productiveHeading01';
790
- var heading02 = 'heading02';
791
- var productiveHeading02 = 'productiveHeading02';
792
- var productiveHeading03 = 'productiveHeading03';
793
- var productiveHeading04 = 'productiveHeading04';
794
- var productiveHeading05 = 'productiveHeading05';
795
- var productiveHeading06 = 'productiveHeading06';
796
- var productiveHeading07 = 'productiveHeading07';
797
- var expressiveHeading01 = 'expressiveHeading01';
798
- var expressiveHeading02 = 'expressiveHeading02';
799
- var expressiveHeading03 = 'expressiveHeading03';
800
- var expressiveHeading04 = 'expressiveHeading04';
801
- var expressiveHeading05 = 'expressiveHeading05';
802
- var expressiveHeading06 = 'expressiveHeading06';
803
- var expressiveParagraph01 = 'expressiveParagraph01';
804
- var quotation01 = 'quotation01';
805
- var quotation02 = 'quotation02';
806
- var display01 = 'display01';
807
- var display02 = 'display02';
808
- var display03 = 'display03';
809
- var display04 = 'display04';
810
- // V11 Tokens
811
- var legal01 = 'legal01';
812
- var legal02 = 'legal02';
813
- var bodyCompact01 = 'bodyCompact01';
814
- var bodyCompact02 = 'bodyCompact02';
815
- var body01 = 'body01';
816
- var body02 = 'body02';
817
- var headingCompact01 = 'headingCompact01';
818
- var headingCompact02 = 'headingCompact02';
819
- var heading03 = 'heading03';
820
- var heading04 = 'heading04';
821
- var heading05 = 'heading05';
822
- var heading06 = 'heading06';
823
- var heading07 = 'heading07';
824
- var fluidHeading03 = 'fluidHeading03';
825
- var fluidHeading04 = 'fluidHeading04';
826
- var fluidHeading05 = 'fluidHeading05';
827
- var fluidHeading06 = 'fluidHeading06';
828
- var fluidParagraph01 = 'fluidParagraph01';
829
- var fluidQuotation01 = 'fluidQuotation01';
830
- var fluidQuotation02 = 'fluidQuotation02';
831
- var fluidDisplay01 = 'fluidDisplay01';
832
- var fluidDisplay02 = 'fluidDisplay02';
833
- var fluidDisplay03 = 'fluidDisplay03';
834
- var fluidDisplay04 = 'fluidDisplay04';
835
- var unstable_tokens = [caption01, caption02, label01, label02, helperText01, helperText02, bodyShort01, bodyLong01, bodyShort02, bodyLong02, code01, code02, heading01, productiveHeading01, heading02, productiveHeading02, productiveHeading03, productiveHeading04, productiveHeading05, productiveHeading06, productiveHeading07, expressiveHeading01, expressiveHeading02, expressiveHeading03, expressiveHeading04, expressiveHeading05, expressiveHeading06, expressiveParagraph01, quotation01, quotation02, display01, display02, display03, display04,
836
- // V11 Tokens
837
- legal01, legal02, bodyCompact01, bodyCompact02, body01, body02, headingCompact01, headingCompact02, heading03, heading04, heading05, heading06, heading07, fluidHeading03, fluidHeading04, fluidHeading05, fluidHeading06, fluidParagraph01, fluidQuotation01, fluidQuotation02, fluidDisplay01, fluidDisplay02, fluidDisplay03, fluidDisplay04];
826
+ //#endregion
827
+ //#region src/index.js
828
+ /**
829
+ * Copyright IBM Corp. 2018, 2023
830
+ *
831
+ * This source code is licensed under the Apache-2.0 license found in the
832
+ * LICENSE file in the root directory of this source tree.
833
+ */
838
834
 
839
- export { body01$1 as body01, body02$1 as body02, bodyCompact01$1 as bodyCompact01, bodyCompact02$1 as bodyCompact02, bodyLong01$1 as bodyLong01, bodyLong02$1 as bodyLong02, bodyShort01$1 as bodyShort01, bodyShort02$1 as bodyShort02, caption01$1 as caption01, caption02$1 as caption02, code01$1 as code01, code02$1 as code02, display01$1 as display01, display02$1 as display02, display03$1 as display03, display04$1 as display04, expressiveHeading01$1 as expressiveHeading01, expressiveHeading02$1 as expressiveHeading02, expressiveHeading03$1 as expressiveHeading03, expressiveHeading04$1 as expressiveHeading04, expressiveHeading05$1 as expressiveHeading05, expressiveHeading06$1 as expressiveHeading06, expressiveParagraph01$1 as expressiveParagraph01, fluid, fluidDisplay01$1 as fluidDisplay01, fluidDisplay02$1 as fluidDisplay02, fluidDisplay03$1 as fluidDisplay03, fluidDisplay04$1 as fluidDisplay04, fluidHeading03$1 as fluidHeading03, fluidHeading04$1 as fluidHeading04, fluidHeading05$1 as fluidHeading05, fluidHeading06$1 as fluidHeading06, fluidParagraph01$1 as fluidParagraph01, fluidQuotation01$1 as fluidQuotation01, fluidQuotation02$1 as fluidQuotation02, fontFamilies, fontFamily, fontWeight, fontWeights, getTypeSize, heading01$1 as heading01, heading02$1 as heading02, heading03$1 as heading03, heading04$1 as heading04, heading05$1 as heading05, heading06$1 as heading06, heading07$1 as heading07, headingCompact01$1 as headingCompact01, headingCompact02$1 as headingCompact02, helperText01$1 as helperText01, helperText02$1 as helperText02, label01$1 as label01, label02$1 as label02, legal01$1 as legal01, legal02$1 as legal02, print, productiveHeading01$1 as productiveHeading01, productiveHeading02$1 as productiveHeading02, productiveHeading03$1 as productiveHeading03, productiveHeading04$1 as productiveHeading04, productiveHeading05$1 as productiveHeading05, productiveHeading06$1 as productiveHeading06, productiveHeading07$1 as productiveHeading07, quotation01$1 as quotation01, quotation02$1 as quotation02, reset, scale, styles, unstable_tokens };
835
+ //#endregion
836
+ export { body01, body02, bodyCompact01, bodyCompact02, bodyLong01, bodyLong02, bodyShort01, bodyShort02, caption01, caption02, code01, code02, display01, display02, display03, display04, expressiveHeading01, expressiveHeading02, expressiveHeading03, expressiveHeading04, expressiveHeading05, expressiveHeading06, expressiveParagraph01, fluid, fluidDisplay01, fluidDisplay02, fluidDisplay03, fluidDisplay04, fluidHeading03, fluidHeading04, fluidHeading05, fluidHeading06, fluidParagraph01, fluidQuotation01, fluidQuotation02, fontFamilies, fontFamily, fontWeight, fontWeights, getTypeSize, heading01, heading02, heading03, heading04, heading05, heading06, heading07, headingCompact01, headingCompact02, helperText01, helperText02, label01, label02, legal01, legal02, print, productiveHeading01, productiveHeading02, productiveHeading03, productiveHeading04, productiveHeading05, productiveHeading06, productiveHeading07, quotation01, quotation02, reset, scale, styles_exports as styles, unstable_tokens };