@ni/nimble-tokens 1.0.0-beta.8 → 2.0.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 (278) hide show
  1. package/README.md +59 -7
  2. package/assets-fonts/README.md +9 -0
  3. package/assets-fonts/Roboto-Regular.ttf +0 -0
  4. package/assets-fonts/Roboto-Regular.woff2 +0 -0
  5. package/assets-fonts/Roboto.LICENSE.txt +202 -0
  6. package/assets-fonts/SourceSansPro-Regular.woff2 +0 -0
  7. package/assets-fonts/SourceSansPro.LICENSE.txt +93 -0
  8. package/assets-fonts/SpaceMono-Regular.woff2 +0 -0
  9. package/assets-fonts/SpaceMono.LICENSE.txt +93 -0
  10. package/dist/styledictionary/css/variables.css +115 -36
  11. package/dist/styledictionary/js/tokens.d.ts +103 -24
  12. package/dist/styledictionary/js/tokens.js +106 -27
  13. package/dist/styledictionary/properties/colors.json +59 -29
  14. package/dist/styledictionary/properties/custom.json +10 -1
  15. package/dist/styledictionary/properties/fonts.json +259 -12
  16. package/dist/styledictionary/scss/variables.scss +115 -36
  17. package/dist-icons/nimble-icons-inline.ts +1145 -0
  18. package/dist-icons-esm/nimble-icons-inline.d.ts +574 -0
  19. package/dist-icons-esm/nimble-icons-inline.js +570 -0
  20. package/dist-icons-esm/nimble-icons-inline.js.map +1 -0
  21. package/package.json +21 -7
  22. package/source/fonts.css +26 -0
  23. package/.eslintignore +0 -2
  24. package/.eslintrc.js +0 -8
  25. package/CHANGELOG.json +0 -155
  26. package/CHANGELOG.md +0 -69
  27. package/CONTRIBUTING.md +0 -59
  28. package/assets/07a3faf7-fd3e-46cb-adba-766a1c1dcae0.svg +0 -17
  29. package/assets/07b310d0-c934-4a87-b472-2c0d13f5ef03.svg +0 -12
  30. package/assets/0da2792a-8a08-41b8-aab7-1f47ab48bcaa.svg +0 -70
  31. package/assets/13df70dd-cea3-4c44-b2e5-f520704119dc.svg +0 -17
  32. package/assets/15b14701-45f8-4823-b134-007afecffea6.svg +0 -17
  33. package/assets/1b763752-ecc1-4f18-b3ea-cd1359a41c27.svg +0 -70
  34. package/assets/1d367b3e-80f2-4ba6-909c-1fd0a341cfa7.svg +0 -17
  35. package/assets/1ee0fb8d-dbaa-43d0-9045-c3b518ebba8c.svg +0 -17
  36. package/assets/294b1562-49f4-4889-9064-0ce36f0adf5d.svg +0 -41
  37. package/assets/31040246-acc1-400d-b307-3a920cd5ae19.svg +0 -14
  38. package/assets/350eb02c-8f47-4481-9c5a-268397a504c9.svg +0 -20
  39. package/assets/4422f867-e550-4239-8cae-9e78ebc46534.svg +0 -43
  40. package/assets/444efdbd-83a4-4ec9-9e5e-583bddaf471c.svg +0 -17
  41. package/assets/44b6f641-bd20-4586-8bad-29426974ccf0.svg +0 -21
  42. package/assets/45ca93fb-672e-49f3-95fc-af223988dfcd.svg +0 -63
  43. package/assets/45dadb7e-851b-4e85-a15c-57abad04d078.svg +0 -29
  44. package/assets/45dc73de-606f-44e8-9f47-ded9c75546d2.svg +0 -25
  45. package/assets/45f9f762-a72e-4dfe-bb83-6b21787232e3.svg +0 -14
  46. package/assets/47090578-555f-4ca7-8f8b-e078b868e083.svg +0 -17
  47. package/assets/4faf1194-2140-41a5-90cf-74b985d3bfde.svg +0 -25
  48. package/assets/503b5fb3-106f-489c-851e-260d1675891a.svg +0 -39
  49. package/assets/59c1a5ba-6aea-4b61-9195-9a53f1c6f14a.svg +0 -20
  50. package/assets/5f65cd95-07ad-49cd-bd0a-1126fa4f1516.svg +0 -76
  51. package/assets/680fa47f-8866-48c8-91d4-109f46f92ef4.svg +0 -5
  52. package/assets/689e5ee3-fdf9-4726-87c7-5d26a8a50b27.svg +0 -20
  53. package/assets/6fd5e681-4c51-49c7-85f8-f6641beddb2e.svg +0 -43
  54. package/assets/7657a1f9-45c6-48fc-ac6b-d8b3d0d2d727.svg +0 -44
  55. package/assets/7b223a3b-1fa7-4942-b743-3ac26d4e70b6.svg +0 -58
  56. package/assets/7c280212-0437-406c-ad6c-9148113908ac.svg +0 -12
  57. package/assets/7d12ca9b-051e-486c-9273-f93e2f045345.svg +0 -16
  58. package/assets/7d9c924c-f4bf-40b9-af9c-94e20fe5fedc.svg +0 -58
  59. package/assets/86273dff-35a5-4577-bab7-fb55c8d44946.svg +0 -10
  60. package/assets/8868cb1c-1c5c-4dee-b8ba-44ee211fa631.svg +0 -55
  61. package/assets/8ab77a3a-8dd8-4e08-93c5-7edbdea6bebc.svg +0 -22
  62. package/assets/9228adcd-ff1c-4b8d-86bd-eee3e6865e39.svg +0 -12
  63. package/assets/97d79d16-16f9-4417-b2f0-4518c36a256e.svg +0 -13
  64. package/assets/a6943366-ffbb-43a0-8920-24e2dc22a32c.svg +0 -11
  65. package/assets/ab39213b-ad52-4911-a47a-4e18adbfcbdf.svg +0 -22
  66. package/assets/ae673db5-9074-4c62-b52f-bf4d87653fec.svg +0 -12
  67. package/assets/b20eec4f-9ad7-4e3f-9b59-70dda0165db2.svg +0 -37
  68. package/assets/b60b4134-c6cf-4fb3-b638-53fca9648b1b.svg +0 -21
  69. package/assets/c1fdba14-2048-409d-b0ff-1111b2dfb355.svg +0 -17
  70. package/assets/c67ec7fa-cba9-4cad-bdcd-eba96e2121b3.svg +0 -16
  71. package/assets/d03e6c35-8189-46e0-9d92-cfbbbe07f784.svg +0 -11
  72. package/assets/da001f42-f004-4e35-850f-8e95b613d17b.svg +0 -40
  73. package/assets/daee20ae-a68b-49bd-af7e-90441484b3f3.svg +0 -30
  74. package/assets/db1e2f71-de7e-49c4-a5c1-340757a675e8.svg +0 -62
  75. package/assets/db613125-8706-4039-9909-fed0155a70e3.svg +0 -28
  76. package/assets/dd94da99-06ae-4d73-86a4-b3e92c1ab68c.svg +0 -19
  77. package/assets/e37af219-833a-4dbc-9b13-fb4874763aca.svg +0 -87
  78. package/assets/e42273e3-45e1-4845-9e7c-d889bc215c12.svg +0 -32
  79. package/assets/eb0f7a71-265a-4330-a5c3-a0d35286a1ca.svg +0 -17
  80. package/assets/ebd21d0d-3f7e-4bf5-89d5-097c734d7e30.svg +0 -33
  81. package/assets/f54fe140-abf6-497e-9020-a63600e4fb48.svg +0 -17
  82. package/assets/fea67c6c-5998-4a28-9395-80cd978f2c2e.svg +0 -87
  83. package/assets-icons/AccessControl_16x16.svg +0 -1
  84. package/assets-icons/ActiveAlarm_40x40.svg +0 -1
  85. package/assets-icons/ActiveDirectory.svg +0 -1
  86. package/assets-icons/ActiveJobs_40x40.svg +0 -1
  87. package/assets-icons/Admin_16x16.svg +0 -1
  88. package/assets-icons/Administration_16x16.svg +0 -1
  89. package/assets-icons/Administration_V2_16x16.svg +0 -1
  90. package/assets-icons/Alarm16x16.svg +0 -1
  91. package/assets-icons/AlarmActiveAcknowledged_16x16.svg +0 -1
  92. package/assets-icons/AlarmActive_16x16.svg +0 -1
  93. package/assets-icons/AlarmInactive_16x16.svg +0 -1
  94. package/assets-icons/AlarmNotes_16x16.svg +0 -1
  95. package/assets-icons/AlarmsAndNotifications_16x16.svg +0 -1
  96. package/assets-icons/AlarmsAndNotifications_40x40.svg +0 -1
  97. package/assets-icons/AnalysisAutomation_40x40.svg +0 -1
  98. package/assets-icons/AssetManager_40x40.svg +0 -1
  99. package/assets-icons/Assets_16x16.svg +0 -1
  100. package/assets-icons/Blocked_16x16.svg +0 -1
  101. package/assets-icons/BrokenLink_16x16.svg +0 -1
  102. package/assets-icons/BrowseFolder_16x16.svg +0 -1
  103. package/assets-icons/Calendar_16x16.svg +0 -1
  104. package/assets-icons/Calibration_16x16.svg +0 -1
  105. package/assets-icons/CancelLink_16x16.svg +0 -1
  106. package/assets-icons/Chart_16x16.svg +0 -1
  107. package/assets-icons/Chart_40x40.svg +0 -1
  108. package/assets-icons/Clipboard_16x16.svg +0 -1
  109. package/assets-icons/Clock_16x16.svg +0 -1
  110. package/assets-icons/Close_16x16.svg +0 -1
  111. package/assets-icons/CloudConnectorSWIF_40X40.svg +0 -1
  112. package/assets-icons/Collapse_1_16x16.svg +0 -1
  113. package/assets-icons/Connected_16x16.svg +0 -1
  114. package/assets-icons/CopyText_16x16.svg +0 -1
  115. package/assets-icons/Copy_16x16.svg +0 -1
  116. package/assets-icons/CreateNew_40x40.svg +0 -1
  117. package/assets-icons/CustomApplications_16x16.svg +0 -1
  118. package/assets-icons/CustomWebVI_40x40.svg +0 -1
  119. package/assets-icons/DashboardBuilderNewTile_40x40.svg +0 -1
  120. package/assets-icons/DashboardBuilder_40x40.svg +0 -1
  121. package/assets-icons/Dashboard_16x16.svg +0 -1
  122. package/assets-icons/DataAnalyzer_40x40.svg +0 -1
  123. package/assets-icons/DataFileAccess_40x40.svg +0 -1
  124. package/assets-icons/DataIndexing_40x40.svg +0 -1
  125. package/assets-icons/DataNavigator_40x40.svg +0 -1
  126. package/assets-icons/DataPreparation_40x40.svg +0 -1
  127. package/assets-icons/Delete_16x16.svg +0 -1
  128. package/assets-icons/Desktop_16x16.svg +0 -1
  129. package/assets-icons/Desktop_32x32.svg +0 -1
  130. package/assets-icons/Details_16x16.svg +0 -1
  131. package/assets-icons/DevicesAndInterfaces_40x40.svg +0 -1
  132. package/assets-icons/Devices_16x16.svg +0 -1
  133. package/assets-icons/Disconnected_16x16.svg +0 -1
  134. package/assets-icons/DiscoveredSystem_40x40.svg +0 -1
  135. package/assets-icons/DonutChart_40x40.svg +0 -1
  136. package/assets-icons/DownArrow_16x16.svg +0 -1
  137. package/assets-icons/Download_16x16.svg +0 -1
  138. package/assets-icons/Duplicate_16x16.svg +0 -1
  139. package/assets-icons/Edit_16x16.svg +0 -1
  140. package/assets-icons/Expand_1_16x16.svg +0 -1
  141. package/assets-icons/Export_16x16.svg +0 -1
  142. package/assets-icons/Fail_16x16.svg +0 -1
  143. package/assets-icons/Fail_40x40.svg +0 -1
  144. package/assets-icons/FileViewer_40x40.svg +0 -1
  145. package/assets-icons/Filter_16x16.svg +0 -1
  146. package/assets-icons/FullScreen_16x16.svg +0 -1
  147. package/assets-icons/Graph_40x40.svg +0 -1
  148. package/assets-icons/HTTPvAPI_16x16.svg +0 -1
  149. package/assets-icons/HamburgerMenu_16x16.svg +0 -1
  150. package/assets-icons/HealthMonitoring_40x40.svg +0 -1
  151. package/assets-icons/Help_16x16.svg +0 -1
  152. package/assets-icons/History_40x40.svg +0 -1
  153. package/assets-icons/Home_16x16.svg +0 -1
  154. package/assets-icons/Import_40x40.svg +0 -1
  155. package/assets-icons/InProgress.svg +0 -1
  156. package/assets-icons/InSecure_16x16.svg +0 -1
  157. package/assets-icons/InformationSmall_16x16.svg +0 -1
  158. package/assets-icons/InformationSolo_16x16.svg +0 -1
  159. package/assets-icons/Information_16x16.svg +0 -1
  160. package/assets-icons/IntermediateSelection_16x16.svg +0 -1
  161. package/assets-icons/Jobs_16x16.svg +0 -1
  162. package/assets-icons/Jupyter_40x40.svg +0 -1
  163. package/assets-icons/Key_16x16.svg +0 -1
  164. package/assets-icons/LDAP.svg +0 -1
  165. package/assets-icons/Laptop_16x16.svg +0 -1
  166. package/assets-icons/Laptop_32x32.svg +0 -1
  167. package/assets-icons/LegendView_16x16.svg +0 -1
  168. package/assets-icons/Link_16x16.svg +0 -1
  169. package/assets-icons/Locked_16x16.svg +0 -1
  170. package/assets-icons/Login_16x16.svg +0 -1
  171. package/assets-icons/Logout_16x16.svg +0 -1
  172. package/assets-icons/ManagedSystems_40x40.svg +0 -1
  173. package/assets-icons/Manual_16x16.svg +0 -1
  174. package/assets-icons/Markdown_40X40.svg +0 -1
  175. package/assets-icons/MeasurementDataAnalysis_16x16.svg +0 -1
  176. package/assets-icons/MeasurementDataAnalysis_V2_16x16.svg +0 -1
  177. package/assets-icons/MergedView16x16.svg +0 -1
  178. package/assets-icons/Mobile_16x16.svg +0 -1
  179. package/assets-icons/Mobile_32x32.svg +0 -1
  180. package/assets-icons/NIEagle_16x16.svg +0 -1
  181. package/assets-icons/Narling_16x16.svg +0 -1
  182. package/assets-icons/NetworkSettings_40x40.svg +0 -1
  183. package/assets-icons/NoUnsavedChanges_24x24.svg +0 -1
  184. package/assets-icons/NoUnsavedChanges_2_24x24.svg +0 -1
  185. package/assets-icons/NorgieExpander_16x16.svg +0 -1
  186. package/assets-icons/Notebook_16x16.svg +0 -1
  187. package/assets-icons/Number_40x40.svg +0 -1
  188. package/assets-icons/OIDC.svg +0 -1
  189. package/assets-icons/OPC_16x16.svg +0 -1
  190. package/assets-icons/OPC_32x32.svg +0 -1
  191. package/assets-icons/OPC_40x40.svg +0 -1
  192. package/assets-icons/OptionsClosed_16x16.svg +0 -1
  193. package/assets-icons/OptionsOpen_16x16.svg +0 -1
  194. package/assets-icons/PartiallyConnected_16x16.svg +0 -1
  195. package/assets-icons/Paste_16x16.svg +0 -1
  196. package/assets-icons/PendingApproval_40x40.svg +0 -1
  197. package/assets-icons/Progress_40x40.svg +0 -1
  198. package/assets-icons/Project_40x40.svg +0 -1
  199. package/assets-icons/Refresh_16x16.svg +0 -1
  200. package/assets-icons/RepositoryManager_40x40.svg +0 -1
  201. package/assets-icons/Reset_16x16.svg +0 -1
  202. package/assets-icons/SL_Header_16x16.svg +0 -1
  203. package/assets-icons/SL_Header_32x32.svg +0 -1
  204. package/assets-icons/SL_Severity1_24x24.svg +0 -1
  205. package/assets-icons/SL_Severity1_List_16x16.svg +0 -1
  206. package/assets-icons/SL_Severity2_24x24.svg +0 -1
  207. package/assets-icons/SL_Severity2_List_16x16.svg +0 -1
  208. package/assets-icons/SL_Severity3_24x24.svg +0 -1
  209. package/assets-icons/SL_Severity3_List_16x16.svg +0 -1
  210. package/assets-icons/SL_Severity4_24x24.svg +0 -1
  211. package/assets-icons/SL_Severity4_List_16x16.svg +0 -1
  212. package/assets-icons/SavingInProgress_24x24.svg +0 -1
  213. package/assets-icons/SavingInProgress_2_24x24.svg +0 -1
  214. package/assets-icons/Search_16x16.svg +0 -1
  215. package/assets-icons/Secure_16x16.svg +0 -1
  216. package/assets-icons/Settings_16x16.svg +0 -1
  217. package/assets-icons/SkylineIcons_WebViHost_16x16.svg +0 -1
  218. package/assets-icons/SkylineIcons_WebViHost_40x40.svg +0 -1
  219. package/assets-icons/Software_40x40.svg +0 -1
  220. package/assets-icons/StaticText_16x16.svg +0 -1
  221. package/assets-icons/Status_40x40.svg +0 -1
  222. package/assets-icons/Succedded_40x40.svg +0 -1
  223. package/assets-icons/Succeeded_16x16.svg +0 -1
  224. package/assets-icons/SystemManagement_16x16.svg +0 -1
  225. package/assets-icons/SystemManager_40x40.svg +0 -1
  226. package/assets-icons/SystemStateManager_40x40.svg +0 -1
  227. package/assets-icons/System_16x16.svg +0 -1
  228. package/assets-icons/TDMDataFinder.svg +0 -1
  229. package/assets-icons/TDMDataFinder_Active.svg +0 -1
  230. package/assets-icons/TDMDataFinder_NonActive.svg +0 -1
  231. package/assets-icons/TDMS_BooleanChannel.svg +0 -1
  232. package/assets-icons/TDMS_ChannelGroup.svg +0 -1
  233. package/assets-icons/TDMS_File.svg +0 -1
  234. package/assets-icons/TDMS_NumericChannel.svg +0 -1
  235. package/assets-icons/TDMS_StringChannel.svg +0 -1
  236. package/assets-icons/TDMS_TimeChannel.svg +0 -1
  237. package/assets-icons/TDMS_WaveformChannel.svg +0 -1
  238. package/assets-icons/Tablet_16x16.svg +0 -1
  239. package/assets-icons/Tablet_32x32.svg +0 -1
  240. package/assets-icons/TagViewer_40x40.svg +0 -1
  241. package/assets-icons/Tag_16x16.svg +0 -1
  242. package/assets-icons/Tag_Query_16x16.svg +0 -1
  243. package/assets-icons/Templates_16x16.svg +0 -1
  244. package/assets-icons/TestInsights_16x16.svg +0 -1
  245. package/assets-icons/TestMonitor_40x40.svg +0 -1
  246. package/assets-icons/TestResult_16x16.svg +0 -1
  247. package/assets-icons/Text_40x40.svg +0 -1
  248. package/assets-icons/ThumbtackPin_16x16.svg +0 -1
  249. package/assets-icons/TileSize_16x16.svg +0 -1
  250. package/assets-icons/TimeSettings_40x40.svg +0 -1
  251. package/assets-icons/TimeStamp_40x40.svg +0 -1
  252. package/assets-icons/TreeView_16x16.svg +0 -1
  253. package/assets-icons/UpArrow_16x16.svg +0 -1
  254. package/assets-icons/Update_16x16.svg +0 -1
  255. package/assets-icons/Upload_16x16.svg +0 -1
  256. package/assets-icons/Upload_40x40.svg +0 -1
  257. package/assets-icons/Utilities_16x16.svg +0 -1
  258. package/assets-icons/ViewPortSize_24x24.svg +0 -1
  259. package/assets-icons/View_16x16.svg +0 -1
  260. package/assets-icons/Warning_16x16.svg +0 -1
  261. package/assets-icons/Widget_16x16.svg +0 -1
  262. package/data/components.json +0 -997
  263. package/data/docs.json +0 -17
  264. package/data/fonts.json +0 -185
  265. package/data/tokens.json +0 -315
  266. package/dist/styledictionary/config.js +0 -395
  267. package/dist/styledictionary/nimble-extensions.js +0 -11
  268. package/docs/ai-export-1.png +0 -0
  269. package/docs/ai-export-2.png +0 -0
  270. package/docs/ai-export-3.png +0 -0
  271. package/docs/ai-export-4.png +0 -0
  272. package/dsp.json +0 -210
  273. package/source/NimbleIcons.ai +10 -12018
  274. package/source/build/.eslintrc.js +0 -6
  275. package/source/build/svg-to-ts-config.js +0 -28
  276. package/source/source-sans-pro-font-face.css +0 -4
  277. package/source/space-mono-font-face.css +0 -4
  278. 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;
Binary file
Binary file
Binary file
Binary file
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
- }