@ship-it-ui/ui 0.0.1 → 0.0.2
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 +9 -4
- package/dist/index.cjs +1907 -1041
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +225 -62
- package/dist/index.d.ts +225 -62
- package/dist/index.js +1681 -776
- package/dist/index.js.map +1 -1
- package/package.json +18 -6
- package/src/styles/animations.css +11 -0
- package/src/styles/globals.css +30 -0
package/README.md
CHANGED
|
@@ -2,20 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
The React component library for the Ship-It design system.
|
|
4
4
|
|
|
5
|
+
## How this fits in
|
|
6
|
+
|
|
7
|
+
Part of the [Ship-It Design System](../../docs/architecture.md). See the
|
|
8
|
+
architecture overview for how `@ship-it-ui/tokens`, `@ship-it-ui/icons`,
|
|
9
|
+
`@ship-it-ui/ui`, and `@ship-it-ui/shipit` compose.
|
|
10
|
+
|
|
5
11
|
## Architecture
|
|
6
12
|
|
|
7
13
|
```
|
|
8
14
|
src/
|
|
9
|
-
├── components/ Atomic
|
|
15
|
+
├── components/ Atomic components (Button, Input, Avatar, Dialog, …)
|
|
10
16
|
│ └── Button/
|
|
11
17
|
│ ├── Button.tsx Component + cva variant definitions
|
|
12
18
|
│ ├── Button.stories.tsx Storybook stories (also serve as autodocs)
|
|
13
19
|
│ ├── Button.test.tsx Vitest + Testing Library + vitest-axe
|
|
14
20
|
│ └── index.ts Re-exports the component + types
|
|
15
|
-
├── patterns/ Composites of
|
|
21
|
+
├── patterns/ Composites of components (Tabs, Combobox, DataTable, …)
|
|
16
22
|
├── hooks/ useEscape, useOutsideClick, useTheme, useDisclosure,
|
|
17
23
|
│ useControllableState, useKeyboardList
|
|
18
|
-
├── primitives/ Thin wrappers over Radix when we want a Ship-It-flavored API
|
|
19
24
|
├── utils/
|
|
20
25
|
│ └── cn.ts clsx + tailwind-merge
|
|
21
26
|
├── styles/
|
|
@@ -51,7 +56,7 @@ step-by-step guide. In short:
|
|
|
51
56
|
|
|
52
57
|
## Conventions
|
|
53
58
|
|
|
54
|
-
- **Always consume semantic tokens**, never primitive ones. `bg-
|
|
59
|
+
- **Always consume semantic tokens**, never primitive ones. `bg-accent`, not `bg-indigo-600`.
|
|
55
60
|
- **Forward refs**. Every component uses `forwardRef` so consumers can attach refs and
|
|
56
61
|
Radix integrations can wire focus management.
|
|
57
62
|
- **`asChild` polymorphism**. Use `@radix-ui/react-slot` for components that should be
|