@cratis/components 3.3.4 → 3.5.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 (411) hide show
  1. package/README.md +322 -197
  2. package/dist/esm/Canvas/Canvas.d.ts +64 -0
  3. package/dist/esm/Canvas/Canvas.d.ts.map +1 -0
  4. package/dist/esm/Canvas/Canvas.js +767 -0
  5. package/dist/esm/Canvas/Canvas.js.map +1 -0
  6. package/dist/esm/Canvas/CanvasControls.d.ts +32 -0
  7. package/dist/esm/Canvas/CanvasControls.d.ts.map +1 -0
  8. package/dist/esm/Canvas/CanvasControls.js +34 -0
  9. package/dist/esm/Canvas/CanvasControls.js.map +1 -0
  10. package/dist/esm/Canvas/CanvasItem.d.ts +10 -0
  11. package/dist/esm/Canvas/CanvasItem.d.ts.map +1 -0
  12. package/dist/esm/Canvas/CanvasItem.js +51 -0
  13. package/dist/esm/Canvas/CanvasItem.js.map +1 -0
  14. package/dist/esm/Canvas/CanvasMinimap.d.ts +25 -0
  15. package/dist/esm/Canvas/CanvasMinimap.d.ts.map +1 -0
  16. package/dist/esm/Canvas/CanvasMinimap.js +102 -0
  17. package/dist/esm/Canvas/CanvasMinimap.js.map +1 -0
  18. package/dist/esm/Canvas/CanvasOverlay.d.ts +6 -0
  19. package/dist/esm/Canvas/CanvasOverlay.d.ts.map +1 -0
  20. package/dist/esm/Canvas/CanvasOverlay.js +8 -0
  21. package/dist/esm/Canvas/CanvasOverlay.js.map +1 -0
  22. package/dist/esm/Canvas/canvasGesture.d.ts +8 -0
  23. package/dist/esm/Canvas/canvasGesture.d.ts.map +1 -0
  24. package/dist/esm/Canvas/canvasGesture.js +32 -0
  25. package/dist/esm/Canvas/canvasGesture.js.map +1 -0
  26. package/dist/esm/Canvas/canvasTransformActivity.d.ts +7 -0
  27. package/dist/esm/Canvas/canvasTransformActivity.d.ts.map +1 -0
  28. package/dist/esm/Canvas/canvasTransformActivity.js +22 -0
  29. package/dist/esm/Canvas/canvasTransformActivity.js.map +1 -0
  30. package/dist/esm/Canvas/glassAttributes.d.ts +4 -0
  31. package/dist/esm/Canvas/glassAttributes.d.ts.map +1 -0
  32. package/dist/esm/Canvas/glassAttributes.js +25 -0
  33. package/dist/esm/Canvas/glassAttributes.js.map +1 -0
  34. package/dist/esm/Canvas/index.d.ts +18 -0
  35. package/dist/esm/Canvas/index.d.ts.map +1 -0
  36. package/dist/esm/Canvas/index.js +38 -0
  37. package/dist/esm/Canvas/index.js.map +1 -0
  38. package/dist/esm/Canvas/isBackgroundPointerTarget.d.ts +2 -0
  39. package/dist/esm/Canvas/isBackgroundPointerTarget.d.ts.map +1 -0
  40. package/dist/esm/Canvas/isBackgroundPointerTarget.js +17 -0
  41. package/dist/esm/Canvas/isBackgroundPointerTarget.js.map +1 -0
  42. package/dist/esm/Canvas/isWithinScrollableContent.d.ts +11 -0
  43. package/dist/esm/Canvas/isWithinScrollableContent.d.ts.map +1 -0
  44. package/dist/esm/Canvas/isWithinScrollableContent.js +38 -0
  45. package/dist/esm/Canvas/isWithinScrollableContent.js.map +1 -0
  46. package/dist/esm/Canvas/panMomentum.d.ts +13 -0
  47. package/dist/esm/Canvas/panMomentum.d.ts.map +1 -0
  48. package/dist/esm/Canvas/panMomentum.js +41 -0
  49. package/dist/esm/Canvas/panMomentum.js.map +1 -0
  50. package/dist/esm/Canvas/pinchGesture.d.ts +16 -0
  51. package/dist/esm/Canvas/pinchGesture.d.ts.map +1 -0
  52. package/dist/esm/Canvas/pinchGesture.js +30 -0
  53. package/dist/esm/Canvas/pinchGesture.js.map +1 -0
  54. package/dist/esm/Canvas/selfSuspendingFrameLoop.d.ts +10 -0
  55. package/dist/esm/Canvas/selfSuspendingFrameLoop.d.ts.map +1 -0
  56. package/dist/esm/Canvas/selfSuspendingFrameLoop.js +33 -0
  57. package/dist/esm/Canvas/selfSuspendingFrameLoop.js.map +1 -0
  58. package/dist/esm/Canvas/shapes/ChatBubble/AnchoredOverlay.d.ts +13 -0
  59. package/dist/esm/Canvas/shapes/ChatBubble/AnchoredOverlay.d.ts.map +1 -0
  60. package/dist/esm/Canvas/shapes/ChatBubble/AnchoredOverlay.js +61 -0
  61. package/dist/esm/Canvas/shapes/ChatBubble/AnchoredOverlay.js.map +1 -0
  62. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/PersonAvatarCircle.d.ts +20 -0
  63. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/PersonAvatarCircle.d.ts.map +1 -0
  64. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/PersonAvatarCircle.js +27 -0
  65. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/PersonAvatarCircle.js.map +1 -0
  66. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getAvatarColor.d.ts +2 -0
  67. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getAvatarColor.d.ts.map +1 -0
  68. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getAvatarColor.js +20 -0
  69. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getAvatarColor.js.map +1 -0
  70. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getInitials.d.ts +2 -0
  71. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getInitials.d.ts.map +1 -0
  72. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getInitials.js +11 -0
  73. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/getInitials.js.map +1 -0
  74. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/index.d.ts +5 -0
  75. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/index.d.ts.map +1 -0
  76. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/index.js +4 -0
  77. package/dist/esm/Canvas/shapes/ChatBubble/Avatar/index.js.map +1 -0
  78. package/dist/esm/Canvas/shapes/ChatBubble/Chat.d.ts +41 -0
  79. package/dist/esm/Canvas/shapes/ChatBubble/Chat.d.ts.map +1 -0
  80. package/dist/esm/Canvas/shapes/ChatBubble/Chat.js +76 -0
  81. package/dist/esm/Canvas/shapes/ChatBubble/Chat.js.map +1 -0
  82. package/dist/esm/Canvas/shapes/ChatBubble/ChatAuthorKind.d.ts +5 -0
  83. package/dist/esm/Canvas/shapes/ChatBubble/ChatAuthorKind.d.ts.map +1 -0
  84. package/dist/esm/Canvas/shapes/ChatBubble/ChatAuthorKind.js +14 -0
  85. package/dist/esm/Canvas/shapes/ChatBubble/ChatAuthorKind.js.map +1 -0
  86. package/dist/esm/Canvas/shapes/ChatBubble/ChatBubble.d.ts +18 -0
  87. package/dist/esm/Canvas/shapes/ChatBubble/ChatBubble.d.ts.map +1 -0
  88. package/dist/esm/Canvas/shapes/ChatBubble/ChatBubble.js +89 -0
  89. package/dist/esm/Canvas/shapes/ChatBubble/ChatBubble.js.map +1 -0
  90. package/dist/esm/Canvas/shapes/ChatBubble/ChatComposer.d.ts +23 -0
  91. package/dist/esm/Canvas/shapes/ChatBubble/ChatComposer.d.ts.map +1 -0
  92. package/dist/esm/Canvas/shapes/ChatBubble/ChatComposer.js +107 -0
  93. package/dist/esm/Canvas/shapes/ChatBubble/ChatComposer.js.map +1 -0
  94. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessage.d.ts +17 -0
  95. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessage.d.ts.map +1 -0
  96. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessage.js +2 -0
  97. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessage.js.map +1 -0
  98. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageBubble.d.ts +25 -0
  99. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageBubble.d.ts.map +1 -0
  100. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageBubble.js +31 -0
  101. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageBubble.js.map +1 -0
  102. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReaction.d.ts +6 -0
  103. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReaction.d.ts.map +1 -0
  104. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReaction.js +2 -0
  105. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReaction.js.map +1 -0
  106. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReactionUser.d.ts +7 -0
  107. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReactionUser.d.ts.map +1 -0
  108. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReactionUser.js +2 -0
  109. package/dist/esm/Canvas/shapes/ChatBubble/ChatMessageReactionUser.js.map +1 -0
  110. package/dist/esm/Canvas/shapes/ChatBubble/ChatOwnReaction.d.ts +6 -0
  111. package/dist/esm/Canvas/shapes/ChatBubble/ChatOwnReaction.d.ts.map +1 -0
  112. package/dist/esm/Canvas/shapes/ChatBubble/ChatOwnReaction.js +2 -0
  113. package/dist/esm/Canvas/shapes/ChatBubble/ChatOwnReaction.js.map +1 -0
  114. package/dist/esm/Canvas/shapes/ChatBubble/ChatTypingAuthor.d.ts +8 -0
  115. package/dist/esm/Canvas/shapes/ChatBubble/ChatTypingAuthor.d.ts.map +1 -0
  116. package/dist/esm/Canvas/shapes/ChatBubble/ChatTypingAuthor.js +2 -0
  117. package/dist/esm/Canvas/shapes/ChatBubble/ChatTypingAuthor.js.map +1 -0
  118. package/dist/esm/Canvas/shapes/ChatBubble/ChatVariant.d.ts +5 -0
  119. package/dist/esm/Canvas/shapes/ChatBubble/ChatVariant.d.ts.map +1 -0
  120. package/dist/esm/Canvas/shapes/ChatBubble/ChatVariant.js +15 -0
  121. package/dist/esm/Canvas/shapes/ChatBubble/ChatVariant.js.map +1 -0
  122. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategory.d.ts +6 -0
  123. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategory.d.ts.map +1 -0
  124. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategory.js +2 -0
  125. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategory.js.map +1 -0
  126. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategoryKey.d.ts +12 -0
  127. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategoryKey.d.ts.map +1 -0
  128. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategoryKey.js +18 -0
  129. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiCategoryKey.js.map +1 -0
  130. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiMemory.d.ts +5 -0
  131. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiMemory.d.ts.map +1 -0
  132. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiMemory.js +2 -0
  133. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiMemory.js.map +1 -0
  134. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiPicker.d.ts +14 -0
  135. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiPicker.d.ts.map +1 -0
  136. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiPicker.js +51 -0
  137. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/EmojiPicker.js.map +1 -0
  138. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/emojiCatalog.d.ts +3 -0
  139. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/emojiCatalog.d.ts.map +1 -0
  140. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/emojiCatalog.js +155 -0
  141. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/emojiCatalog.js.map +1 -0
  142. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/index.d.ts +7 -0
  143. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/index.d.ts.map +1 -0
  144. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/index.js +7 -0
  145. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/index.js.map +1 -0
  146. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/recentEmojis.d.ts +6 -0
  147. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/recentEmojis.d.ts.map +1 -0
  148. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/recentEmojis.js +59 -0
  149. package/dist/esm/Canvas/shapes/ChatBubble/Emoji/recentEmojis.js.map +1 -0
  150. package/dist/esm/Canvas/shapes/ChatBubble/FailedReply.d.ts +23 -0
  151. package/dist/esm/Canvas/shapes/ChatBubble/FailedReply.d.ts.map +1 -0
  152. package/dist/esm/Canvas/shapes/ChatBubble/FailedReply.js +28 -0
  153. package/dist/esm/Canvas/shapes/ChatBubble/FailedReply.js.map +1 -0
  154. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionCandidate.d.ts +9 -0
  155. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionCandidate.d.ts.map +1 -0
  156. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionCandidate.js +2 -0
  157. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionCandidate.js.map +1 -0
  158. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionQuery.d.ts +5 -0
  159. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionQuery.d.ts.map +1 -0
  160. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionQuery.js +2 -0
  161. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionQuery.js.map +1 -0
  162. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionSuggestions.d.ts +11 -0
  163. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionSuggestions.d.ts.map +1 -0
  164. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionSuggestions.js +14 -0
  165. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/MentionSuggestions.js.map +1 -0
  166. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/activeMentionQuery.d.ts +3 -0
  167. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/activeMentionQuery.d.ts.map +1 -0
  168. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/activeMentionQuery.js +34 -0
  169. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/activeMentionQuery.js.map +1 -0
  170. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/applyMention.d.ts +7 -0
  171. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/applyMention.d.ts.map +1 -0
  172. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/applyMention.js +23 -0
  173. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/applyMention.js.map +1 -0
  174. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/index.d.ts +7 -0
  175. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/index.d.ts.map +1 -0
  176. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/index.js +7 -0
  177. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/index.js.map +1 -0
  178. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/matchCandidates.d.ts +3 -0
  179. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/matchCandidates.d.ts.map +1 -0
  180. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/matchCandidates.js +24 -0
  181. package/dist/esm/Canvas/shapes/ChatBubble/Mentions/matchCandidates.js.map +1 -0
  182. package/dist/esm/Canvas/shapes/ChatBubble/MessageReactions.d.ts +6 -0
  183. package/dist/esm/Canvas/shapes/ChatBubble/MessageReactions.d.ts.map +1 -0
  184. package/dist/esm/Canvas/shapes/ChatBubble/MessageReactions.js +28 -0
  185. package/dist/esm/Canvas/shapes/ChatBubble/MessageReactions.js.map +1 -0
  186. package/dist/esm/Canvas/shapes/ChatBubble/ReactionPicker.d.ts +20 -0
  187. package/dist/esm/Canvas/shapes/ChatBubble/ReactionPicker.d.ts.map +1 -0
  188. package/dist/esm/Canvas/shapes/ChatBubble/ReactionPicker.js +50 -0
  189. package/dist/esm/Canvas/shapes/ChatBubble/ReactionPicker.js.map +1 -0
  190. package/dist/esm/Canvas/shapes/ChatBubble/TypingIndicator.d.ts +9 -0
  191. package/dist/esm/Canvas/shapes/ChatBubble/TypingIndicator.d.ts.map +1 -0
  192. package/dist/esm/Canvas/shapes/ChatBubble/TypingIndicator.js +18 -0
  193. package/dist/esm/Canvas/shapes/ChatBubble/TypingIndicator.js.map +1 -0
  194. package/dist/esm/Canvas/shapes/ChatBubble/findOwnReaction.d.ts +5 -0
  195. package/dist/esm/Canvas/shapes/ChatBubble/findOwnReaction.d.ts.map +1 -0
  196. package/dist/esm/Canvas/shapes/ChatBubble/findOwnReaction.js +19 -0
  197. package/dist/esm/Canvas/shapes/ChatBubble/findOwnReaction.js.map +1 -0
  198. package/dist/esm/Canvas/shapes/ChatBubble/index.d.ts +31 -0
  199. package/dist/esm/Canvas/shapes/ChatBubble/index.d.ts.map +1 -0
  200. package/dist/esm/Canvas/shapes/ChatBubble/index.js +17 -0
  201. package/dist/esm/Canvas/shapes/ChatBubble/index.js.map +1 -0
  202. package/dist/esm/Canvas/shapes/ChatBubble/reactionsExcludingUser.d.ts +4 -0
  203. package/dist/esm/Canvas/shapes/ChatBubble/reactionsExcludingUser.d.ts.map +1 -0
  204. package/dist/esm/Canvas/shapes/ChatBubble/reactionsExcludingUser.js +16 -0
  205. package/dist/esm/Canvas/shapes/ChatBubble/reactionsExcludingUser.js.map +1 -0
  206. package/dist/esm/Canvas/shapes/Note/Note.d.ts +22 -0
  207. package/dist/esm/Canvas/shapes/Note/Note.d.ts.map +1 -0
  208. package/dist/esm/Canvas/shapes/Note/Note.js +237 -0
  209. package/dist/esm/Canvas/shapes/Note/Note.js.map +1 -0
  210. package/dist/esm/Canvas/shapes/Note/index.d.ts +3 -0
  211. package/dist/esm/Canvas/shapes/Note/index.d.ts.map +1 -0
  212. package/dist/esm/Canvas/shapes/Note/index.js +2 -0
  213. package/dist/esm/Canvas/shapes/Note/index.js.map +1 -0
  214. package/dist/esm/Canvas/shapes/Note/noteFont.d.ts +2 -0
  215. package/dist/esm/Canvas/shapes/Note/noteFont.d.ts.map +1 -0
  216. package/dist/esm/Canvas/shapes/Note/noteFont.js +26 -0
  217. package/dist/esm/Canvas/shapes/Note/noteFont.js.map +1 -0
  218. package/dist/esm/Canvas/shapes/Region/Region.d.ts +22 -0
  219. package/dist/esm/Canvas/shapes/Region/Region.d.ts.map +1 -0
  220. package/dist/esm/Canvas/shapes/Region/Region.js +150 -0
  221. package/dist/esm/Canvas/shapes/Region/Region.js.map +1 -0
  222. package/dist/esm/Canvas/shapes/Region/index.d.ts +3 -0
  223. package/dist/esm/Canvas/shapes/Region/index.d.ts.map +1 -0
  224. package/dist/esm/Canvas/shapes/Region/index.js +2 -0
  225. package/dist/esm/Canvas/shapes/Region/index.js.map +1 -0
  226. package/dist/esm/Canvas/useDragSelectionGuard.d.ts +2 -0
  227. package/dist/esm/Canvas/useDragSelectionGuard.d.ts.map +1 -0
  228. package/dist/esm/Canvas/useDragSelectionGuard.js +59 -0
  229. package/dist/esm/Canvas/useDragSelectionGuard.js.map +1 -0
  230. package/dist/esm/Canvas/zoomMechanism.d.ts +4 -0
  231. package/dist/esm/Canvas/zoomMechanism.d.ts.map +1 -0
  232. package/dist/esm/Canvas/zoomMechanism.js +58 -0
  233. package/dist/esm/Canvas/zoomMechanism.js.map +1 -0
  234. package/dist/esm/CommandDialog/CommandDialog.d.ts +3 -6
  235. package/dist/esm/CommandDialog/CommandDialog.d.ts.map +1 -1
  236. package/dist/esm/CommandDialog/CommandDialog.js +3 -2
  237. package/dist/esm/CommandDialog/CommandDialog.js.map +1 -1
  238. package/dist/esm/CommandDialog/CommandStepper.d.ts.map +1 -1
  239. package/dist/esm/CommandDialog/CommandStepper.js +3 -2
  240. package/dist/esm/CommandDialog/CommandStepper.js.map +1 -1
  241. package/dist/esm/CommandForm/commandFormMarkers.d.ts +12 -0
  242. package/dist/esm/CommandForm/commandFormMarkers.d.ts.map +1 -0
  243. package/dist/esm/CommandForm/commandFormMarkers.js +69 -0
  244. package/dist/esm/CommandForm/commandFormMarkers.js.map +1 -0
  245. package/dist/esm/CommandForm/fields/CalendarField.d.ts +1 -1
  246. package/dist/esm/CommandForm/fields/CalendarField.d.ts.map +1 -1
  247. package/dist/esm/CommandForm/fields/CheckboxField.d.ts +1 -1
  248. package/dist/esm/CommandForm/fields/CheckboxField.d.ts.map +1 -1
  249. package/dist/esm/CommandForm/fields/ChipsField.d.ts +1 -1
  250. package/dist/esm/CommandForm/fields/ChipsField.d.ts.map +1 -1
  251. package/dist/esm/CommandForm/fields/ColorPickerField.d.ts +1 -1
  252. package/dist/esm/CommandForm/fields/ColorPickerField.d.ts.map +1 -1
  253. package/dist/esm/CommandForm/fields/DropdownField.d.ts +1 -1
  254. package/dist/esm/CommandForm/fields/DropdownField.d.ts.map +1 -1
  255. package/dist/esm/CommandForm/fields/InputTextField.d.ts +1 -1
  256. package/dist/esm/CommandForm/fields/InputTextField.d.ts.map +1 -1
  257. package/dist/esm/CommandForm/fields/MultiSelectField.d.ts +1 -1
  258. package/dist/esm/CommandForm/fields/MultiSelectField.d.ts.map +1 -1
  259. package/dist/esm/CommandForm/fields/NumberField.d.ts +1 -1
  260. package/dist/esm/CommandForm/fields/NumberField.d.ts.map +1 -1
  261. package/dist/esm/CommandForm/fields/PasswordField.d.ts +1 -1
  262. package/dist/esm/CommandForm/fields/PasswordField.d.ts.map +1 -1
  263. package/dist/esm/CommandForm/fields/RadioButtonField.d.ts +1 -1
  264. package/dist/esm/CommandForm/fields/RadioButtonField.d.ts.map +1 -1
  265. package/dist/esm/CommandForm/fields/RadioGroupField.d.ts +1 -1
  266. package/dist/esm/CommandForm/fields/RadioGroupField.d.ts.map +1 -1
  267. package/dist/esm/CommandForm/fields/RatingField.d.ts +1 -1
  268. package/dist/esm/CommandForm/fields/RatingField.d.ts.map +1 -1
  269. package/dist/esm/CommandForm/fields/SliderField.d.ts +1 -1
  270. package/dist/esm/CommandForm/fields/SliderField.d.ts.map +1 -1
  271. package/dist/esm/CommandForm/fields/TextAreaField.d.ts +1 -1
  272. package/dist/esm/CommandForm/fields/TextAreaField.d.ts.map +1 -1
  273. package/dist/esm/CommandForm/fields/ToggleSwitchField.d.ts +1 -1
  274. package/dist/esm/CommandForm/fields/ToggleSwitchField.d.ts.map +1 -1
  275. package/dist/esm/CommandForm/index.d.ts +1 -0
  276. package/dist/esm/CommandForm/index.d.ts.map +1 -1
  277. package/dist/esm/CommandForm/index.js +1 -0
  278. package/dist/esm/CommandForm/index.js.map +1 -1
  279. package/dist/esm/Common/CratisComponentsProvider.d.ts.map +1 -1
  280. package/dist/esm/Common/CratisComponentsProvider.js +6 -3
  281. package/dist/esm/Common/CratisComponentsProvider.js.map +1 -1
  282. package/dist/esm/Common/DatePickerInput.d.ts +11 -4
  283. package/dist/esm/Common/DatePickerInput.d.ts.map +1 -1
  284. package/dist/esm/Common/DatePickerInput.js +18 -2
  285. package/dist/esm/Common/DatePickerInput.js.map +1 -1
  286. package/dist/esm/Common/ErrorBoundary.d.ts +1 -1
  287. package/dist/esm/Compatibility/PrimeReact11PassThroughComponent.d.ts +3 -0
  288. package/dist/esm/Compatibility/PrimeReact11PassThroughComponent.d.ts.map +1 -0
  289. package/dist/esm/Compatibility/PrimeReact11PassThroughComponent.js +2 -0
  290. package/dist/esm/Compatibility/PrimeReact11PassThroughComponent.js.map +1 -0
  291. package/dist/esm/Compatibility/assertPrimeReact11PassThroughCompatibility.d.ts +3 -0
  292. package/dist/esm/Compatibility/assertPrimeReact11PassThroughCompatibility.d.ts.map +1 -0
  293. package/dist/esm/Compatibility/assertPrimeReact11PassThroughCompatibility.js +49 -0
  294. package/dist/esm/Compatibility/assertPrimeReact11PassThroughCompatibility.js.map +1 -0
  295. package/dist/esm/Compatibility/components3PrimeReact11PassThroughContract.d.ts +369 -0
  296. package/dist/esm/Compatibility/components3PrimeReact11PassThroughContract.d.ts.map +1 -0
  297. package/dist/esm/Compatibility/components3PrimeReact11PassThroughContract.js +271 -0
  298. package/dist/esm/Compatibility/components3PrimeReact11PassThroughContract.js.map +1 -0
  299. package/dist/esm/Compatibility/index.d.ts +5 -0
  300. package/dist/esm/Compatibility/index.d.ts.map +1 -0
  301. package/dist/esm/Compatibility/index.js +7 -0
  302. package/dist/esm/Compatibility/index.js.map +1 -0
  303. package/dist/esm/Compatibility/primeReact11PassThroughSentinelPreset.d.ts +8 -0
  304. package/dist/esm/Compatibility/primeReact11PassThroughSentinelPreset.d.ts.map +1 -0
  305. package/dist/esm/Compatibility/primeReact11PassThroughSentinelPreset.js +48 -0
  306. package/dist/esm/Compatibility/primeReact11PassThroughSentinelPreset.js.map +1 -0
  307. package/dist/esm/DataPage/DataPage.d.ts +4 -4
  308. package/dist/esm/DataPage/DataPage.d.ts.map +1 -1
  309. package/dist/esm/DataPage/DataPage.js +6 -10
  310. package/dist/esm/DataPage/DataPage.js.map +1 -1
  311. package/dist/esm/DataTables/Column.d.ts +3 -1
  312. package/dist/esm/DataTables/Column.d.ts.map +1 -1
  313. package/dist/esm/DataTables/Column.js.map +1 -1
  314. package/dist/esm/DataTables/ColumnFilterMenu.d.ts +22 -2
  315. package/dist/esm/DataTables/ColumnFilterMenu.d.ts.map +1 -1
  316. package/dist/esm/DataTables/ColumnFilterMenu.js +50 -13
  317. package/dist/esm/DataTables/ColumnFilterMenu.js.map +1 -1
  318. package/dist/esm/DataTables/DataTableCore.d.ts.map +1 -1
  319. package/dist/esm/DataTables/DataTableCore.js +22 -3
  320. package/dist/esm/DataTables/DataTableCore.js.map +1 -1
  321. package/dist/esm/DataTables/DataTableFilterMatcherRegistry.d.ts +14 -0
  322. package/dist/esm/DataTables/DataTableFilterMatcherRegistry.d.ts.map +1 -0
  323. package/dist/esm/DataTables/DataTableFilterMatcherRegistry.js +67 -0
  324. package/dist/esm/DataTables/DataTableFilterMatcherRegistry.js.map +1 -0
  325. package/dist/esm/DataTables/DataTableFilterMeta.d.ts +26 -1
  326. package/dist/esm/DataTables/DataTableFilterMeta.d.ts.map +1 -1
  327. package/dist/esm/DataTables/DataTableFilterMeta.js +24 -2
  328. package/dist/esm/DataTables/DataTableFilterMeta.js.map +1 -1
  329. package/dist/esm/DataTables/DataTableForObservableQuery.d.ts +3 -3
  330. package/dist/esm/DataTables/DataTableForObservableQuery.d.ts.map +1 -1
  331. package/dist/esm/DataTables/DataTableForObservableQuery.js +9 -3
  332. package/dist/esm/DataTables/DataTableForObservableQuery.js.map +1 -1
  333. package/dist/esm/DataTables/DataTableForQuery.d.ts +3 -3
  334. package/dist/esm/DataTables/DataTableForQuery.d.ts.map +1 -1
  335. package/dist/esm/DataTables/DataTableForQuery.js +8 -2
  336. package/dist/esm/DataTables/DataTableForQuery.js.map +1 -1
  337. package/dist/esm/DataTables/TablePaginator.d.ts +1 -1
  338. package/dist/esm/DataTables/TablePaginator.d.ts.map +1 -1
  339. package/dist/esm/DataTables/TablePaginator.js +13 -4
  340. package/dist/esm/DataTables/TablePaginator.js.map +1 -1
  341. package/dist/esm/DataTables/index.d.ts +1 -0
  342. package/dist/esm/DataTables/index.d.ts.map +1 -1
  343. package/dist/esm/DataTables/index.js +3 -1
  344. package/dist/esm/DataTables/index.js.map +1 -1
  345. package/dist/esm/Dialogs/Dialog.d.ts +2 -2
  346. package/dist/esm/Dialogs/Dialog.d.ts.map +1 -1
  347. package/dist/esm/Dialogs/Dialog.js +16 -18
  348. package/dist/esm/Dialogs/Dialog.js.map +1 -1
  349. package/dist/esm/Display/Message.d.ts +2 -1
  350. package/dist/esm/Display/Message.d.ts.map +1 -1
  351. package/dist/esm/Display/Message.js +14 -2
  352. package/dist/esm/Display/Message.js.map +1 -1
  353. package/dist/esm/Dropdown/Dropdown.d.ts +4 -2
  354. package/dist/esm/Dropdown/Dropdown.d.ts.map +1 -1
  355. package/dist/esm/Dropdown/Dropdown.js +17 -2
  356. package/dist/esm/Dropdown/Dropdown.js.map +1 -1
  357. package/dist/esm/Filter/FilterPanel.d.ts.map +1 -1
  358. package/dist/esm/Filter/FilterPanel.js +1 -1
  359. package/dist/esm/Filter/FilterPanel.js.map +1 -1
  360. package/dist/esm/Filter/RangeHistogramFilter.d.ts +4 -3
  361. package/dist/esm/Filter/RangeHistogramFilter.d.ts.map +1 -1
  362. package/dist/esm/Filter/RangeHistogramFilter.js +4 -23
  363. package/dist/esm/Filter/RangeHistogramFilter.js.map +1 -1
  364. package/dist/esm/Filter/index.d.ts +3 -2
  365. package/dist/esm/Filter/index.d.ts.map +1 -1
  366. package/dist/esm/Filter/index.js +1 -1
  367. package/dist/esm/Filter/types.d.ts +7 -1
  368. package/dist/esm/Filter/types.d.ts.map +1 -1
  369. package/dist/esm/Filter/utils.d.ts +5 -1
  370. package/dist/esm/Filter/utils.d.ts.map +1 -1
  371. package/dist/esm/Filter/utils.js +33 -1
  372. package/dist/esm/Filter/utils.js.map +1 -1
  373. package/dist/esm/Notifications/Toaster.d.ts +8 -1
  374. package/dist/esm/Notifications/Toaster.d.ts.map +1 -1
  375. package/dist/esm/Notifications/Toaster.js +16 -10
  376. package/dist/esm/Notifications/Toaster.js.map +1 -1
  377. package/dist/esm/Notifications/index.js +1 -1
  378. package/dist/esm/Notifications/toast.d.ts +52 -2
  379. package/dist/esm/Notifications/toast.d.ts.map +1 -1
  380. package/dist/esm/Notifications/toast.js +100 -2
  381. package/dist/esm/Notifications/toast.js.map +1 -1
  382. package/dist/esm/Notifications/toastCommandResult.js +2 -2
  383. package/dist/esm/Notifications/toastCommandResult.js.map +1 -1
  384. package/dist/esm/PatrickHand-latin-ext.woff2 +0 -0
  385. package/dist/esm/PatrickHand-latin.woff2 +0 -0
  386. package/dist/esm/PatrickHand-vietnamese.woff2 +0 -0
  387. package/dist/esm/Styled/CratisPreset.d.ts +2 -0
  388. package/dist/esm/Styled/CratisPreset.d.ts.map +1 -0
  389. package/dist/esm/Styled/CratisPreset.js +80 -0
  390. package/dist/esm/Styled/CratisPreset.js.map +1 -0
  391. package/dist/esm/Styled/index.d.ts +4 -0
  392. package/dist/esm/Styled/index.d.ts.map +1 -0
  393. package/dist/esm/Styled/index.js +4 -0
  394. package/dist/esm/Styled/index.js.map +1 -0
  395. package/dist/esm/Styled/primeReactStyles.d.ts +3 -0
  396. package/dist/esm/Styled/primeReactStyles.d.ts.map +1 -0
  397. package/dist/esm/Styled/primeReactStyles.js +202 -0
  398. package/dist/esm/Styled/primeReactStyles.js.map +1 -0
  399. package/dist/esm/Styled/styledMode.d.ts +12 -0
  400. package/dist/esm/Styled/styledMode.d.ts.map +1 -0
  401. package/dist/esm/Styled/styledMode.js +68 -0
  402. package/dist/esm/Styled/styledMode.js.map +1 -0
  403. package/dist/esm/index.d.ts +4 -1
  404. package/dist/esm/index.d.ts.map +1 -1
  405. package/dist/esm/index.js +42 -35
  406. package/dist/esm/index.js.map +1 -1
  407. package/dist/esm/primereact-v10-palette.css +242 -0
  408. package/dist/esm/styles.css +1287 -5
  409. package/dist/esm/theme.css +30 -4
  410. package/dist/esm/tokens.css +18 -11
  411. package/package.json +31 -7
