@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 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 (43)
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();