@ni/nimble-tokens 1.0.0-beta.3 → 1.0.0-beta.30

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 (156) hide show
  1. package/README.md +1 -1
  2. package/dist/styledictionary/css/variables.css +84 -27
  3. package/dist/styledictionary/js/tokens.d.ts +81 -24
  4. package/dist/styledictionary/js/tokens.js +84 -27
  5. package/dist/styledictionary/properties/colors.json +59 -29
  6. package/dist/styledictionary/properties/custom.json +10 -1
  7. package/dist/styledictionary/properties/fonts.json +177 -12
  8. package/dist/styledictionary/scss/variables.scss +34 -22
  9. package/dist-icons/nimble-icons-inline.ts +1185 -0
  10. package/dist-icons-esm/nimble-icons-inline.d.ts +594 -0
  11. package/dist-icons-esm/nimble-icons-inline.js +590 -0
  12. package/dist-icons-esm/nimble-icons-inline.js.map +1 -0
  13. package/package.json +22 -9
  14. package/source/source-sans-pro-font-face.css +1 -0
  15. package/source/space-mono-font-face.css +1 -0
  16. package/.eslintignore +0 -2
  17. package/.eslintrc.js +0 -8
  18. package/CHANGELOG.json +0 -50
  19. package/CHANGELOG.md +0 -29
  20. package/CONTRIBUTING.md +0 -37
  21. package/assets/07a3faf7-fd3e-46cb-adba-766a1c1dcae0.svg +0 -17
  22. package/assets/07b310d0-c934-4a87-b472-2c0d13f5ef03.svg +0 -12
  23. package/assets/0da2792a-8a08-41b8-aab7-1f47ab48bcaa.svg +0 -70
  24. package/assets/13df70dd-cea3-4c44-b2e5-f520704119dc.svg +0 -17
  25. package/assets/15b14701-45f8-4823-b134-007afecffea6.svg +0 -17
  26. package/assets/1b763752-ecc1-4f18-b3ea-cd1359a41c27.svg +0 -70
  27. package/assets/1d367b3e-80f2-4ba6-909c-1fd0a341cfa7.svg +0 -17
  28. package/assets/1ee0fb8d-dbaa-43d0-9045-c3b518ebba8c.svg +0 -17
  29. package/assets/294b1562-49f4-4889-9064-0ce36f0adf5d.svg +0 -41
  30. package/assets/31040246-acc1-400d-b307-3a920cd5ae19.svg +0 -14
  31. package/assets/350eb02c-8f47-4481-9c5a-268397a504c9.svg +0 -20
  32. package/assets/4422f867-e550-4239-8cae-9e78ebc46534.svg +0 -43
  33. package/assets/444efdbd-83a4-4ec9-9e5e-583bddaf471c.svg +0 -17
  34. package/assets/44b6f641-bd20-4586-8bad-29426974ccf0.svg +0 -21
  35. package/assets/45ca93fb-672e-49f3-95fc-af223988dfcd.svg +0 -63
  36. package/assets/45dadb7e-851b-4e85-a15c-57abad04d078.svg +0 -29
  37. package/assets/45dc73de-606f-44e8-9f47-ded9c75546d2.svg +0 -25
  38. package/assets/45f9f762-a72e-4dfe-bb83-6b21787232e3.svg +0 -14
  39. package/assets/47090578-555f-4ca7-8f8b-e078b868e083.svg +0 -17
  40. package/assets/4faf1194-2140-41a5-90cf-74b985d3bfde.svg +0 -25
  41. package/assets/503b5fb3-106f-489c-851e-260d1675891a.svg +0 -39
  42. package/assets/59c1a5ba-6aea-4b61-9195-9a53f1c6f14a.svg +0 -20
  43. package/assets/5f65cd95-07ad-49cd-bd0a-1126fa4f1516.svg +0 -76
  44. package/assets/680fa47f-8866-48c8-91d4-109f46f92ef4.svg +0 -5
  45. package/assets/689e5ee3-fdf9-4726-87c7-5d26a8a50b27.svg +0 -20
  46. package/assets/6fd5e681-4c51-49c7-85f8-f6641beddb2e.svg +0 -43
  47. package/assets/7657a1f9-45c6-48fc-ac6b-d8b3d0d2d727.svg +0 -44
  48. package/assets/7b223a3b-1fa7-4942-b743-3ac26d4e70b6.svg +0 -58
  49. package/assets/7c280212-0437-406c-ad6c-9148113908ac.svg +0 -12
  50. package/assets/7d12ca9b-051e-486c-9273-f93e2f045345.svg +0 -16
  51. package/assets/7d9c924c-f4bf-40b9-af9c-94e20fe5fedc.svg +0 -58
  52. package/assets/86273dff-35a5-4577-bab7-fb55c8d44946.svg +0 -10
  53. package/assets/8868cb1c-1c5c-4dee-b8ba-44ee211fa631.svg +0 -55
  54. package/assets/8ab77a3a-8dd8-4e08-93c5-7edbdea6bebc.svg +0 -22
  55. package/assets/9228adcd-ff1c-4b8d-86bd-eee3e6865e39.svg +0 -12
  56. package/assets/97d79d16-16f9-4417-b2f0-4518c36a256e.svg +0 -13
  57. package/assets/a6943366-ffbb-43a0-8920-24e2dc22a32c.svg +0 -11
  58. package/assets/ab39213b-ad52-4911-a47a-4e18adbfcbdf.svg +0 -22
  59. package/assets/ae673db5-9074-4c62-b52f-bf4d87653fec.svg +0 -12
  60. package/assets/b20eec4f-9ad7-4e3f-9b59-70dda0165db2.svg +0 -37
  61. package/assets/b60b4134-c6cf-4fb3-b638-53fca9648b1b.svg +0 -21
  62. package/assets/c1fdba14-2048-409d-b0ff-1111b2dfb355.svg +0 -17
  63. package/assets/c67ec7fa-cba9-4cad-bdcd-eba96e2121b3.svg +0 -16
  64. package/assets/d03e6c35-8189-46e0-9d92-cfbbbe07f784.svg +0 -11
  65. package/assets/da001f42-f004-4e35-850f-8e95b613d17b.svg +0 -40
  66. package/assets/daee20ae-a68b-49bd-af7e-90441484b3f3.svg +0 -30
  67. package/assets/db1e2f71-de7e-49c4-a5c1-340757a675e8.svg +0 -62
  68. package/assets/db613125-8706-4039-9909-fed0155a70e3.svg +0 -28
  69. package/assets/dd94da99-06ae-4d73-86a4-b3e92c1ab68c.svg +0 -19
  70. package/assets/e37af219-833a-4dbc-9b13-fb4874763aca.svg +0 -87
  71. package/assets/e42273e3-45e1-4845-9e7c-d889bc215c12.svg +0 -32
  72. package/assets/eb0f7a71-265a-4330-a5c3-a0d35286a1ca.svg +0 -17
  73. package/assets/ebd21d0d-3f7e-4bf5-89d5-097c734d7e30.svg +0 -33
  74. package/assets/f54fe140-abf6-497e-9020-a63600e4fb48.svg +0 -17
  75. package/assets/fea67c6c-5998-4a28-9395-80cd978f2c2e.svg +0 -87
  76. package/assets-icons/ActiveAlarm_40x40.svg +0 -1
  77. package/assets-icons/ActiveJobs_40x40.svg +0 -1
  78. package/assets-icons/AlarmActiveAcknowledged_16x16.svg +0 -1
  79. package/assets-icons/AlarmActive_16x16.svg +0 -1
  80. package/assets-icons/AlarmInactive_16x16.svg +0 -5
  81. package/assets-icons/AlarmNotes_16x16.svg +0 -7
  82. package/assets-icons/Alarm_16x16.svg +0 -10
  83. package/assets-icons/AlarmsAndNotifications_40x40.svg +0 -15
  84. package/assets-icons/AssetManager_40x40.svg +0 -7
  85. package/assets-icons/Blocked_16x16.svg +0 -8
  86. package/assets-icons/BrowseFolder_16x16.svg +0 -1
  87. package/assets-icons/Calibration_16x16.svg +0 -1
  88. package/assets-icons/CloudConnector_40x40.svg +0 -13
  89. package/assets-icons/Connected_16x16.svg +0 -1
  90. package/assets-icons/CopyText_16x16.svg +0 -7
  91. package/assets-icons/CreateNew_40x40.svg +0 -1
  92. package/assets-icons/DashboardBuilder_40x40.svg +0 -1
  93. package/assets-icons/Details_16x16.svg +0 -1
  94. package/assets-icons/DevicesAndInterfaces_40x40.svg +0 -1
  95. package/assets-icons/Devices_16x16.svg +0 -1
  96. package/assets-icons/Disconnected_16x16.svg +0 -1
  97. package/assets-icons/DiscoveredSystem_40x40.svg +0 -1
  98. package/assets-icons/DownArrow.svg +0 -7
  99. package/assets-icons/Edit_16x16.svg +0 -10
  100. package/assets-icons/Fail_16x16.svg +0 -1
  101. package/assets-icons/FileViewer_40x40.svg +0 -1
  102. package/assets-icons/Filter_16x16.svg +0 -1
  103. package/assets-icons/HealthMonitoring_40x40.svg +0 -1
  104. package/assets-icons/Help_16x16.svg +0 -13
  105. package/assets-icons/History_40x40.svg +0 -1
  106. package/assets-icons/Home_16x16.svg +0 -1
  107. package/assets-icons/Import_40x40.svg +0 -1
  108. package/assets-icons/InSecure_16x16.svg +0 -7
  109. package/assets-icons/Information_16x16.svg +0 -9
  110. package/assets-icons/IntermediateSelection_16x16.svg +0 -8
  111. package/assets-icons/Key_16x16.svg +0 -10
  112. package/assets-icons/LegendView_16x16.svg +0 -7
  113. package/assets-icons/Locked_16x16.svg +0 -7
  114. package/assets-icons/ManagedSystems_40x40.svg +0 -1
  115. package/assets-icons/MergedView_16x16.svg +0 -6
  116. package/assets-icons/NetworkSettings_40x40.svg +0 -1
  117. package/assets-icons/OpcUa_40x40.svg +0 -16
  118. package/assets-icons/PendingApproval_40x40.svg +0 -1
  119. package/assets-icons/PluginsBrowser_40x40.svg +0 -16
  120. package/assets-icons/Project_40x40.svg +0 -1
  121. package/assets-icons/Refresh_16x16.svg +0 -1
  122. package/assets-icons/RepositoryManager_40x40.svg +0 -1
  123. package/assets-icons/Secure_16x16.svg +0 -7
  124. package/assets-icons/Software_40x40.svg +0 -1
  125. package/assets-icons/Succeeded_16x16.svg +0 -1
  126. package/assets-icons/SystemManager_40x40.svg +0 -1
  127. package/assets-icons/SystemStateManager_40x40.svg +0 -47
  128. package/assets-icons/TagViewer_40x40.svg +0 -1
  129. package/assets-icons/TdmsBooleanChannel_16x16.svg +0 -8
  130. package/assets-icons/TdmsChannelGroup_16x16.svg +0 -9
  131. package/assets-icons/TdmsFile_16x16.svg +0 -8
  132. package/assets-icons/TdmsNumericChannel_16x16.svg +0 -8
  133. package/assets-icons/TdmsStringChannel_16x16.svg +0 -12
  134. package/assets-icons/TdmsTimeChannel_16x16.svg +0 -11
  135. package/assets-icons/TdmsWaveformChannel_16x16.svg +0 -12
  136. package/assets-icons/TestMonitor_40x40.svg +0 -1
  137. package/assets-icons/TileDashboard_40x40.svg +0 -10
  138. package/assets-icons/TimeSettings_40x40.svg +0 -1
  139. package/assets-icons/TreeView_16x16.svg +0 -6
  140. package/assets-icons/UpArrow.svg +0 -7
  141. package/assets-icons/Warning_16x16.svg +0 -7
  142. package/assets-icons/WebVI_40x40.svg +0 -1
  143. package/data/components.json +0 -997
  144. package/data/docs.json +0 -17
  145. package/data/fonts.json +0 -185
  146. package/data/tokens.json +0 -315
  147. package/dist/styledictionary/config.js +0 -395
  148. package/dist/styledictionary/nimble-extensions.js +0 -11
  149. package/dsp.json +0 -210
  150. package/source/build/.eslintrc.js +0 -6
  151. package/source/build/font-icon-build.js +0 -23
  152. package/source/build/templates/_{{filename}}-font-classes.ts +0 -12
  153. package/source/build/templates/_{{filename}}-font-face.css +0 -7
  154. package/source/build/templates/_{{filename}}.css +0 -17
  155. package/source/build/templates/_{{filename}}.scss +0 -18
  156. package/tsconfig.json +0 -25
