@pega/sdk 0.0.5 → 0.0.7

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 (269) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +828 -165
  3. package/package.json +1 -1
  4. package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
  5. package/templates/react-native-sdk-reference/.prettierignore +17 -0
  6. package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
  7. package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
  8. package/templates/react-native-sdk-reference/AGENTS.md +3 -0
  9. package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
  10. package/templates/react-native-sdk-reference/README.md +56 -0
  11. package/templates/react-native-sdk-reference/app.json +40 -5
  12. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
  15. package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
  16. package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
  17. package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
  18. package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
  19. package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
  20. package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
  21. package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
  22. package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
  23. package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
  24. package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
  25. package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
  26. package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
  27. package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
  28. package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
  29. package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
  30. package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
  31. package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
  32. package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
  33. package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
  34. package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
  35. package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
  36. package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
  37. package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
  38. package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
  39. package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
  40. package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
  41. package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
  42. package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
  43. package/templates/react-native-sdk-reference/package.json +59 -14
  44. package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
  45. package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  46. package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
  47. package/templates/react-native-sdk-reference/sdk-config.json +31 -9
  48. package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
  49. package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
  50. package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
  51. package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
  52. package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
  53. package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
  54. package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
  55. package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
  56. package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
  57. package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
  58. package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
  59. package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
  60. package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
  61. package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
  62. package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
  63. package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
  64. package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
  65. package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
  66. package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
  67. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
  68. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
  69. package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
  70. package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
  71. package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
  72. package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
  73. package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
  74. package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
  75. package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
  76. package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
  77. package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
  78. package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
  79. package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
  80. package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
  81. package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
  82. package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
  83. package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
  84. package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
  85. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
  86. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
  87. package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
  88. package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
  89. package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
  90. package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
  91. package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
  92. package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
  93. package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
  94. package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
  95. package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
  96. package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
  97. package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
  98. package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
  99. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
  100. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
  101. package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
  102. package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
  103. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
  104. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
  105. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
  106. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
  107. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
  108. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
  109. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
  110. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
  111. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
  112. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
  113. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
  114. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
  115. package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
  116. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
  117. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
  118. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
  119. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
  120. package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
  121. package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
  122. package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
  123. package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
  124. package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
  125. package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
  126. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
  127. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
  128. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
  129. package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
  130. package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
  131. package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
  132. package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
  133. package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
  134. package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
  135. package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
  136. package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
  137. package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
  138. package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
  139. package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
  140. package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
  141. package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
  142. package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
  143. package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
  144. package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
  145. package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
  146. package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
  147. package/templates/react-native-sdk-reference/tsconfig.json +9 -8
  148. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
  149. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
  150. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
  151. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
  152. package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
  153. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
  154. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
  155. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
  156. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
  157. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
  158. package/templates/react-sdk-reference/.ai-common/mcp/claude-code.mcp.json +8 -0
  159. package/templates/react-sdk-reference/.ai-common/mcp/copilot.mcp.json +8 -0
  160. package/templates/react-sdk-reference/.ai-common/mcp/cursor.mcp.json +11 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  162. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  163. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  167. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  168. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  169. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  179. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  180. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  181. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  184. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  185. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  186. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  211. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  212. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  213. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  216. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  217. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  218. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  248. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  249. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  250. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  257. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  258. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  259. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  260. package/templates/react-sdk-reference/package.json +1 -1
  261. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  262. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  263. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  264. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  265. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  266. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  267. package/templates/react-native-sdk-reference/App.tsx +0 -49
  268. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  269. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Checkbox field supporting single boolean toggle, multi-selection mode, and optional card-style variant.
4
4
 
5
- > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, props interface, display modes, event handling, and registration patterns common to ALL field components.
5
+ > **Prerequisite skill:** [`field-components.md`](../field-components.md) — covers architecture, input contract, display modes, event handling, and registration patterns common to ALL field components.
6
6
 
7
7
  ---
8
8
 
@@ -14,17 +14,15 @@ Renders one or more checkboxes. Supports three usage modes: (1) a single boolean
14
14
 
15
15
  - **Pega Name:** `Checkbox`
16
16
  - **Type / Subtype:** `Field` / `Boolean`
