@esri/calcite-design-tokens 1.1.0-next.2 → 1.1.0-next.3

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 24 Oct 2023 20:37:30 GMT
3
+ * Generated on Tue, 24 Oct 2023 21:31:41 GMT
4
4
  */
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 24 Oct 2023 20:37:34 GMT
3
+ * Generated on Tue, 24 Oct 2023 21:31:48 GMT
4
4
  */
5
5
 
6
6
 
@@ -20,11 +20,29 @@ $breakpoint-cols-sm: 12; // columns
20
20
  $breakpoint-cols-xs: 6; // columns
21
21
  $breakpoint-content-fixed: 1440px; // only for lg breakpoint fixed grid width
22
22
  $breakpoint-content-fluid: 100%; // for fluid grid widths
23
- $breakpoint-width-lg: 1440px; // min-width size
24
- $breakpoint-width-md: 1152px; // min-width size
25
- $breakpoint-width-sm: 768px; // min-width size
26
- $breakpoint-width-xs: 476px; // min-width size
27
- $breakpoint-width-xxs: 320px; // Small handheld devices and mini-windows
23
+ $breakpoint-width-lg-min: 1153px; // Large laptops and desktop computers
24
+ $breakpoint-width-lg-max: 1722px; // Large laptops and desktop computers
25
+ $breakpoint-width-md-min: 769px; // Small laptops
26
+ $breakpoint-width-md-max: 1152px; // Small laptops
27
+ $breakpoint-width-sm-min: 477px; // Small tablets
28
+ $breakpoint-width-sm-max: 768px; // Small tablets
29
+ $breakpoint-width-xs-min: 321px; // Handheld devices
30
+ $breakpoint-width-xs-max: 476px; // Handheld devices
31
+ $breakpoint-width-xxs-max: 320px; // Small handheld devices and mini-windows
32
+ $breakpoint-width-lg: 1440px; // To be deprecated
33
+ $breakpoint-width-md: 1152px; // To be deprecated
34
+ $breakpoint-width-sm: 768px; // To be deprecated
35
+ $breakpoint-width-xs: 476px; // To be deprecated
36
+ $breakpoint-width-xxs: 320px; // To be deprecated
37
+ $breakpoint-height-lg-min: 679px; // Large laptops and desktop computers
38
+ $breakpoint-height-lg-max: 853px; // Large laptops and desktop computers
39
+ $breakpoint-height-md-min: 504px; // Small laptops
40
+ $breakpoint-height-md-max: 678px; // Small laptops
41
+ $breakpoint-height-sm-min: 329px; // Small tablets
42
+ $breakpoint-height-sm-max: 503px; // Small tablets
43
+ $breakpoint-height-xs-min: 154px; // Handheld devices
44
+ $breakpoint-height-xs-max: 328px; // Handheld devices
45
+ $breakpoint-height-xxs-max: 153px; // Small handheld devices and mini-windows
28
46
  $spacing-none: 0px;
29
47
  $spacing-28: 288px;
30
48
  $spacing-27: 256px;
@@ -400,11 +418,29 @@ $breakpoint-margin: 24px;
400
418
  --calcite-app-breakpoint-cols-xs: 6; /* columns */
401
419
  --calcite-app-breakpoint-content-fixed: 1440px; /* only for lg breakpoint fixed grid width */
402
420
  --calcite-app-breakpoint-content-fluid: 100%; /* for fluid grid widths */
