@design-factory/design-factory 20.0.2 → 21.0.0-next.1

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 (283) hide show
  1. package/README.md +2 -11
  2. package/fesm2022/design-factory.mjs +889 -1113
  3. package/fesm2022/design-factory.mjs.map +1 -1
  4. package/package.json +22 -51
  5. package/schematics/migrations/18_0_0/stepper-classes-18.0.0/index.js +1 -1
  6. package/schematics/migrations/21_0_0/ag-grid-neutral-header/index.d.ts +6 -0
  7. package/schematics/migrations/21_0_0/ag-grid-neutral-header/index.js +33 -0
  8. package/schematics/migrations/21_0_0/deleted-sass-vars/files/removed-vars.json +53 -0
  9. package/schematics/migrations/21_0_0/deleted-sass-vars/files/vars-with-value.json +4274 -0
  10. package/schematics/migrations/21_0_0/deleted-sass-vars/index.d.ts +7 -0
  11. package/schematics/migrations/21_0_0/deleted-sass-vars/index.js +90 -0
  12. package/schematics/migrations/21_0_0/style-import-package/index.d.ts +7 -0
  13. package/schematics/migrations/21_0_0/style-import-package/index.js +85 -0
  14. package/schematics/migrations/21_0_0/toast-classes-21.0/index.d.ts +2 -0
  15. package/schematics/migrations/21_0_0/toast-classes-21.0/index.js +36 -0
  16. package/schematics/migrations/migration.json +20 -0
  17. package/schematics/migrations/utils/add-dependencies.d.ts +3 -0
  18. package/schematics/migrations/utils/add-dependencies.js +41 -0
  19. package/schematics/migrations/utils/component-resource-collector.d.ts +3 -1
  20. package/schematics/migrations/utils/component-resource-collector.js +9 -4
  21. package/schematics/migrations/utils/style-updater.js +2 -2
  22. package/schematics/migrations/utils/template-updater.js +2 -2
  23. package/schematics/ng-add/index.js +12 -50
  24. package/{index.d.ts → types/design-factory.d.ts} +48 -71
  25. package/assets/.gitkeep +0 -0
  26. package/assets/fonts/amadeus-bold/amadeus-bold.woff +0 -0
  27. package/assets/fonts/amadeus-bold/amadeus-bold.woff2 +0 -0
  28. package/assets/fonts/amadeus-full/amadeus-full-bold.woff +0 -0
  29. package/assets/fonts/amadeus-full/amadeus-full-bold.woff2 +0 -0
  30. package/assets/fonts/amadeus-full/amadeus-full-bolditalic.woff +0 -0
  31. package/assets/fonts/amadeus-full/amadeus-full-bolditalic.woff2 +0 -0
  32. package/assets/fonts/amadeus-full/amadeus-full-italic.woff +0 -0
  33. package/assets/fonts/amadeus-full/amadeus-full-italic.woff2 +0 -0
  34. package/assets/fonts/amadeus-full/amadeus-full-light.woff +0 -0
  35. package/assets/fonts/amadeus-full/amadeus-full-light.woff2 +0 -0
  36. package/assets/fonts/amadeus-full/amadeus-full-lightitalic.woff +0 -0
  37. package/assets/fonts/amadeus-full/amadeus-full-lightitalic.woff2 +0 -0
  38. package/assets/fonts/amadeus-full/amadeus-full-regular.woff +0 -0
  39. package/assets/fonts/amadeus-full/amadeus-full-regular.woff2 +0 -0
  40. package/assets/fonts/amadeus-full/amadeus-full-thin.woff +0 -0
  41. package/assets/fonts/amadeus-full/amadeus-full-thin.woff2 +0 -0
  42. package/assets/fonts/amadeus-full/amadeus-full-thinitalic.woff +0 -0
  43. package/assets/fonts/amadeus-full/amadeus-full-thinitalic.woff2 +0 -0
  44. package/assets/fonts/amadeus-neue/bold/AmadeusNeueWeb-Bold.woff +0 -0
  45. package/assets/fonts/amadeus-neue/bold/AmadeusNeueWeb-Bold.woff2 +0 -0
  46. package/assets/fonts/amadeus-neue/bold/AmadeusNeueWeb-BoldItalic.woff +0 -0
  47. package/assets/fonts/amadeus-neue/bold/AmadeusNeueWeb-BoldItalic.woff2 +0 -0
  48. package/assets/fonts/amadeus-neue/light/AmadeusNeueWeb-Light.woff +0 -0
  49. package/assets/fonts/amadeus-neue/light/AmadeusNeueWeb-Light.woff2 +0 -0
  50. package/assets/fonts/amadeus-neue/light/AmadeusNeueWeb-LightItalic.woff +0 -0
  51. package/assets/fonts/amadeus-neue/light/AmadeusNeueWeb-LightItalic.woff2 +0 -0
  52. package/assets/fonts/amadeus-neue/medium/AmadeusNeueWeb-Medium.woff +0 -0
  53. package/assets/fonts/amadeus-neue/medium/AmadeusNeueWeb-Medium.woff2 +0 -0
  54. package/assets/fonts/amadeus-neue/medium/AmadeusNeueWeb-MediumItalic.woff +0 -0
  55. package/assets/fonts/amadeus-neue/medium/AmadeusNeueWeb-MediumItalic.woff2 +0 -0
  56. package/assets/fonts/amadeus-neue/regular/AmadeusNeueWeb-Regular.woff +0 -0
  57. package/assets/fonts/amadeus-neue/regular/AmadeusNeueWeb-Regular.woff2 +0 -0
  58. package/assets/fonts/amadeus-neue/regular/AmadeusNeueWeb-RegularItalic.woff +0 -0
  59. package/assets/fonts/amadeus-neue/regular/AmadeusNeueWeb-RegularItalic.woff2 +0 -0
  60. package/assets/fonts/amadeus-regular/amadeus-regular.woff +0 -0
  61. package/assets/fonts/amadeus-regular/amadeus-regular.woff2 +0 -0
  62. package/assets/fonts/amadeus-thin/amadeus-thin.woff +0 -0
  63. package/assets/fonts/amadeus-thin/amadeus-thin.woff2 +0 -0
  64. package/assets/fonts/df-icons/df-icons-light.woff2 +0 -0
  65. package/assets/fonts/df-icons/df-icons-solid.woff2 +0 -0
  66. package/assets/fonts/font-awesome/fa-brands-400.woff2 +0 -0
  67. package/assets/fonts/font-awesome/fa-light-300.woff2 +0 -0
  68. package/assets/fonts/font-awesome/fa-solid-900.woff2 +0 -0
  69. package/assets/fonts/noto/notosans-bold.woff +0 -0
  70. package/assets/fonts/noto/notosans-bold.woff2 +0 -0
  71. package/assets/fonts/noto/notosans-bolditalic.woff +0 -0
  72. package/assets/fonts/noto/notosans-bolditalic.woff2 +0 -0
  73. package/assets/fonts/noto/notosans-italic.woff +0 -0
  74. package/assets/fonts/noto/notosans-italic.woff2 +0 -0
  75. package/assets/fonts/noto/notosans-light.woff +0 -0
  76. package/assets/fonts/noto/notosans-light.woff2 +0 -0
  77. package/assets/fonts/noto/notosans-lightitalic.woff +0 -0
  78. package/assets/fonts/noto/notosans-lightitalic.woff2 +0 -0
  79. package/assets/fonts/noto/notosans-regular.woff +0 -0
  80. package/assets/fonts/noto/notosans-regular.woff2 +0 -0
  81. package/assets/fonts/noto/notosans-thin.woff +0 -0
  82. package/assets/fonts/noto/notosans-thin.woff2 +0 -0
  83. package/assets/fonts/noto/notosans-thinitalic.woff +0 -0
  84. package/assets/fonts/noto/notosans-thinitalic.woff2 +0 -0
  85. package/assets/fonts/noto/notosansarabic-bold.woff +0 -0
  86. package/assets/fonts/noto/notosansarabic-bold.woff2 +0 -0
  87. package/assets/fonts/noto/notosansarabic-light.woff +0 -0
  88. package/assets/fonts/noto/notosansarabic-light.woff2 +0 -0
  89. package/assets/fonts/noto/notosansarabic-regular.woff +0 -0
  90. package/assets/fonts/noto/notosansarabic-regular.woff2 +0 -0
  91. package/assets/fonts/noto/notosansarabic-thin.woff +0 -0
  92. package/assets/fonts/noto/notosansarabic-thin.woff2 +0 -0
  93. package/assets/fonts/noto/notosansgeorgian-bold.woff +0 -0
  94. package/assets/fonts/noto/notosansgeorgian-bold.woff2 +0 -0
  95. package/assets/fonts/noto/notosansgeorgian-light.woff +0 -0
  96. package/assets/fonts/noto/notosansgeorgian-light.woff2 +0 -0
  97. package/assets/fonts/noto/notosansgeorgian-regular.woff +0 -0
  98. package/assets/fonts/noto/notosansgeorgian-regular.woff2 +0 -0
  99. package/assets/fonts/noto/notosansgeorgian-thin.woff +0 -0
  100. package/assets/fonts/noto/notosansgeorgian-thin.woff2 +0 -0
  101. package/assets/fonts/noto/notosanshebrew-bold.woff +0 -0
  102. package/assets/fonts/noto/notosanshebrew-bold.woff2 +0 -0
  103. package/assets/fonts/noto/notosanshebrew-light.woff +0 -0
  104. package/assets/fonts/noto/notosanshebrew-light.woff2 +0 -0
  105. package/assets/fonts/noto/notosanshebrew-regular.woff +0 -0
  106. package/assets/fonts/noto/notosanshebrew-regular.woff2 +0 -0
  107. package/assets/fonts/noto/notosanshebrew-thin.woff +0 -0
  108. package/assets/fonts/noto/notosanshebrew-thin.woff2 +0 -0
  109. package/assets/fonts/source-sans-pro-bold/source-sans-pro-bold.woff +0 -0
  110. package/assets/fonts/source-sans-pro-bold/source-sans-pro-bold.woff2 +0 -0
  111. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-bold.woff +0 -0
  112. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-bold.woff2 +0 -0
  113. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-bolditalic.woff +0 -0
  114. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-bolditalic.woff2 +0 -0
  115. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-italic.woff +0 -0
  116. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-italic.woff2 +0 -0
  117. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-light.woff +0 -0
  118. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-light.woff2 +0 -0
  119. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-lightitalic.woff +0 -0
  120. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-lightitalic.woff2 +0 -0
  121. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-regular.woff +0 -0
  122. package/assets/fonts/source-sans-pro-full/sourcesanspro-full-regular.woff2 +0 -0
  123. package/assets/fonts/source-sans-pro-light/source-sans-pro-light.woff +0 -0
  124. package/assets/fonts/source-sans-pro-light/source-sans-pro-light.woff2 +0 -0
  125. package/assets/fonts/source-sans-pro-regular/source-sans-pro-regular.woff +0 -0
  126. package/assets/fonts/source-sans-pro-regular/source-sans-pro-regular.woff2 +0 -0
  127. package/assets/fonts/source-sans-pro-semibold/source-sans-pro-semibold.woff +0 -0
  128. package/assets/fonts/source-sans-pro-semibold/source-sans-pro-semibold.woff2 +0 -0
  129. package/design-factory-initial-branding.css +0 -13
  130. package/design-factory-initial-branding.scss +0 -1
  131. package/design-factory-utilities.scss +0 -5
  132. package/design-factory.css +0 -13
  133. package/design-factory.scss +0 -3
  134. package/fesm2022/design-factory-design-factory-tokens-style-dictionary.mjs +0 -358
  135. package/fesm2022/design-factory-design-factory-tokens-style-dictionary.mjs.map +0 -1
  136. package/styles/scss/_common.mixins.scss +0 -30
  137. package/styles/scss/_common.root.scss +0 -70
  138. package/styles/scss/_common.scss +0 -51
  139. package/styles/scss/_common.variables.scss +0 -79
  140. package/styles/scss/_variables.scss +0 -61
  141. package/styles/scss/agnosui/_variables.scss +0 -28
  142. package/styles/scss/bootstrap/_maps.scss +0 -52
  143. package/styles/scss/bootstrap/_mixins-override.scss +0 -69
  144. package/styles/scss/bootstrap/_rtl-styles-override.scss +0 -127
  145. package/styles/scss/bootstrap/_utilities-override.scss +0 -25
  146. package/styles/scss/bootstrap/_variables-dark.scss +0 -86
  147. package/styles/scss/bootstrap/_variables.scss +0 -2622
  148. package/styles/scss/components/.gitkeep +0 -0
  149. package/styles/scss/components/accordion/_accordion.scss +0 -241
  150. package/styles/scss/components/accordion/_accordion.variables.scss +0 -19
  151. package/styles/scss/components/alert/_alert.scss +0 -236
  152. package/styles/scss/components/alert/_alert.variables.scss +0 -56
  153. package/styles/scss/components/badge/_badge.mixins.scss +0 -23
  154. package/styles/scss/components/badge/_badge.scss +0 -483
  155. package/styles/scss/components/badge/_badge.variables.scss +0 -28
  156. package/styles/scss/components/brand-color/_brand-color.mixins.scss +0 -42
  157. package/styles/scss/components/brand-color/_brand-color.scss +0 -20
  158. package/styles/scss/components/brand-color/_brand-color.variables.scss +0 -152
  159. package/styles/scss/components/brand-color/_brand-color_container.scss +0 -23
  160. package/styles/scss/components/breadcrumbs/_breadcrumbs.scss +0 -127
  161. package/styles/scss/components/breadcrumbs/_breadcrumbs.variables.scss +0 -21
  162. package/styles/scss/components/button/_button.scss +0 -1090
  163. package/styles/scss/components/button/_button.utils.scss +0 -35
  164. package/styles/scss/components/button/_button.variables.scss +0 -48
  165. package/styles/scss/components/button/_button_container.scss +0 -47
  166. package/styles/scss/components/card/_card.scss +0 -208
  167. package/styles/scss/components/card/_card.variables.scss +0 -33
  168. package/styles/scss/components/carousel/_carousel.scss +0 -51
  169. package/styles/scss/components/carousel/_carousel.variables.scss +0 -12
  170. package/styles/scss/components/checkbox/_checkbox.scss +0 -68
  171. package/styles/scss/components/checkbox/_checkbox.variables.scss +0 -7
  172. package/styles/scss/components/collapse/_collapse.scss +0 -99
  173. package/styles/scss/components/collapse/_collapse.variables.scss +0 -7
  174. package/styles/scss/components/datepicker/_datepicker.scss +0 -362
  175. package/styles/scss/components/datepicker/_datepicker.variables.scss +0 -64
  176. package/styles/scss/components/dropdown/_dropdown.mixins.scss +0 -8
  177. package/styles/scss/components/dropdown/_dropdown.scss +0 -178
  178. package/styles/scss/components/dropdown/_dropdown.variables.scss +0 -24
  179. package/styles/scss/components/fieldset/_fieldset.scss +0 -8
  180. package/styles/scss/components/fieldset/_fieldset.variables.scss +0 -2
  181. package/styles/scss/components/fonts/_font-awesome-icons-brands.scss +0 -1585
  182. package/styles/scss/components/fonts/_font-awesome-icons.scss +0 -12886
  183. package/styles/scss/components/fonts/_font-faces.mixins.scss +0 -579
  184. package/styles/scss/components/fonts/_fonts-family.scss +0 -229
  185. package/styles/scss/components/fonts/_fonts.root.scss +0 -28
  186. package/styles/scss/components/fonts/_fonts.scss +0 -101
  187. package/styles/scss/components/fonts/_fonts.variables.scss +0 -33
  188. package/styles/scss/components/fonts/_icon-font.scss +0 -94
  189. package/styles/scss/components/fonts/_icon-font.variables.scss +0 -14
  190. package/styles/scss/components/fonts/_multi-lang.mixins.scss +0 -8
  191. package/styles/scss/components/fonts/multi-lang/_arabic.mixins.scss +0 -12
  192. package/styles/scss/components/fonts/multi-lang/_chinese.mixins.scss +0 -21
  193. package/styles/scss/components/fonts/multi-lang/_cyrillic-extended.mixins.scss +0 -11
  194. package/styles/scss/components/fonts/multi-lang/_cyrillic.mixins.scss +0 -10
  195. package/styles/scss/components/fonts/multi-lang/_georgian.mixins.scss +0 -13
  196. package/styles/scss/components/fonts/multi-lang/_hebrew.mixins.scss +0 -13
  197. package/styles/scss/components/fonts/multi-lang/_japanese.mixins.scss +0 -33
  198. package/styles/scss/components/fonts/multi-lang/_korean.mixins.scss +0 -18
  199. package/styles/scss/components/footer/_footer.mixins.scss +0 -36
  200. package/styles/scss/components/footer/_footer.scss +0 -86
  201. package/styles/scss/components/footer/_footer.variables.scss +0 -14
  202. package/styles/scss/components/form/_form.scss +0 -206
  203. package/styles/scss/components/form/_form.variables.scss +0 -34
  204. package/styles/scss/components/icon/_amadeus-icon.scss +0 -39
  205. package/styles/scss/components/icon/_amadeus-icon.variables.scss +0 -4
  206. package/styles/scss/components/inputs/_inputs.mixin.scss +0 -125
  207. package/styles/scss/components/inputs/_inputs.root.scss +0 -8
  208. package/styles/scss/components/inputs/_inputs.scss +0 -292
  209. package/styles/scss/components/inputs/_inputs.variables.scss +0 -39
  210. package/styles/scss/components/link/_link.mixins.scss +0 -198
  211. package/styles/scss/components/link/_link.scss +0 -170
  212. package/styles/scss/components/link/_link.variables.scss +0 -55
  213. package/styles/scss/components/list/_list.scss +0 -20
  214. package/styles/scss/components/list/_list.variables.scss +0 -4
  215. package/styles/scss/components/list-group/_list-group.scss +0 -101
  216. package/styles/scss/components/list-group/_list-group.variables.scss +0 -10
  217. package/styles/scss/components/media/_media.scss +0 -89
  218. package/styles/scss/components/media/_media.variables.scss +0 -19
  219. package/styles/scss/components/modal/_modal.scss +0 -247
  220. package/styles/scss/components/modal/_modal.variables.scss +0 -29
  221. package/styles/scss/components/navbar/_navbar.mixins.scss +0 -55
  222. package/styles/scss/components/navbar/_navbar.scss +0 -563
  223. package/styles/scss/components/navbar/_navbar.variables.scss +0 -102
  224. package/styles/scss/components/pagination/_pagination.scss +0 -251
  225. package/styles/scss/components/pagination/_pagination.variables.scss +0 -35
  226. package/styles/scss/components/pagination/_pagination_container.scss +0 -17
  227. package/styles/scss/components/popover/_popover.mixin.scss +0 -46
  228. package/styles/scss/components/popover/_popover.scss +0 -45
  229. package/styles/scss/components/popover/_popover.variables.scss +0 -25
  230. package/styles/scss/components/popover/_popover_container.scss +0 -214
  231. package/styles/scss/components/progressbar/_progressbar.scss +0 -93
  232. package/styles/scss/components/progressbar/_progressbar.variables.scss +0 -28
  233. package/styles/scss/components/radio/_radio.scss +0 -50
  234. package/styles/scss/components/radio/_radio.variables.scss +0 -4
  235. package/styles/scss/components/rating/_rating.scss +0 -118
  236. package/styles/scss/components/rating/_rating.variables.scss +0 -20
  237. package/styles/scss/components/scrollspy/_scrollspy.scss +0 -88
  238. package/styles/scss/components/scrollspy/_scrollspy.variables.scss +0 -23
  239. package/styles/scss/components/select/_select.mixin.scss +0 -34
  240. package/styles/scss/components/select/_select.scss +0 -804
  241. package/styles/scss/components/select/_select.variables.scss +0 -89
  242. package/styles/scss/components/separator/_separator.scss +0 -9
  243. package/styles/scss/components/separator/_separator.variables.scss +0 -1
  244. package/styles/scss/components/sidenav/_sidenav.scss +0 -347
  245. package/styles/scss/components/sidenav/_sidenav.variables.scss +0 -104
  246. package/styles/scss/components/skip-links/_skip-links.scss +0 -40
  247. package/styles/scss/components/skip-links/_skip-links.variables.scss +0 -9
  248. package/styles/scss/components/slider/_slider.scss +0 -422
  249. package/styles/scss/components/slider/_slider.variables.scss +0 -59
  250. package/styles/scss/components/speechbubble/_speechbubble.scss +0 -166
  251. package/styles/scss/components/speechbubble/_speechbubble.variables.scss +0 -27
  252. package/styles/scss/components/spinner/_spinner.scss +0 -126
  253. package/styles/scss/components/spinner/_spinner.variables.scss +0 -30
  254. package/styles/scss/components/spinner/_spinner_container.scss +0 -43
  255. package/styles/scss/components/stepper/_stepper.mixins.scss +0 -176
  256. package/styles/scss/components/stepper/_stepper.scss +0 -254
  257. package/styles/scss/components/stepper/_stepper.variables.scss +0 -88
  258. package/styles/scss/components/table/_advancedtables.scss +0 -306
  259. package/styles/scss/components/table/_table.scss +0 -19
  260. package/styles/scss/components/table/_table.variables.scss +0 -37
  261. package/styles/scss/components/tabs/_tabs.scss +0 -277
  262. package/styles/scss/components/tabs/_tabs.variables.scss +0 -36
  263. package/styles/scss/components/timepicker/_timepicker.scss +0 -5
  264. package/styles/scss/components/timepicker/_timepicker.variables.scss +0 -1
  265. package/styles/scss/components/toast/_toast.scss +0 -354
  266. package/styles/scss/components/toast/_toast.variables.scss +0 -18
  267. package/styles/scss/components/toggle/_toggle.scss +0 -145
  268. package/styles/scss/components/toggle/_toggle.variables.scss +0 -22
  269. package/styles/scss/components/tooltip/_tooltip.scss +0 -24
  270. package/styles/scss/components/tooltip/_tooltip.variables.scss +0 -6
  271. package/styles/scss/components/tooltip/_tooltip_container.scss +0 -116
  272. package/styles/scss/components/typeahead/_typeahead.scss +0 -59
  273. package/styles/scss/components/typeahead/_typeahead.variables.scss +0 -11
  274. package/styles/scss/df-styles-namespace.scss +0 -165
  275. package/styles/scss/df-styles.scss +0 -117
  276. package/styles/scss/themes/brand2023/_variables.scss +0 -1140
  277. package/styles/scss/themes/brand2023/tokens/_mapping.gen.scss +0 -868
  278. package/styles/scss/themes/brand2023/tokens/_root.gen.scss +0 -1709
  279. package/styles/scss/themes/brand2023/tokens/_sass-vars.gen.scss +0 -1468
  280. package/styles/scss/utilities/_common.utilities.scss +0 -205
  281. package/styles/scss/utilities/_form.mixins.scss +0 -26
  282. package/styles/scss/utilities/_rgb.scss +0 -10
  283. package/tokens/style-dictionary/index.d.ts +0 -60