17
- - **Registration key:** `Checkbox` (mapped to `CheckboxComponent` import in `component-map.ts`)
17
+ - **Registration key:** `Checkbox` (in the project's component map)
18
18
 
19
- ## Props (component-specific)
19
+ > **Important naming note:** The component's export name should avoid conflicts with the design system's checkbox widget (e.g., use `CheckboxComponent` as the export name). Register it under the key `Checkbox` in the project's component map.
20
20
 
21
- > Note: `Checkbox` uses `Omit<PConnFieldProps, 'value'>` with its own `value?: boolean`. Import type as:
22
- >
23
- > ```typescript
24
- > import type { PConnFieldProps } from '@pega/sdk-react';
25
- > ```
21
+ ## Inputs (component-specific)
26
22
 
27
- | Prop | Type | Description |
23
+ > Note: The Checkbox input contract overrides `value` to be a boolean (not a string), while inheriting all other fields from the project's field input contract.
24
+
25
+ | Name | Type | Description |
28
26
  | ---------------------- | -------------------- | -------------------------------------------------------------------- |
29
27
  | `value` | `boolean` (optional) | Checked state for single-mode checkbox |
30
28
  | `caption` | `string` (optional) | Label shown next to the single checkbox (not the group label) |
@@ -39,130 +37,36 @@ Renders one or more checkboxes. Supports three usage modes: (1) a single boolean
39
37
  | `referenceList` | `string` | Reference list property path |
40
38
  | `variant` | `string` (optional) | `'card'` — renders options as selectable card grid |
41
39
  | `hideFieldLabels` | `boolean` | Hide field labels inside card variant |
42
- | `additionalProps` | `any` | Extra props passed to card or checkbox |
40
+ | `additionalProps` | `any` | Extra inputs passed to card or checkbox |
43
41
  | `imagePosition` | `string` | Card image position |
44
42
  | `imageSize` | `string` | Card image size |
45
43
  | `showImageDescription` | `string` | Whether to show image description |
46
- | `renderMode` | `string` | `'ReadOnly'` — sets read-only mode alongside `readOnly` prop |
44
+ | `renderMode` | `string` | `'ReadOnly'` — sets read-only mode alongside `readOnly` input |
47
45
  | `image` | `string` | Image field path for card variant |
48
46
 
49
- ## Component Skeleton
50
-
51
- Follow this exact structure. The export name is **`CheckboxComponent`** (not `Checkbox`) to avoid collision with the design system's Checkbox widget.
52
-
53
- ```typescript
54
- import { useState, useEffect } from 'react';
55
- import handleEvent from '../../helpers/event-utils';
56
- import { getComponentFromRegistry } from '@pega/sdk-react';
57
- import {
58
- insertInstruction,
59
- deleteInstruction,
60
- updateNewInstuctions,
61
- } from '../../helpers/instructions-utils';
62
- import type { PConnFieldProps } from '@pega/sdk-react';
63
-
64
- // ── Props interface ──────────────────────────────────────────
65
- // Note: Omit 'value' from PConnFieldProps — Checkbox uses boolean, not string
66
- interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
67
- value?: boolean;
68
- caption?: string;
69
- trueLabel?: string;
70
- falseLabel?: string;
71
- selectionMode?: string;
72
- datasource?: any;
73
- selectionKey?: string;
74
- selectionList?: any;
75
- primaryField: string;
76
- readonlyContextList: any;
77
- referenceList: string;
78
- variant?: string;
79
- hideFieldLabels: boolean;
80
- additionalProps: any;
81
- imagePosition: string;
82
- imageSize: string;
83
- showImageDescription: string;
84
- renderMode: string;
85
- image: string;
86
- }
87
-
88
- // ── Styles (design-system agnostic) ──────────────────────────
89
- // .checkbox-column → display: flex, flexDirection: column
90
- // .selectable-card-grid → display: grid, gridTemplateColumns: repeat(auto-fit, minmax(min(100%, 40ch), 1fr)),
91
- // gridAutoRows: 1fr, gap: 0.5rem
92
-
93
- // ── Component ────────────────────────────────────────────────
94
- export default function CheckboxComponent(props: CheckboxProps) {
95
- // 1. Registry lookups
96
- const FieldValueList = getComponentFromRegistry('FieldValueList');
97
- const SelectableCard = getComponentFromRegistry('SelectableCard');
98
-
99
- // 2. Destructure props — note alias: readonlyContextList → selectedvalues
100
- const {
101
- getPConnect, label, caption, value, readOnly, testId,
102
- required, disabled, status, helperText, validatemessage,
103
- displayMode, hideLabel, trueLabel, falseLabel,
104
- selectionMode, datasource, selectionKey, selectionList,
105
- primaryField, referenceList,
106
- readonlyContextList: selectedvalues,
107
- variant, hideFieldLabels, additionalProps,
108
- imagePosition, imageSize, showImageDescription, renderMode, image,
109
- } = props;
110
-
111
- // 3. Derived flags
112
- const readOnlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly;
113
- const helperTextToDisplay = validatemessage || helperText;
114
-
115
- // 4. PConnect setup
116
- const thePConn = getPConnect();
117
- const actionsApi = thePConn.getActionsApi();
118
- const propName = (thePConn.getStateProps() as any).value;
119
-
120
- // 5. State
121
- const [checked, setChecked] = useState<any>(false);
122
-
123
- // 6. useEffect: sync checked state from value prop — deps: [value]
124
- useEffect(() => { setChecked(value); }, [value]);
125
-
126
- // 7. useEffect: init reference list on mount — deps: [thePConn]
127
- // Guard: referenceList?.length > 0 && !readOnlyMode
128
- // Calls: thePConn.setReferenceList(selectionList)
129
- // updateNewInstuctions(thePConn, selectionList)
130
-
131
- // 8. Display mode returns (uses caption, not label!)
132
- if (displayMode === 'DISPLAY_ONLY') {
133
- return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;
134
- }
135
- if (displayMode === 'STACKED_LARGE_VAL') {
136
- return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant="stacked" />;
137
- }
138
-
139
- // 9. Event handlers — see Behavioral Contract for each variant
140
-
141
- // 10. Branch: card variant (variant === 'card')
142
- // → see Behavioral Contract "Card" section
143
- // Return early with heading + grid + SelectableCard
144
-
145
- // 11. Branch: multi-select (selectionMode === 'multi')
146
- // → see Behavioral Contract "Multi-select" section
147
- // Build list of checkbox controls from datasource.source
148
-
149
- // 12. Branch: single checkbox (default)
150
- // → see Behavioral Contract "Single checkbox" section
151
- // Single FormControlLabel with checked={checked}
152
-
153
- // 13. Main return: wrapper with group label + checkbox(es) + helper text
154
- // Error state: status === 'error'
155
- // Group label: {label}, hidden if hideLabel
156
- // Helper text: helperTextToDisplay
157
- return (
158
- <FormWrapper required={required} error={status === 'error'}>
159
- {!hideLabel && <GroupLabel>{label}</GroupLabel>}
160
- <CheckboxGroup>{/* theCheckbox from step 11 or 12 */}</CheckboxGroup>
161
- <HelperText>{helperTextToDisplay}</HelperText>
162
- </FormWrapper>
163
- );
164
- }
165
- ```
47
+ ## Implementation Structure
48
+
49
+ Follow this exact structure. The export name should avoid collision with the design system's checkbox widget.
50
+
51
+ **Module Setup:** The component depends on the project's component registry (to resolve `FieldValueList` and `SelectableCard`), the project's event-commit utility, and the project's instruction helpers (`insertInstruction`, `deleteInstruction`, `updateNewInstuctions`) for multi-selection reference list management. Define the input contract by overriding `value` to be an optional boolean (rather than the string from the base field input contract) and adding all the component-specific fields listed in the inputs table above.
52
+
53
+ **Styling notes (design-system agnostic):** a vertical checkbox column layout (flex, column direction), and for the card variant a CSS grid layout (`repeat(auto-fit, minmax(min(100%, 40ch), 1fr))`, equal row heights, small gap).
54
+
55
+ **Main Component Logic** — steps in order:
56
+
57
+ 1. **Registry lookups** — resolve `FieldValueList` and `SelectableCard` via the project's component registry.
58
+ 2. **Receive inputs** — all the standard field inputs plus the component-specific ones; notably alias `readonlyContextList` to `selectedvalues` for readability.
59
+ 3. **Derived flags** — `readOnlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly` and `helperTextToDisplay = validatemessage || helperText`.
60
+ 4. **PConnect setup** — obtain the PConnect instance, its actions API, and the bound property name.
61
+ 5. **Local state** — `checked` initialized to `false`.
62
+ 6. **Sync from store** — a lifecycle effect watching `value` updates `checked` whenever it changes.
63
+ 7. **Reference list init** — a lifecycle effect watching the PConnect instance: when `referenceList?.length > 0 && !readOnlyMode`, call `thePConn.setReferenceList(selectionList)` followed by `updateNewInstuctions(thePConn, selectionList)`.
64
+ 8. **Display mode returns** — note these use `caption` (not `label`) as the display name: `DISPLAY_ONLY` and `STACKED_LARGE_VAL` both return `FieldValueList` with value set to `trueLabel` when `value` is true, `falseLabel` otherwise, the latter with a stacked variant.
65
+ 9. **Event handlers** — see the Behavioral Contract below for the exact logic of each variant's change/blur handlers.
66
+ 10. **Branch: card variant** (`variant === 'card'`) — return early with a heading, a CSS grid wrapper, and a `SelectableCard`; see the Behavioral Contract "Card" section for full input wiring.
67
+ 11. **Branch: multi-select** (`selectionMode === 'multi'`) — build a list of checkbox controls from `datasource.source`; see the Behavioral Contract "Multi-select" section.
68
+ 12. **Branch: single checkbox** (default) — a single checkbox control with `checked` state; see the Behavioral Contract "Single checkbox" section.
69
+ 13. **Main return** — a wrapper containing (in order): the group label (`label`, hidden when `hideLabel`), the checkbox group content built in step 11 or 12, and the helper text (`helperTextToDisplay`); the wrapper carries `required` and an error state driven by `status === 'error'`.
166
70
 
167
71
  ## Behavioral Contract
168
72
 
@@ -170,189 +74,116 @@ export default function CheckboxComponent(props: CheckboxProps) {
170
74
 
171
75
  1. **Read-only determination:** `readOnlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly`.
172
76
  2. **Helper text:** `helperTextToDisplay = validatemessage || helperText`.
173
- 3. **Local state:** Maintain `checked` (boolean) initialized to `false`. `useEffect` watching `[value]` → `setChecked(value)`.
174
- 4. **Reference list init:** `useEffect` watching `[thePConn]` — if `referenceList?.length > 0 && !readOnlyMode`, call `thePConn.setReferenceList(selectionList)` and `updateNewInstuctions(thePConn, selectionList)`.
175
- 5. **`handleCheckboxChange(event, item)`** — shared by card and internally:
176
- ```
177
- if (event.target.checked) {
178
- insertInstruction(thePConn, selectionList, selectionKey, primaryField, item);
179
- } else {
180
- deleteInstruction(thePConn, selectionList, selectionKey, item);
181
- }
182
- thePConn.clearErrorMessages({ property: selectionList });
183
- ```
77
+ 3. **Local state:** Maintain `checked` (boolean) initialized to `false`. A lifecycle effect watching `value` updates `checked`.
78
+ 4. **Reference list init:** A lifecycle effect watching the PConnect instance — if `referenceList?.length > 0 && !readOnlyMode`, call `thePConn.setReferenceList(selectionList)` and `updateNewInstuctions(thePConn, selectionList)`.
79
+ 5. **`handleCheckboxChange(event, item)`** — shared by card and internal usage: when the checkbox is checked, call `insertInstruction(thePConn, selectionList, selectionKey, primaryField, item)`; otherwise call `deleteInstruction(thePConn, selectionList, selectionKey, item)`. Either way, finish by calling `thePConn.clearErrorMessages({ property: selectionList })`.
184
80
 
185
81
  ### Variant: Single checkbox (default)
186
82
 
187
83
  Render a single checkbox with:
188
84
 
189
- - `checked={checked}`
190
- - `onChange={!readOnly ? handleChange : undefined}`
191
- - `onBlur={!readOnly ? handleBlur : undefined}`
85
+ - Checked state bound to `checked`
86
+ - Change handler wired only when not read-only
87
+ - Blur handler wired only when not read-only
192
88
  - Label = `caption` (next to checkbox)
193
89
  - Group label = `label` (above, hidden if `hideLabel`)
194
- - **On change:** `handleEvent(actionsApi, 'changeNblur', propName, event.target.checked)` — passes boolean.
195
- - **On blur:** `pConn.getValidationApi().validate(event.target.checked)`.
90
+ - **On change:** Commit via the project's event-commit utility with event type `'changeNblur'`, the property name, and the checked boolean.
91
+ - **On blur:** Validate via `pConn.getValidationApi().validate(event.target.checked)`.
196
92
 
197
93
  ### Variant: Multi-select (`selectionMode === 'multi'`)
198
94
 
199
95
  Render a list of checkboxes from `datasource.source`:
200
96
 
201
- - Extract `dataField`: `selectionKey?.split?.('.')[1]`.
202
- - For each `element` in `datasource.source`:
203
- - `checked`: `selectedvalues?.some?.(data => data[dataField] === element.key)`
97
+ - Extract the data field key: the second segment of `selectionKey` split by `.`.
98
+ - For each element in `datasource.source`:
99
+ - Checked: `selectedvalues?.some?.(data => data[dataField] === element.key)`
204
100
  - Label: `element.text ?? element.value`
205
- - **On change:** `handleChangeMultiMode(event, element)`:
206
- ```
207
- if (event.target.checked) {
208
- insertInstruction(thePConn, selectionList, selectionKey, primaryField, {
209
- id: element.key,
210
- primary: element.text ?? element.value,
211
- });
212
- } else {
213
- deleteInstruction(thePConn, selectionList, selectionKey, {
214
- id: element.key,
215
- primary: element.text ?? element.value,
216
- });
217
- }
218
- thePConn.clearErrorMessages({ property: selectionList, category: '', context: '' });
219
- ```
101
+ - **On change:** When the checkbox is checked, call `insertInstruction(thePConn, selectionList, selectionKey, primaryField, { id: element.key, primary: element.text ?? element.value })`; otherwise call `deleteInstruction(thePConn, selectionList, selectionKey, { id: element.key, primary: element.text ?? element.value })`. Either way, finish by calling `thePConn.clearErrorMessages({ property: selectionList, category: '', context: '' })`.
220
102
  - **On blur:** `thePConn.getValidationApi().validate(selectedvalues, selectionList)`
221
- - `data-testid`: `${testId}:${element.value}`
222
- - Layout: vertical column (`display: flex, flexDirection: column`).
103
+ - Test id: `${testId}:${element.value}`
104
+ - Layout: vertical column (flex, column direction).
223
105
 
224
106
  ### Variant: Card (`variant === 'card'`)
225
107
 
226
108
  Return early (before multi/single logic) with heading + CSS Grid + `SelectableCard`:
227
109
 
228
- - Build `commonProps`:
229
- ```
230
- const actions = thePConn.getActionsApi();
231
- const commonProps = {
232
- ...additionalProps,
233
- className: 'standard',
234
- disabled,
235
- readOnly,
236
- onClick: (actions as any).onClick,
237
- };
238
- ```
239
- - Grid: `repeat(auto-fit, minmax(min(100%, 40ch), 1fr))`, `gridAutoRows: '1fr'`, `gap: '0.5rem'`.
240
- - `SelectableCard` props:
241
- - `{...commonProps}`, `testId`, `displayMode`, `getPConnect`
110
+ - Build common configuration by spreading `additionalProps` and adding `className: 'standard'`, `disabled`, `readOnly`, and `onClick` taken from the PConnect actions API.
111
+ - Grid: `repeat(auto-fit, minmax(min(100%, 40ch), 1fr))`, equal row heights, gap `0.5rem`.
112
+ - `SelectableCard` inputs:
113
+ - Common configuration spread, `testId`, `displayMode`, `getPConnect`
242
114
  - `type='checkbox'`
243
- - `dataSource={datasource}`
244
- - `readOnly={renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly}`
245
- - `recordKey={selectionKey?.split('.').pop()}`
246
- - `cardLabel={primaryField.split('.').pop()}`
247
- - `readOnlyList={selectedvalues}`
248
- - `hideFieldLabels={hideFieldLabels}`
249
- - `showNoValue={(readOnlyMode) && selectedvalues.length === 0}`
250
- - `image` config object:
251
- ```
252
- image={{
253
- imagePosition,
254
- imageSize,
255
- showImageDescription,
256
- imageField: image?.split('.').pop(),
257
- imageDescription: (thePConn?.getRawMetadata()?.config as any)
258
- .imageDescription?.split('.').pop(),
259
- }}
260
- ```
261
- - `onChange`: stop propagation, find item from `datasource.source` by matching `item[recordKey] === e.target.id`, call `handleCheckboxChange`:
262
- ```
263
- onChange={(e) => {
264
- e.stopPropagation();
265
- const recordKey = selectionKey?.split('.').pop();
266
- const selectedItem = datasource?.source?.find(
267
- item => item[recordKey] === e.target.id
268
- ) ?? {};
269
- handleCheckboxChange(e, {
270
- id: selectedItem[recordKey],
271
- primary: selectedItem[recordKey],
272
- });
273
- }}
274
- ```
115
+ - `dataSource` set to `datasource`
116
+ - `readOnly` set to `renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly`
117
+ - `recordKey` set to the last segment of `selectionKey`
118
+ - `cardLabel` set to the last segment of `primaryField`
119
+ - `readOnlyList` set to `selectedvalues`
120
+ - `hideFieldLabels`
121
+ - `showNoValue` set to true when read-only mode is active and `selectedvalues.length === 0`
122
+ - `image` config object bundling `imagePosition`, `imageSize`, `showImageDescription`, an `imageField` derived by taking the last segment of the `image` input path, and an `imageDescription` derived by taking the last segment of the `imageDescription` path found on `thePConn.getRawMetadata().config`.
123
+ - `onChange`: stop event propagation, resolve the record key by taking the last segment of `selectionKey`, find the matching item in `datasource.source` whose field at that key equals the event target's `id` (defaulting to an empty object if not found), then call `handleCheckboxChange` with an item shaped as `{ id: selectedItem[recordKey], primary: selectedItem[recordKey] }`.
275
124
  - `onBlur`: `() => thePConn.getValidationApi().validate(selectedvalues, selectionList)`
276
125
 
277
126
  ## Display Mode Rendering
278
127
 
279
- Display mode uses `caption` (not `label`) and shows true/false label:
128
+ Display mode uses `caption` (not `label`) and shows the true/false label:
280
129
 
281
- - **`DISPLAY_ONLY`:** `<FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />`
282
- - **`STACKED_LARGE_VAL`:** `<FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />`
130
+ - **`DISPLAY_ONLY`:** Render `FieldValueList` with `name` set to `caption` (or empty when `hideLabel` is true) and `value` set to `trueLabel` when `value` is true, `falseLabel` otherwise.
131
+ - **`STACKED_LARGE_VAL`:** Render `FieldValueList` the same way, with a stacked variant.
283
132
 
284
133
  ## Read-Only Rendering
285
134
 
286
- Single mode: Set `readOnly` on checkbox element; disable `onChange`/`onBlur`.
287
- Multi/Card mode: `readOnlyMode` flag prevents `insertInstruction`/`deleteInstruction`; cards show `readOnlyList`.
135
+ Single mode: Set the read-only attribute on the checkbox element; disable the change/blur handlers.
136
+ Multi/Card mode: The `readOnlyMode` flag prevents `insertInstruction`/`deleteInstruction`; cards show `readOnlyList`.
288
137
 
289
138
  ## Visual Specifications
290
139
 
291
140
  ### Standard / Multi-select
292
141
 
293
- | Property | Value |
294
- | ----------------- | --------------------------------------------- |
295
- | Checkbox size | Default (24px) |
296
- | Label placement | End (right of checkbox) |
297
- | Group label | `<legend>` above group, hidden if `hideLabel` |
298
- | Layout | Single: single row. Multi: vertical column |
299
- | Helper text | Below group |
300
- | Error state | Red text/border on helper |
301
- | Disabled/readOnly | Greyed out, pointer-events none |
302
-
303
- **CSS-only:**
304
-
305
- ```css
306
- .checkbox-group {
307
- display: flex;
308
- flex-direction: column;
309
- gap: 4px;
310
- }
311
- .checkbox-label {
312
- display: flex;
313
- align-items: center;
314
- gap: 8px;
315
- cursor: pointer;
316
- }
317
- input[type='checkbox']:disabled {
318
- opacity: 0.38;
319
- }
320
- ```
142
+ | Property | Value |
143
+ | ----------------- | ----------------------------------------------- |
144
+ | Checkbox size | Default (24px) |
145
+ | Label placement | End (right of checkbox) |
146
+ | Group label | Legend/label above group, hidden if `hideLabel` |
147
+ | Layout | Single: single row. Multi: vertical column |
148
+ | Helper text | Below group |
149
+ | Error state | Red text/border on helper |
150
+ | Disabled/readOnly | Greyed out, pointer-events none |
151
+
152
+ **Visual-only styling notes:** The checkbox group uses a vertical flex column with a small gap between items; each checkbox label row is a flex container with center-aligned items, a small gap between the input and text, and a pointer cursor. Disabled checkbox inputs are shown at reduced opacity.
321
153
 
322
154
  ### Card Variant
323
155
 
324
156
  | Property | Value |
325
157
  | -------- | ------------------------------------------------------------------------------------------------- |
326
158
  | Layout | CSS Grid `repeat(auto-fit, minmax(min(100%, 40ch), 1fr))`, row height equal (`1fr`), gap `0.5rem` |
327
- | Heading | `<h4>` with `marginTop: 0, marginBottom: 0` |
159
+ | Heading | Heading element with no top/bottom margin |
328
160
 
329
161
  ## Edge Cases & Special Logic
330
162
 
331
- - **Export name is `CheckboxComponent`** (not `Checkbox`) to avoid collision with the design system's checkbox widget import.
163
+ - **Export name should avoid collision** with the design system's checkbox widget.
332
164
  - **Display mode uses `caption`** (not `label`) for the field name. This is unique to Checkbox.
333
- - **`readonlyContextList`** is destructured with alias `selectedvalues` — use `selectedvalues` everywhere in the component body.
334
- - **`handleCheckboxChange`** (card mode): Calls `e.stopPropagation()` before processing. Finds the selected item from `datasource.source` by matching `item[recordKey] === e.target.id`.
165
+ - **`readonlyContextList`** is aliased to `selectedvalues` — use `selectedvalues` everywhere in the component body.
166
+ - **`handleCheckboxChange`** (card mode): Stops event propagation before processing. Finds the selected item from `datasource.source` by matching `item[recordKey] === e.target.id`.
335
167
  - `updateNewInstuctions` is called on mount to sync reference list state.
336
168
  - `clearErrorMessages` is called after every multi-select change.
337
169
  - Card variant returns early (before multi/single branch logic).
338
- - Multi-select `onBlur` validates with both `selectedvalues` and `selectionList` as arguments.
170
+ - Multi-select blur handler validates with both `selectedvalues` and `selectionList` as arguments.
339
171
 
340
172
  ## Dependencies
341
173
 
342
- - `insertInstruction`, `deleteInstruction`, `updateNewInstuctions` from `../../helpers/instructions-utils` — for multi-selection reference list management.
343
- - `handleEvent` from `../../helpers/event-utils`.
344
- - `getComponentFromRegistry('FieldValueList')` for display modes.
345
- - `getComponentFromRegistry('SelectableCard')` for card variant.
174
+ - The project's instruction helpers (`insertInstruction`, `deleteInstruction`, `updateNewInstuctions`) — for multi-selection reference list management.
175
+ - The project's event-commit utility.
176
+ - The project's component registry, resolving `FieldValueList` — for display modes.
177
+ - The project's component registry, resolving `SelectableCard` — for card variant.
346
178
 
347
179
  ## Design System Mapping
348
180
 
349
181
  **UI control type:** Single or multi-select checkbox (boolean or list).
350
182
 
351
- Listed design systems are examples only.
183
+ When implementing in a specific design system, map the following:
352
184
 
353
- | Design System | Recommended Component |
354
- | ------------------ | --------------------------------------------------- |
355
- | Default (CSS only) | `<input type="checkbox">` with `<label>` |
356
- | MUI | `<Checkbox>` in `<FormControlLabel>`, `<FormGroup>` |
357
- | Ant Design | `<Checkbox>` / `<Checkbox.Group>` |
358
- | Chakra UI | `<Checkbox>` / `<CheckboxGroup>` |
185
+ - **Single checkbox** → use the DS's checkbox component with a label to the right
186
+ - **Multi-select** → render a list of checkboxes in a vertical flex column
187
+ - **Card variant** → delegate to the `SelectableCard` component in a CSS grid
188
+ - **Group wrapper** → use the DS's form control/form group with legend/label, error state, and helper text
189
+ - **Read-only** → disable the checkbox inputs; for cards, show the read-only list