@oaknational/oak-components 1.187.0 → 1.188.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.
package/README.md CHANGED
@@ -85,45 +85,63 @@ Sometimes it isn't enough to develop entirely inside Storybook and it might be n
85
85
  - 🚨 if you're an Oak engineer developing in OWA there is a convenience script and you should use `npm run remove-local-components` instead
86
86
  as it will automatically re-install the library from NPM.
87
87
 
88
- ## Structure
88
+ ## Organisational structure
89
89
 
90
- We're trying to follow the tenets of "Atomic design". [Brad Frost's book](https://atomicdesign.bradfrost.com/) is
91
- a great resource if you're just starting out building your first component for this library. It's also a great reference
92
- if you're in doubt as to where a component belongs (it can be a little fuzzy at times!).
90
+ ⚠️ When creating a new component and in doubt of which category or folder it should belong to, discuss in #oak-components Slack channel.
93
91
 
94
- Components are organised into a three tier hierarchical structure applying the following rules:
92
+ ### Components
95
93
 
96
- ### Atoms
94
+ - generic components or components used by more than one repo
95
+ - organised in the subfolders within 'Components' folder
97
96
 
98
- - Can import other atoms
99
- - Imports from molecules and organisms are forbidden!
100
- - Generic
101
- - Unstyled
102
- - Avoid embedded logic and state
103
- - No sub-components
104
- (eg. `Box`)
97
+ #### Current shared components subfolders
105
98
 
106
- ### Molecules
99
+ ##### Typography
107
100
 
108
- - Imports from atoms components and other molecules
109
- - Imports from organisms are forbidden!
110
- - Generic
111
- - Styled
112
- - Avoid embedded logic and state
113
- - No sub-components
114
- (eg. `IconButton`)
101
+ All typography related components
115
102
 
116
- ### Organisms
103
+ ##### Buttons
117
104
 
118
- - Imports from atoms, molecules and occasionally organisms
119
- - Combines multiple molecules together
120
- - Applicable to a limited range of contexts which might occur in multiple apps
121
- - Styled
122
- - May contain embedded logic or state
123
- - May be split into sub-components
124
- (eg. `SchoolInputForm`)
105
+ All buttons and icon buttons
125
106
 
126
- NB. these rules are a work in progress. Modifications may be required as the library builds.
107
+ ##### Form elements
108
+
109
+ Form elements including form elements styled as buttons
110
+
111
+ ##### Images and icons
112
+
113
+ Components to render icons, images or SVGs
114
+
115
+ ##### Messaging and feedback
116
+
117
+ Components which role is to display a message or provide feedback to the user
118
+
119
+ ##### Layout and structure
120
+
121
+ Components which are used for creating layout
122
+
123
+ ##### Navigation
124
+
125
+ Components which main role is navigation
126
+
127
+ ##### Presentational
128
+
129
+ Components which main function is presentational
130
+
131
+ #### Cookies
132
+
133
+ Cookie related layouts
134
+
135
+ ### Internal components
136
+
137
+ - an internal component is a non exported component which supports several shared Oak Components
138
+ - organised within 'Internal components' folder
139
+
140
+ ### Squad specific components
141
+
142
+ - components built to serve a specific repo
143
+ - organised within relevant squad specific folders
144
+ - for new squad specific components, build them directly within a relevant repo; the current caveat is that if squad specific component imports any of the internal components which are not exported, it needs to be built within `oak-components` - in this case build it within squad specific folder
127
145
 
128
146
  ## External Contributions
129
147