@servicetitan/hammer-token 1.3.3 → 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.2 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
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @servicetitan/hammer-token@1.3.2 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,17 @@
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
+
1
15
  # v1.3.3 (Tue Oct 29 2024)
2
16
 
3
17
  #### 🐛 Bug Fix
@@ -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,35 @@ 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`);
53
106
  },
54
107
  });
55
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/hammer-token",
3
- "version": "1.3.3",
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": "6de57636c71cb81ce85b7d33cf2c40def5b507fa"
24
+ "gitHead": "428df250fb65ed7b11a974643a7c16fe7db0670d"
25
25
  }