@jirawatpyk/aura-react 5.75.0 → 5.77.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 +8 -0
- package/dist/aura.bundle.js +13 -0
- package/dist/cjs/index.cjs +13 -0
- package/dist/esm/useModal.js +13 -0
- package/dist/styles.css +7 -0
- package/dist/styles.layer.css +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -186,6 +186,14 @@ 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.77 — Chamber-OS addendum 95 follow-up (#194)
|
|
190
|
+
|
|
191
|
+
- **A confirmation opens at its top on a short screen:** when a Dialog scrolls as one box (5.76) and its first focus lands in the footer — `data-autofocus` on Cancel, or a dialog with nothing to fill in — it no longer scrolls to its end on open: the title, the description and the summary of what is being confirmed are what show first, with Cancel focused below. Tab or a scroll reaches the buttons as before. A field in the body that takes the first focus is still scrolled into view (it is what you type in next). By design the focused Cancel then starts below the fold: focus is in the dialog, on the safe action, and a screen reader reads the title and description first. Above 30rem nothing changes — where the panel can't scroll, the browser keeps the focused button in view as before; a Drawer is unaffected. With `autoFocus={false}`, a footer button you focus yourself scrolls as the browser does.
|
|
192
|
+
|
|
193
|
+
## 5.76 — Chamber-OS addendum 95 (#194)
|
|
194
|
+
|
|
195
|
+
- **A Dialog on a short screen scrolls as one box:** on a screen 30rem tall or less (480px at the default 16px — 400% zoom on a laptop, a phone on its side with the keyboard up), the head, the description, the body and the footer scroll together inside the dialog, with the footer at the end of the content, instead of a fixed head and footer around a body squeezed to nothing. Focus moves (`data-autofocus`, the first field, the focus trap) work as before, and a focused field scrolls into view with 16px to spare (`scroll-padding`). Above 30rem nothing changes: the footer stays fixed under a scrolling body. The same threshold as ActionBar's and AppShell's bars (5.48). Wide content in the body (a long URL, a `<pre>`) still scrolls sideways there. Scrolled to the footer, the × has scrolled away with the head — Escape and Cancel still close. A `position: sticky` element in the body doesn't stick on a short screen (it scrolls with the content). Dialog only: a Drawer keeps its fixed head and footer. A `.aura-dialog` / `.aura-dialog__body` stand-in in your CSS can go.
|
|
196
|
+
|
|
189
197
|
## 5.75 — visual audit, set 1
|
|
190
198
|
|
|
191
199
|
- **Status pills are soft in every tone.** Blocked is red-800 on red-100 (dark red-300 on a red wash), Warning amber-800 on amber-100 (dark amber-300 on an amber wash), like Ready, In Progress and To Do, and like Alert and Badge — so a table of statuses reads evenly; the word and the icon carry the meaning. For the one status on a screen that must catch the eye (an overdue total, a failed payment) pass `variant="solid"`: the strong fill, in every tone (`--aura-status-{tone}-solid-bg` / `-fg`; Blocked and Warning are the 5.30 fills). Badge `tone="danger" variant="solid"` is unchanged.
|
package/dist/aura.bundle.js
CHANGED
|
@@ -5123,6 +5123,7 @@ window.Aura = (() => {
|
|
|
5123
5123
|
prev.current = document.activeElement;
|
|
5124
5124
|
const unlock = lockScroll();
|
|
5125
5125
|
const el = ref.current;
|
|
5126
|
+
let raf = 0;
|
|
5126
5127
|
const inPart = function(scope) {
|
|
5127
5128
|
if (!scope || !el) return [];
|
|
5128
5129
|
const sel = TAB_STOPS.split(",").map(function(s) {
|
|
@@ -5133,8 +5134,20 @@ window.Aura = (() => {
|
|
|
5133
5134
|
if (el && o.autoFocus !== false) {
|
|
5134
5135
|
const auto = el.querySelector("[data-autofocus]");
|
|
5135
5136
|
if (!focusFirst(el, auto, [inPart(o.bodySelector), inPart(o.footSelector)])) el.focus();
|
|
5137
|
+
const foot = o.footSelector ? el.querySelector(o.footSelector) : null, head = el.firstElementChild, first = document.activeElement, panel = el;
|
|
5138
|
+
const toTop = function() {
|
|
5139
|
+
if (foot && foot.contains(first) && document.activeElement === first && panel.scrollTop > 0 && /auto|scroll/.test(getComputedStyle(panel).overflowY) && head && head.getBoundingClientRect().top < panel.getBoundingClientRect().top)
|
|
5140
|
+
panel.scrollTop = 0;
|
|
5141
|
+
};
|
|
5142
|
+
toTop();
|
|
5143
|
+
if (foot && foot.contains(first))
|
|
5144
|
+
raf = requestAnimationFrame(function() {
|
|
5145
|
+
toTop();
|
|
5146
|
+
raf = requestAnimationFrame(toTop);
|
|
5147
|
+
});
|
|
5136
5148
|
}
|
|
5137
5149
|
return function() {
|
|
5150
|
+
cancelAnimationFrame(raf);
|
|
5138
5151
|
unlock();
|
|
5139
5152
|
const l = latest.current;
|
|
5140
5153
|
const ff = l.finalFocus;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -5105,6 +5105,7 @@ function useModal(open, ref, opts) {
|
|
|
5105
5105
|
prev.current = document.activeElement;
|
|
5106
5106
|
const unlock = lockScroll();
|
|
5107
5107
|
const el = ref.current;
|
|
5108
|
+
let raf = 0;
|
|
5108
5109
|
const inPart = function(scope) {
|
|
5109
5110
|
if (!scope || !el) return [];
|
|
5110
5111
|
const sel = TAB_STOPS.split(",").map(function(s) {
|
|
@@ -5115,8 +5116,20 @@ function useModal(open, ref, opts) {
|
|
|
5115
5116
|
if (el && o.autoFocus !== false) {
|
|
5116
5117
|
const auto = el.querySelector("[data-autofocus]");
|
|
5117
5118
|
if (!focusFirst(el, auto, [inPart(o.bodySelector), inPart(o.footSelector)])) el.focus();
|
|
5119
|
+
const foot = o.footSelector ? el.querySelector(o.footSelector) : null, head = el.firstElementChild, first = document.activeElement, panel = el;
|
|
5120
|
+
const toTop = function() {
|
|
5121
|
+
if (foot && foot.contains(first) && document.activeElement === first && panel.scrollTop > 0 && /auto|scroll/.test(getComputedStyle(panel).overflowY) && head && head.getBoundingClientRect().top < panel.getBoundingClientRect().top)
|
|
5122
|
+
panel.scrollTop = 0;
|
|
5123
|
+
};
|
|
5124
|
+
toTop();
|
|
5125
|
+
if (foot && foot.contains(first))
|
|
5126
|
+
raf = requestAnimationFrame(function() {
|
|
5127
|
+
toTop();
|
|
5128
|
+
raf = requestAnimationFrame(toTop);
|
|
5129
|
+
});
|
|
5118
5130
|
}
|
|
5119
5131
|
return function() {
|
|
5132
|
+
cancelAnimationFrame(raf);
|
|
5120
5133
|
unlock();
|
|
5121
5134
|
const l = latest.current;
|
|
5122
5135
|
const ff = l.finalFocus;
|
package/dist/esm/useModal.js
CHANGED
|
@@ -36,6 +36,7 @@ function useModal(open, ref, opts) {
|
|
|
36
36
|
prev.current = document.activeElement;
|
|
37
37
|
const unlock = lockScroll();
|
|
38
38
|
const el = ref.current;
|
|
39
|
+
let raf = 0;
|
|
39
40
|
const inPart = function(scope) {
|
|
40
41
|
if (!scope || !el) return [];
|
|
41
42
|
const sel = TAB_STOPS.split(",").map(function(s) {
|
|
@@ -46,8 +47,20 @@ function useModal(open, ref, opts) {
|
|
|
46
47
|
if (el && o.autoFocus !== false) {
|
|
47
48
|
const auto = el.querySelector("[data-autofocus]");
|
|
48
49
|
if (!focusFirst(el, auto, [inPart(o.bodySelector), inPart(o.footSelector)])) el.focus();
|
|
50
|
+
const foot = o.footSelector ? el.querySelector(o.footSelector) : null, head = el.firstElementChild, first = document.activeElement, panel = el;
|
|
51
|
+
const toTop = function() {
|
|
52
|
+
if (foot && foot.contains(first) && document.activeElement === first && panel.scrollTop > 0 && /auto|scroll/.test(getComputedStyle(panel).overflowY) && head && head.getBoundingClientRect().top < panel.getBoundingClientRect().top)
|
|
53
|
+
panel.scrollTop = 0;
|
|
54
|
+
};
|
|
55
|
+
toTop();
|
|
56
|
+
if (foot && foot.contains(first))
|
|
57
|
+
raf = requestAnimationFrame(function() {
|
|
58
|
+
toTop();
|
|
59
|
+
raf = requestAnimationFrame(toTop);
|
|
60
|
+
});
|
|
49
61
|
}
|
|
50
62
|
return function() {
|
|
63
|
+
cancelAnimationFrame(raf);
|
|
51
64
|
unlock();
|
|
52
65
|
const l = latest.current;
|
|
53
66
|
const ff = l.finalFocus;
|
package/dist/styles.css
CHANGED
|
@@ -2319,6 +2319,13 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
2319
2319
|
@media (max-height: 30rem) { .aura-actionbar:not(.is-idle) { position: static; } }
|
|
2320
2320
|
/* …and AppShell's top bar scrolls away with the page, so Shift+Tab never lands a field under it. */
|
|
2321
2321
|
@media (max-height: 30rem) { .aura-shell__bar { position: static; } }
|
|
2322
|
+
/* 5.76 (Chamber-OS 194): on a screen 30rem tall or less (400% zoom, a phone on its side with the keyboard up) a Dialog
|
|
2323
|
+
* scrolls as one box — head, body and footer in one flow, the footer at the end of the content — instead of fixing
|
|
2324
|
+
* its head and footer around a body squeezed to nothing. Above that height, as before. */
|
|
2325
|
+
@media (max-height: 30rem) {
|
|
2326
|
+
.aura-dialog { overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: var(--aura-space-4); } /* a focused field is shown with room around it */
|
|
2327
|
+
.aura-dialog__body { flex: none; min-height: auto; overflow: auto; overscroll-behavior: auto; } /* as tall as its content, so only wide content (a long <pre> or URL) scrolls here, sideways; a wheel over it goes on to the dialog */
|
|
2328
|
+
}
|
|
2322
2329
|
/* 5.48: wherever a BottomNav shows, a field scrolled into view (Tab) stops above it, not under it. */
|
|
2323
2330
|
:root { scroll-padding-bottom: var(--aura-bottomnav-offset, 0px); }
|
|
2324
2331
|
.aura-actionbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2) var(--aura-space-3); min-height: 60px; box-sizing: border-box; padding-block: var(--aura-space-2); padding-inline: var(--aura-space-4) var(--aura-space-3); }
|
package/dist/styles.layer.css
CHANGED
|
@@ -2321,6 +2321,13 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
2321
2321
|
@media (max-height: 30rem) { .aura-actionbar:not(.is-idle) { position: static; } }
|
|
2322
2322
|
/* …and AppShell's top bar scrolls away with the page, so Shift+Tab never lands a field under it. */
|
|
2323
2323
|
@media (max-height: 30rem) { .aura-shell__bar { position: static; } }
|
|
2324
|
+
/* 5.76 (Chamber-OS 194): on a screen 30rem tall or less (400% zoom, a phone on its side with the keyboard up) a Dialog
|
|
2325
|
+
* scrolls as one box — head, body and footer in one flow, the footer at the end of the content — instead of fixing
|
|
2326
|
+
* its head and footer around a body squeezed to nothing. Above that height, as before. */
|
|
2327
|
+
@media (max-height: 30rem) {
|
|
2328
|
+
.aura-dialog { overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: var(--aura-space-4); } /* a focused field is shown with room around it */
|
|
2329
|
+
.aura-dialog__body { flex: none; min-height: auto; overflow: auto; overscroll-behavior: auto; } /* as tall as its content, so only wide content (a long <pre> or URL) scrolls here, sideways; a wheel over it goes on to the dialog */
|
|
2330
|
+
}
|
|
2324
2331
|
/* 5.48: wherever a BottomNav shows, a field scrolled into view (Tab) stops above it, not under it. */
|
|
2325
2332
|
:root { scroll-padding-bottom: var(--aura-bottomnav-offset, 0px); }
|
|
2326
2333
|
.aura-actionbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2) var(--aura-space-3); min-height: 60px; box-sizing: border-box; padding-block: var(--aura-space-2); padding-inline: var(--aura-space-4) var(--aura-space-3); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.77.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",
|