@jirawatpyk/aura-react 5.65.0 → 5.67.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 +9 -0
- package/dist/aura.bundle.js +690 -600
- package/dist/cjs/index.cjs +689 -599
- package/dist/esm/CheckboxGroup.js +81 -0
- package/dist/esm/Combobox.js +13 -2
- package/dist/esm/Menu.js +4 -2
- package/dist/esm/index.js +2 -0
- package/dist/esm/strings.js +1 -0
- package/dist/esm/strings.sv.js +1 -0
- package/dist/esm/strings.th.js +1 -0
- package/dist/index.d.cts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/locales/sv.cjs +1 -0
- package/dist/locales/sv.d.cts +2 -0
- package/dist/locales/sv.d.ts +2 -0
- package/dist/locales/th.cjs +1 -0
- package/dist/locales/th.d.cts +2 -0
- package/dist/locales/th.d.ts +2 -0
- package/dist/server/index.cjs +3 -0
- package/dist/server/index.d.cts +2 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +3 -0
- package/dist/styles.css +8 -0
- package/dist/styles.layer.css +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Checkbox } from "./Checkbox.js";
|
|
4
|
+
import { describedBy } from "./Field.js";
|
|
5
|
+
import { Icon } from "./Icon.js";
|
|
6
|
+
import { cx, touchClass, uid, useMaybeControlled } from "./internal.js";
|
|
7
|
+
import { useStrings } from "./locale.js";
|
|
8
|
+
import { IconCircleAlert } from "./icons.js";
|
|
9
|
+
const CheckboxGroup = React.forwardRef(
|
|
10
|
+
function CheckboxGroup2(props, ref) {
|
|
11
|
+
const t = useStrings();
|
|
12
|
+
const auto = uid(), id = props.id || auto;
|
|
13
|
+
const st = useMaybeControlled(props.value, props.defaultValue || [], props.onChange);
|
|
14
|
+
const picked = st[0] || [];
|
|
15
|
+
const opts = (props.options || []).map(function(o) {
|
|
16
|
+
return typeof o === "object" ? o : { value: o, label: o };
|
|
17
|
+
});
|
|
18
|
+
const name = props.name || id;
|
|
19
|
+
const setRef = React.useCallback(
|
|
20
|
+
function(el) {
|
|
21
|
+
if (el)
|
|
22
|
+
el.focus = function(o) {
|
|
23
|
+
const b = el.querySelector('input[type="checkbox"]:checked:not(:disabled)') || el.querySelector('input[type="checkbox"]:not(:disabled)');
|
|
24
|
+
if (b) b.focus(o);
|
|
25
|
+
};
|
|
26
|
+
if (typeof ref === "function") ref(el);
|
|
27
|
+
else if (ref) ref.current = el;
|
|
28
|
+
},
|
|
29
|
+
[ref]
|
|
30
|
+
);
|
|
31
|
+
return /* @__PURE__ */ React.createElement(
|
|
32
|
+
"fieldset",
|
|
33
|
+
{
|
|
34
|
+
ref: setRef,
|
|
35
|
+
className: cx(
|
|
36
|
+
"aura-field aura-radio-group aura-checkbox-group",
|
|
37
|
+
props.error && "is-invalid",
|
|
38
|
+
touchClass(props.touchHeight),
|
|
39
|
+
props.className
|
|
40
|
+
),
|
|
41
|
+
"aria-describedby": describedBy(id, props),
|
|
42
|
+
disabled: props.disabled
|
|
43
|
+
},
|
|
44
|
+
props.label ? /* @__PURE__ */ React.createElement("legend", { className: "aura-field__label" }, props.label, props.required ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "aura-field__req", "aria-hidden": true }, " *"), /* @__PURE__ */ React.createElement("span", { className: "aura-sr-only" }, " (" + t.required + ")")) : null) : null,
|
|
45
|
+
/* @__PURE__ */ React.createElement("div", { className: cx("aura-radio-group__list", props.orientation === "horizontal" && "is-horizontal") }, opts.map(function(v) {
|
|
46
|
+
return /* @__PURE__ */ React.createElement(
|
|
47
|
+
Checkbox,
|
|
48
|
+
{
|
|
49
|
+
key: v.value,
|
|
50
|
+
name,
|
|
51
|
+
value: v.value,
|
|
52
|
+
checked: picked.indexOf(v.value) >= 0,
|
|
53
|
+
disabled: props.disabled || v.disabled,
|
|
54
|
+
description: v.description,
|
|
55
|
+
touchHeight: props.touchHeight,
|
|
56
|
+
"aria-invalid": props.error ? true : void 0,
|
|
57
|
+
"aria-describedby": props.error ? id + "-error" : void 0,
|
|
58
|
+
onChange: function(on) {
|
|
59
|
+
const known = opts.map(function(o) {
|
|
60
|
+
return o.value;
|
|
61
|
+
});
|
|
62
|
+
const next = known.filter(function(val) {
|
|
63
|
+
return val === v.value ? on : picked.indexOf(val) >= 0;
|
|
64
|
+
}).concat(
|
|
65
|
+
picked.filter(function(val) {
|
|
66
|
+
return known.indexOf(val) < 0;
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
st[1](next);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
v.label
|
|
73
|
+
);
|
|
74
|
+
})),
|
|
75
|
+
props.error ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__error", id: id + "-error" }, /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleAlert, null), size: 14 }), props.error) : props.hint ? /* @__PURE__ */ React.createElement("p", { className: "aura-field__hint", id: id + "-hint" }, props.hint) : null
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
export {
|
|
80
|
+
CheckboxGroup
|
|
81
|
+
};
|
package/dist/esm/Combobox.js
CHANGED
|
@@ -310,6 +310,7 @@ const Combobox = React.forwardRef(
|
|
|
310
310
|
label: props.label,
|
|
311
311
|
hint: props.hint,
|
|
312
312
|
error: props.error,
|
|
313
|
+
invalid: props.invalid,
|
|
313
314
|
required: props.required,
|
|
314
315
|
optional: props.optional,
|
|
315
316
|
disabled: props.disabled,
|
|
@@ -354,8 +355,18 @@ const Combobox = React.forwardRef(
|
|
|
354
355
|
"aria-controls": open && live.length ? listId : void 0,
|
|
355
356
|
"aria-autocomplete": "list",
|
|
356
357
|
"aria-activedescendant": open && live[activeIdx] ? optId(activeIdx) : void 0,
|
|
357
|
-
"aria-invalid": props.error ? true : void 0,
|
|
358
|
-
"aria-describedby":
|
|
358
|
+
"aria-invalid": props.error || props.invalid ? true : void 0,
|
|
359
|
+
"aria-describedby": (
|
|
360
|
+
/* each id once, in order: error or hint, the chip summary, then yours */
|
|
361
|
+
Array.from(
|
|
362
|
+
new Set(
|
|
363
|
+
[
|
|
364
|
+
props.error ? id + "-error" : props.hint ? id + "-hint" : "",
|
|
365
|
+
multi && picked.length ? summaryId : ""
|
|
366
|
+
].concat(String(props["aria-describedby"] || "").split(/\s+/)).filter(Boolean)
|
|
367
|
+
)
|
|
368
|
+
).join(" ") || void 0
|
|
369
|
+
),
|
|
359
370
|
placeholder: multi && values.length ? void 0 : props.placeholder,
|
|
360
371
|
disabled: props.disabled,
|
|
361
372
|
readOnly: props.readOnly,
|
package/dist/esm/Menu.js
CHANGED
|
@@ -164,11 +164,13 @@ const Menu = React.forwardRef(function Menu2(props, ref) {
|
|
|
164
164
|
if (it.separator) return /* @__PURE__ */ React.createElement("div", { key: "s" + i, role: "separator", className: "aura-menu__sep" });
|
|
165
165
|
const isRadio = it.type === "radio";
|
|
166
166
|
const isCheck = !isRadio && it.checked !== void 0;
|
|
167
|
-
const
|
|
167
|
+
const checkAtEnd = isCheck && !!it.icon && it.checkPlacement !== "start";
|
|
168
|
+
const lead = isRadio ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-menu__radio", it.checked && "is-on") }) : isCheck && !checkAtEnd ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-menu__check", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), size: 12, strokeWidth: 3 }) : null) : it.icon ? /* @__PURE__ */ React.createElement(Icon, { name: it.icon }) : /* @__PURE__ */ React.createElement("span", { className: "aura-menu__blank" });
|
|
168
169
|
const body = [
|
|
169
170
|
/* @__PURE__ */ React.createElement(React.Fragment, { key: "l" }, lead),
|
|
170
171
|
/* @__PURE__ */ React.createElement("span", { key: "t", className: "aura-menu__label" }, it.label),
|
|
171
|
-
it.hint ? /* @__PURE__ */ React.createElement("span", { key: "h", className: "aura-menu__hint" }, it.hint) : null
|
|
172
|
+
it.hint ? /* @__PURE__ */ React.createElement("span", { key: "h", className: "aura-menu__hint" }, it.hint) : null,
|
|
173
|
+
checkAtEnd ? /* @__PURE__ */ React.createElement("span", { key: "c", className: cx("aura-menu__mark", it.checked && "is-on") }, it.checked ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null), size: 16, strokeWidth: 2.5 }) : null) : null
|
|
172
174
|
];
|
|
173
175
|
const cls = cx("aura-menu__item", it.tone === "danger" && "aura-menu__item--danger");
|
|
174
176
|
const reasonId = it.disabled && it.disabledReason ? itemId + "-r" + i : void 0;
|
package/dist/esm/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { Select } from "./Select.js";
|
|
|
13
13
|
import { FilterSelect } from "./FilterSelect.js";
|
|
14
14
|
import { FilterDateRange } from "./FilterDateRange.js";
|
|
15
15
|
import { RadioGroup } from "./RadioGroup.js";
|
|
16
|
+
import { CheckboxGroup } from "./CheckboxGroup.js";
|
|
16
17
|
import { Switch } from "./Switch.js";
|
|
17
18
|
import { Combobox, defaultFilter } from "./Combobox.js";
|
|
18
19
|
import { DatePicker, DateRangePicker, Calendar, formatDate, parseDate, useFormatDate } from "./DatePicker.js";
|
|
@@ -78,6 +79,7 @@ export {
|
|
|
78
79
|
Calendar,
|
|
79
80
|
Card,
|
|
80
81
|
Checkbox,
|
|
82
|
+
CheckboxGroup,
|
|
81
83
|
ColorSchemeScript,
|
|
82
84
|
ColorSchemeToggle,
|
|
83
85
|
Combobox,
|
package/dist/esm/strings.js
CHANGED
package/dist/esm/strings.sv.js
CHANGED
package/dist/esm/strings.th.js
CHANGED
|
@@ -129,6 +129,7 @@ const th = {
|
|
|
129
129
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
130
130
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
131
131
|
opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
132
|
+
required: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
132
133
|
filtersApplied: function(n2) {
|
|
133
134
|
return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n2.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
|
|
134
135
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -391,8 +391,13 @@ export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButton
|
|
|
391
391
|
export interface MenuItem {
|
|
392
392
|
label?: string | undefined;
|
|
393
393
|
icon?: IconInput | undefined;
|
|
394
|
-
/** Present = a checkable item (menuitemcheckbox).
|
|
394
|
+
/** Present = a checkable item (menuitemcheckbox). 5.66 (Chamber-OS 181): with an `icon` too, the icon stays at the
|
|
395
|
+
* start and the state is a check mark at the end (after `hint`); without one, a check box at the start. A radio
|
|
396
|
+
* item (`type: 'radio'`) still draws its circle in place of an icon. */
|
|
395
397
|
checked?: boolean | undefined;
|
|
398
|
+
/** 5.66: where a checkable item with an `icon` shows its state — `end` (default: the icon stays, a check mark at the
|
|
399
|
+
* end) or `start` (the check box in place of the icon, as before 5.66). */
|
|
400
|
+
checkPlacement?: "start" | "end" | undefined;
|
|
396
401
|
/** Dimmed and does nothing when chosen, but still reachable with the arrow keys and announced (5.10). */
|
|
397
402
|
disabled?: boolean | undefined;
|
|
398
403
|
/** Why it's disabled ("You can resend in 5 minutes"): shown in place of the hint and read with the item. (5.10) */
|
|
@@ -682,6 +687,25 @@ export interface RadioGroupProps extends FieldProps {
|
|
|
682
687
|
* screens already get it), `'always'` at every width, also with a mouse. Default: as tall as the control and label. */
|
|
683
688
|
touchHeight?: TouchHeight | undefined;
|
|
684
689
|
}
|
|
690
|
+
/** 5.67 (Chamber-OS 183): RadioGroup's many-choice twin — one legend, one hint, one error over a set of checkboxes. */
|
|
691
|
+
export interface CheckboxGroupProps extends FieldProps {
|
|
692
|
+
options: ChoiceOption[];
|
|
693
|
+
/** The ticked options' values, in option order (not the order they were ticked); values not among the options are
|
|
694
|
+
* kept, after them. `required` shows the `*` and adds "(required)" to the group's name; "at least one" is yours to
|
|
695
|
+
* check — pass `error`. */
|
|
696
|
+
value?: string[] | undefined;
|
|
697
|
+
defaultValue?: string[] | undefined;
|
|
698
|
+
onChange?: ((values: string[]) => void) | undefined;
|
|
699
|
+
/** Each box's `name` for a native form (one entry per ticked value). Default: the group's id. */
|
|
700
|
+
name?: string | undefined;
|
|
701
|
+
/** Default `vertical`. */
|
|
702
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
703
|
+
disabled?: boolean | undefined;
|
|
704
|
+
id?: string | undefined;
|
|
705
|
+
className?: string | undefined;
|
|
706
|
+
/** 44px rows, as RadioGroup: `true` below 640px or on a coarse pointer, `'always'` at every width. */
|
|
707
|
+
touchHeight?: TouchHeight | undefined;
|
|
708
|
+
}
|
|
685
709
|
export interface SwitchProps {
|
|
686
710
|
label?: string | undefined;
|
|
687
711
|
description?: string | undefined;
|
|
@@ -998,6 +1022,12 @@ export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "de
|
|
|
998
1022
|
max?: number | undefined;
|
|
999
1023
|
}
|
|
1000
1024
|
export interface ComboboxProps extends FieldProps {
|
|
1025
|
+
/** 5.66 (Chamber-OS 182): ids added to the input's own description (the hint or error, the chip summary) — a page's
|
|
1026
|
+
* `role="alert"` message beside the field (each id once). With `invalid` the field is marked wrong without
|
|
1027
|
+
* AURA's message line; `error` still wins. */
|
|
1028
|
+
"aria-describedby"?: string | undefined;
|
|
1029
|
+
/** 5.66 (Chamber-OS 182): the danger border and `aria-invalid="true"` without AURA's message line, as on TextField. */
|
|
1030
|
+
invalid?: boolean | undefined;
|
|
1001
1031
|
/** 5.38 (Chamber-OS 141): a 44px box, its buttons 44px wide — `true` below 640px or on a coarse pointer, as
|
|
1002
1032
|
* TextField's `touchHeight`; `'always'` at every width. Default: the density's input height. */
|
|
1003
1033
|
touchHeight?: TouchHeight | undefined;
|
|
@@ -1922,6 +1952,7 @@ export declare const FilterSelect: React$1.ForwardRefExoticComponent<FilterSelec
|
|
|
1922
1952
|
* complete, a preset is picked or the range is cleared; never on a lone start day. */
|
|
1923
1953
|
export declare const FilterDateRange: React$1.ForwardRefExoticComponent<FilterDateRangeProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1924
1954
|
export declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLFieldSetElement>>;
|
|
1955
|
+
export declare const CheckboxGroup: React$1.ForwardRefExoticComponent<CheckboxGroupProps & React$1.RefAttributes<HTMLFieldSetElement>>;
|
|
1925
1956
|
export declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1926
1957
|
/** One value, or with `multiple` any number (chips). Two call signatures so value/onChange are typed for each. */
|
|
1927
1958
|
export interface ComboboxComponent {
|
|
@@ -2228,6 +2259,8 @@ export interface AuraStrings {
|
|
|
2228
2259
|
statusUnknown: string;
|
|
2229
2260
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
2230
2261
|
opensInNewTab: string;
|
|
2262
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
2263
|
+
required: string;
|
|
2231
2264
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
2232
2265
|
filtersApplied: (n: number) => string;
|
|
2233
2266
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/index.d.ts
CHANGED
|
@@ -391,8 +391,13 @@ export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButton
|
|
|
391
391
|
export interface MenuItem {
|
|
392
392
|
label?: string | undefined;
|
|
393
393
|
icon?: IconInput | undefined;
|
|
394
|
-
/** Present = a checkable item (menuitemcheckbox).
|
|
394
|
+
/** Present = a checkable item (menuitemcheckbox). 5.66 (Chamber-OS 181): with an `icon` too, the icon stays at the
|
|
395
|
+
* start and the state is a check mark at the end (after `hint`); without one, a check box at the start. A radio
|
|
396
|
+
* item (`type: 'radio'`) still draws its circle in place of an icon. */
|
|
395
397
|
checked?: boolean | undefined;
|
|
398
|
+
/** 5.66: where a checkable item with an `icon` shows its state — `end` (default: the icon stays, a check mark at the
|
|
399
|
+
* end) or `start` (the check box in place of the icon, as before 5.66). */
|
|
400
|
+
checkPlacement?: "start" | "end" | undefined;
|
|
396
401
|
/** Dimmed and does nothing when chosen, but still reachable with the arrow keys and announced (5.10). */
|
|
397
402
|
disabled?: boolean | undefined;
|
|
398
403
|
/** Why it's disabled ("You can resend in 5 minutes"): shown in place of the hint and read with the item. (5.10) */
|
|
@@ -682,6 +687,25 @@ export interface RadioGroupProps extends FieldProps {
|
|
|
682
687
|
* screens already get it), `'always'` at every width, also with a mouse. Default: as tall as the control and label. */
|
|
683
688
|
touchHeight?: TouchHeight | undefined;
|
|
684
689
|
}
|
|
690
|
+
/** 5.67 (Chamber-OS 183): RadioGroup's many-choice twin — one legend, one hint, one error over a set of checkboxes. */
|
|
691
|
+
export interface CheckboxGroupProps extends FieldProps {
|
|
692
|
+
options: ChoiceOption[];
|
|
693
|
+
/** The ticked options' values, in option order (not the order they were ticked); values not among the options are
|
|
694
|
+
* kept, after them. `required` shows the `*` and adds "(required)" to the group's name; "at least one" is yours to
|
|
695
|
+
* check — pass `error`. */
|
|
696
|
+
value?: string[] | undefined;
|
|
697
|
+
defaultValue?: string[] | undefined;
|
|
698
|
+
onChange?: ((values: string[]) => void) | undefined;
|
|
699
|
+
/** Each box's `name` for a native form (one entry per ticked value). Default: the group's id. */
|
|
700
|
+
name?: string | undefined;
|
|
701
|
+
/** Default `vertical`. */
|
|
702
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
703
|
+
disabled?: boolean | undefined;
|
|
704
|
+
id?: string | undefined;
|
|
705
|
+
className?: string | undefined;
|
|
706
|
+
/** 44px rows, as RadioGroup: `true` below 640px or on a coarse pointer, `'always'` at every width. */
|
|
707
|
+
touchHeight?: TouchHeight | undefined;
|
|
708
|
+
}
|
|
685
709
|
export interface SwitchProps {
|
|
686
710
|
label?: string | undefined;
|
|
687
711
|
description?: string | undefined;
|
|
@@ -998,6 +1022,12 @@ export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "de
|
|
|
998
1022
|
max?: number | undefined;
|
|
999
1023
|
}
|
|
1000
1024
|
export interface ComboboxProps extends FieldProps {
|
|
1025
|
+
/** 5.66 (Chamber-OS 182): ids added to the input's own description (the hint or error, the chip summary) — a page's
|
|
1026
|
+
* `role="alert"` message beside the field (each id once). With `invalid` the field is marked wrong without
|
|
1027
|
+
* AURA's message line; `error` still wins. */
|
|
1028
|
+
"aria-describedby"?: string | undefined;
|
|
1029
|
+
/** 5.66 (Chamber-OS 182): the danger border and `aria-invalid="true"` without AURA's message line, as on TextField. */
|
|
1030
|
+
invalid?: boolean | undefined;
|
|
1001
1031
|
/** 5.38 (Chamber-OS 141): a 44px box, its buttons 44px wide — `true` below 640px or on a coarse pointer, as
|
|
1002
1032
|
* TextField's `touchHeight`; `'always'` at every width. Default: the density's input height. */
|
|
1003
1033
|
touchHeight?: TouchHeight | undefined;
|
|
@@ -1922,6 +1952,7 @@ export declare const FilterSelect: React$1.ForwardRefExoticComponent<FilterSelec
|
|
|
1922
1952
|
* complete, a preset is picked or the range is cleared; never on a lone start day. */
|
|
1923
1953
|
export declare const FilterDateRange: React$1.ForwardRefExoticComponent<FilterDateRangeProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1924
1954
|
export declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLFieldSetElement>>;
|
|
1955
|
+
export declare const CheckboxGroup: React$1.ForwardRefExoticComponent<CheckboxGroupProps & React$1.RefAttributes<HTMLFieldSetElement>>;
|
|
1925
1956
|
export declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1926
1957
|
/** One value, or with `multiple` any number (chips). Two call signatures so value/onChange are typed for each. */
|
|
1927
1958
|
export interface ComboboxComponent {
|
|
@@ -2228,6 +2259,8 @@ export interface AuraStrings {
|
|
|
2228
2259
|
statusUnknown: string;
|
|
2229
2260
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
2230
2261
|
opensInNewTab: string;
|
|
2262
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
2263
|
+
required: string;
|
|
2231
2264
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
2232
2265
|
filtersApplied: (n: number) => string;
|
|
2233
2266
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/locales/sv.cjs
CHANGED
package/dist/locales/sv.d.cts
CHANGED
|
@@ -98,6 +98,8 @@ export interface AuraStrings {
|
|
|
98
98
|
statusUnknown: string;
|
|
99
99
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
100
100
|
opensInNewTab: string;
|
|
101
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
102
|
+
required: string;
|
|
101
103
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
102
104
|
filtersApplied: (n: number) => string;
|
|
103
105
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/locales/sv.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ export interface AuraStrings {
|
|
|
98
98
|
statusUnknown: string;
|
|
99
99
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
100
100
|
opensInNewTab: string;
|
|
101
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
102
|
+
required: string;
|
|
101
103
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
102
104
|
filtersApplied: (n: number) => string;
|
|
103
105
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/locales/th.cjs
CHANGED
|
@@ -154,6 +154,7 @@ var th = {
|
|
|
154
154
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
155
155
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
156
156
|
opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
157
|
+
required: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
157
158
|
filtersApplied: function(n2) {
|
|
158
159
|
return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n2.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
|
|
159
160
|
},
|
package/dist/locales/th.d.cts
CHANGED
|
@@ -98,6 +98,8 @@ export interface AuraStrings {
|
|
|
98
98
|
statusUnknown: string;
|
|
99
99
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
100
100
|
opensInNewTab: string;
|
|
101
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
102
|
+
required: string;
|
|
101
103
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
102
104
|
filtersApplied: (n: number) => string;
|
|
103
105
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/locales/th.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ export interface AuraStrings {
|
|
|
98
98
|
statusUnknown: string;
|
|
99
99
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
100
100
|
opensInNewTab: string;
|
|
101
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
102
|
+
required: string;
|
|
101
103
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
102
104
|
filtersApplied: (n: number) => string;
|
|
103
105
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/server/index.cjs
CHANGED
|
@@ -345,6 +345,7 @@ var th = {
|
|
|
345
345
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
346
346
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
347
347
|
opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
348
|
+
required: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
348
349
|
filtersApplied: function(n3) {
|
|
349
350
|
return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n3.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
|
|
350
351
|
},
|
|
@@ -486,6 +487,7 @@ var sv = {
|
|
|
486
487
|
statusOk: "OK",
|
|
487
488
|
statusUnknown: "Ingen data",
|
|
488
489
|
opensInNewTab: "\xF6ppnas i en ny flik",
|
|
490
|
+
required: "obligatoriskt",
|
|
489
491
|
filtersApplied: function(n3) {
|
|
490
492
|
return "Filter, " + n3.toLocaleString("sv-SE") + " aktiva";
|
|
491
493
|
},
|
|
@@ -628,6 +630,7 @@ var STRINGS = {
|
|
|
628
630
|
statusOk: "OK",
|
|
629
631
|
statusUnknown: "No data",
|
|
630
632
|
opensInNewTab: "opens in a new tab",
|
|
633
|
+
required: "required",
|
|
631
634
|
filtersApplied: function(n3) {
|
|
632
635
|
return "Filters, " + n3.toLocaleString("en") + " applied";
|
|
633
636
|
},
|
package/dist/server/index.d.cts
CHANGED
|
@@ -432,6 +432,8 @@ export interface AuraStrings {
|
|
|
432
432
|
statusUnknown: string;
|
|
433
433
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
434
434
|
opensInNewTab: string;
|
|
435
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
436
|
+
required: string;
|
|
435
437
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
436
438
|
filtersApplied: (n: number) => string;
|
|
437
439
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/server/index.d.ts
CHANGED
|
@@ -432,6 +432,8 @@ export interface AuraStrings {
|
|
|
432
432
|
statusUnknown: string;
|
|
433
433
|
/** Read after a Menu link item with `target="_blank"` (5.41): "Visit site (opens in a new tab)". */
|
|
434
434
|
opensInNewTab: string;
|
|
435
|
+
/** 5.67: read after a CheckboxGroup's legend when `required` (its `*` is hidden from screen readers). */
|
|
436
|
+
required: string;
|
|
435
437
|
/** 5.42: FilterBar's collapsed-filters button, read with its count ("Filters, 2 applied"). */
|
|
436
438
|
filtersApplied: (n: number) => string;
|
|
437
439
|
/** 5.42: closes FilterBar's "Filters" sheet. */
|
package/dist/server/index.js
CHANGED
|
@@ -279,6 +279,7 @@ var th = {
|
|
|
279
279
|
statusOk: "\u0E1B\u0E01\u0E15\u0E34",
|
|
280
280
|
statusUnknown: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
281
281
|
opensInNewTab: "\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E19\u0E41\u0E17\u0E47\u0E1A\u0E43\u0E2B\u0E21\u0E48",
|
|
282
|
+
required: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
282
283
|
filtersApplied: function(n3) {
|
|
283
284
|
return "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07, \u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48 " + n3.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
|
|
284
285
|
},
|
|
@@ -420,6 +421,7 @@ var sv = {
|
|
|
420
421
|
statusOk: "OK",
|
|
421
422
|
statusUnknown: "Ingen data",
|
|
422
423
|
opensInNewTab: "\xF6ppnas i en ny flik",
|
|
424
|
+
required: "obligatoriskt",
|
|
423
425
|
filtersApplied: function(n3) {
|
|
424
426
|
return "Filter, " + n3.toLocaleString("sv-SE") + " aktiva";
|
|
425
427
|
},
|
|
@@ -562,6 +564,7 @@ var STRINGS = {
|
|
|
562
564
|
statusOk: "OK",
|
|
563
565
|
statusUnknown: "No data",
|
|
564
566
|
opensInNewTab: "opens in a new tab",
|
|
567
|
+
required: "required",
|
|
565
568
|
filtersApplied: function(n3) {
|
|
566
569
|
return "Filters, " + n3.toLocaleString("en") + " applied";
|
|
567
570
|
},
|
package/dist/styles.css
CHANGED
|
@@ -317,6 +317,11 @@ button.aura-btn--creative[aria-disabled='true']:hover { box-shadow: var(--aura-s
|
|
|
317
317
|
}
|
|
318
318
|
.aura-menu__check.is-on { background: var(--aura-control-checked-bg); border-color: var(--aura-control-checked-bg); color: var(--aura-control-checked-fg); }
|
|
319
319
|
.aura-menu__check.is-on .aura-icon { color: inherit; }
|
|
320
|
+
/* 5.66 (Chamber-OS 181): the trailing check mark of a checkable item that keeps its icon — the checked colour (text colour in forced colours), a fixed
|
|
321
|
+
* width so labels line up checked or not. */
|
|
322
|
+
.aura-menu__mark { flex: none; width: var(--aura-icon-sm); height: var(--aura-icon-sm); display: inline-flex; align-items: center; justify-content: center; }
|
|
323
|
+
.aura-menu__item .aura-menu__mark .aura-icon { color: var(--aura-control-checked-bg); }
|
|
324
|
+
.aura-menu__item--danger .aura-menu__mark .aura-icon { color: inherit; } /* a danger item's mark is its danger text */
|
|
320
325
|
.aura-menu__item--danger, .aura-menu__item--danger .aura-icon { color: var(--aura-fg-danger); }
|
|
321
326
|
.aura-menu__item--danger:hover, .aura-menu__item--danger:focus { background: var(--aura-alert-danger-bg); color: var(--aura-alert-danger-fg); }
|
|
322
327
|
.aura-menu__item--danger:hover .aura-icon, .aura-menu__item--danger:focus .aura-icon { color: var(--aura-alert-danger-fg); }
|
|
@@ -603,6 +608,8 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
603
608
|
.aura-radio:checked { border: 5px solid var(--aura-control-checked-bg); background: var(--aura-control-checked-fg); }
|
|
604
609
|
.aura-radio:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: var(--aura-focus-ring-offset); }
|
|
605
610
|
.aura-radio-group.is-invalid .aura-radio:not(:checked) { border-color: var(--aura-border-danger); }
|
|
611
|
+
/* 5.67 (Chamber-OS 183): CheckboxGroup shares RadioGroup's legend, list and touch rows; an error edges the empty boxes. */
|
|
612
|
+
.aura-checkbox-group.is-invalid .aura-check__input:not(:checked) + .aura-check__box { border-color: var(--aura-border-danger); }
|
|
606
613
|
|
|
607
614
|
.aura-switch-row { display: flex; align-items: flex-start; gap: var(--aura-space-3); font-family: var(--font-sans); }
|
|
608
615
|
/* 5.10.1: disabled rows, on or off, are treated alike and stay readable — the label turns secondary, the description
|
|
@@ -2559,6 +2566,7 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
2559
2566
|
.aura-switch-row.is-disabled .aura-choice__label { color: GrayText; }
|
|
2560
2567
|
.aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
|
|
2561
2568
|
.aura-progress :is(.aura-progress__bar, .aura-progress__swatch), .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; } /* every tone (5.64) */
|
|
2569
|
+
.aura-menu__item .aura-menu__mark .aura-icon { color: inherit; } /* 5.66: the item's text colour */
|
|
2562
2570
|
.aura-icon-btn[aria-pressed="true"]:not(.aura-input *) { background: Highlight; color: HighlightText; forced-color-adjust: none; } /* 5.65 */
|
|
2563
2571
|
.aura-icon-btn[aria-pressed="true"]:not(.aura-input *):hover { box-shadow: inset 0 0 0 1px HighlightText; }
|
|
2564
2572
|
.aura-icon-btn[aria-pressed="true"]:not(.aura-input *):focus-visible { outline-color: CanvasText; }
|
package/dist/styles.layer.css
CHANGED
|
@@ -319,6 +319,11 @@ button.aura-btn--creative[aria-disabled='true']:hover { box-shadow: var(--aura-s
|
|
|
319
319
|
}
|
|
320
320
|
.aura-menu__check.is-on { background: var(--aura-control-checked-bg); border-color: var(--aura-control-checked-bg); color: var(--aura-control-checked-fg); }
|
|
321
321
|
.aura-menu__check.is-on .aura-icon { color: inherit; }
|
|
322
|
+
/* 5.66 (Chamber-OS 181): the trailing check mark of a checkable item that keeps its icon — the checked colour (text colour in forced colours), a fixed
|
|
323
|
+
* width so labels line up checked or not. */
|
|
324
|
+
.aura-menu__mark { flex: none; width: var(--aura-icon-sm); height: var(--aura-icon-sm); display: inline-flex; align-items: center; justify-content: center; }
|
|
325
|
+
.aura-menu__item .aura-menu__mark .aura-icon { color: var(--aura-control-checked-bg); }
|
|
326
|
+
.aura-menu__item--danger .aura-menu__mark .aura-icon { color: inherit; } /* a danger item's mark is its danger text */
|
|
322
327
|
.aura-menu__item--danger, .aura-menu__item--danger .aura-icon { color: var(--aura-fg-danger); }
|
|
323
328
|
.aura-menu__item--danger:hover, .aura-menu__item--danger:focus { background: var(--aura-alert-danger-bg); color: var(--aura-alert-danger-fg); }
|
|
324
329
|
.aura-menu__item--danger:hover .aura-icon, .aura-menu__item--danger:focus .aura-icon { color: var(--aura-alert-danger-fg); }
|
|
@@ -605,6 +610,8 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
605
610
|
.aura-radio:checked { border: 5px solid var(--aura-control-checked-bg); background: var(--aura-control-checked-fg); }
|
|
606
611
|
.aura-radio:focus-visible { outline: var(--aura-focus-ring-width) solid var(--aura-focus-ring); outline-offset: var(--aura-focus-ring-offset); }
|
|
607
612
|
.aura-radio-group.is-invalid .aura-radio:not(:checked) { border-color: var(--aura-border-danger); }
|
|
613
|
+
/* 5.67 (Chamber-OS 183): CheckboxGroup shares RadioGroup's legend, list and touch rows; an error edges the empty boxes. */
|
|
614
|
+
.aura-checkbox-group.is-invalid .aura-check__input:not(:checked) + .aura-check__box { border-color: var(--aura-border-danger); }
|
|
608
615
|
|
|
609
616
|
.aura-switch-row { display: flex; align-items: flex-start; gap: var(--aura-space-3); font-family: var(--font-sans); }
|
|
610
617
|
/* 5.10.1: disabled rows, on or off, are treated alike and stay readable — the label turns secondary, the description
|
|
@@ -2561,6 +2568,7 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
2561
2568
|
.aura-switch-row.is-disabled .aura-choice__label { color: GrayText; }
|
|
2562
2569
|
.aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
|
|
2563
2570
|
.aura-progress :is(.aura-progress__bar, .aura-progress__swatch), .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; } /* every tone (5.64) */
|
|
2571
|
+
.aura-menu__item .aura-menu__mark .aura-icon { color: inherit; } /* 5.66: the item's text colour */
|
|
2564
2572
|
.aura-icon-btn[aria-pressed="true"]:not(.aura-input *) { background: Highlight; color: HighlightText; forced-color-adjust: none; } /* 5.65 */
|
|
2565
2573
|
.aura-icon-btn[aria-pressed="true"]:not(.aura-input *):hover { box-shadow: inset 0 0 0 1px HighlightText; }
|
|
2566
2574
|
.aura-icon-btn[aria-pressed="true"]:not(.aura-input *):focus-visible { outline-color: CanvasText; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.67.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",
|