403
- --calcite-app-breakpoint-width-lg: 1440px; /* min-width size */
404
- --calcite-app-breakpoint-width-md: 1152px; /* min-width size */
405
- --calcite-app-breakpoint-width-sm: 768px; /* min-width size */
406
- --calcite-app-breakpoint-width-xs: 476px; /* min-width size */
407
- --calcite-app-breakpoint-width-xxs: 320px; /* Small handheld devices and mini-windows */
421
+ --calcite-app-breakpoint-width-lg-min: 1153px; /* Large laptops and desktop computers */
422
+ --calcite-app-breakpoint-width-lg-max: 1722px; /* Large laptops and desktop computers */
423
+ --calcite-app-breakpoint-width-md-min: 769px; /* Small laptops */
424
+ --calcite-app-breakpoint-width-md-max: 1152px; /* Small laptops */
425
+ --calcite-app-breakpoint-width-sm-min: 477px; /* Small tablets */
426
+ --calcite-app-breakpoint-width-sm-max: 768px; /* Small tablets */
427
+ --calcite-app-breakpoint-width-xs-min: 321px; /* Handheld devices */
428
+ --calcite-app-breakpoint-width-xs-max: 476px; /* Handheld devices */
429
+ --calcite-app-breakpoint-width-xxs-max: 320px; /* Small handheld devices and mini-windows */
430
+ --calcite-app-breakpoint-width-lg: 1440px; /* To be deprecated */
431
+ --calcite-app-breakpoint-width-md: 1152px; /* To be deprecated */
432
+ --calcite-app-breakpoint-width-sm: 768px; /* To be deprecated */
433
+ --calcite-app-breakpoint-width-xs: 476px; /* To be deprecated */
434
+ --calcite-app-breakpoint-width-xxs: 320px; /* To be deprecated */
435
+ --calcite-app-breakpoint-height-lg-min: 679px; /* Large laptops and desktop computers */
436
+ --calcite-app-breakpoint-height-lg-max: 853px; /* Large laptops and desktop computers */
437
+ --calcite-app-breakpoint-height-md-min: 504px; /* Small laptops */
438
+ --calcite-app-breakpoint-height-md-max: 678px; /* Small laptops */
439
+ --calcite-app-breakpoint-height-sm-min: 329px; /* Small tablets */
440
+ --calcite-app-breakpoint-height-sm-max: 503px; /* Small tablets */
441
+ --calcite-app-breakpoint-height-xs-min: 154px; /* Handheld devices */
442
+ --calcite-app-breakpoint-height-xs-max: 328px; /* Handheld devices */
443
+ --calcite-app-breakpoint-height-xxs-max: 153px; /* Small handheld devices and mini-windows */
408
444
  --calcite-app-spacing-none: 0px;
409
445
  --calcite-app-spacing-28: 288px;
410
446
  --calcite-app-spacing-27: 256px;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 24 Oct 2023 20:37:32 GMT
3
+ * Generated on Tue, 24 Oct 2023 21:31:45 GMT
4
4
  */
5
5
 
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/calcite-design-tokens",
3
- "version": "1.1.0-next.2",
3
+ "version": "1.1.0-next.3",
4
4
  "description": "Esri's Calcite Design System Tokens",
5
5
  "keywords": [
6
6
  "Calcite",
@@ -12,17 +12,21 @@
12
12
  "type": "module",
13
13
  "exports": {
14
14
  "./css": "./dist/css/calcite-headless.css",
15
- "./css/brand/dark": "./dist/css/brand-dark.css",
16
- "./css/brand/light": "./dist/css/brand-light.css",
17
15
  "./css/calcite/dark": "./dist/css/calcite-dark.css",
18
16
  "./css/calcite/light": "./dist/css/calcite-light.css",
19
17
  "./css/headless": "./dist/css/calcite-headless.css",
20
18
  "./scss": "./dist/scss/calcite-headless.scss",
21
- "./scss/brand/dark": "./dist/scss/brand-dark.scss",
22
- "./scss/brand/light": "./dist/scss/brand-light.scss",
23
19
  "./scss/calcite/dark": "./dist/scss/calcite-dark.scss",
24
20
  "./scss/calcite/light": "./dist/scss/calcite-light.scss",
25
- "./scss/headless": "./dist/scss/calcite-headless.scss"
21
+ "./scss/headless": "./dist/scss/calcite-headless.scss",
22
+ "./js": "./dist/js/calcite-headless.js",
23
+ "./js/calcite/dark": "./dist/js/calcite-dark.js",
24
+ "./js/calcite/light": "./dist/js/calcite-light.js",
25
+ "./js/headless": "./dist/js/calcite-headless.js",
26
+ "./es6": "./dist/es6/calcite-headless.js",
27
+ "./es6/calcite/dark": "./dist/es6/calcite-dark.js",
28
+ "./es6/calcite/light": "./dist/es6/calcite-light.js",
29
+ "./es6/headless": "./dist/es6/calcite-headless.js"
26
30
  },
27
31
  "repository": {
28
32
  "type": "git",
@@ -43,5 +47,5 @@
43
47
  "lint": "concurrently npm:lint:*",
44
48
  "test": "jest"
45
49
  },
46
- "gitHead": "6a31ea78baa3d2820a8406d7287083b53076cd46"
50
+ "gitHead": "55c379646780acabacf2b92fe293f766aa7c3d36"
47
51
  }
package/src/core.json CHANGED
@@ -1527,31 +1527,155 @@
1527
1527
  }
1528
1528
  },
