@servicetitan/hammer-token 1.3.2 → 1.3.4

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,5 +1,5 @@
1
1
 
2
- > @servicetitan/hammer-token@1.3.1 build /home/runner/work/hammer/hammer/packages/hammer-token
2
+ > @servicetitan/hammer-token@1.3.3 build /home/runner/work/hammer/hammer/packages/hammer-token
3
3
  > node ./config.js
4
4
 
5
5
 
@@ -12,6 +12,7 @@ css
12
12
 
13
13
  scss
14
14
  ✔︎ build/web/core/primitive.scss
15
+ ✔︎ build/web/core/primitive-variables.scss
15
16
  ✔︎ build/web/core/semantic.scss
16
17
  ✔︎ build/web/core/semantic-variables.scss
17
18
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @servicetitan/hammer-token@1.3.1 lint /home/runner/work/hammer/hammer/packages/hammer-token
2
+ > @servicetitan/hammer-token@1.3.3 lint /home/runner/work/hammer/hammer/packages/hammer-token
3
3
  > eslint
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # v1.3.4 (Sat Nov 02 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - ANV-1953: Add monolith CSS to storybook, create CSS file to temp fix `71.1orion` [#796](https://github.com/servicetitan/hammer/pull/796) ([@rgdelato](https://github.com/rgdelato) [@tounsoo](https://github.com/tounsoo) [@w-a-t-s-o-n](https://github.com/w-a-t-s-o-n))
6
+
7
+ #### Authors: 3
8
+
9
+ - Ben Ho ([@tounsoo](https://github.com/tounsoo))
10
+ - Derek Watson ([@w-a-t-s-o-n](https://github.com/w-a-t-s-o-n))
11
+ - Ryan De La Torre ([@rgdelato](https://github.com/rgdelato))
12
+
13
+ ---
14
+
15
+ # v1.3.3 (Tue Oct 29 2024)
16
+
17
+ #### 🐛 Bug Fix
18
+
19
+ - NOTICK: Add missing primitive tokens and remove `color-scheme` setting in Theme Provider [#790](https://github.com/servicetitan/hammer/pull/790) ([@tounsoo](https://github.com/tounsoo))
20
+
21
+ #### Authors: 1
22
+
23
+ - Ben Ho ([@tounsoo](https://github.com/tounsoo))
24
+
25
+ ---
26
+
1
27
  # v1.3.2 (Mon Oct 28 2024)
2
28
 
3
29
  #### 🐛 Bug Fix
@@ -0,0 +1,115 @@
1
+ $token: (
2
+ breakpoint-sm: 640px,
3
+ breakpoint-md: 768px,
4
+ breakpoint-lg: 1024px,
5
+ breakpoint-xl: 1280px,
6
+ breakpoint-xxl: 1536px,
7
+ color-blue-100: #e0f2ff,
8
+ color-blue-200: #b5deff,
9
+ color-blue-300: #78bbfa,
10
+ color-blue-400: #3892f3,
11
+ color-blue-500: #0265dc,
12
+ color-blue-600: #004491,
13
+ color-neutral-0: #ffffff,
14
+ color-neutral-10: #fcfcfc,
15
+ color-neutral-20: #fafafa,
16
+ color-neutral-30: #f7f7f7,
17
+ color-neutral-40: #f5f5f5,
18
+ color-neutral-50: #eeeeee,
19
+ color-neutral-60: #dfe0e1,
20
+ color-neutral-70: #bcbcbd,
21
+ color-neutral-80: #949596,
22
+ color-neutral-90: #737475,
23
+ color-neutral-100: #606162,
24
+ color-neutral-200: #444445,
25
+ color-neutral-300: #2d2e31,
26
+ color-neutral-400: #141414,
27
+ color-neutral-500: #040404,
28
+ color-blue-grey-100: #eaeff2,
29
+ color-blue-grey-200: #d0d8dd,
30
+ color-blue-grey-300: #b4c1c8,
31
+ color-blue-grey-400: #8c9ca5,
32
+ color-blue-grey-500: #6a7a85,
33
+ color-blue-grey-600: #576671,
34
+ color-orange-100: #ffeccc,
35
+ color-orange-200: #fdd291,
36
+ color-orange-300: #ffa037,
37
+ color-orange-400: #e46f00,
38
+ color-orange-500: #b14c00,
39
+ color-orange-600: #7a2f00,
40
+ color-yellow-100: #fff9e2,
41
+ color-yellow-200: #fff0b1,
42
+ color-yellow-300: #ffe278,
43
+ color-yellow-400: #ffc902,
44
+ color-yellow-500: #ffbe00,
45
+ color-yellow-600: #de9500,
46
+ color-green-100: #cef8e0,
47
+ color-green-200: #89ecbc,
48
+ color-green-300: #49cc93,
49
+ color-green-400: #15a46e,
50
+ color-green-500: #007a4d,
51
+ color-green-600: #005132,
52
+ color-cyan-100: #e3fcff,
53
+ color-cyan-200: #b1f3fa,
54
+ color-cyan-300: #13ceea,
55
+ color-cyan-400: #08bfdf,
56
+ color-cyan-500: #0ca5c0,
57
+ color-cyan-600: #038299,
58
+ color-purple-100: #f1edff,
59
+ color-purple-200: #c1b6f2,
60
+ color-purple-300: #8772e5,
61
+ color-purple-400: #6954c0,
62
+ color-purple-500: #4f3a9e,
63
+ color-purple-600: #422799,
64
+ color-red-100: #ffece9,
65
+ color-red-200: #ffb2a0,
66
+ color-red-300: #ff745f,
67
+ color-red-400: #f94d32,
68
+ color-red-500: #e13212,
69
+ color-red-600: #bf2a00,
70
+ color-magenta-100: #fbeaf5,
71
+ color-magenta-200: #faafe2,
72
+ color-magenta-300: #d949a9,
73
+ color-magenta-400: #b52d88,
74
+ color-magenta-500: #982071,
75
+ color-magenta-600: #7d165b,
76
+ duration: 200ms,
77
+ duration-instant: 0ms,
78
+ duration-fast: 100ms,
79
+ duration-slow: 300ms,
80
+ font-line-height-base: 1.5,
81
+ font-line-height-display: 1.25,
82
+ font-weight-normal: 400,
83
+ font-weight-semibold: 600,
84
+ font-weight-bold: 700,
85
+ font-size-100: 0.625rem,
86
+ font-size-200: 0.75rem,
87
+ font-size-300: 0.875rem,
88
+ font-size-400: 1rem,
89
+ font-size-500: 1.25rem,
90
+ font-size-600: 1.5rem,
91
+ font-size-700: 1.75rem,
92
+ font-size-800: 2rem,
93
+ font-size-900: 2.25rem,
94
+ size-0: 0rem,
95
+ size-1: 0.25rem,
96
+ size-2: 0.5rem,
97
+ size-3: 0.75rem,
98
+ size-4: 1rem,
99
+ size-5: 1.25rem,
100
+ size-6: 1.5rem,
101
+ size-7: 1.75rem,
102
+ size-8: 2rem,
103
+ size-9: 2.25rem,
104
+ size-10: 2.5rem,
105
+ size-11: 2.75rem,
106
+ size-12: 3rem,
107
+ size-13: 3.25rem,
108
+ size-14: 3.5rem,
109
+ size-quarter: 0.0625rem,
110
+ size-half: 0.125rem,
111
+ transition-ease: cubic-bezier(.4, 0, .2, 1),
112
+ transition-ease-in: cubic-bezier(.4, 0, 1, 1),
113
+ transition-ease-out: cubic-bezier(0, 0, .4, 1),
114
+ transition-ease-in-out: cubic-bezier(.4, 0, .6, 1),
115
+ );
@@ -10,14 +10,6 @@ $light: (
10
10
  background-color-disabled: #606162,
11
11
  background-color-inverted: #2d2e31,
12
12
  background-color-inverted-strong: #141414,
13
- border-radius-none: 0rem,
14
- border-radius-rounded: 0.375rem,
15
- border-radius-rounded-strong: 1rem,
16
- border-radius-pill: 500px,
17
- border-radius-circular: 100%,
18
- border-width-none: 0rem,
19
- border-width: 0.0625rem,
20
- border-width-strong: 0.125rem,
21
13
  border-color: #949596,
22
14
  border-color-subdued: #dfe0e1,
23
15
  border-color-strong: #444445,
@@ -25,7 +17,6 @@ $light: (
25
17
  border-color-danger: #e13212,
26
18
  focus-ring-color: #0265dc,
27
19
  focus-ring-color-danger: #e13212,
28
- focus-ring-width: 0.25rem,
29
20
  foreground-color: #141414,
30
21
  foreground-color-subdued: #737475,
31
22
  foreground-color-primary: #0265dc,
@@ -47,31 +38,10 @@ $light: (
47
38
  overlay-color-hover-on-primary: #ffffff29,
48
39
  overlay-color-hover-on-danger: #ffffff29,
49
40
  shadow-color: #14141414,
50
- shadow-size-flat: 0rem 0rem 0rem,
51
- shadow-size-float: 0rem 0.125rem 0.5rem,
52
- shadow-size-overlay: 0rem 0.5rem 1.5rem,
53
41
  status-color-info: #0265dc,
54
42
  status-color-danger: #e13212,
55
43
  status-color-success: #007a4d,
56
44
  status-color-warning: #ffbe00,
57
- typography-paragraph-size-xsmall: 0.75rem,
58
- typography-paragraph-size-small: 0.875rem,
59
- typography-paragraph-size: 1rem,
60
- typography-paragraph-size-large: 1.25rem,
61
- typography-paragraph-size-xlarge: 1.5rem,
62
- typography-paragraph-font-weight: 400,
63
- typography-heading-size-xsmall: 0.875rem,
64
- typography-heading-size-small: 1rem,
65
- typography-heading-size: 1.25rem,
66
- typography-heading-size-large: 1.5rem,
67
- typography-heading-size-xlarge: 2rem,
68
- typography-heading-font-weight: 700,
69
- typography-label-size-xsmall: 0.625rem,
70
- typography-label-size-small: 0.75rem,
71
- typography-label-size: 0.875rem,
72
- typography-label-size-large: 1rem,
73
- typography-label-size-xlarge: 1.25rem,
74
- typography-label-font-weight: 600,
75
45
  );
76
46
  $dark: (
77
47
  background-color: #141414,
@@ -85,14 +55,6 @@ $dark: (
85
55
  background-color-disabled: #606162,
86
56
  background-color-inverted: #fafafa,
87
57
  background-color-inverted-strong: #ffffff,
88
- border-radius-none: 0rem,
89
- border-radius-rounded: 0.375rem,
90
- border-radius-rounded-strong: 1rem,
91
- border-radius-pill: 500px,
92
- border-radius-circular: 100%,
93
- border-width-none: 0rem,
94
- border-width: 0.0625rem,
95
- border-width-strong: 0.125rem,
96
58
  border-color: #606162,
97
59
  border-color-subdued: #444445,
98
60
  border-color-strong: #dfe0e1,
@@ -100,7 +62,6 @@ $dark: (
100
62
  border-color-danger: #ff745f,
101
63
  focus-ring-color: #78bbfa,
102
64
  focus-ring-color-danger: #ff745f,
103
- focus-ring-width: 0.25rem,
104
65
  foreground-color: #ffffff,
105
66
  foreground-color-subdued: #bcbcbd,
106
67
  foreground-color-primary: #78bbfa,
@@ -122,13 +83,24 @@ $dark: (
122
83
  overlay-color-hover-on-primary: #ffffff29,
123
84
  overlay-color-hover-on-danger: #ffffff29,
124
85
  shadow-color: #ffffff14,
125
- shadow-size-flat: 0rem 0rem 0rem,
126
- shadow-size-float: 0rem 0.125rem 0.5rem,
127
- shadow-size-overlay: 0rem 0.5rem 1.5rem,
128
86
  status-color-info: #78bbfa,
129
87
  status-color-danger: #ff745f,
130
88
  status-color-success: #49cc93,
131
89
  status-color-warning: #ffe278,
90
+ );
91
+ $nonColor: (
92
+ border-radius-none: 0rem,
93
+ border-radius-rounded: 0.375rem,
94
+ border-radius-rounded-strong: 1rem,
95
+ border-radius-pill: 500px,
96
+ border-radius-circular: 100%,
97
+ border-width-none: 0rem,
98
+ border-width: 0.0625rem,
99
+ border-width-strong: 0.125rem,
100
+ focus-ring-width: 0.25rem,
101
+ shadow-size-flat: 0rem 0rem 0rem,
102
+ shadow-size-float: 0rem 0.125rem 0.5rem,
103
+ shadow-size-overlay: 0rem 0.5rem 1.5rem,
132
104
  typography-paragraph-size-xsmall: 0.75rem,
133
105
  typography-paragraph-size-small: 0.875rem,
134
106
  typography-paragraph-size: 1rem,
package/config.js CHANGED
@@ -26,19 +26,44 @@ StyleDictionary.registerFormat({
26
26
  },
27
27
  });
28
28
 
29
+ const nonColorTokens = [
30
+ "border-radius",
31
+ "font-family",
32
+ "font-weight",
33
+ "size",
34
+ "width",
35
+ ];
36
+
29
37
  StyleDictionary.registerFormat({
30
38
  name: `custom/semantic-variables`,
31
39
  formatter: function ({ dictionary }) {
32
40
  const light = dictionary.allTokens
33
- .filter((token) => !token.name.includes("font-family"))
41
+ .filter((token) => {
42
+ let isColor = true;
43
+ nonColorTokens.forEach((t) => {
44
+ if (token.name.includes(t)) {
45
+ isColor = false;
46
+ }
47
+ });
48
+ return isColor;
49
+ })
34
50
  .map((token) => {
35
51
  let value = token.value;
36
52
  let name = `${token.name.replace("-default", "")}`;
37
53
  return ` ${name}: ${value},`;
38
54
  })
39
55
  .join(`\n`);
56
+
40
57
  const dark = dictionary.allTokens
41
- .filter((token) => !token.name.includes("font-family"))
58
+ .filter((token) => {
59
+ let isColor = true;
60
+ nonColorTokens.forEach((t) => {
61
+ if (token.name.includes(t)) {
62
+ isColor = false;
63
+ }
64
+ });
65
+ return isColor;
66
+ })
42
67
  .map((token) => {
43
68
  let value = token.value;
44
69
  let name = `${token.name.replace("-default", "")}`;
@@ -49,7 +74,51 @@ StyleDictionary.registerFormat({
49
74
  })
50
75
  .join(`\n`);
51
76
 
52
- return [`$light: (`, light, `);`, `$dark: (`, dark, `);`].join(`\n`);
77
+ const nonColor = dictionary.allTokens
78
+ .filter((token) => {
79
+ let isColor = true;
80
+ nonColorTokens.forEach((t) => {
81
+ if (token.name.includes(t)) {
82
+ isColor = false;
83
+ }
84
+ });
85
+ if (token.name.includes("font-family")) return false;
86
+ return !isColor;
87
+ })
88
+ .map((token) => {
89
+ let value = token.value;
90
+ let name = `${token.name.replace("-default", "")}`;
91
+ return ` ${name}: ${value},`;
92
+ })
93
+ .join(`\n`);
94
+
95
+ return [
96
+ `$light: (`,
97
+ light,
98
+ `);`,
99
+ `$dark: (`,
100
+ dark,
101
+ `);`,
102
+ `$nonColor: (`,
103
+ nonColor,
104
+ `);`,
105
+ ].join(`\n`);
106
+ },
107
+ });
108
+
109
+ StyleDictionary.registerFormat({
110
+ name: `custom/primitive-variables`,
111
+ formatter: function ({ dictionary }) {
112
+ const vars = dictionary.allTokens
113
+ .filter((token) => !token.name.includes("font-family"))
114
+ .map((token) => {
115
+ let value = token.value;
116
+ let name = `${token.name.replace("-default", "")}`;
117
+ return ` ${name}: ${value},`;
118
+ })
119
+ .join(`\n`);
120
+
121
+ return [`$token: (`, vars, `);`].join(`\n`);
53
122
  },
54
123
  });
55
124
 
@@ -259,6 +328,13 @@ themes.forEach((theme) => {
259
328
  return token.filePath.startsWith("src/global/primitive");
260
329
  },
261
330
  },
331
+ {
332
+ destination: "primitive-variables.scss",
333
+ format: "custom/primitive-variables",
334
+ filter: function (token) {
335
+ return token.filePath.startsWith("src/global/primitive");
336
+ },
337
+ },
262
338
  {
263
339
  destination: "semantic.scss",
264
340
  format: "custom/SCSSVariable",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/hammer-token",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "build/web/index.js",
6
6
  "types": "build/web/index.d.ts",
@@ -21,5 +21,5 @@
21
21
  "fs-extra": "^11.2.0",
22
22
  "style-dictionary": "^3"
23
23
  },
24
- "gitHead": "67ec1c21583e12f47579ca8d507cdd0bcf3e40fb"
24
+ "gitHead": "428df250fb65ed7b11a974643a7c16fe7db0670d"
25
25
  }