@@ -1,395 +0,0 @@
1
- const StyleDictionary = require('style-dictionary');
2
-
3
- module.exports = {
4
- "source": [
5
- "properties/colors.json",
6
- "properties/fonts.json",
7
- "properties/custom.json",
8
- "properties/sizes.json"
9
- ],
10
- "platforms": {
11
- "css": {
12
- "files": [
13
- {
14
- "destination": "variables.css",
15
- "format": "css/variables"
16
- }
17
- ],
18
- "transformGroup": "css",
19
- "buildPath": "css/"
20
- },
21
- "js": {
22
- "files": [
23
- {
24
- "destination": "tokens.js",
25
- "format": "javascript/es6"
26
- }
27
- ],
28
- "transformGroup": "js",
29
- "buildPath": "js/"
30
- },
31
- "scss": {
32
- "files": [
33
- {
34
- "destination": "variables.scss",
35
- "format": "scss/variables"
36
- }
37
- ],
38
- "transformGroup": "scss",
39
- "buildPath": "scss/"
40
- }
41
- }
42
- };
43
-
44
- //Lodash code inlined so we don't have to import another library
45
-
46
- //getTag.js
47
- /**
48
- * Gets the `toStringTag` of `value`.
49
- *
50
- * @private
51
- * @param {*} value The value to query.
52
- * @returns {string} Returns the `toStringTag`.
53
- */
54
- function getTag(value) {
55
- if (value == null) {
56
- return value === undefined ? '[object Undefined]' : '[object Null]'
57
- }
58
- return toString.call(value)
59
- }
60
-
61
- //isSymbol.js
62
- /**
63
- * Checks if `value` is classified as a `Symbol` primitive or object.
64
- *
65
- * @since 4.0.0
66
- * @category Lang
67
- * @param {*} value The value to check.
68
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
69
- * @example
70
- *
71
- * isSymbol(Symbol.iterator)
72
- * // => true
73
- *
74
- * isSymbol('abc')
75
- * // => false
76
- */
77
- function isSymbol(value) {
78
- const type = typeof value
79
- return type == 'symbol' || (type === 'object' && value != null && getTag(value) == '[object Symbol]')
80
- }
81
-
82
- //toString.js
83
- /** Used as references for various `Number` constants. */
84
- const INFINITY = 1 / 0
85
-
86
- /**
87
- * Converts `value` to a string. An empty string is returned for `null`
88
- * and `undefined` values. The sign of `-0` is preserved.
89
- *
90
- * @since 4.0.0
91
- * @category Lang
92
- * @param {*} value The value to convert.
93
- * @returns {string} Returns the converted string.
94
- * @example
95
- *
96
- * toString(null)
97
- * // => ''
98
- *
99
- * toString(-0)
100
- * // => '-0'
101
- *
102
- * toString([1, 2, 3])
103
- * // => '1,2,3'
104
- */
105
- function toString2(value) {
106
- if (value == null) {
107
- return ''
108
- }
109
- // Exit early for strings to avoid a performance hit in some environments.
110
- if (typeof value === 'string') {
111
- return value
112
- }
113
- if (Array.isArray(value)) {
114
- // Recursively convert values (susceptible to call stack limits).
115
- return `${value.map((other) => other == null ? other : toString2(other))}`
116
- }
117
- if (isSymbol(value)) {
118
- return value.toString()
119
- }
120
- const result = `${value}`
121
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result
122
- }
123
-
124
- //unicodeWords.js
125
- /** Used to compose unicode character classes. */
126
- const rsAstralRange = '\\ud800-\\udfff'
127
- const rsComboMarksRange = '\\u0300-\\u036f'
128
- const reComboHalfMarksRange = '\\ufe20-\\ufe2f'
129
- const rsComboSymbolsRange = '\\u20d0-\\u20ff'
130
- const rsComboMarksExtendedRange = '\\u1ab0-\\u1aff'
131
- const rsComboMarksSupplementRange = '\\u1dc0-\\u1dff'
132
- const rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange
133
- const rsDingbatRange = '\\u2700-\\u27bf'
134
- const rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff'
135
- const rsMathOpRange = '\\xac\\xb1\\xd7\\xf7'
136
- const rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf'
137
- const rsPunctuationRange = '\\u2000-\\u206f'
138
- const rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000'
139
- const rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde'
140
- const rsVarRange = '\\ufe0e\\ufe0f'
141
- const rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange
142
-
143
- /** Used to compose unicode capture groups. */
144
- const rsApos = "['\u2019]"
145
- const rsBreak = `[${rsBreakRange}]`
146
- const rsCombo = `[${rsComboRange}]`
147
- const rsDigit = '\\d'
148
- const rsDingbat = `[${rsDingbatRange}]`
149
- const rsLower = `[${rsLowerRange}]`
150
- const rsMisc = `[^${rsAstralRange}${rsBreakRange + rsDigit + rsDingbatRange + rsLowerRange + rsUpperRange}]`
151
- const rsFitz = '\\ud83c[\\udffb-\\udfff]'
152
- const rsModifier = `(?:${rsCombo}|${rsFitz})`
153
- const rsNonAstral = `[^${rsAstralRange}]`
154
- const rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'
155
- const rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'
156
- const rsUpper = `[${rsUpperRange}]`
157
- const rsZWJ = '\\u200d'
158
-
159
- /** Used to compose unicode regexes. */
160
- const rsMiscLower = `(?:${rsLower}|${rsMisc})`
161
- const rsMiscUpper = `(?:${rsUpper}|${rsMisc})`
162
- const rsOptContrLower = `(?:${rsApos}(?:d|ll|m|re|s|t|ve))?`
163
- const rsOptContrUpper = `(?:${rsApos}(?:D|LL|M|RE|S|T|VE))?`
164
- const reOptMod = `${rsModifier}?`
165
- const rsOptVar = `[${rsVarRange}]?`
166
- const rsOptJoin = `(?:${rsZWJ}(?:${[rsNonAstral, rsRegional, rsSurrPair].join('|')})${rsOptVar + reOptMod})*`
167
- const rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])'
168
- const rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])'
169
- const rsSeq = rsOptVar + reOptMod + rsOptJoin
170
- const rsEmoji = `(?:${[rsDingbat, rsRegional, rsSurrPair].join('|')})${rsSeq}`
171
-
172
- const reUnicodeWords = RegExp([
173
- `${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak, rsUpper, '$'].join('|')})`,
174
- `${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak, rsUpper + rsMiscLower, '$'].join('|')})`,
175
- `${rsUpper}?${rsMiscLower}+${rsOptContrLower}`,
176
- `${rsUpper}+${rsOptContrUpper}`,
177
- rsOrdUpper,
178
- rsOrdLower,
179
- `${rsDigit}+`,
180
- rsEmoji
181
- ].join('|'), 'g')
182
-
183
- /**
184
- * Splits a Unicode `string` into an array of its words.
185
- *
186
- * @private
187
- * @param {string} The string to inspect.
188
- * @returns {Array} Returns the words of `string`.
189
- */
190
- function unicodeWords(string) {
191
- return string.match(reUnicodeWords)
192
- }
193
-
194
- //words.js
195
- const hasUnicodeWord = RegExp.prototype.test.bind(
196
- /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/
197
- )
198
-
199
- /** Used to match words composed of alphanumeric characters. */
200
- const reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g
201
-
202
- function asciiWords(string) {
203
- return string.match(reAsciiWord)
204
- }
205
-
206
- /**
207
- * Splits `string` into an array of its words.
208
- *
209
- * @since 3.0.0
210
- * @category String
211
- * @param {string} [string=''] The string to inspect.
212
- * @param {RegExp|string} [pattern] The pattern to match words.
213
- * @returns {Array} Returns the words of `string`.
214
- * @example
215
- *
216
- * words('fred, barney, & pebbles')
217
- * // => ['fred', 'barney', 'pebbles']
218
- *
219
- * words('fred, barney, & pebbles', /[^, ]+/g)
220
- * // => ['fred', 'barney', '&', 'pebbles']
221
- */
222
- function words(string, pattern) {
223
- if (pattern === undefined) {
224
- const result = hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string)
225
- return result || []
226
- }
227
- return string.match(pattern) || []
228
- }
229
-
230
- //kebabCase.js, snakeCase.js, and camelCase.js
231
- const kebabCase = (string) => (
232
- words(toString2(string).replace(/['\u2019]/g, '')).reduce((result, word, index) => (
233
- result + (index ? '-' : '') + word.toLowerCase()
234
- ), '')
235
- )
236
-
237
- const snakeCase = (string) => (
238
- words(toString2(string).replace(/['\u2019]/g, '')).reduce((result, word, index) => (
239
- result + (index ? '_' : '') + word.toLowerCase()
240
- ), '')
241
- )
242
-
243
- const camelCase = (string) => (
244
- words(toString2(string).replace(/['\u2019]/g, '')).reduce((result, word, index) => {
245
- word = word.toLowerCase()
246
- return result + (index ? upperFirst(word) : word)
247
- }, '')
248
- )
249
-
250
- // custom utils
251
- const upperFirst = function (string) {
252
- if (string) {
253
- return string.substr(0, 1).toUpperCase().concat(string.slice(1));
254
- } else {
255
- return '';
256
- }
257
- }
258
-
259
- const getTokenNameFromProperty = function (prop) {
260
- if (prop.attributes.category === 'size' && prop.attributes.type === 'font') {
261
- return prop.path.slice(2, prop.path.length).join(' ').concat(' size');
262
- } else {
263
- return prop.path.slice(1, prop.path.length).join(' ');
264
- }
265
- }
266
-
267
- // Custom name transforms to remove category
268
- StyleDictionary.registerTransform({
269
- name: 'name/dsp/kebab',
270
- type: 'name',
271
- matcher: function (prop) {
272
- return true;
273
- },
274
- transformer: function (prop) {
275
- return kebabCase(getTokenNameFromProperty(prop));
276
- }
277
- });
278
-
279
- StyleDictionary.registerTransform({
280
- name: 'name/dsp/camel',
281
- type: 'name',
282
- matcher: function (prop) {
283
- return true;
284
- },
285
- transformer: function (prop) {
286
- return camelCase(getTokenNameFromProperty(prop));
287
- }
288
- });
289
-
290
- StyleDictionary.registerTransform({
291
- name: 'name/dsp/snake',
292
- type: 'name',
293
- matcher: function (prop) {
294
- return true;
295
- },
296
- transformer: function (prop) {
297
- return snakeCase(getTokenNameFromProperty(prop));
298
- }
299
- });
300
-
301
- StyleDictionary.registerTransform({
302
- name: 'name/dsp/pascal',
303
- type: 'name',
304
- matcher: function (prop) {
305
- return true;
306
- },
307
- transformer: function (prop) {
308
- return upperFirst(camelCase(getTokenNameFromProperty(prop)));
309
- }
310
- });
311
-
312
- // Override default transform groups with custom name transform
313
- StyleDictionary.registerTransformGroup({
314
- name: 'css',
315
- transforms: [
316
- 'attribute/cti',
317
- 'name/dsp/kebab', //replaces 'name/cti/kebab',
318
- 'time/seconds',
319
- 'content/icon',
320
- 'size/rem',
321
- 'color/css'
322
- ]
323
- });
324
-
325
- StyleDictionary.registerTransformGroup({
326
- name: 'scss',
327
- transforms: [
328
- 'attribute/cti',
329
- 'name/dsp/kebab', //replaces 'name/cti/kebab',
330
- 'time/seconds',
331
- 'content/icon',
332
- 'size/rem',
333
- 'color/css',
334
- ]
335
- });
336
-
337
- StyleDictionary.registerTransformGroup({
338
- name: 'android',
339
- transforms: [
340
- 'attribute/cti',
341
- 'name/dsp/snake', //replaces 'name/cti/snake',
342
- 'color/hex8android',
343
- 'size/remToSp',
344
- 'size/remToDp',
345
- ]
346
- });
347
-
348
- StyleDictionary.registerTransformGroup({
349
- name: 'ios',
350
- transforms: [
351
- 'attribute/cti',
352
- 'name/dsp/pascal', //replaces 'name/cti/pascal',
353
- 'color/UIColor',
354
- 'content/objC/literal',
355
- 'asset/objC/literal',
356
- 'size/remToPt',
357
- 'font/objC/literal',
358
- ]
359
- });
360
-
361
- StyleDictionary.registerTransformGroup({
362
- name: 'ios-swift',
363
- transforms: [
364
- 'attribute/cti',
365
- 'name/dsp/camel', //replaces 'name/cti/camel',
366
- 'color/UIColorSwift',
367
- 'content/swift/literal',
368
- 'asset/swift/literal',
369
- 'size/swift/remToCGFloat',
370
- 'font/swift/literal',
371
- ]
372
- });
373
-
374
- StyleDictionary.registerTransformGroup({
375
- name: 'js',
376
- transforms: [
377
- 'attribute/cti',
378
- 'name/dsp/pascal', //replaces 'name/cti/pascal',
379
- 'size/rem',
380
- 'color/hex',
381
- ]
382
- });
383
-
384
- StyleDictionary.registerTransformGroup({
385
- name: 'flutter',
386
- transforms: [
387
- 'attribute/cti',
388
- 'name/dsp/camel', //replaces 'name/cti/camel',
389
- 'color/hex8flutter',
390
- 'size/flutter/remToDouble',
391
- 'content/flutter/literal',
392
- 'asset/flutter/literal',
393
- 'font/flutter/literal',
394
- ]
395
- });
@@ -1,11 +0,0 @@
1
- const config = require('./config');
2
-
3
- // Workaround to include TypeScript definitions in output.
4
- // See: https://github.com/AdobeXD/design-system-package-dsp/issues/22
5
-
6
- config.platforms.js.files.push({
7
- "destination": "tokens.d.ts",
8
- "format": "typescript/es6-declarations"
9
- });
10
-
11
- module.exports = config;
package/dsp.json DELETED
@@ -1,210 +0,0 @@
1
- {
2
- "dsp_spec_version": "0.0.1",
3
- "last_updated_by": "",
4
- "last_updated": "2021-06-04T21:53:51.125Z",
5
- "settings": {
6
- "name": "nimble-tokens-dsp",
7
- "package_version": "0.0.1",
8
- "build_tool": "StyleDictionary",
9
- "snippet_trigger_prefix": "nim_",
10
- "build_status_label": "dev",
11
- "build_params": "./nimble-extensions.js",
12
- "languages": [
13
- {
14
- "label": "Coffeescript",
15
- "export_tokens": false,
16
- "snippet_id": "coffeescript",
17
- "syntax": "text/x-coffeescript"
18
- },
19
- {
20
- "label": "C",
21
- "export_tokens": false,
22
- "snippet_id": "c",
23
- "syntax": "text/x-csrc"
24
- },
25
- {
26
- "label": "C#",
27
- "export_tokens": false,
28
- "snippet_id": "csharp",
29
- "syntax": "text/x-csharp"
30
- },
31
- {
32
- "label": "CSS",
33
- "export_tokens": true,
34
- "snippet_id": "css",
35
- "syntax": "text/css",
36
- "ext-com_adobe_xd-styledictionary_id": "css"
37
- },
38
- {
39
- "label": "Flutter (Dart)",
40
- "export_tokens": false,
41
- "snippet_id": "dart",
42
- "syntax": "application/vnd.dart",
43
- "ext-com_adobe_xd-styledictionary_id": "flutter"
44
- },
45
- {
46
- "label": "F#",
47
- "export_tokens": false,
48
- "snippet_id": "fsharp",
49
- "syntax": "text/x-csharp"
50
- },
51
- {
52
- "label": "Go",
53
- "export_tokens": false,
54
- "snippet_id": "go",
55
- "syntax": "text/x-go"
56
- },
57
- {
58
- "label": "Groovy",
59
- "export_tokens": false,
60
- "snippet_id": "groovy",
61
- "syntax": "text/x-groovy"
62
- },
63
- {
64
- "label": "Handlebars",
65
- "export_tokens": false,
66
- "snippet_id": "handlebars",
67
- "syntax": "text/x-handlebars-template"
68
- },
69
- {
70
- "label": "HTML",
71
- "export_tokens": false,
72
- "snippet_id": "html",
73
- "syntax": "text/html"
74
- },
75
- {
76
- "label": "Android (Java)",
77
- "export_tokens": false,
78
- "snippet_id": "java",
79
- "syntax": "text/x-java",
80
- "ext-com_adobe_xd-styledictionary_id": "android"
81
- },
82
- {
83
- "label": "JavaScript",
84
- "export_tokens": true,
85
- "snippet_id": "javascript",
86
- "syntax": "text/javascript",
87
- "ext-com_adobe_xd-styledictionary_id": "js"
88
- },
89
- {
90
- "label": "JavaScript React",
91
- "export_tokens": false,
92
- "snippet_id": "javascriptreact",
93
- "syntax": "text/jsx"
94
- },
95
- {
96
- "label": "Less",
97
- "export_tokens": false,
98
- "snippet_id": "less",
99
- "syntax": "text/x-less"
100
- },
101
- {
102
- "label": "Lua",
103
- "export_tokens": false,
104
- "snippet_id": "lua",
105
- "syntax": "text/x-lua"
106
- },
107
- {
108
- "label": "iOS (Objective-C)",
109
- "export_tokens": false,
110
- "snippet_id": "objective-c",
111
- "syntax": "text/x-objectivec",
112
- "ext-com_adobe_xd-styledictionary_id": "ios"
113
- },
114
- {
115
- "label": "Objective-C++",
116
- "export_tokens": false,
117
- "snippet_id": "objective-cpp",
118
- "syntax": "text/x-c++src"
119
- },
120
- {
121
- "label": "Pug",
122
- "export_tokens": false,
123
- "snippet_id": "jade",
124
- "syntax": "text/html"
125
- },
126
- {
127
- "label": "Python",
128
- "export_tokens": false,
129
- "snippet_id": "python",
130
- "syntax": "text/x-python"
131
- },
132
- {
133
- "label": "Razor (cshtml)",
134
- "export_tokens": false,
135
- "snippet_id": "razor",
136
- "syntax": "text/x-csharp"
137
- },
138
- {
139
- "label": "Ruby",
140
- "export_tokens": false,
141
- "snippet_id": "ruby",
142
- "syntax": "text/x-ruby"
143
- },
144
- {
145
- "label": "Rust",
146
- "export_tokens": false,
147
- "snippet_id": "rust",
148
- "syntax": "text/x-rustsrc"
149
- },
150
- {
151
- "label": "SCSS",
152
- "export_tokens": true,
153
- "snippet_id": "scss",
154
- "syntax": "text/x-sass",
155
- "ext-com_adobe_xd-styledictionary_id": "scss"
156
- },
157
- {
158
- "label": "SASS",
159
- "export_tokens": false,
160
- "snippet_id": "sass",
161
- "syntax": "text/x-sass"
162
- },
163
- {
164
- "label": "ShaderLab",
165
- "export_tokens": false,
166
- "snippet_id": "shaderlab",
167
- "syntax": "text/x-vertex"
168
- },
169
- {
170
- "label": "iOS (Swift)",
171
- "export_tokens": false,
172
- "snippet_id": "swift",
173
- "syntax": "text/x-swift",
174
- "ext-com_adobe_xd-styledictionary_id": "ios-swift"
175
- },
176
- {
177
- "label": "TypeScript",
178
- "export_tokens": false,
179
- "snippet_id": "typescript",
180
- "syntax": "text/typescript"
181
- },
182
- {
183
- "label": "TypeScript React",
184
- "export_tokens": false,
185
- "snippet_id": "typescriptreact",
186
- "syntax": "text/typescript-jsx"
187
- },
188
- {
189
- "label": "Markdown",
190
- "export_tokens": false,
191
- "snippet_id": "markdown",
192
- "syntax": "text/x-markdown"
193
- }
194
- ]
195
- },
196
- "import": [
197
- {
198
- "src": "data/tokens.json"
199
- },
200
- {
201
- "src": "data/fonts.json"
202
- },
203
- {
204
- "src": "data/components.json"
205
- },
206
- {
207
- "src": "data/docs.json"
208
- }
209
- ]
210
- }
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- // Build scripts allowed to use devDependencies
4
- 'import/no-extraneous-dependencies': ['error', { devDependencies: true }]
5
- }
6
- };
@@ -1,23 +0,0 @@
1
- const svgtofont = require('svgtofont');
2
- const path = require('path');
3
- const process = require('process');
4
- // uncaughtException will already kill the process but unhandledRejection does not yet: https://github.com/nodejs/node/issues/20392
5
- process.on('unhandledRejection', error => {
6
- global.console.log(`[runner unhandled promise rejection]: ${error}`);
7
- process.exit(1);
8
- });
9
-
10
- (async () => {
11
- await svgtofont({
12
- src: path.resolve(__dirname, '../../assets-icons'),
13
- dist: path.resolve(__dirname, '../../dist-icons'),
14
- styleTemplates: path.resolve(__dirname, 'templates'),
15
- fontName: 'nimble-icons',
16
- emptyDist: true,
17
- css: true,
18
- outSVGReact: false,
19
- typescript: {
20
- extension: 'ts'
21
- }
22
- });
23
- })();
@@ -1,12 +0,0 @@
1
- const styleString = String.raw`
2
- [class^="{{prefix}}-"], [class*=" {{prefix}}-"] {
3
- font-family: '{{fontname}}' !important;
4
- font-size:{{fontSize}};
5
- font-style:normal;
6
- -webkit-font-smoothing: antialiased;
7
- -moz-osx-font-smoothing: grayscale;
8
- }
9
-
10
- {{cssString}}
11
- `;
12
- export default styleString;
@@ -1,7 +0,0 @@
1
- @font-face {
2
- font-family: "{{fontname}}";
3
-
4
- src: url("{{cssPath}}{{fontname}}.woff2?t={{timestamp}}") format("woff2"),
5
- url("{{cssPath}}{{fontname}}.woff?t={{timestamp}}") format("woff"),
6
- url('{{cssPath}}{{fontname}}.ttf?t={{timestamp}}') format('truetype');
7
- }
@@ -1,17 +0,0 @@
1
- @font-face {
2
- font-family: "{{fontname}}";
3
-
4
- src: url("{{cssPath}}{{fontname}}.woff2?t={{timestamp}}") format("woff2"),
5
- url("{{cssPath}}{{fontname}}.woff?t={{timestamp}}") format("woff"),
6
- url('{{cssPath}}{{fontname}}.ttf?t={{timestamp}}') format('truetype');
7
- }
8
-
9
- [class^="{{prefix}}-"], [class*=" {{prefix}}-"] {
10
- font-family: '{{fontname}}' !important;
11
- font-size:{{fontSize}};
12
- font-style:normal;
13
- -webkit-font-smoothing: antialiased;
14
- -moz-osx-font-smoothing: grayscale;
15
- }
16
-
17
- {{cssString}}