@wordpress/ui 0.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.
- package/CONTRIBUTING.md +27 -0
- package/LICENSE.md +788 -0
- package/README.md +82 -0
- package/build-types/box/box.d.ts +10 -0
- package/build-types/box/box.d.ts.map +1 -0
- package/build-types/box/index.d.ts +2 -0
- package/build-types/box/index.d.ts.map +1 -0
- package/build-types/box/stories/index.story.d.ts +15 -0
- package/build-types/box/stories/index.story.d.ts.map +1 -0
- package/build-types/box/types.d.ts +58 -0
- package/build-types/box/types.d.ts.map +1 -0
- package/build-types/index.d.ts +2 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/utils/element.d.ts +17 -0
- package/build-types/utils/element.d.ts.map +1 -0
- package/build-types/utils/types.d.ts +21 -0
- package/build-types/utils/types.d.ts.map +1 -0
- package/package.json +50 -0
- package/src/box/box.tsx +113 -0
- package/src/box/index.ts +1 -0
- package/src/box/stories/index.story.tsx +66 -0
- package/src/box/types.ts +95 -0
- package/src/index.ts +1 -0
- package/src/lock-unlock.ts +10 -0
- package/src/utils/element.ts +38 -0
- package/src/utils/types.ts +34 -0
- package/tsconfig.json +13 -0
- package/tsconfig.tsbuildinfo +1 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
The following guidance builds upon the existing [contribution guidelines for `@wordpress/components`](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/CONTRIBUTING.md), which should serve as a starting point for contribution. The documentation included here encodes decisions and technical approaches which are unique to this package.
|
|
4
|
+
|
|
5
|
+
## Folder Structure
|
|
6
|
+
|
|
7
|
+
Each component should be organized within its own folder under `src/` following this pattern:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
src/
|
|
11
|
+
└── component-name/
|
|
12
|
+
├── index.ts // Contains only exported public API
|
|
13
|
+
├── component-name.tsx // Main component matching the folder name (when applicable)
|
|
14
|
+
├── other-component.tsx // Any other ancillary / compound components
|
|
15
|
+
├── types.ts // TypeScript type definitions for all components in this folder
|
|
16
|
+
├── style.module.css // Styles for all components in this folder
|
|
17
|
+
├── stories/
|
|
18
|
+
│ ├── *.mdx // Storybook documentation files (optional)
|
|
19
|
+
│ └── index.story.tsx // Storybook stories for all components in this folder
|
|
20
|
+
└── test/
|
|
21
|
+
└── component-name.test.tsx // Tests for base component and all compound components
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Folder Structure Guidelines
|
|
25
|
+
|
|
26
|
+
- The folder name should match the primary component name
|
|
27
|
+
- The `index.ts` file should contain only the public API exports for the component(s)
|