package/README.md CHANGED
@@ -25,9 +25,9 @@ there is no `require()` entry.
25
25
  ## Installation
26
26
 
27
27
  ```bash
28
- npm install @cratis/components primereact @primereact/core @primereact/headless primeicons
28
+ npm install @cratis/components primereact @primereact/core @primereact/headless @primereact/hooks primeicons
29
29
  # or
30
- yarn add @cratis/components primereact @primereact/core @primereact/headless primeicons
30
+ yarn add @cratis/components primereact @primereact/core @primereact/headless @primereact/hooks primeicons
31
31
  ```
32
32
 
33
33
  **PrimeReact is a peer dependency** as of 3.0.0. You install it; the library uses
@@ -39,18 +39,18 @@ Nothing errors; overlays just stack wrongly and `pt` / `unstyled` silently fail
39
39
  apply. If your app carries a `resolutions` / `overrides` pin to collapse PrimeReact
40
40
  into one copy, you can now delete it.
41
41
 
42
- `primereact` pins `@primereact/core` and `@primereact/headless` to its own exact
42
+ `primereact` pins `@primereact/core`, `@primereact/headless` and `@primereact/hooks` to its own exact
43
43
  version, so one `primereact@11.x` install gives you matching copies of all three;
44
44
  declaring them is what makes a strict installer (pnpm, Yarn PnP) resolve them for the