@@ -1,3 +0,0 @@
1
- @use 'bootstrap/scss/functions';
2
- @import './styles/scss/themes/brand2023/variables';
3
- @import './styles/scss/df-styles';
@@ -1,358 +0,0 @@
1
- import StyleDictionary from 'style-dictionary';
2
- import { transformTypes, transforms as transforms$1 } from 'style-dictionary/enums';
3
- import { fileHeader, sortByReference, usesReferences } from 'style-dictionary/utils';
4
- import Color from 'colorjs.io';
5
- import { EOL } from 'os';
6
-
7
- /**
8
- * Determines the best contrasting color from a list of foreground colors against a given background color.
9
- *
10
- * @param backgroundColor - The background color to compare against.
11
- * @param foregroundColors - An array of tuples where each tuple contains a color name and its corresponding color value.
12
- * @returns A tuple containing the name and value of the best contrasting color.
13
- *
14
- * The function iterates through the provided foreground colors and calculates the contrast ratio
15
- * against the background color. If a color with a contrast ratio greater than 4.5 is found, it is
16
- * immediately returned. If no such color is found, the color with the highest contrast ratio is returned.
17
- *
18
- * The function logs a message if no color meets the minimum contrast ratio of 4.5:1.
19
- */
20
- function getContrastedColor(backgroundColor, foregroundColors) {
21
- const minContrast = 4.5;
22
- const ratios = [];
23
- let bestContrast = 0;
24
- let bestMatch = ['', ''];
25
- const refColor = new Color(backgroundColor);
26
- for (const color of foregroundColors) {
27
- if (color[1]) {
28
- const contrast = refColor.contrast(new Color(color[1]), 'WCAG21');
29
- if (contrast > minContrast) {
30
- return color;
31
- }
32
- if (contrast > bestContrast) {
33
- bestContrast = contrast;
34
- bestMatch = color;
35
- }
36
- ratios.push(contrast.toFixed(2));
37
- }
38
- }
39
- /*console.log(
40
- `Found no color leading to ${minContrast}:1 contrast ratio against ${backgroundColor}. Best contrast ratio found: ${bestContrast.toFixed(2)}`
41
- );
42
- console.log(`Found ratios: ${ratios.join(', ')}, best match returned: ${bestMatch}`);*/
43
- return bestMatch;
44
- }
45
- const hexaColorRegExp = /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/;
46
- /**
47
- * Converts a hexadecimal color string to an RGB array.
48
- *
49
- * @param hex - The hexadecimal color string (e.g., "#RRGGBB" or "#RGB").
50
- * @returns An array containing the RGB values [r, g, b] if the input is valid, otherwise `undefined`.
51
- */
52
- function hexToRgb(hex) {
53
- hex = hex.replace(/^#/, '');
54
- if (!hexaColorRegExp.test(hex)) {
55
- return undefined;
56
- }
57
- if (hex.length === 3) {
58
- hex = hex
59
- .split('')
60
- .map((char) => char + char)
61
- .join('');
62
- }
63
- const r = parseInt(hex.substring(0, 2), 16);
64
- const g = parseInt(hex.substring(2, 4), 16);
65
- const b = parseInt(hex.substring(4, 6), 16);
66
- return [r, g, b];
67
- }
68
- /**
69
- * Generates computed theme colors.
70
- * This function helps manage rgb values, as bootstrap requies rgb values for colors.
71
- * It also computes the best foreground color for each theme background color.
72
- */
73
- function getComputedThemeColors(tokens) {
74
- const computedColors = [];
75
- const dfThemeNeutral = tokens['df']['theme']?.['neutral'];
76
- const foregroundColors = [
77
- [`df-theme-neutral-0`, dfThemeNeutral?.['0']?.$value ?? '#ffffff'],
78
- [`df-theme-neutral-100`, dfThemeNeutral?.['100']?.$value ?? '#1a1a1a'],
79
- [`df-theme-neutral-110`, dfThemeNeutral?.['110']?.$value ?? '#000000']
80
- ];
81
- for (const [name, values] of Object.entries(tokens['df']['theme'] ?? {})) {
82
- for (const [key, value] of Object.entries(values)) {
83
- const color = value.$value;
84
- computedColors.push({
85
- name: `df-theme-${name}-${key}-rgb`,
86
- $type: 'rgbRef',
87
- $ref: `df-theme-${name}-${key}`,
88
- $value: hexToRgb(color)?.join(', ') || ''
89
- });
90
- // Compute the best foreground color
91
- const foregroundVar = getContrastedColor(color, foregroundColors)[0];
92
- computedColors.push({
93
- name: `df-theme-${name}-${key}-color`,
94
- $type: 'ref',
95
- $ref: foregroundVar
96
- });
97
- computedColors.push({
98
- name: `df-theme-${name}-${key}-color-rgb`,
99
- $type: 'ref',
100
- $ref: `${foregroundVar}-rgb`
101
- });
102
- }
103
- }
104
- return computedColors;
105
- }
106
- const tier3ScopingMap = {
107
- button: `.btn,${EOL} .btn-close`, //needing .btn-close because the alert uses it// TODO: remove when wrapping alert
108
- badge: '.badge',
109
- footer: '.df-app-footer',
110
- navbar: '.navbar',
111
- link: `a,${EOL} .df-app-footer,${EOL} button.df-collapse` //collapse is a button styled as a link
112
- };
113
- const splitTokens = (allTokens) => {
114
- const rootTokens = [];
115
- const tier3Tokens = [];
116
- // divide tokens in tier 3 and root tokens (all the remaining)
117
- allTokens.forEach((token) => {
118
- if (token.path[1] && Object.keys(tier3ScopingMap).includes(token.path[1])) {
119
- tier3Tokens.push(token);
120
- }
121
- else {
122
- rootTokens.push(token);
123
- }
124
- });
125
- //grouping tokens into on object having as key the tier3 key and value the array of tokens
126
- const groupedT3 = tier3Tokens.reduce((acc, token) => {
127
- const key = token.path[1];
128
- if (acc[key]) {
129
- acc[key].push(token);
130
- }
131
- else {
132
- acc[key] = [token];
133
- }
134
- return acc;
135
- }, {});
136
- return { rootTokens, groupedT3 };
137
- };
138
-
139
- const FONT_WEIGHT_FIGMA2CSS = {
140
- light: '300',
141
- regular: '400',
142
- medium: '500',
143
- bold: '700'
144
- };
145
- /**
146
- * Design Factory custom Style-Dictionary transforms
147
- */
148
- const transforms = {
149
- /**
150
- * Transform used to quote wrap font-family tokens.
151
- * This is required as the font-family tokens exported from the Figma Plugin do not have the proper $type.
152
- */
153
- fontFamily: '@design-factory/font-family',
154
- /**
155
- * Transform used to map font-weight tokens into useable css values.
156
- * This is required as the font-weight tokens exported from the Figma Plugin do not have the proper $type.
157
- */
158
- fontWeight: '@design-factory/font-weight',
159
- /**
160
- * Transform used to create token names based on DF token naming convention.
161
- */
162
- tokenName: '@design-factory/token-name'
163
- };
164
- /**
165
- * Design Factory custom Style-Dictionary transform group
166
- */
167
- const transformGroups = {
168
- /**
169
- * Transform group that applies standard scss transforms and custom Design Factory transforms.
170
- */
171
- designFactory: '@design-factory'
172
- };
173
- /**
174
- * Design Factory custom Style-Dictionary filters
175
- */
176
- const filters = {
177
- /**
178
- * Filter removing invalid font-weight tokens. Should be used with {@link formats.scssVars}
179
- */
180
- scssVars: '@design-factory/scss-vars-filter',
181
- /**
182
- * Filter removing invalid font-weight tokens and t0 tokens. Should be used with {@link formats.cssRoot}
183
- */
184
- cssRoot: '@design-factory/root-filter'
185
- };
186
- /**
187
- * Design Factory custom Style-Dictionary formats
188
- */
189
- const formats = {
190
- /**
191
- * Format to print a sass file containing tokens as sass variables. Should be used with {@link filters.scssVars}
192
- */
193
- scssVars: '@design-factory/scss-vars',
194
- /**
195
- * Format to print a css file printing tokens as css variables. Should be used with {@link filters.cssRoot}
196
- */
197
- cssRoot: '@design-factory/css-root'
198
- };
199
- /**
200
- * Registers Design Factory custom transforms, formats and filters with Style Dictionary.
201
- */
202
- const registerDf = () => {
203
- /**
204
- * Our font-family tokens do not have the expected $type font-family property, so we have to manage them manually
205
- **/
206
- StyleDictionary.registerTransform({
207
- name: transforms.fontFamily,
208
- type: transformTypes.value,
209
- filter: (token) => token.name.includes('-font-') && (token.name.includes('family') || token.name.includes('Family')),
210
- transform: (token) => `'${token.$value}'`
211
- });
212
- /**
213
- * Our font tokens do not have the expected $type property, so we have to manage them manually
214
- **/
215
- StyleDictionary.registerTransform({
216
- name: transforms.fontWeight,
217
- type: transformTypes.value,
218
- filter: (token) => token.name.startsWith('df-typo-weight-'),
219
- transform: (token) => FONT_WEIGHT_FIGMA2CSS[token.$value.trim().toLowerCase()] || token.$value
220
- });
221
- /**
222
- * Cannot use style-dictionary camelCase transform as we have some a specific naming convention for our tokens
223
- **/
224
- StyleDictionary.registerTransform({
225
- name: transforms.tokenName,
226
- type: transformTypes.name,
227
- transform: (token) => token.path.join('-')
228
- });
229
- /**
230
- * This is the Design Factory transform group, including DF custom transforms.
231
- */
232
- StyleDictionary.registerTransformGroup({
233
- name: transformGroups.designFactory,
234
- transforms: [
235
- transforms$1.attributeCti,
236
- transforms.tokenName,
237
- transforms$1.timeSeconds,
238
- transforms$1.htmlIcon,
239
- transforms$1.sizeRem,
240
- transforms$1.sizePxToRem,
241
- transforms$1.colorCss,
242
- transforms$1.assetUrl,
243
- transforms.fontFamily,
244
- transforms.fontWeight,
245
- transforms$1.cubicBezierCss,
246
- // object-value tokens
247
- transforms$1.strokeStyleCssShorthand,
248
- transforms$1.borderCssShorthand,
249
- transforms$1.typographyCssShorthand,
250
- transforms$1.transitionCssShorthand,
251
- transforms$1.shadowCssShorthand
252
- ]
253
- });
254
- /**
255
- * This filter removes tokens ending with 'Italic' as italic styles are handled completely differently.
256
- */
257
- StyleDictionary.registerFilter({
258
- name: filters.scssVars,
259
- filter: (token) => !token.name.endsWith('Italic')
260
- });
261
- /**
262
- * This filter removes colorPalette tokens from the dictionary.
263
- * To be used with the @design-factory/css-root format.
264
- */
265
- StyleDictionary.registerFilter({
266
- name: filters.cssRoot,
267
- filter: (token) => !token.name.endsWith('Italic') && !token.name.startsWith('df-colorPalette')
268
- });
269
- /**
270
- * Then we register the DF custom formats
271
- */
272
- /**
273
- * This format generates a SCSS file with all the tokens as sass variables.
274
- * For references, it will not map to the original token sass var, but to the original token as a CSS var.
275
- */
276
- StyleDictionary.registerFormat({
277
- name: formats.scssVars,
278
- format: async ({ dictionary, options, file }) => {
279
- const { usesDtcg, withDefault, outputReferences } = options;
280
- const header = await fileHeader({
281
- file,
282
- formatting: { lineSeparator: EOL, header: `/**${EOL}`, footer: `${EOL} */${EOL}${EOL}` }
283
- });
284
- const tokens = dictionary.tokens;
285
- let allTokens = dictionary.allTokens;
286
- allTokens = [...allTokens].sort(sortByReference(tokens, { unfilteredTokens: dictionary.unfilteredTokens, usesDtcg }));
287
- return (`${header}${outputReferences ? `$prefix: df- !default;${EOL}${EOL}` : ''}` +
288
- allTokens.reduce((acc, token) => {
289
- let value = token.$value;
290
- if (outputReferences && usesReferences(token.original.$value)) {
291
- if (token.original.$value.startsWith('{df.')) {
292
- value = `var(--#{$prefix}${token.original.$value.slice(4, -1).replace(/\./g, '-')})`;
293
- }
294
- else {
295
- value = `var(--${token.original.$value.slice(1, -1).replace(/\./g, '-')})`;
296
- }
297
- }
298
- return `${acc}$${token.name}: ${value}${withDefault ? ' !default' : ''};${EOL}`;
299
- }, ''));
300
- }
301
- });
302
- /**
303
- * This format generates a CSS file with all tokens applied in root.
304
- * Should be used with the @design-factory/root-filter filter.
305
- */
306
- StyleDictionary.registerFormat({
307
- name: formats.cssRoot,
308
- format: async ({ dictionary, options, file }) => {
309
- const { usesDtcg, outputReferences, prefix = 'df-', selector = 'html:root' } = options;
310
- const header = await fileHeader({
311
- file,
312
- formatting: { lineSeparator: EOL, header: `/**${EOL}`, footer: `${EOL} */${EOL}${EOL}` }
313
- });
314
- const tokens = dictionary.tokens;
315
- let allTokens = dictionary.allTokens;
316
- allTokens = [...allTokens].sort(sortByReference(tokens, { unfilteredTokens: dictionary.unfilteredTokens, usesDtcg }));
317
- const { rootTokens, groupedT3 } = splitTokens(allTokens);
318
- const getValueName = (token) => {
319
- let value = token.$value;
320
- if (outputReferences && usesReferences(token.original.$value)) {
321
- value = `var(--${prefix}${token.original.$value.slice(4, -1).replace(/\./g, '-')})`;
322
- }
323
- const name = token.name.startsWith('df-') ? `${prefix}${token.name.slice(3)}` : token.name;
324
- return { value, name };
325
- };
326
- const computedThemeColors = getComputedThemeColors(dictionary.tokens);
327
- return (`${header}${selector} {${EOL}` +
328
- rootTokens.reduce((acc, token) => {
329
- const { value, name } = getValueName(token);
330
- return `${acc} --${name}: ${value};${EOL}`;
331
- }, '') +
332
- (computedThemeColors.length
333
- ? ` /* Computed theme colors */${EOL}${computedThemeColors.reduce((acc, token) => {
334
- return `${acc} --${prefix}${token.name.slice(3)}: ${token.$type === 'rgbRef' ? token.$value : `var(--${prefix}${token.$ref.slice(3)})`};${EOL}`;
335
- }, '')}`
336
- : '') +
337
- (Object.keys(groupedT3).length
338
- ? `${EOL} /* Tier 3 Scoped tokens */${EOL}` +
339
- Object.entries(groupedT3).reduce((acc, [key, tokens]) => {
340
- return (`${acc} ${tier3ScopingMap[key]} {${EOL}` +
341
- tokens.reduce((innerAcc, token) => {
342
- const { value, name } = getValueName(token);
343
- return `${innerAcc} --${name}: ${value};${EOL}`;
344
- }, '') +
345
- ` }${EOL}`);
346
- }, '')
347
- : '') +
348
- `}${EOL}`);
349
- }
350
- });
351
- };
352
-
353
- /**
354
- * Generated bundle index. Do not edit.
355
- */
356
-
357
- export { filters, formats, registerDf, transformGroups, transforms };
358
- //# sourceMappingURL=design-factory-design-factory-tokens-style-dictionary.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"design-factory-design-factory-tokens-style-dictionary.mjs","sources":["../../../projects/design-factory/tokens/style-dictionary/utils.ts","../../../projects/design-factory/tokens/style-dictionary/config.ts","../../../projects/design-factory/tokens/style-dictionary/design-factory-design-factory-tokens-style-dictionary.ts"],"sourcesContent":["import Color from 'colorjs.io';\nimport type { TransformedToken, TransformedTokens } from 'style-dictionary/types';\nimport { EOL } from 'os';\n\n/**\n * Determines the best contrasting color from a list of foreground colors against a given background color.\n *\n * @param backgroundColor - The background color to compare against.\n * @param foregroundColors - An array of tuples where each tuple contains a color name and its corresponding color value.\n * @returns A tuple containing the name and value of the best contrasting color.\n *\n * The function iterates through the provided foreground colors and calculates the contrast ratio\n * against the background color. If a color with a contrast ratio greater than 4.5 is found, it is\n * immediately returned. If no such color is found, the color with the highest contrast ratio is returned.\n *\n * The function logs a message if no color meets the minimum contrast ratio of 4.5:1.\n */\nfunction getContrastedColor(backgroundColor: string, foregroundColors: [string, string | undefined][]) {\n const minContrast = 4.5;\n const ratios = [];\n let bestContrast = 0;\n let bestMatch: [string, string] = ['', ''];\n const refColor = new Color(backgroundColor);\n for (const color of foregroundColors) {\n if (color[1]) {\n const contrast = refColor.contrast(new Color(color[1]), 'WCAG21');\n if (contrast > minContrast) {\n return color;\n }\n if (contrast > bestContrast) {\n bestContrast = contrast;\n bestMatch = color as [string, string];\n }\n ratios.push(contrast.toFixed(2));\n }\n }\n /*console.log(\n `Found no color leading to ${minContrast}:1 contrast ratio against ${backgroundColor}. Best contrast ratio found: ${bestContrast.toFixed(2)}`\n );\n console.log(`Found ratios: ${ratios.join(', ')}, best match returned: ${bestMatch}`);*/\n return bestMatch;\n}\n\nconst hexaColorRegExp = /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/;\n\n/**\n * Converts a hexadecimal color string to an RGB array.\n *\n * @param hex - The hexadecimal color string (e.g., \"#RRGGBB\" or \"#RGB\").\n * @returns An array containing the RGB values [r, g, b] if the input is valid, otherwise `undefined`.\n */\nfunction hexToRgb(hex: string) {\n hex = hex.replace(/^#/, '');\n\n if (!hexaColorRegExp.test(hex)) {\n return undefined;\n }\n\n if (hex.length === 3) {\n hex = hex\n .split('')\n .map((char) => char + char)\n .join('');\n }\n\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n\n return [r, g, b];\n}\n\nexport type ComputedThemeColor =\n | { name: string; $type: 'ref'; $ref: string }\n | { name: string; $type: 'rgbRef'; $ref: string; $value: string };\n\n/**\n * Generates computed theme colors.\n * This function helps manage rgb values, as bootstrap requies rgb values for colors.\n * It also computes the best foreground color for each theme background color.\n */\nexport function getComputedThemeColors(tokens: TransformedTokens): ComputedThemeColor[] {\n const computedColors: ComputedThemeColor[] = [];\n const dfThemeNeutral = tokens['df']['theme']?.['neutral'];\n const foregroundColors: [string, string | undefined][] = [\n [`df-theme-neutral-0`, dfThemeNeutral?.['0']?.$value ?? '#ffffff'],\n [`df-theme-neutral-100`, dfThemeNeutral?.['100']?.$value ?? '#1a1a1a'],\n [`df-theme-neutral-110`, dfThemeNeutral?.['110']?.$value ?? '#000000']\n ];\n for (const [name, values] of Object.entries(tokens['df']['theme'] ?? {})) {\n for (const [key, value] of Object.entries(values as object)) {\n const color = value.$value;\n computedColors.push({\n name: `df-theme-${name}-${key}-rgb`,\n $type: 'rgbRef',\n $ref: `df-theme-${name}-${key}`,\n $value: hexToRgb(color)?.join(', ') || ''\n });\n\n // Compute the best foreground color\n const foregroundVar = getContrastedColor(color, foregroundColors)[0];\n computedColors.push({\n name: `df-theme-${name}-${key}-color`,\n $type: 'ref',\n $ref: foregroundVar\n });\n computedColors.push({\n name: `df-theme-${name}-${key}-color-rgb`,\n $type: 'ref',\n $ref: `${foregroundVar}-rgb`\n });\n }\n }\n return computedColors;\n}\n\nexport type Tier3Key = keyof typeof tier3ScopingMap;\nexport const tier3ScopingMap = {\n button: `.btn,${EOL} .btn-close`, //needing .btn-close because the alert uses it// TODO: remove when wrapping alert\n badge: '.badge',\n footer: '.df-app-footer',\n navbar: '.navbar',\n link: `a,${EOL} .df-app-footer,${EOL} button.df-collapse` //collapse is a button styled as a link\n};\n\nexport const splitTokens = (allTokens: TransformedToken[]) => {\n const rootTokens: TransformedToken[] = [];\n const tier3Tokens: TransformedToken[] = [];\n\n // divide tokens in tier 3 and root tokens (all the remaining)\n allTokens.forEach((token) => {\n if (token.path[1] && Object.keys(tier3ScopingMap).includes(token.path[1])) {\n tier3Tokens.push(token);\n } else {\n rootTokens.push(token);\n }\n });\n\n //grouping tokens into on object having as key the tier3 key and value the array of tokens\n const groupedT3 = tier3Tokens.reduce(\n (acc, token) => {\n const key = token.path[1] as Tier3Key;\n if (acc[key]) {\n acc[key].push(token);\n } else {\n acc[key] = [token];\n }\n return acc;\n },\n {} as Record<Tier3Key, TransformedToken[]>\n );\n\n return { rootTokens, groupedT3 };\n};\n","import StyleDictionary, { type TransformedToken } from 'style-dictionary';\nimport { transforms as sdTransforms, transformTypes } from 'style-dictionary/enums';\nimport { fileHeader, sortByReference, usesReferences } from 'style-dictionary/utils';\nimport { getComputedThemeColors, splitTokens, Tier3Key, tier3ScopingMap } from './utils';\nimport { EOL } from 'os';\n\nconst FONT_WEIGHT_FIGMA2CSS: Record<string, string> = {\n light: '300',\n regular: '400',\n medium: '500',\n bold: '700'\n};\n\n/**\n * Design Factory custom Style-Dictionary transforms\n */\nexport const transforms = {\n /**\n * Transform used to quote wrap font-family tokens.\n * This is required as the font-family tokens exported from the Figma Plugin do not have the proper $type.\n */\n fontFamily: '@design-factory/font-family',\n /**\n * Transform used to map font-weight tokens into useable css values.\n * This is required as the font-weight tokens exported from the Figma Plugin do not have the proper $type.\n */\n fontWeight: '@design-factory/font-weight',\n /**\n * Transform used to create token names based on DF token naming convention.\n */\n tokenName: '@design-factory/token-name'\n} as const;\n\n/**\n * Design Factory custom Style-Dictionary transform group\n */\nexport const transformGroups = {\n /**\n * Transform group that applies standard scss transforms and custom Design Factory transforms.\n */\n designFactory: '@design-factory'\n} as const;\n\n/**\n * Design Factory custom Style-Dictionary filters\n */\nexport const filters = {\n /**\n * Filter removing invalid font-weight tokens. Should be used with {@link formats.scssVars}\n */\n scssVars: '@design-factory/scss-vars-filter',\n /**\n * Filter removing invalid font-weight tokens and t0 tokens. Should be used with {@link formats.cssRoot}\n */\n cssRoot: '@design-factory/root-filter'\n} as const;\n\n/**\n * Design Factory custom Style-Dictionary formats\n */\nexport const formats = {\n /**\n * Format to print a sass file containing tokens as sass variables. Should be used with {@link filters.scssVars}\n */\n scssVars: '@design-factory/scss-vars',\n /**\n * Format to print a css file printing tokens as css variables. Should be used with {@link filters.cssRoot}\n */\n cssRoot: '@design-factory/css-root'\n} as const;\n\n/**\n * Registers Design Factory custom transforms, formats and filters with Style Dictionary.\n */\nexport const registerDf = () => {\n /**\n * Our font-family tokens do not have the expected $type font-family property, so we have to manage them manually\n **/\n StyleDictionary.registerTransform({\n name: transforms.fontFamily,\n type: transformTypes.value,\n filter: (token) =>\n token.name.includes('-font-') && (token.name.includes('family') || token.name.includes('Family')),\n transform: (token) => `'${token.$value}'`\n });\n /**\n * Our font tokens do not have the expected $type property, so we have to manage them manually\n **/\n StyleDictionary.registerTransform({\n name: transforms.fontWeight,\n type: transformTypes.value,\n filter: (token) => token.name.startsWith('df-typo-weight-'),\n transform: (token) => FONT_WEIGHT_FIGMA2CSS[token.$value.trim().toLowerCase()] || token.$value\n });\n\n /**\n * Cannot use style-dictionary camelCase transform as we have some a specific naming convention for our tokens\n **/\n StyleDictionary.registerTransform({\n name: transforms.tokenName,\n type: transformTypes.name,\n transform: (token) => token.path.join('-')\n });\n\n /**\n * This is the Design Factory transform group, including DF custom transforms.\n */\n StyleDictionary.registerTransformGroup({\n name: transformGroups.designFactory,\n transforms: [\n sdTransforms.attributeCti,\n transforms.tokenName,\n sdTransforms.timeSeconds,\n sdTransforms.htmlIcon,\n sdTransforms.sizeRem,\n sdTransforms.sizePxToRem,\n sdTransforms.colorCss,\n sdTransforms.assetUrl,\n transforms.fontFamily,\n transforms.fontWeight,\n sdTransforms.cubicBezierCss,\n // object-value tokens\n sdTransforms.strokeStyleCssShorthand,\n sdTransforms.borderCssShorthand,\n sdTransforms.typographyCssShorthand,\n sdTransforms.transitionCssShorthand,\n sdTransforms.shadowCssShorthand\n ]\n });\n\n /**\n * This filter removes tokens ending with 'Italic' as italic styles are handled completely differently.\n */\n StyleDictionary.registerFilter({\n name: filters.scssVars,\n filter: (token) => !token.name.endsWith('Italic')\n });\n /**\n * This filter removes colorPalette tokens from the dictionary.\n * To be used with the @design-factory/css-root format.\n */\n StyleDictionary.registerFilter({\n name: filters.cssRoot,\n filter: (token) => !token.name.endsWith('Italic') && !token.name.startsWith('df-colorPalette')\n });\n\n /**\n * Then we register the DF custom formats\n */\n\n /**\n * This format generates a SCSS file with all the tokens as sass variables.\n * For references, it will not map to the original token sass var, but to the original token as a CSS var.\n */\n StyleDictionary.registerFormat({\n name: formats.scssVars,\n format: async ({ dictionary, options, file }) => {\n const { usesDtcg, withDefault, outputReferences } = options;\n const header = await fileHeader({\n file,\n formatting: { lineSeparator: EOL, header: `/**${EOL}`, footer: `${EOL} */${EOL}${EOL}` }\n });\n\n const tokens = dictionary.tokens;\n let allTokens = dictionary.allTokens;\n allTokens = [...allTokens].sort(\n sortByReference(tokens, { unfilteredTokens: dictionary.unfilteredTokens, usesDtcg })\n );\n\n return (\n `${header}${outputReferences ? `$prefix: df- !default;${EOL}${EOL}` : ''}` +\n allTokens.reduce((acc, token) => {\n let value = token.$value;\n if (outputReferences && usesReferences(token.original.$value)) {\n if (token.original.$value.startsWith('{df.')) {\n value = `var(--#{$prefix}${token.original.$value.slice(4, -1).replace(/\\./g, '-')})`;\n } else {\n value = `var(--${token.original.$value.slice(1, -1).replace(/\\./g, '-')})`;\n }\n }\n return `${acc}$${token.name}: ${value}${withDefault ? ' !default' : ''};${EOL}`;\n }, '')\n );\n }\n });\n /**\n * This format generates a CSS file with all tokens applied in root.\n * Should be used with the @design-factory/root-filter filter.\n */\n StyleDictionary.registerFormat({\n name: formats.cssRoot,\n format: async ({ dictionary, options, file }) => {\n const { usesDtcg, outputReferences, prefix = 'df-', selector = 'html:root' } = options;\n const header = await fileHeader({\n file,\n formatting: { lineSeparator: EOL, header: `/**${EOL}`, footer: `${EOL} */${EOL}${EOL}` }\n });\n\n const tokens = dictionary.tokens;\n let allTokens = dictionary.allTokens;\n allTokens = [...allTokens].sort(\n sortByReference(tokens, { unfilteredTokens: dictionary.unfilteredTokens, usesDtcg })\n );\n\n const { rootTokens, groupedT3 } = splitTokens(allTokens);\n\n const getValueName = (token: TransformedToken) => {\n let value = token.$value;\n if (outputReferences && usesReferences(token.original.$value)) {\n value = `var(--${prefix}${token.original.$value.slice(4, -1).replace(/\\./g, '-')})`;\n }\n const name = token.name.startsWith('df-') ? `${prefix}${token.name.slice(3)}` : token.name;\n return { value, name };\n };\n\n const computedThemeColors = getComputedThemeColors(dictionary.tokens);\n return (\n `${header}${selector} {${EOL}` +\n rootTokens.reduce((acc, token) => {\n const { value, name } = getValueName(token);\n return `${acc} --${name}: ${value};${EOL}`;\n }, '') +\n (computedThemeColors.length\n ? ` /* Computed theme colors */${EOL}${computedThemeColors.reduce((acc, token) => {\n return `${acc} --${prefix}${token.name.slice(3)}: ${token.$type === 'rgbRef' ? token.$value : `var(--${prefix}${token.$ref.slice(3)})`};${EOL}`;\n }, '')}`\n : '') +\n (Object.keys(groupedT3).length\n ? `${EOL} /* Tier 3 Scoped tokens */${EOL}` +\n Object.entries(groupedT3).reduce((acc, [key, tokens]) => {\n return (\n `${acc} ${tier3ScopingMap[key as Tier3Key]} {${EOL}` +\n tokens.reduce((innerAcc, token) => {\n const { value, name } = getValueName(token);\n return `${innerAcc} --${name}: ${value};${EOL}`;\n }, '') +\n ` }${EOL}`\n );\n }, '')\n : '') +\n `}${EOL}`\n );\n }\n });\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './config';\n"],"names":["sdTransforms"],"mappings":";;;;;;AAIA;;;;;;;;;;;;AAYG;AACH,SAAS,kBAAkB,CAAC,eAAuB,EAAE,gBAAgD,EAAA;IACnG,MAAM,WAAW,GAAG,GAAG;IACvB,MAAM,MAAM,GAAG,EAAE;IACjB,IAAI,YAAY,GAA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EAAE;qBACjJ,EAAE,EAAE,CAAC,CAAA;sBACN,EAAE,CAAC;AACP,iBAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtB,sBAAE,CAAA,EAAG,GAAG,CAAA,4BAAA,EAA+B,GAAG,CAAA,CAAE;AAC1C,wBAAA,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAI;4BACtD,QACE,CAAA,EAAG,GAAG,CAAA,EAAA,EAAK,eAAe,CAAC,GAAe,CAAC,CAAA,EAAA,EAAK,GAAG,CAAA,CAAE;gCACrD,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,KAAK,KAAI;oCAChC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC;oCAC3C,OAAO,CAAA,EAAG,QAAQ,CAAA,MAAA,EAAS,IAAI,KAAK,KAAK,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE;iCACnD,EAAE,EAAE,CAAC;gCACN,CAAA,GAAA,EAAM,GAAG,CAAA,CAAE;yBAEd,EAAE,EAAE;sBACL,EAAE,CAAC;gBACP,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE;;AAGd,KAAA,CAAC;AACJ;;ACpPA;;AAEG;;;;"}
@@ -1,30 +0,0 @@
1
- @import './utilities/form.mixins';
2
- @mixin rtl {
3
- @if $df-enable-rtl {
4
- [dir='rtl'] & {
5
- @content;
6
- }
7
- }
8
- }
9
-
10
- @mixin ltr {
11
- @if $df-enable-rtl {
12
- [dir='ltr'] &,
13
- html:not([dir='rtl']) & {
14
- @content;
15
- }
16
- } @else {
17
- @content;
18
- }
19
- }
20
-
21
- @mixin heading {
22
- h1,
23
- h2,
24
- h3,
25
- h4,
26
- h5,
27
- h6 {
28
- @content;
29
- }
30
- }
@@ -1,70 +0,0 @@
1
- :root {
2
- --#{$prefix}disabled-color: #{$df-disabled-color};
3
- --#{$prefix}disabled-bg-color: #{$gray-100};
4
- --#{$prefix}focus-outline: #{$df-focus-outline};
5
- --#{$prefix}disabled-cursor: #{$df-disabled-cursor};
6
- --#{$prefix}link-hover-text-decoration: #{$df-link-hover-text-decoration};
7
- --#{$prefix}disabled-opacity: #{$df-disabled-opacity};
8
- --#{$prefix}font-family: #{$df-font-family};
9
-
10
- --#{$prefix}dark-primary: #{$dark-primary};
11
- --#{$prefix}yellow-rgb: #{to-rgb($yellow)};
12
- --#{$prefix}dark-primary-rgb: #{to-rgb($dark-primary)};
13
- --#{$prefix}white-color: #{color-contrast($white)};
14
- --#{$prefix}black-color: #{color-contrast($black)};
15
- --#{$prefix}alt-body: #{to-rgb($body-color)};
16
-
17
- // Box-shadow
18
- --#{$prefix}box-shadow: #{$df-box-shadow};
19
- --#{$prefix}focused-box-shadow: #{$df-focused-box-shadow};
20
- --#{$prefix}box-shadow-blur: #{$focus-ring-blur};
21
- --#{$prefix}box-shadow-width: #{$focus-ring-width};
22
- --#{$prefix}box-shadow-opacity: #{$focus-ring-opacity};
23
- --#{$prefix}box-shadow-color: #{$focus-ring-color};
24
-
25
- // Form
26
- --#{$prefix}form-valid-color-rgb: #{to-rgb($form-valid-color)};
27
- --#{$prefix}form-invalid-border-color: #{variable-switch-brand2023(
28
- 'color-danger-alt-default-border',
29
- $form-invalid-color
30
- )};
31
- --#{$prefix}form-invalid-color: #{variable-switch-brand2023(
32
- 'color-danger-alt-default-foreground',
33
- $form-invalid-color
34
- )};
35
- --#{$prefix}form-invalid-color-rgb: #{variable-switch-brand2023(
36
- 'color-danger-alt-default-border-rgb',
37
- to-rgb($form-invalid-color)
38
- )};
39
- --#{$prefix}form-warning-color: #{variable-switch-brand2023(
40
- 'color-warning-alt-default-foreground',
41
- $df-form-feedback-warning-color
42
- )};
43
- --#{$prefix}form-warning-color-rgb: #{variable-switch-brand2023(
44
- 'color-warning-alt-default-foreground-rgb',
45
- to-rgb($df-form-feedback-warning-color)
46
- )};
47
- --#{$prefix}form-feedback-warning-color: #{$df-form-feedback-warning-color};
48
- --#{$prefix}form-feedback-help-warning-color: #{$df-form-feedback-help-warning-color};
49
- --#{$prefix}form-feedback-warning-icon: #{$df-form-feedback-warning-icon};
50
-
51
- @each $breakpoint, $value in $grid-breakpoints {
52
- --#{$prefix}breakpoint-#{$breakpoint}: #{$value};
53
- }
54
-
55
- @each $color, $value in $shade-colors {
56
- --#{$prefix}#{$color}: #{$value};
57
- }
58
-
59
- @each $color, $value in $shade-colors-rgb {
60
- --#{$prefix}#{$color}-rgb: #{$value};
61
- }
62
-
63
- @each $color, $value in $shade-colors-text {
64
- --#{$prefix}#{$color}-color: #{$value};
65
- }
66
-
67
- @each $color, $value in $shade-colors-text-rgb {
68
- --#{$prefix}#{$color}-color-rgb: #{$value};
69
- }
70
- }
@@ -1,51 +0,0 @@
1
- .mandatory-indicator {
2
- // add
3
- color: #{variable-switch-brand2023('color-danger-alt-default-foreground', $df-mandatory-indicator-color)};
4
- font-weight: $df-mandatory-indicator-font-weight;
5
- margin-left: $df-mandatory-indicator-margin;
6
- margin-right: $df-mandatory-indicator-margin;
7
- }
8
-
9
- .df-subtitle {
10
- // add
11
- color: $df-subtitle-color;
12
- }
13
-
14
- @each $extension, $ratio in $df-size-ratios {
15
- .df-font-#{$extension} {
16
- --#{$prefix}body-font-size: #{get-sizing-brand2023($extension, $ratio)};
17
- font-size: var(--#{$prefix}body-font-size);
18
- }
19
- }
20
-
21
- // To be used to remove text-decoration on icon of DF
22
- .df-icon-wtd {
23
- &::before {
24
- display: inline-block;
25
- text-decoration: none;
26
- }
27
- }
28
-
29
- .df-focused {
30
- border-radius: $df-focused-border-radius;
31
- box-shadow: $df-focused-box-shadow;
32
- border: $df-focused-border;
33
- outline: var(--#{$prefix}focus-outline); //disable default
34
- }
35
-
36
- @each $degree, $value in $df-degrees {
37
- .df-transform-r-#{$degree} {
38
- transform: rotate($value);
39
- }
40
- }
41
-
42
- .df-w-0 {
43
- width: 0;
44
- }
45
-
46
- // CSS class for common app container
47
- .df-app-container {
48
- min-height: 100vh;
49
- display: flex;
50
- flex-direction: column;
51
- }
@@ -1,79 +0,0 @@
1
- @use 'sass:math';
2
- @use 'sass:map';
3
- // Common variables DF
4
-
5
- // stylelint-disable-next-line scss/dollar-variable-pattern
6
- $font-path: '../../../../assets/fonts' !default;
7
- $df-brand-primary-85: #006cd4 !default; // deprecated sass var
8
- $df-font-family: Design-Factory-icon !default;
9
- $df-font-awesome-font-family: 'Font Awesome 6 Pro' !default;
10
- $df-font-icon-color: $gray-600 !default;
11
- $df-mandatory-indicator-color: $danger !default;
12
- $df-mandatory-indicator-font-weight: 700 !default;
13
- $df-mandatory-indicator-margin: 0.125rem !default;
14
- $df-subtitle-color: $gray-600 !default;
15
- $df-zindex-topmost: 10000 !default;
16
- $df-font-size-xs: $font-size-sm !default;
17
- $df-form-placeholder-font-style: italic !default;
18
- // Merge DF Spacer with BS ones
19
- // @deprecated - will be removed in version 21, use $spacer-4 instead of '75'
20
- // stylelint-disable-next-line scss/dollar-variable-pattern, scss/dollar-variable-default
21
- $spacers: map.merge(
22
- (
23
- '75': (
24
- calc($spacer * 0.75)
25
- )
26
- ),
27
- $spacers
28
- );
29
-
30
- // stylelint-disable-next-line scss/dollar-variable-default
31
- $df-size-ratios: map.merge(
32
- (
33
- 'sm': math.div($font-size-sm, $font-size-base),
34
- 'lg': math.div($font-size-lg, $font-size-base)
35
- ),
36
- $df-size-ratios
37
- );
38
-
39
- $df-cursor-type: pointer !default;
40
- $df-focused-border-radius: $border-radius !default;
41
- $df-focused-box-shadow: $input-btn-focus-box-shadow !default; // $input-btn-focus-box-shadow need to be customize for changing the whole box-shadow
42
- $df-focused-inset-box-shadow: inset 0 0 var(--#{$prefix}box-shadow-blur, $input-btn-focus-blur)
43
- var(--#{$prefix}box-shadow-width, $input-btn-focus-width) var(--#{$prefix}box-shadow-color, $input-btn-focus-color) !default; // default $input-btn-focus-box-shadow
44
- $df-focused-border: $border-width solid shades-css-var('primary') !default;
45
- $df-enable-rtl: false !default;
46
-
47
- // Disabled state
48
- $df-disabled-bg-color: var(--#{$prefix}gray-100) !default;
49
- $df-disabled-color: var(--#{$prefix}gray-300) !default;
50
- $df-disabled-opacity: 1 !default;
51
- $df-disabled-cursor: not-allowed !default;
52
- $df-hover-bg-color: shades-css-var(
53
- 'white',
54
- 'bg-hover-color'
55
- ) !default; // hover on light (white) bg not button. Migrate to white color shade ?
56
- $df-focus-outline: none !default;
57
-
58
- // TODO propagate the usage of the variables for the link hover text-decoration
59
- $df-link-hover-text-decoration: none !default;
60
- // TODO same for visited / disabled / more link / icon in link ?
61
- // stylelint-disable scss/dollar-variable-pattern
62
- $shade-colors-rgb: map-loop($shade-colors, to-rgb, '$value') !default;
63
- $shade-colors-text: map-loop($shade-colors, color-contrast, '$value') !default;
64
- $shade-colors-text-rgb: map-loop($shade-colors-text, to-rgb, '$value') !default;
65
-
66
- //Windows High Contrast Mode
67
- $df-high-contrast-color: rgba(0, 0, 0, 0) !default;
68
-
69
- $df-degrees: (
70
- 0: 0deg,
71
- 45: 45deg,
72
- 90: 90deg,
73
- 135: 135deg,
74
- 180: 180deg,
75
- 225: 225deg,
76
- 270: 270deg,
77
- 315: 315deg,
78
- 360: 360deg
79
- ) !default;