@jirawatpyk/aura-react 4.8.0 → 4.10.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 +14 -3
- package/dist/aura.bundle.js +1457 -634
- package/dist/cjs/index.cjs +1456 -633
- package/dist/esm/Breadcrumb.js +3 -2
- package/dist/esm/Button.js +5 -3
- package/dist/esm/Combobox.js +310 -235
- package/dist/esm/DataTable.js +176 -94
- package/dist/esm/DatePicker.js +85 -23
- package/dist/esm/Icon.js +12 -1
- package/dist/esm/IconButton.js +2 -2
- package/dist/esm/NumberField.js +175 -0
- package/dist/esm/Pagination.js +3 -2
- package/dist/esm/SegmentedControl.js +104 -0
- package/dist/esm/SideNav.js +116 -10
- package/dist/esm/Stat.js +7 -3
- package/dist/esm/Stepper.js +54 -0
- package/dist/esm/colorScheme.js +8 -1
- package/dist/esm/index.js +6 -0
- package/dist/esm/locale.js +121 -2
- package/dist/esm/theme.js +35 -0
- package/dist/index.d.ts +171 -34
- package/dist/styles.css +150 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,9 +63,20 @@ export default function Root() {
|
|
|
63
63
|
| `dist/styles.css` | Component CSS (no font import). |
|
|
64
64
|
| `dist/index.d.ts` | Types for every component and helper, generated from the TypeScript sources (one file). |
|
|
65
65
|
|
|
66
|
-
## Components (
|
|
66
|
+
## Components (49)
|
|
67
67
|
|
|
68
|
-
Actions: Button, IconButton, Menu, DropdownMenu, Tag · Forms: TextField, Textarea, Select, RadioGroup, Checkbox, Switch, Combobox, FileUpload (+ `formatBytes`) · Dates & times: DatePicker, DateRangePicker, Calendar, TimePicker (+ `formatDate`, `parseDate`, `parseTime`) · Feedback: Alert, Toaster/`toast()`, Tooltip, StatusPill, Badge, Progress, Skeleton, EmptyState · Overlays: Dialog, Drawer, Popover · Data: DataTable, Stat · Layout: AppShell, Container, Stack, Grid, Accordion, Pagination, Card, Tabs, SideNav, Breadcrumb, Avatar, Surface, Icon · Theme: ColorSchemeToggle, ColorSchemeScript, `useColorScheme`, ThemeStyle/`createTheme` · Hooks: `useBreakpoint`, `useResponsive`, `breakpoints`, `useAuraLocale`.
|
|
68
|
+
Actions: Button, IconButton, Menu, DropdownMenu, Tag · Forms: TextField, Textarea, NumberField, Select, RadioGroup, Checkbox, Switch, SegmentedControl, Combobox (one value, or `multiple`), FileUpload (+ `formatBytes`) · Dates & times: DatePicker, DateRangePicker, Calendar, TimePicker (+ `formatDate`, `parseDate`, `parseTime`) · Feedback: Alert, Toaster/`toast()`, Tooltip, StatusPill, Badge, Progress, Skeleton, EmptyState · Overlays: Dialog, Drawer, Popover · Data: DataTable, Stat · Layout: AppShell, Container, Stack, Grid, Accordion, Pagination, Card, Tabs, Stepper, SideNav, Breadcrumb, Avatar, Surface, Icon · Theme: ColorSchemeToggle, ColorSchemeScript, `useColorScheme`, ThemeStyle/`createTheme` · Hooks: `useBreakpoint`, `useResponsive`, `breakpoints`, `useAuraLocale`.
|
|
69
|
+
|
|
70
|
+
## Router links, Swedish, motion
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import Link from 'next/link';
|
|
74
|
+
<AuraProvider locale="sv" linkComponent={Link}> {/* th | en | sv */}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`linkComponent` is used by Button `href`, Breadcrumb, Pagination `getHref`, Stat `href`, SideNav and DataTable row/pager links. `sv` uses the Gregorian calendar and Monday first; `th` and `en` default to the Buddhist calendar.
|
|
78
|
+
|
|
79
|
+
Motion: skeleton pulses and indeterminate bars honour `prefers-reduced-motion: reduce` — skeletons stop (a static bar), spinners and progress bars slow to a third.
|
|
69
80
|
|
|
70
81
|
## Light and dark
|
|
71
82
|
|
|
@@ -73,7 +84,7 @@ The tokens carry both schemes; `<html data-theme="light|dark|system">` picks one
|
|
|
73
84
|
|
|
74
85
|
```tsx
|
|
75
86
|
<html lang="th" data-theme="system" suppressHydrationWarning>
|
|
76
|
-
<head><ColorSchemeScript /></head> {/* applies the saved choice before first paint — no flash */}
|
|
87
|
+
<head><ColorSchemeScript /></head> {/* applies the saved choice before first paint — no flash; nonce={nonce} for a CSP */}
|
|
77
88
|
...
|
|
78
89
|
<ColorSchemeToggle /> {/* Light / Dark / System menu; saved in localStorage */}
|
|
79
90
|
const { scheme, resolved, setScheme } = useColorScheme();
|