@react-ui-org/react-ui 0.64.1 → 0.66.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 (311) hide show
  1. package/README.md +3 -6
  2. package/dist/react-ui.css +16 -16
  3. package/dist/react-ui.d.ts +1936 -0
  4. package/dist/react-ui.development.css +3591 -3003
  5. package/dist/react-ui.development.js +2028 -1060
  6. package/dist/react-ui.js +1 -1
  7. package/package.json +74 -70
  8. package/src/components/Alert/{Alert.jsx → Alert.tsx} +8 -43
  9. package/src/components/Alert/Alert.types.ts +34 -0
  10. package/src/components/Alert/README.md +1 -1
  11. package/src/components/Alert/index.ts +2 -0
  12. package/src/components/Badge/Badge.tsx +30 -0
  13. package/src/components/Badge/Badge.types.ts +24 -0
  14. package/src/components/Badge/README.md +1 -1
  15. package/src/components/Badge/index.ts +5 -0
  16. package/src/components/Button/Button.tsx +110 -0
  17. package/src/components/Button/Button.types.ts +93 -0
  18. package/src/components/Button/README.md +1 -1
  19. package/src/components/Button/helpers/{getRootLabelVisibilityClassName.js → getRootLabelVisibilityClassName.ts} +5 -2
  20. package/src/components/Button/index.ts +6 -0
  21. package/src/components/ButtonGroup/{ButtonGroup.jsx → ButtonGroup.tsx} +9 -40
  22. package/src/components/ButtonGroup/ButtonGroup.types.ts +45 -0
  23. package/src/components/ButtonGroup/ButtonGroupContext.ts +4 -0
  24. package/src/components/ButtonGroup/README.md +1 -1
  25. package/src/components/ButtonGroup/{index.js → index.ts} +4 -0
  26. package/src/components/Card/Card.tsx +33 -0
  27. package/src/components/Card/Card.types.ts +46 -0
  28. package/src/components/Card/{CardBody.jsx → CardBody.tsx} +4 -11
  29. package/src/components/Card/{CardFooter.jsx → CardFooter.tsx} +4 -15
  30. package/src/components/Card/README.md +6 -7
  31. package/src/components/Card/{index.js → index.ts} +5 -0
  32. package/src/components/CheckboxField/CheckboxField.module.scss +7 -3
  33. package/src/components/CheckboxField/CheckboxField.tsx +81 -0
  34. package/src/components/CheckboxField/CheckboxField.types.ts +64 -0
  35. package/src/components/CheckboxField/README.md +92 -45
  36. package/src/components/CheckboxField/index.ts +5 -0
  37. package/src/components/FileInputField/FileInputField.module.scss +7 -3
  38. package/src/components/FileInputField/{FileInputField.jsx → FileInputField.tsx} +43 -129
  39. package/src/components/FileInputField/FileInputField.types.ts +101 -0
  40. package/src/components/FileInputField/README.md +21 -4
  41. package/src/components/FileInputField/index.ts +6 -0
  42. package/src/components/FormLayout/FormLayout.module.scss +5 -7
  43. package/src/components/FormLayout/{FormLayout.jsx → FormLayout.tsx} +15 -50
  44. package/src/components/FormLayout/FormLayout.types.ts +55 -0
  45. package/src/components/FormLayout/FormLayoutContext.ts +4 -0
  46. package/src/components/FormLayout/FormLayoutCustomField.module.scss +7 -3
  47. package/src/components/FormLayout/{FormLayoutCustomField.jsx → FormLayoutCustomField.tsx} +12 -67
  48. package/src/components/FormLayout/FormLayoutCustomField.types.ts +60 -0
  49. package/src/components/FormLayout/FormLayoutCustomFieldContext.ts +4 -0
  50. package/src/components/FormLayout/README.md +6 -15
  51. package/src/components/FormLayout/index.ts +14 -0
  52. package/src/components/Grid/Grid.module.scss +1 -1
  53. package/src/components/Grid/Grid.tsx +50 -0
  54. package/src/components/Grid/Grid.types.ts +108 -0
  55. package/src/components/Grid/GridSpan.tsx +36 -0
  56. package/src/components/Grid/README.md +2 -2
  57. package/src/components/Grid/_helpers/generateResponsiveCustomProperties.ts +33 -0
  58. package/src/components/Grid/index.ts +9 -0
  59. package/src/components/InputGroup/InputGroup.module.scss +7 -3
  60. package/src/components/InputGroup/{InputGroup.jsx → InputGroup.tsx} +25 -95
  61. package/src/components/InputGroup/InputGroup.types.ts +80 -0
  62. package/src/components/InputGroup/InputGroupContext.ts +4 -0
  63. package/src/components/InputGroup/README.md +40 -8
  64. package/src/components/InputGroup/{index.js → index.ts} +4 -0
  65. package/src/components/Modal/Modal.tsx +172 -0
  66. package/src/components/Modal/Modal.types.ts +181 -0
  67. package/src/components/Modal/ModalBody.tsx +34 -0
  68. package/src/components/Modal/{ModalCloseButton.jsx → ModalCloseButton.tsx} +6 -19
  69. package/src/components/Modal/{ModalContent.jsx → ModalContent.tsx} +4 -15
  70. package/src/components/Modal/ModalFooter.tsx +27 -0
  71. package/src/components/Modal/ModalHeader.tsx +27 -0
  72. package/src/components/Modal/ModalTitle.tsx +29 -0
  73. package/src/components/Modal/README.md +9 -9
  74. package/src/components/Modal/_helpers/{dialogOnCancelHandler.js → dialogOnCancelHandler.ts} +11 -1
  75. package/src/components/Modal/_helpers/{dialogOnClickHandler.js → dialogOnClickHandler.ts} +13 -7
  76. package/src/components/Modal/_helpers/{dialogOnCloseHandler.js → dialogOnCloseHandler.ts} +11 -1
  77. package/src/components/Modal/_helpers/{dialogOnKeyDownHandler.js → dialogOnKeyDownHandler.ts} +19 -6
  78. package/src/components/Modal/_helpers/{getJustifyClassName.js → getJustifyClassName.ts} +4 -1
  79. package/src/components/Modal/_helpers/getPositionClassName.ts +10 -0
  80. package/src/components/Modal/_helpers/getScrollingClassName.ts +14 -0
  81. package/src/components/Modal/_helpers/{getSizeClassName.js → getSizeClassName.ts} +4 -1
  82. package/src/components/Modal/_hooks/{useModalFocus.js → useModalFocus.ts} +9 -5
  83. package/src/components/Modal/_hooks/{useModalScrollPrevention.js → useModalScrollPrevention.ts} +4 -1
  84. package/src/components/Modal/{index.js → index.ts} +14 -0
  85. package/src/components/Paper/{Paper.jsx → Paper.tsx} +6 -26
  86. package/src/components/Paper/Paper.types.ts +19 -0
  87. package/src/components/Paper/README.md +3 -4
  88. package/src/components/Paper/index.ts +2 -0
  89. package/src/components/Popover/Popover.module.scss +1 -1
  90. package/src/components/Popover/Popover.tsx +61 -0
  91. package/src/components/Popover/Popover.types.ts +75 -0
  92. package/src/components/Popover/PopoverWrapper.tsx +27 -0
  93. package/src/components/Popover/README.md +34 -22
  94. package/src/components/Popover/_helpers/{cleanPlacementStyle.js → cleanPlacementStyle.ts} +4 -1
  95. package/src/components/Popover/_helpers/{getRootAlignmentClassName.js → getRootAlignmentClassName.ts} +4 -1
  96. package/src/components/Popover/_helpers/{getRootSideClassName.js → getRootSideClassName.ts} +4 -1
  97. package/src/components/Popover/index.ts +8 -0
  98. package/src/components/Radio/README.md +125 -48
  99. package/src/components/Radio/Radio.module.scss +7 -3
  100. package/src/components/Radio/Radio.tsx +116 -0
  101. package/src/components/Radio/Radio.types.ts +91 -0
  102. package/src/components/Radio/index.ts +5 -0
  103. package/src/components/ScrollView/README.md +1 -1
  104. package/src/components/ScrollView/ScrollView.module.scss +5 -0
  105. package/src/components/ScrollView/{ScrollView.jsx → ScrollView.tsx} +55 -166
  106. package/src/components/ScrollView/ScrollView.types.ts +121 -0
  107. package/src/components/ScrollView/_helpers/getElementsPositionDifference.ts +17 -0
  108. package/src/components/ScrollView/_hooks/{useLoadResizeHook.js → useLoadResizeHook.ts} +14 -3
  109. package/src/components/ScrollView/_hooks/{useScrollPositionHook.js → useScrollPositionHook.ts} +11 -4
  110. package/src/components/ScrollView/index.ts +6 -0
  111. package/src/components/SelectField/README.md +137 -51
  112. package/src/components/SelectField/SelectField.module.scss +7 -3
  113. package/src/components/SelectField/SelectField.tsx +139 -0
  114. package/src/components/SelectField/SelectField.types.ts +121 -0
  115. package/src/components/SelectField/_components/Option/Option.tsx +19 -0
  116. package/src/components/SelectField/_components/Option/Option.types.ts +21 -0
  117. package/src/components/SelectField/_components/Option/index.ts +2 -0
  118. package/src/components/SelectField/index.ts +7 -0
  119. package/src/components/Table/README.md +1 -1
  120. package/src/components/Table/{Table.jsx → Table.tsx} +4 -43
  121. package/src/components/Table/Table.types.ts +51 -0
  122. package/src/components/Table/_components/TableBodyCell/TableBodyCell.tsx +20 -0
  123. package/src/components/Table/_components/TableBodyCell/TableBodyCell.types.ts +20 -0
  124. package/src/components/Table/_components/TableBodyCell/index.ts +2 -0
  125. package/src/components/Table/_components/TableHeaderCell/{TableHeaderCell.jsx → TableHeaderCell.tsx} +3 -34
  126. package/src/components/Table/_components/TableHeaderCell/TableHeaderCell.types.ts +20 -0
  127. package/src/components/Table/_components/TableHeaderCell/index.ts +2 -0
  128. package/src/components/Table/index.ts +8 -0
  129. package/src/components/Tabs/README.md +2 -2
  130. package/src/components/Tabs/{Tabs.jsx → Tabs.tsx} +4 -20
  131. package/src/components/Tabs/Tabs.types.ts +19 -0
  132. package/src/components/Tabs/TabsItem.tsx +49 -0
  133. package/src/components/Tabs/TabsItem.types.ts +42 -0
  134. package/src/components/Tabs/index.ts +4 -0
  135. package/src/components/Text/README.md +1 -1
  136. package/src/components/Text/Text.module.scss +5 -7
  137. package/src/components/Text/Text.tsx +46 -0
  138. package/src/components/Text/Text.types.ts +31 -0
  139. package/src/components/Text/_helpers/getRootClampClassName.ts +13 -0
  140. package/src/components/Text/_helpers/getRootHyphensClassName.ts +14 -0
  141. package/src/components/Text/_helpers/getRootWordWrappingClassName.ts +14 -0
  142. package/src/components/Text/index.ts +6 -0
  143. package/src/components/TextArea/README.md +35 -14
  144. package/src/components/TextArea/TextArea.module.scss +7 -3
  145. package/src/components/TextArea/TextArea.tsx +95 -0
  146. package/src/components/TextArea/TextArea.types.ts +76 -0
  147. package/src/components/TextArea/index.ts +5 -0
  148. package/src/components/TextField/README.md +35 -13
  149. package/src/components/TextField/TextField.module.scss +7 -3
  150. package/src/components/TextField/TextField.tsx +112 -0
  151. package/src/components/TextField/TextField.types.ts +95 -0
  152. package/src/components/TextField/index.ts +6 -0
  153. package/src/components/TextLink/README.md +2 -2
  154. package/src/components/TextLink/{TextLink.jsx → TextLink.tsx} +4 -15
  155. package/src/components/TextLink/TextLink.types.ts +12 -0
  156. package/src/components/TextLink/index.ts +2 -0
  157. package/src/components/Toggle/README.md +92 -45
  158. package/src/components/Toggle/Toggle.module.scss +7 -3
  159. package/src/components/Toggle/Toggle.tsx +82 -0
  160. package/src/components/Toggle/Toggle.types.ts +59 -0
  161. package/src/components/Toggle/index.ts +5 -0
  162. package/src/components/Toolbar/README.md +3 -3
  163. package/src/components/Toolbar/Toolbar.tsx +41 -0
  164. package/src/components/Toolbar/Toolbar.types.ts +74 -0
  165. package/src/components/Toolbar/ToolbarGroup.tsx +38 -0
  166. package/src/components/Toolbar/{ToolbarItem.jsx → ToolbarItem.tsx} +5 -21
  167. package/src/components/Toolbar/_helpers/{getAlignClassName.js → getAlignClassName.ts} +8 -1
  168. package/src/components/Toolbar/_helpers/{getJustifyClassName.js → getJustifyClassName.ts} +4 -1
  169. package/src/components/Toolbar/{index.js → index.ts} +7 -0
  170. package/src/components/_helpers/{getRootColorClassName.js → getRootColorClassName.ts} +7 -2
  171. package/src/components/_helpers/{getRootPriorityClassName.js → getRootPriorityClassName.ts} +7 -2
  172. package/src/components/_helpers/{getRootSizeClassName.js → getRootSizeClassName.ts} +7 -2
  173. package/src/components/_helpers/getRootStateClassName.ts +24 -0
  174. package/src/components/_helpers/resolveContextOrProp.ts +13 -0
  175. package/src/helpers/classNames/{classNames.js → classNames.ts} +2 -2
  176. package/src/helpers/isChildrenEmpty/isChildrenEmpty.ts +5 -0
  177. package/src/helpers/transferProps/transferProps.ts +50 -0
  178. package/src/helpers/transferProps/transferProps.types.ts +11 -0
  179. package/src/index.ts +211 -0
  180. package/src/providers/globalProps/GlobalProps.types.ts +30 -0
  181. package/src/providers/globalProps/GlobalPropsContext.ts +6 -0
  182. package/src/providers/globalProps/{GlobalPropsProvider.jsx → GlobalPropsProvider.tsx} +8 -15
  183. package/src/providers/globalProps/{index.js → index.ts} +4 -0
  184. package/src/providers/globalProps/withGlobalProps.tsx +36 -0
  185. package/src/providers/translations/Translations.types.ts +26 -0
  186. package/src/providers/translations/TranslationsContext.ts +7 -0
  187. package/src/providers/translations/{TranslationsProvider.jsx → TranslationsProvider.tsx} +8 -15
  188. package/src/providers/translations/{index.js → index.ts} +5 -0
  189. package/src/styles/settings/_form-fields.scss +2 -1
  190. package/src/styles/theme/_form-fields.scss +16 -11
  191. package/src/styles/theme-constants/_colors.scss +21 -0
  192. package/src/styles/tools/_accessibility.scss +2 -2
  193. package/src/styles/tools/form-fields/_box-field-layout.scss +5 -8
  194. package/src/styles/tools/form-fields/_inline-field-elements.scss +0 -7
  195. package/src/styles/tools/form-fields/_inline-field-layout.scss +0 -8
  196. package/src/styles/tools/form-fields/_variants.scss +7 -7
  197. package/src/theme.scss +37 -12
  198. package/src/translations/{en.js → en.ts} +3 -1
  199. package/src/types/breakpoints.ts +1 -0
  200. package/src/types/colors.ts +7 -0
  201. package/src/types/index.ts +13 -0
  202. package/src/types/labelPositions.ts +1 -0
  203. package/src/types/layouts.ts +1 -0
  204. package/src/types/modules.d.ts +16 -0
  205. package/src/types/priorities.ts +1 -0
  206. package/src/types/sizes.ts +1 -0
  207. package/src/types/states.ts +1 -0
  208. package/src/types/styles.ts +4 -0
  209. package/src/utils/mergeDeep.ts +34 -0
  210. package/src/utils/mergeDeep.types.ts +4 -0
  211. package/.claude/agents/code-reviewer.md +0 -122
  212. package/.claude/rules/code.md +0 -22
  213. package/.claude/rules/docs.md +0 -35
  214. package/.claude/rules/frontend.md +0 -72
  215. package/.claude/rules/git.md +0 -13
  216. package/.claude/rules/safety-guards.md +0 -9
  217. package/.claude/rules/styling.md +0 -32
  218. package/.claude/rules/testing.md +0 -59
  219. package/.claude/settings.json +0 -32
  220. package/.claude/skills/commit/SKILL.md +0 -54
  221. package/.devcontainer/devcontainer.json +0 -23
  222. package/.eslintrc-ts +0 -40
  223. package/.mcp.json +0 -8
  224. package/.nvmrc +0 -1
  225. package/CLAUDE.md +0 -82
  226. package/docker-compose.base.yml +0 -93
  227. package/docker-compose.yml.dist +0 -41
  228. package/jest.config-ts.js +0 -34
  229. package/opencode.json +0 -10
  230. package/playwright-ct.config.ts +0 -68
  231. package/scripts/auto-start-mkdocs.sh +0 -5
  232. package/scripts/auto-start-node.sh +0 -33
  233. package/scripts/mcps/chrome-host/README.md +0 -118
  234. package/scripts/mcps/chrome-host/cdp_proxy.py +0 -90
  235. package/scripts/mcps/chrome-host/mcp-entry.sh +0 -33
  236. package/scripts/mcps/chrome-host/mcp-launch.sh +0 -36
  237. package/scripts/mcps/chrome-host/mcp-setup.sh +0 -70
  238. package/scripts/mcps/chrome-host/start-host-chrome.sh +0 -267
  239. package/setup.sh +0 -107
  240. package/src/CNAME +0 -1
  241. package/src/components/Alert/index.js +0 -1
  242. package/src/components/Badge/Badge.jsx +0 -51
  243. package/src/components/Badge/index.js +0 -1
  244. package/src/components/Button/Button.jsx +0 -203
  245. package/src/components/Button/helpers/getRootPriorityClassName.js +0 -15
  246. package/src/components/Button/index.js +0 -1
  247. package/src/components/ButtonGroup/ButtonGroupContext.js +0 -3
  248. package/src/components/Card/Card.jsx +0 -67
  249. package/src/components/CheckboxField/CheckboxField.jsx +0 -144
  250. package/src/components/CheckboxField/index.js +0 -1
  251. package/src/components/FileInputField/index.js +0 -1
  252. package/src/components/FormLayout/FormLayoutContext.js +0 -3
  253. package/src/components/FormLayout/FormLayoutCustomFieldContext.js +0 -3
  254. package/src/components/FormLayout/index.js +0 -4
  255. package/src/components/Grid/Grid.jsx +0 -225
  256. package/src/components/Grid/GridSpan.jsx +0 -88
  257. package/src/components/Grid/_helpers/generateResponsiveCustomProperties.js +0 -22
  258. package/src/components/Grid/index.js +0 -2
  259. package/src/components/InputGroup/InputGroupContext.js +0 -3
  260. package/src/components/Modal/Modal.jsx +0 -262
  261. package/src/components/Modal/ModalBody.jsx +0 -60
  262. package/src/components/Modal/ModalFooter.jsx +0 -42
  263. package/src/components/Modal/ModalHeader.jsx +0 -42
  264. package/src/components/Modal/ModalTitle.jsx +0 -42
  265. package/src/components/Modal/_helpers/getPositionClassName.js +0 -7
  266. package/src/components/Modal/_helpers/getScrollingClassName.js +0 -11
  267. package/src/components/Paper/index.js +0 -1
  268. package/src/components/Popover/Popover.jsx +0 -124
  269. package/src/components/Popover/PopoverWrapper.jsx +0 -38
  270. package/src/components/Popover/index.js +0 -2
  271. package/src/components/Radio/Radio.jsx +0 -212
  272. package/src/components/Radio/index.js +0 -1
  273. package/src/components/ScrollView/_helpers/getElementsPositionDifference.js +0 -11
  274. package/src/components/ScrollView/index.js +0 -1
  275. package/src/components/SelectField/SelectField.jsx +0 -272
  276. package/src/components/SelectField/_components/Option/Option.jsx +0 -46
  277. package/src/components/SelectField/_components/Option/index.js +0 -1
  278. package/src/components/SelectField/index.js +0 -1
  279. package/src/components/Table/_components/TableBodyCell/TableBodyCell.jsx +0 -46
  280. package/src/components/Table/_components/TableBodyCell/index.js +0 -1
  281. package/src/components/Table/_components/TableHeaderCell/index.js +0 -1
  282. package/src/components/Table/index.js +0 -1
  283. package/src/components/Tabs/TabsItem.jsx +0 -91
  284. package/src/components/Tabs/index.js +0 -2
  285. package/src/components/Text/Text.jsx +0 -76
  286. package/src/components/Text/_helpers/getRootClampClassName.js +0 -11
  287. package/src/components/Text/_helpers/getRootHyphensClassName.js +0 -11
  288. package/src/components/Text/_helpers/getRootWordWrappingClassName.js +0 -11
  289. package/src/components/Text/index.js +0 -1
  290. package/src/components/TextArea/TextArea.jsx +0 -174
  291. package/src/components/TextArea/index.js +0 -1
  292. package/src/components/TextField/TextField.jsx +0 -208
  293. package/src/components/TextField/index.js +0 -1
  294. package/src/components/TextLink/index.js +0 -1
  295. package/src/components/Toggle/Toggle.jsx +0 -144
  296. package/src/components/Toggle/index.js +0 -1
  297. package/src/components/Toolbar/Toolbar.jsx +0 -76
  298. package/src/components/Toolbar/ToolbarGroup.jsx +0 -64
  299. package/src/components/_helpers/getRootValidationStateClassName.js +0 -15
  300. package/src/components/_helpers/resolveContextOrProp.js +0 -10
  301. package/src/helpers/isChildrenEmpty/isChildrenEmpty.js +0 -3
  302. package/src/helpers/transferProps/transferProps.js +0 -38
  303. package/src/index.js +0 -67
  304. package/src/providers/globalProps/GlobalPropsContext.jsx +0 -5
  305. package/src/providers/globalProps/withGlobalProps.jsx +0 -38
  306. package/src/providers/translations/TranslationsContext.jsx +0 -6
  307. package/src/utils/mergeDeep.js +0 -28
  308. package/tsconfig.json +0 -27
  309. /package/src/helpers/classNames/{index.js → index.ts} +0 -0
  310. /package/src/helpers/isChildrenEmpty/{index.js → index.ts} +0 -0
  311. /package/src/helpers/transferProps/{index.js → index.ts} +0 -0
