@jirawatpyk/aura-react 4.12.0 → 4.13.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 +15 -1
- package/dist/aura.bundle.js +938 -433
- package/dist/cjs/index.cjs +937 -432
- package/dist/esm/Command.js +213 -0
- package/dist/esm/FilterBar.js +112 -0
- package/dist/esm/FormErrorSummary.js +76 -0
- package/dist/esm/PasswordField.js +38 -0
- package/dist/esm/Toaster.js +60 -14
- package/dist/esm/index.js +8 -0
- package/dist/esm/locale.js +39 -0
- package/dist/index.d.ts +111 -1
- package/dist/styles.css +100 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ export default function Root() {
|
|
|
65
65
|
|
|
66
66
|
## Components (49)
|
|
67
67
|
|
|
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 (+ `useFormatDate`, `formatDate`, `parseDate`, `parseTime`) · Feedback: Alert, Toaster/`toast()
|
|
68
|
+
Actions: Button, IconButton, Menu, DropdownMenu, Tag · Forms: TextField, PasswordField, Textarea, NumberField, Select, RadioGroup, Checkbox, Switch, SegmentedControl, Combobox (one value, or `multiple`), FileUpload (+ `formatBytes`) · Dates & times: DatePicker, DateRangePicker, Calendar, TimePicker (+ `useFormatDate`, `formatDate`, `parseDate`, `parseTime`) · Feedback: Alert, FormErrorSummary, Toaster/`toast()` (+ `.success/.error/.warning/.info/.loading`), Tooltip, StatusPill, Badge, Progress, Skeleton, EmptyState · Overlays: Dialog, Drawer, Popover · Data: DataTable, FilterBar, Stat · Navigation: Command (⌘K palette) · 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
69
|
|
|
70
70
|
## Router links, Swedish, motion
|
|
71
71
|
|
|
@@ -78,6 +78,20 @@ import Link from 'next/link';
|
|
|
78
78
|
|
|
79
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.
|
|
80
80
|
|
|
81
|
+
## Toasts, forms, filters, rich text, ⌘K
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
const id = toast.loading('Saving'); // spinner, stays
|
|
85
|
+
toast.success('Saved', { id }); // same id: replaced in place, never stacked
|
|
86
|
+
toast.error('Could not save'); // danger = role="alert"; the rest role="status"
|
|
87
|
+
|
|
88
|
+
<FormErrorSummary errors={formState.errors} focusKey={formState.submitCount} onSelect={setFocus} />
|
|
89
|
+
<PasswordField label="Password" {...register('password')} />
|
|
90
|
+
<FilterBar search={q} onSearchChange={setQ} filters={chips} onClearAll={clear} resultCount={total}>…</FilterBar>
|
|
91
|
+
<div className="aura-prose" dangerouslySetInnerHTML={{ __html: sanitised }} /> {/* p, h1–h4, lists, blockquote, hr, a, strong, em, u */}
|
|
92
|
+
<Command open={open} onOpenChange={setOpen} items={commands} /> {/* ⌘K / Ctrl+K toggles it */}
|
|
93
|
+
```
|
|
94
|
+
|
|
81
95
|
## Phones and touch
|
|
82
96
|
|
|
83
97
|
Under 640px every text control uses 16px text (iOS Safari doesn't zoom). On touch screens (`pointer: coarse`) IconButton keeps its 32px look with a 44px hit area, and Radio, Checkbox and Switch rows are at least 44px with the whole row as the target. `<Button fullWidth>` fills its row and wraps long Thai or Swedish labels.
|