@jirawatpyk/aura-react 5.17.0 → 5.18.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 +14 -4
- package/dist/cjs/index.cjs +14 -4
- package/dist/esm/Stepper.js +13 -6
- 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 +8 -1
- package/dist/index.d.ts +8 -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 +4 -0
- package/dist/styles.layer.css +4 -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.18 — Chamber-OS addendum 19
|
|
190
|
+
|
|
191
|
+
- **Stepper step errors** (item 112): a step can take `status: 'error'` — say, Save found errors on it. It keeps its place in the order and its state (a completed step is still a button with `onStepClick`, the current one keeps `aria-current="step"`), shows the danger tone with an alert icon instead of the check or number (outlined when it is the current step), and its accessible name ends ", has errors" instead of ", completed". On a phone the line reads "Step 2 of 4 — has errors" when the current step has errors; the markers, error ones included, stay visible. Steps without `status` look the same as before.
|
|
192
|
+
- **Stepper step names without the stray space**: a clickable step with a text label now has `aria-label` "Basics, completed" / "Fees, has errors" — from its content Chrome read "Basics , completed" (it puts a space before an absolutely positioned visually hidden span). Its `description` moves from the name to `aria-describedby`. The markup inside is unchanged; a label that is an element keeps the name from its content.
|
|
193
|
+
- New string `stepError` in every locale ("has errors", "มีข้อผิดพลาด", "har fel"); a pack you wrote yourself should add it (the built-in one for the locale is used otherwise, and the 6.0 notice for Thai and Swedish shows until it does).
|
|
194
|
+
|
|
189
195
|
## 5.17 — Chamber-OS addendum 18
|
|
190
196
|
|
|
191
197
|
- **Stat attributes, status line and a link on the label** (item 110): `id`, `data-*`, `aria-*`, `style`, `lang` and `dir` go on the `.aura-stat` root, from the root package and `/server` — a `data-testid`, or `aria-hidden` on a loading placeholder. `status` is a line under the value ("Active · renews 1 Jan" with its tone icon), hidden while loading. With `href`, `linkArea="label"` puts the link on the label (inside the heading when there is one) and stretches its hit area over the tile: a click anywhere follows it, the tile shows the focus ring and hover edge, and other controls in the tile (links, buttons, fields, anything focusable) stay clickable above it. `aria-label`, `aria-labelledby`, `aria-describedby` and `aria-current` then go on the link, and an `onClick` too. Text in such a tile can't be selected by dragging (the click belongs to the link). The default (`tile`) is unchanged. Only the documented attributes reach the root; anything else passed is dropped, as before.
|
package/dist/aura.bundle.js
CHANGED
|
@@ -928,6 +928,7 @@ window.Aura = (() => {
|
|
|
928
928
|
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
|
|
929
929
|
},
|
|
930
930
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
931
|
+
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
931
932
|
accepts: function(list, max) {
|
|
932
933
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
933
934
|
}
|
|
@@ -1058,6 +1059,7 @@ window.Aura = (() => {
|
|
|
1058
1059
|
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
|
|
1059
1060
|
},
|
|
1060
1061
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
1062
|
+
stepError: "har fel",
|
|
1061
1063
|
accepts: function(list, max) {
|
|
1062
1064
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
1063
1065
|
}
|
|
@@ -1189,6 +1191,7 @@ window.Aura = (() => {
|
|
|
1189
1191
|
return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
|
|
1190
1192
|
},
|
|
1191
1193
|
breadcrumbMore: "Show the full path",
|
|
1194
|
+
stepError: "has errors",
|
|
1192
1195
|
accepts: function(list, max) {
|
|
1193
1196
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
1194
1197
|
}
|
|
@@ -8912,6 +8915,7 @@ window.Aura = (() => {
|
|
|
8912
8915
|
var React60 = __toESM(require_react(), 1);
|
|
8913
8916
|
var Stepper = React60.forwardRef(function Stepper2(props, ref) {
|
|
8914
8917
|
const t = useStrings();
|
|
8918
|
+
const idBase = uid();
|
|
8915
8919
|
const steps = props.steps || [];
|
|
8916
8920
|
let at = -1;
|
|
8917
8921
|
steps.forEach(function(s, i) {
|
|
@@ -8929,14 +8933,18 @@ window.Aura = (() => {
|
|
|
8929
8933
|
},
|
|
8930
8934
|
/* @__PURE__ */ React60.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
8931
8935
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
8932
|
-
const
|
|
8933
|
-
const
|
|
8936
|
+
const error = s.status === "error";
|
|
8937
|
+
const marker = /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React60.createElement(Icon, { name: /* @__PURE__ */ React60.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React60.createElement(Icon, { name: /* @__PURE__ */ React60.createElement(IconCheck, null) }) : i + 1);
|
|
8938
|
+
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
8934
8939
|
const clickable = state === "done" && !!props.onStepClick;
|
|
8940
|
+
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
8941
|
+
const descId = idBase + "-step-" + i;
|
|
8942
|
+
const text2 = /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__label" }, s.label, note ? /* @__PURE__ */ React60.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__desc", id: named ? descId : void 0 }, s.description) : null);
|
|
8935
8943
|
return /* @__PURE__ */ React60.createElement(
|
|
8936
8944
|
"li",
|
|
8937
8945
|
{
|
|
8938
8946
|
key: s.id,
|
|
8939
|
-
className: cx("aura-stepper__item", "is-" + state),
|
|
8947
|
+
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
8940
8948
|
"aria-current": state === "current" ? "step" : void 0
|
|
8941
8949
|
},
|
|
8942
8950
|
clickable ? /* @__PURE__ */ React60.createElement(
|
|
@@ -8944,6 +8952,8 @@ window.Aura = (() => {
|
|
|
8944
8952
|
{
|
|
8945
8953
|
type: "button",
|
|
8946
8954
|
className: "aura-stepper__step aura-focusable",
|
|
8955
|
+
"aria-label": named ? String(s.label) + (note ? ", " + note : "") : void 0,
|
|
8956
|
+
"aria-describedby": named && s.description ? descId : void 0,
|
|
8947
8957
|
onClick: function() {
|
|
8948
8958
|
props.onStepClick(s.id);
|
|
8949
8959
|
}
|
|
@@ -8953,7 +8963,7 @@ window.Aura = (() => {
|
|
|
8953
8963
|
) : /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__step" }, marker, text2)
|
|
8954
8964
|
);
|
|
8955
8965
|
})),
|
|
8956
|
-
!vertical && cur ? /* @__PURE__ */ React60.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
|
|
8966
|
+
!vertical && cur ? /* @__PURE__ */ React60.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur.status === "error" ? /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
|
|
8957
8967
|
);
|
|
8958
8968
|
});
|
|
8959
8969
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -910,6 +910,7 @@ var th = {
|
|
|
910
910
|
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
|
|
911
911
|
},
|
|
912
912
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
913
|
+
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
913
914
|
accepts: function(list, max) {
|
|
914
915
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
915
916
|
}
|
|
@@ -1040,6 +1041,7 @@ var sv = {
|
|
|
1040
1041
|
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
|
|
1041
1042
|
},
|
|
1042
1043
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
1044
|
+
stepError: "har fel",
|
|
1043
1045
|
accepts: function(list, max) {
|
|
1044
1046
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
1045
1047
|
}
|
|
@@ -1171,6 +1173,7 @@ var STRINGS = {
|
|
|
1171
1173
|
return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
|
|
1172
1174
|
},
|
|
1173
1175
|
breadcrumbMore: "Show the full path",
|
|
1176
|
+
stepError: "has errors",
|
|
1174
1177
|
accepts: function(list, max) {
|
|
1175
1178
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
1176
1179
|
}
|
|
@@ -8894,6 +8897,7 @@ var NumberField = React59.forwardRef(function NumberField2(props, ref) {
|
|
|
8894
8897
|
var React60 = __toESM(require("react"), 1);
|
|
8895
8898
|
var Stepper = React60.forwardRef(function Stepper2(props, ref) {
|
|
8896
8899
|
const t = useStrings();
|
|
8900
|
+
const idBase = uid();
|
|
8897
8901
|
const steps = props.steps || [];
|
|
8898
8902
|
let at = -1;
|
|
8899
8903
|
steps.forEach(function(s, i) {
|
|
@@ -8911,14 +8915,18 @@ var Stepper = React60.forwardRef(function Stepper2(props, ref) {
|
|
|
8911
8915
|
},
|
|
8912
8916
|
/* @__PURE__ */ React60.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
8913
8917
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
8914
|
-
const
|
|
8915
|
-
const
|
|
8918
|
+
const error = s.status === "error";
|
|
8919
|
+
const marker = /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React60.createElement(Icon, { name: /* @__PURE__ */ React60.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React60.createElement(Icon, { name: /* @__PURE__ */ React60.createElement(IconCheck, null) }) : i + 1);
|
|
8920
|
+
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
8916
8921
|
const clickable = state === "done" && !!props.onStepClick;
|
|
8922
|
+
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
8923
|
+
const descId = idBase + "-step-" + i;
|
|
8924
|
+
const text2 = /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__label" }, s.label, note ? /* @__PURE__ */ React60.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__desc", id: named ? descId : void 0 }, s.description) : null);
|
|
8917
8925
|
return /* @__PURE__ */ React60.createElement(
|
|
8918
8926
|
"li",
|
|
8919
8927
|
{
|
|
8920
8928
|
key: s.id,
|
|
8921
|
-
className: cx("aura-stepper__item", "is-" + state),
|
|
8929
|
+
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
8922
8930
|
"aria-current": state === "current" ? "step" : void 0
|
|
8923
8931
|
},
|
|
8924
8932
|
clickable ? /* @__PURE__ */ React60.createElement(
|
|
@@ -8926,6 +8934,8 @@ var Stepper = React60.forwardRef(function Stepper2(props, ref) {
|
|
|
8926
8934
|
{
|
|
8927
8935
|
type: "button",
|
|
8928
8936
|
className: "aura-stepper__step aura-focusable",
|
|
8937
|
+
"aria-label": named ? String(s.label) + (note ? ", " + note : "") : void 0,
|
|
8938
|
+
"aria-describedby": named && s.description ? descId : void 0,
|
|
8929
8939
|
onClick: function() {
|
|
8930
8940
|
props.onStepClick(s.id);
|
|
8931
8941
|
}
|
|
@@ -8935,7 +8945,7 @@ var Stepper = React60.forwardRef(function Stepper2(props, ref) {
|
|
|
8935
8945
|
) : /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__step" }, marker, text2)
|
|
8936
8946
|
);
|
|
8937
8947
|
})),
|
|
8938
|
-
!vertical && cur ? /* @__PURE__ */ React60.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
|
|
8948
|
+
!vertical && cur ? /* @__PURE__ */ React60.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur.status === "error" ? /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React60.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
|
|
8939
8949
|
);
|
|
8940
8950
|
});
|
|
8941
8951
|
|
package/dist/esm/Stepper.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
|
-
import { cx } from "./internal.js";
|
|
4
|
+
import { cx, uid } from "./internal.js";
|
|
5
5
|
import { useStrings } from "./locale.js";
|
|
6
|
-
import { IconCheck } from "./icons.js";
|
|
6
|
+
import { IconCheck, IconCircleAlert } from "./icons.js";
|
|
7
7
|
const Stepper = React.forwardRef(function Stepper2(props, ref) {
|
|
8
8
|
const t = useStrings();
|
|
9
|
+
const idBase = uid();
|
|
9
10
|
const steps = props.steps || [];
|
|
10
11
|
let at = -1;
|
|
11
12
|
steps.forEach(function(s, i) {
|
|
@@ -23,14 +24,18 @@ const Stepper = React.forwardRef(function Stepper2(props, ref) {
|
|
|
23
24
|
},
|
|
24
25
|
/* @__PURE__ */ React.createElement("ol", { className: "aura-stepper__list" }, steps.map(function(s, i) {
|
|
25
26
|
const state = i < at ? "done" : i === at ? "current" : "upcoming";
|
|
26
|
-
const
|
|
27
|
-
const
|
|
27
|
+
const error = s.status === "error";
|
|
28
|
+
const marker = /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__marker", "aria-hidden": true }, error ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCircleAlert, null) }) : state === "done" ? /* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconCheck, null) }) : i + 1);
|
|
29
|
+
const note = error ? t.stepError : state === "done" ? t.stepDone : "";
|
|
28
30
|
const clickable = state === "done" && !!props.onStepClick;
|
|
31
|
+
const named = clickable && (typeof s.label === "string" || typeof s.label === "number") && String(s.label).trim() !== "";
|
|
32
|
+
const descId = idBase + "-step-" + i;
|
|
33
|
+
const text = /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__text" }, /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__label" }, s.label, note ? /* @__PURE__ */ React.createElement("span", { className: "aura-sr-only" }, ", " + note) : null), s.description ? /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__desc", id: named ? descId : void 0 }, s.description) : null);
|
|
29
34
|
return /* @__PURE__ */ React.createElement(
|
|
30
35
|
"li",
|
|
31
36
|
{
|
|
32
37
|
key: s.id,
|
|
33
|
-
className: cx("aura-stepper__item", "is-" + state),
|
|
38
|
+
className: cx("aura-stepper__item", "is-" + state, error && "is-error"),
|
|
34
39
|
"aria-current": state === "current" ? "step" : void 0
|
|
35
40
|
},
|
|
36
41
|
clickable ? /* @__PURE__ */ React.createElement(
|
|
@@ -38,6 +43,8 @@ const Stepper = React.forwardRef(function Stepper2(props, ref) {
|
|
|
38
43
|
{
|
|
39
44
|
type: "button",
|
|
40
45
|
className: "aura-stepper__step aura-focusable",
|
|
46
|
+
"aria-label": named ? String(s.label) + (note ? ", " + note : "") : void 0,
|
|
47
|
+
"aria-describedby": named && s.description ? descId : void 0,
|
|
41
48
|
onClick: function() {
|
|
42
49
|
props.onStepClick(s.id);
|
|
43
50
|
}
|
|
@@ -47,7 +54,7 @@ const Stepper = React.forwardRef(function Stepper2(props, ref) {
|
|
|
47
54
|
) : /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__step" }, marker, text)
|
|
48
55
|
);
|
|
49
56
|
})),
|
|
50
|
-
!vertical && cur ? /* @__PURE__ */ React.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length)), /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
|
|
57
|
+
!vertical && cur ? /* @__PURE__ */ React.createElement("p", { className: "aura-stepper__compact", "aria-hidden": true }, /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__count" }, t.stepOf(at + 1, steps.length), cur.status === "error" ? /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__count-error" }, " \u2014 " + t.stepError) : null), /* @__PURE__ */ React.createElement("span", { className: "aura-stepper__compact-label" }, cur.label)) : null
|
|
51
58
|
);
|
|
52
59
|
});
|
|
53
60
|
export {
|
package/dist/esm/strings.js
CHANGED
|
@@ -126,6 +126,7 @@ const STRINGS = {
|
|
|
126
126
|
return n(v) + " of " + n(max) + " used, " + n(r) + " reserved";
|
|
127
127
|
},
|
|
128
128
|
breadcrumbMore: "Show the full path",
|
|
129
|
+
stepError: "has errors",
|
|
129
130
|
accepts: function(list, max) {
|
|
130
131
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
131
132
|
}
|
package/dist/esm/strings.sv.js
CHANGED
|
@@ -122,6 +122,7 @@ const sv = {
|
|
|
122
122
|
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
|
|
123
123
|
},
|
|
124
124
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
125
|
+
stepError: "har fel",
|
|
125
126
|
accepts: function(list, max) {
|
|
126
127
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
127
128
|
}
|
package/dist/esm/strings.th.js
CHANGED
|
@@ -122,6 +122,7 @@ const th = {
|
|
|
122
122
|
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
|
|
123
123
|
},
|
|
124
124
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
125
|
+
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
125
126
|
accepts: function(list, max) {
|
|
126
127
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
127
128
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -914,6 +914,10 @@ export interface StepItem {
|
|
|
914
914
|
label: React$1.ReactNode;
|
|
915
915
|
/** Short line under the label, e.g. what the step asks for. */
|
|
916
916
|
description?: React$1.ReactNode | undefined;
|
|
917
|
+
/** `'error'` (5.18, Chamber-OS 112): the step has a problem — say, Save found errors on it. It keeps its place in the
|
|
918
|
+
* order and whether it can be clicked, shows the danger tone with an alert icon instead of the check or number, and
|
|
919
|
+
* adds "has errors" to its accessible name (in place of "completed"). */
|
|
920
|
+
status?: "error" | undefined;
|
|
917
921
|
}
|
|
918
922
|
/** Progress through a multi-step flow (wizard, checkout, booking). */
|
|
919
923
|
export interface StepperProps {
|
|
@@ -924,7 +928,8 @@ export interface StepperProps {
|
|
|
924
928
|
label?: string | undefined;
|
|
925
929
|
/** Makes completed steps buttons that go back to them. Upcoming steps never are. */
|
|
926
930
|
onStepClick?: ((id: string) => void) | undefined;
|
|
927
|
-
/** Default `horizontal`. Below `sm` a horizontal stepper shows only the current step ("Step 2 of 4"
|
|
931
|
+
/** Default `horizontal`. Below `sm` a horizontal stepper shows only the current step ("Step 2 of 4"; "Step 2 of 4 —
|
|
932
|
+
* has errors" when that step has `status: 'error'`). */
|
|
928
933
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
929
934
|
className?: string | undefined;
|
|
930
935
|
}
|
|
@@ -1738,6 +1743,8 @@ export interface AuraStrings {
|
|
|
1738
1743
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
1739
1744
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
1740
1745
|
breadcrumbMore: string;
|
|
1746
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
1747
|
+
stepError: string;
|
|
1741
1748
|
}
|
|
1742
1749
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
1743
1750
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/index.d.ts
CHANGED
|
@@ -914,6 +914,10 @@ export interface StepItem {
|
|
|
914
914
|
label: React$1.ReactNode;
|
|
915
915
|
/** Short line under the label, e.g. what the step asks for. */
|
|
916
916
|
description?: React$1.ReactNode | undefined;
|
|
917
|
+
/** `'error'` (5.18, Chamber-OS 112): the step has a problem — say, Save found errors on it. It keeps its place in the
|
|
918
|
+
* order and whether it can be clicked, shows the danger tone with an alert icon instead of the check or number, and
|
|
919
|
+
* adds "has errors" to its accessible name (in place of "completed"). */
|
|
920
|
+
status?: "error" | undefined;
|
|
917
921
|
}
|
|
918
922
|
/** Progress through a multi-step flow (wizard, checkout, booking). */
|
|
919
923
|
export interface StepperProps {
|
|
@@ -924,7 +928,8 @@ export interface StepperProps {
|
|
|
924
928
|
label?: string | undefined;
|
|
925
929
|
/** Makes completed steps buttons that go back to them. Upcoming steps never are. */
|
|
926
930
|
onStepClick?: ((id: string) => void) | undefined;
|
|
927
|
-
/** Default `horizontal`. Below `sm` a horizontal stepper shows only the current step ("Step 2 of 4"
|
|
931
|
+
/** Default `horizontal`. Below `sm` a horizontal stepper shows only the current step ("Step 2 of 4"; "Step 2 of 4 —
|
|
932
|
+
* has errors" when that step has `status: 'error'`). */
|
|
928
933
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
929
934
|
className?: string | undefined;
|
|
930
935
|
}
|
|
@@ -1738,6 +1743,8 @@ export interface AuraStrings {
|
|
|
1738
1743
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
1739
1744
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
1740
1745
|
breadcrumbMore: string;
|
|
1746
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
1747
|
+
stepError: string;
|
|
1741
1748
|
}
|
|
1742
1749
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
1743
1750
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/sv.cjs
CHANGED
|
@@ -147,6 +147,7 @@ var sv = {
|
|
|
147
147
|
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
|
|
148
148
|
},
|
|
149
149
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
150
|
+
stepError: "har fel",
|
|
150
151
|
accepts: function(list, max) {
|
|
151
152
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
152
153
|
}
|
package/dist/locales/sv.d.cts
CHANGED
|
@@ -87,6 +87,8 @@ export interface AuraStrings {
|
|
|
87
87
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
88
88
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
89
89
|
breadcrumbMore: string;
|
|
90
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
|
+
stepError: string;
|
|
90
92
|
}
|
|
91
93
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
92
94
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/sv.d.ts
CHANGED
|
@@ -87,6 +87,8 @@ export interface AuraStrings {
|
|
|
87
87
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
88
88
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
89
89
|
breadcrumbMore: string;
|
|
90
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
|
+
stepError: string;
|
|
90
92
|
}
|
|
91
93
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
92
94
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/th.cjs
CHANGED
|
@@ -147,6 +147,7 @@ var th = {
|
|
|
147
147
|
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
|
|
148
148
|
},
|
|
149
149
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
150
|
+
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
150
151
|
accepts: function(list, max) {
|
|
151
152
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
152
153
|
}
|
package/dist/locales/th.d.cts
CHANGED
|
@@ -87,6 +87,8 @@ export interface AuraStrings {
|
|
|
87
87
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
88
88
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
89
89
|
breadcrumbMore: string;
|
|
90
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
|
+
stepError: string;
|
|
90
92
|
}
|
|
91
93
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
92
94
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/locales/th.d.ts
CHANGED
|
@@ -87,6 +87,8 @@ export interface AuraStrings {
|
|
|
87
87
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
88
88
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
89
89
|
breadcrumbMore: string;
|
|
90
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
91
|
+
stepError: string;
|
|
90
92
|
}
|
|
91
93
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
92
94
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/server/index.cjs
CHANGED
|
@@ -331,6 +331,7 @@ var th = {
|
|
|
331
331
|
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
|
|
332
332
|
},
|
|
333
333
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
334
|
+
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
334
335
|
accepts: function(list, max) {
|
|
335
336
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
336
337
|
}
|
|
@@ -461,6 +462,7 @@ var sv = {
|
|
|
461
462
|
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
|
|
462
463
|
},
|
|
463
464
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
465
|
+
stepError: "har fel",
|
|
464
466
|
accepts: function(list, max) {
|
|
465
467
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
466
468
|
}
|
|
@@ -592,6 +594,7 @@ var STRINGS = {
|
|
|
592
594
|
return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
|
|
593
595
|
},
|
|
594
596
|
breadcrumbMore: "Show the full path",
|
|
597
|
+
stepError: "has errors",
|
|
595
598
|
accepts: function(list, max) {
|
|
596
599
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
597
600
|
}
|
package/dist/server/index.d.cts
CHANGED
|
@@ -306,6 +306,8 @@ export interface AuraStrings {
|
|
|
306
306
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
307
307
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
308
308
|
breadcrumbMore: string;
|
|
309
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
310
|
+
stepError: string;
|
|
309
311
|
}
|
|
310
312
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
311
313
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/server/index.d.ts
CHANGED
|
@@ -306,6 +306,8 @@ export interface AuraStrings {
|
|
|
306
306
|
progressReserved: (value: number, reserved: number, max: number) => string;
|
|
307
307
|
/** The collapsed middle of a Breadcrumb (5.15). */
|
|
308
308
|
breadcrumbMore: string;
|
|
309
|
+
/** A Stepper step with `status: 'error'` (5.18). */
|
|
310
|
+
stepError: string;
|
|
309
311
|
}
|
|
310
312
|
/** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
|
|
311
313
|
* only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
|
package/dist/server/index.js
CHANGED
|
@@ -272,6 +272,7 @@ var th = {
|
|
|
272
272
|
return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
|
|
273
273
|
},
|
|
274
274
|
breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
|
|
275
|
+
stepError: "\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
|
|
275
276
|
accepts: function(list, max) {
|
|
276
277
|
return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
|
|
277
278
|
}
|
|
@@ -402,6 +403,7 @@ var sv = {
|
|
|
402
403
|
return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
|
|
403
404
|
},
|
|
404
405
|
breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
|
|
406
|
+
stepError: "har fel",
|
|
405
407
|
accepts: function(list, max) {
|
|
406
408
|
return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
|
|
407
409
|
}
|
|
@@ -533,6 +535,7 @@ var STRINGS = {
|
|
|
533
535
|
return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
|
|
534
536
|
},
|
|
535
537
|
breadcrumbMore: "Show the full path",
|
|
538
|
+
stepError: "has errors",
|
|
536
539
|
accepts: function(list, max) {
|
|
537
540
|
return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
|
|
538
541
|
}
|
package/dist/styles.css
CHANGED
|
@@ -1294,6 +1294,10 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1294
1294
|
.aura-stepper__compact { display: none; margin: var(--aura-space-2) 0 0; font-size: 13px; }
|
|
1295
1295
|
.aura-stepper__count { color: var(--aura-fg-secondary); margin-right: var(--aura-space-2); }
|
|
1296
1296
|
.aura-stepper__compact-label { font-weight: 600; }
|
|
1297
|
+
/* 5.18 (Chamber-OS 112): a step with errors — the danger fill and an alert icon; outlined when it is the current step. */
|
|
1298
|
+
.aura-stepper__item.is-error .aura-stepper__marker { background: var(--aura-button-danger-bg); border-color: var(--aura-button-danger-bg); color: var(--aura-button-danger-fg); }
|
|
1299
|
+
.aura-stepper__item.is-current.is-error .aura-stepper__marker { background: var(--aura-bg-surface); border: 2px solid var(--aura-fg-danger); color: var(--aura-fg-danger); }
|
|
1300
|
+
.aura-stepper__item.is-error .aura-stepper__label, .aura-stepper__count-error { color: var(--aura-fg-danger); }
|
|
1297
1301
|
|
|
1298
1302
|
/* ---------- SegmentedControl ---------- */
|
|
1299
1303
|
.aura-segmented {
|
package/dist/styles.layer.css
CHANGED
|
@@ -1296,6 +1296,10 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1296
1296
|
.aura-stepper__compact { display: none; margin: var(--aura-space-2) 0 0; font-size: 13px; }
|
|
1297
1297
|
.aura-stepper__count { color: var(--aura-fg-secondary); margin-right: var(--aura-space-2); }
|
|
1298
1298
|
.aura-stepper__compact-label { font-weight: 600; }
|
|
1299
|
+
/* 5.18 (Chamber-OS 112): a step with errors — the danger fill and an alert icon; outlined when it is the current step. */
|
|
1300
|
+
.aura-stepper__item.is-error .aura-stepper__marker { background: var(--aura-button-danger-bg); border-color: var(--aura-button-danger-bg); color: var(--aura-button-danger-fg); }
|
|
1301
|
+
.aura-stepper__item.is-current.is-error .aura-stepper__marker { background: var(--aura-bg-surface); border: 2px solid var(--aura-fg-danger); color: var(--aura-fg-danger); }
|
|
1302
|
+
.aura-stepper__item.is-error .aura-stepper__label, .aura-stepper__count-error { color: var(--aura-fg-danger); }
|
|
1299
1303
|
|
|
1300
1304
|
/* ---------- SegmentedControl ---------- */
|
|
1301
1305
|
.aura-segmented {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.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",
|