@@ -34,6 +34,11 @@ $help: #6610f2;
34
34
  $info: #17a2b8;
35
35
  $note: #007bff;
36
36
 
37
+ $state-valid: #2f9e44;
38
+ $state-invalid: #e03131;
39
+ $state-warning: #f59f00;
40
+ $state-changed: #b5179e;
41
+
37
42
  $white: #fff;
38
43
  $black: #000;
39
44
 
@@ -81,3 +86,19 @@ $note-light: colors.lighten-color($note, $_amount-light);
81
86
  $note-dark: colors.darken-color($note, $_amount-dark);
82
87
  $note-darker: colors.darken-color($note, $_amount-darker);
83
88
  $on-note: $white;
89
+
90
+ $state-valid-light: colors.lighten-color($state-valid, $_amount-light);
91
+ $state-valid-dark: colors.darken-color($state-valid, $_amount-dark);
92
+ $state-valid-darker: colors.darken-color($state-valid, $_amount-darker);
93
+
94
+ $state-invalid-light: colors.lighten-color($state-invalid, $_amount-light);
95
+ $state-invalid-dark: colors.darken-color($state-invalid, $_amount-dark);
96
+ $state-invalid-darker: colors.darken-color($state-invalid, $_amount-darker);
97
+
98
+ $state-warning-light: colors.lighten-color($state-warning, $_amount-light);
99
+ $state-warning-dark: colors.darken-color($state-warning, $_amount-dark);
100
+ $state-warning-darker: colors.darken-color($state-warning, $_amount-darker);
101
+
102
+ $state-changed-light: colors.lighten-color($state-changed, $_amount-light);
103
+ $state-changed-dark: colors.darken-color($state-changed, $_amount-dark);
104
+ $state-changed-darker: colors.darken-color($state-changed, $_amount-darker);
@@ -8,21 +8,21 @@
8
8
  // 1.
