@jirawatpyk/aura-react 5.38.0 → 5.39.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 +6 -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 +5 -0
- package/dist/styles.layer.css +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -186,6 +186,12 @@ 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.39 — Chamber-OS addendum 46
|
|
190
|
+
|
|
191
|
+
- **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.
|
|
192
|
+
- **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.
|
|
193
|
+
- **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).
|
|
194
|
+
|
|
189
195
|
## 5.38 — Chamber-OS addenda 43–45
|
|
190
196
|
|
|
191
197
|
- **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;
|
package/dist/styles.css
CHANGED
|
@@ -756,6 +756,7 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
756
756
|
.aura-tabs__list { display: flex; gap: var(--aura-space-6); box-shadow: inset 0 -1px 0 var(--aura-border-default); overflow-x: auto; scrollbar-width: none; }
|
|
757
757
|
.aura-tab {
|
|
758
758
|
position: relative; display: inline-flex; align-items: center; gap: var(--aura-space-2); flex: none;
|
|
759
|
+
box-sizing: border-box; /* 5.39: a link tab (<a>) was 2px taller than a button tab — its underline sat outside the height */
|
|
759
760
|
height: var(--aura-input-height); padding: 0;
|
|
760
761
|
border: 0; border-bottom: 2px solid transparent; background: transparent;
|
|
761
762
|
color: var(--aura-fg-secondary); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
|
|
@@ -772,6 +773,10 @@ a.aura-tab { text-decoration: none; }
|
|
|
772
773
|
font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
|
|
773
774
|
}
|
|
774
775
|
.aura-tabs__panel { padding-top: var(--aura-space-6); outline: none; }
|
|
776
|
+
/* 5.39 (Chamber-OS 143): touchHeight — 44px tabs (underline or segmented, buttons or links) below 640px or on a coarse
|
|
777
|
+
* pointer (is-touch), or always. The height is set on the tabs, not through --aura-input-height, so panels keep theirs. */
|
|
778
|
+
.aura-tabs.is-touch-always .aura-tab { height: var(--aura-touch-target); }
|
|
779
|
+
@media (max-width: 639.98px), (pointer: coarse) { .aura-tabs.is-touch .aura-tab { height: var(--aura-touch-target); } }
|
|
775
780
|
.aura-tabs__panel[hidden] { display: none; }
|
|
776
781
|
.aura-tabs__panel:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; border-radius: var(--aura-radius-sm); }
|
|
777
782
|
|
package/dist/styles.layer.css
CHANGED
|
@@ -758,6 +758,7 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
758
758
|
.aura-tabs__list { display: flex; gap: var(--aura-space-6); box-shadow: inset 0 -1px 0 var(--aura-border-default); overflow-x: auto; scrollbar-width: none; }
|
|
759
759
|
.aura-tab {
|
|
760
760
|
position: relative; display: inline-flex; align-items: center; gap: var(--aura-space-2); flex: none;
|
|
761
|
+
box-sizing: border-box; /* 5.39: a link tab (<a>) was 2px taller than a button tab — its underline sat outside the height */
|
|
761
762
|
height: var(--aura-input-height); padding: 0;
|
|
762
763
|
border: 0; border-bottom: 2px solid transparent; background: transparent;
|
|
763
764
|
color: var(--aura-fg-secondary); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
|
|
@@ -774,6 +775,10 @@ a.aura-tab { text-decoration: none; }
|
|
|
774
775
|
font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
|
|
775
776
|
}
|
|
776
777
|
.aura-tabs__panel { padding-top: var(--aura-space-6); outline: none; }
|
|
778
|
+
/* 5.39 (Chamber-OS 143): touchHeight — 44px tabs (underline or segmented, buttons or links) below 640px or on a coarse
|
|
779
|
+
* pointer (is-touch), or always. The height is set on the tabs, not through --aura-input-height, so panels keep theirs. */
|
|
780
|
+
.aura-tabs.is-touch-always .aura-tab { height: var(--aura-touch-target); }
|
|
781
|
+
@media (max-width: 639.98px), (pointer: coarse) { .aura-tabs.is-touch .aura-tab { height: var(--aura-touch-target); } }
|
|
777
782
|
.aura-tabs__panel[hidden] { display: none; }
|
|
778
783
|
.aura-tabs__panel:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: 2px; border-radius: var(--aura-radius-sm); }
|
|
779
784
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.39.0",
|
|
4
4
|
"description": "AURA Design System — React components (Enterprise Standard, Human Creative). Thai-first: Buddhist-era dates, Thai collation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|