@wavemaker-ai/foundation-css 1.0.0-rc.647469

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 (630) hide show
  1. package/cjs/foundation-css.cjs +9454 -0
  2. package/cjs/src_tokens_mobile_components_accordion-pane_accordion-pane_json.foundation-css.cjs +14 -0
  3. package/cjs/src_tokens_mobile_components_accordion_accordion_json.foundation-css.cjs +14 -0
  4. package/cjs/src_tokens_mobile_components_anchor_anchor_json.foundation-css.cjs +14 -0
  5. package/cjs/src_tokens_mobile_components_audio_audio_json.foundation-css.cjs +14 -0
  6. package/cjs/src_tokens_mobile_components_badge_badge_json.foundation-css.cjs +14 -0
  7. package/cjs/src_tokens_mobile_components_barcodescanner_barcodescanner_json.foundation-css.cjs +14 -0
  8. package/cjs/src_tokens_mobile_components_bottomsheet_bottomsheet_json.foundation-css.cjs +14 -0
  9. package/cjs/src_tokens_mobile_components_breadcrumb_breadcrumb_json.foundation-css.cjs +14 -0
  10. package/cjs/src_tokens_mobile_components_button-group_button-group_json.foundation-css.cjs +14 -0
  11. package/cjs/src_tokens_mobile_components_button_button_json.foundation-css.cjs +14 -0
  12. package/cjs/src_tokens_mobile_components_calendar_calendar_json.foundation-css.cjs +14 -0
  13. package/cjs/src_tokens_mobile_components_camera_camera_json.foundation-css.cjs +14 -0
  14. package/cjs/src_tokens_mobile_components_cards_cards_json.foundation-css.cjs +14 -0
  15. package/cjs/src_tokens_mobile_components_carousel_carousel_json.foundation-css.cjs +14 -0
  16. package/cjs/src_tokens_mobile_components_checkbox_checkbox_json.foundation-css.cjs +14 -0
  17. package/cjs/src_tokens_mobile_components_checkboxset_checkboxset_json.foundation-css.cjs +14 -0
  18. package/cjs/src_tokens_mobile_components_chips_chips_json.foundation-css.cjs +14 -0
  19. package/cjs/src_tokens_mobile_components_container_container_json.foundation-css.cjs +14 -0
  20. package/cjs/src_tokens_mobile_components_currency_currency_json.foundation-css.cjs +14 -0
  21. package/cjs/src_tokens_mobile_components_datetime_datetime_json.foundation-css.cjs +14 -0
  22. package/cjs/src_tokens_mobile_components_dropdown-menu_dropdown-menu_json.foundation-css.cjs +14 -0
  23. package/cjs/src_tokens_mobile_components_fileupload_fileupload_json.foundation-css.cjs +14 -0
  24. package/cjs/src_tokens_mobile_components_form-controls_form-controls_json.foundation-css.cjs +14 -0
  25. package/cjs/src_tokens_mobile_components_form-wrapper_form-wrapper_json.foundation-css.cjs +14 -0
  26. package/cjs/src_tokens_mobile_components_grid-layout_grid-layout_json.foundation-css.cjs +14 -0
  27. package/cjs/src_tokens_mobile_components_icon_icon_json.foundation-css.cjs +14 -0
  28. package/cjs/src_tokens_mobile_components_label_label_json.foundation-css.cjs +14 -0
  29. package/cjs/src_tokens_mobile_components_list_list_json.foundation-css.cjs +14 -0
  30. package/cjs/src_tokens_mobile_components_listtemplate_listtemplate_json.foundation-css.cjs +14 -0
  31. package/cjs/src_tokens_mobile_components_login_login_json.foundation-css.cjs +14 -0
  32. package/cjs/src_tokens_mobile_components_lottie_lottie_json.foundation-css.cjs +14 -0
  33. package/cjs/src_tokens_mobile_components_message_message_json.foundation-css.cjs +14 -0
  34. package/cjs/src_tokens_mobile_components_modal-dialog_modal-dialog_json.foundation-css.cjs +14 -0
  35. package/cjs/src_tokens_mobile_components_nav_nav_json.foundation-css.cjs +14 -0
  36. package/cjs/src_tokens_mobile_components_navbar_navbar_json.foundation-css.cjs +14 -0
  37. package/cjs/src_tokens_mobile_components_navitem_navitem_json.foundation-css.cjs +14 -0
  38. package/cjs/src_tokens_mobile_components_page-content_page-content_json.foundation-css.cjs +14 -0
  39. package/cjs/src_tokens_mobile_components_page-left-nav_page-left-nav_json.foundation-css.cjs +14 -0
  40. package/cjs/src_tokens_mobile_components_panel-footer_panel-footer_json.foundation-css.cjs +14 -0
  41. package/cjs/src_tokens_mobile_components_panel_panel_json.foundation-css.cjs +14 -0
  42. package/cjs/src_tokens_mobile_components_partial-container_partial-container_json.foundation-css.cjs +14 -0
  43. package/cjs/src_tokens_mobile_components_picture_picture_json.foundation-css.cjs +14 -0
  44. package/cjs/src_tokens_mobile_components_popover_popover_json.foundation-css.cjs +14 -0
  45. package/cjs/src_tokens_mobile_components_progress-bar_progress-bar_json.foundation-css.cjs +14 -0
  46. package/cjs/src_tokens_mobile_components_progress-circle_progress-circle_json.foundation-css.cjs +14 -0
  47. package/cjs/src_tokens_mobile_components_radioset_radioset_json.foundation-css.cjs +14 -0
  48. package/cjs/src_tokens_mobile_components_rating_rating_json.foundation-css.cjs +14 -0
  49. package/cjs/src_tokens_mobile_components_scrollbar_scrollbar_json.foundation-css.cjs +14 -0
  50. package/cjs/src_tokens_mobile_components_search_search_json.foundation-css.cjs +14 -0
  51. package/cjs/src_tokens_mobile_components_select_select_json.foundation-css.cjs +14 -0
  52. package/cjs/src_tokens_mobile_components_slider_slider_json.foundation-css.cjs +14 -0
  53. package/cjs/src_tokens_mobile_components_spinner_spinner_json.foundation-css.cjs +14 -0
  54. package/cjs/src_tokens_mobile_components_switch_switch_json.foundation-css.cjs +14 -0
  55. package/cjs/src_tokens_mobile_components_tabbar_tabbar_json.foundation-css.cjs +14 -0
  56. package/cjs/src_tokens_mobile_components_tabs_tabs_json.foundation-css.cjs +14 -0
  57. package/cjs/src_tokens_mobile_components_textarea_textarea_json.foundation-css.cjs +14 -0
  58. package/cjs/src_tokens_mobile_components_tile_tile_json.foundation-css.cjs +14 -0
  59. package/cjs/src_tokens_mobile_components_toast_toast_json.foundation-css.cjs +14 -0
  60. package/cjs/src_tokens_mobile_components_toggle_toggle_json.foundation-css.cjs +14 -0
  61. package/cjs/src_tokens_mobile_components_video_video_json.foundation-css.cjs +14 -0
  62. package/cjs/src_tokens_mobile_components_webview_webview_json.foundation-css.cjs +14 -0
  63. package/cjs/src_tokens_mobile_components_wizard_wizard_json.foundation-css.cjs +14 -0
  64. package/cjs/src_tokens_web_components_accordion_accordion_json.foundation-css.cjs +14 -0
  65. package/cjs/src_tokens_web_components_anchor_anchor_json.foundation-css.cjs +14 -0
  66. package/cjs/src_tokens_web_components_audio_audio_json.foundation-css.cjs +14 -0
  67. package/cjs/src_tokens_web_components_badge_badge_json.foundation-css.cjs +14 -0
  68. package/cjs/src_tokens_web_components_breadcrumb_breadcrumb_json.foundation-css.cjs +14 -0
  69. package/cjs/src_tokens_web_components_button-group_button-group_json.foundation-css.cjs +14 -0
  70. package/cjs/src_tokens_web_components_button_button_json.foundation-css.cjs +14 -0
  71. package/cjs/src_tokens_web_components_calendar_calendar_json.foundation-css.cjs +14 -0
  72. package/cjs/src_tokens_web_components_cards_cards_json.foundation-css.cjs +14 -0
  73. package/cjs/src_tokens_web_components_carousel_carousel_json.foundation-css.cjs +14 -0
  74. package/cjs/src_tokens_web_components_checkbox_checkbox_json.foundation-css.cjs +14 -0
  75. package/cjs/src_tokens_web_components_checkboxset_checkboxset_json.foundation-css.cjs +14 -0
  76. package/cjs/src_tokens_web_components_chips_chips_json.foundation-css.cjs +14 -0
  77. package/cjs/src_tokens_web_components_color-picker_color-picker_json.foundation-css.cjs +14 -0
  78. package/cjs/src_tokens_web_components_container_container_json.foundation-css.cjs +14 -0
  79. package/cjs/src_tokens_web_components_currency_currency_json.foundation-css.cjs +14 -0
  80. package/cjs/src_tokens_web_components_data-table_data-table_json.foundation-css.cjs +14 -0
  81. package/cjs/src_tokens_web_components_date_date_json.foundation-css.cjs +14 -0
  82. package/cjs/src_tokens_web_components_dropdown-menu_dropdown-menu_json.foundation-css.cjs +14 -0
  83. package/cjs/src_tokens_web_components_fileupload_fileupload_json.foundation-css.cjs +14 -0
  84. package/cjs/src_tokens_web_components_form-controls_form-controls_json.foundation-css.cjs +14 -0
  85. package/cjs/src_tokens_web_components_grid-layout_grid-layout_json.foundation-css.cjs +14 -0
  86. package/cjs/src_tokens_web_components_icon_icon_json.foundation-css.cjs +14 -0
  87. package/cjs/src_tokens_web_components_iconbutton-toggleable_iconbutton-toggleable_json.foundation-css.cjs +14 -0
  88. package/cjs/src_tokens_web_components_iframe_iframe_json.foundation-css.cjs +14 -0
  89. package/cjs/src_tokens_web_components_label_label_json.foundation-css.cjs +14 -0
  90. package/cjs/src_tokens_web_components_list_list_json.foundation-css.cjs +14 -0
  91. package/cjs/src_tokens_web_components_message_message_json.foundation-css.cjs +14 -0
  92. package/cjs/src_tokens_web_components_modal-dialog_modal-dialog_json.foundation-css.cjs +14 -0
  93. package/cjs/src_tokens_web_components_nav_nav_json.foundation-css.cjs +14 -0
  94. package/cjs/src_tokens_web_components_page-content_page-content_json.foundation-css.cjs +14 -0
  95. package/cjs/src_tokens_web_components_page-footer_page-footer_json.foundation-css.cjs +14 -0
  96. package/cjs/src_tokens_web_components_page-header_page-header_json.foundation-css.cjs +14 -0
  97. package/cjs/src_tokens_web_components_page-left-nav_page-left-nav_json.foundation-css.cjs +14 -0
  98. package/cjs/src_tokens_web_components_page-right-nav_page-right-nav_json.foundation-css.cjs +14 -0
  99. package/cjs/src_tokens_web_components_page-top-nav_page-top-nav_json.foundation-css.cjs +14 -0
  100. package/cjs/src_tokens_web_components_pagination_pagination_json.foundation-css.cjs +14 -0
  101. package/cjs/src_tokens_web_components_panel_panel_json.foundation-css.cjs +14 -0
  102. package/cjs/src_tokens_web_components_picture_picture_json.foundation-css.cjs +14 -0
  103. package/cjs/src_tokens_web_components_popover_popover_json.foundation-css.cjs +14 -0
  104. package/cjs/src_tokens_web_components_progress-bar_progress-bar_json.foundation-css.cjs +14 -0
  105. package/cjs/src_tokens_web_components_progress-circle_progress-circle_json.foundation-css.cjs +14 -0
  106. package/cjs/src_tokens_web_components_radioset_radioset_json.foundation-css.cjs +14 -0
  107. package/cjs/src_tokens_web_components_rating_rating_json.foundation-css.cjs +14 -0
  108. package/cjs/src_tokens_web_components_richtext-editor_richtext-editor_json.foundation-css.cjs +14 -0
  109. package/cjs/src_tokens_web_components_scrollbar_scrollbar_json.foundation-css.cjs +14 -0
  110. package/cjs/src_tokens_web_components_search_search_json.foundation-css.cjs +14 -0
  111. package/cjs/src_tokens_web_components_slider_slider_json.foundation-css.cjs +14 -0
  112. package/cjs/src_tokens_web_components_spinner_spinner_json.foundation-css.cjs +14 -0
  113. package/cjs/src_tokens_web_components_switch_switch_json.foundation-css.cjs +14 -0
  114. package/cjs/src_tokens_web_components_tabs_tabs_json.foundation-css.cjs +14 -0
  115. package/cjs/src_tokens_web_components_tile_tile_json.foundation-css.cjs +14 -0
  116. package/cjs/src_tokens_web_components_time_time_json.foundation-css.cjs +14 -0
  117. package/cjs/src_tokens_web_components_toast_toast_json.foundation-css.cjs +14 -0
  118. package/cjs/src_tokens_web_components_toggle_toggle_json.foundation-css.cjs +14 -0
  119. package/cjs/src_tokens_web_components_tree_tree_json.foundation-css.cjs +14 -0
  120. package/cjs/src_tokens_web_components_video_video_json.foundation-css.cjs +14 -0
  121. package/cjs/src_tokens_web_components_wizard_wizard_json.foundation-css.cjs +14 -0
  122. package/foundation/fonts/fonts/roboto.ttf +0 -0
  123. package/foundation/fonts/icons/fontawesome/fontawesome-webfont.eot +0 -0
  124. package/foundation/fonts/icons/fontawesome/fontawesome-webfont.svg +686 -0
  125. package/foundation/fonts/icons/fontawesome/fontawesome-webfont.ttf +0 -0
  126. package/foundation/fonts/icons/fontawesome/fontawesome-webfont.woff +0 -0
  127. package/foundation/fonts/icons/material/materialicon.eot +0 -0
  128. package/foundation/fonts/icons/material/materialicon.svg +97 -0
  129. package/foundation/fonts/icons/material/materialicon.ttf +0 -0
  130. package/foundation/fonts/icons/material/materialicon.woff +0 -0
  131. package/foundation/fonts/icons/summernote/summernote.eot +0 -0
  132. package/foundation/fonts/icons/summernote/summernote.svg +63 -0
  133. package/foundation/fonts/icons/summernote/summernote.ttf +0 -0
  134. package/foundation/fonts/icons/summernote/summernote.woff +0 -0
  135. package/foundation/fonts/icons/wavicon/wavicon.eot +0 -0
  136. package/foundation/fonts/icons/wavicon/wavicon.svg +1160 -0
  137. package/foundation/fonts/icons/wavicon/wavicon.ttf +0 -0
  138. package/foundation/fonts/icons/wavicon/wavicon.woff +0 -0
  139. package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.eot +0 -0
  140. package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.svg +244 -0
  141. package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.ttf +0 -0
  142. package/foundation/fonts/icons/wm-streamline-light/wm-streamline-light-icon.woff +0 -0
  143. package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.eot +0 -0
  144. package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.svg +216 -0
  145. package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.ttf +0 -0
  146. package/foundation/fonts/icons/wm-streamline-regular/wm-streamline-regular-icon.woff +0 -0
  147. package/foundation/foundation.css +26884 -0
  148. package/foundation/foundation.min.css +1 -0
  149. package/foundation/icon-fonts.min.css +1 -0
  150. package/index.d.ts +10 -0
  151. package/index.js +64 -0
  152. package/index.js.map +1 -0
  153. package/native_mobile.index.d.ts +280 -0
  154. package/native_mobile.index.js +321 -0
  155. package/native_mobile.index.js.map +1 -0
  156. package/npm-shrinkwrap.json +4373 -0
  157. package/package-lock.json +4373 -0
  158. package/package.json +57 -0
  159. package/src/node/index.d.ts +1 -0
  160. package/src/node/index.js +2 -0
  161. package/src/node/index.js.map +1 -0
  162. package/src/styles/mobile/components/advanced/carousel/carousel-content.less +3 -0
  163. package/src/styles/mobile/components/advanced/carousel/carousel-template.less +3 -0
  164. package/src/styles/mobile/components/advanced/carousel.less +141 -0
  165. package/src/styles/mobile/components/advanced/customwidgetcontainer.less +0 -0
  166. package/src/styles/mobile/components/advanced/login.less +11 -0
  167. package/src/styles/mobile/components/advanced/network-toast.less +15 -0
  168. package/src/styles/mobile/components/advanced/webview.less +4 -0
  169. package/src/styles/mobile/components/basic/anchor.less +38 -0
  170. package/src/styles/mobile/components/basic/audio.less +3 -0
  171. package/src/styles/mobile/components/basic/base.less +0 -0
  172. package/src/styles/mobile/components/basic/bottomsheet.less +32 -0
  173. package/src/styles/mobile/components/basic/button.less +76 -0
  174. package/src/styles/mobile/components/basic/buttongroup.less +43 -0
  175. package/src/styles/mobile/components/basic/custom.less +6 -0
  176. package/src/styles/mobile/components/basic/icon.less +22 -0
  177. package/src/styles/mobile/components/basic/label.less +314 -0
  178. package/src/styles/mobile/components/basic/lottie.less +10 -0
  179. package/src/styles/mobile/components/basic/message.less +77 -0
  180. package/src/styles/mobile/components/basic/modal.less +9 -0
  181. package/src/styles/mobile/components/basic/picture.less +48 -0
  182. package/src/styles/mobile/components/basic/progress-bar.less +75 -0
  183. package/src/styles/mobile/components/basic/progress-circle.less +28 -0
  184. package/src/styles/mobile/components/basic/search.less +110 -0
  185. package/src/styles/mobile/components/basic/skeleton.less +9 -0
  186. package/src/styles/mobile/components/basic/spinner.less +41 -0
  187. package/src/styles/mobile/components/basic/video.less +4 -0
  188. package/src/styles/mobile/components/chart/area-chart.less +81 -0
  189. package/src/styles/mobile/components/chart/bar-chart.less +39 -0
  190. package/src/styles/mobile/components/chart/bubble-chart.less +36 -0
  191. package/src/styles/mobile/components/chart/column-chart.less +36 -0
  192. package/src/styles/mobile/components/chart/donut-chart.less +33 -0
  193. package/src/styles/mobile/components/chart/line-chart.less +36 -0
  194. package/src/styles/mobile/components/chart/pie-chart.less +30 -0
  195. package/src/styles/mobile/components/container/accordion/accordionpane.less +9 -0
  196. package/src/styles/mobile/components/container/accordion.less +150 -0
  197. package/src/styles/mobile/components/container/layoutgrid/gridcolumn.less +8 -0
  198. package/src/styles/mobile/components/container/layoutgrid/gridrow.less +7 -0
  199. package/src/styles/mobile/components/container/layoutgrid.less +11 -0
  200. package/src/styles/mobile/components/container/linearlayout/linearlayoutitem.less +3 -0
  201. package/src/styles/mobile/components/container/linearlayout.less +3 -0
  202. package/src/styles/mobile/components/container/panel/panel-content.less +3 -0
  203. package/src/styles/mobile/components/container/panel/panel-footer.less +15 -0
  204. package/src/styles/mobile/components/container/panel.less +168 -0
  205. package/src/styles/mobile/components/container/tabs/tab-header.less +67 -0
  206. package/src/styles/mobile/components/container/tabs/tabpane.less +4 -0
  207. package/src/styles/mobile/components/container/tabs.less +12 -0
  208. package/src/styles/mobile/components/container/tile.less +47 -0
  209. package/src/styles/mobile/components/container/wizard/wizardstep.less +3 -0
  210. package/src/styles/mobile/components/container/wizard.less +89 -0
  211. package/src/styles/mobile/components/container.less +50 -0
  212. package/src/styles/mobile/components/data/card/card-content.less +6 -0
  213. package/src/styles/mobile/components/data/card/card-footer.less +5 -0
  214. package/src/styles/mobile/components/data/card.less +55 -0
  215. package/src/styles/mobile/components/data/form/form-body.less +3 -0
  216. package/src/styles/mobile/components/data/form/form-field.less +9 -0
  217. package/src/styles/mobile/components/data/form/form-footer.less +3 -0
  218. package/src/styles/mobile/components/data/form.less +394 -0
  219. package/src/styles/mobile/components/data/list/list-action-template.less +6 -0
  220. package/src/styles/mobile/components/data/list/list-template.less +6 -0
  221. package/src/styles/mobile/components/data/list.less +20 -0
  222. package/src/styles/mobile/components/device/barcodescanner.less +25 -0
  223. package/src/styles/mobile/components/device/camera.less +18 -0
  224. package/src/styles/mobile/components/dialogs/alertdialog.less +15 -0
  225. package/src/styles/mobile/components/dialogs/confirmdialog.less +30 -0
  226. package/src/styles/mobile/components/dialogs/dialog.less +132 -0
  227. package/src/styles/mobile/components/dialogs/dialogactions.less +3 -0
  228. package/src/styles/mobile/components/dialogs/dialogcontent.less +3 -0
  229. package/src/styles/mobile/components/input/basedataset.less +0 -0
  230. package/src/styles/mobile/components/input/baseinput.less +0 -0
  231. package/src/styles/mobile/components/input/basenumber.less +0 -0
  232. package/src/styles/mobile/components/input/calendar/views.less +3 -0
  233. package/src/styles/mobile/components/input/calendar.less +110 -0
  234. package/src/styles/mobile/components/input/checkbox.less +47 -0
  235. package/src/styles/mobile/components/input/checkboxset.less +62 -0
  236. package/src/styles/mobile/components/input/chips.less +98 -0
  237. package/src/styles/mobile/components/input/composite.less +4 -0
  238. package/src/styles/mobile/components/input/currency.less +71 -0
  239. package/src/styles/mobile/components/input/epoch/wheelpickermodal/datetime-picker-modal.less +62 -0
  240. package/src/styles/mobile/components/input/fileupload.less +26 -0
  241. package/src/styles/mobile/components/input/radioset.less +75 -0
  242. package/src/styles/mobile/components/input/rating.less +30 -0
  243. package/src/styles/mobile/components/input/select.less +41 -0
  244. package/src/styles/mobile/components/input/slider.less +39 -0
  245. package/src/styles/mobile/components/input/switch.less +44 -0
  246. package/src/styles/mobile/components/input/toggle.less +61 -0
  247. package/src/styles/mobile/components/navigation/appnavbar.less +106 -0
  248. package/src/styles/mobile/components/navigation/basenav.less +3 -0
  249. package/src/styles/mobile/components/navigation/menu.less +52 -0
  250. package/src/styles/mobile/components/navigation/navbar.less +9 -0
  251. package/src/styles/mobile/components/navigation/navitem.less +88 -0
  252. package/src/styles/mobile/components/navigation/popover.less +83 -0
  253. package/src/styles/mobile/components/page/content.less +3 -0
  254. package/src/styles/mobile/components/page/left-panel.less +7 -0
  255. package/src/styles/mobile/components/page/page-content.less +4 -0
  256. package/src/styles/mobile/components/page/partial-container.less +4 -0
  257. package/src/styles/mobile/components/page/partial.less +6 -0
  258. package/src/styles/mobile/components/page/tabbar.less +93 -0
  259. package/src/styles/mobile/components/page.less +3 -0
  260. package/src/styles/mobile/components/prefab.less +6 -0
  261. package/src/styles/mobile/components/tokens.dark.css +68 -0
  262. package/src/styles/mobile/components/tokens.light.css +1354 -0
  263. package/src/styles/mobile/components/variables/accordion.variant.less +18 -0
  264. package/src/styles/mobile/components/variables/button.variant.less +254 -0
  265. package/src/styles/mobile/components/variables/cards.variant.less +23 -0
  266. package/src/styles/mobile/components/variables/carousel.variant.less +18 -0
  267. package/src/styles/mobile/components/variables/checkbox.variant.less +16 -0
  268. package/src/styles/mobile/components/variables/checkboxset.variant.less +18 -0
  269. package/src/styles/mobile/components/variables/chips.variant.less +40 -0
  270. package/src/styles/mobile/components/variables/container.variant.less +26 -0
  271. package/src/styles/mobile/components/variables/form-controls.variant.less +105 -0
  272. package/src/styles/mobile/components/variables/icon.variant.less +48 -0
  273. package/src/styles/mobile/components/variables/label.variant.less +155 -0
  274. package/src/styles/mobile/components/variables/message.variant.less +29 -0
  275. package/src/styles/mobile/components/variables/navitem.variant.less +14 -0
  276. package/src/styles/mobile/components/variables/panel.variant.less +55 -0
  277. package/src/styles/mobile/components/variables/picture.variant.less +28 -0
  278. package/src/styles/mobile/components/variables/progress-bar.variant.less +24 -0
  279. package/src/styles/mobile/components/variables/progress-circle.variant.less +24 -0
  280. package/src/styles/mobile/components/variables/radioset.variant.less +12 -0
  281. package/src/styles/mobile/components/variables/rating.variant.less +8 -0
  282. package/src/styles/mobile/components/variables/switch.variant.less +14 -0
  283. package/src/styles/mobile/components/variables/tabbar.variant.less +16 -0
  284. package/src/styles/mobile/components/variables/tabs.variant.less +21 -0
  285. package/src/styles/mobile/components/variables/tile.variant.less +79 -0
  286. package/src/styles/mobile/components/variables/toggle.variant.less +17 -0
  287. package/src/styles/mobile/components/variables/wizard.variant.less +26 -0
  288. package/src/styles/mobile/studio/advanced/carousel.less +75 -0
  289. package/src/styles/mobile/studio/advanced/login.less +6 -0
  290. package/src/styles/mobile/studio/advanced/styles.less +3 -0
  291. package/src/styles/mobile/studio/advanced/webview.less +4 -0
  292. package/src/styles/mobile/studio/basic/anchor.less +16 -0
  293. package/src/styles/mobile/studio/basic/button-group.less +47 -0
  294. package/src/styles/mobile/studio/basic/button.less +22 -0
  295. package/src/styles/mobile/studio/basic/icon.less +21 -0
  296. package/src/styles/mobile/studio/basic/label.less +29 -0
  297. package/src/styles/mobile/studio/basic/message.less +75 -0
  298. package/src/styles/mobile/studio/basic/picture.less +10 -0
  299. package/src/styles/mobile/studio/basic/progress-bar.less +6 -0
  300. package/src/styles/mobile/studio/basic/progress-circle.less +9 -0
  301. package/src/styles/mobile/studio/basic/search.less +39 -0
  302. package/src/styles/mobile/studio/basic/spinner.less +6 -0
  303. package/src/styles/mobile/studio/basic/styles.less +11 -0
  304. package/src/styles/mobile/studio/container/accordion.less +23 -0
  305. package/src/styles/mobile/studio/container/container.less +19 -0
  306. package/src/styles/mobile/studio/container/grid.less +8 -0
  307. package/src/styles/mobile/studio/container/linearlayout.less +8 -0
  308. package/src/styles/mobile/studio/container/panel.less +42 -0
  309. package/src/styles/mobile/studio/container/styles.less +7 -0
  310. package/src/styles/mobile/studio/container/tabs.less +122 -0
  311. package/src/styles/mobile/studio/container/tile.less +7 -0
  312. package/src/styles/mobile/studio/container/wizard.less +48 -0
  313. package/src/styles/mobile/studio/data/card.less +25 -0
  314. package/src/styles/mobile/studio/data/form.less +22 -0
  315. package/src/styles/mobile/studio/data/list.less +25 -0
  316. package/src/styles/mobile/studio/data/listtemplate.less +11 -0
  317. package/src/styles/mobile/studio/data/styles.less +4 -0
  318. package/src/styles/mobile/studio/device/barcode.less +17 -0
  319. package/src/styles/mobile/studio/device/camera.less +4 -0
  320. package/src/styles/mobile/studio/device/styles.less +2 -0
  321. package/src/styles/mobile/studio/dialogs/alert-dialog.less +10 -0
  322. package/src/styles/mobile/studio/dialogs/base-dialog.less +180 -0
  323. package/src/styles/mobile/studio/dialogs/confirm-dialog.less +26 -0
  324. package/src/styles/mobile/studio/dialogs/styles.less +3 -0
  325. package/src/styles/mobile/studio/input/calendar.less +68 -0
  326. package/src/styles/mobile/studio/input/checkbox.less +78 -0
  327. package/src/styles/mobile/studio/input/checkboxset.less +82 -0
  328. package/src/styles/mobile/studio/input/chips.less +11 -0
  329. package/src/styles/mobile/studio/input/currency.less +24 -0
  330. package/src/styles/mobile/studio/input/date.less +7 -0
  331. package/src/styles/mobile/studio/input/epoch/datetime-picker-modal.less +49 -0
  332. package/src/styles/mobile/studio/input/form.less +204 -0
  333. package/src/styles/mobile/studio/input/number.less +6 -0
  334. package/src/styles/mobile/studio/input/radioset.less +110 -0
  335. package/src/styles/mobile/studio/input/rating.less +21 -0
  336. package/src/styles/mobile/studio/input/select.less +39 -0
  337. package/src/styles/mobile/studio/input/slider.less +132 -0
  338. package/src/styles/mobile/studio/input/styles.less +17 -0
  339. package/src/styles/mobile/studio/input/switch.less +13 -0
  340. package/src/styles/mobile/studio/input/text.less +6 -0
  341. package/src/styles/mobile/studio/input/textarea.less +5 -0
  342. package/src/styles/mobile/studio/input/toggle.less +99 -0
  343. package/src/styles/mobile/studio/layouts/appnavbar.less +78 -0
  344. package/src/styles/mobile/studio/layouts/content.less +5 -0
  345. package/src/styles/mobile/studio/layouts/page-content.less +11 -0
  346. package/src/styles/mobile/studio/layouts/page.less +5 -0
  347. package/src/styles/mobile/studio/layouts/styles.less +5 -0
  348. package/src/styles/mobile/studio/layouts/tabbar.less +50 -0
  349. package/src/styles/mobile/studio/navigation/menu.less +21 -0
  350. package/src/styles/mobile/studio/navigation/nav.less +4 -0
  351. package/src/styles/mobile/studio/navigation/popover.less +31 -0
  352. package/src/styles/mobile/studio/navigation/styles.less +3 -0
  353. package/src/styles/mobile/studio/styles.less +17 -0
  354. package/src/token-validation/component-token-schema.d.ts +171 -0
  355. package/src/token-validation/component-token-schema.js +148 -0
  356. package/src/token-validation/component-token-schema.js.map +1 -0
  357. package/src/token-validation/constants.d.ts +42 -0
  358. package/src/token-validation/constants.js +55 -0
  359. package/src/token-validation/constants.js.map +1 -0
  360. package/src/token-validation/global-token-schema.d.ts +38 -0
  361. package/src/token-validation/global-token-schema.js +42 -0
  362. package/src/token-validation/global-token-schema.js.map +1 -0
  363. package/src/token-validation/validate-token.d.ts +72 -0
  364. package/src/token-validation/validate-token.js +1070 -0
  365. package/src/token-validation/validate-token.js.map +1 -0
  366. package/src/token-validation/validate-value.d.ts +13 -0
  367. package/src/token-validation/validate-value.js +57 -0
  368. package/src/token-validation/validate-value.js.map +1 -0
  369. package/src/token-validation/validator-utils/common/constants.d.ts +185 -0
  370. package/src/token-validation/validator-utils/common/constants.js +281 -0
  371. package/src/token-validation/validator-utils/common/constants.js.map +1 -0
  372. package/src/token-validation/validator-utils/common/primitives.d.ts +14 -0
  373. package/src/token-validation/validator-utils/common/primitives.js +35 -0
  374. package/src/token-validation/validator-utils/common/primitives.js.map +1 -0
  375. package/src/token-validation/validator-utils/common/utils.d.ts +192 -0
  376. package/src/token-validation/validator-utils/common/utils.js +418 -0
  377. package/src/token-validation/validator-utils/common/utils.js.map +1 -0
  378. package/src/token-validation/validator-utils/native_mobile.d.ts +1 -0
  379. package/src/token-validation/validator-utils/native_mobile.js +11 -0
  380. package/src/token-validation/validator-utils/native_mobile.js.map +1 -0
  381. package/src/token-validation/validator-utils/web.d.ts +1 -0
  382. package/src/token-validation/validator-utils/web.js +12 -0
  383. package/src/token-validation/validator-utils/web.js.map +1 -0
  384. package/src/tokens/mobile/components/accordion/accordion.json +518 -0
  385. package/src/tokens/mobile/components/accordion-pane/accordion-pane.json +65 -0
  386. package/src/tokens/mobile/components/anchor/anchor.json +129 -0
  387. package/src/tokens/mobile/components/audio/audio.json +15 -0
  388. package/src/tokens/mobile/components/badge/badge.json +122 -0
  389. package/src/tokens/mobile/components/barcodescanner/barcodescanner.json +140 -0
  390. package/src/tokens/mobile/components/bottomsheet/bottomsheet.json +154 -0
  391. package/src/tokens/mobile/components/breadcrumb/breadcrumb.json +86 -0
  392. package/src/tokens/mobile/components/button/button.json +736 -0
  393. package/src/tokens/mobile/components/button-group/button-group.json +51 -0
  394. package/src/tokens/mobile/components/calendar/calendar.json +435 -0
  395. package/src/tokens/mobile/components/camera/camera.json +73 -0
  396. package/src/tokens/mobile/components/cards/cards.json +180 -0
  397. package/src/tokens/mobile/components/carousel/carousel.json +603 -0
  398. package/src/tokens/mobile/components/checkbox/checkbox.json +232 -0
  399. package/src/tokens/mobile/components/checkboxset/checkboxset.json +334 -0
  400. package/src/tokens/mobile/components/chips/chips.json +423 -0
  401. package/src/tokens/mobile/components/container/container.json +191 -0
  402. package/src/tokens/mobile/components/currency/currency.json +96 -0
  403. package/src/tokens/mobile/components/datetime/datetime.json +223 -0
  404. package/src/tokens/mobile/components/dropdown-menu/dropdown-menu.json +199 -0
  405. package/src/tokens/mobile/components/fileupload/fileupload.json +121 -0
  406. package/src/tokens/mobile/components/form-controls/form-controls.json +727 -0
  407. package/src/tokens/mobile/components/form-wrapper/form-wrapper.json +361 -0
  408. package/src/tokens/mobile/components/grid-layout/grid-layout.json +30 -0
  409. package/src/tokens/mobile/components/icon/icon.json +246 -0
  410. package/src/tokens/mobile/components/label/label.json +618 -0
  411. package/src/tokens/mobile/components/list/list.json +66 -0
  412. package/src/tokens/mobile/components/listtemplate/listtemplate.json +84 -0
  413. package/src/tokens/mobile/components/login/login.json +65 -0
  414. package/src/tokens/mobile/components/lottie/lottie.json +52 -0
  415. package/src/tokens/mobile/components/message/message.json +336 -0
  416. package/src/tokens/mobile/components/modal-dialog/modal-dialog.json +353 -0
  417. package/src/tokens/mobile/components/nav/nav.json +14 -0
  418. package/src/tokens/mobile/components/navbar/navbar.json +368 -0
  419. package/src/tokens/mobile/components/navitem/navitem.json +521 -0
  420. package/src/tokens/mobile/components/page-content/page-content.json +31 -0
  421. package/src/tokens/mobile/components/page-left-nav/page-left-nav.json +56 -0
  422. package/src/tokens/mobile/components/panel/panel.json +478 -0
  423. package/src/tokens/mobile/components/panel-footer/panel-footer.json +116 -0
  424. package/src/tokens/mobile/components/partial-container/partial-container.json +23 -0
  425. package/src/tokens/mobile/components/picture/picture.json +166 -0
  426. package/src/tokens/mobile/components/popover/popover.json +387 -0
  427. package/src/tokens/mobile/components/progress-bar/progress-bar.json +216 -0
  428. package/src/tokens/mobile/components/progress-circle/progress-circle.json +176 -0
  429. package/src/tokens/mobile/components/radioset/radioset.json +279 -0
  430. package/src/tokens/mobile/components/rating/rating.json +117 -0
  431. package/src/tokens/mobile/components/scrollbar/scrollbar.json +38 -0
  432. package/src/tokens/mobile/components/search/search.json +408 -0
  433. package/src/tokens/mobile/components/select/select.json +229 -0
  434. package/src/tokens/mobile/components/slider/slider.json +111 -0
  435. package/src/tokens/mobile/components/spinner/spinner.json +92 -0
  436. package/src/tokens/mobile/components/switch/switch.json +213 -0
  437. package/src/tokens/mobile/components/tabbar/tabbar.json +415 -0
  438. package/src/tokens/mobile/components/tabs/tabs.json +432 -0
  439. package/src/tokens/mobile/components/textarea/textarea.json +16 -0
  440. package/src/tokens/mobile/components/tile/tile.json +377 -0
  441. package/src/tokens/mobile/components/toast/toast.json +186 -0
  442. package/src/tokens/mobile/components/toggle/toggle.json +239 -0
  443. package/src/tokens/mobile/components/video/video.json +23 -0
  444. package/src/tokens/mobile/components/webview/webview.json +32 -0
  445. package/src/tokens/mobile/components/wizard/wizard.json +550 -0
  446. package/src/tokens/mobile/global/border/border.json +90 -0
  447. package/src/tokens/mobile/global/border-style/border-style.json +30 -0
  448. package/src/tokens/mobile/global/box-shadow/box-shadow.json +40 -0
  449. package/src/tokens/mobile/global/colors/color.dark.json +150 -0
  450. package/src/tokens/mobile/global/colors/color.json +338 -0
  451. package/src/tokens/mobile/global/colors/color.light.json +1 -0
  452. package/src/tokens/mobile/global/elevation/elevation.json +36 -0
  453. package/src/tokens/mobile/global/font/font.json +377 -0
  454. package/src/tokens/mobile/global/gap/gap.json +60 -0
  455. package/src/tokens/mobile/global/icon/icon.json +15 -0
  456. package/src/tokens/mobile/global/margin/margin.json +60 -0
  457. package/src/tokens/mobile/global/opacity/opacity.json +6 -0
  458. package/src/tokens/mobile/global/radius/radius.json +15 -0
  459. package/src/tokens/mobile/global/space/space.json +18 -0
  460. package/src/tokens/mobile/global/spacer/spacer.json +15 -0
  461. package/src/tokens/web/components/accordion/Readme.md +18 -0
  462. package/src/tokens/web/components/accordion/Token.Readme.md +30 -0
  463. package/src/tokens/web/components/accordion/accordion.json +321 -0
  464. package/src/tokens/web/components/anchor/Token.Readme.md +20 -0
  465. package/src/tokens/web/components/anchor/anchor.json +189 -0
  466. package/src/tokens/web/components/audio/Token.Readme.md +9 -0
  467. package/src/tokens/web/components/audio/audio.json +15 -0
  468. package/src/tokens/web/components/badge/Token.Readme.md +19 -0
  469. package/src/tokens/web/components/badge/badge.json +100 -0
  470. package/src/tokens/web/components/breadcrumb/Readme.md +23 -0
  471. package/src/tokens/web/components/breadcrumb/Token.Readme.md +21 -0
  472. package/src/tokens/web/components/breadcrumb/breadcrumb.json +392 -0
  473. package/src/tokens/web/components/button/Readme.md +54 -0
  474. package/src/tokens/web/components/button/Token.Readme.md +29 -0
  475. package/src/tokens/web/components/button/button.json +734 -0
  476. package/src/tokens/web/components/button-group/Token.Readme.md +9 -0
  477. package/src/tokens/web/components/button-group/button-group.json +22 -0
  478. package/src/tokens/web/components/calendar/Token.Readme.md +63 -0
  479. package/src/tokens/web/components/calendar/calendar.json +501 -0
  480. package/src/tokens/web/components/cards/Readme.md +23 -0
  481. package/src/tokens/web/components/cards/Token.Readme.md +22 -0
  482. package/src/tokens/web/components/cards/cards.json +371 -0
  483. package/src/tokens/web/components/carousel/Token.Readme.md +20 -0
  484. package/src/tokens/web/components/carousel/carousel.json +160 -0
  485. package/src/tokens/web/components/checkbox/Token.Readme.md +25 -0
  486. package/src/tokens/web/components/checkbox/checkbox.json +274 -0
  487. package/src/tokens/web/components/checkboxset/Token.Readme.md +9 -0
  488. package/src/tokens/web/components/checkboxset/checkboxset.json +18 -0
  489. package/src/tokens/web/components/chips/Readme.md +26 -0
  490. package/src/tokens/web/components/chips/Token.Readme.md +43 -0
  491. package/src/tokens/web/components/chips/chips.json +653 -0
  492. package/src/tokens/web/components/color-picker/Token.Readme.md +10 -0
  493. package/src/tokens/web/components/color-picker/color-picker.json +24 -0
  494. package/src/tokens/web/components/container/Readme.md +23 -0
  495. package/src/tokens/web/components/container/Token.Readme.md +13 -0
  496. package/src/tokens/web/components/container/container.json +207 -0
  497. package/src/tokens/web/components/currency/Token.Readme.md +14 -0
  498. package/src/tokens/web/components/currency/currency.json +59 -0
  499. package/src/tokens/web/components/data-table/Readme.md +29 -0
  500. package/src/tokens/web/components/data-table/Token.Readme.md +54 -0
  501. package/src/tokens/web/components/data-table/data-table.json +603 -0
  502. package/src/tokens/web/components/date/Token.Readme.md +33 -0
  503. package/src/tokens/web/components/date/date.json +328 -0
  504. package/src/tokens/web/components/dropdown-menu/Readme.md +16 -0
  505. package/src/tokens/web/components/dropdown-menu/Token.Readme.md +25 -0
  506. package/src/tokens/web/components/dropdown-menu/dropdown-menu.json +259 -0
  507. package/src/tokens/web/components/fileupload/Token.Readme.md +44 -0
  508. package/src/tokens/web/components/fileupload/fileupload.json +328 -0
  509. package/src/tokens/web/components/form-controls/Token.Readme.md +48 -0
  510. package/src/tokens/web/components/form-controls/form-controls.json +548 -0
  511. package/src/tokens/web/components/grid-layout/Token.Readme.md +11 -0
  512. package/src/tokens/web/components/grid-layout/grid-layout.json +34 -0
  513. package/src/tokens/web/components/icon/Readme.md +22 -0
  514. package/src/tokens/web/components/icon/Token.Readme.md +14 -0
  515. package/src/tokens/web/components/icon/icon.json +364 -0
  516. package/src/tokens/web/components/iconbutton-toggleable/Readme.md +17 -0
  517. package/src/tokens/web/components/iconbutton-toggleable/Token.Readme.md +19 -0
  518. package/src/tokens/web/components/iconbutton-toggleable/iconbutton-toggleable.json +557 -0
  519. package/src/tokens/web/components/iframe/Token.Readme.md +10 -0
  520. package/src/tokens/web/components/iframe/iframe.json +23 -0
  521. package/src/tokens/web/components/label/Readme.md +55 -0
  522. package/src/tokens/web/components/label/Token.Readme.md +17 -0
  523. package/src/tokens/web/components/label/label.json +723 -0
  524. package/src/tokens/web/components/list/Token.Readme.md +19 -0
  525. package/src/tokens/web/components/list/list.json +198 -0
  526. package/src/tokens/web/components/message/Readme.md +19 -0
  527. package/src/tokens/web/components/message/Token.Readme.md +22 -0
  528. package/src/tokens/web/components/message/message.json +312 -0
  529. package/src/tokens/web/components/modal-dialog/Readme.md +35 -0
  530. package/src/tokens/web/components/modal-dialog/Token.Readme.md +31 -0
  531. package/src/tokens/web/components/modal-dialog/modal-dialog.json +462 -0
  532. package/src/tokens/web/components/nav/Readme.md +41 -0
  533. package/src/tokens/web/components/nav/Token.Readme.md +25 -0
  534. package/src/tokens/web/components/nav/nav.json +236 -0
  535. package/src/tokens/web/components/page-content/Token.Readme.md +9 -0
  536. package/src/tokens/web/components/page-content/page-content.json +17 -0
  537. package/src/tokens/web/components/page-footer/Token.Readme.md +18 -0
  538. package/src/tokens/web/components/page-footer/page-footer.json +98 -0
  539. package/src/tokens/web/components/page-header/Token.Readme.md +18 -0
  540. package/src/tokens/web/components/page-header/page-header.json +90 -0
  541. package/src/tokens/web/components/page-left-nav/Readme.md +27 -0
  542. package/src/tokens/web/components/page-left-nav/Token.Readme.md +55 -0
  543. package/src/tokens/web/components/page-left-nav/page-left-nav.json +961 -0
  544. package/src/tokens/web/components/page-right-nav/Readme.md +27 -0
  545. package/src/tokens/web/components/page-right-nav/Token.Readme.md +53 -0
  546. package/src/tokens/web/components/page-right-nav/page-right-nav.json +950 -0
  547. package/src/tokens/web/components/page-top-nav/Token.Readme.md +16 -0
  548. package/src/tokens/web/components/page-top-nav/page-top-nav.json +83 -0
  549. package/src/tokens/web/components/pagination/Readme.md +23 -0
  550. package/src/tokens/web/components/pagination/Token.Readme.md +35 -0
  551. package/src/tokens/web/components/pagination/pagination.json +477 -0
  552. package/src/tokens/web/components/panel/Readme.md +18 -0
  553. package/src/tokens/web/components/panel/Token.Readme.md +39 -0
  554. package/src/tokens/web/components/panel/panel.json +397 -0
  555. package/src/tokens/web/components/picture/Readme.md +24 -0
  556. package/src/tokens/web/components/picture/Token.Readme.md +16 -0
  557. package/src/tokens/web/components/picture/picture.json +233 -0
  558. package/src/tokens/web/components/popover/Token.Readme.md +34 -0
  559. package/src/tokens/web/components/popover/popover.json +222 -0
  560. package/src/tokens/web/components/progress-bar/Readme.md +35 -0
  561. package/src/tokens/web/components/progress-bar/Token.Readme.md +15 -0
  562. package/src/tokens/web/components/progress-bar/progress-bar.json +439 -0
  563. package/src/tokens/web/components/progress-circle/Readme.md +19 -0
  564. package/src/tokens/web/components/progress-circle/Token.Readme.md +16 -0
  565. package/src/tokens/web/components/progress-circle/progress-circle.json +257 -0
  566. package/src/tokens/web/components/radioset/Token.Readme.md +24 -0
  567. package/src/tokens/web/components/radioset/radioset.json +259 -0
  568. package/src/tokens/web/components/rating/Token.Readme.md +14 -0
  569. package/src/tokens/web/components/rating/rating.json +116 -0
  570. package/src/tokens/web/components/richtext-editor/Token.Readme.md +106 -0
  571. package/src/tokens/web/components/richtext-editor/richtext-editor.json +1054 -0
  572. package/src/tokens/web/components/scrollbar/Token.Readme.md +15 -0
  573. package/src/tokens/web/components/scrollbar/scrollbar.json +66 -0
  574. package/src/tokens/web/components/search/Token.Readme.md +39 -0
  575. package/src/tokens/web/components/search/search.json +390 -0
  576. package/src/tokens/web/components/slider/Token.Readme.md +24 -0
  577. package/src/tokens/web/components/slider/slider.json +153 -0
  578. package/src/tokens/web/components/spinner/Token.Readme.md +15 -0
  579. package/src/tokens/web/components/spinner/spinner.json +77 -0
  580. package/src/tokens/web/components/switch/Token.Readme.md +20 -0
  581. package/src/tokens/web/components/switch/switch.json +241 -0
  582. package/src/tokens/web/components/tabs/Token.Readme.md +36 -0
  583. package/src/tokens/web/components/tabs/tabs.json +328 -0
  584. package/src/tokens/web/components/tile/Readme.md +39 -0
  585. package/src/tokens/web/components/tile/Token.Readme.md +13 -0
  586. package/src/tokens/web/components/tile/tile.json +442 -0
  587. package/src/tokens/web/components/time/Token.Readme.md +37 -0
  588. package/src/tokens/web/components/time/time.json +263 -0
  589. package/src/tokens/web/components/toast/Readme.md +19 -0
  590. package/src/tokens/web/components/toast/Token.Readme.md +35 -0
  591. package/src/tokens/web/components/toast/toast.json +464 -0
  592. package/src/tokens/web/components/toggle/Token.Readme.md +20 -0
  593. package/src/tokens/web/components/toggle/toggle.json +249 -0
  594. package/src/tokens/web/components/tree/Token.Readme.md +27 -0
  595. package/src/tokens/web/components/tree/tree.json +265 -0
  596. package/src/tokens/web/components/video/Token.Readme.md +10 -0
  597. package/src/tokens/web/components/video/video.json +23 -0
  598. package/src/tokens/web/components/wizard/Readme.md +41 -0
  599. package/src/tokens/web/components/wizard/Token.Readme.md +76 -0
  600. package/src/tokens/web/components/wizard/wizard.json +1449 -0
  601. package/src/tokens/web/global/border/border.json +116 -0
  602. package/src/tokens/web/global/border-style/border-style.json +72 -0
  603. package/src/tokens/web/global/box-shadow/box-shadow.json +24 -0
  604. package/src/tokens/web/global/colors/color.dark.json +398 -0
  605. package/src/tokens/web/global/colors/color.json +566 -0
  606. package/src/tokens/web/global/colors/color.light.json +1 -0
  607. package/src/tokens/web/global/elevation/elevation.json +48 -0
  608. package/src/tokens/web/global/font/font.json +599 -0
  609. package/src/tokens/web/global/gap/gap.json +57 -0
  610. package/src/tokens/web/global/icon/icon.json +84 -0
  611. package/src/tokens/web/global/margin/margin.json +57 -0
  612. package/src/tokens/web/global/opacity/opacity.json +7 -0
  613. package/src/tokens/web/global/radius/radius.json +77 -0
  614. package/src/tokens/web/global/space/space.json +125 -0
  615. package/src/tokens/web/global/spacer/spacer.json +45 -0
  616. package/src/utils/style-dictionary-utils.d.ts +25 -0
  617. package/src/utils/style-dictionary-utils.js +360 -0
  618. package/src/utils/style-dictionary-utils.js.map +1 -0
  619. package/src/utils/utils.d.ts +15 -0
  620. package/src/utils/utils.js +25 -0
  621. package/src/utils/utils.js.map +1 -0
  622. package/src/wm-namespace.d.ts +11 -0
  623. package/src/wm-namespace.js +12 -0
  624. package/src/wm-namespace.js.map +1 -0
  625. package/web.index.d.ts +20 -0
  626. package/web.index.js +300 -0
  627. package/web.index.js.map +1 -0
  628. package/webpack.config.cjs +43 -0
  629. package/webpack.config.cjs.map +1 -0
  630. package/webpack.config.d.cts +32 -0