9
9
  @mixin hide-text() {
10
10
  position: absolute;
11
+ clip-path: inset(50%);
11
12
  width: 1px;
12
13
  height: 1px;
13
14
  padding: 0;
14
15
  overflow: hidden;
15
- clip: rect(0, 0, 0, 0);
16
16
  white-space: nowrap;
17
17
  border: 0;
18
18
  }
19
19
 
20
20
  @mixin unhide-text() {
21
21
  position: unset;
22
+ clip-path: unset;
22
23
  width: unset;
23
24
  height: unset;
24
25
  overflow: unset;
25
- clip: unset;
26
26
  white-space: unset;
27
27
  }
28
28
 
@@ -26,12 +26,13 @@
26
26
  // Reverted for full-width fields.
27
27
  //
28
28
  // 8. Grid settings are inherited from horizontal FormLayout and applied using `subgrid`.
29
- // A fallback is supplied to browsers that don't support `subgrid` yet.
30
29
  //
31
- // Chrome 117+ supports `subgrid` but it doesn't work for `<fieldset>`. This is why we always
32
- // use the fallback for `<fieldset>`.
30
+ // `<fieldset>` cannot be a subgrid: the HTML spec wraps its content in an anonymous box which
31
+ // breaks it, and Chrome doesn't support it at all. This is why `<fieldset>` uses
32
+ // `display: contents` instead.
33
33
  //
