@salesforce/templates 66.1.1 → 66.2.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 (238) hide show
  1. package/lib/generators/projectGenerator.d.ts +6 -0
  2. package/lib/generators/projectGenerator.js +43 -4
  3. package/lib/generators/projectGenerator.js.map +1 -1
  4. package/lib/templates/project/react-b2e/.a4drules/README.md +35 -0
  5. package/lib/templates/project/react-b2e/.a4drules/a4d-webapp-generate.md +27 -0
  6. package/lib/templates/project/react-b2e/.a4drules/build-validation.md +78 -0
  7. package/lib/templates/project/react-b2e/.a4drules/code-quality.md +137 -0
  8. package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
  9. package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
  10. package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
  11. package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
  12. package/lib/templates/project/react-b2e/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
  13. package/lib/templates/project/react-b2e/.a4drules/graphql.md +409 -0
  14. package/lib/templates/project/react-b2e/.a4drules/images.md +13 -0
  15. package/lib/templates/project/react-b2e/.a4drules/react.md +387 -0
  16. package/lib/templates/project/react-b2e/.a4drules/react_image_processing.md +45 -0
  17. package/lib/templates/project/react-b2e/.a4drules/typescript.md +224 -0
  18. package/lib/templates/project/react-b2e/.a4drules/ui-layout.md +23 -0
  19. package/lib/templates/project/react-b2e/.a4drules/webapp-nav-and-placeholders.md +33 -0
  20. package/lib/templates/project/react-b2e/.a4drules/webapp-no-node-e.md +25 -0
  21. package/lib/templates/project/react-b2e/.a4drules/webapp-ui-first.md +32 -0
  22. package/lib/templates/project/react-b2e/.a4drules/webapp.md +75 -0
  23. package/lib/templates/project/react-b2e/.forceignore +15 -0
  24. package/lib/templates/project/react-b2e/.husky/pre-commit +4 -0
  25. package/lib/templates/project/react-b2e/.prettierignore +11 -0
  26. package/lib/templates/project/react-b2e/.prettierrc +17 -0
  27. package/lib/templates/project/react-b2e/AGENT.md +75 -0
  28. package/lib/templates/project/react-b2e/CHANGELOG.md +696 -0
  29. package/lib/templates/project/react-b2e/README.md +18 -0
  30. package/lib/templates/project/react-b2e/config/project-scratch-def.json +13 -0
  31. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/.graphqlrc.yml +2 -0
  32. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/.prettierignore +9 -0
  33. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/.prettierrc +11 -0
  34. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/appreacttemplateb2e.webapplication-meta.xml +7 -0
  35. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +2 -0
  36. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +93 -0
  37. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/codegen.yml +94 -0
  38. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/e2e/app.spec.ts +17 -0
  39. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/eslint.config.js +141 -0
  40. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/index.html +13 -0
  41. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +14392 -0
  42. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/package.json +58 -0
  43. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/playwright.config.ts +24 -0
  44. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/scripts/get-graphql-schema.mjs +68 -0
  45. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/scripts/rewrite-e2e-assets.mjs +23 -0
  46. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +116 -0
  47. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +33 -0
  48. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  49. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/app.tsx +22 -0
  50. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +19 -0
  51. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/book.svg +3 -0
  52. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/copy.svg +4 -0
  53. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/rocket.svg +3 -0
  54. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/star.svg +3 -0
  55. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-1.png +0 -0
  56. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-2.png +0 -0
  57. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-3.png +0 -0
  58. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/vibe-codey.svg +194 -0
  59. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/AgentforceConversationClient.tsx +127 -0
  60. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/index.ts +6 -0
  61. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/navigationMenu.tsx +80 -0
  62. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +12 -0
  63. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/NotFound.tsx +18 -0
  64. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/router-utils.tsx +35 -0
  65. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +22 -0
  66. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +13 -0
  67. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/types/conversation.ts +21 -0
  68. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.json +36 -0
  69. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.node.json +13 -0
  70. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vite-env.d.ts +1 -0
  71. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +102 -0
  72. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest-env.d.ts +2 -0
  73. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest.config.ts +11 -0
  74. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest.setup.ts +1 -0
  75. package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/webapplication.json +7 -0
  76. package/lib/templates/project/react-b2e/jest.config.js +6 -0
  77. package/lib/templates/project/react-b2e/package.json +38 -0
  78. package/lib/templates/project/react-b2e/scripts/apex/hello.apex +10 -0
  79. package/lib/templates/project/react-b2e/scripts/soql/account.soql +6 -0
  80. package/lib/templates/project/react-b2e/sfdx-project.json +12 -0
  81. package/lib/templates/project/react-b2x/.a4drules/README.md +35 -0
  82. package/lib/templates/project/react-b2x/.a4drules/a4d-webapp-generate.md +27 -0
  83. package/lib/templates/project/react-b2x/.a4drules/build-validation.md +78 -0
  84. package/lib/templates/project/react-b2x/.a4drules/code-quality.md +137 -0
  85. package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
  86. package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
  87. package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
  88. package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
  89. package/lib/templates/project/react-b2x/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
  90. package/lib/templates/project/react-b2x/.a4drules/graphql.md +409 -0
  91. package/lib/templates/project/react-b2x/.a4drules/images.md +13 -0
  92. package/lib/templates/project/react-b2x/.a4drules/react.md +387 -0
  93. package/lib/templates/project/react-b2x/.a4drules/react_image_processing.md +45 -0
  94. package/lib/templates/project/react-b2x/.a4drules/typescript.md +224 -0
  95. package/lib/templates/project/react-b2x/.a4drules/ui-layout.md +23 -0
  96. package/lib/templates/project/react-b2x/.a4drules/webapp-nav-and-placeholders.md +33 -0
  97. package/lib/templates/project/react-b2x/.a4drules/webapp-no-node-e.md +25 -0
  98. package/lib/templates/project/react-b2x/.a4drules/webapp-ui-first.md +32 -0
  99. package/lib/templates/project/react-b2x/.a4drules/webapp.md +75 -0
  100. package/lib/templates/project/react-b2x/.forceignore +15 -0
  101. package/lib/templates/project/react-b2x/.husky/pre-commit +4 -0
  102. package/lib/templates/project/react-b2x/.prettierignore +11 -0
  103. package/lib/templates/project/react-b2x/.prettierrc +17 -0
  104. package/lib/templates/project/react-b2x/AGENT.md +75 -0
  105. package/lib/templates/project/react-b2x/CHANGELOG.md +696 -0
  106. package/lib/templates/project/react-b2x/README.md +18 -0
  107. package/lib/templates/project/react-b2x/config/project-scratch-def.json +13 -0
  108. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppAuthUtils.cls +68 -0
  109. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppAuthUtils.cls-meta.xml +5 -0
  110. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppChangePassword.cls +77 -0
  111. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppChangePassword.cls-meta.xml +5 -0
  112. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppForgotPassword.cls +71 -0
  113. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppForgotPassword.cls-meta.xml +5 -0
  114. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppLogin.cls +105 -0
  115. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppLogin.cls-meta.xml +5 -0
  116. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppRegistration.cls +162 -0
  117. package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppRegistration.cls-meta.xml +5 -0
  118. package/lib/templates/project/react-b2x/force-app/main/default/digitalExperienceConfigs/appreacttemplateb2x1.digitalExperienceConfig +8 -0
  119. package/lib/templates/project/react-b2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/appreacttemplateb2x1.digitalExperience-meta.xml +11 -0
  120. package/lib/templates/project/react-b2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/_meta.json +5 -0
  121. package/lib/templates/project/react-b2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/content.json +10 -0
  122. package/lib/templates/project/react-b2x/force-app/main/default/networks/appreacttemplateb2x.network +60 -0
  123. package/lib/templates/project/react-b2x/force-app/main/default/package.xml +20 -0
  124. package/lib/templates/project/react-b2x/force-app/main/default/sites/appreacttemplateb2x.site +31 -0
  125. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/.graphqlrc.yml +2 -0
  126. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/.prettierignore +9 -0
  127. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/.prettierrc +11 -0
  128. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/appreacttemplateb2x.webapplication-meta.xml +7 -0
  129. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.d.ts +2 -0
  130. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.js +93 -0
  131. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/codegen.yml +94 -0
  132. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/e2e/app.spec.ts +17 -0
  133. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/eslint.config.js +141 -0
  134. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/index.html +13 -0
  135. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/package-lock.json +18408 -0
  136. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/package.json +66 -0
  137. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/playwright.config.ts +24 -0
  138. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/scripts/get-graphql-schema.mjs +68 -0
  139. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/scripts/rewrite-e2e-assets.mjs +23 -0
  140. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/graphql-operations-types.ts +116 -0
  141. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/accounts.ts +33 -0
  142. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
  143. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/app.tsx +13 -0
  144. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/appLayout.tsx +11 -0
  145. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/book.svg +3 -0
  146. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/copy.svg +4 -0
  147. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/rocket.svg +3 -0
  148. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/star.svg +3 -0
  149. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-1.png +0 -0
  150. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-2.png +0 -0
  151. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-3.png +0 -0
  152. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/vibe-codey.svg +194 -0
  153. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/alerts/status-alert.tsx +45 -0
  154. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authHelpers.ts +73 -0
  155. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationConfig.ts +61 -0
  156. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationRouteLayout.tsx +21 -0
  157. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/privateRouteLayout.tsx +36 -0
  158. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/SessionTimeoutValidator.tsx +616 -0
  159. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeService.ts +161 -0
  160. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeoutConfig.ts +77 -0
  161. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/footers/footer-link.tsx +36 -0
  162. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/auth-form.tsx +81 -0
  163. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/submit-button.tsx +49 -0
  164. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-layout.tsx +23 -0
  165. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-skeleton.tsx +38 -0
  166. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/centered-page-layout.tsx +73 -0
  167. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/alert.tsx +69 -0
  168. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/button.tsx +67 -0
  169. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/card.tsx +92 -0
  170. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/dialog.tsx +143 -0
  171. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/field.tsx +222 -0
  172. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/index.ts +72 -0
  173. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/input.tsx +19 -0
  174. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/label.tsx +19 -0
  175. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/pagination.tsx +112 -0
  176. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/select.tsx +183 -0
  177. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/separator.tsx +26 -0
  178. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/skeleton.tsx +14 -0
  179. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/spinner.tsx +15 -0
  180. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/table.tsx +87 -0
  181. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/tabs.tsx +78 -0
  182. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components.json +18 -0
  183. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/context/AuthContext.tsx +95 -0
  184. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/form.tsx +116 -0
  185. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useCountdownTimer.ts +266 -0
  186. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useRetryWithBackoff.ts +109 -0
  187. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/layouts/AuthAppLayout.tsx +12 -0
  188. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/data-sdk.ts +21 -0
  189. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/utils.ts +6 -0
  190. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/navigationMenu.tsx +80 -0
  191. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ChangePassword.tsx +107 -0
  192. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ForgotPassword.tsx +73 -0
  193. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Home.tsx +12 -0
  194. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Login.tsx +97 -0
  195. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/NotFound.tsx +18 -0
  196. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Profile.tsx +178 -0
  197. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Register.tsx +138 -0
  198. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ResetPassword.tsx +107 -0
  199. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/router-utils.tsx +35 -0
  200. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/routes.tsx +71 -0
  201. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/styles/global.css +135 -0
  202. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/utils/helpers.ts +121 -0
  203. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.json +36 -0
  204. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.node.json +13 -0
  205. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vite-env.d.ts +1 -0
  206. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vite.config.ts +102 -0
  207. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest-env.d.ts +2 -0
  208. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest.config.ts +11 -0
  209. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest.setup.ts +1 -0
  210. package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/webapplication.json +7 -0
  211. package/lib/templates/project/react-b2x/jest.config.js +6 -0
  212. package/lib/templates/project/react-b2x/package.json +38 -0
  213. package/lib/templates/project/react-b2x/scripts/apex/hello.apex +10 -0
  214. package/lib/templates/project/react-b2x/scripts/soql/account.soql +6 -0
  215. package/lib/templates/project/react-b2x/sfdx-project.json +12 -0
  216. package/lib/templates/webapplication/reactbasic/.graphqlrc.yml +2 -0
  217. package/lib/templates/webapplication/reactbasic/build/vite.config.js +20 -1
  218. package/lib/templates/webapplication/reactbasic/codegen.yml +94 -0
  219. package/lib/templates/webapplication/reactbasic/e2e/app.spec.ts +0 -7
  220. package/lib/templates/webapplication/reactbasic/eslint.config.js +28 -0
  221. package/lib/templates/webapplication/reactbasic/package-lock.json +10090 -2874
  222. package/lib/templates/webapplication/reactbasic/package.json +16 -4
  223. package/lib/templates/webapplication/reactbasic/scripts/get-graphql-schema.mjs +68 -0
  224. package/lib/templates/webapplication/reactbasic/src/api/graphql-operations-types.ts +23 -34
  225. package/lib/templates/webapplication/reactbasic/src/api/utils/accounts.ts +33 -0
  226. package/lib/templates/webapplication/reactbasic/src/app.tsx +10 -1
  227. package/lib/templates/webapplication/reactbasic/src/appLayout.tsx +2 -0
  228. package/lib/templates/webapplication/reactbasic/src/navigationMenu.tsx +80 -0
  229. package/lib/templates/webapplication/reactbasic/src/router-utils.tsx +35 -0
  230. package/lib/templates/webapplication/reactbasic/src/routes.tsx +1 -7
  231. package/lib/templates/webapplication/reactbasic/vite.config.ts +20 -1
  232. package/lib/tsconfig.tsbuildinfo +1 -1
  233. package/lib/utils/types.d.ts +1 -1
  234. package/lib/utils/webappTemplateUtils.d.ts +49 -0
  235. package/lib/utils/webappTemplateUtils.js +210 -0
  236. package/lib/utils/webappTemplateUtils.js.map +1 -0
  237. package/package.json +7 -5
  238. package/lib/templates/webapplication/reactbasic/src/pages/About.tsx +0 -12