@@ -0,0 +1,1070 @@
1
+ import fs from "fs";
2
+ import Ajv from "ajv";
3
+ import path from "path";
4
+ import { fileURLToPath } from "url";
5
+ import geComponentTokenSchema from "./component-token-schema.js";
6
+ import getGlobalTokenSchema from "./global-token-schema.js";
7
+ import validateTokenValue, { isTokenReference } from "./validate-value.js";
8
+ import { VALIDATION_RULES, ERROR_TYPES, TOKEN_TYPES, ALLOWED_PROPERTIES_BY_CONTEXT, VALIDATION_SCOPE, VALUE_RELATED_KEYWORDS, PLATFORM, FOLDER_TYPE } from "./constants.js";
9
+ //Maps each token type to its validation schema and the rules enabled during validation.
10
+ const TOKEN_TYPE_CONFIG = {
11
+ [TOKEN_TYPES.GLOBAL]: {
12
+ getSchema: () => getGlobalTokenSchema(),
13
+ resolveRules: () => ({
14
+ [VALIDATION_RULES.STRUCTURE]: false,
15
+ [VALIDATION_RULES.METADATA]: false,
16
+ [VALIDATION_RULES.REFERENCES]: true,
17
+ [VALIDATION_RULES.OVERRIDES]: false,
18
+ [VALIDATION_RULES.VALUES]: true
19
+ })
20
+ },
21
+ [TOKEN_TYPES.COMPONENT]: {
22
+ getSchema: (enabledRules) => geComponentTokenSchema(enabledRules),
23
+ resolveRules: (validationOptions) => resolveEnabledValidationRules(validationOptions)
24
+ }
25
+ };
26
+ /*
27
+ * Normalizes and stores a validation error.
28
+ * Inputs:
29
+ * - errorType: category of validation error
30
+ * - fieldName: dot-separated path of the invalid field
31
+ * - message: human-readable error message
32
+ * - fileName: name of the file being validated (optional)
33
+ * - allowedValues: list of allowed values for the field (optional)
34
+ * Output: - Adds a normalized error object to the internal validation error list
35
+ */
36
+ const pushError = ({ errorType, fieldName, message, fileName, allowedValues, actualValue }, validationErrors) => {
37
+ const error = { errorType, fieldName, message };
38
+ if (allowedValues)
39
+ error.allowedValues = allowedValues;
40
+ if (fileName)
41
+ error.fileName = fileName;
42
+ if (actualValue !== undefined)
43
+ error.actualValue = actualValue;
44
+ validationErrors.push(error);
45
+ };
46
+ /*
47
+ * Validates that leaf token nodes define a valid string value.
48
+ * Inputs:
49
+ * - _schema: AJV keyword schema value (not used)
50
+ * - node: token node being validated
51
+ * - ctx: AJV validation context containing the instance path
52
+ * Output:
53
+ * - Returns true if node is valid or not applicable
54
+ * - Returns false and reports validation errors if leaf token is invalid
55
+ */
56
+ function leafMustHaveValueValidate(_schema, node, ctx) {
57
+ // Skip meta subtree
58
+ if (ctx.instancePath?.includes("/meta") ||
59
+ ctx.instancePath?.includes("/attributes") ||
60
+ ctx.instancePath?.endsWith("/type")) {
61
+ return true;
62
+ }
63
+ // Primitive string leaf
64
+ if (typeof node === "string") {
65
+ leafMustHaveValueValidate.errors = [
66
+ {
67
+ keyword: "leafMustHaveValue",
68
+ message: `Invalid token definition.\n` +
69
+ `Leaf tokens must be objects with a "value" property.\n\n` +
70
+ `Expected format: { "value": "16px" }`
71
+ }
72
+ ];
73
+ return false;
74
+ }
75
+ // null node
76
+ if (node === null) {
77
+ leafMustHaveValueValidate.errors = [
78
+ {
79
+ keyword: "leafMustHaveValue",
80
+ message: `Invalid token definition.\n` +
81
+ `Token cannot be null.\n\n` +
82
+ `Expected format: { "value": "16px" }`
83
+ }
84
+ ];
85
+ return false;
86
+ }
87
+ //Ignore meta keys when deciding leaf
88
+ const TOKEN_META_KEYS = new Set(["value", "type", "attributes", "meta"]);
89
+ const childKeys = Object.keys(node).filter(k => !TOKEN_META_KEYS.has(k));
90
+ const hasNestedTokenChildren = childKeys.length > 0 && childKeys.some(k => node[k] && typeof node[k] === "object");
91
+ const hasValue = "value" in node;
92
+ //nodes with "value" cannot have nested token children
93
+ if (hasValue && hasNestedTokenChildren) {
94
+ leafMustHaveValueValidate.errors = [
95
+ {
96
+ keyword: "leafMustHaveValue",
97
+ message: `Invalid token structure.\n` +
98
+ `A token that defines "value" cannot contain nested token objects.\n` +
99
+ `Move nested tokens to a separate level.`
100
+ }
101
+ ];
102
+ return false;
103
+ }
104
+ // Object leaf without value
105
+ if (!hasNestedTokenChildren && !hasValue) {
106
+ leafMustHaveValueValidate.errors = [
107
+ {
108
+ keyword: "leafMustHaveValue",
109
+ message: `Invalid token definition.\n` +
110
+ `Leaf tokens must be objects with a "value" property.\n` +
111
+ `Expected format: { "value": "16px" }`
112
+ }
113
+ ];
114
+ return false;
115
+ }
116
+ // Invalid string literals
117
+ const INVALID_STRING_LITERALS = new Set(["null", "undefined", "nan"]);
118
+ if (typeof node.value === "string" &&
119
+ INVALID_STRING_LITERALS.has(node.value.trim().toLowerCase())) {
120
+ leafMustHaveValueValidate.errors = [
121
+ {
122
+ keyword: "leafMustHaveValue",
123
+ message: `Invalid token value.\n` +
124
+ `"${node.value}" is not allowed as a token value.`
125
+ }
126
+ ];
127
+ return false;
128
+ }
129
+ return true;
130
+ }
131
+ /*
132
+ * Resolves the token subtype from foundationMappingRegistry for an appearances override token.
133
+ * Translates the AJV instancePath into a mapping registry lookup by stripping the appearances
134
+ * hierarchy (appearances/<name>/mapping | variantGroups/<group>/<variant> | states/<state>)
135
+ * and any embedded states segments from the remaining token path.
136
+ *
137
+ * Inputs:
138
+ * - instancePath: AJV instance path of the token node (e.g. /btn/appearances/filled/mapping/border/color)
139
+ * - foundationMappingRegistry: registry built from foundation component mappings
140
+ * Output:
141
+ * - Returns the subtype string if found, or null
142
+ */
143
+ function resolveSubtypeFromMapping(instancePath, foundationMappingRegistry) {
144
+ const segments = instancePath.replace(/^\//, "").split("/").filter(Boolean);
145
+ if (!segments.length)
146
+ return null;
147
+ const componentName = segments[0];
148
+ const mappingRoot = foundationMappingRegistry[componentName];
149
+ if (!mappingRoot)
150
+ return null;
151
+ const appearancesIdx = segments.indexOf("appearances");
152
+ if (appearancesIdx === -1)
153
+ return null;
154
+ // Start after: appearances/<appearanceName>
155
+ let idx = appearancesIdx + 2;
156
+ // Skip the override context prefix
157
+ if (segments[idx] === "mapping") {
158
+ idx += 1;
159
+ }
160
+ else if (segments[idx] === "variantGroups") {
161
+ idx += 3; // variantGroups/<group>/<variant>
162
+ }
163
+ else if (segments[idx] === "states") {
164
+ idx += 2; // states/<stateName>
165
+ if (segments[idx] === "mapping")
166
+ idx += 1; // strip trailing mapping if present
167
+ }
168
+ // Build token path, skipping any embedded states/<stateName> segments
169
+ const tokenPath = [];
170
+ while (idx < segments.length) {
171
+ if (segments[idx] === "states") {
172
+ idx += 2;
173
+ }
174
+ else {
175
+ tokenPath.push(segments[idx]);
176
+ idx++;
177
+ }
178
+ }
179
+ // Traverse the mapping structure
180
+ let node = mappingRoot;
181
+ for (const key of tokenPath) {
182
+ if (!node || typeof node !== "object")
183
+ return null;
184
+ node = node[key];
185
+ }
186
+ return node?.__subtype ?? null;
187
+ }
188
+ /*
189
+ * Validates actual token values against platform/subtype rules.
190
+ * For tokens in the `appearances` section that lack attributes.subtype, the subtype
191
+ * is resolved from foundationMappingRegistry. Reports an error if the subtype cannot
192
+ * be determined for an appearances override.
193
+ *
194
+ * Inputs:
195
+ * - _schema: AJV keyword schema value (not used)
196
+ * - node: token node being validated
197
+ * - ctx: AJV validation context (provides instancePath)
198
+ * Output:
199
+ * - Returns true if not a leaf, rule disabled, or value is valid
200
+ * - Returns false and reports validation errors if value is invalid or subtype is unresolvable
201
+ */
202
+ function tokenValueContentValidate(_schema, node, _parentSchema, ctx) {
203
+ const { enabledRules, platform, foundationMappingRegistry } = this.context;
204
+ tokenValueContentValidate.errors = null;
205
+ // Only validate leaf tokens (objects that define a value)
206
+ if (!node || typeof node !== "object" || !("value" in node))
207
+ return true;
208
+ // Rule disabled
209
+ if (!enabledRules?.[VALIDATION_RULES.VALUES])
210
+ return true;
211
+ let subtype = node.attributes?.subtype;
212
+ if (!subtype) {
213
+ const instancePath = ctx.instancePath ?? "";
214
+ if (instancePath.includes("/appearances/")) {
215
+ // For appearance overrides, resolve subtype from the foundation mapping registry
216
+ subtype = resolveSubtypeFromMapping(instancePath, foundationMappingRegistry);
217
+ if (!subtype) {
218
+ // const fieldName = instancePath.replace(/^\//, "").replace(/\//g, ".");
219
+ // tokenValueContentValidate.errors = [
220
+ // {
221
+ // keyword: "tokenValueContent",
222
+ // message: `Cannot determine subtype for override token at "${fieldName}". No matching entry found in foundation mapping.`
223
+ // }
224
+ // ];
225
+ return true;
226
+ }
227
+ }
228
+ else {
229
+ // Base mapping token without subtype — not validatable, skip
230
+ return true;
231
+ }
232
+ }
233
+ const value = node.value;
234
+ // Reference values are validated by the references rule
235
+ if (isTokenReference(value))
236
+ return true;
237
+ const result = validateTokenValue(value, subtype, platform ?? PLATFORM.WEB);
238
+ if (!result.valid) {
239
+ const errorObj = result.errorObject;
240
+ const message = errorObj
241
+ ? `Invalid value "${errorObj.value}" for subtype "${errorObj.subtype}". Expected: ${errorObj.expectedFormat}`
242
+ : `Invalid value "${value}" for subtype "${subtype}"`;
243
+ tokenValueContentValidate.errors = [{ keyword: "tokenValueContent", message }];
244
+ return false;
245
+ }
246
+ return true;
247
+ }
248
+ /*
249
+ * Validates token string values for reference placeholders.
250
+ * Inputs:
251
+ * - _schema: AJV keyword schema value (not used, required by AJV signature)
252
+ * - tokenValue: string token value being validated
253
+ * Output:
254
+ * - Returns true if all references are valid or rule is disabled
255
+ * - Returns false and attaches validation errors if any reference is invalid
256
+ */
257
+ function validateTokenReference(_unusedSchema, tokenValue) {
258
+ const { enabledRules, globalTokenRegistry } = this.context;
259
+ validateTokenReference.errors = null;
260
+ if (!enabledRules?.[VALIDATION_RULES.REFERENCES])
261
+ return true;
262
+ const referencePlaceholders = typeof tokenValue === "string" ? tokenValue.match(/{[^}]+}/g) : null;
263
+ if (!referencePlaceholders)
264
+ return true;
265
+ const invalidReference = referencePlaceholders.find(referenceExpression => {
266
+ const rawReferencePath = referenceExpression.replace(/[{}]/g, "")?.trim();
267
+ // Reject empty references
268
+ if (!rawReferencePath) {
269
+ validateTokenReference.errors = [
270
+ {
271
+ keyword: "refExists",
272
+ message: `Empty reference is not allowed → ${referenceExpression}`
273
+ }
274
+ ];
275
+ return true;
276
+ }
277
+ // Ensure reference ends with `.value`
278
+ if (!rawReferencePath.endsWith(".value")) {
279
+ validateTokenReference.errors = [
280
+ {
281
+ keyword: "refExists",
282
+ message: `Reference must end with .value → ${referenceExpression}`
283
+ }
284
+ ];
285
+ return true;
286
+ }
287
+ const resolvedTokenPath = rawReferencePath.replace(/\.value$/, "");
288
+ // Ensure referenced token exists globally
289
+ return !globalTokenRegistry[resolvedTokenPath];
290
+ });
291
+ if (invalidReference) {
292
+ if (!validateTokenReference.errors) {
293
+ validateTokenReference.errors = [
294
+ {
295
+ keyword: "refExists",
296
+ message: `Reference does not exist → ${invalidReference}`
297
+ }
298
+ ];
299
+ }
300
+ return false;
301
+ }
302
+ return true;
303
+ }
304
+ /*
305
+ * Creates the override validation function used by the overrideContext AJV keyword.
306
+ * Inputs:
307
+ * - _schema: AJV keyword schema value (not used)
308
+ * - _parentSchema: parent schema (not used)
309
+ * Output:
310
+ * - Returns a validator function that AJV executes during validation
311
+ */
312
+ function compileOverrideKeyword() {
313
+ return function validateOverrideAgainstBaseMapping(overrideNode, ctx) {
314
+ const { enabledRules, foundationMappingRegistry } = this.context;
315
+ //STOP — do not run override validation on primitives
316
+ if (overrideNode === null || typeof overrideNode !== "object") {
317
+ return true;
318
+ }
319
+ //STOP — do not run override validation on token leaf
320
+ if ("value" in overrideNode) {
321
+ return true;
322
+ }
323
+ // Rule disabled
324
+ if (!enabledRules?.[VALIDATION_RULES.OVERRIDES])
325
+ return true;
326
+ const instancePath = ctx.instancePath;
327
+ const isOverrideRoot = instancePath.endsWith("/mapping") ||
328
+ instancePath.match(/\/states\/[^/]+$/) ||
329
+ instancePath.match(/\/variantGroups\/[^/]+\/[^/]+$/) ||
330
+ instancePath.match(/\/variantGroups\/[^/]+\/[^/]+\/states\/[^/]+$/);
331
+ if (!isOverrideRoot)
332
+ return true;
333
+ const root = ctx.rootData;
334
+ // Component name from override JSON
335
+ const componentName = Object.keys(root)[0];
336
+ // BASE STRUCTURE MUST COME FROM FOUNDATION
337
+ const baseStructure = foundationMappingRegistry[componentName];
338
+ // If foundation has no mapping, skip validation
339
+ if (!baseStructure)
340
+ return true;
341
+ const overrideErrors = [];
342
+ const basePath = deriveBasePath(componentName, instancePath);
343
+ validateOverridePathRecursively(overrideNode, baseStructure, basePath, overrideErrors, instancePath);
344
+ if (overrideErrors.length) {
345
+ validateOverrideAgainstBaseMapping.errors = overrideErrors.map(e => ({
346
+ instancePath: e.instancePath,
347
+ keyword: "overrideContext",
348
+ message: e.message
349
+ }));
350
+ return false;
351
+ }
352
+ return true;
353
+ };
354
+ }
355
+ // Resolves the root directory of foundation tokens.
356
+ function resolveFoundationTokenRootDir(platform = PLATFORM.WEB) {
357
+ if (!Object.values(PLATFORM).includes(platform)) {
358
+ throw new Error("Platform property is invalid, allowed properties are " +
359
+ Object.values(PLATFORM).join(", "));
360
+ }
361
+ // Full path of this file (validate-token.js)
362
+ const currentFilePath = fileURLToPath(import.meta.url);
363
+ // Directory containing this file (scripts/)
364
+ const currentDirPath = path.dirname(currentFilePath);
365
+ const folder = platform == PLATFORM.MOBILE ? FOLDER_TYPE.MOBILE : FOLDER_TYPE.WEB;
366
+ return path.resolve(currentDirPath, "../../src/tokens", folder);
367
+ }
368
+ /*
369
+ * Validates override paths against the foundation component mapping recursively.
370
+ * Inputs:
371
+ * - overrideNode: override token node being validated
372
+ * - baseNode: corresponding foundation mapping node
373
+ * - path: dot-separated path representing the current base mapping location
374
+ * - overrideErrors: array used to collect override validation errors
375
+ * - instancePath: AJV instance path of the current override node
376
+ * Output:
377
+ * - Populates the overrideErrors array with invalid override path errors
378
+ */
379
+ function validateOverridePathRecursively(overrideNode, baseNode, path, overrideErrors, instancePath) {
380
+ if (path.endsWith(".states")) {
381
+ return;
382
+ }
383
+ //stop recursion at token leaf object
384
+ if (overrideNode &&
385
+ typeof overrideNode === "object" &&
386
+ ("value" in overrideNode || "type" in overrideNode || "attributes" in overrideNode)) {
387
+ return;
388
+ }
389
+ // Base missing
390
+ if (!baseNode) {
391
+ overrideErrors.push({
392
+ instancePath,
393
+ message: `Override path does NOT exist in base mapping → ${path}`
394
+ });
395
+ return;
396
+ }
397
+ // Override must be object
398
+ if (overrideNode === null || typeof overrideNode !== "object") {
399
+ return;
400
+ }
401
+ // BASE IS LEAF
402
+ if (baseNode.__leaf) {
403
+ for (const key of Object.keys(overrideNode || {})) {
404
+ if (!["value", "type", "attributes"].includes(key)) {
405
+ overrideErrors.push({
406
+ instancePath: `${instancePath}/${key}`,
407
+ message: `Override path does NOT exist in base mapping → ${path}.${key}`
408
+ });
409
+ }
410
+ }
411
+ return;
412
+ }
413
+ for (const key of Object.keys(overrideNode)) {
414
+ // NEVER validate "states" structurally
415
+ if (key === "states") {
416
+ continue;
417
+ }
418
+ if (!baseNode[key]) {
419
+ overrideErrors.push({
420
+ instancePath: `${instancePath}/${key}`,
421
+ message: `Override path does NOT exist in base mapping → ${path}.${key}`
422
+ });
423
+ continue;
424
+ }
425
+ validateOverridePathRecursively(overrideNode[key], baseNode[key], `${path}.${key}`, overrideErrors, `${instancePath}/${key}`);
426
+ }
427
+ }
428
+ /*
429
+ * Registers all token paths that define a concrete value by traversing a token JSON tree.
430
+ * Inputs:
431
+ * - tokenNode: token JSON object to traverse
432
+ * - parentPath: dot-separated parent token path (used during recursion)
433
+ * Output:
434
+ * - Populates the global token registry with resolved token paths
435
+ */
436
+ function registerTokenDefinitionsRecursively(tokenNode, registry, parentPath = "") {
437
+ if (!tokenNode || typeof tokenNode !== "object")
438
+ return;
439
+ Object.keys(tokenNode).forEach(tokenKey => {
440
+ const currentTokenPath = parentPath
441
+ ? `${parentPath}.${tokenKey}`
442
+ : tokenKey;
443
+ const tokenValue = tokenNode[tokenKey];
444
+ // Register tokens that define a concrete value
445
+ if (tokenValue &&
446
+ typeof tokenValue === "object" &&
447
+ "value" in tokenValue) {
448
+ if (!registry[currentTokenPath]) {
449
+ registry[currentTokenPath] = true;
450
+ }
451
+ }
452
+ // Continue traversal for nested token objects
453
+ if (tokenValue && typeof tokenValue === "object") {
454
+ registerTokenDefinitionsRecursively(tokenValue, registry, currentTokenPath);
455
+ }
456
+ });
457
+ }
458
+ /*
459
+ * Registers all discovered token definitions into the global token registry.
460
+ * Inputs:
461
+ * - directoryPath: root directory to scan for token JSON files
462
+ * Output:
463
+ * - Registers all discovered token definitions into the global token registry
464
+ */
465
+ function collectAllTokenDefinitionsFromDir(directoryPath, registry) {
466
+ fs.readdirSync(directoryPath).forEach(entryName => {
467
+ const entryPath = path.join(directoryPath, entryName);
468
+ const entryStats = fs.statSync(entryPath);
469
+ // Recurse into subdirectories
470
+ if (entryStats.isDirectory()) {
471
+ return collectAllTokenDefinitionsFromDir(entryPath, registry);
472
+ }
473
+ // Process only JSON token files
474
+ if (!entryName.endsWith(".json"))
475
+ return;
476
+ const tokenFileContent = JSON.parse(fs.readFileSync(entryPath, "utf8"));
477
+ registerTokenDefinitionsRecursively(tokenFileContent, registry);
478
+ });
479
+ }
480
+ //Builds the foundation global tokens directory path and passes it for token definition collection.
481
+ function collectFoundationGlobalTokens(foundationRootDir) {
482
+ const registry = {};
483
+ const globalDir = path.join(foundationRootDir, "global");
484
+ collectAllTokenDefinitionsFromDir(globalDir, registry);
485
+ return registry;
486
+ }
487
+ //Builds the foundation components directory path and collects component mapping structures for override validation.
488
+ function collectFoundationComponentMappings(foundationRootDir) {
489
+ const registry = {};
490
+ const componentsDir = path.join(foundationRootDir, "components");
491
+ collectFoundationMappings(componentsDir, registry);
492
+ return registry;
493
+ }
494
+ /*
495
+ * Determines which properties are allowed for a given JSON path.
496
+ * Inputs:
497
+ * - instancePath: AJV instance path of the current validation error
498
+ * Output:
499
+ * - Returns a list of allowed property names for the path
500
+ * - Returns undefined if no specific rule applies
501
+ */
502
+ function resolveAllowedProperties(instancePath) {
503
+ const normalizedPath = instancePath
504
+ ? instancePath.replace(/^\//, "").replace(/\//g, ".")
505
+ : "";
506
+ for (const rule of ALLOWED_PROPERTIES_BY_CONTEXT) {
507
+ if (rule.match(normalizedPath)) {
508
+ return rule.allowed;
509
+ }
510
+ }
511
+ return undefined;
512
+ }
513
+ /*
514
+ * Resolves which validation rules are enabled for the current validation run.
515
+ * Inputs: - validationOptions: configuration that may specify enabled validation rules
516
+ * Output: - Returns an object mapping each validation rule to a boolean flag
517
+ */
518
+ function resolveEnabledValidationRules({ rules = [], isFoundationValidation = false } = {}) {
519
+ const allAvailableRules = Object.values(VALIDATION_RULES);
520
+ // Define rules when no rules are set explicitly
521
+ const defaultEnabledRules = new Set([VALIDATION_RULES.STRUCTURE, VALIDATION_RULES.METADATA]);
522
+ return Object.fromEntries(allAvailableRules.map(rule => {
523
+ if (isFoundationValidation) {
524
+ //Excluding reference rule for foundation css
525
+ if (rule === VALIDATION_RULES.REFERENCES) {
526
+ return [rule, false];
527
+ }
528
+ return [rule, true];
529
+ }
530
+ //If rules set explicity then enable only those rules
531
+ if (rules.length > 0)
532
+ return [rule, rules.includes(rule)];
533
+ //Enable only if NOT in the default enabled set of rules for component validation
534
+ return [rule, !defaultEnabledRules.has(rule)];
535
+ }));
536
+ }
537
+ /*
538
+ * Processes AJV validation errors and converts them into normalized validation errors.
539
+ * Inputs:
540
+ * - validate: compiled AJV validation function containing validation errors
541
+ * - filePath: path of the JSON file being validated (optional)
542
+ */
543
+ function handleValidationErrors({ validate, filePath }, validationErrors) {
544
+ const fileName = filePath ? filePath.split("/").pop() : undefined;
545
+ if (validate.errors) {
546
+ validate.errors.forEach(ajvError => {
547
+ const { fieldName, errorMessage, errorMetadata } = extractValidationErrorDetails(ajvError);
548
+ // Default error object
549
+ let errorObj = {
550
+ errorType: ERROR_TYPES.INVALID_VALUE,
551
+ fieldName,
552
+ message: errorMessage,
553
+ fileName
554
+ };
555
+ switch (ajvError.keyword) {
556
+ // RULE-3 → Reference errors
557
+ case "refExists":
558
+ errorObj.errorType = ERROR_TYPES.INVALID_REFERENCE;
559
+ break;
560
+ // RULE-4 → Invalid override fields
561
+ case "overrideContext":
562
+ errorObj.errorType = ERROR_TYPES.INVALID_FIELD;
563
+ break;
564
+ // Leaf / enum value validation
565
+ case "leafMustHaveValue":
566
+ case "enum":
567
+ if (errorMetadata.allowedValues) {
568
+ errorObj.allowedValues = errorMetadata.allowedValues;
569
+ }
570
+ break;
571
+ // TYPE errors → structure or value
572
+ case "type": {
573
+ const expectedType = ajvError.params?.type;
574
+ const actualType = Array.isArray(ajvError.data)
575
+ ? "array"
576
+ : typeof ajvError.data;
577
+ if (expectedType === "object") {
578
+ errorObj.errorType = ERROR_TYPES.INVALID_STRUCTURE;
579
+ errorObj.message = `Expected a token object, but found ${actualType}`;
580
+ }
581
+ break;
582
+ }
583
+ // JSON structure issues
584
+ case "required":
585
+ case "minProperties":
586
+ case "maxProperties":
587
+ errorObj.errorType = ERROR_TYPES.INVALID_STRUCTURE;
588
+ break;
589
+ case "additionalProperties":
590
+ errorObj.errorType = ERROR_TYPES.INVALID_STRUCTURE;
591
+ const allowedValues = resolveAllowedProperties(ajvError.instancePath);
592
+ if (allowedValues) {
593
+ errorObj.allowedValues = allowedValues;
594
+ }
595
+ break;
596
+ default:
597
+ // RULE-2 → Missing metadata
598
+ if (errorMessage.includes('must match "then" schema')) {
599
+ errorObj.errorType = ERROR_TYPES.MISSING_FIELD;
600
+ errorObj.message =
601
+ "Missing required metadata: type, attributes.subtype, attributes.description";
602
+ }
603
+ }
604
+ if (VALUE_RELATED_KEYWORDS.has(ajvError.keyword)) {
605
+ errorObj.actualValue = ajvError.data;
606
+ }
607
+ pushError(errorObj, validationErrors);
608
+ });
609
+ }
610
+ }
611
+ /*
612
+ * Extracts readable validation error details from an AJV error object.
613
+ *
614
+ * Input:
615
+ * - ajvError: a single validation error produced by AJV
616
+ *
617
+ * Output:
618
+ * - fieldName: dot-separated path of the invalid field
619
+ * - errorMessage: human-readable validation message
620
+ * - errorMetadata: additional details such as allowed values (when applicable)
621
+ */
622
+ function extractValidationErrorDetails(ajvError) {
623
+ const fieldName = ajvError.instancePath
624
+ ? ajvError.instancePath.replace(/^\//, "").replace(/\//g, ".")
625
+ : "(root)";
626
+ const errorMessage = ajvError.message || "Invalid token value";
627
+ const errorMetadata = {};
628
+ // ENUM-specific metadata
629
+ if (ajvError.keyword === "enum" && Array.isArray(ajvError.params?.allowedValues)) {
630
+ errorMetadata.allowedValues = ajvError.params.allowedValues;
631
+ }
632
+ return {
633
+ fieldName,
634
+ errorMessage,
635
+ errorMetadata
636
+ };
637
+ }
638
+ //Validates the token type against supported values and normalizes it.
639
+ function validateAndNormalizeTokenType(tokenType) {
640
+ if (typeof tokenType !== "string") {
641
+ throw new Error(`tokenType must be a string`);
642
+ }
643
+ const normalizedTokenType = tokenType.toLowerCase();
644
+ if (!TOKEN_TYPE_CONFIG[normalizedTokenType]) {
645
+ throw new Error(`Invalid tokenType "${tokenType}". Allowed values: ${Object.keys(TOKEN_TYPE_CONFIG).join(", ")}`);
646
+ }
647
+ return normalizedTokenType;
648
+ }
649
+ /*
650
+ * Collects structural mapping definitions for all foundation components.
651
+ * Input:
652
+ * - directoryPath: root directory containing foundation component token files
653
+ *
654
+ * Output:
655
+ * - Populates the foundation mapping registry with structure-only representations of each component’s mapping
656
+ */
657
+ function collectFoundationMappings(directoryPath, componentsMappingregistry = {}) {
658
+ // Read all entries(files + folders ) in the directory
659
+ fs.readdirSync(directoryPath).forEach(entryName => {
660
+ // Absolute path to the current entry
661
+ const entryPath = path.join(directoryPath, entryName);
662
+ // File system metadata (file or directory)
663
+ const entryStats = fs.statSync(entryPath);
664
+ // Recurse into subdirectories
665
+ if (entryStats.isDirectory()) {
666
+ collectFoundationMappings(entryPath, componentsMappingregistry);
667
+ return;
668
+ }
669
+ if (!entryName.endsWith(".json"))
670
+ return;
671
+ const componentJson = JSON.parse(fs.readFileSync(entryPath, "utf8"));
672
+ for (const componentName of Object.keys(componentJson)) {
673
+ const mapping = componentJson[componentName]?.mapping;
674
+ if (!mapping)
675
+ continue;
676
+ componentsMappingregistry[componentName] = extractMappingStructure(mapping);
677
+ }
678
+ });
679
+ return componentsMappingregistry;
680
+ }
681
+ /*
682
+ * Extracts the structural shape of a foundation component mapping for override validation.
683
+ *
684
+ * Input:
685
+ * - componentMapping / node: the `mapping` object of a foundation component token
686
+ *
687
+ * Output:
688
+ * - Returns a structure-only representation of the mapping
689
+ * - Leaf nodes are marked to indicate valid override endpoints
690
+ */
691
+ function extractMappingStructure(node) {
692
+ if (!node || typeof node !== "object") {
693
+ return { __leaf: true };
694
+ }
695
+ const keys = Object.keys(node).filter(k => !["value", "type", "attributes", "states"].includes(k));
696
+ // LEAF TOKEN
697
+ if (keys.length === 0) {
698
+ const leaf = { __leaf: true };
699
+ if (node.attributes?.subtype)
700
+ leaf.__subtype = node.attributes.subtype;
701
+ return leaf;
702
+ }
703
+ const structure = {};
704
+ for (const key of keys) {
705
+ structure[key] = extractMappingStructure(node[key]);
706
+ }
707
+ return structure;
708
+ }
709
+ //Finds the correct starting point for validating an override.
710
+ function deriveBasePath(componentName, instancePath) {
711
+ if (instancePath.includes("/variantGroups")) {
712
+ return `${componentName}.variantGroups`;
713
+ }
714
+ if (instancePath.includes("/states")) {
715
+ return `${componentName}.states`;
716
+ }
717
+ return `${componentName}.mapping`;
718
+ }
719
+ /*
720
+ * Collects token definitions from an array of JSON objects.
721
+ * Inputs: - jsonArray: an array of token JSON objects
722
+ * Output: Registers all token paths that define a concrete value into the internal global token registry
723
+ */
724
+ function collectTokenDefinitionsFromJsonArray(registry, jsonArray = []) {
725
+ if (!Array.isArray(jsonArray))
726
+ return;
727
+ jsonArray.forEach((json) => {
728
+ if (!json || typeof json !== "object")
729
+ return;
730
+ registerTokenDefinitionsRecursively(json, registry);
731
+ });
732
+ }
733
+ /*
734
+ * Validates a single token JSON object (global or component).
735
+ * Inputs:
736
+ * - json: The token JSON object to validate.
737
+ * - tokenType: The type of token being validated ("global" or "component").
738
+ * - validationConfig:Controls which validation rules are enabled for this run.
739
+ * - rules: optional list of rule names to enable explicitly
740
+ * - isFoundationValidation: when true, all rules are enabled
741
+ * - externalGlobalTokenJsons: Optional additional global token JSONs whose token values can be referenced during validation.
742
+ * Output:Validation errors are collected internally and can be retrieved using getValidationErrors().
743
+ * - In the next iteration, project directory overrides will be used instead of externalGlobalTokenJsons.
744
+ */
745
+ export class TokenValidator {
746
+ constructor(args) {
747
+ this.externalGlobalTokenJsons = args.externalGlobalTokenJsons || [];
748
+ this.validationErrors = [];
749
+ this.ajvEngine = new TokenAjvEngine();
750
+ this.ajv = this.ajvEngine.getValidatorEngine();
751
+ this.platform = args.platform ?? PLATFORM.WEB;
752
+ this.foundationTokensDir = resolveFoundationTokenRootDir(this.platform);
753
+ const globalTokenRegistry = collectFoundationGlobalTokens(this.foundationTokensDir);
754
+ if (Array.isArray(this.externalGlobalTokenJsons)) {
755
+ collectTokenDefinitionsFromJsonArray(globalTokenRegistry, this.externalGlobalTokenJsons);
756
+ }
757
+ this.ajv.context.globalTokenRegistry = globalTokenRegistry;
758
+ this.ajv.context.platform = this.platform;
759
+ }
760
+ // Validates a token JSON object against the appropriate schema and rules based on its type.
761
+ validateTokenJson({ json, validationConfig = {}, tokenType }) {
762
+ if (!json || typeof json !== "object") {
763
+ throw new Error("validateTokenJson requires a valid JSON object");
764
+ }
765
+ // Reset validation errors for each run
766
+ this.validationErrors.length = 0;
767
+ const resolvedTokenType = validateAndNormalizeTokenType(tokenType);
768
+ const tokenConfig = TOKEN_TYPE_CONFIG[resolvedTokenType];
769
+ this.ajv.context.enabledRules = tokenConfig.resolveRules(validationConfig);
770
+ this.ajv.context.foundationMappingRegistry = {};
771
+ if (tokenType === TOKEN_TYPES.COMPONENT) {
772
+ this.ajv.context.foundationMappingRegistry = collectFoundationComponentMappings(this.foundationTokensDir);
773
+ }
774
+ const schema = tokenConfig.getSchema(this.ajv.context.enabledRules);
775
+ const validate = this.ajv.compile(schema);
776
+ validate(json);
777
+ handleValidationErrors({ validate }, this.validationErrors);
778
+ }
779
+ getValidationErrors() {
780
+ return this.validationErrors;
781
+ }
782
+ }
783
+ // Custom AJV engine class to encapsulate validator instance and custom keyword registrations
784
+ class TokenAjvEngine {
785
+ constructor() {
786
+ this.validatorEngine = new Ajv({ allErrors: true, verbose: true, allowMatchingProperties: true });
787
+ this.validatorEngine.context = {
788
+ enabledRules: null,
789
+ globalTokenRegistry: {},
790
+ foundationMappingRegistry: {},
791
+ platform: PLATFORM.WEB
792
+ };
793
+ this.registerCustomValidations();
794
+ }
795
+ registerCustomValidations() {
796
+ const CUSTOM_VALIDATIONS = [
797
+ {
798
+ keyword: "refExists",
799
+ type: "string",
800
+ errors: true,
801
+ validate: validateTokenReference
802
+ },
803
+ {
804
+ keyword: "overrideContext",
805
+ type: "object",
806
+ errors: true,
807
+ compile: compileOverrideKeyword
808
+ },
809
+ {
810
+ keyword: "leafMustHaveValue",
811
+ type: ["object", "string"],
812
+ errors: true,
813
+ validate: leafMustHaveValueValidate
814
+ },
815
+ {
816
+ keyword: "tokenValueContent",
817
+ type: "object",
818
+ errors: true,
819
+ validate: tokenValueContentValidate
820
+ }
821
+ ];
822
+ CUSTOM_VALIDATIONS.forEach(k => this.validatorEngine.addKeyword(k));
823
+ }
824
+ getValidatorEngine() {
825
+ return this.validatorEngine;
826
+ }
827
+ }
828
+ /*
829
+ Validates an entire folder hierarchy of token JSON files.
830
+ * Constructor inputs:
831
+ * 1) validationScope:
832
+ * - Determines the validation mode.
833
+ * - Possible values:
834
+ * - VALIDATION_SCOPE.FOUNDATION → validates foundation CSS tokens
835
+ * - VALIDATION_SCOPE.PROJECT → validates project override tokens
836
+ *
837
+ * 2) projectOverrideDirs - Exact directories where project token validation should run.
838
+ *
839
+ * 3) isWebFolder:
840
+ * - Indicates whether validation should target the web or mobile
841
+ * foundation token folder.
842
+ * - Used to resolve the correct foundation token root directory.
843
+ *
844
+ */
845
+ export class TokenFolderValidator {
846
+ constructor(args) {
847
+ this.validationScope = args.validationScope || VALIDATION_SCOPE.PROJECT;
848
+ this.projectOverrideDirs = args.projectOverrideDirs || [];
849
+ this.validationErrors = [];
850
+ this.ajvEngine = new TokenAjvEngine();
851
+ this.ajv = this.ajvEngine.getValidatorEngine();
852
+ this.platform = args.platform ?? PLATFORM.WEB;
853
+ this.foundationTokensDir = resolveFoundationTokenRootDir(this.platform);
854
+ this.createAjvContext();
855
+ this.resolvedValidationTargets = this.resolveValidationTargets();
856
+ }
857
+ createAjvContext() {
858
+ this.isFoundation = this.validationScope === VALIDATION_SCOPE.FOUNDATION;
859
+ this.isProject = this.validationScope === VALIDATION_SCOPE.PROJECT;
860
+ this.ajv.context.platform = this.platform;
861
+ if (this.isProject && this.projectOverrideDirs.length === 0) {
862
+ pushError({
863
+ errorType: ERROR_TYPES.BUILD_ERROR,
864
+ fieldName: "Root",
865
+ message: "Project validation requires at least one project override directory, but none were provided."
866
+ }, this.validationErrors);
867
+ return;
868
+ }
869
+ this.ajv.context.foundationMappingRegistry = collectFoundationComponentMappings(this.foundationTokensDir);
870
+ const globalTokenRegistry = collectFoundationGlobalTokens(this.foundationTokensDir);
871
+ if (this.isProject) {
872
+ this.projectOverrideDirs.forEach(projectDir => {
873
+ const { globalDir } = this.resolveProjectOverrideDirs(projectDir);
874
+ if (globalDir && fs.existsSync(globalDir)) {
875
+ collectAllTokenDefinitionsFromDir(globalDir, globalTokenRegistry);
876
+ }
877
+ });
878
+ }
879
+ this.ajv.context.globalTokenRegistry = globalTokenRegistry;
880
+ }
881
+ // Resolves which folders should be validated.
882
+ resolveValidationTargets() {
883
+ const validationTargets = [];
884
+ if (this.isProject) {
885
+ this.projectOverrideDirs.forEach(projectDir => {
886
+ if (!fs.existsSync(projectDir))
887
+ return;
888
+ const { globalDir, componentsDir } = this.resolveProjectOverrideDirs(projectDir);
889
+ if (globalDir && fs.existsSync(globalDir)) {
890
+ validationTargets.push({ type: TOKEN_TYPES.GLOBAL, dir: globalDir });
891
+ }
892
+ if (componentsDir && fs.existsSync(componentsDir)) {
893
+ validationTargets.push({ type: TOKEN_TYPES.COMPONENT, dir: componentsDir });
894
+ }
895
+ });
896
+ }
897
+ //Resolve folders to validate
898
+ if (this.isFoundation) {
899
+ const globalDir = path.join(this.foundationTokensDir, "global");
900
+ const componentsDir = path.join(this.foundationTokensDir, "components");
901
+ validationTargets.push({ type: TOKEN_TYPES.GLOBAL, dir: globalDir });
902
+ validationTargets.push({ type: TOKEN_TYPES.COMPONENT, dir: componentsDir });
903
+ }
904
+ return validationTargets;
905
+ }
906
+ /* Main entry point that validates all token JSON files in the resolved folders
907
+ Inputs :
908
+ 1) validationConfig:Controls which validation rules are enabled for this run.
909
+ * - rules: optional list of rule names to enable explicitly
910
+ * - isFoundationValidation: when true, all rules are enabled
911
+ */
912
+ validateFolder(validationConfig = {}) {
913
+ // Nothing to validate
914
+ if (this.isProject && this.projectOverrideDirs.length === 0) {
915
+ return;
916
+ }
917
+ // Clear previous errors
918
+ this.validationErrors.length = 0;
919
+ this.resolvedValidationTargets.forEach(({ type, dir }) => {
920
+ const tokenConfig = TOKEN_TYPE_CONFIG[type];
921
+ // Enable rules for this run
922
+ this.ajv.context.enabledRules = tokenConfig.resolveRules({
923
+ ...validationConfig,
924
+ isFoundationValidation: this.isFoundation
925
+ });
926
+ const schema = tokenConfig.getSchema(this.ajv.context.enabledRules);
927
+ const validate = this.ajv.compile(schema);
928
+ this.traverseAndValidateJsonFiles(dir, validate);
929
+ });
930
+ }
931
+ // Returns all collected validation errors.
932
+ getValidationErrors() {
933
+ return this.validationErrors;
934
+ }
935
+ //Resolves the available global and component override directories for a project.
936
+ resolveProjectOverrideDirs(overridesDir) {
937
+ const globalDir = path.join(overridesDir, "global");
938
+ const componentsDir = path.join(overridesDir, "components");
939
+ return {
940
+ globalDir: fs.existsSync(globalDir) ? globalDir : null,
941
+ componentsDir: fs.existsSync(componentsDir) ? componentsDir : null
942
+ };
943
+ }
944
+ /*
945
+ * Validates a single JSON file using schema and custom validation rules.
946
+ * Inputs:
947
+ * - filePath: path to the JSON file being validated
948
+ * - validate: compiled AJV validation function
949
+ * Output:
950
+ * - Parses and validates the file
951
+ * - Collects validation errors if any are found
952
+ */
953
+ validateFile(filePath, validate) {
954
+ const { ok, json, error } = this.parseJsonSafely(filePath);
955
+ const file = path.basename(filePath);
956
+ //JSON STRUCTURE VALIDATION
957
+ if (!ok) {
958
+ pushError({
959
+ errorType: ERROR_TYPES.INVALID_JSON,
960
+ fieldName: "(root)",
961
+ message: error.message,
962
+ fileName: file
963
+ });
964
+ return; // don't run AJV
965
+ }
966
+ validate(json);
967
+ handleValidationErrors({
968
+ validate,
969
+ filePath
970
+ }, this.validationErrors);
971
+ }
972
+ /*
973
+ * Safely reads and parses a JSON file without throwing runtime errors.
974
+ * Inputs: filePath: path to the JSON file
975
+ * Output: Returns an object with either the parsed JSON or the parsing error
976
+ */
977
+ parseJsonSafely(filePath) {
978
+ try {
979
+ const content = fs.readFileSync(filePath, "utf8");
980
+ return { ok: true, json: JSON.parse(content) };
981
+ }
982
+ catch (err) {
983
+ return { ok: false, error: err };
984
+ }
985
+ }
986
+ /*
987
+ * Recursively traverses a directory and validates all JSON files found.
988
+ * Inputs:
989
+ * - dir: root directory to traverse
990
+ * - validate: compiled AJV validation function
991
+ * Output: - Validates each JSON file and collects validation errors
992
+ */
993
+ traverseAndValidateJsonFiles(dir, validate, visitedSet = new Set()) {
994
+ // Resolve the real path of the current directory
995
+ const realDir = fs.realpathSync(dir);
996
+ // If we’ve already visited this path, skip it to avoid cycles
997
+ if (visitedSet.has(realDir))
998
+ return;
999
+ visitedSet.add(realDir);
1000
+ // Read directory contents
1001
+ fs.readdirSync(dir).forEach(name => {
1002
+ const full = path.join(dir, name);
1003
+ let stat;
1004
+ try {
1005
+ stat = fs.statSync(full);
1006
+ }
1007
+ catch (err) {
1008
+ console.warn(`Skipping inaccessible file: ${full}`);
1009
+ return;
1010
+ }
1011
+ if (stat.isDirectory()) {
1012
+ this.traverseAndValidateJsonFiles(full, validate, visitedSet);
1013
+ }
1014
+ else if (name.endsWith(".json")) {
1015
+ this.validateFile(full, validate);
1016
+ }
1017
+ });
1018
+ }
1019
+ /**
1020
+ * Generates a Markdown validation report summarizing all errors.
1021
+ * Output:
1022
+ * - Creates a README-style markdown file listing validation errors in generated folder
1023
+ */
1024
+ generateValidationReport(outputDir) {
1025
+ // Default to <project-root>/generated if outputDir is not provided
1026
+ const baseDir = outputDir || path.join(process.cwd(), "generated");
1027
+ // Ensure folder exists
1028
+ if (!fs.existsSync(baseDir)) {
1029
+ fs.mkdirSync(baseDir, { recursive: true });
1030
+ }
1031
+ if (!this.validationErrors.length) {
1032
+ const content = `# Token Validation Report\n\n No validation errors found.\n`;
1033
+ fs.writeFileSync(path.join(baseDir, "VALIDATION_REPORT.md"), content);
1034
+ return;
1035
+ }
1036
+ const groupedByFile = {};
1037
+ // Group errors by file
1038
+ this.validationErrors.forEach(err => {
1039
+ const file = err.fileName || "(unknown file)";
1040
+ if (!groupedByFile[file])
1041
+ groupedByFile[file] = [];
1042
+ groupedByFile[file].push(err);
1043
+ });
1044
+ let md = `# Token Validation Report\n\n`;
1045
+ md += `Generated on: ${new Date().toLocaleString()}\n\n`;
1046
+ md += `Total Errors: **${this.validationErrors.length}**\n\n`;
1047
+ md += `---\n`;
1048
+ Object.entries(groupedByFile).forEach(([file, errors]) => {
1049
+ md += `## ${file} – ${errors.length} error${errors.length > 1 ? "s" : ""}\n\n`;
1050
+ errors.forEach((err, index) => {
1051
+ md += `### ${index + 1}. ${err.errorType}\n`;
1052
+ md += `- **Path**: \`${err.fieldName}\`\n`;
1053
+ md += `- **Message**: ${err.message}\n`;
1054
+ if (err.allowedValues) {
1055
+ md += `- **Allowed Values**: ${err.allowedValues.join(", ")}\n`;
1056
+ }
1057
+ if (err.actualValue) {
1058
+ md += `- **Actual value**: ${err.actualValue}\n `;
1059
+ }
1060
+ md += `\n`;
1061
+ });
1062
+ md += `---\n`;
1063
+ });
1064
+ const reportName = this.platform === PLATFORM.MOBILE
1065
+ ? "mobile_tokens_validation_report.md"
1066
+ : "web_tokens_validation_report.md";
1067
+ fs.writeFileSync(path.join(baseDir, reportName), md, "utf8");
1068
+ }
1069
+ }
1070
+ //# sourceMappingURL=validate-token.js.map