45
45
  library too. `@primereact/types` is an **optional** peer — needed only if your own
46
46
  code imports the prop types the wrappers re-export.
47
47
 
48
48
  The other **peer dependencies** you provide are `react` / `react-dom` (**19+**), the
49
- `@cratis/arc*` packages (`>=20.3.1 <22` — Arc 20 and 21 both work), `reflect-metadata`
49
+ `@cratis/arc*` packages (`>=20.3.1 <23` — Arc 20, 21 and 22 work), `reflect-metadata`
50
50
  and `tsyringe`; you typically already have these in a Cratis app. `pixi.js`,
51
51
  `framer-motion`, `allotment` and `react-icons` remain regular dependencies and are
52
- installed for you. The styled `@primeuix/themes` presets are optional and only needed
53
- if you opt into a preset (see [Styling](#styling)).
52
+ installed for you. `@primereact/styles` and `@primeuix/themes` are **optional** peers,
53
+ needed only for PrimeReact's styled mode (see [Styling](#styling)).
54
54
 
55
55
  ### Stylesheets
56
56
 
@@ -58,9 +58,9 @@ Component CSS is no longer imported by the JavaScript — import it once in your
58
58
  entry point, in this order:
59
59
 
60
60
  ```ts
61
- import '@cratis/components/tokens'; // the --cratis-* token layer
62
- import '@cratis/components/styles'; // every component stylesheet, in one file
63
- import '@cratis/components/theme'; // optional — the Cratis baseline look (MIT CSS)
61
+ import '@cratis/components/tokens'; // the --cratis-* token layer
62
+ import '@cratis/components/styles'; // every component stylesheet, in one file
63
+ import '@cratis/components/theme'; // optional — the Cratis baseline look (MIT CSS)
64
64
  ```
65
65
 
66
66
  `./styles` also vendors `allotment/dist/style.css`, which `DataPage` needs for its
@@ -72,23 +72,24 @@ split view, so you do not have to import that yourself.
72
72
  was; PrimeReact 11 is part of PrimeTek's commercial **PrimeUI** family, and so are the
73
73
  packages it brings with it.
74
74
 
75
- | Package | v10 | v11 |
76
- |---|---|---|
77
- | `primereact` | MIT | PrimeUI commercial |
78
- | `primeicons` | MIT (7.x) | PrimeUI commercial (8.x) |
79
- | `@primereact/core`, `@primereact/headless` | — | PrimeUI commercial |
80
- | `@primeuix/themes`, `@primeuix/styled` | — | PrimeUI commercial |
75
+ | Package | v10 | v11 |
76
+ | ------------------------------------------------------------------------------------- | --------- | ------------------------ |
77
+ | `primereact` | MIT | PrimeUI commercial |
78
+ | `primeicons` | MIT (7.x) | PrimeUI commercial (8.x) |
79
+ | `@primereact/core`, `@primereact/headless`, `@primereact/hooks`, `@primereact/styles` | — | PrimeUI commercial |
80
+ | `@primeuix/themes`, `@primeuix/styled` | — | PrimeUI commercial |
81
81
 
82
82
  `@cratis/components` itself remains **MIT**. The change is in what it depends on, and it is
83
83
  yours to satisfy: PrimeReact is a peer dependency, so you install it and its license terms
84
- apply to you directly.
84
+ apply to you directly. `@primereact/styles` and `@primeuix/themes` — the two styled mode
85
+ adds — are PrimeUI-licensed too.
85
86
 
86
87
  ### A key is required regardless of how you style
87
88
 
88
89
  PrimeReact 11 verifies a license key when `PrimeReactProvider` mounts. The check is not
89
90
  conditional on `unstyled`, on whether a theme preset is applied, or on `NODE_ENV` — so
90
91
  every styling setup in [Styling](#styling) reaches it. Without a valid key you get a
91
- console warning and a fixed *"Invalid PrimeUI License"* banner, in development **and**
92
+ console warning and a fixed _"Invalid PrimeUI License"_ banner, in development **and**
92
93
  production.
93
94
 
94
95
  Supply your key through the provider:
@@ -105,7 +106,7 @@ PrimeReact 11, which needs a key.
105
106
 
106
107
  - **[Community License](https://primeui.dev/licenses/community)** — free. Covers
107
108
  individuals, students, non-profits and non-commercial open source outright. For an
108
- organization it requires *all* of: under $1M USD annual gross revenue, fewer than 5
109
+ organization it requires _all_ of: under $1M USD annual gross revenue, fewer than 5
109
110
  developers, fewer than 10 employees, and under $3M USD in outside funding. Supports up to
110
111
  4 developers and is renewed annually by confirming continued eligibility.
111
112
  - **[Commercial License](https://primeui.dev/licenses/commercial)** — for everyone else.
@@ -113,9 +114,9 @@ PrimeReact 11, which needs a key.
113
114
 
114
115
  ### If you redistribute
115
116
 
116
- PrimeReact 11's terms state: *"You may not … redistribute it as a component library or
117
+ PrimeReact 11's terms state: _"You may not … redistribute it as a component library or
117
118
  development tool … Redistributing the software so that third parties can develop with it
118
- requires a separate OEM License."*
119
+ requires a separate OEM License."_
119
120
 
120
121
  If you are building an application, that clause is not aimed at you. If you are publishing
121
122
  a library or tool that others build with, read it and check your position with PrimeTek.
@@ -161,20 +162,22 @@ Components:
161
162
  - `@cratis/components/Dialogs`
162
163
  - `@cratis/components/Display` — `Tag`, `Badge`, `Chip`, `Skeleton`, `Avatar`, `ProgressBar`
163
164
  - `@cratis/components/Dropdown`
164
- - `@cratis/components/Notifications` — `Toaster`, `toast`, `toastCommandResult`
165
+ - `@cratis/components/Notifications` — `Toaster`, Cratis-owned `toast` / `ToastDispatch`, `toastCommandResult`
165
166
  - `@cratis/components/ObjectContentEditor`
166
167
  - `@cratis/components/ObjectNavigationalBar`
167
168
  - `@cratis/components/PivotViewer`
168
169
  - `@cratis/components/SchemaEditor`
169
170
  - `@cratis/components/TimeMachine`
170
171
  - `@cratis/components/Toolbar`
172
+ - `@cratis/components/styled` — `styledMode`, `CratisPreset`, `primeReactStyles`, `primeReactCssLayer`, `primeReactCssLayerOrder`, `cratisDarkModeSelector`: PrimeReact's styled mode, wired for the provider (needs `@primereact/styles` + `@primeuix/themes`)
171
173
  - `@cratis/components/types`
172
174
 
173
175
  Stylesheets:
174
176
 
175
- - `@cratis/components/theme` — the **Cratis baseline theme** (light + dark, Cratis-authored MIT CSS, no `@primeuix/themes` dependency); import it and add `class="cratis-theme"` to skin every component from the token layer
177
+ - `@cratis/components/theme` — the **Cratis baseline theme** (light + dark, Cratis-authored MIT CSS, no `@primereact/styles` / `@primeuix/themes` dependency); import it and add `class="cratis-theme"` to skin every component from the token layer
176
178
  - `@cratis/components/styles` — **required**: every component stylesheet, the Tailwind utilities used inside the package, and the `allotment` rules `DataPage` needs, in one file
177
179
  - `@cratis/components/tokens` — **required**: the `--cratis-*` CSS variable tokens every component reads from
180
+ - `@cratis/components/primereact-v10-palette` — the PrimeReact 10 theme variables (`--surface-*`, `--text-color`, `--primary-color`, the color scales, …) restored with the lara-blue values, for CSS already written against them
178
181
 
179
182
  ## Styling
180
183
 
@@ -184,9 +187,9 @@ much control you want, and the other layers stay invisible.
184
187
 
185
188
  > **Tip — see each setup live:** every Storybook story includes a **Styling**
186
189
  > toolbar (paintbrush icon) that flips between the modes demonstrating the
187
- > setups below: *Aura Dark* and *Aura Light* (an `@primeuix/themes`
188
- > preset), *Cratis baseline theme* (light and dark), *Unstyled
189
- > (bare structure)*, and *Unstyled + Tailwind pt*. Open any story (`yarn dev`)
190
+ > setups below: _Aura Dark_ and _Aura Light_ (an `@primeuix/themes`
191
+ > preset), _Cratis baseline theme_ (light and dark), _Unstyled
192
+ > (bare structure)_, and _Unstyled + Tailwind pt_. Open any story (`yarn dev`)
190
193
  > and switch modes to see the same component under each setup.
191
194
 
192
195
  ### TL;DR — choose a styling setup
@@ -195,27 +198,34 @@ much control you want, and the other layers stay invisible.
195
198
  > The styling choice changes how it looks and whether you additionally pull in
196
199
  > `@primeuix/themes`; it does not change whether you need a key.
197
200
 
198
- | Setup | When | Effort | Extra dependency | What you write |
199
- |---|---|---|---|---|
200
- | **Cratis baseline theme** | You want a polished default look without adding a theme package. | Lowest | None | `unstyled` + `import '@cratis/components/theme'` + `class="cratis-theme"` |
201
- | **A styled `@primeuix/themes` preset** | You want a prebuilt design system to tweak from. | Low | `@primeuix/themes` | `value={{ theme: { preset } }}` on the provider |
202
- | **A custom palette over a preset** | You want the preset's structure but your own colors. | Low | `@primeuix/themes` | A preset + CSS variable overrides |
203
- | **Fully unstyled** | You're integrating into a tightly controlled design system. | Highest | None | `unstyled: true` + a `pt` preset in CSS or Tailwind |
201
+ | Setup | When | Effort | Extra dependency | What you write |
202
+ | --------------------------------- | ---------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------- |
203
+ | **Cratis baseline theme** | You want a polished default look without adding a theme package. | Lowest | None | `unstyled` + `import '@cratis/components/theme'` + `class="cratis-theme"` |
204
+ | **PrimeReact's styled mode** | You want PrimeReact's own look — a `@primeuix/themes` preset painting PrimeReact's component styles. | Low | `@primereact/styles` + `@primeuix/themes` | `value={{ license, ...styledMode() }}` with `styledMode` from `@cratis/components/styled` |
205
+ | **A custom palette over a theme** | You want the theme's structure but your own colors. | Low | As above, or none | `--cratis-*` overrides on the baseline theme, or `styledMode({ preset: definePreset(CratisPreset, …) })` |
206
+ | **Fully unstyled** | You're integrating into a tightly controlled design system. | Highest | None | `unstyled: true` + a `pt` preset in CSS or Tailwind |
204
207
 
205
208
  > **Why you need a theme, a baseline stylesheet, or a `pt` preset**
206
209
  >
207
- > PrimeReact 11 is **unstyled-first**: the primitives render structural markup
208
- > with no built-in visuals. A look comes from one of three sources — a
209
- > `@primeuix/themes` preset (token-based), the Cratis baseline
210
- > theme (`@cratis/components/theme`), or your own `pt`/CSS. Load
211
- > none of them and the components render as their raw HTML primitives.
210
+ > PrimeReact 11 is **unstyled-first**: the `primereact` package is primitives
211
+ > that render structural markup with `data-scope` / `data-part` attributes,
212
+ > no built-in visuals and **no `p-*` class names**. The class names and the
213
+ > CSS behind them live in `@primereact/styles`; PrimeReact's own styled
214
+ > components (`@primereact/ui`) are just the primitives with those styles
215
+ > preset, and this library builds on the primitives. So a look comes from one
216
+ > of three sources — PrimeReact's styled mode (`styledMode()`: a
217
+ > `@primeuix/themes` preset **plus** PrimeReact's component styles), the
218
+ > Cratis baseline theme (`@cratis/components/theme`), or your own `pt`/CSS.
219
+ > Load none of them and the components render as their raw HTML primitives.
220
+ > **A preset alone is not one of the three** — `theme: { preset }` by itself
221
+ > emits `--p-*` tokens but styles nothing rendered here.
212
222
  >
213
223
  > The `--cratis-*` token layer is an **additive Cratis-scoped tint** for
214
- > surfaces *our* wrappers own (validation error text, the FormElement addon,
224
+ > surfaces _our_ wrappers own (validation error text, the FormElement addon,
215
225
  > breadcrumb borders, etc.). It is not, by itself, enough to skin the
216
- > PrimeReact widgets — pair it with the baseline theme, a preset, or a `pt`
217
- > preset. Override the PrimeReact variables (or a preset's `--p-*` tokens) when
218
- > you want the whole UI in your palette.
226
+ > PrimeReact widgets — pair it with the baseline theme, styled mode, or a `pt`
227
+ > preset. Derive the preset (styled mode) or override the `--cratis-*` tokens
228
+ > (baseline theme) when you want the whole UI in your palette.
219
229
 
220
230
  All setups share the same one-line provider setup. You can change direction
221
231
  later because the same provider, tokens, and `pt` hooks stay available.
@@ -245,7 +255,7 @@ export const App = () => (
245
255
  required, not optional.
246
256
  - `CratisComponentsProvider` is a thin wrapper over `@primereact/core`'s
247
257
  `PrimeReactProvider` so Cratis has one place to layer in defaults (including
248
- the optional `value={{ theme: { preset } }}` styled layer). Drop in the raw
258
+ the optional `...styledMode()` styled layer). Drop in the raw
249
259
  `PrimeReactProvider` from `@primereact/core` if you'd rather.
250
260
 
251
261
  The setups below differ only in **what else** you load on top of this
@@ -253,66 +263,67 @@ provider setup.
253
263
 
254
264
  ---
255
265
 
256
- ### Use a styled preset
266
+ ### Use PrimeReact's styled mode
257
267
 
258
268
  PrimeReact 11 dropped the v10 `primereact/resources/themes/*/theme.css`
259
- stylesheets in favor of the token-based `@primeuix/themes` layer. Apply a
260
- preset by passing `value={{ theme: { preset } }}` to `CratisComponentsProvider` —
261
- no theme CSS import. PrimeReact's own widgets paint themselves from the preset, and the
262
- `--cratis-*` tokens cascade to the matching variables so Cratis-scoped surfaces
263
- follow along.
269
+ stylesheets. A theme is now handed to the provider at runtime, in two halves: a
270
+ `@primeuix/themes` **preset** (a token object `@primeuix/styled` turns into
271
+ `--p-*` custom properties) and PrimeReact's **component styles**
272
+ (`@primereact/styles` — the `p-*` class names and the CSS the tokens drive).
273
+ `styledMode()` from `@cratis/components/styled` returns both as
274
+ `{ theme, defaults }`; spread it into the provider `value` next to your
275
+ license key. The `defaults` are `primeReactStyles`, PrimeReact's component
276
+ styles keyed by primitive name, which the provider applies to **every**
277
+ primitive rendered under it — the ones this library renders and the ones your
278
+ app renders itself. That is what puts the `p-*` class names on the elements and
279
+ lets the preset paint them; the `--cratis-*` tokens follow the preset's `--p-*`
280
+ so Cratis-scoped surfaces stay in sync.
281
+
282
+ ```bash
283
+ npm install @primereact/styles @primeuix/themes # optional peers, styled mode only
284
+ ```
264
285
 
265
286
  ```tsx
266
- import Aura from '@primeuix/themes/aura'; // or lara / nora / material
267
287
  import 'primeicons/primeicons.css';
288
+ import '@cratis/components/tokens';
268
289
  import '@cratis/components/styles';
269
-
270
290
  import { CratisComponentsProvider } from '@cratis/components';
291
+ import { styledMode } from '@cratis/components/styled';
271
292
 
272
293
  export const App = () => (
273
- <CratisComponentsProvider value={{ theme: { preset: Aura } }}>
294
+ <CratisComponentsProvider value={{ license: 'YOUR-PRIMEUI-KEY', ...styledMode() }}>
274
295
  <YourApp />
275
296
  </CratisComponentsProvider>
276
297
  );
277
298
  ```
278
299
 
279
- Omit `theme` entirely to stay unstyled-first ship only structure plus the
280
- `--cratis-*` tokens and bring your own visuals (see the pass-through / `pt`
281
- options below).
282
-
283
- ### Use the Cratis baseline theme
284
-
285
- Want a polished default look **without adding `@primeuix/themes`**? Ship the
286
- components unstyled and import the Cratis baseline theme Cratis-authored MIT
287
- CSS that styles every component from the `--cratis-*` layer. (You still need a
288
- PrimeUI key to run PrimeReact itself — see [Licensing](#licensing).)
289
-
290
- ```tsx
291
- import 'primeicons/primeicons.css';
292
- import '@cratis/components/theme'; // the baseline theme
293
-
294
- export const App = () => (
295
- <CratisComponentsProvider value={{ unstyled: true }}>
296
- <div className="cratis-theme"> {/* scope: put on <body>, app root, or a subtree */}
297
- <YourApp />
298
- </div>
299
- </CratisComponentsProvider>
300
- );
301
- ```
302
-
303
- Add `cratis-dark` to an ancestor for the dark palette. The theme defers to a
304
- `@primeuix/themes` preset's `--p-*` tokens when one is present, so you can layer
305
- it under a preset too, and every rule is overridable via your own CSS or `pt`.
300
+ The default preset is `CratisPreset` Lara with the blue primary and gray
301
+ surfaces of PrimeReact 10's `lara-light-blue` / `lara-dark-blue`, with the dark
302
+ surface scale one step lighter so content sits above the page as it did there,
303
+ both color schemes.
304
+ Options: `preset` (any `@primeuix/themes` preset — Aura, Lara, Nora, Material —
305
+ or a `definePreset` result), `darkModeSelector` (default `.cratis-dark`, the
306
+ class the baseline theme uses too; `'system'` follows `prefers-color-scheme`),
307
+ `cssLayer` (default the `primereact` layer ordered between Tailwind's `base`
308
+ and `components`; `false` emits the theme unlayered).
309
+
310
+ > **A preset alone styles nothing.** `value={{ theme: { preset } }}` without the
311
+ > `defaults` emits the `--p-*` tokens, but the primitives keep rendering with no
312
+ > `p-*` class, so nothing rendered by this library is painted. Use
313
+ > `styledMode()`.
306
314
 
307
315
  #### Override a single component with CSS
308
316
 
309
- Plain CSS works fine on top of the theme. Target either PrimeReact's class
310
- names or your own `className`:
317
+ Plain CSS works fine on top of the theme. In styled mode PrimeReact's elements
318
+ carry their `p-*` class names, and the theme is emitted into the `primereact`
319
+ cascade layer, so a plain unlayered rule in your own stylesheet wins — exactly
320
+ as it did against PrimeReact 10's `@layer primereact` stylesheets. Or target
321
+ your own `className`:
311
322
 
312
323
  ```css
313
324
  /* yourApp.css */
314
325
  .p-button {
315
- border-radius: 999px; /* pill buttons everywhere */
326
+ border-radius: 999px; /* pill buttons everywhere */
316
327
  }
317
328
 
318
329
  .dangerous-button {
@@ -322,7 +333,7 @@ names or your own `className`:
322
333
  ```
323
334
 
324
335
  ```tsx
325
- <Button label="Delete" className="dangerous-button" />
336
+ <Button className='dangerous-button'>Delete</Button>
326
337
  ```
327
338
 
328
339
  #### Override a single component with Tailwind
@@ -338,78 +349,136 @@ Pass Tailwind utility classes through the wrapper's `className` prop:
338
349
  </Dialog>
339
350
  ```
340
351
 
341
- **Use this setup when:** you're prototyping, building internal tools, or are
342
- happy with one of the prebuilt PrimeReact themes.
352
+ **Use this setup when:** you're prototyping, building internal tools, want the
353
+ look Cratis apps had on PrimeReact 10, or are happy with one of the prebuilt
354
+ PrimeReact design systems.
355
+
356
+ ### Use the Cratis baseline theme
357
+
358
+ Want a polished default look **without adding `@primereact/styles` and
359
+ `@primeuix/themes`**? Ship the components unstyled and import the Cratis baseline
360
+ theme — Cratis-authored MIT CSS that styles every component from the `--cratis-*`
361
+ layer. (You still need a PrimeUI key to run PrimeReact itself — see
362
+ [Licensing](#licensing).)
363
+
364
+ ```tsx
365
+ import 'primeicons/primeicons.css';
366
+ import '@cratis/components/theme'; // the baseline theme
367
+
368
+ export const App = () => (
369
+ <CratisComponentsProvider value={{ unstyled: true }}>
370
+ <div className='cratis-theme'>
371
+ {' '}
372
+ {/* scope: put on <body>, app root, or a subtree */}
373
+ <YourApp />
374
+ </div>
375
+ </CratisComponentsProvider>
376
+ );
377
+ ```
378
+
379
+ Add `cratis-dark` to an ancestor for the dark palette. The theme defers to a
380
+ `@primeuix/themes` preset's `--p-*` tokens when one is present, so you can layer
381
+ it under styled mode too, and every rule is overridable via your own CSS or `pt`.
382
+ The baseline theme styles the unstyled primitives through their `[data-scope]`
383
+ attributes — there are no `p-*` class names outside styled mode — so target
384
+ those, or your own `className`, or the `--cratis-*` tokens:
385
+
386
+ ```css
387
+ .cratis-theme [data-scope='button'] {
388
+ border-radius: 999px;
389
+ } /* pill buttons */
390
+ .dangerous {
391
+ background: var(--cratis-red-500);
392
+ color: white;
393
+ }
394
+ ```
343
395
 
344
396
  ---
345
397
 
346
398
  ### Use a custom palette on top of a PrimeReact theme
347
399
 
348
- Keep a PrimeReact theme as your **structural baseline** (so every widget gets
349
- its padding, dialog frame, button shape, focus ring, etc.) and override the
350
- PrimeReact CSS variables on `:root` to repaint the whole UI in your own
351
- colors. The `--cratis-*` tokens follow along through tokens.css's cascade, so
352
- Cratis-scoped surfaces stay in sync — and you can override the Cratis tokens
353
- independently if you want Cratis surfaces to differ from PrimeReact widgets.
400
+ Keep a theme as your **structural baseline** (so every widget gets its
401
+ padding, dialog frame, button shape, focus ring, etc.) and repaint it with your
402
+ own colors. Which knob you turn depends on the theme:
354
403
 
355
- #### With plain CSS
404
+ - **Cratis baseline theme** — override the `--cratis-*` tokens in CSS; the
405
+ theme paints the widgets from them, so one override repaints widgets and
406
+ Cratis-scoped surfaces alike.
407
+ - **PrimeReact's styled mode** — derive your own preset with `definePreset` and
408
+ hand it to `styledMode({ preset })`; the widgets read the preset's `--p-*`
409
+ tokens, and the `--cratis-*` tokens follow.
410
+
411
+ #### Baseline theme, plain CSS
356
412
 
357
413
  ```css
358
- /* palette.override.css — imported once, after @cratis/components/styles */
359
- :root {
360
- /* PrimeReact variables — these are what PrimeReact widgets read. */
361
- --surface-0: #1e293b;
362
- --surface-100: #1e293b;
363
- --surface-ground: #020617;
364
- --surface-section: #0f172a;
365
- --surface-card: #1e293b;
366
- --surface-overlay: #1e293b;
367
- --surface-hover: #334155;
368
- --surface-border: #334155;
369
-
370
- --text-color: #f8fafc;
371
- --text-color-secondary: #94a3b8;
372
-
373
- --primary-color: #38bdf8;
374
- --primary-color-text: #0b1220;
375
-
376
- --highlight-bg: #1e40af;
377
- --highlight-text-color: #ffffff;
378
-
379
- --border-radius: 10px;
380
-
381
- /* --cratis-* tokens default to var(--surface-*) etc. via tokens.css, so
382
- the overrides above flow through automatically. Set these explicitly
383
- only if you want Cratis-scoped surfaces tinted differently. */
384
- --cratis-red-500: #ef4444;
385
- --cratis-green-500: #22c55e;
414
+ /* palette.override.css — imported once, after @cratis/components/theme */
415
+ .cratis-theme {
416
+ --cratis-surface-section: #0f172a;
417
+ --cratis-surface-card: #1e293b;
418
+ --cratis-surface-overlay: #1e293b;
419
+ --cratis-surface-hover: #334155;
420
+ --cratis-surface-border: #334155;
421
+
422
+ --cratis-text-color: #f8fafc;
423
+ --cratis-text-color-secondary: #94a3b8;
424
+
425
+ --cratis-primary-color: #38bdf8;
426
+ --cratis-primary-color-text: #0b1220;
427
+
428
+ --cratis-highlight-bg: #1e40af;
429
+ --cratis-highlight-text-color: #ffffff;
430
+
431
+ --cratis-border-radius: 10px;
386
432
  }
387
433
  ```
388
434
 
435
+ #### Styled mode, `definePreset`
436
+
437
+ ```ts
438
+ // brand-preset.ts
439
+ import { definePreset } from '@primeuix/themes';
440
+ import { CratisPreset } from '@cratis/components/styled';
441
+
442
+ export const BrandPreset = definePreset(CratisPreset, {
443
+ semantic: {
444
+ primary: {
445
+ 50: '{sky.50}',
446
+ 100: '{sky.100}',
447
+ 200: '{sky.200}',
448
+ 300: '{sky.300}',
449
+ 400: '{sky.400}',
450
+ 500: '{sky.500}',
451
+ 600: '{sky.600}',
452
+ 700: '{sky.700}',
453
+ 800: '{sky.800}',
454
+ 900: '{sky.900}',
455
+ 950: '{sky.950}',
456
+ },
457
+ },
458
+ });
459
+ ```
460
+
389
461
  ```tsx
390
- // 1. A styled preset provides the structure (apply it via the provider — see above).
391
- import 'primeicons/primeicons.css';
392
- import '@cratis/components/styles';
393
- // 2. Your palette overrides — must come after the styles so they win.
394
- import './palette.override.css';
462
+ <CratisComponentsProvider value={{ license, ...styledMode({ preset: BrandPreset }) }}>
395
463
  ```
396
464
 
397
465
  #### Scoped (dark-on-light, light-on-dark, etc.)
398
466
 
399
- PrimeReact variables cascade like any other CSS variable, so an ancestor
400
- scope works:
467
+ `--cratis-*` tokens cascade like any other CSS variable, so an ancestor scope
468
+ works under the baseline theme (in styled mode, region-scoped widget colors come
469
+ from the preset; the `--cratis-*` overrides still retint Cratis-scoped surfaces):
401
470
 
402
471
  ```css
403
472
  .dark-zone {
404
- --surface-card: #0b1220;
405
- --text-color: #f8fafc;
406
- --primary-color: #60a5fa;
473
+ --cratis-surface-card: #0b1220;
474
+ --cratis-text-color: #f8fafc;
475
+ --cratis-primary-color: #60a5fa;
407
476
  }
408
477
  ```
409
478
 
410
479
  ```tsx
411
- <div className="dark-zone">
412
- <Dialog title="Always dark">…</Dialog>
480
+ <div className='dark-zone'>
481
+ <Dialog title='Always dark'>…</Dialog>
413
482
  </div>
414
483
  ```
415
484
 
@@ -420,53 +489,71 @@ Tailwind handles cascade and dark mode:
420
489
 
421
490
  ```css
422
491
  /* app.css */
423
- @import "tailwindcss";
424
- @import "@cratis/components/styles";
492
+ @import 'tailwindcss';
493
+ @import '@cratis/components/tokens';
494
+ @import '@cratis/components/styles';
425
495
 
426
496
  @layer base {
427
497
  :root {
428
- --surface-card: theme('colors.slate.800');
429
- --surface-border: theme('colors.slate.700');
430
- --text-color: theme('colors.slate.50');
431
- --primary-color: theme('colors.sky.400');
498
+ --cratis-surface-card: theme('colors.slate.800');
499
+ --cratis-surface-border: theme('colors.slate.700');
500
+ --cratis-text-color: theme('colors.slate.50');
501
+ --cratis-primary-color: theme('colors.sky.400');
432
502
  --cratis-red-500: theme('colors.red.500');
433
503
  }
434
504
 
435
- .dark {
436
- --surface-card: theme('colors.slate.900');
437
- --text-color: theme('colors.slate.100');
505
+ .cratis-dark {
506
+ --cratis-surface-card: theme('colors.slate.900');
507
+ --cratis-text-color: theme('colors.slate.100');
438
508
  }
439
509
  }
440
510
  ```
441
511
 
512
+ #### CSS written against PrimeReact 10's variables
513
+
514
+ If your stylesheets still use the names a v10 theme published on `:root` —
515
+ `--surface-ground`, `--surface-card`, `--surface-border`, `--text-color`,
516
+ `--primary-color`, the `--surface-0…900` and color scales — import
517
+ `@cratis/components/primereact-v10-palette` after `tokens` and `styles`. It
518
+ restores every one of them with the `lara-light-blue` / `lara-dark-blue`
519
+ values: the semantic names follow the active preset's `--p-*` tokens where
520
+ v11 has an equivalent (Lara as the fallback), the numbered scales are the
521
+ lara-blue values verbatim (the v10 dark surface scale was inverted, so
522
+ `--p-surface-*` cannot stand in for it), and light/dark switch through
523
+ `light-dark()` keyed off `.cratis-dark`. It exists so what is already written
524
+ keeps working — write nothing new against those names; use `--cratis-*` (or
525
+ `--p-*`).
526
+
442
527
  #### What `--cratis-*` tokens are for
443
528
 
444
- PrimeReact widgets read PrimeReact's own variables (`--surface-card`,
445
- `--text-color`, `--primary-color`, …) directly. Cratis wrappers add some
446
- surfaces of their own (inline validation error text, the FormElement addon
447
- background, the breadcrumb bottom border, etc.) — those use a parallel set
448
- of `--cratis-*` tokens that default to the PrimeReact value via the cascade
449
- defined in `tokens.css`.
529
+ In styled mode PrimeReact widgets read the preset's `--p-*` design tokens
530
+ directly. Cratis wrappers add some surfaces of their own (inline validation
531
+ error text, the FormElement addon background, the breadcrumb bottom border,
532
+ etc.) — those use a parallel set of `--cratis-*` tokens that resolve the v11
533
+ token first and fall back to the v10 variable, via the cascade defined in
534
+ `tokens.css`. Under the baseline theme the widgets read the `--cratis-*` tokens
535
+ too.
450
536
 
451
537
  The upshot:
452
538
 
453
- - Override **PrimeReact variables** to repaint the whole UI (PrimeReact widgets + Cratis surfaces).
454
- - Override **`--cratis-*` tokens** when you specifically want Cratis surfaces to differ from PrimeReact widgets.
539
+ - Repaint the whole UI by deriving the **preset** (styled mode) or overriding the **`--cratis-*` tokens** (baseline theme).
540
+ - Override **`--cratis-*` tokens** in styled mode when you specifically want Cratis surfaces to differ from PrimeReact widgets.
455
541
 
456
542
  #### `--cratis-*` token reference (Cratis-scoped surfaces)
457
543
 
458
- | Group | Tokens |
459
- |---|---|
460
- | Surfaces | `--cratis-surface-0`, `--cratis-surface-100`, `--cratis-surface-ground`, `--cratis-surface-section`, `--cratis-surface-card`, `--cratis-surface-overlay`, `--cratis-surface-hover`, `--cratis-surface-border` |
461
- | Text | `--cratis-text-color`, `--cratis-text-color-secondary` |
462
- | Brand | `--cratis-primary-color`, `--cratis-primary-color-text`, `--cratis-primary-300`, `--cratis-primary-400`, `--cratis-primary-500`, `--cratis-primary-600` |
463
- | Selection | `--cratis-highlight-bg`, `--cratis-highlight-text-color` |
464
- | Semantic | `--cratis-green-500`, `--cratis-orange-500`, `--cratis-red-500` |
465
- | Geometry | `--cratis-border-radius` |
466
- | Effects | `--cratis-focus-ring`, `--cratis-maskbg` |
544
+ | Group | Tokens |
545
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
546
+ | Surfaces | `--cratis-surface-0`, `--cratis-surface-100`, `--cratis-surface-ground`, `--cratis-surface-section`, `--cratis-surface-card`, `--cratis-surface-overlay`, `--cratis-surface-hover`, `--cratis-surface-border` |
547
+ | Text | `--cratis-text-color`, `--cratis-text-color-secondary` |
548
+ | Brand | `--cratis-primary-color`, `--cratis-primary-color-text`, `--cratis-primary-300`, `--cratis-primary-400`, `--cratis-primary-500`, `--cratis-primary-600` |
549
+ | Selection | `--cratis-highlight-bg`, `--cratis-highlight-text-color` |
550
+ | Semantic | `--cratis-green-500`, `--cratis-orange-500`, `--cratis-red-500` |
551
+ | Geometry | `--cratis-border-radius` |
552
+ | Effects | `--cratis-focus-ring`, `--cratis-maskbg` |
467
553
 
468
- Each defaults to the PrimeReact variable with the same name minus the
469
- `--cratis-` prefix (e.g. `--cratis-surface-card` → `var(--surface-card)`).
554
+ Each resolves the v11 design token first and falls back to the v10 variable
555
+ with the same name minus the `--cratis-` prefix (e.g. `--cratis-surface-card`
556
+ → `var(--p-content-background, var(--surface-card))`).
470
557
 
471
558
  **Use this setup when:** you want a custom look without writing a PrimeReact
472
559
  theme from scratch, you're shipping multiple palette variants (light/dark/
@@ -482,7 +569,7 @@ through PrimeReact's `pt` (pass-through) mechanism, your own CSS, or both.
482
569
  Components render structurally only and become a blank canvas.
483
570
 
484
571
  ```tsx
485
- import '@cratis/components/styles'; // component rules + Tailwind utilities, still needed when unstyled
572
+ import '@cratis/components/styles'; // component rules + Tailwind utilities, still needed when unstyled
486
573
  import { CratisComponentsProvider } from '@cratis/components';
487
574
 
488
575
  export const App = () => (
@@ -492,6 +579,12 @@ export const App = () => (
492
579
  );
493
580
  ```
494
581
 
582
+ #### Verify pass-through compatibility
583
+
584
+ Components 3 publishes its PrimeReact 11 slot and rendered-marker contract from `@cratis/components/compatibility`. In a DOM test, apply `primeReact11PassThroughSentinelPreset`, render the surfaces your application uses, and call `assertPrimeReact11PassThroughCompatibility(root, components)`. Additions pass; a missing or renamed contracted slot or marker produces an actionable error. The contract is major-version scoped and does not preserve PrimeReact 10 names.
585
+
586
+ The machine-readable `components3PrimeReact11PassThroughContract` is the source of truth. Contract revision 1 covers the parts rendered by Components 3's supported compositions on PrimeReact 11, rather than every optional part an application could compose directly. See the [pass-through contract documentation](https://cratis.io/Components/styling/pass-through.html) for the supported component and slot list.
587
+
495
588
  #### A `pt` preset in plain CSS
496
589
 
497
590
  Attach a `className` from your own stylesheet via a global preset:
@@ -503,9 +596,11 @@ export const globalPt = {
503
596
  root: { className: 'my-btn' },
504
597
  },
505
598
  dialog: {
506
- root: { className: 'my-dialog' },
507
- header: { className: 'my-dialog__header' },
508
- content: { className: 'my-dialog__body' },
599
+ root: {
600
+ popup: { className: 'my-dialog' },
601
+ header: { className: 'my-dialog__header' },
602
+ content: { className: 'my-dialog__body' },
603
+ },
509
604
  },
510
605
  inputtext: {
511
606
  root: { className: 'my-input' },
@@ -542,15 +637,26 @@ Same shape, Tailwind utilities as the class strings:
542
637
  // pt-preset.ts
543
638
  export const globalPt = {
544
639
  button: {
545
- root: { className: 'inline-flex items-center px-4 py-2 rounded-lg bg-sky-700 text-white hover:bg-sky-600 disabled:opacity-50' },
640
+ root: {
641
+ className:
642
+ 'inline-flex items-center px-4 py-2 rounded-lg bg-sky-700 text-white hover:bg-sky-600 disabled:opacity-50',
643
+ },
546
644
  },
547
645
  dialog: {
548
- root: { className: 'rounded-2xl shadow-2xl overflow-hidden' },
549
- header: { className: 'px-5 py-3 bg-slate-800 text-slate-50 font-semibold border-b border-slate-700' },
550
- content: { className: 'p-5 bg-slate-900 text-slate-100' },
646
+ root: {
647
+ popup: { className: 'rounded-2xl shadow-2xl overflow-hidden' },
648
+ header: {
649
+ className:
650
+ 'px-5 py-3 bg-slate-800 text-slate-50 font-semibold border-b border-slate-700',
651
+ },
652
+ content: { className: 'p-5 bg-slate-900 text-slate-100' },
653
+ },
551
654
  },
552
655
  inputtext: {
553
- root: { className: 'w-full px-3 py-2 rounded-md bg-slate-800 text-slate-50 border border-slate-700 focus:border-sky-400 focus:outline-none' },
656
+ root: {
657
+ className:
658
+ 'w-full px-3 py-2 rounded-md bg-slate-800 text-slate-50 border border-slate-700 focus:border-sky-400 focus:outline-none',
659
+ },
554
660
  },
555
661
  } as const;
556
662
  ```
@@ -611,23 +717,31 @@ The styling options compose, so you don't have to choose one for the whole app:
611
717
 
612
718
  - **Themed with one unstyled component** — keep the PrimeReact theme and pass
613
719
  `unstyled` per-component to opt that one widget out:
614
- ```tsx
615
- <Dialog title="Custom" unstyled pt={brandDialogPt}>…</Dialog>
616
- ```
617
- - **Unstyled with one themed island** — wrap a subtree in a second
618
- `CratisComponentsProvider` that restores defaults:
619
- ```tsx
620
- <CratisComponentsProvider value={{ unstyled: true, pt: globalPt }}>
621
- <App />
622
- <CratisComponentsProvider value={{ unstyled: false }}>
623
- <PrimeReactThemedSubtree />
624
- </CratisComponentsProvider>
625
- </CratisComponentsProvider>
626
- ```
627
- - **Dark mode** — scope the palette overrides to `.dark` (override
628
- `--surface-card`, `--text-color`, `--primary-color`, etc., plus any
629
- `--cratis-*` tokens you want to diverge) and toggle the class on the root
630
- element. PrimeReact widgets and Cratis surfaces both follow the cascade.
720
+
721
+ ```tsx
722
+ <Dialog title='Custom' unstyled pt={brandDialogPt}>
723
+
724
+ </Dialog>
725
+ ```
726
+
727
+ - **Unstyled with one themed island** — the baseline theme's rules are scoped
728
+ under `.cratis-theme`, so wrapping one element in the class themes just that
729
+ subtree:
730
+
731
+ ```tsx
732
+ <CratisComponentsProvider value={{ unstyled: true, pt: globalPt }}>
733
+ <App />
734
+ <div className='cratis-theme'>
735
+ <BaselineThemedSubtree />
736
+ </div>
737
+ </CratisComponentsProvider>
738
+ ```
739
+
740
+ - **Dark mode** — toggle `cratis-dark` on the root element: the baseline
741
+ theme's dark palette, `styledMode()`'s dark scheme (its default
742
+ `darkModeSelector`) and the v10 palette all key off it, so PrimeReact widgets
743
+ and Cratis surfaces follow together. Scope any `--cratis-*` tokens you want
744
+ to diverge to `.cratis-dark` as well.
631
745
 
632
746
  ### Per-component `pt` cheat sheet
633
747
 
@@ -638,21 +752,32 @@ Three patterns, depending on how much PrimeReact a wrapper composes:
638
752
  `className` straight to their inner PrimeReact component.
639
753
  2. **Multi-slot composites** — `StepperCommandDialog` (`pt` for Stepper,
640
754
  `dialogPt` for Dialog), `DataPage` (`tablePt` for DataTable, `menubarPt`
641
- for Menubar), and `DataTableForQuery` / `DataTableForObservableQuery`
642
- (`pt` for DataTable, `paginatorPt` for Paginator) — each slot has
643
- `*PtOptions`, `*Unstyled`, and (where applicable) `*ClassName` siblings.
755
+ for the action toolbar's buttons), and `DataTableForQuery` /
756
+ `DataTableForObservableQuery` (`pt` for DataTable plus
757
+ `paginatorClassName` / `paginatorAriaLabels` for the Cratis paginator).
644
758
  3. **Large composites** — `ObjectContentEditor`, `ObjectNavigationalBar`,
645
759
  `SchemaEditor` expose `className` only; restyle internals via the global
646
760
  `pt` preset.
647
761
 
648
- ### What is *not* fully pass-through
762
+ `Dropdown` routes `id`, `tabIndex`, `aria-label`, `aria-labelledby` and `aria-describedby` to its focusable `role="combobox"` trigger. The outer Select root remains a layout wrapper and does not duplicate the control id. For filterable dropdowns, `filterPlaceholder` can differ from the closed trigger's `placeholder` and defaults to it when omitted.
649
763
 
650
- A small number of internal usages opt into PrimeReact's slot-rendering by
651
- name (for example, a custom Menubar item template uses `p-menuitem-link` /
652
- `p-menuitem-text` to match the surrounding default-rendered items). These are
653
- correct contracts with PrimeReact's own slot rendering, not hard-coded
654
- theming — they have no effect in `unstyled` mode and match the rest of the
655
- menu in themed mode.
764
+ Filtered data-table columns accept partial `filterLabels` overrides for trigger, action and boolean-option text, plus a `filterElement` render callback that replaces the built-in value editor while keeping draft/apply behavior. `DataTableFilterMatchMode` supplies the Cratis-owned built-in vocabulary, and `registerDataTableFilterMatcher()` adds custom modes without importing the active rendering adapter.
765
+
766
+ `DatePickerInput` exposes `id`, `disabled`, `readOnly` and `showButtonBar` directly. Use its runtime `input` slot only for additional attributes; the public type intentionally rejects PrimeReact 11's stale `pcInputText` declaration, which the runtime never emits. The wrapper translates `invalid` to accepted `aria-invalid` and `data-invalid` input attributes instead of forwarding a rejected `invalid` DOM attribute:
767
+
768
+ ```tsx
769
+ <DatePickerInput
770
+ id='appointment-date'
771
+ value={selectedDate}
772
+ onChange={setSelectedDate}
773
+ disabled={isDisabled}
774
+ readOnly={isReadOnly}
775
+ showButtonBar
776
+ pt={{ input: { 'aria-label': 'Appointment date' } }}
777
+ />
778
+ ```
779
+
780
+ ### What is _not_ fully pass-through
656
781
 
657
782
  `BusyIndicatorDialog` only honors the global `pt` set via
658
783
  `CratisComponentsProvider`; it does not accept per-instance `pt` because its
@@ -674,9 +799,9 @@ If using TypeScript 4.7+, try updating your `tsconfig.json`:
674
799
 
675
800
  ```json
676
801
  {
677
- "compilerOptions": {
678
- "moduleResolution": "bundler" // or "node16" / "nodenext"
679
- }
802
+ "compilerOptions": {
803
+ "moduleResolution": "bundler" // or "node16" / "nodenext"
804
+ }
680
805
  }
681
806
  ```
682
807