@jirawatpyk/aura-react 4.4.2 → 4.5.1

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  AURA Design System components as a real React package — ES modules, TypeScript types, server-rendering safe, Thai-first.
4
4
 
5
+ **See every component live: [Storybook](https://jirawatpyk.github.io/Aura-design/)**
6
+
5
7
  ## Try it without a build (CDN)
6
8
 
7
9
  One HTML file, no install — the packages are on npmjs, so jsDelivr serves them:
@@ -27,7 +29,7 @@ One HTML file, no install — the packages are on npmjs, so jsDelivr serves them
27
29
  ## Install
28
30
 
29
31
  ```bash
30
- npm i @jirawatpyk/aura-react @jirawatpyk/aura-tokens # react >= 18 is a peer; import from "@jirawatpyk/aura-react"
32
+ npm i @jirawatpyk/aura-react @jirawatpyk/aura-tokens # React 18 or 19; import from "@jirawatpyk/aura-react"
31
33
  # or under the short names the docs use (imports stay `@aura/...`):
32
34
  npm i @aura/react@npm:@jirawatpyk/aura-react @aura/tokens@npm:@jirawatpyk/aura-tokens
33
35
  ```
@@ -59,7 +61,7 @@ export default function Root() {
59
61
  | `dist/cjs/index.cjs` | `require()` / Jest. |
60
62
  | `dist/aura.bundle.js` | A classic `<script>` that sets `window.Aura` (needs `window.React` / `window.ReactDOM`). The design-system artifact uses this file. |
61
63
  | `dist/styles.css` | Component CSS (no font import). |
62
- | `dist/index.d.ts` | Types for every component and helper. |
64
+ | `dist/index.d.ts` | Types for every component and helper, generated from the TypeScript sources (one file). |
63
65
 
64
66
  ## Components (43)
65
67
 
@@ -86,10 +88,14 @@ Portals (Dialog, Drawer, menus, pickers, toasts) wait until after hydration; `us
86
88
  ```bash
87
89
  npm run build # dist/ (ESM, CJS, IIFE, CSS, types)
88
90
  npm run test:ssr # server-render every component
89
- npm run typecheck # compile types-test/usage.tsx against index.d.ts
91
+ npm run typecheck # tsc --strict over src/, then types-test/usage.tsx against the public API
90
92
  npm run test:pilots # builds the pilots + 4 brand themes, then 37 behaviour/axe checks at 1440/820/390px (Playwright for Python, axe-core)
91
93
  ```
92
94
 
95
+ ## Source
96
+
97
+ `src/` is TypeScript (strict) and JSX, formatted with Prettier (`npm run format`). Public prop types live in `src/types.ts` with their docs; each component imports its props from there and `forwardRef`s with them, so the published `dist/index.d.ts` is generated from the code and can't drift from it. The build compiles JSX to `React.createElement` (classic runtime), so the `window.Aura` script needs only `window.React`.
98
+
93
99
  ## Pilots
94
100
 
95
101
  `examples/settings/` (form-heavy, English, react-hook-form) and `examples/landing/` (Creative, re-branded live) join `examples/orders/`, a real admin page (orders for any business) built only from these components — AppShell, filters, DataTable with row actions, detail Drawer, New Order Dialog, confirmations, toasts. Build them with `npm run examples`, then open `examples/<name>/dist/index.html`. It is the reference for responsive behaviour at 390px, 820px and 1440px.