@jirawatpyk/aura-react 5.82.0 → 5.83.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 +5 -0
- package/dist/aura.bundle.js +15 -2
- package/dist/cjs/index.cjs +15 -2
- package/dist/esm/Alert.js +9 -1
- package/dist/esm/Combobox.js +5 -1
- package/dist/esm/display.js +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/server/index.cjs +1 -0
- package/dist/server/index.d.cts +5 -1
- package/dist/server/index.d.ts +5 -1
- package/dist/server/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -248,6 +248,11 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
|
|
|
248
248
|
- **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`.
|
|
249
249
|
- **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
|
|
250
250
|
|
|
251
|
+
## 5.83 — Chamber-OS 195–196 (Combobox announcements, Alert dismissLabel)
|
|
252
|
+
|
|
253
|
+
- **Combobox status region** (#195): one `role="status"` region is part of the field for its whole life (beside the input, so inside a Dialog too, where the portaled list sits outside the modal) and only its text changes. Closed: empty. Open: the loading text, then the empty text or — with `onSearch`, once a search has come back (`loading` back to `false` after the person typed) — the result count ("12 results", the `results` string in EN, TH, SV). The count needs a managed `loading` prop. An `onSearch` field says nothing before the person types (an empty server list doesn't say "No matches" on open). Without `onSearch`, "no matches" and "keep typing" are the same words as before, now announced reliably. A region inserted already holding text is often not announced (NVDA, VoiceOver), which is why the old line was mostly silent. The visible note is unchanged and hidden from screen readers, which hear the region. A test that finds the note by its words (`getByText('No matches')`) now matches the region too: scope it to `.aura-combo__note`, or use `getByRole('status')`.
|
|
254
|
+
- **Alert `dismissLabel`** (#196): the close button's accessible name, for a page with several notices or a notice about a named thing — `<Alert onDismiss={…} dismissLabel="Dismiss starter warning for Monthly Newsletter">`. Default: the `dismiss` string.
|
|
255
|
+
|
|
251
256
|
## 5.82 — DxT Monitor 25 (Badge xs)
|
|
252
257
|
|
|
253
258
|
- **Badge `size="xs"`**: 16px high (a larger default font grows it), weight 500, 6px inset — a mark under a cell's main value that keeps a `rowHeight="density"` row at 48px (a 12px line with line-height 12px, 4px gap, the badge; a 12px text at its normal line-height is about 18px and the row grows). Thai text stays 11px at this size — the one exception to the 5.30 rule that Thai labels are at least 12px, so stacked tone marks stay off the 16px outline. Every tone and variant; no icon at this size (a dev warning says so). Also from `@jirawatpyk/aura-react/server`. `<Badge size="xs" variant="outline">Confirm</Badge>`.
|
package/dist/aura.bundle.js
CHANGED
|
@@ -819,6 +819,7 @@ window.Aura = (() => {
|
|
|
819
819
|
"children",
|
|
820
820
|
"action",
|
|
821
821
|
"onDismiss",
|
|
822
|
+
"dismissLabel",
|
|
822
823
|
"className",
|
|
823
824
|
"role",
|
|
824
825
|
"icon"
|
|
@@ -4358,6 +4359,9 @@ window.Aura = (() => {
|
|
|
4358
4359
|
[activeIdx, open]
|
|
4359
4360
|
);
|
|
4360
4361
|
const live = props.loading ? [] : shown;
|
|
4362
|
+
const listShown = open && mounted && !!posState[0];
|
|
4363
|
+
const searching = !!props.onSearch;
|
|
4364
|
+
const statusText = !listShown ? "" : props.loading ? props.loadingText || t.searching : searching && query == null ? "" : !live.length ? props.emptyText || t.noMatches : more ? t.keepTyping(options.length) : searching && props.loading === false ? t.results(live.length) : "";
|
|
4361
4365
|
function openList() {
|
|
4362
4366
|
if (!open && !props.disabled && !props.readOnly) {
|
|
4363
4367
|
setOpen(true);
|
|
@@ -4531,7 +4535,7 @@ window.Aura = (() => {
|
|
|
4531
4535
|
})));
|
|
4532
4536
|
})
|
|
4533
4537
|
) : null,
|
|
4534
|
-
props.loading || !live.length || more ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__list",
|
|
4538
|
+
props.loading || !live.length || more ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__list", "aria-hidden": "true" }, props.loading ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconLoaderCircle, null), className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, t.keepTyping(options.length))) : null
|
|
4535
4539
|
),
|
|
4536
4540
|
document.body
|
|
4537
4541
|
) : null;
|
|
@@ -4657,6 +4661,7 @@ window.Aura = (() => {
|
|
|
4657
4661
|
},
|
|
4658
4662
|
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconChevronDown, null) })
|
|
4659
4663
|
)),
|
|
4664
|
+
/* @__PURE__ */ React23.createElement("div", { role: "status", className: "aura-sr-only aura-combo__status" }, statusText),
|
|
4660
4665
|
list
|
|
4661
4666
|
);
|
|
4662
4667
|
}
|
|
@@ -4670,7 +4675,15 @@ window.Aura = (() => {
|
|
|
4670
4675
|
return alertElement(
|
|
4671
4676
|
props,
|
|
4672
4677
|
ref,
|
|
4673
|
-
props.onDismiss ? /* @__PURE__ */ React24.createElement(
|
|
4678
|
+
props.onDismiss ? /* @__PURE__ */ React24.createElement(
|
|
4679
|
+
IconButton,
|
|
4680
|
+
{
|
|
4681
|
+
icon: /* @__PURE__ */ React24.createElement(IconX, null),
|
|
4682
|
+
label: props.dismissLabel || t.dismiss,
|
|
4683
|
+
className: "aura-alert__close",
|
|
4684
|
+
onClick: props.onDismiss
|
|
4685
|
+
}
|
|
4686
|
+
) : null,
|
|
4674
4687
|
autoId
|
|
4675
4688
|
);
|
|
4676
4689
|
});
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -801,6 +801,7 @@ function alertElement(props, ref, close, autoId) {
|
|
|
801
801
|
"children",
|
|
802
802
|
"action",
|
|
803
803
|
"onDismiss",
|
|
804
|
+
"dismissLabel",
|
|
804
805
|
"className",
|
|
805
806
|
"role",
|
|
806
807
|
"icon"
|
|
@@ -4340,6 +4341,9 @@ var Combobox = React23.forwardRef(
|
|
|
4340
4341
|
[activeIdx, open]
|
|
4341
4342
|
);
|
|
4342
4343
|
const live = props.loading ? [] : shown;
|
|
4344
|
+
const listShown = open && mounted && !!posState[0];
|
|
4345
|
+
const searching = !!props.onSearch;
|
|
4346
|
+
const statusText = !listShown ? "" : props.loading ? props.loadingText || t.searching : searching && query == null ? "" : !live.length ? props.emptyText || t.noMatches : more ? t.keepTyping(options.length) : searching && props.loading === false ? t.results(live.length) : "";
|
|
4343
4347
|
function openList() {
|
|
4344
4348
|
if (!open && !props.disabled && !props.readOnly) {
|
|
4345
4349
|
setOpen(true);
|
|
@@ -4513,7 +4517,7 @@ var Combobox = React23.forwardRef(
|
|
|
4513
4517
|
})));
|
|
4514
4518
|
})
|
|
4515
4519
|
) : null,
|
|
4516
|
-
props.loading || !live.length || more ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__list",
|
|
4520
|
+
props.loading || !live.length || more ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__list", "aria-hidden": "true" }, props.loading ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconLoaderCircle, null), className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React23.createElement("div", { className: "aura-combo__note" }, t.keepTyping(options.length))) : null
|
|
4517
4521
|
),
|
|
4518
4522
|
document.body
|
|
4519
4523
|
) : null;
|
|
@@ -4639,6 +4643,7 @@ var Combobox = React23.forwardRef(
|
|
|
4639
4643
|
},
|
|
4640
4644
|
/* @__PURE__ */ React23.createElement(Icon, { name: /* @__PURE__ */ React23.createElement(IconChevronDown, null) })
|
|
4641
4645
|
)),
|
|
4646
|
+
/* @__PURE__ */ React23.createElement("div", { role: "status", className: "aura-sr-only aura-combo__status" }, statusText),
|
|
4642
4647
|
list
|
|
4643
4648
|
);
|
|
4644
4649
|
}
|
|
@@ -4652,7 +4657,15 @@ var Alert = React24.forwardRef(function Alert2(props, ref) {
|
|
|
4652
4657
|
return alertElement(
|
|
4653
4658
|
props,
|
|
4654
4659
|
ref,
|
|
4655
|
-
props.onDismiss ? /* @__PURE__ */ React24.createElement(
|
|
4660
|
+
props.onDismiss ? /* @__PURE__ */ React24.createElement(
|
|
4661
|
+
IconButton,
|
|
4662
|
+
{
|
|
4663
|
+
icon: /* @__PURE__ */ React24.createElement(IconX, null),
|
|
4664
|
+
label: props.dismissLabel || t.dismiss,
|
|
4665
|
+
className: "aura-alert__close",
|
|
4666
|
+
onClick: props.onDismiss
|
|
4667
|
+
}
|
|
4668
|
+
) : null,
|
|
4656
4669
|
autoId
|
|
4657
4670
|
);
|
|
4658
4671
|
});
|
package/dist/esm/Alert.js
CHANGED
|
@@ -12,7 +12,15 @@ const Alert = React.forwardRef(function Alert2(props, ref) {
|
|
|
12
12
|
return alertElement(
|
|
13
13
|
props,
|
|
14
14
|
ref,
|
|
15
|
-
props.onDismiss ? /* @__PURE__ */ React.createElement(
|
|
15
|
+
props.onDismiss ? /* @__PURE__ */ React.createElement(
|
|
16
|
+
IconButton,
|
|
17
|
+
{
|
|
18
|
+
icon: /* @__PURE__ */ React.createElement(IconX, null),
|
|
19
|
+
label: props.dismissLabel || t.dismiss,
|
|
20
|
+
className: "aura-alert__close",
|
|
21
|
+
onClick: props.onDismiss
|
|
22
|
+
}
|
|
23
|
+
) : null,
|
|
16
24
|
autoId
|
|
17
25
|
);
|
|
18
26
|
});
|
package/dist/esm/Combobox.js
CHANGED
|
@@ -138,6 +138,9 @@ const Combobox = React.forwardRef(
|
|
|
138
138
|
[activeIdx, open]
|
|
139
139
|
);
|
|
140
140
|
const live = props.loading ? [] : shown;
|
|
141
|
+
const listShown = open && mounted && !!posState[0];
|
|
142
|
+
const searching = !!props.onSearch;
|
|
143
|
+
const statusText = !listShown ? "" : props.loading ? props.loadingText || t.searching : searching && query == null ? "" : !live.length ? props.emptyText || t.noMatches : more ? t.keepTyping(options.length) : searching && props.loading === false ? t.results(live.length) : "";
|
|
141
144
|
function openList() {
|
|
142
145
|
if (!open && !props.disabled && !props.readOnly) {
|
|
143
146
|
setOpen(true);
|
|
@@ -311,7 +314,7 @@ const Combobox = React.forwardRef(
|
|
|
311
314
|
})));
|
|
312
315
|
})
|
|
313
316
|
) : null,
|
|
314
|
-
props.loading || !live.length || more ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__list",
|
|
317
|
+
props.loading || !live.length || more ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__list", "aria-hidden": "true" }, props.loading ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconLoaderCircle, null), className: "aura-spin" }), props.loadingText || t.searching) : !live.length ? /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, props.emptyText || t.noMatches) : /* @__PURE__ */ React.createElement("div", { className: "aura-combo__note" }, t.keepTyping(options.length))) : null
|
|
315
318
|
),
|
|
316
319
|
document.body
|
|
317
320
|
) : null;
|
|
@@ -437,6 +440,7 @@ const Combobox = React.forwardRef(
|
|
|
437
440
|
},
|
|
438
441
|
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconChevronDown, null) })
|
|
439
442
|
)),
|
|
443
|
+
/* @__PURE__ */ React.createElement("div", { role: "status", className: "aura-sr-only aura-combo__status" }, statusText),
|
|
440
444
|
list
|
|
441
445
|
);
|
|
442
446
|
}
|
package/dist/esm/display.js
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -773,6 +773,10 @@ export interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
|
|
|
773
773
|
action?: React$1.ReactNode | undefined;
|
|
774
774
|
/** Adds a close button. */
|
|
775
775
|
onDismiss?: (() => void) | undefined;
|
|
776
|
+
/** 5.83 (Chamber-OS 196): the close button's accessible name — say what is dismissed when a page has several
|
|
777
|
+
* notices or the notice is about a named thing ("Dismiss starter warning for Monthly Newsletter"). Default: the
|
|
778
|
+
* `dismiss` string ("Dismiss"). */
|
|
779
|
+
dismissLabel?: string | undefined;
|
|
776
780
|
className?: string | undefined;
|
|
777
781
|
}
|
|
778
782
|
/** A button (or, with `href`, a link through AuraProvider's `linkComponent`) on a toast (5.6: `href`, `dismiss`). */
|
|
@@ -1076,6 +1080,8 @@ export interface ComboboxProps extends FieldProps {
|
|
|
1076
1080
|
clearable?: boolean | undefined;
|
|
1077
1081
|
/** Server-side search: called with the typed text; the component stops filtering and shows `options` as given. */
|
|
1078
1082
|
onSearch?: ((query: string) => void) | undefined;
|
|
1083
|
+
/** A search is running: the list shows `loadingText`. 5.83: with `onSearch`, the result count is announced when
|
|
1084
|
+
* `loading` goes back to `false` after a search — pass `false`, not leave it out, once results arrive. */
|
|
1079
1085
|
loading?: boolean | undefined;
|
|
1080
1086
|
loadingText?: string | undefined;
|
|
1081
1087
|
emptyText?: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -773,6 +773,10 @@ export interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
|
|
|
773
773
|
action?: React$1.ReactNode | undefined;
|
|
774
774
|
/** Adds a close button. */
|
|
775
775
|
onDismiss?: (() => void) | undefined;
|
|
776
|
+
/** 5.83 (Chamber-OS 196): the close button's accessible name — say what is dismissed when a page has several
|
|
777
|
+
* notices or the notice is about a named thing ("Dismiss starter warning for Monthly Newsletter"). Default: the
|
|
778
|
+
* `dismiss` string ("Dismiss"). */
|
|
779
|
+
dismissLabel?: string | undefined;
|
|
776
780
|
className?: string | undefined;
|
|
777
781
|
}
|
|
778
782
|
/** A button (or, with `href`, a link through AuraProvider's `linkComponent`) on a toast (5.6: `href`, `dismiss`). */
|
|
@@ -1076,6 +1080,8 @@ export interface ComboboxProps extends FieldProps {
|
|
|
1076
1080
|
clearable?: boolean | undefined;
|
|
1077
1081
|
/** Server-side search: called with the typed text; the component stops filtering and shows `options` as given. */
|
|
1078
1082
|
onSearch?: ((query: string) => void) | undefined;
|
|
1083
|
+
/** A search is running: the list shows `loadingText`. 5.83: with `onSearch`, the result count is announced when
|
|
1084
|
+
* `loading` goes back to `false` after a search — pass `false`, not leave it out, once results arrive. */
|
|
1079
1085
|
loading?: boolean | undefined;
|
|
1080
1086
|
loadingText?: string | undefined;
|
|
1081
1087
|
emptyText?: string | undefined;
|
package/dist/server/index.cjs
CHANGED
package/dist/server/index.d.cts
CHANGED
|
@@ -92,6 +92,10 @@ export interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
|
|
|
92
92
|
action?: React$1.ReactNode | undefined;
|
|
93
93
|
/** Adds a close button. */
|
|
94
94
|
onDismiss?: (() => void) | undefined;
|
|
95
|
+
/** 5.83 (Chamber-OS 196): the close button's accessible name — say what is dismissed when a page has several
|
|
96
|
+
* notices or the notice is about a named thing ("Dismiss starter warning for Monthly Newsletter"). Default: the
|
|
97
|
+
* `dismiss` string ("Dismiss"). */
|
|
98
|
+
dismissLabel?: string | undefined;
|
|
95
99
|
className?: string | undefined;
|
|
96
100
|
}
|
|
97
101
|
/** Other attributes (`id`, `data-*`, `aria-*`) go on the card's root (5.8). */
|
|
@@ -535,7 +539,7 @@ export declare function linkClass(opts?: {
|
|
|
535
539
|
touchHeight?: boolean | "always" | undefined;
|
|
536
540
|
className?: string | undefined;
|
|
537
541
|
}): string;
|
|
538
|
-
declare function ServerAlert(props: Omit<AlertProps, "onDismiss">): React$1.ReactElement;
|
|
542
|
+
declare function ServerAlert(props: Omit<AlertProps, "onDismiss" | "dismissLabel">): React$1.ReactElement;
|
|
539
543
|
declare function ServerCard(props: CardProps): React$1.ReactElement;
|
|
540
544
|
declare function ServerStatusPill(props: StatusPillProps): React$1.ReactElement;
|
|
541
545
|
declare function ServerSpinner(props: SpinnerProps): React$1.ReactElement;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -92,6 +92,10 @@ export interface AlertProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
|
|
|
92
92
|
action?: React$1.ReactNode | undefined;
|
|
93
93
|
/** Adds a close button. */
|
|
94
94
|
onDismiss?: (() => void) | undefined;
|
|
95
|
+
/** 5.83 (Chamber-OS 196): the close button's accessible name — say what is dismissed when a page has several
|
|
96
|
+
* notices or the notice is about a named thing ("Dismiss starter warning for Monthly Newsletter"). Default: the
|
|
97
|
+
* `dismiss` string ("Dismiss"). */
|
|
98
|
+
dismissLabel?: string | undefined;
|
|
95
99
|
className?: string | undefined;
|
|
96
100
|
}
|
|
97
101
|
/** Other attributes (`id`, `data-*`, `aria-*`) go on the card's root (5.8). */
|
|
@@ -535,7 +539,7 @@ export declare function linkClass(opts?: {
|
|
|
535
539
|
touchHeight?: boolean | "always" | undefined;
|
|
536
540
|
className?: string | undefined;
|
|
537
541
|
}): string;
|
|
538
|
-
declare function ServerAlert(props: Omit<AlertProps, "onDismiss">): React$1.ReactElement;
|
|
542
|
+
declare function ServerAlert(props: Omit<AlertProps, "onDismiss" | "dismissLabel">): React$1.ReactElement;
|
|
539
543
|
declare function ServerCard(props: CardProps): React$1.ReactElement;
|
|
540
544
|
declare function ServerStatusPill(props: StatusPillProps): React$1.ReactElement;
|
|
541
545
|
declare function ServerSpinner(props: SpinnerProps): React$1.ReactElement;
|
package/dist/server/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.83.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",
|