@webority/ui-react 0.27.2 → 0.28.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.
@@ -21,10 +21,12 @@ import "@webority/ui-elements";
21
21
  * @param {(index: number) => void} [props.onInvalid] Fired when advancing is blocked by beforeNext (the step is marked invalid).
22
22
  * @param {'steps'|'journey'|'icons'} [props.variant='steps'] Stepper header style — compact circles, the wide journey bar, or large connected icon badges with a "STEP n" eyebrow.
23
23
  * @param {'primary'|'success'|'warning'|'danger'|'info'} [props.tone] Recolour the whole stepper accent (active fill, done rail, ring, done tint) to a semantic ramp. Unset keeps the variant's default (primary for steps/journey, success/green for icons). For any other colour, override the `--wui-step-accent` / `--wui-step-soft` CSS variables via `style` or a `className` instead.
24
+ * @param {'primary'|'success'|'warning'|'danger'|'info'} [props.doneTone] Recolour completed steps only (their badge, "STEP n" eyebrow and the filled line after them) to a semantic ramp; the current step keeps the `tone` accent. Unset, completed steps follow `tone`. For any other colour, override the `--wui-step-done-accent` / `--wui-step-done-soft` CSS variables via `style` or a `className` instead.
24
25
  * @param {'horizontal'|'vertical'} [props.orientation='horizontal']
25
26
  * @param {boolean} [props.skippable=false] Show a Skip button on every step (bar the last), without needing per-step `optional`. A per-step `optional` still works on its own.
26
27
  * @param {boolean} [props.nonLinear=false] Allow jumping to any step, not only completed ones.
27
28
  * @param {boolean} [props.hideStepper=false] Hide the progress header.
29
+ * @param {boolean} [props.hideConnectors=false] Drop the line joining the steps, on every variant and orientation. Lines show by default.
28
30
  * @param {boolean} [props.disabled=false] Disable all navigation.
29
31
  * @param {string} [props.label='Progress'] Accessible name for the stepper.
30
32
  * @param {string} [props.backLabel='Back']
package/dist/ui-react.js CHANGED
@@ -9094,25 +9094,29 @@ var Hc = [
9094
9094
  "active",
9095
9095
  "pending",
9096
9096
  "error"
9097
- ], Jc = I(function({ steps: e = [], children: t, active: n, defaultActive: r = 0, onStepChange: i, onFinish: a, onSkip: o, beforeNext: s, onInvalid: c, variant: l = "steps", tone: u, orientation: d = "horizontal", skippable: f = !1, nonLinear: p = !1, hideStepper: m = !1, disabled: h = !1, label: g = "Progress", backLabel: _ = "Back", nextLabel: v = "Next", skipLabel: y = "Skip", finishLabel: b = "Finish", className: x = "", ...S }, C) {
9098
- Y("AppWizard", S), J("AppWizard", "variant", l, Wc), J("AppWizard", "tone", u, Gc), J("AppWizard", "orientation", d, Kc);
9097
+ ], Jc = I(function({ steps: e = [], children: t, active: n, defaultActive: r = 0, onStepChange: i, onFinish: a, onSkip: o, beforeNext: s, onInvalid: c, variant: l = "steps", tone: u, doneTone: d, orientation: f = "horizontal", skippable: p = !1, nonLinear: m = !1, hideStepper: h = !1, hideConnectors: g = !1, disabled: _ = !1, label: v = "Progress", backLabel: y = "Back", nextLabel: b = "Next", skipLabel: x = "Skip", finishLabel: S = "Finish", className: C = "", ...w }, T) {
9098
+ Y("AppWizard", w), J("AppWizard", "variant", l, Wc), J("AppWizard", "tone", u, Gc), J("AppWizard", "doneTone", d, Gc), J("AppWizard", "orientation", f, Kc);
9099
9099
  for (let t of e) J("AppWizard", "steps[].status", t.status, qc);
9100
- let w = V(null), T = (e) => {
9101
- w.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
9102
- }, E = P.toArray(t), D = [u && `wui-step-tone-${u}`, x].filter(Boolean).join(" ");
9100
+ let E = V(null), D = (e) => {
9101
+ E.current = e, typeof T == "function" ? T(e) : T && (T.current = e);
9102
+ }, O = P.toArray(t), k = [
9103
+ u && `wui-step-tone-${u}`,
9104
+ d && `wui-step-done-tone-${d}`,
9105
+ C
9106
+ ].filter(Boolean).join(" ");
9103
9107
  return R(() => {
9104
- let e = w.current;
9108
+ let e = E.current;
9105
9109
  if (!e) return;
9106
9110
  let t = n === void 0 ? r : n;
9107
9111
  t && (e.active = t);
9108
9112
  }, []), R(() => {
9109
- let e = w.current;
9113
+ let e = E.current;
9110
9114
  e && n !== void 0 && Number(e.active) !== n && (e.active = n);
9111
9115
  }, [n]), R(() => {
9112
- let e = w.current;
9116
+ let e = E.current;
9113
9117
  e && (e.beforeNext = s ?? null);
9114
9118
  }, [s]), R(() => {
9115
- let e = w.current;
9119
+ let e = E.current;
9116
9120
  if (!e) return;
9117
9121
  let t = (e) => i?.(e.detail.index, e.detail), n = (e) => a?.(e.detail), r = (e) => o?.(e.detail.index), s = (e) => c?.(e.detail.index);
9118
9122
  return e.addEventListener("wui-wizard:change", t), e.addEventListener("wui-wizard:finish", n), e.addEventListener("wui-wizard:skip", r), e.addEventListener("wui-wizard:invalid", s), () => {
@@ -9124,27 +9128,28 @@ var Hc = [
9124
9128
  o,
9125
9129
  c
9126
9130
  ]), /* @__PURE__ */ K("wui-wizard", {
9127
- ref: T,
9131
+ ref: D,
9128
9132
  variant: l,
9129
- orientation: d,
9130
- skippable: f ? "" : void 0,
9131
- "non-linear": p ? "" : void 0,
9132
- "hide-stepper": m ? "" : void 0,
9133
- disabled: h ? "" : void 0,
9134
- label: g,
9135
- "back-label": _,
9136
- "next-label": v,
9137
- "skip-label": y,
9138
- "finish-label": b,
9139
- className: D || void 0,
9140
- ...S,
9133
+ orientation: f,
9134
+ skippable: p ? "" : void 0,
9135
+ "non-linear": m ? "" : void 0,
9136
+ "hide-stepper": h ? "" : void 0,
9137
+ "hide-connectors": g ? "" : void 0,
9138
+ disabled: _ ? "" : void 0,
9139
+ label: v,
9140
+ "back-label": y,
9141
+ "next-label": b,
9142
+ "skip-label": x,
9143
+ "finish-label": S,
9144
+ className: k || void 0,
9145
+ ...w,
9141
9146
  children: e.map((e, t) => /* @__PURE__ */ K("wui-wizard-step", {
9142
9147
  label: e.label,
9143
9148
  description: e.description || void 0,
9144
9149
  optional: e.optional ? "" : void 0,
9145
9150
  icon: e.icon || void 0,
9146
9151
  status: e.status || void 0,
9147
- children: E[t]
9152
+ children: O[t]
9148
9153
  }, e.key ?? `${e.label}-${t}`))
9149
9154
  });
9150
9155
  }), Yc = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.27.2",
3
+ "version": "0.28.0",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/theme": "0.27.2",
33
- "@webority/ui-elements": "0.27.2"
32
+ "@webority/theme": "0.28.0",
33
+ "@webority/ui-elements": "0.28.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@webority/analytics": "^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0",