@@ -0,0 +1,92 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "../../lib/utils";
4
+
5
+ function Card({
6
+ className,
7
+ size = "default",
8
+ ...props
9
+ }: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
10
+ return (
11
+ <div
12
+ data-slot="card"
13
+ data-size={size}
14
+ className={cn(
15
+ "ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
16
+ className,
17
+ )}
18
+ {...props}
19
+ />
20
+ );
21
+ }
22
+
23
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
24
+ return (
25
+ <div
26
+ data-slot="card-header"
27
+ className={cn(
28
+ "gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
29
+ className,
30
+ )}
31
+ {...props}
32
+ />
33
+ );
34
+ }
35
+
36
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
37
+ return (
38
+ <div
39
+ data-slot="card-title"
40
+ className={cn(
41
+ "text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
42
+ className,
43
+ )}
44
+ {...props}
45
+ />
46
+ );
47
+ }
48
+
49
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
50
+ return (
51
+ <div
52
+ data-slot="card-description"
53
+ className={cn("text-muted-foreground text-sm", className)}
54
+ {...props}
55
+ />
56
+ );
57
+ }
58
+
59
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
60
+ return (
61
+ <div
62
+ data-slot="card-action"
63
+ className={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
64
+ {...props}
65
+ />
66
+ );
67
+ }
68
+
69
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
70
+ return (
71
+ <div
72
+ data-slot="card-content"
73
+ className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
74
+ {...props}
75
+ />
76
+ );
77
+ }
78
+
79
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
80
+ return (
81
+ <div
82
+ data-slot="card-footer"
83
+ className={cn(
84
+ "bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center",
85
+ className,
86
+ )}
87
+ {...props}
88
+ />
89
+ );
90
+ }
91
+
92
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
@@ -0,0 +1,143 @@
1
+ import * as React from "react";
2
+ import { Dialog as DialogPrimitive } from "radix-ui";
3
+
4
+ import { cn } from "../../lib/utils";
5
+ import { Button } from "./button";
6
+ import { XIcon } from "lucide-react";
7
+
8
+ function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
9
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />;
10
+ }
11
+
12
+ function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
13
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
14
+ }
15
+
16
+ function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
17
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
18
+ }
19
+
20
+ function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
21
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
22
+ }
23
+
24
+ function DialogOverlay({
25
+ className,
26
+ ...props
27
+ }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
28
+ return (
29
+ <DialogPrimitive.Overlay
30
+ data-slot="dialog-overlay"
31
+ className={cn(
32
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",
33
+ className,
34
+ )}
35
+ {...props}
36
+ />
37
+ );
38
+ }
39
+
40
+ function DialogContent({
41
+ className,
42
+ children,
43
+ showCloseButton = true,
44
+ ...props
45
+ }: React.ComponentProps<typeof DialogPrimitive.Content> & {
46
+ showCloseButton?: boolean;
47
+ }) {
48
+ return (
49
+ <DialogPortal>
50
+ <DialogOverlay />
51
+ <DialogPrimitive.Content
52
+ data-slot="dialog-content"
53
+ className={cn(
54
+ "bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",
55
+ className,
56
+ )}
57
+ {...props}
58
+ >
59
+ {children}
60
+ {showCloseButton && (
61
+ <DialogPrimitive.Close data-slot="dialog-close" asChild>
62
+ <Button variant="ghost" className="absolute top-2 right-2" size="icon-sm">
63
+ <XIcon />
64
+ <span className="sr-only">Close</span>
65
+ </Button>
66
+ </DialogPrimitive.Close>
67
+ )}
68
+ </DialogPrimitive.Content>
69
+ </DialogPortal>
70
+ );
71
+ }
72
+
73
+ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
74
+ return (
75
+ <div data-slot="dialog-header" className={cn("gap-2 flex flex-col", className)} {...props} />
76
+ );
77
+ }
78
+
79
+ function DialogFooter({
80
+ className,
81
+ showCloseButton = false,
82
+ children,
83
+ ...props
84
+ }: React.ComponentProps<"div"> & {
85
+ showCloseButton?: boolean;
86
+ }) {
87
+ return (
88
+ <div
89
+ data-slot="dialog-footer"
90
+ className={cn(
91
+ "bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
92
+ className,
93
+ )}
94
+ {...props}
95
+ >
96
+ {children}
97
+ {showCloseButton && (
98
+ <DialogPrimitive.Close asChild>
99
+ <Button variant="outline">Close</Button>
100
+ </DialogPrimitive.Close>
101
+ )}
102
+ </div>
103
+ );
104
+ }
105
+
106
+ function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
107
+ return (
108
+ <DialogPrimitive.Title
109
+ data-slot="dialog-title"
110
+ className={cn("text-base leading-none font-medium", className)}
111
+ {...props}
112
+ />
113
+ );
114
+ }
115
+
116
+ function DialogDescription({
117
+ className,
118
+ ...props
119
+ }: React.ComponentProps<typeof DialogPrimitive.Description>) {
120
+ return (
121
+ <DialogPrimitive.Description
122
+ data-slot="dialog-description"
123
+ className={cn(
124
+ "text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",
125
+ className,
126
+ )}
127
+ {...props}
128
+ />
129
+ );
130
+ }
131
+
132
+ export {
133
+ Dialog,
134
+ DialogClose,
135
+ DialogContent,
136
+ DialogDescription,
137
+ DialogFooter,
138
+ DialogHeader,
139
+ DialogOverlay,
140
+ DialogPortal,
141
+ DialogTitle,
142
+ DialogTrigger,
143
+ };
@@ -0,0 +1,222 @@
1
+ import { useMemo } from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+
4
+ import { cn } from "../../lib/utils";
5
+ import { Label } from "./label";
6
+ import { Separator } from "./separator";
7
+
8
+ function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
9
+ return (
10
+ <fieldset
11
+ data-slot="field-set"
12
+ className={cn(
13
+ "gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",
14
+ className,
15
+ )}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ function FieldLegend({
22
+ className,
23
+ variant = "legend",
24
+ ...props
25
+ }: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {
26
+ return (
27
+ <legend
28
+ data-slot="field-legend"
29
+ data-variant={variant}
30
+ className={cn(
31
+ "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
32
+ className,
33
+ )}
34
+ {...props}
35
+ />
36
+ );
37
+ }
38
+
39
+ function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
40
+ return (
41
+ <div
42
+ data-slot="field-group"
43
+ className={cn(
44
+ "gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col",
45
+ className,
46
+ )}
47
+ {...props}
48
+ />
49
+ );
50
+ }
51
+
52
+ const fieldVariants = cva("data-[invalid=true]:text-destructive gap-2 group/field flex w-full", {
53
+ variants: {
54
+ orientation: {
55
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
56
+ horizontal:
57
+ "flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
58
+ responsive:
59
+ "flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
60
+ },
61
+ },
62
+ defaultVariants: {
63
+ orientation: "vertical",
64
+ },
65
+ });
66
+
67
+ function Field({
68
+ className,
69
+ orientation = "vertical",
70
+ ...props
71
+ }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) {
72
+ return (
73
+ <div
74
+ role="group"
75
+ data-slot="field"
76
+ data-orientation={orientation}
77
+ className={cn(fieldVariants({ orientation }), className)}
78
+ {...props}
79
+ />
80
+ );
81
+ }
82
+
83
+ function FieldContent({ className, ...props }: React.ComponentProps<"div">) {
84
+ return (
85
+ <div
86
+ data-slot="field-content"
87
+ className={cn("gap-0.5 group/field-content flex flex-1 flex-col leading-snug", className)}
88
+ {...props}
89
+ />
90
+ );
91
+ }
92
+
93
+ function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {
94
+ return (
95
+ <Label
96
+ data-slot="field-label"
97
+ className={cn(
98
+ "has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug",
99
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
100
+ className,
101
+ )}
102
+ {...props}
103
+ />
104
+ );
105
+ }
106
+
107
+ function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
108
+ return (
109
+ <div
110
+ data-slot="field-label"
111
+ className={cn(
112
+ "gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug",
113
+ className,
114
+ )}
115
+ {...props}
116
+ />
117
+ );
118
+ }
119
+
120
+ function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
121
+ return (
122
+ <p
123
+ data-slot="field-description"
124
+ className={cn(
125
+ "text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance",
126
+ "last:mt-0 nth-last-2:-mt-1",
127
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
128
+ className,
129
+ )}
130
+ {...props}
131
+ />
132
+ );
133
+ }
134
+
135
+ function FieldSeparator({
136
+ children,
137
+ className,
138
+ ...props
139
+ }: React.ComponentProps<"div"> & {
140
+ children?: React.ReactNode;
141
+ }) {
142
+ return (
143
+ <div
144
+ data-slot="field-separator"
145
+ data-content={!!children}
146
+ className={cn(
147
+ "-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative",
148
+ className,
149
+ )}
150
+ {...props}
151
+ >
152
+ <Separator className="absolute inset-0 top-1/2" />
153
+ {children && (
154
+ <span
155
+ className="text-muted-foreground px-2 bg-background relative mx-auto block w-fit"
156
+ data-slot="field-separator-content"
157
+ >
158
+ {children}
159
+ </span>
160
+ )}
161
+ </div>
162
+ );
163
+ }
164
+
165
+ function FieldError({
166
+ className,
167
+ children,
168
+ errors,
169
+ ...props
170
+ }: React.ComponentProps<"div"> & {
171
+ errors?: Array<{ message?: string } | undefined>;
172
+ }) {
173
+ const content = useMemo(() => {
174
+ if (children) {
175
+ return children;
176
+ }
177
+
178
+ if (!errors?.length) {
179
+ return null;
180
+ }
181
+
182
+ const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
183
+
184
+ if (uniqueErrors?.length == 1) {
185
+ return uniqueErrors[0]?.message;
186
+ }
187
+
188
+ return (
189
+ <ul className="ml-4 flex list-disc flex-col gap-1">
190
+ {uniqueErrors.map((error, index) => error?.message && <li key={index}>{error.message}</li>)}
191
+ </ul>
192
+ );
193
+ }, [children, errors]);
194
+
195
+ if (!content) {
196
+ return null;
197
+ }
198
+
199
+ return (
200
+ <div
201
+ role="alert"
202
+ data-slot="field-error"
203
+ className={cn("text-destructive text-sm font-normal", className)}
204
+ {...props}
205
+ >
206
+ {content}
207
+ </div>
208
+ );
209
+ }
210
+
211
+ export {
212
+ Field,
213
+ FieldLabel,
214
+ FieldDescription,
215
+ FieldError,
216
+ FieldGroup,
217
+ FieldLegend,
218
+ FieldSeparator,
219
+ FieldSet,
220
+ FieldContent,
221
+ FieldTitle,
222
+ };
@@ -0,0 +1,72 @@
1
+ /**
2
+ * UI Components Index
3
+ *
4
+ * Re-exports all UI components for easier imports.
5
+ *
6
+ * Usage:
7
+ * import { Button, Input, Tabs } from "@/components/ui"
8
+ *
9
+ * Instead of:
10
+ * import { Button } from "@/components/ui/button"
11
+ * import { Input } from "@/components/ui/input"
12
+ * import { Tabs } from "@/components/ui/tabs"
13
+ */
14
+
15
+ export { Alert, AlertTitle, AlertDescription } from "./alert";
16
+ export { Button, buttonVariants } from "./button";
17
+ export {
18
+ Card,
19
+ CardHeader,
20
+ CardFooter,
21
+ CardTitle,
22
+ CardAction,
23
+ CardDescription,
24
+ CardContent,
25
+ } from "./card";
26
+ export {
27
+ Field,
28
+ FieldDescription,
29
+ FieldError,
30
+ FieldGroup,
31
+ FieldLabel,
32
+ FieldLegend,
33
+ FieldSeparator,
34
+ FieldSet,
35
+ } from "./field";
36
+ export { Input } from "./input";
37
+ export { Label } from "./label";
38
+ export {
39
+ Select,
40
+ SelectGroup,
41
+ SelectValue,
42
+ SelectTrigger,
43
+ SelectContent,
44
+ SelectLabel,
45
+ SelectItem,
46
+ SelectSeparator,
47
+ SelectScrollUpButton,
48
+ SelectScrollDownButton,
49
+ } from "./select";
50
+ export { Spinner } from "./spinner";
51
+ export { Skeleton } from "./skeleton";
52
+ export {
53
+ Table,
54
+ TableHeader,
55
+ TableBody,
56
+ TableFooter,
57
+ TableHead,
58
+ TableRow,
59
+ TableCell,
60
+ TableCaption,
61
+ } from "./table";
62
+ export { Tabs, TabsList, TabsTrigger, TabsContent } from "./tabs";
63
+ export {
64
+ Pagination,
65
+ PaginationContent,
66
+ PaginationEllipsis,
67
+ PaginationItem,
68
+ PaginationLink,
69
+ PaginationNext,
70
+ PaginationPrevious,
71
+ } from "./pagination";
72
+ export { Separator } from "./separator";
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "../../lib/utils";
4
+
5
+ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
+ return (
7
+ <input
8
+ type={type}
9
+ data-slot="input"
10
+ className={cn(
11
+ "dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
12
+ className,
13
+ )}
14
+ {...props}
15
+ />
16
+ );
17
+ }
18
+
19
+ export { Input };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { Label as LabelPrimitive } from "radix-ui";
3
+
4
+ import { cn } from "../../lib/utils";
5
+
6
+ function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
7
+ return (
8
+ <LabelPrimitive.Root
9
+ data-slot="label"
10
+ className={cn(
11
+ "gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
12
+ className,
13
+ )}
14
+ {...props}
15
+ />
16
+ );
17
+ }
18
+
19
+ export { Label };
@@ -0,0 +1,112 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "../../lib/utils";
4
+ import { Button } from "./button";
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
6
+
7
+ function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
8
+ return (
9
+ <nav
10
+ role="navigation"
11
+ aria-label="pagination"
12
+ data-slot="pagination"
13
+ className={cn("mx-auto flex w-full justify-center", className)}
14
+ {...props}
15
+ />
16
+ );
17
+ }
18
+
19
+ function PaginationContent({ className, ...props }: React.ComponentProps<"ul">) {
20
+ return (
21
+ <ul
22
+ data-slot="pagination-content"
23
+ className={cn("gap-0.5 flex items-center", className)}
24
+ {...props}
25
+ />
26
+ );
27
+ }
28
+
29
+ function PaginationItem({ ...props }: React.ComponentProps<"li">) {
30
+ return <li data-slot="pagination-item" {...props} />;
31
+ }
32
+
33
+ type PaginationLinkProps = {
34
+ isActive?: boolean;
35
+ } & Pick<React.ComponentProps<typeof Button>, "size"> &
36
+ React.ComponentProps<"a">;
37
+
38
+ function PaginationLink({ className, isActive, size = "icon", ...props }: PaginationLinkProps) {
39
+ return (
40
+ <Button asChild variant={isActive ? "outline" : "ghost"} size={size} className={cn(className)}>
41
+ <a
42
+ aria-current={isActive ? "page" : undefined}
43
+ data-slot="pagination-link"
44
+ data-active={isActive}
45
+ {...props}
46
+ />
47
+ </Button>
48
+ );
49
+ }
50
+
51
+ function PaginationPrevious({
52
+ className,
53
+ text = "Previous",
54
+ ...props
55
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
56
+ return (
57
+ <PaginationLink
58
+ aria-label="Go to previous page"
59
+ size="default"
60
+ className={cn("pl-1.5!", className)}
61
+ {...props}
62
+ >
63
+ <ChevronLeftIcon data-icon="inline-start" className="cn-rtl-flip" />
64
+ <span className="hidden sm:block">{text}</span>
65
+ </PaginationLink>
66
+ );
67
+ }
68
+
69
+ function PaginationNext({
70
+ className,
71
+ text = "Next",
72
+ ...props
73
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
74
+ return (
75
+ <PaginationLink
76
+ aria-label="Go to next page"
77
+ size="default"
78
+ className={cn("pr-1.5!", className)}
79
+ {...props}
80
+ >
81
+ <span className="hidden sm:block">{text}</span>
82
+ <ChevronRightIcon data-icon="inline-end" className="cn-rtl-flip" />
83
+ </PaginationLink>
84
+ );
85
+ }
86
+
87
+ function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">) {
88
+ return (
89
+ <span
90
+ aria-hidden
91
+ data-slot="pagination-ellipsis"
92
+ className={cn(
93
+ "size-8 [&_svg:not([class*='size-'])]:size-4 flex items-center justify-center",
94
+ className,
95
+ )}
96
+ {...props}
97
+ >
98
+ <MoreHorizontalIcon />
99
+ <span className="sr-only">More pages</span>
100
+ </span>
101
+ );
102
+ }
103
+
104
+ export {
105
+ Pagination,
106
+ PaginationContent,
107
+ PaginationEllipsis,
108
+ PaginationItem,
109
+ PaginationLink,
110
+ PaginationNext,
111
+ PaginationPrevious,
112
+ };