@jirawatpyk/aura-react 5.33.0 → 5.35.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 +16 -2
- package/dist/aura.bundle.js +831 -412
- package/dist/cjs/index.cjs +830 -411
- package/dist/esm/ActionBar.js +1 -0
- package/dist/esm/AppShell.js +16 -2
- package/dist/esm/BottomNav.js +26 -2
- package/dist/esm/StatusTile.js +53 -0
- package/dist/esm/autoTip.js +5 -0
- package/dist/esm/breakpoints.js +18 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/responsive.js +1 -15
- package/dist/esm/scrollHide.js +96 -0
- package/dist/esm/strings.js +5 -0
- package/dist/esm/strings.sv.js +5 -0
- package/dist/esm/strings.th.js +5 -0
- package/dist/esm/tiles.js +220 -0
- package/dist/index.d.cts +126 -36
- package/dist/index.d.ts +126 -36
- package/dist/locales/sv.cjs +5 -0
- package/dist/locales/sv.d.cts +7 -0
- package/dist/locales/sv.d.ts +7 -0
- package/dist/locales/th.cjs +5 -0
- package/dist/locales/th.d.cts +7 -0
- package/dist/locales/th.d.ts +7 -0
- package/dist/server/index.cjs +274 -27
- package/dist/server/index.d.cts +78 -0
- package/dist/server/index.d.ts +78 -0
- package/dist/server/index.js +274 -27
- package/dist/styles.css +86 -5
- package/dist/styles.layer.css +86 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,9 +74,9 @@ export default function Root() {
|
|
|
74
74
|
| `dist/styles.css` | Component CSS (no font import). |
|
|
75
75
|
| `dist/index.d.ts` | Types for every component and helper, generated from the TypeScript sources (one file). |
|
|
76
76
|
|
|
77
|
-
## Components (
|
|
77
|
+
## Components (65)
|
|
78
78
|
|
|
79
|
-
Actions: Button (`ghost`, `size="sm"`), IconButton, Menu, DropdownMenu (link, danger and radio items), ActionBar, Tag · Forms: TextField, PasswordField, Textarea, NumberField, Select, FilterSelect, 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, Table (+ THead, TBody, TFoot, Tr, Th, Td — static tables), FilterBar, FilterDateRange, Stat · Navigation: Command (⌘K palette), BottomNav · Layout: AppShell, Container, Stack, Grid, Separator, Accordion, Pagination, Card, Tabs, Stepper, SideNav, Breadcrumb, Avatar, Surface, Icon · Theme: ColorSchemeToggle, ColorSchemeScript, `useColorScheme`, ThemeStyle/`createTheme` · Hooks: `useBreakpoint`, `useResponsive`, `breakpoints`, `useAuraLocale`, `useDensity`.
|
|
79
|
+
Actions: Button (`ghost`, `size="sm"`), IconButton, Menu, DropdownMenu (link, danger and radio items), ActionBar, Tag · Forms: TextField, PasswordField, Textarea, NumberField, Select, FilterSelect, 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, Table (+ THead, TBody, TFoot, Tr, Th, Td — static tables), FilterBar, FilterDateRange, Stat, StatusTile + TileGrid, Sparkline · Navigation: Command (⌘K palette), BottomNav · Layout: AppShell, PageHeader, Container, Stack, Grid, Separator, Accordion, Pagination, Card, Tabs, Stepper, SideNav, Breadcrumb, Avatar, Surface, Icon · Theme: ColorSchemeToggle, ColorSchemeScript, `useColorScheme`, ThemeStyle/`createTheme` · Hooks: `useBreakpoint`, `useResponsive`, `breakpoints`, `useAuraLocale`, `useDensity`.
|
|
80
80
|
|
|
81
81
|
## Router links, Swedish, motion
|
|
82
82
|
|
|
@@ -186,6 +186,20 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
|
|
|
186
186
|
- **Time zone**: `timeZone` on AuraProvider, DatePicker, DateRangePicker and Calendar decides "today" (the marker, `min`/`max="today"`, the first month shown); or pass `today` as an ISO date. `todayIn('Asia/Bangkok')` is exported from the root and `/server`.
|
|
187
187
|
- **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
|
|
188
188
|
|
|
189
|
+
## 5.35 — DxT Monitor requests 11–14
|
|
190
|
+
|
|
191
|
+
- **Breadcrumb touch targets** (request 11): on a touch screen (`pointer: coarse`) every crumb link or button (and "…") gets a hit area 44px tall and as wide as its text plus 24px; the text doesn't move. It reaches 12px into the gutter on each side, so short neighbours never share a spot, and only 4px below the text, so it stops short of a PageHeader title right underneath — the rest of the height is above, so keep about 20px clear above a breadcrumb (AppShell's content padding already is). When the crumbs wrap, the rows sit 24px apart on touch screens so one row never covers the next. The current page (not a link) gets none; a link component must render its `<a>` directly in the crumb's `li`. Apps that added their own `.aura-crumbs a::after` rule should drop it.
|
|
192
|
+
- **StatusTile `status="unknown"`** (request 12): for a thing with no data yet (a site before its first check) — a dashed circle (circle-dot-dashed) in `aura-fg-tertiary` on the plain surface and border, status word "No data" (th: ยังไม่มีข้อมูล, sv: Ingen data), value in the text colour. An unrecognised `status` now shows as unknown rather than OK, with a dev warning.
|
|
193
|
+
- **AppShell `headerHideOnScroll`** (request 13): below 1024px the top bar slides up out of view while the page scrolls down (after it has moved past the bar's height and kept going 8px) and comes back after 8px up, near the top, and whenever focus enters it. `--aura-shell-bar-height` is 0 while it is away, so a sticky table header pinned under the bar moves up with it. No slide with reduced motion. The page must scroll the window (AppShell's does).
|
|
194
|
+
- **BottomNav `hideOnScroll`** (request 14): the same for the tab bar, sliding down. Its spacer stays (nothing shifts) and `--aura-bottomnav-offset` drops while it is away, so viewport ActionBars and toasts follow it down. **ActionBar `hidesBottomNav`**: while that bar is on the page the BottomNav and its spacer are gone and the bar sits on the bottom edge — for a page whose own actions (Acknowledge, Visit site) replace the tabs. Any element can do the same with `data-aura-hide-bottomnav`.
|
|
195
|
+
|
|
196
|
+
## 5.34 — StatusTile, TileGrid, Sparkline (DxT Monitor Overview S06)
|
|
197
|
+
|
|
198
|
+
- **StatusTile**: one monitored thing. `status` (`down` / `problem` / `maintenance` / `ok`) sets an icon *and* a tint and border — red, amber, violet or the plain surface — so colour is never the only sign (circle-alert, triangle-alert, wrench, circle-check). `title` wraps to two lines at most, then ends with "…" (never one cut line, so similar names stay apart); a cut title shows its full text in AURA's tip on hover. `value` sits top right in tabular figures, 600, in its own tone (`valueTone`; default the status's: a Down duration is red). `meta` is a short second line; `markers` (`[{ icon, label, tone? }]`) are small icons at its end, each named and showing its label as a tip on hover. A tip needs a mouse, so on a phone a marker is a hint only: say what it means on the detail page (or in `meta`) too. `href` makes the whole tile one link with a focus ring; its accessible name is everything the tile says, in reading order — "api.example.co.th, Down, 12m, since 09:41, SSL expires in 5 days" — taken from the content (screen-reader-only status word and commas) rather than an `aria-label`, so it always matches what is shown (WCAG 2.5.3). `statusLabel` overrides the status word (th: ล่ม / มีปัญหา / ปิดปรับปรุง / ปกติ). In a TileGrid cell narrower than 226px (two columns on a phone) the value moves under the title in every tile alike; a tile elsewhere (a flex row, a card) keeps the value top right. The hidden status word and commas are text, so `innerText` and a copy include them; a labelled Sparkline in `meta` joins the link's name. Light and dark use the Alert tokens.
|
|
199
|
+
- **TileGrid**: a `ul` of equal columns 8px apart, each child (and each child of a Fragment) one `li`; tiles in a row are as tall as the tallest. `columns` is responsive like Grid; default `{ base: 2, md: 3 }`. Pass `aria-label` to name the list.
|
|
200
|
+
- **Sparkline**: `data` oldest first; `null` (or anything not a finite number) is no point and breaks the line, and a point with no neighbour is a dot. `failed` (booleans by index) with `failures="band"` (a light red band behind the point) or `"ticks"` (a red tick at the foot); default `none`. `tone` (neutral, accent, danger, warning, positive), `size` `sm` 80×24 (default) or `md` 120×32, `min` / `max` to put several on one scale (values beyond them are drawn at the edge). `label` makes it `role="img"` with that name — summarise what the line shows, e.g. "Response time, last 24 h: 180–420 ms, 2 failed checks"; without one it is decoration, hidden from screen readers.
|
|
201
|
+
- All three are stateless and also exported from `/server` (the tile's status word is English there unless `statusLabel`; marker tips need the client entry on the page).
|
|
202
|
+
|
|
189
203
|
## 5.33 — DxT Monitor requests 5–8
|
|
190
204
|
|
|
191
205
|
- **Hover shows on the canvas** (request 5): in light, `aura-bg-surface-hover` is zinc-50 — the canvas itself — so SideNav's rows, an IconButton or ghost Button in its header or footer (Sign out), and the same on the page's canvas (PageHeader actions, Pagination, a selectable Tag) showed no hover. A new token, `aura-bg-canvas-hover` (zinc-100 light, zinc-800 dark), is the hover inside AppShell and SideNav; cards, tables, inputs, the top bar, dialogs, drawers and popovers inside them keep `aura-bg-surface-hover`. Hover fills now read `--aura-hover`, falling back to the surface hover: outside AppShell, set `--aura-hover: var(--aura-bg-canvas-hover)` on your own canvas-coloured area.
|