@jirawatpyk/aura-react 5.38.0 → 5.40.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 -0
- package/dist/aura.bundle.js +8 -2
- package/dist/cjs/index.cjs +8 -2
- package/dist/esm/FilterDateRange.js +8 -2
- package/dist/esm/Tabs.js +2 -2
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/styles.css +147 -141
- package/dist/styles.layer.css +147 -141
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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.40 — Chamber-OS addendum 48
|
|
190
|
+
|
|
191
|
+
- **Type follows the browser's default font size** (#145, WCAG 1.4.4). Every font size and px line height in `styles.css`, the `.aura-text-*` classes and `--aura-input-font-size` is now `max(<px>, <rem>)` — for example `max(13px, .8125rem)`. At the default 16px root nothing changes. When someone raises the browser's default font size (Settings → Font size, not page zoom), AURA's text grows with the app's own: at 32px a card's description, a Switch's description and a table cell are twice the size. Spacing, borders and control heights stay in px; boxes that hold text grow where they already could (fields, cards, rows with `rowHeight="auto"`), and one-line controls keep their height with larger text inside.
|
|
192
|
+
- An app that sets a smaller root (`html { font-size: 62.5% }`) keeps AURA's px sizes as a floor, so nothing gets smaller than before. An app with a fixed larger root (`html { font-size: 18px }`) will see AURA's text grow with it.
|
|
193
|
+
- Boxes with text that had a fixed height now have a minimum instead, so they grow with the text: Badge, the small SegmentedControl option, the calendar's month title (it wraps under the arrows rather than overlapping the weekdays), the DataTable footer (which also wraps the count and the pager) and BottomNav's count. Avatar initials stay in px, sized to their circle; the name is the accessible name.
|
|
194
|
+
- A smaller browser default never makes AURA's text smaller than its px size.
|
|
195
|
+
- A row `Stack` without `wrap` holding buttons or tags can run past a phone's edge at a large default size; give it `wrap`.
|
|
196
|
+
|
|
197
|
+
## 5.39 — Chamber-OS addendum 46
|
|
198
|
+
|
|
199
|
+
- **Tabs `touchHeight`** (#143): 44px tabs — buttons or links, underline or segmented — with `true` below 640px or on a coarse pointer (Button's rule), or `'always'` at every width. The count badge and icon stay centred on the label (above the 2px underline). The height is set on the tabs themselves, so fields in the panels keep their own size. Without it nothing changes.
|
|
200
|
+
- **Link tabs are as tall as button tabs.** A link tab (`href`) was 2px taller than a button tab — its 2px underline sat outside the height (38px instead of 36px in compact density, 46px instead of 44px on touch screens). Tests that measure link tabs will see 2px less.
|
|
201
|
+
- **FilterDateRange `touchHeight`**: a 44px face on its own, as FilterSelect's. A FilterBar with `touchHeight` already reaches it (checked for Chamber-OS's audit log filter row).
|
|
202
|
+
|
|
189
203
|
## 5.38 — Chamber-OS addenda 43–45
|
|
190
204
|
|
|
191
205
|
- **FilterBar and FilterSelect `touchHeight`** (#140): `true` makes the search (and its clear button) and every field-height control in the bar (FilterSelect, Select, Combobox, DatePicker and TimePicker with their buttons, SegmentedControl's options) 44px below 640px or on a coarse pointer — the same rule as Button's and TextField's `touchHeight` — and `'always'` at every width; `touchHeight` on one FilterSelect does the same for it alone. Without it nothing changes: the density's input height with a mouse, 44px on a coarse pointer. Buttons in `actions` take their own `touchHeight`. A SegmentedControl's track is 50px there (44px options plus its edge and padding), as with its own `touchHeight`. Opt-in rather than a new default, like every other `touchHeight`, so a narrow desktop window doesn't change size unasked.
|
package/dist/aura.bundle.js
CHANGED
|
@@ -3686,7 +3686,13 @@ window.Aura = (() => {
|
|
|
3686
3686
|
"div",
|
|
3687
3687
|
{
|
|
3688
3688
|
ref: boxRef,
|
|
3689
|
-
className: cx(
|
|
3689
|
+
className: cx(
|
|
3690
|
+
"aura-filterselect",
|
|
3691
|
+
pop.open && "is-open",
|
|
3692
|
+
props.disabled && "is-disabled",
|
|
3693
|
+
touchClass(props.touchHeight),
|
|
3694
|
+
props.className
|
|
3695
|
+
)
|
|
3690
3696
|
},
|
|
3691
3697
|
/* @__PURE__ */ React19.createElement(
|
|
3692
3698
|
"button",
|
|
@@ -7077,7 +7083,7 @@ window.Aura = (() => {
|
|
|
7077
7083
|
const tabCls = function(on, extra) {
|
|
7078
7084
|
return cx("aura-tab", on && "is-active", seg && "aura-segmented__option", seg && on && "is-selected", extra);
|
|
7079
7085
|
};
|
|
7080
|
-
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented");
|
|
7086
|
+
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented", touchClass(props.touchHeight));
|
|
7081
7087
|
const [focusId, setFocusId] = React35.useState(null);
|
|
7082
7088
|
items2.forEach(function(t) {
|
|
7083
7089
|
const al = t.tabProps && t.tabProps["aria-label"];
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3668,7 +3668,13 @@ var FilterDateRange = React19.forwardRef(
|
|
|
3668
3668
|
"div",
|
|
3669
3669
|
{
|
|
3670
3670
|
ref: boxRef,
|
|
3671
|
-
className: cx(
|
|
3671
|
+
className: cx(
|
|
3672
|
+
"aura-filterselect",
|
|
3673
|
+
pop.open && "is-open",
|
|
3674
|
+
props.disabled && "is-disabled",
|
|
3675
|
+
touchClass(props.touchHeight),
|
|
3676
|
+
props.className
|
|
3677
|
+
)
|
|
3672
3678
|
},
|
|
3673
3679
|
/* @__PURE__ */ React19.createElement(
|
|
3674
3680
|
"button",
|
|
@@ -7059,7 +7065,7 @@ var Tabs = React35.forwardRef(function Tabs2(props, ref) {
|
|
|
7059
7065
|
const tabCls = function(on, extra) {
|
|
7060
7066
|
return cx("aura-tab", on && "is-active", seg && "aura-segmented__option", seg && on && "is-selected", extra);
|
|
7061
7067
|
};
|
|
7062
|
-
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented");
|
|
7068
|
+
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented", touchClass(props.touchHeight));
|
|
7063
7069
|
const [focusId, setFocusId] = React35.useState(null);
|
|
7064
7070
|
items2.forEach(function(t) {
|
|
7065
7071
|
const al = t.tabProps && t.tabProps["aria-label"];
|
|
@@ -5,7 +5,7 @@ import { Calendar, allowedDate, useCalendarPopover } from "./DatePicker.js";
|
|
|
5
5
|
import { Button } from "./Button.js";
|
|
6
6
|
import { Icon } from "./Icon.js";
|
|
7
7
|
import { IconChevronDown } from "./icons.js";
|
|
8
|
-
import { cx, trapTab, uid, useMaybeControlled, useMergedRef } from "./internal.js";
|
|
8
|
+
import { cx, touchClass, trapTab, uid, useMaybeControlled, useMergedRef } from "./internal.js";
|
|
9
9
|
import { useAuraLocale } from "./locale.js";
|
|
10
10
|
import { dateText, defaultCalendar, formatDateRange } from "./dates.js";
|
|
11
11
|
const NONE = { start: null, end: null };
|
|
@@ -126,7 +126,13 @@ const FilterDateRange = React.forwardRef(
|
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
ref: boxRef,
|
|
129
|
-
className: cx(
|
|
129
|
+
className: cx(
|
|
130
|
+
"aura-filterselect",
|
|
131
|
+
pop.open && "is-open",
|
|
132
|
+
props.disabled && "is-disabled",
|
|
133
|
+
touchClass(props.touchHeight),
|
|
134
|
+
props.className
|
|
135
|
+
)
|
|
130
136
|
},
|
|
131
137
|
/* @__PURE__ */ React.createElement(
|
|
132
138
|
"button",
|
package/dist/esm/Tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
|
-
import { cx, devWarnOnce, omit, uid, useMaybeControlled } from "./internal.js";
|
|
4
|
+
import { cx, devWarnOnce, omit, touchClass, uid, useMaybeControlled } from "./internal.js";
|
|
5
5
|
import { useLinkComponent } from "./locale.js";
|
|
6
6
|
const Tabs = React.forwardRef(function Tabs2(props, ref) {
|
|
7
7
|
const items = props.tabs || [], base = uid();
|
|
@@ -34,7 +34,7 @@ const Tabs = React.forwardRef(function Tabs2(props, ref) {
|
|
|
34
34
|
const tabCls = function(on, extra) {
|
|
35
35
|
return cx("aura-tab", on && "is-active", seg && "aura-segmented__option", seg && on && "is-selected", extra);
|
|
36
36
|
};
|
|
37
|
-
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented");
|
|
37
|
+
const rootCls = cx("aura-tabs", seg && "aura-tabs--segmented", touchClass(props.touchHeight));
|
|
38
38
|
const [focusId, setFocusId] = React.useState(null);
|
|
39
39
|
items.forEach(function(t) {
|
|
40
40
|
const al = t.tabProps && t.tabProps["aria-label"];
|
package/dist/index.d.cts
CHANGED
|
@@ -812,6 +812,10 @@ export interface TabsProps {
|
|
|
812
812
|
/** Link tabs: what the current link is (5.14). `page` (default) for routes; `location` for links to sections of
|
|
813
813
|
* this page (`#contacts`). */
|
|
814
814
|
current?: "page" | "location" | undefined;
|
|
815
|
+
/** 5.39 (Chamber-OS 143): 44px tabs, button or link form, either variant — `true` below 640px or on a coarse
|
|
816
|
+
* pointer, as Button's `touchHeight`; `'always'` at every width. Without it: the density's input height (44px on a
|
|
817
|
+
* coarse pointer). Panels are not affected. */
|
|
818
|
+
touchHeight?: TouchHeight | undefined;
|
|
815
819
|
}
|
|
816
820
|
export interface NavItem {
|
|
817
821
|
id: string;
|
|
@@ -1157,6 +1161,8 @@ export interface FilterDateRangeProps extends DateDisplayOptions, Pick<React$1.H
|
|
|
1157
1161
|
disabled?: boolean | undefined;
|
|
1158
1162
|
id?: string | undefined;
|
|
1159
1163
|
className?: string | undefined;
|
|
1164
|
+
/** 5.39: a 44px face, as FilterSelect's `touchHeight` (FilterBar's `touchHeight` already reaches it). */
|
|
1165
|
+
touchHeight?: TouchHeight | undefined;
|
|
1160
1166
|
}
|
|
1161
1167
|
export interface DateRangePickerProps extends DateFieldProps {
|
|
1162
1168
|
value?: DateRange | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -812,6 +812,10 @@ export interface TabsProps {
|
|
|
812
812
|
/** Link tabs: what the current link is (5.14). `page` (default) for routes; `location` for links to sections of
|
|
813
813
|
* this page (`#contacts`). */
|
|
814
814
|
current?: "page" | "location" | undefined;
|
|
815
|
+
/** 5.39 (Chamber-OS 143): 44px tabs, button or link form, either variant — `true` below 640px or on a coarse
|
|
816
|
+
* pointer, as Button's `touchHeight`; `'always'` at every width. Without it: the density's input height (44px on a
|
|
817
|
+
* coarse pointer). Panels are not affected. */
|
|
818
|
+
touchHeight?: TouchHeight | undefined;
|
|
815
819
|
}
|
|
816
820
|
export interface NavItem {
|
|
817
821
|
id: string;
|
|
@@ -1157,6 +1161,8 @@ export interface FilterDateRangeProps extends DateDisplayOptions, Pick<React$1.H
|
|
|
1157
1161
|
disabled?: boolean | undefined;
|
|
1158
1162
|
id?: string | undefined;
|
|
1159
1163
|
className?: string | undefined;
|
|
1164
|
+
/** 5.39: a 44px face, as FilterSelect's `touchHeight` (FilterBar's `touchHeight` already reaches it). */
|
|
1165
|
+
touchHeight?: TouchHeight | undefined;
|
|
1160
1166
|
}
|
|
1161
1167
|
export interface DateRangePickerProps extends DateFieldProps {
|
|
1162
1168
|
value?: DateRange | undefined;
|