34
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1473242
34
+ // https://issues.chromium.org/issues/40278914
35
+ // https://github.com/whatwg/html/issues/11546
35
36
  // https://github.com/react-ui-org/react-ui/issues/232
36
37
  //
37
38
  // 9. Help texts and validation messages can take up full width of FormLayout. There is no reason
@@ -213,10 +214,6 @@
213
214
  grid: inherit;
214
215
  grid-template-columns: subgrid;
215
216
  grid-column: span 2;
216
-
217
- @supports not (grid-template-columns: subgrid) {
218
- display: contents;
219
- }
220
217
  }
221
218
 
222
219
  &.isRootLayoutHorizontal.isRootFullWidth {
@@ -6,8 +6,6 @@
6
6
  //
7
7
  // 3. Reset extra space previously added to symmetrically pad the field in FormLayout context as
8
8
  // there already is a sufficient row gap provided by FormLayout.
9
- //
10
- // 4. Destroy tap target when subgrid is not supported.
11
9
 
12
10
  @use "../../theme/typography";
13
11
  @use "../../theme/form-fields" as theme;
@@ -101,11 +99,6 @@
101
99
 
102
100
  &.isRootInFormLayout.isRootLayoutHorizontal::before {
103
101
  grid-column-start: 2;
104
-
105
- // 4.
106
- @supports not (grid-template-columns: subgrid) {
107
- display: none;
108
- }
109
102
  }
110
103
  }
