@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 +9 -3
- package/dist/aura.bundle.js +2558 -2059
- package/dist/cjs/index.cjs +2556 -2059
- package/dist/esm/Button.js +9 -9
- package/dist/esm/Checkbox.js +41 -33
- package/dist/esm/Combobox.js +145 -127
- package/dist/esm/DataTable.js +637 -496
- package/dist/esm/DatePicker.js +379 -306
- package/dist/esm/Dialog.js +49 -60
- package/dist/esm/DropdownMenu.js +10 -13
- package/dist/esm/FileUpload.js +91 -73
- package/dist/esm/Icon.js +27 -22
- package/dist/esm/IconButton.js +13 -9
- package/dist/esm/Menu.js +78 -66
- package/dist/esm/Stat.js +9 -26
- package/dist/esm/StatusPill.js +12 -13
- package/dist/esm/Surface.js +17 -13
- package/dist/esm/ThemeStyle.js +9 -5
- package/dist/esm/TimePicker.js +155 -127
- package/dist/esm/extra.js +270 -186
- package/dist/esm/feedback.js +113 -85
- package/dist/esm/forms.js +144 -113
- package/dist/esm/internal.js +33 -23
- package/dist/esm/layout.js +114 -129
- package/dist/esm/layout2.js +69 -45
- package/dist/esm/locale.js +15 -9
- package/dist/esm/overlay.js +22 -19
- package/dist/esm/theme.js +101 -49
- package/dist/index.d.ts +916 -753
- package/package.json +11 -8
- package/scripts/aura-theme.mjs +1 -1
- package/src/theme.js +0 -147
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 #
|
|
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 #
|
|
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.
|