@portnet/ui 5.0.28 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (736) hide show
  1. package/CHANGELOG.md +524 -0
  2. package/README.md +101 -38
  3. package/dist/index.d.ts +59 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +174 -203
  6. package/dist/index.js.map +1 -0
  7. package/dist/v2/__tests__/MobileRowCard.test.js +337 -0
  8. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -0
  9. package/dist/v2/__tests__/apiError.test.js +182 -0
  10. package/dist/v2/__tests__/apiError.test.js.map +1 -0
  11. package/dist/v2/__tests__/banned-patterns.test.js +272 -0
  12. package/dist/v2/__tests__/banned-patterns.test.js.map +1 -0
  13. package/dist/v2/__tests__/contrast-palette.test.js +225 -0
  14. package/dist/v2/__tests__/contrast-palette.test.js.map +1 -0
  15. package/dist/v2/__tests__/cssVariables.test.js +158 -0
  16. package/dist/v2/__tests__/cssVariables.test.js.map +1 -0
  17. package/dist/v2/__tests__/labels-merge.test.js +153 -0
  18. package/dist/v2/__tests__/labels-merge.test.js.map +1 -0
  19. package/dist/v2/__tests__/locale-fallback.test.js +111 -0
  20. package/dist/v2/__tests__/locale-fallback.test.js.map +1 -0
  21. package/dist/v2/__tests__/useFocusTrap.test.js +517 -0
  22. package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -0
  23. package/dist/v2/components/Accordion.d.ts +56 -0
  24. package/dist/v2/components/Accordion.d.ts.map +1 -0
  25. package/dist/v2/components/Accordion.js +238 -0
  26. package/dist/v2/components/Accordion.js.map +1 -0
  27. package/dist/v2/components/ActionStrip.d.ts +67 -0
  28. package/dist/v2/components/ActionStrip.d.ts.map +1 -0
  29. package/dist/v2/components/ActionStrip.js +154 -0
  30. package/dist/v2/components/ActionStrip.js.map +1 -0
  31. package/dist/v2/components/Banner.d.ts +49 -0
  32. package/dist/v2/components/Banner.d.ts.map +1 -0
  33. package/dist/v2/components/Banner.js +183 -0
  34. package/dist/v2/components/Banner.js.map +1 -0
  35. package/dist/v2/components/Busy.d.ts +18 -0
  36. package/dist/v2/components/Busy.d.ts.map +1 -0
  37. package/dist/v2/components/Busy.js +104 -0
  38. package/dist/v2/components/Busy.js.map +1 -0
  39. package/dist/v2/components/Button.d.ts +36 -0
  40. package/dist/v2/components/Button.d.ts.map +1 -0
  41. package/dist/v2/components/Button.js +122 -0
  42. package/dist/v2/components/Button.js.map +1 -0
  43. package/dist/v2/components/CategoryTag.d.ts +45 -0
  44. package/dist/v2/components/CategoryTag.d.ts.map +1 -0
  45. package/dist/v2/components/CategoryTag.js +89 -0
  46. package/dist/v2/components/CategoryTag.js.map +1 -0
  47. package/dist/v2/components/Checkbox.d.ts +59 -0
  48. package/dist/v2/components/Checkbox.d.ts.map +1 -0
  49. package/dist/v2/components/Checkbox.js +134 -0
  50. package/dist/v2/components/Checkbox.js.map +1 -0
  51. package/dist/v2/components/Chip.d.ts +48 -0
  52. package/dist/v2/components/Chip.d.ts.map +1 -0
  53. package/dist/v2/components/Chip.js +131 -0
  54. package/dist/v2/components/Chip.js.map +1 -0
  55. package/dist/v2/components/Combobox.d.ts +134 -0
  56. package/dist/v2/components/Combobox.d.ts.map +1 -0
  57. package/dist/v2/components/Combobox.js +399 -0
  58. package/dist/v2/components/Combobox.js.map +1 -0
  59. package/dist/v2/components/CommandPalette.d.ts +36 -0
  60. package/dist/v2/components/CommandPalette.d.ts.map +1 -0
  61. package/dist/v2/components/CommandPalette.js +672 -0
  62. package/dist/v2/components/CommandPalette.js.map +1 -0
  63. package/dist/v2/components/ConfirmDialog.d.ts +23 -0
  64. package/dist/v2/components/ConfirmDialog.d.ts.map +1 -0
  65. package/dist/v2/components/ConfirmDialog.js +150 -0
  66. package/dist/v2/components/ConfirmDialog.js.map +1 -0
  67. package/dist/v2/components/DatePicker.d.ts +21 -0
  68. package/dist/v2/components/DatePicker.d.ts.map +1 -0
  69. package/dist/v2/components/DatePicker.js +207 -0
  70. package/dist/v2/components/DatePicker.js.map +1 -0
  71. package/dist/v2/components/DateRangePicker.d.ts +81 -0
  72. package/dist/v2/components/DateRangePicker.d.ts.map +1 -0
  73. package/dist/v2/components/DateRangePicker.js +295 -0
  74. package/dist/v2/components/DateRangePicker.js.map +1 -0
  75. package/dist/v2/components/DateTimePicker.d.ts +21 -0
  76. package/dist/v2/components/DateTimePicker.d.ts.map +1 -0
  77. package/dist/v2/components/DateTimePicker.js +189 -0
  78. package/dist/v2/components/DateTimePicker.js.map +1 -0
  79. package/dist/v2/components/Drawer.d.ts +34 -0
  80. package/dist/v2/components/Drawer.d.ts.map +1 -0
  81. package/dist/v2/components/Drawer.js +339 -0
  82. package/dist/v2/components/Drawer.js.map +1 -0
  83. package/dist/v2/components/Dropzone.d.ts +150 -0
  84. package/dist/v2/components/Dropzone.d.ts.map +1 -0
  85. package/dist/v2/components/Dropzone.js +539 -0
  86. package/dist/v2/components/Dropzone.js.map +1 -0
  87. package/dist/v2/components/EmptyState.d.ts +36 -0
  88. package/dist/v2/components/EmptyState.d.ts.map +1 -0
  89. package/dist/v2/components/EmptyState.js +112 -0
  90. package/dist/v2/components/EmptyState.js.map +1 -0
  91. package/dist/v2/components/FavoriteToggle.d.ts +22 -0
  92. package/dist/v2/components/FavoriteToggle.d.ts.map +1 -0
  93. package/dist/v2/components/FavoriteToggle.js +134 -0
  94. package/dist/v2/components/FavoriteToggle.js.map +1 -0
  95. package/dist/v2/components/Field.d.ts +58 -0
  96. package/dist/v2/components/Field.d.ts.map +1 -0
  97. package/dist/v2/components/Field.js +186 -0
  98. package/dist/v2/components/Field.js.map +1 -0
  99. package/dist/v2/components/FieldHelp.d.ts +54 -0
  100. package/dist/v2/components/FieldHelp.d.ts.map +1 -0
  101. package/dist/v2/components/FieldHelp.js +209 -0
  102. package/dist/v2/components/FieldHelp.js.map +1 -0
  103. package/dist/v2/components/FilterTab.d.ts +35 -0
  104. package/dist/v2/components/FilterTab.d.ts.map +1 -0
  105. package/dist/v2/components/FilterTab.js +144 -0
  106. package/dist/v2/components/FilterTab.js.map +1 -0
  107. package/dist/v2/components/ForbiddenPage.d.ts +40 -0
  108. package/dist/v2/components/ForbiddenPage.d.ts.map +1 -0
  109. package/dist/v2/components/ForbiddenPage.js +81 -0
  110. package/dist/v2/components/ForbiddenPage.js.map +1 -0
  111. package/dist/v2/components/FormGrid.d.ts +76 -0
  112. package/dist/v2/components/FormGrid.d.ts.map +1 -0
  113. package/dist/v2/components/FormGrid.js +177 -0
  114. package/dist/v2/components/FormGrid.js.map +1 -0
  115. package/dist/v2/components/FormikDisplay.d.ts +38 -0
  116. package/dist/v2/components/FormikDisplay.d.ts.map +1 -0
  117. package/dist/v2/components/FormikDisplay.js +125 -0
  118. package/dist/v2/components/FormikDisplay.js.map +1 -0
  119. package/dist/v2/components/Input.d.ts +62 -0
  120. package/dist/v2/components/Input.d.ts.map +1 -0
  121. package/dist/v2/components/Input.js +115 -0
  122. package/dist/v2/components/Input.js.map +1 -0
  123. package/dist/v2/components/KPICard.d.ts +22 -0
  124. package/dist/v2/components/KPICard.d.ts.map +1 -0
  125. package/dist/v2/components/KPICard.js +205 -0
  126. package/dist/v2/components/KPICard.js.map +1 -0
  127. package/dist/v2/components/KV.d.ts +25 -0
  128. package/dist/v2/components/KV.d.ts.map +1 -0
  129. package/dist/v2/components/KV.js +82 -0
  130. package/dist/v2/components/KV.js.map +1 -0
  131. package/dist/v2/components/KVGrid.d.ts +44 -0
  132. package/dist/v2/components/KVGrid.d.ts.map +1 -0
  133. package/dist/v2/components/KVGrid.js +73 -0
  134. package/dist/v2/components/KVGrid.js.map +1 -0
  135. package/dist/v2/components/Layout.d.ts +78 -0
  136. package/dist/v2/components/Layout.d.ts.map +1 -0
  137. package/dist/v2/components/Layout.js +284 -0
  138. package/dist/v2/components/Layout.js.map +1 -0
  139. package/dist/v2/components/MobileRowCard.d.ts +63 -0
  140. package/dist/v2/components/MobileRowCard.d.ts.map +1 -0
  141. package/dist/v2/components/MobileRowCard.js +321 -0
  142. package/dist/v2/components/MobileRowCard.js.map +1 -0
  143. package/dist/v2/components/Modal.d.ts +21 -0
  144. package/dist/v2/components/Modal.d.ts.map +1 -0
  145. package/dist/v2/components/Modal.js +281 -0
  146. package/dist/v2/components/Modal.js.map +1 -0
  147. package/dist/v2/components/NetworkErrorPage.d.ts +11 -0
  148. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -0
  149. package/dist/v2/components/NetworkErrorPage.js +86 -0
  150. package/dist/v2/components/NetworkErrorPage.js.map +1 -0
  151. package/dist/v2/components/NotFoundPage.d.ts +9 -0
  152. package/dist/v2/components/NotFoundPage.d.ts.map +1 -0
  153. package/dist/v2/components/NotFoundPage.js +66 -0
  154. package/dist/v2/components/NotFoundPage.js.map +1 -0
  155. package/dist/v2/components/NumberInput.d.ts +83 -0
  156. package/dist/v2/components/NumberInput.d.ts.map +1 -0
  157. package/dist/v2/components/NumberInput.js +316 -0
  158. package/dist/v2/components/NumberInput.js.map +1 -0
  159. package/dist/v2/components/OverflowMenu.d.ts +55 -0
  160. package/dist/v2/components/OverflowMenu.d.ts.map +1 -0
  161. package/dist/v2/components/OverflowMenu.js +196 -0
  162. package/dist/v2/components/OverflowMenu.js.map +1 -0
  163. package/dist/v2/components/PdfViewer.d.ts +56 -0
  164. package/dist/v2/components/PdfViewer.d.ts.map +1 -0
  165. package/dist/v2/components/PdfViewer.js +132 -0
  166. package/dist/v2/components/PdfViewer.js.map +1 -0
  167. package/dist/v2/components/ProgressBar.d.ts +53 -0
  168. package/dist/v2/components/ProgressBar.d.ts.map +1 -0
  169. package/dist/v2/components/ProgressBar.js +209 -0
  170. package/dist/v2/components/ProgressBar.js.map +1 -0
  171. package/dist/v2/components/Radio.d.ts +78 -0
  172. package/dist/v2/components/Radio.d.ts.map +1 -0
  173. package/dist/v2/components/Radio.js +238 -0
  174. package/dist/v2/components/Radio.js.map +1 -0
  175. package/dist/v2/components/SectionHeader.d.ts +53 -0
  176. package/dist/v2/components/SectionHeader.d.ts.map +1 -0
  177. package/dist/v2/components/SectionHeader.js +140 -0
  178. package/dist/v2/components/SectionHeader.js.map +1 -0
  179. package/dist/v2/components/Segmented.d.ts +61 -0
  180. package/dist/v2/components/Segmented.d.ts.map +1 -0
  181. package/dist/v2/components/Segmented.js +261 -0
  182. package/dist/v2/components/Segmented.js.map +1 -0
  183. package/dist/v2/components/Select.d.ts +72 -0
  184. package/dist/v2/components/Select.d.ts.map +1 -0
  185. package/dist/v2/components/Select.js +382 -0
  186. package/dist/v2/components/Select.js.map +1 -0
  187. package/dist/v2/components/ServerErrorPage.d.ts +11 -0
  188. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -0
  189. package/dist/v2/components/ServerErrorPage.js +82 -0
  190. package/dist/v2/components/ServerErrorPage.js.map +1 -0
  191. package/dist/v2/components/Skeleton.d.ts +56 -0
  192. package/dist/v2/components/Skeleton.d.ts.map +1 -0
  193. package/dist/v2/components/Skeleton.js +281 -0
  194. package/dist/v2/components/Skeleton.js.map +1 -0
  195. package/dist/v2/components/SkipLink.d.ts +30 -0
  196. package/dist/v2/components/SkipLink.d.ts.map +1 -0
  197. package/dist/v2/components/SkipLink.js +58 -0
  198. package/dist/v2/components/SkipLink.js.map +1 -0
  199. package/dist/v2/components/Spinner.d.ts +40 -0
  200. package/dist/v2/components/Spinner.d.ts.map +1 -0
  201. package/dist/v2/components/Spinner.js +76 -0
  202. package/dist/v2/components/Spinner.js.map +1 -0
  203. package/dist/v2/components/Status.d.ts +42 -0
  204. package/dist/v2/components/Status.d.ts.map +1 -0
  205. package/dist/v2/components/Status.js +71 -0
  206. package/dist/v2/components/Status.js.map +1 -0
  207. package/dist/v2/components/Stepper.d.ts +136 -0
  208. package/dist/v2/components/Stepper.d.ts.map +1 -0
  209. package/dist/v2/components/Stepper.js +415 -0
  210. package/dist/v2/components/Stepper.js.map +1 -0
  211. package/dist/v2/components/Switch.d.ts +30 -0
  212. package/dist/v2/components/Switch.d.ts.map +1 -0
  213. package/dist/v2/components/Switch.js +136 -0
  214. package/dist/v2/components/Switch.js.map +1 -0
  215. package/dist/v2/components/Tabs.d.ts +49 -0
  216. package/dist/v2/components/Tabs.d.ts.map +1 -0
  217. package/dist/v2/components/Tabs.js +160 -0
  218. package/dist/v2/components/Tabs.js.map +1 -0
  219. package/dist/v2/components/TelInput.d.ts +33 -0
  220. package/dist/v2/components/TelInput.d.ts.map +1 -0
  221. package/dist/v2/components/TelInput.js +282 -0
  222. package/dist/v2/components/TelInput.js.map +1 -0
  223. package/dist/v2/components/Textarea.d.ts +23 -0
  224. package/dist/v2/components/Textarea.d.ts.map +1 -0
  225. package/dist/v2/components/Textarea.js +80 -0
  226. package/dist/v2/components/Textarea.js.map +1 -0
  227. package/dist/v2/components/TimePicker.d.ts +21 -0
  228. package/dist/v2/components/TimePicker.d.ts.map +1 -0
  229. package/dist/v2/components/TimePicker.js +141 -0
  230. package/dist/v2/components/TimePicker.js.map +1 -0
  231. package/dist/v2/components/Toast.d.ts +32 -0
  232. package/dist/v2/components/Toast.d.ts.map +1 -0
  233. package/dist/v2/components/Toast.js +384 -0
  234. package/dist/v2/components/Toast.js.map +1 -0
  235. package/dist/v2/components/Tooltip.d.ts +9 -0
  236. package/dist/v2/components/Tooltip.d.ts.map +1 -0
  237. package/dist/v2/components/Tooltip.js +169 -0
  238. package/dist/v2/components/Tooltip.js.map +1 -0
  239. package/dist/v2/components/_ErrorPageBody.d.ts +48 -0
  240. package/dist/v2/components/_ErrorPageBody.d.ts.map +1 -0
  241. package/dist/v2/components/_ErrorPageBody.js +96 -0
  242. package/dist/v2/components/_ErrorPageBody.js.map +1 -0
  243. package/dist/v2/components/_pickerShared.d.ts +47 -0
  244. package/dist/v2/components/_pickerShared.d.ts.map +1 -0
  245. package/dist/v2/components/_pickerShared.js +68 -0
  246. package/dist/v2/components/_pickerShared.js.map +1 -0
  247. package/dist/v2/components/index.d.ts +83 -0
  248. package/dist/v2/components/index.d.ts.map +1 -0
  249. package/dist/v2/components/index.js +477 -0
  250. package/dist/v2/components/index.js.map +1 -0
  251. package/dist/v2/hooks/index.d.ts +11 -0
  252. package/dist/v2/hooks/index.d.ts.map +1 -0
  253. package/dist/v2/hooks/index.js +85 -0
  254. package/dist/v2/hooks/index.js.map +1 -0
  255. package/dist/v2/hooks/useDelayedFlag.d.ts +22 -0
  256. package/dist/v2/hooks/useDelayedFlag.d.ts.map +1 -0
  257. package/dist/v2/hooks/useDelayedFlag.js +60 -0
  258. package/dist/v2/hooks/useDelayedFlag.js.map +1 -0
  259. package/dist/v2/hooks/useDensity.d.ts +23 -0
  260. package/dist/v2/hooks/useDensity.d.ts.map +1 -0
  261. package/dist/v2/hooks/useDensity.js +124 -0
  262. package/dist/v2/hooks/useDensity.js.map +1 -0
  263. package/dist/v2/hooks/useFocusFirstError.d.ts +121 -0
  264. package/dist/v2/hooks/useFocusFirstError.d.ts.map +1 -0
  265. package/dist/v2/hooks/useFocusFirstError.js +203 -0
  266. package/dist/v2/hooks/useFocusFirstError.js.map +1 -0
  267. package/dist/v2/hooks/useFocusTrap.d.ts +3 -0
  268. package/dist/v2/hooks/useFocusTrap.d.ts.map +1 -0
  269. package/dist/v2/hooks/useFocusTrap.js +207 -0
  270. package/dist/v2/hooks/useFocusTrap.js.map +1 -0
  271. package/dist/v2/hooks/useFormAutoSave.d.ts +42 -0
  272. package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -0
  273. package/dist/v2/hooks/useFormAutoSave.js +186 -0
  274. package/dist/v2/hooks/useFormAutoSave.js.map +1 -0
  275. package/dist/v2/hooks/useFormCompletionProgress.d.ts +52 -0
  276. package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -0
  277. package/dist/v2/hooks/useFormCompletionProgress.js +136 -0
  278. package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -0
  279. package/dist/v2/hooks/useResolvedDensity.d.ts +31 -0
  280. package/dist/v2/hooks/useResolvedDensity.d.ts.map +1 -0
  281. package/dist/v2/hooks/useResolvedDensity.js +50 -0
  282. package/dist/v2/hooks/useResolvedDensity.js.map +1 -0
  283. package/dist/v2/hooks/useSortedRows.d.ts +25 -0
  284. package/dist/v2/hooks/useSortedRows.d.ts.map +1 -0
  285. package/dist/v2/hooks/useSortedRows.js +38 -0
  286. package/dist/v2/hooks/useSortedRows.js.map +1 -0
  287. package/dist/v2/hooks/useTabLoading.d.ts +39 -0
  288. package/dist/v2/hooks/useTabLoading.d.ts.map +1 -0
  289. package/dist/v2/hooks/useTabLoading.js +85 -0
  290. package/dist/v2/hooks/useTabLoading.js.map +1 -0
  291. package/dist/v2/index.d.ts +115 -0
  292. package/dist/v2/index.d.ts.map +1 -0
  293. package/dist/v2/index.js +1127 -0
  294. package/dist/v2/index.js.map +1 -0
  295. package/dist/v2/modalContext.d.ts +96 -0
  296. package/dist/v2/modalContext.d.ts.map +1 -0
  297. package/dist/v2/modalContext.js +113 -0
  298. package/dist/v2/modalContext.js.map +1 -0
  299. package/dist/v2/models/favorite.d.ts +14 -0
  300. package/dist/v2/models/favorite.d.ts.map +1 -0
  301. package/dist/v2/models/favorite.js +6 -0
  302. package/dist/v2/models/favorite.js.map +1 -0
  303. package/dist/v2/models/index.d.ts +11 -0
  304. package/dist/v2/models/index.d.ts.map +1 -0
  305. package/dist/v2/models/index.js +50 -0
  306. package/dist/v2/models/index.js.map +1 -0
  307. package/dist/v2/models/personalization.d.ts +65 -0
  308. package/dist/v2/models/personalization.d.ts.map +1 -0
  309. package/dist/v2/models/personalization.js +6 -0
  310. package/dist/v2/models/personalization.js.map +1 -0
  311. package/dist/v2/models/referentiel.d.ts +67 -0
  312. package/dist/v2/models/referentiel.d.ts.map +1 -0
  313. package/dist/v2/models/referentiel.js +6 -0
  314. package/dist/v2/models/referentiel.js.map +1 -0
  315. package/dist/v2/models/savedFilter.d.ts +22 -0
  316. package/dist/v2/models/savedFilter.d.ts.map +1 -0
  317. package/dist/v2/models/savedFilter.js +6 -0
  318. package/dist/v2/models/savedFilter.js.map +1 -0
  319. package/dist/v2/patterns/ActionBar.d.ts +137 -0
  320. package/dist/v2/patterns/ActionBar.d.ts.map +1 -0
  321. package/dist/v2/patterns/ActionBar.js +601 -0
  322. package/dist/v2/patterns/ActionBar.js.map +1 -0
  323. package/dist/v2/patterns/BulkActionBar.d.ts +63 -0
  324. package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -0
  325. package/dist/v2/patterns/BulkActionBar.js +153 -0
  326. package/dist/v2/patterns/BulkActionBar.js.map +1 -0
  327. package/dist/v2/patterns/CollapsibleDataGrid.d.ts +62 -0
  328. package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -0
  329. package/dist/v2/patterns/CollapsibleDataGrid.js +306 -0
  330. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -0
  331. package/dist/v2/patterns/ColumnsToggle.d.ts +55 -0
  332. package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -0
  333. package/dist/v2/patterns/ColumnsToggle.js +314 -0
  334. package/dist/v2/patterns/ColumnsToggle.js.map +1 -0
  335. package/dist/v2/patterns/DataGrid.d.ts +7 -0
  336. package/dist/v2/patterns/DataGrid.d.ts.map +1 -0
  337. package/dist/v2/patterns/DataGrid.js +834 -0
  338. package/dist/v2/patterns/DataGrid.js.map +1 -0
  339. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +68 -0
  340. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -0
  341. package/dist/v2/patterns/DataGridSettingsMenu.js +381 -0
  342. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -0
  343. package/dist/v2/patterns/DataGridToolbar.d.ts +81 -0
  344. package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -0
  345. package/dist/v2/patterns/DataGridToolbar.js +255 -0
  346. package/dist/v2/patterns/DataGridToolbar.js.map +1 -0
  347. package/dist/v2/patterns/DataGridVirtualized.d.ts +76 -0
  348. package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -0
  349. package/dist/v2/patterns/DataGridVirtualized.js +528 -0
  350. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -0
  351. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +46 -0
  352. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -0
  353. package/dist/v2/patterns/DeleteResourceConfirmDialog.js +77 -0
  354. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
  355. package/dist/v2/patterns/FavoriteColumn.d.ts +72 -0
  356. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -0
  357. package/dist/v2/patterns/FavoriteColumn.js +171 -0
  358. package/dist/v2/patterns/FavoriteColumn.js.map +1 -0
  359. package/dist/v2/patterns/FavoritesFilter.d.ts +51 -0
  360. package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -0
  361. package/dist/v2/patterns/FavoritesFilter.js +97 -0
  362. package/dist/v2/patterns/FavoritesFilter.js.map +1 -0
  363. package/dist/v2/patterns/FormErrorSummary.d.ts +39 -0
  364. package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -0
  365. package/dist/v2/patterns/FormErrorSummary.js +111 -0
  366. package/dist/v2/patterns/FormErrorSummary.js.map +1 -0
  367. package/dist/v2/patterns/FormPageShell.d.ts +55 -0
  368. package/dist/v2/patterns/FormPageShell.d.ts.map +1 -0
  369. package/dist/v2/patterns/FormPageShell.js +133 -0
  370. package/dist/v2/patterns/FormPageShell.js.map +1 -0
  371. package/dist/v2/patterns/FormSection.d.ts +53 -0
  372. package/dist/v2/patterns/FormSection.d.ts.map +1 -0
  373. package/dist/v2/patterns/FormSection.js +162 -0
  374. package/dist/v2/patterns/FormSection.js.map +1 -0
  375. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +51 -0
  376. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -0
  377. package/dist/v2/patterns/FormikCheckboxGroup.js +117 -0
  378. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -0
  379. package/dist/v2/patterns/FormikCombobox.d.ts +43 -0
  380. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -0
  381. package/dist/v2/patterns/FormikCombobox.js +121 -0
  382. package/dist/v2/patterns/FormikCombobox.js.map +1 -0
  383. package/dist/v2/patterns/FormikDatePicker.d.ts +87 -0
  384. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -0
  385. package/dist/v2/patterns/FormikDatePicker.js +177 -0
  386. package/dist/v2/patterns/FormikDatePicker.js.map +1 -0
  387. package/dist/v2/patterns/FormikErrorFocus.d.ts +59 -0
  388. package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -0
  389. package/dist/v2/patterns/FormikErrorFocus.js +83 -0
  390. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -0
  391. package/dist/v2/patterns/FormikFile.d.ts +43 -0
  392. package/dist/v2/patterns/FormikFile.d.ts.map +1 -0
  393. package/dist/v2/patterns/FormikFile.js +156 -0
  394. package/dist/v2/patterns/FormikFile.js.map +1 -0
  395. package/dist/v2/patterns/FormikInput.d.ts +37 -0
  396. package/dist/v2/patterns/FormikInput.d.ts.map +1 -0
  397. package/dist/v2/patterns/FormikInput.js +87 -0
  398. package/dist/v2/patterns/FormikInput.js.map +1 -0
  399. package/dist/v2/patterns/FormikReferentielField.d.ts +33 -0
  400. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -0
  401. package/dist/v2/patterns/FormikReferentielField.js +124 -0
  402. package/dist/v2/patterns/FormikReferentielField.js.map +1 -0
  403. package/dist/v2/patterns/FormikSelect.d.ts +40 -0
  404. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -0
  405. package/dist/v2/patterns/FormikSelect.js +139 -0
  406. package/dist/v2/patterns/FormikSelect.js.map +1 -0
  407. package/dist/v2/patterns/FormikTextarea.d.ts +31 -0
  408. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -0
  409. package/dist/v2/patterns/FormikTextarea.js +84 -0
  410. package/dist/v2/patterns/FormikTextarea.js.map +1 -0
  411. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +44 -0
  412. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -0
  413. package/dist/v2/patterns/KeyboardShortcutsHelp.js +207 -0
  414. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
  415. package/dist/v2/patterns/NetworkErrorBanner.d.ts +26 -0
  416. package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -0
  417. package/dist/v2/patterns/NetworkErrorBanner.js +82 -0
  418. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -0
  419. package/dist/v2/patterns/PageContent.d.ts +40 -0
  420. package/dist/v2/patterns/PageContent.d.ts.map +1 -0
  421. package/dist/v2/patterns/PageContent.js +69 -0
  422. package/dist/v2/patterns/PageContent.js.map +1 -0
  423. package/dist/v2/patterns/ReferentielField.d.ts +118 -0
  424. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -0
  425. package/dist/v2/patterns/ReferentielField.js +617 -0
  426. package/dist/v2/patterns/ReferentielField.js.map +1 -0
  427. package/dist/v2/patterns/SaveFilterDialog.d.ts +68 -0
  428. package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -0
  429. package/dist/v2/patterns/SaveFilterDialog.js +203 -0
  430. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -0
  431. package/dist/v2/patterns/SavedFiltersMenu.d.ts +74 -0
  432. package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -0
  433. package/dist/v2/patterns/SavedFiltersMenu.js +412 -0
  434. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -0
  435. package/dist/v2/patterns/SkeletonPageShell.d.ts +76 -0
  436. package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -0
  437. package/dist/v2/patterns/SkeletonPageShell.js +347 -0
  438. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -0
  439. package/dist/v2/patterns/SortableHeader.d.ts +47 -0
  440. package/dist/v2/patterns/SortableHeader.d.ts.map +1 -0
  441. package/dist/v2/patterns/SortableHeader.js +193 -0
  442. package/dist/v2/patterns/SortableHeader.js.map +1 -0
  443. package/dist/v2/patterns/Tour.d.ts +55 -0
  444. package/dist/v2/patterns/Tour.d.ts.map +1 -0
  445. package/dist/v2/patterns/Tour.js +473 -0
  446. package/dist/v2/patterns/Tour.js.map +1 -0
  447. package/dist/v2/patterns/_dataGridShared.d.ts +125 -0
  448. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -0
  449. package/dist/v2/patterns/_dataGridShared.js +406 -0
  450. package/dist/v2/patterns/_dataGridShared.js.map +1 -0
  451. package/dist/v2/patterns/_sort.d.ts +22 -0
  452. package/dist/v2/patterns/_sort.d.ts.map +1 -0
  453. package/dist/v2/patterns/_sort.js +118 -0
  454. package/dist/v2/patterns/_sort.js.map +1 -0
  455. package/dist/v2/patterns/_useColumnReorder.d.ts +69 -0
  456. package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -0
  457. package/dist/v2/patterns/_useColumnReorder.js +264 -0
  458. package/dist/v2/patterns/_useColumnReorder.js.map +1 -0
  459. package/dist/v2/patterns/_useColumnResize.d.ts +49 -0
  460. package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -0
  461. package/dist/v2/patterns/_useColumnResize.js +198 -0
  462. package/dist/v2/patterns/_useColumnResize.js.map +1 -0
  463. package/dist/v2/patterns/index.d.ts +62 -0
  464. package/dist/v2/patterns/index.d.ts.map +1 -0
  465. package/dist/v2/patterns/index.js +246 -0
  466. package/dist/v2/patterns/index.js.map +1 -0
  467. package/dist/v2/personalization/PersonalizationProvider.d.ts +80 -0
  468. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -0
  469. package/dist/v2/personalization/PersonalizationProvider.js +177 -0
  470. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -0
  471. package/dist/v2/personalization/adapters/_storageKey.d.ts +35 -0
  472. package/dist/v2/personalization/adapters/_storageKey.d.ts.map +1 -0
  473. package/dist/v2/personalization/adapters/_storageKey.js +69 -0
  474. package/dist/v2/personalization/adapters/_storageKey.js.map +1 -0
  475. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +31 -0
  476. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -0
  477. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +128 -0
  478. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
  479. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +25 -0
  480. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -0
  481. package/dist/v2/personalization/adapters/createMemoryAdapter.js +76 -0
  482. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
  483. package/dist/v2/personalization/adapters/index.d.ts +10 -0
  484. package/dist/v2/personalization/adapters/index.d.ts.map +1 -0
  485. package/dist/v2/personalization/adapters/index.js +21 -0
  486. package/dist/v2/personalization/adapters/index.js.map +1 -0
  487. package/dist/v2/personalization/capabilities/favorites.d.ts +53 -0
  488. package/dist/v2/personalization/capabilities/favorites.d.ts.map +1 -0
  489. package/dist/v2/personalization/capabilities/favorites.js +223 -0
  490. package/dist/v2/personalization/capabilities/favorites.js.map +1 -0
  491. package/dist/v2/personalization/capabilities/favoritesView.d.ts +58 -0
  492. package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -0
  493. package/dist/v2/personalization/capabilities/favoritesView.js +121 -0
  494. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -0
  495. package/dist/v2/personalization/capabilities/index.d.ts +16 -0
  496. package/dist/v2/personalization/capabilities/index.d.ts.map +1 -0
  497. package/dist/v2/personalization/capabilities/index.js +69 -0
  498. package/dist/v2/personalization/capabilities/index.js.map +1 -0
  499. package/dist/v2/personalization/capabilities/savedFilters.d.ts +61 -0
  500. package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -0
  501. package/dist/v2/personalization/capabilities/savedFilters.js +297 -0
  502. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -0
  503. package/dist/v2/personalization/createPersonalizationStore.d.ts +76 -0
  504. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -0
  505. package/dist/v2/personalization/createPersonalizationStore.js +475 -0
  506. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -0
  507. package/dist/v2/personalization/index.d.ts +33 -0
  508. package/dist/v2/personalization/index.d.ts.map +1 -0
  509. package/dist/v2/personalization/index.js +111 -0
  510. package/dist/v2/personalization/index.js.map +1 -0
  511. package/dist/v2/personalization/personalizationContext.d.ts +78 -0
  512. package/dist/v2/personalization/personalizationContext.d.ts.map +1 -0
  513. package/dist/v2/personalization/personalizationContext.js +121 -0
  514. package/dist/v2/personalization/personalizationContext.js.map +1 -0
  515. package/dist/v2/personalization/schema.d.ts +60 -0
  516. package/dist/v2/personalization/schema.d.ts.map +1 -0
  517. package/dist/v2/personalization/schema.js +102 -0
  518. package/dist/v2/personalization/schema.js.map +1 -0
  519. package/dist/v2/personalization/types.d.ts +81 -0
  520. package/dist/v2/personalization/types.d.ts.map +1 -0
  521. package/dist/v2/personalization/types.js +6 -0
  522. package/dist/v2/personalization/types.js.map +1 -0
  523. package/dist/v2/referentiel/ReferentielProvider.d.ts +53 -0
  524. package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -0
  525. package/dist/v2/referentiel/ReferentielProvider.js +94 -0
  526. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -0
  527. package/dist/v2/referentiel/index.d.ts +18 -0
  528. package/dist/v2/referentiel/index.d.ts.map +1 -0
  529. package/dist/v2/referentiel/index.js +44 -0
  530. package/dist/v2/referentiel/index.js.map +1 -0
  531. package/dist/v2/referentiel/useReferentielClient.d.ts +15 -0
  532. package/dist/v2/referentiel/useReferentielClient.d.ts.map +1 -0
  533. package/dist/v2/referentiel/useReferentielClient.js +46 -0
  534. package/dist/v2/referentiel/useReferentielClient.js.map +1 -0
  535. package/dist/v2/referentiel/useReferentielOptions.d.ts +40 -0
  536. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -0
  537. package/dist/v2/referentiel/useReferentielOptions.js +177 -0
  538. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -0
  539. package/dist/v2/referentiel/useReferentielSearch.d.ts +76 -0
  540. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -0
  541. package/dist/v2/referentiel/useReferentielSearch.js +140 -0
  542. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -0
  543. package/dist/v2/styles/base.css +425 -0
  544. package/dist/v2/styles/css.d.ts +10 -0
  545. package/dist/v2/styles/index.d.ts +12 -0
  546. package/dist/v2/styles/index.d.ts.map +1 -0
  547. package/dist/v2/styles/index.js +4 -0
  548. package/dist/v2/styles/index.js.map +1 -0
  549. package/dist/v2/theme/_brand.d.ts +29 -0
  550. package/dist/v2/theme/_brand.d.ts.map +1 -0
  551. package/dist/v2/theme/_brand.js +69 -0
  552. package/dist/v2/theme/_brand.js.map +1 -0
  553. package/dist/v2/theme/_brandSecondary.d.ts +26 -0
  554. package/dist/v2/theme/_brandSecondary.d.ts.map +1 -0
  555. package/dist/v2/theme/_brandSecondary.js +65 -0
  556. package/dist/v2/theme/_brandSecondary.js.map +1 -0
  557. package/dist/v2/theme/createPortnetTheme.d.ts +50 -0
  558. package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -0
  559. package/dist/v2/theme/createPortnetTheme.js +529 -0
  560. package/dist/v2/theme/createPortnetTheme.js.map +1 -0
  561. package/dist/v2/theme/cssVariables.d.ts +41 -0
  562. package/dist/v2/theme/cssVariables.d.ts.map +1 -0
  563. package/dist/v2/theme/cssVariables.js +205 -0
  564. package/dist/v2/theme/cssVariables.js.map +1 -0
  565. package/dist/v2/theme/index.d.ts +33 -0
  566. package/dist/v2/theme/index.d.ts.map +1 -0
  567. package/dist/v2/theme/index.js +60 -0
  568. package/dist/v2/theme/index.js.map +1 -0
  569. package/dist/v2/tokens/breakpoints.d.ts +74 -0
  570. package/dist/v2/tokens/breakpoints.d.ts.map +1 -0
  571. package/dist/v2/tokens/breakpoints.js +114 -0
  572. package/dist/v2/tokens/breakpoints.js.map +1 -0
  573. package/dist/v2/tokens/colors.d.ts +228 -0
  574. package/dist/v2/tokens/colors.d.ts.map +1 -0
  575. package/dist/v2/tokens/colors.js +225 -0
  576. package/dist/v2/tokens/colors.js.map +1 -0
  577. package/dist/v2/tokens/density.d.ts +142 -0
  578. package/dist/v2/tokens/density.d.ts.map +1 -0
  579. package/dist/v2/tokens/density.js +111 -0
  580. package/dist/v2/tokens/density.js.map +1 -0
  581. package/dist/v2/tokens/index.d.ts +556 -0
  582. package/dist/v2/tokens/index.d.ts.map +1 -0
  583. package/dist/v2/tokens/index.js +313 -0
  584. package/dist/v2/tokens/index.js.map +1 -0
  585. package/dist/v2/tokens/motion.d.ts +85 -0
  586. package/dist/v2/tokens/motion.d.ts.map +1 -0
  587. package/dist/v2/tokens/motion.js +94 -0
  588. package/dist/v2/tokens/motion.js.map +1 -0
  589. package/dist/v2/tokens/radius.d.ts +18 -0
  590. package/dist/v2/tokens/radius.d.ts.map +1 -0
  591. package/dist/v2/tokens/radius.js +28 -0
  592. package/dist/v2/tokens/radius.js.map +1 -0
  593. package/dist/v2/tokens/shadows.d.ts +25 -0
  594. package/dist/v2/tokens/shadows.d.ts.map +1 -0
  595. package/dist/v2/tokens/shadows.js +46 -0
  596. package/dist/v2/tokens/shadows.js.map +1 -0
  597. package/dist/v2/tokens/spacing.d.ts +38 -0
  598. package/dist/v2/tokens/spacing.d.ts.map +1 -0
  599. package/dist/v2/tokens/spacing.js +57 -0
  600. package/dist/v2/tokens/spacing.js.map +1 -0
  601. package/dist/v2/tokens/state.d.ts +40 -0
  602. package/dist/v2/tokens/state.d.ts.map +1 -0
  603. package/dist/v2/tokens/state.js +47 -0
  604. package/dist/v2/tokens/state.js.map +1 -0
  605. package/dist/v2/tokens/statusPalette.d.ts +54 -0
  606. package/dist/v2/tokens/statusPalette.d.ts.map +1 -0
  607. package/dist/v2/tokens/statusPalette.js +72 -0
  608. package/dist/v2/tokens/statusPalette.js.map +1 -0
  609. package/dist/v2/tokens/tokens.json +153 -0
  610. package/dist/v2/tokens/typography.d.ts +206 -0
  611. package/dist/v2/tokens/typography.d.ts.map +1 -0
  612. package/dist/v2/tokens/typography.js +155 -0
  613. package/dist/v2/tokens/typography.js.map +1 -0
  614. package/dist/v2/tokens/zIndex.d.ts +33 -0
  615. package/dist/v2/tokens/zIndex.d.ts.map +1 -0
  616. package/dist/v2/tokens/zIndex.js +50 -0
  617. package/dist/v2/tokens/zIndex.js.map +1 -0
  618. package/dist/v2/types/common.d.ts +24 -0
  619. package/dist/v2/types/common.d.ts.map +1 -0
  620. package/dist/v2/types/common.js +6 -0
  621. package/dist/v2/types/common.js.map +1 -0
  622. package/dist/v2/types/datagrid.d.ts +131 -0
  623. package/dist/v2/types/datagrid.d.ts.map +1 -0
  624. package/dist/v2/types/datagrid.js +6 -0
  625. package/dist/v2/types/datagrid.js.map +1 -0
  626. package/dist/v2/types/index.d.ts +11 -0
  627. package/dist/v2/types/index.d.ts.map +1 -0
  628. package/dist/v2/types/index.js +28 -0
  629. package/dist/v2/types/index.js.map +1 -0
  630. package/dist/v2/utils/apiError.d.ts +90 -0
  631. package/dist/v2/utils/apiError.d.ts.map +1 -0
  632. package/dist/v2/utils/apiError.js +227 -0
  633. package/dist/v2/utils/apiError.js.map +1 -0
  634. package/dist/v2/utils/contrast.d.ts +68 -0
  635. package/dist/v2/utils/contrast.d.ts.map +1 -0
  636. package/dist/v2/utils/contrast.js +167 -0
  637. package/dist/v2/utils/contrast.js.map +1 -0
  638. package/dist/v2/utils/cx.d.ts +9 -0
  639. package/dist/v2/utils/cx.d.ts.map +1 -0
  640. package/dist/v2/utils/cx.js +45 -0
  641. package/dist/v2/utils/cx.js.map +1 -0
  642. package/dist/v2/utils/fileDownload.d.ts +94 -0
  643. package/dist/v2/utils/fileDownload.d.ts.map +1 -0
  644. package/dist/v2/utils/fileDownload.js +236 -0
  645. package/dist/v2/utils/fileDownload.js.map +1 -0
  646. package/dist/v2/utils/fmtMoney.d.ts +28 -0
  647. package/dist/v2/utils/fmtMoney.d.ts.map +1 -0
  648. package/dist/v2/utils/fmtMoney.js +84 -0
  649. package/dist/v2/utils/fmtMoney.js.map +1 -0
  650. package/dist/v2/utils/index.d.ts +8 -0
  651. package/dist/v2/utils/index.d.ts.map +1 -0
  652. package/dist/v2/utils/index.js +90 -0
  653. package/dist/v2/utils/index.js.map +1 -0
  654. package/dist/v2/utils/networkStatus.d.ts +88 -0
  655. package/dist/v2/utils/networkStatus.d.ts.map +1 -0
  656. package/dist/v2/utils/networkStatus.js +121 -0
  657. package/dist/v2/utils/networkStatus.js.map +1 -0
  658. package/package.json +191 -76
  659. package/dist/api/guideApi.js +0 -12
  660. package/dist/api/guideImageService.js +0 -119
  661. package/dist/api/reclamationApi.js +0 -102
  662. package/dist/assets/guides/FAQ.json +0 -118
  663. package/dist/assets/guides/index.js +0 -11
  664. package/dist/assets/images/tijariaLogo.ico +0 -0
  665. package/dist/components/buttons/PuiButton.js +0 -217
  666. package/dist/components/buttons/PuiIconButton.js +0 -98
  667. package/dist/components/common/PuiAlertContext.js +0 -12
  668. package/dist/components/common/PuiHelpWidgetContext.js +0 -17
  669. package/dist/components/common/StyledMuiButton.js +0 -48
  670. package/dist/components/common/StyledMuiTextField.js +0 -180
  671. package/dist/components/inputs/PuiAutocomplete.js +0 -352
  672. package/dist/components/inputs/PuiCheckbox.js +0 -308
  673. package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
  674. package/dist/components/inputs/PuiCheckboxItem.js +0 -162
  675. package/dist/components/inputs/PuiDateField.js +0 -280
  676. package/dist/components/inputs/PuiDateTimeField.js +0 -276
  677. package/dist/components/inputs/PuiFileField.js +0 -265
  678. package/dist/components/inputs/PuiRadioGroup.js +0 -197
  679. package/dist/components/inputs/PuiRadioItem.js +0 -100
  680. package/dist/components/inputs/PuiSelect.js +0 -427
  681. package/dist/components/inputs/PuiTextField.js +0 -263
  682. package/dist/components/others/PuiBadge.js +0 -58
  683. package/dist/components/others/PuiChip.js +0 -150
  684. package/dist/components/others/PuiDialog.js +0 -102
  685. package/dist/components/others/PuiFormikForm.js +0 -70
  686. package/dist/components/others/PuiGrid.js +0 -23
  687. package/dist/components/others/PuiIcon.js +0 -92
  688. package/dist/components/others/PuiLoadingBackdrop.js +0 -32
  689. package/dist/components/others/PuiMainContainer.js +0 -41
  690. package/dist/components/others/PuiNavigation.js +0 -68
  691. package/dist/components/others/PuiSection.js +0 -187
  692. package/dist/components/others/PuiTooltip.js +0 -86
  693. package/dist/components/providers/PuiAlertProvider.js +0 -134
  694. package/dist/components/providers/PuiHelpWidgetProvider.js +0 -91
  695. package/dist/components/providers/PuiLocalizationProvider.js +0 -34
  696. package/dist/components/referentiel/common/ReferetielContext.js +0 -12
  697. package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
  698. package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
  699. package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
  700. package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
  701. package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
  702. package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
  703. package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -85
  704. package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -356
  705. package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -181
  706. package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -325
  707. package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -203
  708. package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -352
  709. package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -66
  710. package/dist/components/tab/PuiTab.js +0 -25
  711. package/dist/components/tab/PuiTabs.js +0 -148
  712. package/dist/components/table/PuiTable.js +0 -643
  713. package/dist/components/table/PuiTableAction.js +0 -75
  714. package/dist/components/typography/PuiDefinition.js +0 -42
  715. package/dist/components/typography/PuiIndication.js +0 -80
  716. package/dist/components/typography/PuiMainTitle.js +0 -144
  717. package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -106
  718. package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
  719. package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
  720. package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
  721. package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
  722. package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
  723. package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
  724. package/dist/components/ui/pages/general/PuiSearchPage.js +0 -203
  725. package/dist/components/widgets/GuideImage.js +0 -251
  726. package/dist/components/widgets/PuiHelpWidget.js +0 -4167
  727. package/dist/config/apperance.js +0 -26
  728. package/dist/config/mapping.js +0 -26
  729. package/dist/config/referentiel.js +0 -10
  730. package/dist/general/yupValidationErrors.js +0 -8
  731. package/dist/hooks/useAlert.js +0 -19
  732. package/dist/hooks/useAxios.js +0 -23
  733. package/dist/hooks/useQuery.js +0 -21
  734. package/dist/hooks/useReclamation.js +0 -100
  735. package/dist/styles/ReclamationFormModal.css +0 -629
  736. package/dist/styles/help-widget.css +0 -621
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPortnetTheme.js","names":["_styles","require","_tokens","_brand","_brandSecondary","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","BUTTON_MIN_WIDTH","OVERLINE_FONT_SIZE","OVERLINE_LETTER_SPACE","TOOLTIP_MAX_WIDTH","fluidPx","min","max","concat","createPortnetTheme","_zIndex$snackbar","_zIndex$tooltip","options","arguments","undefined","mode","dens","density","D","comfortable","isDark","brand","resolveBrand","brandSecondary","resolveBrandSecondary","palette","primary","main","accent","dark","accentHover","light","accentSoft","contrastText","accentFg","secondary","secondaryFg","error","semantic","danger","dangerSoft","dangerFg","ink","fgInverse","warning","warningSoft","warningFg","success","successSoft","successFg","info","infoSoft","infoFg","background","bg","surface","paper","bgElev","text","fg","fgMuted","disabled","fgSubtle","divider","border","grey","bgSubtle","bgHover","borderStrong","typography","fontFamily","sans","fontSize","htmlFontSize","fontWeightLight","fontWeight","regular","fontWeightRegular","fontWeightMedium","medium","fontWeightBold","bold","h1","display","lineHeight","tight","h2","h3","snug","h4","semibold","body1","body","normal","body2","sm","caption","xs","button","textTransform","letterSpacing","overline","shape","borderRadius","radius","md","transitions","duration","shortest","fast","shorter","standard","base","complex","enteringScreen","leavingScreen","easing","easeInOut","out","easeOut","easeIn","sharp","muiZIndex","appBar","zIndex","topbar","drawer","modal","snackbar","toast","tooltip","overflow","focusHalo","components","MuiCssBaseline","styleOverrides","animationDuration","animationIterationCount","transitionDuration","scrollBehavior","MuiButton","defaultProps","disableElevation","root","minHeight","btn","minWidth","paddingInline","spacing","s3","boxShadow","outline","sizeSmall","compact","s2","MuiTextField","variant","size","slotProps","inputLabel","shrink","input","backgroundColor","padding","color","MuiOutlinedInput","notchedOutline","borderColor","borderWidth","MuiPaper","elevation","backgroundImage","outlined","MuiCard","lg","MuiTooltip","s1","maxWidth","arrow","MuiTableCell","borderBottomColor","head","MuiChip","full","MuiDialog","createTheme","apply","breakpoints","values","spacingBase","shadows","muiShadows","tokens","densityLayout","layout","locale","_default","exports"],"sources":["../../../src/lib/v2/theme/createPortnetTheme.ts"],"sourcesContent":["/**\r\n * createPortnetTheme(options) — Portnet UI v2\r\n *\r\n * MUI 9 theme factory built on v2 tokens. Pass it to <ThemeProvider>:\r\n *\r\n * import { createPortnetTheme } from \"@portnet/ui/v2/theme\";\r\n * const theme = createPortnetTheme({ mode: \"light\", density: \"comfortable\" });\r\n * <ThemeProvider theme={theme}><App /></ThemeProvider>\r\n *\r\n * Options\r\n * mode : \"light\" | \"dark\" (default \"light\")\r\n * density : \"comfortable\" | \"compact\" (default \"comfortable\")\r\n * locale : MUI locale object (e.g. frFR)\r\n * brand : optional partial override of the brand token group:\r\n * { accent, accentHover, accentSoft, accentFg }\r\n * Any field omitted falls back to the default brand from\r\n * tokens. Pass the SAME `brand` to injectCssVariables()\r\n * so CSS variables and MUI palette stay in sync.\r\n * brandSecondary : optional partial override of the brand secondary group:\r\n * { secondary, secondaryFg }\r\n * Drives palette.secondary. Same sync rule as brand:\r\n * pass the SAME object to injectCssVariables().\r\n *\r\n * const theme = createPortnetTheme({\r\n * mode: \"light\",\r\n * brand: { accent: \"#2962FF\", accentSoft: \"#EEF3FF\" },\r\n * brandSecondary: { secondary: \"#4FB8CF\" },\r\n * });\r\n */\r\nimport { createTheme } from \"@mui/material/styles\";\r\nimport type {\r\n Theme,\r\n ThemeOptions,\r\n PaletteOptions,\r\n TransitionsOptions,\r\n Components,\r\n Shadows,\r\n} from \"@mui/material/styles\";\r\nimport {\r\n ink, surface, border, semantic,\r\n fontFamily, fontSize, fontWeight, lineHeight,\r\n spacing, spacingBase, radius, muiShadows,\r\n duration, easing, zIndex, density, densityLayout, layout,\r\n breakpoints,\r\n dark,\r\n} from \"../tokens\";\r\nimport { resolveBrand, type BrandTokens } from \"./_brand\";\r\nimport { resolveBrandSecondary, type BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\n/** Public options for the Portnet theme factory. */\r\nexport type CreatePortnetThemeOptions = {\r\n mode?: \"light\" | \"dark\";\r\n density?: \"comfortable\" | \"compact\";\r\n /** MUI locale object (e.g. frFR from \"@mui/material/locale\"). */\r\n locale?: object;\r\n brand?: Partial<BrandTokens>;\r\n brandSecondary?: Partial<BrandSecondaryTokens>;\r\n};\r\n\r\n/** One resolved density bucket (comfortable | compact | …) — all pixel metrics. */\r\ntype DensityBucket = (typeof density)[keyof typeof density];\r\n\r\n/**\r\n * The custom `tokens` slot attached to the MUI theme so v2 consumers can read\r\n * design tokens straight off the theme (`useTheme().tokens.*`). Declared onto\r\n * MUI's Theme / ThemeOptions via the module augmentation below.\r\n */\r\ntype PortnetThemeTokens = {\r\n brand: BrandTokens;\r\n brandSecondary: BrandSecondaryTokens;\r\n ink: typeof ink;\r\n surface: typeof surface;\r\n border: typeof border;\r\n semantic: typeof semantic;\r\n fontFamily: typeof fontFamily;\r\n fontSize: typeof fontSize;\r\n fontWeight: typeof fontWeight;\r\n lineHeight: typeof lineHeight;\r\n radius: typeof radius;\r\n duration: typeof duration;\r\n easing: typeof easing;\r\n zIndex: typeof zIndex;\r\n density: DensityBucket;\r\n densityLayout: typeof densityLayout;\r\n layout: typeof layout;\r\n};\r\n\r\ndeclare module \"@mui/material/styles\" {\r\n interface Theme {\r\n tokens: PortnetThemeTokens;\r\n }\r\n interface ThemeOptions {\r\n tokens?: PortnetThemeTokens;\r\n }\r\n}\r\n\r\n/* ────────────────────────────────────────────────────────────\r\n * Component-level dimensional constants.\r\n *\r\n * Kept as named locals (not promoted to tokens) because they are\r\n * scoped to MUI's button/tooltip/overline contract and have no\r\n * cross-component meaning. Each carries a comment explaining why\r\n * it deviates from the base spacing/fontSize scale.\r\n * ──────────────────────────────────────────────────────────── */\r\n\r\n// Button minWidth carry-over from MUI's own default. Keeps icon-only\r\n// buttons squarish without forcing 64px on every short-label button.\r\nconst BUTTON_MIN_WIDTH = 64;\r\n\r\n// Overline runs ONE step below fontSize.xs (12px) by deliberate\r\n// design — it's a label-on-label scale used in section headers.\r\n// Promote to fontSize.overline if a second use site appears.\r\nconst OVERLINE_FONT_SIZE = 11;\r\nconst OVERLINE_LETTER_SPACE = \"0.06em\";\r\n\r\n// Tooltip max width: empirically the longest charter-allowed help\r\n// text (~40 chars × ~6.5 px/char). Wider tooltips trigger reading\r\n// fatigue and should be redesigned as a popover.\r\nconst TOOLTIP_MAX_WIDTH = 260;\r\n\r\n/* ── Fluid heading sizing (R-RS.3 / WCAG 1.4.10) ──────────────────────\r\n * Only the two largest headings (H1/display = 26, H2 = 20) overpower a\r\n * 320px viewport at their fixed token size. `fluidPx(min, max)` returns a\r\n * CSS clamp() that starts at `min` on the smallest phones and scales with\r\n * the viewport up to the token `max` — capped so DESKTOP rendering is\r\n * byte-for-byte unchanged (the upper clamp bound is the existing token).\r\n * The static fontSize tokens stay integer-typed (typography.js) for any\r\n * non-fluid / measurement consumer; the fluid form lives only in the\r\n * theme variant where it drives <Typography variant=\"h1|h2\">.\r\n *\r\n * Preferred term: 1rem (16px @ root) + a small vw component. The vw\r\n * coefficient is deliberately gentle (0.9vw) so the growth between 320\r\n * and 1024 is a couple of px, never a jarring jump, and the max clamp\r\n * caps it at the token. min is kept ≥ 18px (H1) / 16px (H2) so headings\r\n * stay clearly larger than body (14px) even on the smallest target. */\r\nconst fluidPx = (min: number, max: number): string =>\r\n `clamp(${min}px, calc(1rem + 0.9vw), ${max}px)`;\r\n\r\nexport function createPortnetTheme(options: CreatePortnetThemeOptions = {}): Theme {\r\n const mode = options.mode || \"light\";\r\n const dens = options.density || \"comfortable\";\r\n const D = density[dens] || density.comfortable;\r\n const isDark = mode === \"dark\";\r\n const brand = resolveBrand(options.brand);\r\n const brandSecondary = resolveBrandSecondary(options.brandSecondary);\r\n\r\n /* ── Palette ─────────────────────────────────────────────── */\r\n // NOTE on `light` / `dark` semantics:\r\n // - primary.dark ← brand.accentHover : intentional darker brand,\r\n // used by MUI for hover/active states. Correct.\r\n // - primary.light ← brand.accentSoft : pragmatic — MUI mainly\r\n // reads `light` for hover BACKGROUNDS where a tinted soft works.\r\n // - secondary.main ← brandSecondary.secondary : PORTNET teal.\r\n // contrastText kept as the brandSecondary.secondaryFg the host\r\n // supplies. Note: the default secondaryFg = white on teal is\r\n // ~1.96:1 which fails AA for body text — see colors.js for the\r\n // R-T.2 follow-up. Safe for chip/badge fills today.\r\n // - error/warning/success/info `.dark` ← *.fg tokens. *.fg is the\r\n // darker, accessible variant of the saturated fill; safe as `dark`\r\n // because MUI uses it for hover/active states (R-T.2 contrast).\r\n const palette: PaletteOptions = {\r\n mode,\r\n primary: {\r\n main: brand.accent,\r\n dark: brand.accentHover,\r\n light: brand.accentSoft,\r\n contrastText: brand.accentFg,\r\n },\r\n secondary: {\r\n main: brandSecondary.secondary,\r\n contrastText: brandSecondary.secondaryFg,\r\n },\r\n error: {\r\n main: semantic.danger,\r\n light: semantic.dangerSoft,\r\n dark: semantic.dangerFg,\r\n contrastText: ink.fgInverse,\r\n },\r\n warning: {\r\n main: semantic.warning,\r\n light: semantic.warningSoft,\r\n dark: semantic.warningFg, // was missing → MUI auto-derived off-charter\r\n contrastText: ink.fgInverse,\r\n },\r\n success: {\r\n main: semantic.success,\r\n light: semantic.successSoft,\r\n dark: semantic.successFg, // ditto\r\n contrastText: ink.fgInverse,\r\n },\r\n info: {\r\n main: semantic.info,\r\n light: semantic.infoSoft,\r\n dark: semantic.infoFg, // ditto\r\n contrastText: ink.fgInverse,\r\n },\r\n background: {\r\n default: isDark ? dark.bg : surface.bg,\r\n paper: isDark ? dark.bgElev : surface.bgElev,\r\n },\r\n text: {\r\n primary: isDark ? dark.fg : ink.fg,\r\n secondary: isDark ? dark.fgMuted : ink.fgMuted,\r\n disabled: isDark ? dark.fgSubtle : ink.fgSubtle,\r\n },\r\n divider: isDark ? dark.border : border.border,\r\n grey: {\r\n 50: isDark ? dark.bgSubtle : surface.bgSubtle,\r\n 100: isDark ? dark.bgHover : surface.bgHover,\r\n 200: isDark ? dark.border : border.border,\r\n 300: isDark ? dark.borderStrong : border.borderStrong,\r\n 500: isDark ? dark.fgSubtle : ink.fgSubtle,\r\n 700: isDark ? dark.fgMuted : ink.fgMuted,\r\n 900: isDark ? dark.fg : ink.fg,\r\n },\r\n };\r\n\r\n /* ── Typography ──────────────────────────────────────────── */\r\n const typography: ThemeOptions[\"typography\"] = {\r\n fontFamily: fontFamily.sans,\r\n fontSize: D.fontSize,\r\n htmlFontSize: 16,\r\n fontWeightLight: fontWeight.regular,\r\n fontWeightRegular: fontWeight.regular,\r\n fontWeightMedium: fontWeight.medium,\r\n fontWeightBold: fontWeight.bold,\r\n\r\n // R-RS.3 — H1/H2 use fluid clamp() so they don't overflow a 320px\r\n // viewport; the clamp upper bound is the existing token, so desktop\r\n // is unchanged. H3/H4/body keep their fixed token sizes (already\r\n // comfortable down to 320).\r\n h1: { fontSize: fluidPx(18, fontSize.display), fontWeight: fontWeight.bold, lineHeight: lineHeight.tight },\r\n h2: { fontSize: fluidPx(16, fontSize.h2), fontWeight: fontWeight.bold, lineHeight: lineHeight.tight },\r\n h3: { fontSize: fontSize.h3, fontWeight: fontWeight.bold, lineHeight: lineHeight.snug },\r\n h4: { fontSize: fontSize.h4, fontWeight: fontWeight.semibold, lineHeight: lineHeight.snug },\r\n body1: { fontSize: fontSize.body, fontWeight: fontWeight.regular, lineHeight: lineHeight.normal },\r\n body2: { fontSize: fontSize.sm, fontWeight: fontWeight.regular, lineHeight: lineHeight.normal },\r\n caption: {\r\n fontSize: fontSize.xs,\r\n fontWeight: fontWeight.medium,\r\n lineHeight: lineHeight.normal,\r\n },\r\n button: {\r\n fontWeight: fontWeight.semibold,\r\n textTransform: \"none\",\r\n letterSpacing: 0,\r\n },\r\n overline: {\r\n fontSize: OVERLINE_FONT_SIZE,\r\n fontWeight: fontWeight.semibold,\r\n letterSpacing: OVERLINE_LETTER_SPACE,\r\n textTransform: \"uppercase\",\r\n lineHeight: lineHeight.normal,\r\n },\r\n };\r\n\r\n const shape = { borderRadius: radius.md };\r\n\r\n const transitions: TransitionsOptions = {\r\n duration: {\r\n shortest: duration.fast,\r\n shorter: duration.fast,\r\n short: duration.fast,\r\n standard: duration.base,\r\n complex: duration.base,\r\n enteringScreen: duration.base,\r\n leavingScreen: duration.fast,\r\n },\r\n easing: {\r\n easeInOut: easing.out,\r\n easeOut: easing.out,\r\n easeIn: easing.in,\r\n sharp: easing.in,\r\n },\r\n };\r\n\r\n /* ── z-index ─────────────────────────────────────────────────\r\n * Use the explicit slots added in v2 tokens (Batch 1: popover,\r\n * snackbar, tooltip). Defensive `??` fallback covers the case\r\n * where a host pins an older v2 tokens build that pre-dates the\r\n * additions.\r\n * ──────────────────────────────────────────────────────────── */\r\n const muiZIndex: ThemeOptions[\"zIndex\"] = {\r\n appBar: zIndex.topbar,\r\n drawer: zIndex.drawer,\r\n modal: zIndex.modal,\r\n snackbar: zIndex.snackbar ?? zIndex.toast,\r\n tooltip: zIndex.tooltip ?? (zIndex.overflow + 1),\r\n };\r\n\r\n /* ── Focus halo ──────────────────────────────────────────────\r\n * Derived from the EFFECTIVE accent so a host brand override\r\n * propagates to focus rings — keeps the MUI side in sync with\r\n * the CSS-variable side via the shared resolveBrand resolver.\r\n * ──────────────────────────────────────────────────────────── */\r\n const focusHalo = `0 0 0 3px color-mix(in srgb, ${brand.accent} 22%, transparent)`;\r\n\r\n const components: Components = {\r\n MuiCssBaseline: {\r\n // base.css owns `:focus { outline: none }` and `:focus-visible`\r\n // outline styling — single source of truth (Charter §07.1).\r\n // DUPLICATING those rules here was producing non-deterministic\r\n // cascade ordering between MUI-injected styles and the imported\r\n // stylesheet (intermittent double focus rings in Storybook).\r\n styleOverrides: {\r\n \"@media (prefers-reduced-motion: reduce)\": {\r\n \"*, *::before, *::after\": {\r\n animationDuration: \"0.01ms !important\",\r\n animationIterationCount: \"1 !important\",\r\n transitionDuration: \"0.01ms !important\",\r\n scrollBehavior: \"auto !important\",\r\n },\r\n },\r\n },\r\n },\r\n MuiButton: {\r\n defaultProps: { disableElevation: true },\r\n styleOverrides: {\r\n root: {\r\n // R-7.4 — visual baseline (40 in comfortable, 32 in compact).\r\n // The 44px tactile minimum (WCAG 2.5.5) is enforced at the\r\n // component level by Button.js for icon-only variants — the\r\n // theme keeps the visual size and lets layout add the floor\r\n // via min-width/min-height. See Button.js (Batch 5) for impl.\r\n minHeight: D.btn,\r\n minWidth: BUTTON_MIN_WIDTH,\r\n fontWeight: fontWeight.semibold,\r\n letterSpacing: 0,\r\n // 14 = spacing.s3 (12) + 2 — deliberate +2px button offset\r\n // from the base grid for visual button-text breathing room.\r\n paddingInline: spacing.s3 + 2,\r\n borderRadius: radius.md,\r\n textTransform: \"none\",\r\n \"&:focus-visible\": { boxShadow: focusHalo, outline: \"none\" },\r\n },\r\n sizeSmall: {\r\n minHeight: density.compact.btn,\r\n paddingInline: spacing.s2 + 2, // 10 = s2 (8) + 2\r\n fontSize: fontSize.sm,\r\n },\r\n },\r\n },\r\n MuiTextField: {\r\n // MUI v9 migration (Batch 2):\r\n // InputLabelProps was deprecated in v6 and REMOVED in v9\r\n // in favor of the unified `slotProps` API. The visual\r\n // contract is unchanged — the CSS class names\r\n // (.MuiInputLabel-root, .MuiOutlinedInput-root, etc.)\r\n // are preserved in v9, so all styleOverrides below stay\r\n // identical to the v5 baseline.\r\n defaultProps: {\r\n variant: \"outlined\",\r\n size: \"small\",\r\n slotProps: { inputLabel: { shrink: true } },\r\n },\r\n styleOverrides: {\r\n root: {\r\n \"& .MuiOutlinedInput-root\": {\r\n minHeight: D.input,\r\n borderRadius: radius.md,\r\n backgroundColor: isDark ? dark.surface : surface.surface,\r\n },\r\n \"& .MuiOutlinedInput-input\": {\r\n padding: `${spacing.s2}px ${spacing.s3}px`, // 8 / 12\r\n fontSize: D.fontSize,\r\n },\r\n \"& .MuiInputLabel-root\": {\r\n fontSize: fontSize.sm,\r\n fontWeight: fontWeight.medium,\r\n color: isDark ? dark.fgMuted : ink.fgMuted,\r\n },\r\n // Label colour states — were missing, label stayed muted\r\n // in all states which contradicted the focus-visible\r\n // feedback contract (R-F.1).\r\n \"& .MuiInputLabel-root.Mui-focused\": { color: brand.accent },\r\n \"& .MuiInputLabel-root.Mui-error\": { color: semantic.danger },\r\n },\r\n },\r\n },\r\n MuiOutlinedInput: {\r\n styleOverrides: {\r\n notchedOutline: { borderColor: isDark ? dark.border : border.border },\r\n root: {\r\n \"&:hover .MuiOutlinedInput-notchedOutline\": {\r\n borderColor: isDark ? dark.borderStrong : border.borderStrong,\r\n },\r\n \"&.Mui-focused .MuiOutlinedInput-notchedOutline\": {\r\n borderColor: brand.accent,\r\n borderWidth: 1,\r\n },\r\n \"&.Mui-error .MuiOutlinedInput-notchedOutline\": { borderColor: semantic.danger },\r\n },\r\n },\r\n },\r\n MuiPaper: {\r\n defaultProps: { elevation: 0 },\r\n styleOverrides: {\r\n root: { backgroundImage: \"none\" }, // disable MUI dark-mode tint\r\n outlined: { borderColor: isDark ? dark.border : border.border },\r\n },\r\n },\r\n MuiCard: {\r\n defaultProps: { elevation: 0, variant: \"outlined\" },\r\n styleOverrides: {\r\n root: {\r\n borderRadius: radius.lg,\r\n borderColor: isDark ? dark.border : border.border,\r\n },\r\n },\r\n },\r\n MuiTooltip: {\r\n // Prototype v4 — fg as background, bg as text. Avoids the legacy\r\n // \"transparent on light grey\" misconfiguration noted in the audit.\r\n styleOverrides: {\r\n tooltip: {\r\n backgroundColor: isDark ? dark.fg : ink.fg,\r\n color: isDark ? dark.bg : ink.fgInverse,\r\n fontSize: fontSize.xs,\r\n // 6 / 10 — tooltip is intentionally tight (s1+2 / s2+2).\r\n padding: `${spacing.s1 + 2}px ${spacing.s2 + 2}px`,\r\n borderRadius: radius.md,\r\n maxWidth: TOOLTIP_MAX_WIDTH,\r\n },\r\n arrow: { color: isDark ? dark.fg : ink.fg },\r\n },\r\n },\r\n MuiTableCell: {\r\n styleOverrides: {\r\n root: {\r\n borderBottomColor: isDark ? dark.border : border.border,\r\n fontSize: D.fontSize,\r\n },\r\n head: {\r\n fontWeight: fontWeight.semibold,\r\n color: isDark ? dark.fgMuted : ink.fgMuted,\r\n backgroundColor: isDark ? dark.bgSubtle : surface.bgSubtle,\r\n textTransform: \"none\",\r\n },\r\n },\r\n },\r\n MuiChip: {\r\n styleOverrides: {\r\n root: {\r\n borderRadius: radius.full,\r\n fontWeight: fontWeight.semibold,\r\n fontSize: fontSize.xs,\r\n },\r\n },\r\n },\r\n MuiDialog: {\r\n styleOverrides: { paper: { borderRadius: radius.lg } },\r\n },\r\n };\r\n\r\n return createTheme(\r\n {\r\n // ── Breakpoints (R-RS.1) ───────────────────────────────────\r\n // Wire the design-system breakpoint TOKENS into the MUI runtime.\r\n // Without this, every `sx={{ ...: { xs, sm, md, lg } }}` object in\r\n // the library resolves against MUI's DEFAULT breakpoints\r\n // (sm:600 / md:900 / lg:1200), NOT the charter values declared in\r\n // tokens/density.js (sm:481 / md:768 / lg:1024 / xl:1280). That\r\n // silent divergence meant components were authored against the\r\n // charter breakpoints but evaluated at MUI defaults — e.g.\r\n // PageContent applied tablet padding at the 1024 desktop target,\r\n // and the DataGrid card view triggered at 600 instead of 481.\r\n // Single source of truth: tokens.breakpoints.\r\n breakpoints: { values: breakpoints },\r\n palette,\r\n typography,\r\n shape,\r\n spacing: spacingBase,\r\n shadows: muiShadows as Shadows,\r\n transitions,\r\n zIndex: muiZIndex,\r\n components,\r\n // Custom slot for v2 consumers — read tokens directly off the theme.\r\n // - `brand` : the EFFECTIVE brand (default + override merged).\r\n // - `brandSecondary` : the EFFECTIVE brandSecondary (same contract).\r\n // - `density` : the resolved bucket (one of comfortable/compact).\r\n // - `densityLayout` : the FULL density set (lets a component switch\r\n // on the fly, e.g. compact rows inside a\r\n // comfortable page).\r\n // - `layout` : exposes layout.tactileMin (44) for components\r\n // enforcing WCAG 2.5.5 hit-area floors.\r\n tokens: {\r\n brand, brandSecondary, ink, surface, border, semantic,\r\n fontFamily, fontSize, fontWeight, lineHeight,\r\n radius, duration, easing, zIndex,\r\n density: D, densityLayout, layout,\r\n },\r\n },\r\n ...(options.locale ? [options.locale] : []),\r\n );\r\n}\r\n\r\nexport default createPortnetTheme;\r\n"],"mappings":";;;;;;;AA6BA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,OAAA,GAAAD,OAAA;AAQA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAAqF,SAAAI,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KA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VA,kBAAU;MAAES,UAAU,EAAVA,kBAAU;MAC5CoB,MAAM,EAANA,cAAM;MAAEG,QAAQ,EAARA,gBAAQ;MAAES,MAAM,EAANA,cAAM;MAAEQ,MAAM,EAANA,cAAM;MAChC3G,OAAO,EAAEC,CAAC;MAAE+K,aAAa,EAAbA,qBAAa;MAAEC,MAAM,EAANA;IAC7B;EACF,CAAC,EAAA1L,MAAA,CAAApC,kBAAA,CACGwC,OAAO,CAACuL,MAAM,GAAG,CAACvL,OAAO,CAACuL,MAAM,CAAC,GAAG,EAAE,EAC5C,CAAC;AACH;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEc5L,kBAAkB","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ import { type BrandTokens } from "./_brand";
2
+ import { type BrandSecondaryTokens } from "./_brandSecondary";
3
+ /** Options for the CSS-variable emitter / injector. */
4
+ type CssVariablesOptions = {
5
+ id?: string;
6
+ brand?: Partial<BrandTokens>;
7
+ brandSecondary?: Partial<BrandSecondaryTokens>;
8
+ };
9
+ /**
10
+ * Emits the canonical :root block + sidebar / density / dark-mode overrides.
11
+ * Pass a partial `brand` / `brandSecondary` to mirror a host theme override
12
+ * (use the SAME object you pass to createPortnetTheme so the two layers agree).
13
+ */
14
+ export declare function getCssVariables(options?: CssVariablesOptions): string;
15
+ /**
16
+ * Inject the variables into <head> at runtime.
17
+ * Idempotent: replaces a previous tag if present.
18
+ *
19
+ * Backward-compatible signatures:
20
+ * injectCssVariables(); // default id, no override
21
+ * injectCssVariables("my-style-id"); // legacy string id
22
+ * injectCssVariables({ id, brand, brandSecondary }); // options form
23
+ */
24
+ export declare function injectCssVariables(arg?: string | CssVariablesOptions): void;
25
+ /**
26
+ * Remove the injected style tag. Symmetrical with
27
+ * injectCssVariables — needed for theme switching, hot-reload
28
+ * and test cleanup. No-op when the tag is absent or in SSR.
29
+ *
30
+ * removeCssVariables(); // default id
31
+ * removeCssVariables("my-style-id"); // legacy string id
32
+ * removeCssVariables({ id }); // options form
33
+ */
34
+ export declare function removeCssVariables(arg?: string | CssVariablesOptions): void;
35
+ declare const cssVariablesApi: {
36
+ getCssVariables: typeof getCssVariables;
37
+ injectCssVariables: typeof injectCssVariables;
38
+ removeCssVariables: typeof removeCssVariables;
39
+ };
40
+ export default cssVariablesApi;
41
+ //# sourceMappingURL=cssVariables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cssVariables.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/theme/cssVariables.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAyB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAErF,uDAAuD;AACvD,KAAK,mBAAmB,GAAG;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAChD,CAAC;AAiBF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,mBAAwB,GAAG,MAAM,CAqSzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAY3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAO3E;AAED,QAAA,MAAM,eAAe;;;;CAA8D,CAAC;AACpF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ exports.getCssVariables = getCssVariables;
8
+ exports.injectCssVariables = injectCssVariables;
9
+ exports.removeCssVariables = removeCssVariables;
10
+ var _tokens = require("../tokens");
11
+ var _brand = require("./_brand");
12
+ var _brandSecondary = require("./_brandSecondary");
13
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
14
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
16
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /**
23
+ * CSS Variables emitter — Portnet UI v2
24
+ *
25
+ * Generates a CSS string declaring all tokens as :root variables.
26
+ * Mount once at app boot via:
27
+ *
28
+ * import { injectCssVariables } from "@portnet/ui/v2/theme";
29
+ * injectCssVariables();
30
+ *
31
+ * Or render `getCssVariables()` inside a `<style>` tag if SSR'd.
32
+ *
33
+ * Brand override (host-level theming):
34
+ *
35
+ * injectCssVariables({
36
+ * brand: { accent: "#2962FF" },
37
+ * brandSecondary: { secondary: "#4FB8CF" },
38
+ * });
39
+ * // Or via the unified theme factory (see createPortnetTheme):
40
+ * // createPortnetTheme({ brand: {...}, brandSecondary: {...} })
41
+ *
42
+ * Override is deep-merged onto the default brand / brandSecondary:
43
+ * any field you omit falls back to the token default. Use the SAME
44
+ * override objects when calling createPortnetTheme so the MUI
45
+ * palette and CSS variables stay in sync — both layers consume the
46
+ * same resolvers (./_brand, ./_brandSecondary) so mismatches are
47
+ * structurally impossible.
48
+ */
49
+ /** Options for the CSS-variable emitter / injector. */
50
+
51
+ var STYLE_TAG_ID = "portnet-ui-v2-tokens";
52
+
53
+ /**
54
+ * Spacing partition: numeric grid keys (s1..s10) vs semantic aliases
55
+ * (xs/sm/md/lg/xl/xxl). Two output namespaces so the alias names
56
+ * cannot collide with the grid (s-N) and cannot pollute the global
57
+ * variable namespace by emitting unprefixed --md / --lg / --xl.
58
+ *
59
+ * Uses Object.entries at module-load time — pure / no side-effects.
60
+ */
61
+ var NUMERIC_GRID_RE = /^s\d+$/;
62
+ var SPACING_ENTRIES = Object.entries(_tokens.spacing);
63
+ var NUMERIC_ENTRIES = SPACING_ENTRIES.filter(function (_ref) {
64
+ var _ref2 = _slicedToArray(_ref, 1),
65
+ k = _ref2[0];
66
+ return NUMERIC_GRID_RE.test(k);
67
+ });
68
+ var ALIAS_ENTRIES = SPACING_ENTRIES.filter(function (_ref3) {
69
+ var _ref4 = _slicedToArray(_ref3, 1),
70
+ k = _ref4[0];
71
+ return !NUMERIC_GRID_RE.test(k);
72
+ });
73
+
74
+ /**
75
+ * Emits the canonical :root block + sidebar / density / dark-mode overrides.
76
+ * Pass a partial `brand` / `brandSecondary` to mirror a host theme override
77
+ * (use the SAME object you pass to createPortnetTheme so the two layers agree).
78
+ */
79
+ function getCssVariables() {
80
+ var _radius$none;
81
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
82
+ var brand = (0, _brand.resolveBrand)(options.brand);
83
+ var brandSecondary = (0, _brandSecondary.resolveBrandSecondary)(options.brandSecondary);
84
+ var lightVars = ["/* \u2500\u2500 Brand \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--accent: ".concat(brand.accent, ";"), "--accent-hover: ".concat(brand.accentHover, ";"), "--accent-soft: ".concat(brand.accentSoft, ";"), "--accent-fg: ".concat(brand.accentFg, ";"), "", "/* \u2500\u2500 Brand secondary \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--secondary: ".concat(brandSecondary.secondary, ";"), "--secondary-fg: ".concat(brandSecondary.secondaryFg, ";"), "", "/* \u2500\u2500 Ink \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--fg: ".concat(_tokens.ink.fg, ";"), "--fg-muted: ".concat(_tokens.ink.fgMuted, ";"), "--fg-subtle: ".concat(_tokens.ink.fgSubtle, ";"), "--fg-inverse: ".concat(_tokens.ink.fgInverse, ";"), "", "/* \u2500\u2500 Surface \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--bg: ".concat(_tokens.surface.bg, ";"), "--bg-elev: ".concat(_tokens.surface.bgElev, ";"), "--bg-subtle: ".concat(_tokens.surface.bgSubtle, ";"), "--bg-hover: ".concat(_tokens.surface.bgHover, ";"), "--surface: ".concat(_tokens.surface.surface, ";"), "", "/* \u2500\u2500 Border \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--border: ".concat(_tokens.border.border, ";"), "--border-strong: ".concat(_tokens.border.borderStrong, ";"), "", "/* \u2500\u2500 Semantic \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "/* Each concept has a saturated fill (--<name>) and a darker text */", "/* foreground (--<name>-fg). Pair fills with text on the same surface. */", "--success: ".concat(_tokens.semantic.success, ";"), "--success-soft: ".concat(_tokens.semantic.successSoft, ";"), "--success-fg: ".concat(_tokens.semantic.successFg, ";"), "--warning: ".concat(_tokens.semantic.warning, ";"), "--warning-soft: ".concat(_tokens.semantic.warningSoft, ";"), "--warning-fg: ".concat(_tokens.semantic.warningFg, ";"), "--danger: ".concat(_tokens.semantic.danger, ";"), "--danger-soft: ".concat(_tokens.semantic.dangerSoft, ";"), "--danger-fg: ".concat(_tokens.semantic.dangerFg, ";"), "--info: ".concat(_tokens.semantic.info, ";"), "--info-soft: ".concat(_tokens.semantic.infoSoft, ";"), "--info-fg: ".concat(_tokens.semantic.infoFg, ";"), "", "/* \u2500\u2500 Status palette \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--status-new-soft: ".concat(_tokens.status["new"].soft, ";"), "--status-new-fg: ".concat(_tokens.status["new"].fg, ";"), "--status-sent-soft: ".concat(_tokens.status.sent.soft, ";"), "--status-sent-fg: ".concat(_tokens.status.sent.fg, ";"), "--status-pending-soft: ".concat(_tokens.status.pending.soft, ";"), "--status-pending-fg: ".concat(_tokens.status.pending.fg, ";"), "--status-approved-soft: ".concat(_tokens.status.approved.soft, ";"), "--status-approved-fg: ".concat(_tokens.status.approved.fg, ";"), "--status-rejected-soft: ".concat(_tokens.status.rejected.soft, ";"), "--status-rejected-fg: ".concat(_tokens.status.rejected.fg, ";"), "--status-neutral-soft: ".concat(_tokens.status.neutral.soft, ";"), "--status-neutral-fg: ".concat(_tokens.status.neutral.fg, ";"), "", "/* \u2500\u2500 State overlays (B2 \u2014 currentColor-based) \u2500\u2500\u2500 */", "--state-hover-overlay: ".concat(_tokens.state.hoverOverlay, ";"), "--state-pressed-overlay: ".concat(_tokens.state.pressedOverlay, ";"), "--state-selected-overlay: ".concat(_tokens.state.selectedOverlay, ";"), "", "/* \u2500\u2500 Typography \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--font-sans: ".concat(_tokens.fontFamily.sans, ";"), "--font-mono: ".concat(_tokens.fontFamily.mono, ";"), "--text-display: ".concat(_tokens.fontSize.display, "px;"), "--text-h2: ".concat(_tokens.fontSize.h2, "px;"), "--text-h3: ".concat(_tokens.fontSize.h3, "px;"), "--text-h4: ".concat(_tokens.fontSize.h4, "px;"), "--text-body: ".concat(_tokens.fontSize.body, "px;"), "--text-sm: ".concat(_tokens.fontSize.sm, "px;"), "--text-xs: ".concat(_tokens.fontSize.xs, "px;"), "--fw-regular: ".concat(_tokens.fontWeight.regular, ";"), "--fw-medium: ".concat(_tokens.fontWeight.medium, ";"), "--fw-semibold: ".concat(_tokens.fontWeight.semibold, ";"), "--fw-bold: ".concat(_tokens.fontWeight.bold, ";"), // NOTE: there is deliberately no heavier weight than bold (700). Batch 1
85
+ // dropped the black weight from the typography tokens, and this file kept
86
+ // emitting the matching variable for a while — resolving to the literal
87
+ // string "undefined" in :root, which silently flattened every consumer that
88
+ // referenced it. The dev-only check at the end of this function exists
89
+ // because of that incident.
90
+ //
91
+ // The old variable name is deliberately not written out: banned-patterns
92
+ // scans raw file text with no comment awareness, so naming it here — even to
93
+ // record its removal — trips the rule that protects this block.
94
+ "--lh-tight: ".concat(_tokens.lineHeight.tight, ";"), "--lh-snug: ".concat(_tokens.lineHeight.snug, ";"), "--lh-normal: ".concat(_tokens.lineHeight.normal, ";"), "--lh-loose: ".concat(_tokens.lineHeight.loose, ";"), // A7-02 — letter-spacing scale. Six token names were referenced fleet-wide
95
+ // that this emitter never emitted, so their var() fallbacks were the only
96
+ // thing that ever rendered (R-2.3 / R-AI.1 magic values wearing a token's
97
+ // name). These two had a real platform basis — -0.01em was hardcoded twice
98
+ // in tokens/typography.ts itself, 0.04em inside KV and ConfirmDialog — so
99
+ // they are promoted. `--border-subtle`, `--r-xs`, `--icon-sm`, `--icon-xl`
100
+ // were local inventions and are fixed at their call sites instead.
101
+ "--ls-tight: ".concat(_tokens.letterSpacing.tight, ";"), "--ls-normal: ".concat(_tokens.letterSpacing.normal, ";"), "--ls-wide: ".concat(_tokens.letterSpacing.wide, ";"), "", "/* \u2500\u2500 Spacing \u2014 numeric grid (8 px base) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"].concat(_toConsumableArray(NUMERIC_ENTRIES.map(function (_ref5) {
102
+ var _ref6 = _slicedToArray(_ref5, 2),
103
+ k = _ref6[0],
104
+ v = _ref6[1];
105
+ return "--s-".concat(k.slice(1), ": ").concat(v, "px;");
106
+ })), ["", "/* \u2500\u2500 Spacing \u2014 semantic aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"], _toConsumableArray(ALIAS_ENTRIES.map(function (_ref7) {
107
+ var _ref8 = _slicedToArray(_ref7, 2),
108
+ k = _ref8[0],
109
+ v = _ref8[1];
110
+ return "--space-".concat(k, ": ").concat(v, "px;");
111
+ })), ["", "/* \u2500\u2500 Radius \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--r-none: ".concat((_radius$none = _tokens.radius.none) !== null && _radius$none !== void 0 ? _radius$none : 0, "px;"), "--r-sm: ".concat(_tokens.radius.sm, "px;"), "--r-md: ".concat(_tokens.radius.md, "px;"), "--r-lg: ".concat(_tokens.radius.lg, "px;"), "--r-xl: ".concat(_tokens.radius.xl, "px;"), "--r-full: ".concat(_tokens.radius.full, "px;"), "", "/* \u2500\u2500 Shadows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--shadow-xs: ".concat(_tokens.shadows.xs, ";"), "--shadow-sm: ".concat(_tokens.shadows.sm, ";"), "--shadow-md: ".concat(_tokens.shadows.md, ";"), "--shadow-lg: ".concat(_tokens.shadows.lg, ";"), "--shadow-focus: ".concat(_tokens.shadows.focus, ";")], _toConsumableArray(_tokens.shadows.focusFallback ? ["--shadow-focus-fallback: ".concat(_tokens.shadows.focusFallback, ";")] : []), ["", "/* \u2500\u2500 Motion (temporal vocabulary) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--duration-fast: ".concat(_tokens.duration.fast, "ms;"), "--duration-base: ".concat(_tokens.duration.base, "ms;"), "--duration-slow: ".concat(_tokens.duration.slow, "ms;"), "", "/* \u2500\u2500 Motion (semantic aliases \u2014 B6) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", // Same numeric values as fast/base/slow; intent-readable at the
112
+ // call site. transition() helper recognises both vocabularies.
113
+ "--duration-microinteraction: ".concat(_tokens.duration.microinteraction, "ms;"), "--duration-state-change: ".concat(_tokens.duration.stateChange, "ms;"), "--duration-page-transition: ".concat(_tokens.duration.pageTransition, "ms;"), "", "/* \u2500\u2500 Easing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--easing-out: ".concat(_tokens.easing.out, ";"), "--easing-in: ".concat(_tokens.easing["in"], ";"), "--easing-soft: ".concat(_tokens.easing.soft, ";"), "", "/* \u2500\u2500 Z-index \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"], _toConsumableArray(Object.entries(_tokens.zIndex).map(function (_ref9) {
114
+ var _ref0 = _slicedToArray(_ref9, 2),
115
+ k = _ref0[0],
116
+ v = _ref0[1];
117
+ return "--z-".concat(k, ": ").concat(v, ";");
118
+ })), ["", "/* \u2500\u2500 Layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--sidebar-w: ".concat(_tokens.layout.sidebar, "px;"), "--topbar-h: ".concat(_tokens.layout.topbar, "px;"), "--content-max: ".concat(_tokens.layout.contentMax, "px;"), "--form-max: ".concat(_tokens.layout.formMax, "px;"), "--tactile-min: ".concat(_tokens.layout.tactileMin, "px;"), "", "/* \u2500\u2500 Breakpoints (R-RS.1) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", // The single breakpoint scale, also wired into the MUI theme and the
119
+ // mq() string helpers. Media queries can't read var(), so these are
120
+ // for @container queries, clamp() and JS (getComputedStyle) — they
121
+ // exist so no consumer hardcodes a raw px breakpoint anywhere.
122
+ "--bp-xs: ".concat(_tokens.breakpoints.xs, "px;"), "--bp-sm: ".concat(_tokens.breakpoints.sm, "px;"), "--bp-md: ".concat(_tokens.breakpoints.md, "px;"), "--bp-lg: ".concat(_tokens.breakpoints.lg, "px;"), "--bp-xl: ".concat(_tokens.breakpoints.xl, "px;"), "", "/* \u2500\u2500 Density (default = comfortable) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--row-h: ".concat(_tokens.density.comfortable.row, "px;"), "--input-h: ".concat(_tokens.density.comfortable.input, "px;"), "--btn-h: ".concat(_tokens.density.comfortable.btn, "px;"), "--text-fs: ".concat(_tokens.density.comfortable.fontSize, "px;")]);
123
+ var collapsedSidebar = "[data-nav-collapsed=\"true\"] { --sidebar-w: ".concat(_tokens.layout.sidebarMin, "px; }");
124
+
125
+ /* Density tier overrides — emitted in order of granularity so a
126
+ * cascading selector like `[data-density][data-density="compact"]`
127
+ * (host-side specificity hack) resolves predictably. */
128
+ var spaciousDensity = ["[data-density=\"spacious\"] {", " --row-h: ".concat(_tokens.density.spacious.row, "px;"), " --input-h: ".concat(_tokens.density.spacious.input, "px;"), " --btn-h: ".concat(_tokens.density.spacious.btn, "px;"), " --text-fs: ".concat(_tokens.density.spacious.fontSize, "px;"), "}"].join("\n");
129
+ var compactDensity = ["[data-density=\"compact\"] {", " --row-h: ".concat(_tokens.density.compact.row, "px;"), " --input-h: ".concat(_tokens.density.compact.input, "px;"), " --btn-h: ".concat(_tokens.density.compact.btn, "px;"), " --text-fs: ".concat(_tokens.density.compact.fontSize, "px;"), "}"].join("\n");
130
+ var ultraCompactDensity = ["[data-density=\"ultra-compact\"] {", " --row-h: ".concat(_tokens.density.ultraCompact.row, "px;"), " --input-h: ".concat(_tokens.density.ultraCompact.input, "px;"), " --btn-h: ".concat(_tokens.density.ultraCompact.btn, "px;"), " --text-fs: ".concat(_tokens.density.ultraCompact.fontSize, "px;"), "}"].join("\n");
131
+
132
+ /* ── Dark mode overrides ────────────────────────────────────
133
+ * Soft variants (semantic + status) are DERIVED via color-mix
134
+ * from the saturated colour or the dark-mode status FG. The
135
+ * static light-mode soft hex codes are too pale on dark
136
+ * surfaces and fail WCAG 1.4.11 non-text contrast.
137
+ * The 22-24% mix produces a tinted overlay that adapts to host
138
+ * brand overrides automatically.
139
+ * ───────────────────────────────────────────────────────── */
140
+ var darkVars = ["[data-theme=\"dark\"] {", " --bg: ".concat(_tokens.dark.bg, ";"), " --bg-elev: ".concat(_tokens.dark.bgElev, ";"), " --bg-subtle: ".concat(_tokens.dark.bgSubtle, ";"), " --bg-hover: ".concat(_tokens.dark.bgHover, ";"), " --surface: ".concat(_tokens.dark.surface, ";"), " --border: ".concat(_tokens.dark.border, ";"), " --border-strong: ".concat(_tokens.dark.borderStrong, ";"), " --fg: ".concat(_tokens.dark.fg, ";"), " --fg-muted: ".concat(_tokens.dark.fgMuted, ";"), " --fg-subtle: ".concat(_tokens.dark.fgSubtle, ";"), " --fg-inverse: ".concat(_tokens.dark.fgInverse, ";"), " --accent-soft: ".concat(_tokens.dark.accentSoft, ";"), "", " /* Soft semantic fills \u2014 derived from the saturated colour */", " --success-soft: color-mix(in srgb, var(--success) 24%, transparent);", " --warning-soft: color-mix(in srgb, var(--warning) 24%, transparent);", " --danger-soft: color-mix(in srgb, var(--danger) 24%, transparent);", " --info-soft: color-mix(in srgb, var(--info) 24%, transparent);", "", " /* Status FG \u2014 overridden for dark-mode visibility */", " --status-new-fg: ".concat(_tokens.dark.status["new"].fg, ";"), " --status-sent-fg: ".concat(_tokens.dark.status.sent.fg, ";"), " --status-pending-fg: ".concat(_tokens.dark.status.pending.fg, ";"), " --status-approved-fg: ".concat(_tokens.dark.status.approved.fg, ";"), " --status-rejected-fg: ".concat(_tokens.dark.status.rejected.fg, ";"), " --status-neutral-fg: ".concat(_tokens.dark.status.neutral.fg, ";"), "", " /* Status soft \u2014 derived from the dark-mode FG */", " --status-new-soft: color-mix(in srgb, var(--status-new-fg) 22%, transparent);", " --status-sent-soft: color-mix(in srgb, var(--status-sent-fg) 22%, transparent);", " --status-pending-soft: color-mix(in srgb, var(--status-pending-fg) 22%, transparent);", " --status-approved-soft: color-mix(in srgb, var(--status-approved-fg) 22%, transparent);", " --status-rejected-soft: color-mix(in srgb, var(--status-rejected-fg) 22%, transparent);", " --status-neutral-soft: color-mix(in srgb, var(--status-neutral-fg) 22%, transparent);", "}"].join("\n");
141
+
142
+ /* Dev-only validation — catches the regression class that motivated it: a
143
+ * token removed from ../tokens while this emitter still references it, which
144
+ * puts the literal "undefined" into :root instead of failing loudly. See the
145
+ * note beside --fw-bold above. */
146
+ if (typeof console !== "undefined") {
147
+ var offenders = lightVars.filter(function (l) {
148
+ return /:\s*undefined\b/.test(l);
149
+ });
150
+ if (offenders.length) {
151
+ // eslint-disable-next-line no-console
152
+ console.warn("[@portnet/ui v2] cssVariables emitted undefined values — check token imports:", offenders);
153
+ }
154
+ }
155
+ return [":root {"].concat(_toConsumableArray(lightVars.map(function (line) {
156
+ return line ? " ".concat(line) : "";
157
+ })), ["}", "", collapsedSidebar, "", spaciousDensity, "", compactDensity, "", ultraCompactDensity, "", darkVars]).join("\n");
158
+ }
159
+
160
+ /**
161
+ * Inject the variables into <head> at runtime.
162
+ * Idempotent: replaces a previous tag if present.
163
+ *
164
+ * Backward-compatible signatures:
165
+ * injectCssVariables(); // default id, no override
166
+ * injectCssVariables("my-style-id"); // legacy string id
167
+ * injectCssVariables({ id, brand, brandSecondary }); // options form
168
+ */
169
+ function injectCssVariables(arg) {
170
+ if (typeof document === "undefined") return;
171
+ var opts = typeof arg === "string" ? {
172
+ id: arg
173
+ } : arg || {};
174
+ var id = opts.id || STYLE_TAG_ID;
175
+ var tag = document.getElementById(id);
176
+ if (!tag) {
177
+ tag = document.createElement("style");
178
+ tag.id = id;
179
+ document.head.appendChild(tag);
180
+ }
181
+ tag.textContent = getCssVariables(opts);
182
+ }
183
+
184
+ /**
185
+ * Remove the injected style tag. Symmetrical with
186
+ * injectCssVariables — needed for theme switching, hot-reload
187
+ * and test cleanup. No-op when the tag is absent or in SSR.
188
+ *
189
+ * removeCssVariables(); // default id
190
+ * removeCssVariables("my-style-id"); // legacy string id
191
+ * removeCssVariables({ id }); // options form
192
+ */
193
+ function removeCssVariables(arg) {
194
+ if (typeof document === "undefined") return;
195
+ var id = typeof arg === "string" ? arg : arg && arg.id || STYLE_TAG_ID;
196
+ var tag = document.getElementById(id);
197
+ if (tag) tag.remove();
198
+ }
199
+ var cssVariablesApi = {
200
+ getCssVariables: getCssVariables,
201
+ injectCssVariables: injectCssVariables,
202
+ removeCssVariables: removeCssVariables
203
+ };
204
+ var _default = exports["default"] = cssVariablesApi;
205
+ //# sourceMappingURL=cssVariables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cssVariables.js","names":["_tokens","require","_brand","_brandSecondary","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","iter","Symbol","iterator","Array","from","isArray","_arrayLikeToArray","_slicedToArray","i","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","len","length","arr2","_i","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","STYLE_TAG_ID","NUMERIC_GRID_RE","SPACING_ENTRIES","entries","spacing","NUMERIC_ENTRIES","filter","_ref","_ref2","k","ALIAS_ENTRIES","_ref3","_ref4","getCssVariables","_radius$none","options","arguments","undefined","brand","resolveBrand","brandSecondary","resolveBrandSecondary","lightVars","concat","accent","accentHover","accentSoft","accentFg","secondary","secondaryFg","ink","fg","fgMuted","fgSubtle","fgInverse","surface","bg","bgElev","bgSubtle","bgHover","border","borderStrong","semantic","success","successSoft","successFg","warning","warningSoft","warningFg","danger","dangerSoft","dangerFg","info","infoSoft","infoFg","status","soft","sent","pending","approved","rejected","neutral","state","hoverOverlay","pressedOverlay","selectedOverlay","fontFamily","sans","mono","fontSize","display","h2","h3","h4","body","sm","xs","fontWeight","regular","medium","semibold","bold","lineHeight","tight","snug","normal","loose","letterSpacing","wide","map","_ref5","_ref6","v","_ref7","_ref8","radius","none","md","lg","xl","full","shadows","focus","focusFallback","duration","fast","base","slow","microinteraction","stateChange","pageTransition","easing","out","zIndex","_ref9","_ref0","layout","sidebar","topbar","contentMax","formMax","tactileMin","breakpoints","density","comfortable","row","input","btn","collapsedSidebar","sidebarMin","spaciousDensity","spacious","join","compactDensity","compact","ultraCompactDensity","ultraCompact","darkVars","dark","console","offenders","l","warn","line","injectCssVariables","arg","document","opts","id","tag","getElementById","createElement","head","appendChild","textContent","removeCssVariables","remove","cssVariablesApi","_default","exports"],"sources":["../../../src/lib/v2/theme/cssVariables.ts"],"sourcesContent":["/**\r\n * CSS Variables emitter — Portnet UI v2\r\n *\r\n * Generates a CSS string declaring all tokens as :root variables.\r\n * Mount once at app boot via:\r\n *\r\n * import { injectCssVariables } from \"@portnet/ui/v2/theme\";\r\n * injectCssVariables();\r\n *\r\n * Or render `getCssVariables()` inside a `<style>` tag if SSR'd.\r\n *\r\n * Brand override (host-level theming):\r\n *\r\n * injectCssVariables({\r\n * brand: { accent: \"#2962FF\" },\r\n * brandSecondary: { secondary: \"#4FB8CF\" },\r\n * });\r\n * // Or via the unified theme factory (see createPortnetTheme):\r\n * // createPortnetTheme({ brand: {...}, brandSecondary: {...} })\r\n *\r\n * Override is deep-merged onto the default brand / brandSecondary:\r\n * any field you omit falls back to the token default. Use the SAME\r\n * override objects when calling createPortnetTheme so the MUI\r\n * palette and CSS variables stay in sync — both layers consume the\r\n * same resolvers (./_brand, ./_brandSecondary) so mismatches are\r\n * structurally impossible.\r\n */\r\nimport {\r\n ink, surface, border, semantic, status, dark,\r\n fontFamily, fontSize, fontWeight, lineHeight, letterSpacing,\r\n spacing, radius, shadows, duration, easing, zIndex,\r\n density, layout, breakpoints,\r\n state,\r\n} from \"../tokens\";\r\nimport { resolveBrand, type BrandTokens } from \"./_brand\";\r\nimport { resolveBrandSecondary, type BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\n/** Options for the CSS-variable emitter / injector. */\r\ntype CssVariablesOptions = {\r\n id?: string;\r\n brand?: Partial<BrandTokens>;\r\n brandSecondary?: Partial<BrandSecondaryTokens>;\r\n};\r\n\r\nconst STYLE_TAG_ID = \"portnet-ui-v2-tokens\";\r\n\r\n/**\r\n * Spacing partition: numeric grid keys (s1..s10) vs semantic aliases\r\n * (xs/sm/md/lg/xl/xxl). Two output namespaces so the alias names\r\n * cannot collide with the grid (s-N) and cannot pollute the global\r\n * variable namespace by emitting unprefixed --md / --lg / --xl.\r\n *\r\n * Uses Object.entries at module-load time — pure / no side-effects.\r\n */\r\nconst NUMERIC_GRID_RE = /^s\\d+$/;\r\nconst SPACING_ENTRIES = Object.entries(spacing);\r\nconst NUMERIC_ENTRIES = SPACING_ENTRIES.filter(([k]) => NUMERIC_GRID_RE.test(k));\r\nconst ALIAS_ENTRIES = SPACING_ENTRIES.filter(([k]) => !NUMERIC_GRID_RE.test(k));\r\n\r\n/**\r\n * Emits the canonical :root block + sidebar / density / dark-mode overrides.\r\n * Pass a partial `brand` / `brandSecondary` to mirror a host theme override\r\n * (use the SAME object you pass to createPortnetTheme so the two layers agree).\r\n */\r\nexport function getCssVariables(options: CssVariablesOptions = {}): string {\r\n const brand = resolveBrand(options.brand);\r\n const brandSecondary = resolveBrandSecondary(options.brandSecondary);\r\n\r\n const lightVars = [\r\n `/* ── Brand ─────────────────────────────────────── */`,\r\n `--accent: ${brand.accent};`,\r\n `--accent-hover: ${brand.accentHover};`,\r\n `--accent-soft: ${brand.accentSoft};`,\r\n `--accent-fg: ${brand.accentFg};`,\r\n ``,\r\n `/* ── Brand secondary ───────────────────────────── */`,\r\n `--secondary: ${brandSecondary.secondary};`,\r\n `--secondary-fg: ${brandSecondary.secondaryFg};`,\r\n ``,\r\n `/* ── Ink ───────────────────────────────────────── */`,\r\n `--fg: ${ink.fg};`,\r\n `--fg-muted: ${ink.fgMuted};`,\r\n `--fg-subtle: ${ink.fgSubtle};`,\r\n `--fg-inverse: ${ink.fgInverse};`,\r\n ``,\r\n `/* ── Surface ───────────────────────────────────── */`,\r\n `--bg: ${surface.bg};`,\r\n `--bg-elev: ${surface.bgElev};`,\r\n `--bg-subtle: ${surface.bgSubtle};`,\r\n `--bg-hover: ${surface.bgHover};`,\r\n `--surface: ${surface.surface};`,\r\n ``,\r\n `/* ── Border ────────────────────────────────────── */`,\r\n `--border: ${border.border};`,\r\n `--border-strong: ${border.borderStrong};`,\r\n ``,\r\n `/* ── Semantic ──────────────────────────────────── */`,\r\n `/* Each concept has a saturated fill (--<name>) and a darker text */`,\r\n `/* foreground (--<name>-fg). Pair fills with text on the same surface. */`,\r\n `--success: ${semantic.success};`,\r\n `--success-soft: ${semantic.successSoft};`,\r\n `--success-fg: ${semantic.successFg};`,\r\n `--warning: ${semantic.warning};`,\r\n `--warning-soft: ${semantic.warningSoft};`,\r\n `--warning-fg: ${semantic.warningFg};`,\r\n `--danger: ${semantic.danger};`,\r\n `--danger-soft: ${semantic.dangerSoft};`,\r\n `--danger-fg: ${semantic.dangerFg};`,\r\n `--info: ${semantic.info};`,\r\n `--info-soft: ${semantic.infoSoft};`,\r\n `--info-fg: ${semantic.infoFg};`,\r\n ``,\r\n `/* ── Status palette ────────────────────────────── */`,\r\n `--status-new-soft: ${status.new.soft};`,\r\n `--status-new-fg: ${status.new.fg};`,\r\n `--status-sent-soft: ${status.sent.soft};`,\r\n `--status-sent-fg: ${status.sent.fg};`,\r\n `--status-pending-soft: ${status.pending.soft};`,\r\n `--status-pending-fg: ${status.pending.fg};`,\r\n `--status-approved-soft: ${status.approved.soft};`,\r\n `--status-approved-fg: ${status.approved.fg};`,\r\n `--status-rejected-soft: ${status.rejected.soft};`,\r\n `--status-rejected-fg: ${status.rejected.fg};`,\r\n `--status-neutral-soft: ${status.neutral.soft};`,\r\n `--status-neutral-fg: ${status.neutral.fg};`,\r\n ``,\r\n `/* ── State overlays (B2 — currentColor-based) ─── */`,\r\n `--state-hover-overlay: ${state.hoverOverlay};`,\r\n `--state-pressed-overlay: ${state.pressedOverlay};`,\r\n `--state-selected-overlay: ${state.selectedOverlay};`,\r\n ``,\r\n `/* ── Typography ────────────────────────────────── */`,\r\n `--font-sans: ${fontFamily.sans};`,\r\n `--font-mono: ${fontFamily.mono};`,\r\n `--text-display: ${fontSize.display}px;`,\r\n `--text-h2: ${fontSize.h2}px;`,\r\n `--text-h3: ${fontSize.h3}px;`,\r\n `--text-h4: ${fontSize.h4}px;`,\r\n `--text-body: ${fontSize.body}px;`,\r\n `--text-sm: ${fontSize.sm}px;`,\r\n `--text-xs: ${fontSize.xs}px;`,\r\n `--fw-regular: ${fontWeight.regular};`,\r\n `--fw-medium: ${fontWeight.medium};`,\r\n `--fw-semibold: ${fontWeight.semibold};`,\r\n `--fw-bold: ${fontWeight.bold};`,\r\n // NOTE: there is deliberately no heavier weight than bold (700). Batch 1\r\n // dropped the black weight from the typography tokens, and this file kept\r\n // emitting the matching variable for a while — resolving to the literal\r\n // string \"undefined\" in :root, which silently flattened every consumer that\r\n // referenced it. The dev-only check at the end of this function exists\r\n // because of that incident.\r\n //\r\n // The old variable name is deliberately not written out: banned-patterns\r\n // scans raw file text with no comment awareness, so naming it here — even to\r\n // record its removal — trips the rule that protects this block.\r\n `--lh-tight: ${lineHeight.tight};`,\r\n `--lh-snug: ${lineHeight.snug};`,\r\n `--lh-normal: ${lineHeight.normal};`,\r\n `--lh-loose: ${lineHeight.loose};`,\r\n // A7-02 — letter-spacing scale. Six token names were referenced fleet-wide\r\n // that this emitter never emitted, so their var() fallbacks were the only\r\n // thing that ever rendered (R-2.3 / R-AI.1 magic values wearing a token's\r\n // name). These two had a real platform basis — -0.01em was hardcoded twice\r\n // in tokens/typography.ts itself, 0.04em inside KV and ConfirmDialog — so\r\n // they are promoted. `--border-subtle`, `--r-xs`, `--icon-sm`, `--icon-xl`\r\n // were local inventions and are fixed at their call sites instead.\r\n `--ls-tight: ${letterSpacing.tight};`,\r\n `--ls-normal: ${letterSpacing.normal};`,\r\n `--ls-wide: ${letterSpacing.wide};`,\r\n ``,\r\n `/* ── Spacing — numeric grid (8 px base) ─────────── */`,\r\n // s1..s10 → --s-1 .. --s-10 (preserves all existing consumers).\r\n ...NUMERIC_ENTRIES.map(([k, v]) => `--s-${k.slice(1)}: ${v}px;`),\r\n ``,\r\n `/* ── Spacing — semantic aliases ────────────────── */`,\r\n // xs/sm/md/lg/xl/xxl → --space-xs .. --space-xxl. The \"space-\"\r\n // prefix is mandatory: emitting them as raw --xs/--md/--lg\r\n // would pollute the global CSS variable namespace.\r\n ...ALIAS_ENTRIES.map(([k, v]) => `--space-${k}: ${v}px;`),\r\n ``,\r\n `/* ── Radius ────────────────────────────────────── */`,\r\n `--r-none: ${radius.none ?? 0}px;`,\r\n `--r-sm: ${radius.sm}px;`,\r\n `--r-md: ${radius.md}px;`,\r\n `--r-lg: ${radius.lg}px;`,\r\n `--r-xl: ${radius.xl}px;`,\r\n `--r-full: ${radius.full}px;`,\r\n ``,\r\n `/* ── Shadows ───────────────────────────────────── */`,\r\n `--shadow-xs: ${shadows.xs};`,\r\n `--shadow-sm: ${shadows.sm};`,\r\n `--shadow-md: ${shadows.md};`,\r\n `--shadow-lg: ${shadows.lg};`,\r\n `--shadow-focus: ${shadows.focus};`,\r\n // Static rgba fallback for non-CSS-vars contexts (SSR strings,\r\n // raw inline `style={{ boxShadow: ... }}` props that bypass CSS).\r\n ...(shadows.focusFallback\r\n ? [`--shadow-focus-fallback: ${shadows.focusFallback};`]\r\n : []),\r\n ``,\r\n `/* ── Motion (temporal vocabulary) ──────────────── */`,\r\n `--duration-fast: ${duration.fast}ms;`,\r\n `--duration-base: ${duration.base}ms;`,\r\n `--duration-slow: ${duration.slow}ms;`,\r\n ``,\r\n `/* ── Motion (semantic aliases — B6) ────────────── */`,\r\n // Same numeric values as fast/base/slow; intent-readable at the\r\n // call site. transition() helper recognises both vocabularies.\r\n `--duration-microinteraction: ${duration.microinteraction}ms;`,\r\n `--duration-state-change: ${duration.stateChange}ms;`,\r\n `--duration-page-transition: ${duration.pageTransition}ms;`,\r\n ``,\r\n `/* ── Easing ────────────────────────────────────── */`,\r\n `--easing-out: ${easing.out};`,\r\n `--easing-in: ${easing.in};`,\r\n `--easing-soft: ${easing.soft};`,\r\n ``,\r\n `/* ── Z-index ───────────────────────────────────── */`,\r\n // Iterates the full zIndex object — picks up popover/snackbar/\r\n // tooltip slots added in Batch 1 and skipLink (Batch 11 / B3)\r\n // without code changes here.\r\n ...Object.entries(zIndex).map(([k, v]) => `--z-${k}: ${v};`),\r\n ``,\r\n `/* ── Layout ────────────────────────────────────── */`,\r\n `--sidebar-w: ${layout.sidebar}px;`,\r\n `--topbar-h: ${layout.topbar}px;`,\r\n `--content-max: ${layout.contentMax}px;`,\r\n `--form-max: ${layout.formMax}px;`,\r\n `--tactile-min: ${layout.tactileMin}px;`,\r\n ``,\r\n `/* ── Breakpoints (R-RS.1) ──────────────────────── */`,\r\n // The single breakpoint scale, also wired into the MUI theme and the\r\n // mq() string helpers. Media queries can't read var(), so these are\r\n // for @container queries, clamp() and JS (getComputedStyle) — they\r\n // exist so no consumer hardcodes a raw px breakpoint anywhere.\r\n `--bp-xs: ${breakpoints.xs}px;`,\r\n `--bp-sm: ${breakpoints.sm}px;`,\r\n `--bp-md: ${breakpoints.md}px;`,\r\n `--bp-lg: ${breakpoints.lg}px;`,\r\n `--bp-xl: ${breakpoints.xl}px;`,\r\n ``,\r\n `/* ── Density (default = comfortable) ───────────── */`,\r\n `--row-h: ${density.comfortable.row}px;`,\r\n `--input-h: ${density.comfortable.input}px;`,\r\n `--btn-h: ${density.comfortable.btn}px;`,\r\n `--text-fs: ${density.comfortable.fontSize}px;`,\r\n ];\r\n\r\n const collapsedSidebar = `[data-nav-collapsed=\"true\"] { --sidebar-w: ${layout.sidebarMin}px; }`;\r\n\r\n /* Density tier overrides — emitted in order of granularity so a\r\n * cascading selector like `[data-density][data-density=\"compact\"]`\r\n * (host-side specificity hack) resolves predictably. */\r\n const spaciousDensity = [\r\n `[data-density=\"spacious\"] {`,\r\n ` --row-h: ${density.spacious.row}px;`,\r\n ` --input-h: ${density.spacious.input}px;`,\r\n ` --btn-h: ${density.spacious.btn}px;`,\r\n ` --text-fs: ${density.spacious.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n const compactDensity = [\r\n `[data-density=\"compact\"] {`,\r\n ` --row-h: ${density.compact.row}px;`,\r\n ` --input-h: ${density.compact.input}px;`,\r\n ` --btn-h: ${density.compact.btn}px;`,\r\n ` --text-fs: ${density.compact.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n const ultraCompactDensity = [\r\n `[data-density=\"ultra-compact\"] {`,\r\n ` --row-h: ${density.ultraCompact.row}px;`,\r\n ` --input-h: ${density.ultraCompact.input}px;`,\r\n ` --btn-h: ${density.ultraCompact.btn}px;`,\r\n ` --text-fs: ${density.ultraCompact.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n /* ── Dark mode overrides ────────────────────────────────────\r\n * Soft variants (semantic + status) are DERIVED via color-mix\r\n * from the saturated colour or the dark-mode status FG. The\r\n * static light-mode soft hex codes are too pale on dark\r\n * surfaces and fail WCAG 1.4.11 non-text contrast.\r\n * The 22-24% mix produces a tinted overlay that adapts to host\r\n * brand overrides automatically.\r\n * ───────────────────────────────────────────────────────── */\r\n const darkVars = [\r\n `[data-theme=\"dark\"] {`,\r\n ` --bg: ${dark.bg};`,\r\n ` --bg-elev: ${dark.bgElev};`,\r\n ` --bg-subtle: ${dark.bgSubtle};`,\r\n ` --bg-hover: ${dark.bgHover};`,\r\n ` --surface: ${dark.surface};`,\r\n ` --border: ${dark.border};`,\r\n ` --border-strong: ${dark.borderStrong};`,\r\n ` --fg: ${dark.fg};`,\r\n ` --fg-muted: ${dark.fgMuted};`,\r\n ` --fg-subtle: ${dark.fgSubtle};`,\r\n ` --fg-inverse: ${dark.fgInverse};`,\r\n ` --accent-soft: ${dark.accentSoft};`,\r\n ``,\r\n ` /* Soft semantic fills — derived from the saturated colour */`,\r\n ` --success-soft: color-mix(in srgb, var(--success) 24%, transparent);`,\r\n ` --warning-soft: color-mix(in srgb, var(--warning) 24%, transparent);`,\r\n ` --danger-soft: color-mix(in srgb, var(--danger) 24%, transparent);`,\r\n ` --info-soft: color-mix(in srgb, var(--info) 24%, transparent);`,\r\n ``,\r\n ` /* Status FG — overridden for dark-mode visibility */`,\r\n ` --status-new-fg: ${dark.status.new.fg};`,\r\n ` --status-sent-fg: ${dark.status.sent.fg};`,\r\n ` --status-pending-fg: ${dark.status.pending.fg};`,\r\n ` --status-approved-fg: ${dark.status.approved.fg};`,\r\n ` --status-rejected-fg: ${dark.status.rejected.fg};`,\r\n ` --status-neutral-fg: ${dark.status.neutral.fg};`,\r\n ``,\r\n ` /* Status soft — derived from the dark-mode FG */`,\r\n ` --status-new-soft: color-mix(in srgb, var(--status-new-fg) 22%, transparent);`,\r\n ` --status-sent-soft: color-mix(in srgb, var(--status-sent-fg) 22%, transparent);`,\r\n ` --status-pending-soft: color-mix(in srgb, var(--status-pending-fg) 22%, transparent);`,\r\n ` --status-approved-soft: color-mix(in srgb, var(--status-approved-fg) 22%, transparent);`,\r\n ` --status-rejected-soft: color-mix(in srgb, var(--status-rejected-fg) 22%, transparent);`,\r\n ` --status-neutral-soft: color-mix(in srgb, var(--status-neutral-fg) 22%, transparent);`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n /* Dev-only validation — catches the regression class that motivated it: a\r\n * token removed from ../tokens while this emitter still references it, which\r\n * puts the literal \"undefined\" into :root instead of failing loudly. See the\r\n * note beside --fw-bold above. */\r\n if (typeof console !== \"undefined\") {\r\n const offenders = lightVars.filter((l) => /:\\s*undefined\\b/.test(l));\r\n if (offenders.length) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n \"[@portnet/ui v2] cssVariables emitted undefined values — check token imports:\",\r\n offenders,\r\n );\r\n }\r\n }\r\n\r\n return [\r\n `:root {`,\r\n ...lightVars.map((line) => (line ? ` ${line}` : \"\")),\r\n `}`,\r\n ``,\r\n collapsedSidebar,\r\n ``,\r\n spaciousDensity,\r\n ``,\r\n compactDensity,\r\n ``,\r\n ultraCompactDensity,\r\n ``,\r\n darkVars,\r\n ].join(\"\\n\");\r\n}\r\n\r\n/**\r\n * Inject the variables into <head> at runtime.\r\n * Idempotent: replaces a previous tag if present.\r\n *\r\n * Backward-compatible signatures:\r\n * injectCssVariables(); // default id, no override\r\n * injectCssVariables(\"my-style-id\"); // legacy string id\r\n * injectCssVariables({ id, brand, brandSecondary }); // options form\r\n */\r\nexport function injectCssVariables(arg?: string | CssVariablesOptions): void {\r\n if (typeof document === \"undefined\") return;\r\n const opts: CssVariablesOptions = typeof arg === \"string\" ? { id: arg } : (arg || {});\r\n const id = opts.id || STYLE_TAG_ID;\r\n\r\n let tag = document.getElementById(id);\r\n if (!tag) {\r\n tag = document.createElement(\"style\");\r\n tag.id = id;\r\n document.head.appendChild(tag);\r\n }\r\n tag.textContent = getCssVariables(opts);\r\n}\r\n\r\n/**\r\n * Remove the injected style tag. Symmetrical with\r\n * injectCssVariables — needed for theme switching, hot-reload\r\n * and test cleanup. No-op when the tag is absent or in SSR.\r\n *\r\n * removeCssVariables(); // default id\r\n * removeCssVariables(\"my-style-id\"); // legacy string id\r\n * removeCssVariables({ id }); // options form\r\n */\r\nexport function removeCssVariables(arg?: string | CssVariablesOptions): void {\r\n if (typeof document === \"undefined\") return;\r\n const id = typeof arg === \"string\"\r\n ? arg\r\n : ((arg && arg.id) || STYLE_TAG_ID);\r\n const tag = document.getElementById(id);\r\n if (tag) tag.remove();\r\n}\r\n\r\nconst cssVariablesApi = { getCssVariables, injectCssVariables, removeCssVariables };\r\nexport default cssVariablesApi;\r\n"],"mappings":";;;;;;;;;AA2BA,IAAAA,OAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAAqF,SAAAG,mBAAAC,GAAA,WAAAC,kBAAA,CAAAD,GAAA,KAAAE,gBAAA,CAAAF,GAAA,KAAAG,2BAAA,CAAAH,GAAA,KAAAI,kBAAA;AAAA,SAAAA,mBAAA,cAAAC,SAAA;AAAA,SAAAH,iBAAAI,IAAA,eAAAC,MAAA,oBAAAD,IAAA,CAAAC,MAAA,CAAAC,QAAA,aAAAF,IAAA,+BAAAG,KAAA,CAAAC,IAAA,CAAAJ,IAAA;AAAA,SAAAL,mBAAAD,GAAA,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;EAC3E,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,IAAMC,IAAyB,GAAG,OAAOF,GAAG,KAAK,QAAQ,GAAG;IAAEG,EAAE,EAAEH;EAAI,CAAC,GAAIA,GAAG,IAAI,CAAC,CAAE;EACrF,IAAMG,EAAE,GAAGD,IAAI,CAACC,EAAE,IAAIpJ,YAAY;EAElC,IAAIqJ,GAAG,GAAGH,QAAQ,CAACI,cAAc,CAACF,EAAE,CAAC;EACrC,IAAI,CAACC,GAAG,EAAE;IACRA,GAAG,GAAGH,QAAQ,CAACK,aAAa,CAAC,OAAO,CAAC;IACrCF,GAAG,CAACD,EAAE,GAAGA,EAAE;IACXF,QAAQ,CAACM,IAAI,CAACC,WAAW,CAACJ,GAAG,CAAC;EAChC;EACAA,GAAG,CAACK,WAAW,GAAG7I,eAAe,CAACsI,IAAI,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASQ,kBAAkBA,CAACV,GAAkC,EAAQ;EAC3E,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,IAAME,EAAE,GAAG,OAAOH,GAAG,KAAK,QAAQ,GAC9BA,GAAG,GACDA,GAAG,IAAIA,GAAG,CAACG,EAAE,IAAKpJ,YAAa;EACrC,IAAMqJ,GAAG,GAAGH,QAAQ,CAACI,cAAc,CAACF,EAAE,CAAC;EACvC,IAAIC,GAAG,EAAEA,GAAG,CAACO,MAAM,CAAC,CAAC;AACvB;AAEA,IAAMC,eAAe,GAAG;EAAEhJ,eAAe,EAAfA,eAAe;EAAEmI,kBAAkB,EAAlBA,kBAAkB;EAAEW,kBAAkB,EAAlBA;AAAmB,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,cACrEF,eAAe","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ import createPortnetTheme from "./createPortnetTheme";
2
+ import { getCssVariables, injectCssVariables, removeCssVariables } from "./cssVariables";
3
+ export { default as createPortnetTheme } from "./createPortnetTheme";
4
+ export { getCssVariables, injectCssVariables, removeCssVariables, } from "./cssVariables";
5
+ /**
6
+ * Public typed contract of the theme factory.
7
+ *
8
+ * Every host module wraps `createPortnetTheme` in a local `build<Module>Theme`
9
+ * helper (see the GU modules' `utils/appearance`), and those wrappers need to
10
+ * declare their own option surface without redefining it. Before this export
11
+ * the options type was module-private, which forced consumers into either
12
+ * `brand?: object` or an `as Parameters<typeof createPortnetTheme>[0]`
13
+ * assertion — both of which the Platform TypeScript Guidelines forbid
14
+ * ("Never use object", "Avoid unsafe assertions").
15
+ *
16
+ * `BrandTokens` / `BrandSecondaryTokens` are surfaced for the same reason: a
17
+ * host that receives a partial brand payload from the shell (themeReceived)
18
+ * must be able to type that payload against the shared token group instead of
19
+ * inventing a local twin.
20
+ *
21
+ * Additive, non-breaking: type-only re-exports, no runtime change.
22
+ */
23
+ export type { CreatePortnetThemeOptions } from "./createPortnetTheme";
24
+ export type { BrandTokens } from "./_brand";
25
+ export type { BrandSecondaryTokens } from "./_brandSecondary";
26
+ declare const themeApi: {
27
+ createPortnetTheme: typeof createPortnetTheme;
28
+ getCssVariables: typeof getCssVariables;
29
+ injectCssVariables: typeof injectCssVariables;
30
+ removeCssVariables: typeof removeCssVariables;
31
+ };
32
+ export default themeApi;
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;GAiBG;AACH,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,QAAA,MAAM,QAAQ;;;;;CAKb,CAAC;AACF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "createPortnetTheme", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _createPortnetTheme["default"];
10
+ }
11
+ });
12
+ exports["default"] = void 0;
13
+ Object.defineProperty(exports, "getCssVariables", {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return _cssVariables.getCssVariables;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "injectCssVariables", {
20
+ enumerable: true,
21
+ get: function get() {
22
+ return _cssVariables.injectCssVariables;
23
+ }
24
+ });
25
+ Object.defineProperty(exports, "removeCssVariables", {
26
+ enumerable: true,
27
+ get: function get() {
28
+ return _cssVariables.removeCssVariables;
29
+ }
30
+ });
31
+ var _createPortnetTheme = _interopRequireDefault(require("./createPortnetTheme"));
32
+ var _cssVariables = require("./cssVariables");
33
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
34
+ /**
35
+ * Public typed contract of the theme factory.
36
+ *
37
+ * Every host module wraps `createPortnetTheme` in a local `build<Module>Theme`
38
+ * helper (see the GU modules' `utils/appearance`), and those wrappers need to
39
+ * declare their own option surface without redefining it. Before this export
40
+ * the options type was module-private, which forced consumers into either
41
+ * `brand?: object` or an `as Parameters<typeof createPortnetTheme>[0]`
42
+ * assertion — both of which the Platform TypeScript Guidelines forbid
43
+ * ("Never use object", "Avoid unsafe assertions").
44
+ *
45
+ * `BrandTokens` / `BrandSecondaryTokens` are surfaced for the same reason: a
46
+ * host that receives a partial brand payload from the shell (themeReceived)
47
+ * must be able to type that payload against the shared token group instead of
48
+ * inventing a local twin.
49
+ *
50
+ * Additive, non-breaking: type-only re-exports, no runtime change.
51
+ */
52
+
53
+ var themeApi = {
54
+ createPortnetTheme: _createPortnetTheme["default"],
55
+ getCssVariables: _cssVariables.getCssVariables,
56
+ injectCssVariables: _cssVariables.injectCssVariables,
57
+ removeCssVariables: _cssVariables.removeCssVariables
58
+ };
59
+ var _default = exports["default"] = themeApi;
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_createPortnetTheme","_interopRequireDefault","require","_cssVariables","obj","__esModule","themeApi","createPortnetTheme","getCssVariables","injectCssVariables","removeCssVariables","_default","exports"],"sources":["../../../src/lib/v2/theme/index.ts"],"sourcesContent":["import createPortnetTheme from \"./createPortnetTheme\";\r\nimport {\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./cssVariables\";\r\n\r\nexport { default as createPortnetTheme } from \"./createPortnetTheme\";\r\nexport {\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./cssVariables\";\r\n\r\n/**\r\n * Public typed contract of the theme factory.\r\n *\r\n * Every host module wraps `createPortnetTheme` in a local `build<Module>Theme`\r\n * helper (see the GU modules' `utils/appearance`), and those wrappers need to\r\n * declare their own option surface without redefining it. Before this export\r\n * the options type was module-private, which forced consumers into either\r\n * `brand?: object` or an `as Parameters<typeof createPortnetTheme>[0]`\r\n * assertion — both of which the Platform TypeScript Guidelines forbid\r\n * (\"Never use object\", \"Avoid unsafe assertions\").\r\n *\r\n * `BrandTokens` / `BrandSecondaryTokens` are surfaced for the same reason: a\r\n * host that receives a partial brand payload from the shell (themeReceived)\r\n * must be able to type that payload against the shared token group instead of\r\n * inventing a local twin.\r\n *\r\n * Additive, non-breaking: type-only re-exports, no runtime change.\r\n */\r\nexport type { CreatePortnetThemeOptions } from \"./createPortnetTheme\";\r\nexport type { BrandTokens } from \"./_brand\";\r\nexport type { BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\nconst themeApi = {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n};\r\nexport default themeApi;\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIwB,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AASxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAME,QAAQ,GAAG;EACfC,kBAAkB,EAAlBA,8BAAkB;EAClBC,eAAe,EAAfA,6BAAe;EACfC,kBAAkB,EAAlBA,gCAAkB;EAClBC,kBAAkB,EAAlBA;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cACaN,QAAQ","ignoreList":[]}