111
104
  }
@@ -73,10 +73,6 @@
73
73
  grid: inherit;
74
74
  grid-template-columns: subgrid;
75
75
  grid-column: span 2;
76
-
77
- @supports not (grid-template-columns: subgrid) {
78
- display: contents;
79
- }
80
76
  }
81
77
 
82
78
  &.isRootLayoutHorizontal .field {
@@ -102,10 +98,6 @@
102
98
  &.isRootLayoutHorizontal .validationText {
103
99
  width: auto;
104
100
  max-width: 100%;
105
-
106
- @supports not (grid-template-columns: subgrid) {
107
- margin-top: calc(-1 * var(--rui-FormLayout__row-gap));
108
- }
109
101
  }
110
102
 
111
103
  &.isRootLayoutHorizontal.hasRootLabelBefore .label {
@@ -29,11 +29,11 @@
29
29
  $infix: $type;
30
30
  $fallback-state: "default";
31
31
 
32
- @if $type == "validation" {
32
+ @if $type == "state" {
33
33
  $infix: $variant;
34
34
  }
35
35
 
36
- @if $type != "validation" and $variant != "default" {
36
+ @if $type != "state" and $variant != "default" {
37
37
  $infix: #{$type}--#{$variant};
38
38
  }
39
39
 
@@ -142,10 +142,10 @@
142
142
  }
143
143
  }
144
144
 
145
- @mixin validation($variant) {
146
- --rui-local-link-color: #{map.get(theme.$link-validation-colors, $variant, default)};
147
- --rui-local-link-color-hover: #{map.get(theme.$link-validation-colors, $variant, hover)};
148
- --rui-local-link-color-active: #{map.get(theme.$link-validation-colors, $variant, active)};
145
+ @mixin state($variant) {
146
+ --rui-local-link-color: #{map.get(theme.$link-state-colors, $variant, default)};
147
+ --rui-local-link-color-hover: #{map.get(theme.$link-state-colors, $variant, hover)};
148
+ --rui-local-link-color-active: #{map.get(theme.$link-state-colors, $variant, active)};
149
149
 
150
- @include _get-theme(validation, $variant);
150
+ @include _get-theme(state, $variant);
151
151
  }
package/src/theme.scss CHANGED
@@ -208,6 +208,20 @@
208
208
  --rui-color-feedback-note-active: #{colors.$note-darker};
209
209
  --rui-color-feedback-on-note: #{colors.$on-note};
210
210
 
211
+ // State colors
212
+ --rui-color-state-valid: #{colors.$state-valid};
213
+ --rui-color-state-valid-hover: #{colors.$state-valid-dark};
214
+ --rui-color-state-valid-active: #{colors.$state-valid-darker};
215
+ --rui-color-state-invalid: #{colors.$state-invalid};
216
+ --rui-color-state-invalid-hover: #{colors.$state-invalid-dark};
217
+ --rui-color-state-invalid-active: #{colors.$state-invalid-darker};
218
+ --rui-color-state-warning: #{colors.$state-warning};
219
+ --rui-color-state-warning-hover: #{colors.$state-warning-dark};
220
+ --rui-color-state-warning-active: #{colors.$state-warning-darker};
221
+ --rui-color-state-changed: #{colors.$state-changed};
222
+ --rui-color-state-changed-hover: #{colors.$state-changed-dark};
223
+ --rui-color-state-changed-active: #{colors.$state-changed-darker};
224
+
211
225
  // Neutral colors
212
226
  --rui-color-neutral-light: #{colors.$white};
213
227
  --rui-color-neutral-light-hover: #{colors.$gray-50};
@@ -236,6 +250,10 @@
236
250
  --rui-color-background-help: #{colors.$help-light};
237
251
  --rui-color-background-info: #{colors.$info-light};
238
252
  --rui-color-background-note: #{colors.$note-light};
253
+ --rui-color-background-state-valid: #{colors.$state-valid-light};
254
+ --rui-color-background-state-invalid: #{colors.$state-invalid-light};
255
+ --rui-color-background-state-warning: #{colors.$state-warning-light};
256
+ --rui-color-background-state-changed: #{colors.$state-changed-light};
239
257
  --rui-color-background-light: #{colors.$gray-100};
240
258
  --rui-color-background-dark: #{colors.$gray-600};
241
259
 
@@ -910,27 +928,34 @@
910
928
  --rui-FormField--disabled__cursor: var(--rui-cursor-not-allowed);
911
929
  --rui-FormField--disabled__opacity: var(--rui-ratio-disabled-opacity);
912
930
 
913
- // Form fields: validation states: invalid
914
- --rui-FormField--invalid--default__border-color: var(--rui-color-feedback-danger);
915
- --rui-FormField--invalid--default__background: var(--rui-color-background-danger);
931
+ // Form fields: states: invalid
932
+ --rui-FormField--invalid--default__border-color: var(--rui-color-state-invalid);
933
+ --rui-FormField--invalid--default__background: var(--rui-color-background-state-invalid);
916
934
  --rui-FormField--invalid--default__check-background-color: var(--rui-FormField--invalid--default__background);
917
- --rui-FormField--invalid--default__surrounding-text-color: var(--rui-color-feedback-danger);
935
+ --rui-FormField--invalid--default__surrounding-text-color: var(--rui-color-state-invalid);
918
936
  --rui-FormField--invalid--checked__check-background-color: var(--rui-FormField--invalid--default__border-color);
919
937
 
920
- // Form fields: validation states: valid
921
- --rui-FormField--valid--default__border-color: var(--rui-color-feedback-success);
922
- --rui-FormField--valid--default__background: var(--rui-color-background-success);
938
+ // Form fields: states: valid
939
+ --rui-FormField--valid--default__border-color: var(--rui-color-state-valid);
940
+ --rui-FormField--valid--default__background: var(--rui-color-background-state-valid);
923
941
  --rui-FormField--valid--default__check-background-color: var(--rui-FormField--valid--default__background);
924
- --rui-FormField--valid--default__surrounding-text-color: var(--rui-color-feedback-success);
942
+ --rui-FormField--valid--default__surrounding-text-color: var(--rui-color-state-valid);
925
943
  --rui-FormField--valid--checked__check-background-color: var(--rui-FormField--valid--default__border-color);
926
944
 
927
- // Form fields: validation states: warning
928
- --rui-FormField--warning--default__border-color: var(--rui-color-feedback-warning-hover);
929
- --rui-FormField--warning--default__background: var(--rui-color-background-warning);
945
+ // Form fields: states: warning
946
+ --rui-FormField--warning--default__border-color: var(--rui-color-state-warning-hover);
947
+ --rui-FormField--warning--default__background: var(--rui-color-background-state-warning);
930
948
  --rui-FormField--warning--default__check-background-color: var(--rui-FormField--warning--default__background);
931
- --rui-FormField--warning--default__surrounding-text-color: var(--rui-color-feedback-warning-active);
949
+ --rui-FormField--warning--default__surrounding-text-color: var(--rui-color-state-warning-active);
932
950
  --rui-FormField--warning--checked__check-background-color: var(--rui-FormField--warning--default__border-color);
933
951
 
952
+ // Form fields: states: changed
953
+ --rui-FormField--changed--default__border-color: var(--rui-color-state-changed);
954
+ --rui-FormField--changed--default__background: var(--rui-color-background-state-changed);
955
+ --rui-FormField--changed--default__check-background-color: var(--rui-FormField--changed--default__background);
956
+ --rui-FormField--changed--default__surrounding-text-color: var(--rui-color-state-changed);
957
+ --rui-FormField--changed--checked__check-background-color: var(--rui-FormField--changed--default__border-color);
958
+
934
959
  // Form fields: box fields
935
960
  --rui-FormField--box__border-width: var(--rui-dimension-border-width-1);
936
961
  --rui-FormField--box__border-radius: var(--rui-dimension-radius-2);
@@ -1,4 +1,4 @@
1
- export default {
1
+ const en = {
2
2
  Alert: {
3
3
  close: 'Close',
4
4
  },
@@ -16,3 +16,5 @@ export default {
16
16
  previous: 'Previous',
17
17
  },
18
18
  };
19
+
20
+ export default en;
@@ -0,0 +1 @@
1
+ export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'x2l' | 'x3l';
@@ -0,0 +1,7 @@
1
+ export type ActionColor = 'primary' | 'secondary' | 'selected';
2
+
3
+ export type FeedbackColor = 'success' | 'warning' | 'danger' | 'help' | 'info' | 'note';
4
+
5
+ export type NeutralColor = 'light' | 'dark';
6
+
7
+ export type Color = ActionColor | FeedbackColor | NeutralColor;
@@ -0,0 +1,13 @@
1
+ export type { Breakpoint } from './breakpoints';
2
+ export type {
3
+ ActionColor,
4
+ Color,
5
+ FeedbackColor,
6
+ NeutralColor,
7
+ } from './colors';
8
+ export type { LabelPosition } from './labelPositions';
9
+ export type { Layout } from './layouts';
10
+ export type { Priority } from './priorities';
11
+ export type { Size } from './sizes';
12
+ export type { State } from './states';
13
+ export type { CssModuleClasses } from './styles';
@@ -0,0 +1 @@
1
+ export type LabelPosition = 'before' | 'after';
@@ -0,0 +1 @@
1
+ export type Layout = 'horizontal' | 'vertical';
@@ -0,0 +1,16 @@
1
+ declare module '*.module.scss' {
2
+ const classes: Readonly<Record<string, string>>;
3
+ export default classes;
4
+ }
5
+
6
+ declare module '*.scss';
7
+
8
+ declare module '*.svg' {
9
+ import type {
10
+ FunctionComponent,
11
+ SVGProps,
12
+ } from 'react';
13
+
14
+ const component: FunctionComponent<SVGProps<SVGSVGElement>>;
15
+ export default component;
16
+ }
@@ -0,0 +1 @@
1
+ export type Priority = 'filled' | 'outline' | 'flat';
@@ -0,0 +1 @@
1
+ export type Size = 'small' | 'medium' | 'large';
@@ -0,0 +1 @@
1
+ export type State = 'changed' | 'invalid' | 'valid' | 'warning';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Class names exported by a CSS Module.
3
+ */
4
+ export type CssModuleClasses = Readonly<Record<string, string>>;
@@ -0,0 +1,34 @@
1
+ import type { PlainObject } from './mergeDeep.types';
2
+
3
+ const isObject = (obj: unknown): obj is PlainObject => !!obj && typeof obj === 'object' && !Array.isArray(obj);
4
+
5
+ /**
6
+ * Performs a deep merge of objects and returns new object.
7
+ *
8
+ * The result is typed as `Result`; the caller is responsible for passing objects that make up that shape.
9
+ */
10
+ export const mergeDeep = <Result extends PlainObject = PlainObject>(
11
+ ...objects: (PlainObject | null | undefined)[]
12
+ ): Result => objects.reduce<PlainObject>(
13
+ (prev, obj) => {
14
+ if (obj == null) {
15
+ return prev;
16
+ }
17
+
18
+ const newObject = { ...prev };
19
+
20
+ Object.keys(obj).forEach((key) => {
21
+ const previousVal = prev[key];
22
+ const currentVal = obj[key];
23
+
24
+ if (isObject(previousVal) && isObject(currentVal)) {
25
+ newObject[key] = mergeDeep(previousVal, currentVal);
26
+ } else {
27
+ newObject[key] = currentVal;
28
+ }
29
+ });
30
+
31
+ return newObject;
32
+ },
33
+ {},
34
+ ) as Result;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Object that `mergeDeep` merges recursively.
3
+ */
4
+ export type PlainObject = Record<string, unknown>;
@@ -1,122 +0,0 @@
1
- ---
2
- name: code-reviewer
3
- description: Thorough review of a change against this repo's rules — intent/requirements, correctness, design, security (incl. dependency audit), and test coverage. Reviews flexibly by scope: uncommitted work, the whole branch against its base (default master), a specific commit, or a named branch — always as one combined diff. Use after implementing a change, or to review a branch before merge. Complements the generic /code-review skill, which does not know these project rules.
4
- tools: Read, Grep, Glob, Bash
5
- ---
6
-
7
- # Code Reviewer
8
-
9
- Review a change as one coherent diff and report findings only — do not edit
10
- files. Read enough of the surrounding code to judge it, read the cited rule and
11
- doc files before ruling, and cite `file:line` for every finding.
12
-
13
- ## Scope — what to review
14
-
15
- Orient first: `git status --short` and `git rev-parse --abbrev-ref HEAD`. Then
16
- pick the scope and state which you chose. Always review the **net result as a
17
- single diff, never commit-by-commit** — later commits (fixups, reverts) may
18
- correct earlier ones, and only the final state matters.
19
-
20
- * **Explicitly requested** — honour what the invocation asks for: a base branch
21
- (`git diff <branch>...HEAD`), a single commit (`git show <sha>`), or a commit
22
- range (`git diff <from>..<to>`).
23
- * **Uncommitted work present** (`git status --short` non-empty) → review the
24
- working tree against `HEAD` (`git diff HEAD`) plus any untracked files (list
25
- with `git status`, then read them).
26
- * **Clean tree** → review the whole branch against its base (default `master`):
27
- `git diff master...HEAD` (three dots = only what this branch introduced).
28
-
29
- Work top-down: first establish what the change is supposed to do, then judge
30
- whether it does so correctly, cleanly, safely, and with tests. The repo-specific
31
- rules in section 6 are the easiest to miss — do not skip them.
32
-
33
- ## 1. Intent & requirements
34
-
35
- * Establish the intent from the task / PR description and any linked issue (a
36
- GitHub issue number appears in parentheses in the commit/PR name, e.g.
37
- `(#261)`). Check the diff against it.
38
- * Is all the planned functionality present, or is something stubbed, `TODO`, or
39
- silently dropped?
40
- * Flag scope creep — unrelated changes riding along
41
- ([code.md](../rules/code.md)).
42
-
43
- ## 2. Correctness & robustness
44
-
45
- * **Error handling.** Failures are handled at the right level, not swallowed;
46
- promises are awaited; rejections are handled.
47
- * **Edge cases.** Empty / `null` / `undefined`, zero / one / many, boundary
48
- values, async ordering, and failure paths are handled. Component edge cases:
49
- missing `children`, controlled vs uncontrolled, ref forwarding.
50
- * **Resource hygiene.** `useEffect` subscriptions / listeners / timers are
51
- cleaned up; no retained references or unbounded state growth.
52
-
53
- ## 3. Design & maintainability
54
-
55
- * Clean separation of concerns; the change integrates with the existing patterns
56
- rather than introducing a parallel style — `React.forwardRef` +
57
- `withGlobalProps`, context-aware variants via `useContext`, `classNames()` for
58
- CSS Module classes, `transferProps()` for HTML attribute pass-through, CSS
59
- Modules for styles ([frontend.md](../rules/frontend.md),
60
- [styling.md](../rules/styling.md)).
61
- * Props follow the [API Guidelines](../../src/docs/contribute/api.md) and nesting
62
- follows [Composition](../../src/docs/contribute/composition.md).
63
- * DRY without premature abstraction; sound, reasonably performant code — no heavy
64
- work in render, no needless re-renders.
65
-
66
- ## 4. Security
67
-
68
- * Validate / sanitise external data; no unsafe HTML
69
- (`dangerouslySetInnerHTML`) with untrusted content; no secrets committed.
70
- * **Dependencies.** If `package.json` / `package-lock.json` changed: new
71
- dependencies need explicit approval
72
- ([safety-guards.md](../rules/safety-guards.md)); run `npm audit` (in the
73
- devcontainer) and report advisories; sanity-check the lockfile diff for
74
- unexpected or transitive version bumps.
75
-
76
- ## 5. Tests
77
-
78
- * New or changed code is covered — co-located Jest tests in `__tests__/` and/or
79
- Playwright component tests (`.spec.tsx` + `.story.tsx`); obsolete tests for
80
- removed code are deleted. Never leave a component or helper untested
81
- ([testing.md](../rules/testing.md)).
82
- * A bug-fix test must fail before the fix and pass after.
83
- * Tests assert behaviour, not implementation details.
84
-
85
- ## 6. This repo's rules
86
-
87
- Easy-to-miss invariants beyond the generic checks above:
88
-
89
- * **Lint gate** ([CLAUDE.md](../../CLAUDE.md#commands)): `npm run lint` =
90
- eslint + markdownlint + stylelint. It is not auto-run — remind the author to
91
- run `npm run lint`, `npm run test:jest`, and `npm run test:playwright-ct:all`.
92
- * **Component layout** ([frontend.md](../rules/frontend.md)): every component
93
- folder has the `.jsx` + `index.js` barrel + `*.module.scss` + `_settings`/
94
- `_theme`/`_tools` SCSS partials + `README.md` + `__tests__/`. PropTypes, not
95
- TypeScript, in source.
96
- * **CSS Modules class naming** ([styling.md](../rules/styling.md)): `root`,
97
- `isRootXxx`, `hasRootXxx`, `isRootInXxx`, `isRootLayoutXxx`.
98
- * **Docs** ([docs.md](../rules/docs.md)): component docs live in the component's
99
- `README.md`; new doc pages are wired into `mkdocs.yml`.
100
- * **Git hygiene** ([git.md](../rules/git.md)): no push or remote change without
101
- approval; commit/PR subjects imperative English with backticked symbols and a
102
- trailing `(#issue)` when one exists; **no `Co-Authored-By`**. PR names land in
103
- the changelog.
104
-
105
- ## Output format
106
-
107
- Group findings by severity. For each:
108
- `severity | file:line | rule/doc cited | what is wrong | concrete fix`.
109
-
110
- ```text
111
- ## Blocking
112
- - [requirements] src/components/Foo/Foo.jsx:42 — acceptance criterion not implemented.
113
- - [tests] src/helpers/bar/bar.js:10 (testing.md) — new helper `bar` has no test.
114
-
115
- ## Non-blocking / nits
116
- - [design] src/components/Foo/Foo.jsx:7 (frontend.md) — ref not forwarded to root element.
117
-
118
- ## Reminders
119
- - Run `npm run lint`, `npm run test:jest`, and `npm run test:playwright-ct:all` before committing.
120
- ```
121
-
122
- End with a one-line verdict: APPROVE / APPROVE WITH NITS / REQUEST CHANGES.
@@ -1,22 +0,0 @@
1
- # Code
2
-
3
- * Modify files only within defined scope, do not make changes that affect
4
- unrelated parts of the codebase, e.g. do not change unrelated comments,
5
- imports, code or documentation.
6
- * Keep changes minimal and focused.
7
- * Follow the project formatting and style sources:
8
- [.editorconfig](../../.editorconfig) (general),
9
- [.markdownlint.jsonc](../../.markdownlint.jsonc) (Markdown),
10
- [.eslintrc](../../.eslintrc) / [.eslintrc-ts](../../.eslintrc-ts)
11
- (JavaScript/TypeScript), [stylelint.config.js](../../stylelint.config.js)
12
- (SCSS).
13
- * Only fix linting/formatting issues in files you created or modified for the
14
- current task. Do not fix pre-existing issues outside that scope.
15
- * Keep comments simple and use terminology and language matching repository
16
- standards.
17
- * Revert unrelated changes. If they are worth keeping, ask the user whether to
18
- track them separately — either as a GitHub issue (propose a title and
19
- description first, and confirm before creating it) or, for small changes, on a
20
- separate branch without an issue.
21
- * Do not use one character long variable names or shortened names unless it is a
22
- common abbreviation.
@@ -1,35 +0,0 @@
1
- ---
2
- paths:
3
- - "src/docs/**"
4
- - "src/components/**/README.md"
5
- - "src/helpers/**/README.md"
6
- - "README.md"
7
- ---
8
-
9
- # Documentation
10
-
11
- ## Commands
12
-
13
- * Run `npm run markdownlint` after changes (add `-- --fix` to autofix).
14
- * Run `mkdocs build` and `mkdocs serve` to build and serve the documentation
15
- * To verify a rendered component or the docs previews in a real browser
16
- (navigate, click, screenshot, inspect the running docs site), drive host
17
- Chrome through the `chrome-host` MCP. See
18
- [AI Integration](../../src/docs/contribute/ai-integration.md).
19
-
20
- See [Commands](../../CLAUDE.md#commands).
21
-
22
- ## Conventions
23
-
24
- * Documentation is built with [Material for MkDocs][mkdocs-material] and
25
- [Docoff][docoff] (live, runnable component previews). Component docs live in
26
- each component's `README.md`; guides and foundations live under `src/docs/`.
27
- * New pages must be wired into the navigation in [mkdocs.yml](../../mkdocs.yml).
28
- * Use relative links between docs.
29
-
30
- ## Reference
31
-
32
- * [General Guidelines › Documenting](../../src/docs/contribute/general-guidelines.md#documenting)
33
-
34
- [mkdocs-material]: https://squidfunk.github.io/mkdocs-material/
35
- [docoff]: https://github.com/react-ui-org/docoff
@@ -1,72 +0,0 @@
1
- ---
2
- paths:
3
- - "src/**/*.js"
4
- - "src/**/*.jsx"
5
- ---
6
-
7
- # Frontend (React component library)
8
-
9
- ## Commands
10
-
11
- * If dependencies change, run `npm ci`.
12
- * Run `npm run eslint` after changes (add `-- --fix` to autofix).
13
- * To verify a rendered component or the docs previews in a real browser
14
- (navigate, click, screenshot, inspect the running docs site), drive host
15
- Chrome through the `chrome-host` MCP. See
16
- [AI Integration](../../src/docs/contribute/ai-integration.md).
17
-
18
- ## Stack
19
-
20
- React UI is a themeable React component library, distributed as a UMD bundle
21
- (with separate CSS) and as ESM (consumers run their own SASS pipeline).
22
- Components are plain JavaScript / JSX (Babel, no TypeScript in the source) for
23
- React 18, validated with `prop-types`. TypeScript appears only in tests and type
24
- checks.
25
-
26
- ## Component structure
27
-
28
- Each component lives in `src/components/<ComponentName>/` and follows this
29
- layout:
30
-
31
- ```text
32
- Button/
33
- Button.jsx # Component implementation (React.forwardRef + withGlobalProps)
34
- Button.module.scss # CSS Modules styles
35
- index.js # Re-exports default (withGlobalProps-wrapped) as named export
36
- _settings.scss # Component-level SCSS variables
37
- _theme.scss # CSS custom properties (design tokens)
38
- _tools.scss # SCSS mixins
39
- README.md # Docoff/MkDocs documentation with live previews
40
- helpers/ # Component-specific helper functions
41
- __tests__/
42
- Button.spec.tsx # Playwright visual + functional tests
43
- Button.story.tsx # Story components used as test fixtures
44
- _propTests/ # Reusable prop test generators (arrays of test cases)
45
- ```
46
-
47
- ## Implementation pattern
48
-
49
- Components are `.jsx` files (not `.tsx`) using PropTypes. They:
50
-
51
- 1. Use `React.forwardRef` to forward refs to the root HTML element.
52
- 2. Are wrapped with `withGlobalProps(Component, 'ComponentName')` for global prop
53
- injection; the wrapped version is the default export.
54
- 3. Use `useContext` to detect layout/group contexts (`FormLayoutContext`,
55
- `ButtonGroupContext`, `InputGroupContext`) and apply CSS class variants
56
- accordingly.
57
- 4. Use the `classNames()` helper to conditionally combine CSS Module class names.
58
- 5. Use `transferProps()` to pass through non-React HTML attributes to the root
59
- element.
60
-
61
- Honour the [API Guidelines](../../src/docs/contribute/api.md) and
62
- [Composition](../../src/docs/contribute/composition.md) when shaping props and
63
- nesting.
64
-
65
- ## Styling
66
-
67
- Component styles use SCSS with CSS Modules — see the [styling rule](styling.md).
68
-
69
- ## Tests
70
-
71
- Components are covered by Jest unit tests and table-driven Playwright component
72
- tests — see the [testing rule](testing.md).
@@ -1,13 +0,0 @@
1
- # Git
2
-
3
- ## Skills
4
-
5
- Use `/commit` to commit changes.
6
-
7
- ## Conventions
8
-
9
- Full rules are in [General Guidelines › Git Workflow](../../src/docs/contribute/general-guidelines.md#git-workflow).
10
-
11
- ## Reference
12
-
13
- * [General Guidelines › Git Workflow](../../src/docs/contribute/general-guidelines.md#git-workflow)
@@ -1,9 +0,0 @@
1
- # Safety guards
2
-
3
- * Never modify files listed in [.gitignore](../../.gitignore) unless approved
4
- in a skill
5
- * Never modify any files outside the project root
6
- * Never run shell commands that can alter system state or access sensitive data
7
- when run on the host system
8
- * Never modify the git remote (e.g. `git push`) without explicit human approval
9
- * Never introduce new dependencies without explicit human approval