1529
1529
  "breakpoint": {
1530
+ "height": {
1531
+ "xxs": {
1532
+ "min": {
1533
+ "value": 0,
1534
+ "type": "sizing",
1535
+ "description": "Small handheld devices and mini-windows"
1536
+ },
1537
+ "max": {
1538
+ "value": 153,
1539
+ "type": "sizing",
1540
+ "description": "Small handheld devices and mini-windows"
1541
+ }
1542
+ },
1543
+ "xs": {
1544
+ "max": {
1545
+ "value": 328,
1546
+ "type": "sizing",
1547
+ "description": "Handheld devices"
1548
+ },
1549
+ "min": {
1550
+ "value": 154,
1551
+ "type": "sizing",
1552
+ "description": "Handheld devices"
1553
+ }
1554
+ },
1555
+ "sm": {
1556
+ "max": {
1557
+ "value": 503,
1558
+ "type": "sizing",
1559
+ "description": "Small tablets"
1560
+ },
1561
+ "min": {
1562
+ "value": 329,
1563
+ "type": "sizing",
1564
+ "description": "Small tablets"
1565
+ }
1566
+ },
1567
+ "md": {
1568
+ "max": {
1569
+ "value": 678,
1570
+ "type": "sizing",
1571
+ "description": "Small laptops"
1572
+ },
1573
+ "min": {
1574
+ "value": 504,
1575
+ "type": "sizing",
1576
+ "description": "Small laptops"
1577
+ }
1578
+ },
1579
+ "lg": {
1580
+ "max": {
1581
+ "value": 853,
1582
+ "type": "sizing",
1583
+ "description": "Large laptops and desktop computers"
1584
+ },
1585
+ "min": {
1586
+ "value": 679,
1587
+ "type": "sizing",
1588
+ "description": "Large laptops and desktop computers"
1589
+ }
1590
+ }
1591
+ },
1530
1592
  "width": {
1593
+ "default": {
1594
+ "xxs": {
1595
+ "value": "320px",
1596
+ "type": "sizing",
1597
+ "description": "To be deprecated"
1598
+ },
1599
+ "xs": {
1600
+ "value": "476px",
1601
+ "type": "sizing",
1602
+ "description": "To be deprecated"
1603
+ },
1604
+ "sm": {
1605
+ "value": "768px",
1606
+ "type": "sizing",
1607
+ "description": "To be deprecated"
1608
+ },
1609
+ "md": {
1610
+ "value": "1152px",
1611
+ "type": "sizing",
1612
+ "description": "To be deprecated"
1613
+ },
1614
+ "lg": {
1615
+ "value": "1440px",
1616
+ "type": "sizing",
1617
+ "description": "To be deprecated"
1618
+ }
1619
+ },
1531
1620
  "xxs": {
1532
- "value": "320px",
1533
- "type": "sizing",
1534
- "description": "Small handheld devices and mini-windows"
1621
+ "max": {
1622
+ "value": 320,
1623
+ "type": "sizing",
1624
+ "description": "Small handheld devices and mini-windows"
1625
+ },
1626
+ "min": {
1627
+ "value": 0,
1628
+ "type": "sizing",
1629
+ "description": "Small handheld devices and mini-windows"
1630
+ }
1535
1631
  },
1536
1632
  "xs": {
1537
- "value": "476px",
1538
- "type": "sizing",
1539
- "description": "min-width size"
1633
+ "max": {
1634
+ "value": 476,
1635
+ "type": "sizing",
1636
+ "description": "Handheld devices"
1637
+ },
1638
+ "min": {
1639
+ "value": 321,
1640
+ "type": "sizing",
1641
+ "description": "Handheld devices"
1642
+ }
1540
1643
  },
1541
1644
  "sm": {
1542
- "value": "768px",
1543
- "type": "sizing",
1544
- "description": "min-width size"
1645
+ "max": {
1646
+ "value": 768,
1647
+ "type": "sizing",
1648
+ "description": "Small tablets"
1649
+ },
1650
+ "min": {
1651
+ "value": 477,
1652
+ "type": "sizing",
1653
+ "description": "Small tablets"
1654
+ }
1545
1655
  },
1546
1656
  "md": {
1547
- "value": "1152px",
1548
- "type": "sizing",
1549
- "description": "min-width size"
1657
+ "max": {
1658
+ "value": 1152,
1659
+ "type": "sizing",
1660
+ "description": "Small laptops"
1661
+ },
1662
+ "min": {
1663
+ "value": 769,
1664
+ "type": "sizing",
1665
+ "description": "Small laptops"
1666
+ }
1550
1667
  },
1551
1668
  "lg": {
1552
- "value": "1440px",
1553
- "type": "sizing",
1554
- "description": "min-width size"
1669
+ "max": {
1670
+ "value": 1722,
1671
+ "type": "sizing",
1672
+ "description": "Large laptops and desktop computers"
1673
+ },
1674
+ "min": {
1675
+ "value": 1153,
1676
+ "type": "sizing",
1677
+ "description": "Large laptops and desktop computers"
1678
+ }
1555
1679
  }
1556
1680
  },
1557
1681
  "margin": {
@@ -0,0 +1,22 @@
1
+ import StyleDictionary, { Dictionary, File } from "style-dictionary";
2
+ import { default as JsonToTS } from "json-to-ts";
3
+
4
+ type FormatOptions = { dictionary: Dictionary; file: File };
5
+
6
+ export function formatJs({ dictionary, file }: FormatOptions): string {
7
+ return (
8
+ StyleDictionary.formatHelpers.fileHeader({ file }) +
9
+ "export default" +
10
+ JSON.stringify(dictionary.tokens, null, 2) +
11
+ ";\n"
12
+ );
13
+ }
14
+
15
+ export function formatTs({ dictionary, file }: FormatOptions): string {
16
+ return (
17
+ StyleDictionary.formatHelpers.fileHeader({ file }) +
18
+ "declare const root: RootObject\n" +
19
+ "export default root\n" +
20
+ JsonToTS(dictionary.properties).join("\n")
21
+ );
22
+ }
@@ -8,6 +8,7 @@ import { nameCamelCase } from "./transform/nameCamelCase.js";
8
8
  import { nameKebabCase } from "./transform/nameKebabCase.js";
9
9
  import { parseName } from "./utils/parseName.js";
10
10
  import { Theme } from "./getThemes.js";
11
+ import { formatJs, formatTs } from "./format/javascript.js";
11
12
 
12
13
  /**
13
14
  * Style Dictionary runner configuration overrides.
@@ -49,6 +50,16 @@ export const run = async (
49
50
  formatter: formatSCSS,
50
51
  });
51
52
 
53
+ StyleDictionary.registerFormat({
54
+ name: "calcite/js-module",
55
+ formatter: formatJs,
56
+ });
57
+
58
+ StyleDictionary.registerFormat({
59
+ name: "calcite/ts-module",
60
+ formatter: formatTs,
61
+ });
62
+
52
63
  // Registering Style Dictionary transformers https://amzn.github.io/style-dictionary/#/transforms?id=defining-custom-transforms
53
64
  StyleDictionary.registerTransform({
54
65
  name: "name/calcite/camel",
@@ -73,6 +84,39 @@ export const run = async (
73
84
  source,
74
85
  include,
75
86
  platforms: {
87
+ js: {
88
+ buildPath: `${buildPath}/js/`,
89
+ files: [
90
+ {
91
+ destination: `${fileName}.js`,
92
+ format: "calcite/js-module",
93
+ filter: "filterSource",
94
+ },
95
+ {
96
+ destination: `${fileName}.d.ts`,
97
+ format: "calcite/ts-module",
98
+ filter: "filterSource",
99
+ },
100
+ ],
101
+ },
102
+ es6: {
103
+ transformGroup: "js",
104
+ buildPath: `${buildPath}/es6/`,
105
+ files: [
106
+ {
107
+ format: "javascript/es6",
108
+ destination: `${fileName}.js`,
109
+ filter: "filterSource",
110
+ options: { ...options, outputReferences: true },
111
+ },
112
+ {
113
+ format: "typescript/es6-declarations",
114
+ destination: `${fileName}.d.ts`,
115
+ filter: "filterSource",
116
+ options: { ...options, outputReferences: true },
117
+ },
118
+ ],
119
+ },
76
120
  css: {
77
121
  prefix: "calcite",
78
122
  transforms: [
@@ -1,13 +0,0 @@
1
- /**
2
- * Do not edit directly
3
- * Generated on Tue, 24 Oct 2023 20:37:28 GMT
4
- */
5
-
6
-
7
- $core-font-font-size-6-light: 26px;
8
- $breakpoint-width-lg-light: 1440px;
9
-
10
- @mixin calcite-theme-light() {
11
- --calcite-app-font-size-6: 26px;
12
- --calcite-breakpoint-width-lg: 1440px;
13
- }