@phillips/seldon 1.207.0 → 1.209.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.
Files changed (41) hide show
  1. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  2. package/dist/components/ProgressIndicator/ProgressIndicator.js +35 -34
  3. package/dist/patterns/CountryPicker/CountryPicker.js +40 -38
  4. package/dist/patterns/CountryPicker/CountryPickerTrigger.d.ts +4 -0
  5. package/dist/patterns/CountryPicker/CountryPickerTrigger.js +34 -23
  6. package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +37 -36
  7. package/dist/patterns/ProgressWizard/ProgressWizard.d.ts +1 -1
  8. package/dist/patterns/ProgressWizard/ProgressWizard.js +35 -27
  9. package/dist/patterns/ProgressWizard/ProgressWizard.stories.d.ts +18 -443
  10. package/dist/patterns/ProgressWizard/types.d.ts +4 -4
  11. package/dist/patterns/ProgressWizard/utils.js +6 -12
  12. package/dist/scss/_sharedClasses.scss +3 -3
  13. package/dist/scss/_vars.scss +11 -0
  14. package/dist/scss/_vars.scss.js +11 -0
  15. package/dist/scss/components/AddToCalendar/_addToCalendar.scss +1 -1
  16. package/dist/scss/components/Breadcrumb/_breadcrumb.scss +1 -1
  17. package/dist/scss/components/Button/_button.scss +2 -3
  18. package/dist/scss/components/Carousel/_carousel.scss +3 -3
  19. package/dist/scss/components/ComboBox/_combobox.scss +2 -2
  20. package/dist/scss/components/ComposedModal/_composedModal.scss +1 -1
  21. package/dist/scss/components/DatePicker/_datePicker.scss +1 -1
  22. package/dist/scss/components/DescriptiveRadioButton/_descriptiveRadioButton.scss +1 -1
  23. package/dist/scss/components/Drawer/_drawer.scss +2 -2
  24. package/dist/scss/components/IconButton/_iconButton.scss +2 -2
  25. package/dist/scss/components/Input/_input.scss +2 -2
  26. package/dist/scss/components/Loader/_loader.scss +1 -1
  27. package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +1 -1
  28. package/dist/scss/components/Select/_select.scss +0 -1
  29. package/dist/scss/components/Tags/_tags.scss +2 -2
  30. package/dist/scss/components/TextArea/_textArea.scss +1 -1
  31. package/dist/scss/components/Toast/_toast.scss +1 -1
  32. package/dist/scss/components/Toggle/_toggle.scss +2 -2
  33. package/dist/scss/patterns/CountryPicker/_countryPickerOption.scss +1 -1
  34. package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +1 -1
  35. package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +2 -2
  36. package/dist/scss/patterns/FiltersInline/_filterButton.scss +2 -2
  37. package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +2 -2
  38. package/dist/scss/patterns/ProgressWizard/_progressWizard.scss +4 -0
  39. package/dist/scss/patterns/SaleCard/_saleCard.scss +1 -1
  40. package/dist/scss/patterns/Social/_social.scss +0 -1
  41. package/package.json +1 -1
@@ -14,7 +14,7 @@ export interface ProgressIndicatorProps extends Progress.ProgressProps, Componen
14
14
  * If supplied, only visible on desktop breakpoints.
15
15
  *
16
16
  */
17
- labels?: string[];
17
+ stepLabels?: string[];
18
18
  /**
19
19
  * Optional class name for additional styling.
20
20
  */
@@ -1,62 +1,63 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import { Root as v } from "../../node_modules/@radix-ui/react-progress/dist/index.js";
3
- import { forwardRef as M, Fragment as P } from "react";
4
- import { getCommonProps as $ } from "../../utils/index.js";
5
- import d from "../../node_modules/classnames/index.js";
6
- import C from "../Icon/Icon.js";
7
- import { TextVariants as h } from "../Text/types.js";
1
+ import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
+ import { Root as P } from "../../node_modules/@radix-ui/react-progress/dist/index.js";
3
+ import { forwardRef as $, Fragment as C } from "react";
4
+ import { getCommonProps as I } from "../../utils/index.js";
5
+ import h from "../../node_modules/classnames/index.js";
6
+ import S from "../Icon/Icon.js";
7
+ import { TextVariants as p } from "../Text/types.js";
8
8
  import _ from "../Text/Text.js";
9
- const I = M(
9
+ const T = $(
10
10
  ({
11
- totalSteps: c,
11
+ totalSteps: i,
12
12
  currentStep: f,
13
13
  className: u,
14
- progressIndicatorAriaLabel: p = "Progress Indicator",
15
- completedIconAriaLabel: b = "Completed Icon",
16
- ...e
17
- }, g) => {
18
- const { className: a, ...N } = $(e, "ProgressIndicator");
19
- if (c <= 0) return null;
20
- const s = Math.max(1, Math.min(10, Math.floor(c))), l = Math.max(1, Math.min(s, Math.floor(f)));
21
- return /* @__PURE__ */ r("div", { ...N, className: d(a, u), ...e, ref: g, children: /* @__PURE__ */ r(v, { value: l, max: s, "aria-label": p, children: /* @__PURE__ */ r("div", { className: `${a}__steps`, children: Array.from({ length: s }).map((T, t) => {
22
- const o = t + 1, i = l > o, n = l === o;
23
- return /* @__PURE__ */ m(P, { children: [
24
- /* @__PURE__ */ m(
14
+ stepLabels: e,
15
+ progressIndicatorAriaLabel: g = "Progress Indicator",
16
+ completedIconAriaLabel: N = "Completed Icon",
17
+ ...n
18
+ }, v) => {
19
+ const { className: a, ...M } = I(n, "ProgressIndicator");
20
+ if (i <= 0) return null;
21
+ const t = Math.max(1, Math.min(10, Math.floor(i))), c = Math.max(1, Math.min(t, Math.floor(f)));
22
+ return /* @__PURE__ */ r("div", { ...M, className: h(a, u), ...n, ref: v, children: /* @__PURE__ */ r(P, { value: c, max: t, "aria-label": g, children: /* @__PURE__ */ r("div", { className: `${a}__steps`, children: Array.from({ length: t }).map((x, o) => {
23
+ const s = o + 1, m = c > s, l = c === s;
24
+ return /* @__PURE__ */ d(C, { children: [
25
+ /* @__PURE__ */ d(
25
26
  "div",
26
27
  {
27
28
  className: `${a}__item`,
28
- "aria-current": n ? "step" : void 0,
29
- "data-testid": `progress-step-${o}`,
29
+ "aria-current": l ? "step" : void 0,
30
+ "data-testid": `progress-step-${s}`,
30
31
  children: [
31
32
  /* @__PURE__ */ r(
32
33
  "span",
33
34
  {
34
- className: d(`${a}__circle`, {
35
- [`${a}__circle--active`]: i,
36
- [`${a}__circle--current`]: n
35
+ className: h(`${a}__circle`, {
36
+ [`${a}__circle--active`]: m,
37
+ [`${a}__circle--current`]: l
37
38
  }),
38
- children: i ? /* @__PURE__ */ r(
39
- C,
39
+ children: m ? /* @__PURE__ */ r(
40
+ S,
40
41
  {
41
42
  icon: "Success",
42
- "aria-label": b,
43
+ "aria-label": N,
43
44
  color: "currentColor",
44
45
  width: 20,
45
46
  height: 20
46
47
  }
47
- ) : /* @__PURE__ */ r(_, { variant: h.badge, children: o })
48
+ ) : /* @__PURE__ */ r(_, { variant: p.badge, children: s })
48
49
  }
49
50
  ),
50
- e.labels && e.labels[t] && /* @__PURE__ */ r("span", { className: `${a}__label`, children: /* @__PURE__ */ r(_, { variant: h.string2, children: e.labels[t] }) })
51
+ e && e[o] && /* @__PURE__ */ r("span", { className: `${a}__label`, children: /* @__PURE__ */ r(_, { variant: p.string2, children: e[o] }) })
51
52
  ]
52
53
  }
53
54
  ),
54
- t < s - 1 ? /* @__PURE__ */ r("div", { className: `${a}__connector`, "aria-hidden": "true" }) : null
55
- ] }, e.labels ? e.labels[t] : t);
55
+ o < t - 1 ? /* @__PURE__ */ r("div", { className: `${a}__connector`, "aria-hidden": "true" }) : null
56
+ ] }, e?.[o] || o);
56
57
  }) }) }) });
57
58
  }
58
59
  );
59
- I.displayName = "ProgressIndicator";
60
+ T.displayName = "ProgressIndicator";
60
61
  export {
61
- I as default
62
+ T as default
62
63
  };
@@ -1,52 +1,54 @@
1
- import { jsxs as h, Fragment as v, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as N, useState as j } from "react";
3
- import M from "./CountryPickerTrigger.js";
4
- import O from "./CountryPickerModal.js";
5
- import { getCommonProps as T } from "../../utils/index.js";
6
- import { toConfig as m } from "./types.js";
7
- const w = N(
1
+ import { jsxs as v, Fragment as N, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as j, useState as M } from "react";
3
+ import O from "./CountryPickerTrigger.js";
4
+ import T from "./CountryPickerModal.js";
5
+ import { getCommonProps as w } from "../../utils/index.js";
6
+ import { toConfig as l } from "./types.js";
7
+ const E = j(
8
8
  ({
9
- triggerLabelText: l,
10
- hasTriggerError: c,
11
- triggerErrorMsg: u,
12
- triggerDisplayValue: f,
13
- modalTitle: p,
14
- searchInputLabel: d,
15
- searchInputPlaceholder: C,
16
- selectButtonLabel: y,
9
+ triggerLabelText: m,
10
+ triggerAriaLabel: c,
11
+ hasTriggerError: u,
12
+ triggerErrorMsg: f,
13
+ triggerDisplayValue: p,
14
+ modalTitle: d,
15
+ searchInputLabel: C,
16
+ searchInputPlaceholder: y,
17
+ selectButtonLabel: k,
17
18
  inputName: o,
18
- baseClassName: k = "CountryPicker",
19
+ baseClassName: P = "CountryPicker",
19
20
  value: t,
20
- onChange: s,
21
- isPhone: P,
22
- ...a
23
- }, g) => {
24
- const [x, i] = j(!1), { className: n } = T(a, k), b = {
25
- modalTitle: p,
26
- searchInputLabel: d,
27
- searchInputPlaceholder: C,
28
- selectButtonLabel: y,
21
+ onChange: a,
22
+ isPhone: g,
23
+ ...s
24
+ }, b) => {
25
+ const [x, i] = M(!1), { className: n } = w(s, P), h = {
26
+ modalTitle: d,
27
+ searchInputLabel: C,
28
+ searchInputPlaceholder: y,
29
+ selectButtonLabel: k,
29
30
  inputName: o,
30
- ...a
31
- }, r = P ? m(!0, t, s) : m(!1, t, s);
32
- return /* @__PURE__ */ h(v, { children: [
31
+ ...s
32
+ }, r = g ? l(!0, t, a) : l(!1, t, a);
33
+ return /* @__PURE__ */ v(N, { children: [
33
34
  /* @__PURE__ */ e(
34
- M,
35
+ O,
35
36
  {
36
- ref: g,
37
- labelText: l,
38
- displayValue: f,
37
+ ref: b,
38
+ labelText: m,
39
+ ariaLabel: c,
40
+ displayValue: p,
39
41
  onClick: () => i(!0),
40
- hasError: c,
41
- errorMsg: u,
42
+ hasError: u,
43
+ errorMsg: f,
42
44
  variantConfig: r,
43
45
  baseClassName: n
44
46
  }
45
47
  ),
46
48
  /* @__PURE__ */ e(
47
- O,
49
+ T,
48
50
  {
49
- ...b,
51
+ ...h,
50
52
  isOpen: x,
51
53
  onClose: () => i(!1),
52
54
  variantConfig: r,
@@ -65,7 +67,7 @@ const w = N(
65
67
  ] });
66
68
  }
67
69
  );
68
- w.displayName = "CountryPicker";
70
+ E.displayName = "CountryPicker";
69
71
  export {
70
- w as default
72
+ E as default
71
73
  };
@@ -4,6 +4,10 @@ export type CountryPickerTriggerProps = {
4
4
  * The label text displayed above the button.
5
5
  */
6
6
  labelText: string;
7
+ /**
8
+ * The aria-label attribute for the button, defaults to labelText if not provided.
9
+ */
10
+ ariaLabel?: string;
7
11
  /**
8
12
  * The value displayed inside the button (e.g., selected country name or phone code).
9
13
  */
@@ -1,24 +1,35 @@
1
1
  import { jsxs as d, jsx as i } from "react/jsx-runtime";
2
- import x from "../../components/Icon/Icon.js";
3
- import { TextVariants as y } from "../../components/Text/types.js";
4
- import k from "../../components/Text/Text.js";
2
+ import y from "../../components/Icon/Icon.js";
3
+ import { TextVariants as k } from "../../components/Text/types.js";
4
+ import P from "../../components/Text/Text.js";
5
5
  import t from "../../node_modules/classnames/index.js";
6
- import { countries as P } from "./constants.js";
7
- import { forwardRef as w } from "react";
8
- import { useNormalizedInputProps as I, px as T } from "../../utils/index.js";
9
- const b = w(
10
- ({ labelText: l, displayValue: p, onClick: m, hasError: o = !1, errorMsg: _, id: e, className: s, baseClassName: r, variantConfig: f }, u) => {
11
- const { isPhone: a, value: c } = f, n = I({
6
+ import { countries as w } from "./constants.js";
7
+ import { forwardRef as I } from "react";
8
+ import { useNormalizedInputProps as T, px as b } from "../../utils/index.js";
9
+ const j = I(
10
+ ({
11
+ labelText: l,
12
+ ariaLabel: p = l,
13
+ displayValue: m,
14
+ onClick: _,
15
+ hasError: o = !1,
16
+ errorMsg: s,
17
+ id: e,
18
+ className: f,
19
+ baseClassName: r,
20
+ variantConfig: u
21
+ }, v) => {
22
+ const { isPhone: a, value: c } = u, n = T({
12
23
  id: "country-picker-trigger-input",
13
24
  invalid: o,
14
- invalidText: _,
25
+ invalidText: s,
15
26
  type: "text"
16
- }), v = n.invalidId, g = a ? c : P.filter((h) => h.name === c)?.[0]?.code, $ = () => n.validation ? n.validation : /* @__PURE__ */ i("p", { className: `${T}-input__validation`, children: " " });
17
- return /* @__PURE__ */ d("div", { className: t(`${r}__trigger`, s), children: [
27
+ }), $ = n.invalidId, g = a ? c : w.filter((x) => x.name === c)?.[0]?.code, h = () => n.validation ? n.validation : /* @__PURE__ */ i("p", { className: `${b}-input__validation`, children: " " });
28
+ return /* @__PURE__ */ d("div", { className: t(`${r}__trigger`, f), children: [
18
29
  /* @__PURE__ */ i(
19
- k,
30
+ P,
20
31
  {
21
- variant: y.string2,
32
+ variant: k.string2,
22
33
  className: t(`${r}__trigger-label`, {
23
34
  [`${r}__trigger-label--error`]: o
24
35
  }),
@@ -29,16 +40,16 @@ const b = w(
29
40
  /* @__PURE__ */ d(
30
41
  "button",
31
42
  {
32
- ref: u,
43
+ ref: v,
33
44
  type: "button",
34
- "aria-label": l,
45
+ "aria-label": p,
35
46
  "aria-invalid": n.invalid,
36
- "aria-describedby": v,
47
+ "aria-describedby": $,
37
48
  className: t(`${r}__trigger-btn`, {
38
49
  [`${r}__trigger-btn--error`]: o,
39
50
  [`${r}__trigger-btn--is-phone`]: a
40
51
  }),
41
- onClick: m,
52
+ onClick: _,
42
53
  "data-testid": "country-picker-trigger",
43
54
  id: e,
44
55
  children: [
@@ -50,16 +61,16 @@ const b = w(
50
61
  className: `${r}__trigger-flag`
51
62
  }
52
63
  ),
53
- /* @__PURE__ */ i("span", { className: t(`${r}__trigger-text`), children: p }),
54
- /* @__PURE__ */ i("span", { className: t(`${r}__trigger-icon`), children: /* @__PURE__ */ i(x, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
64
+ /* @__PURE__ */ i("span", { className: t(`${r}__trigger-text`), children: m }),
65
+ /* @__PURE__ */ i("span", { className: t(`${r}__trigger-icon`), children: /* @__PURE__ */ i(y, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
55
66
  ]
56
67
  }
57
68
  ),
58
- !a && $()
69
+ !a && h()
59
70
  ] });
60
71
  }
61
72
  );
62
- b.displayName = "CountryPickerTrigger";
73
+ j.displayName = "CountryPickerTrigger";
63
74
  export {
64
- b as default
75
+ j as default
65
76
  };
@@ -1,79 +1,80 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import C, { forwardRef as P } from "react";
1
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
+ import b, { forwardRef as P } from "react";
3
3
  import { getCommonProps as _, px as x, useNormalizedInputProps as I } from "../../utils/index.js";
4
- import S from "../../node_modules/classnames/index.js";
5
- import T from "../CountryPicker/CountryPicker.js";
6
- import $ from "../../components/Input/Input.js";
4
+ import $ from "../../node_modules/classnames/index.js";
5
+ import S from "../CountryPicker/CountryPicker.js";
6
+ import T from "../../components/Input/Input.js";
7
7
  import { getSafeCountryCallingCode as L } from "../CountryPicker/utils.js";
8
8
  import { countries as j } from "../CountryPicker/constants.js";
9
9
  const k = P(
10
10
  ({
11
- className: s,
12
- value: l = "",
13
- countryCode: p = "",
11
+ className: l,
12
+ value: s = "",
13
+ countryCode: c = "",
14
14
  handleValueChange: u,
15
- label: c = "Phone",
15
+ label: n = "Phone",
16
16
  required: m = !1,
17
- error: n,
17
+ error: a,
18
18
  errorText: h,
19
- disabled: f = !1,
20
- ...y
21
- }, v) => {
22
- const { className: t, ...b } = _(y, "PhoneNumberInput"), [a, N] = C.useState(p || void 0), o = j.find((r) => r.code === a), g = (r) => {
23
- u?.(r.target.value, a || "");
24
- }, i = I({
19
+ disabled: y = !1,
20
+ ...f
21
+ }, g) => {
22
+ const { className: t, ...v } = _(f, "PhoneNumberInput"), [o, C] = b.useState(c || void 0), i = j.find((d) => d.code === o), N = (d) => {
23
+ u?.(d.target.value, o || "");
24
+ }, r = I({
25
25
  id: "phone-input",
26
- invalid: n,
26
+ invalid: a,
27
27
  invalidText: h,
28
28
  type: "text"
29
29
  });
30
- return /* @__PURE__ */ d("div", { ref: v, className: S(`${t}`, s), ...b, children: [
31
- /* @__PURE__ */ d("div", { className: `${t}__wrapper`, children: [
32
- /* @__PURE__ */ d("div", { className: `${t}__country-picker`, children: [
33
- /* @__PURE__ */ e("input", { type: "hidden", name: "phoneNumber", value: l, "data-testid": "phone-number-hidden-input" }),
30
+ return /* @__PURE__ */ p("div", { ref: g, className: $(`${t}`, l), ...v, children: [
31
+ /* @__PURE__ */ p("div", { className: `${t}__wrapper`, children: [
32
+ /* @__PURE__ */ p("div", { className: `${t}__country-picker`, children: [
33
+ /* @__PURE__ */ e("input", { type: "hidden", name: "phoneNumber", value: s, "data-testid": "phone-number-hidden-input" }),
34
34
  /* @__PURE__ */ e(
35
35
  "input",
36
36
  {
37
37
  type: "hidden",
38
38
  name: "phoneCountryCode",
39
- value: a || "",
39
+ value: o || "",
40
40
  "data-testid": "phone-country-code-hidden-input"
41
41
  }
42
42
  ),
43
43
  /* @__PURE__ */ e(
44
- T,
44
+ S,
45
45
  {
46
- triggerLabelText: "Phone Number",
47
- triggerDisplayValue: o ? `+${L(o.code)}` : "",
48
- hasTriggerError: !!n,
46
+ triggerLabelText: n,
47
+ triggerAriaLabel: `${n.replace("*", "")} country`,
48
+ triggerDisplayValue: i ? `+${L(i.code)}` : "",
49
+ hasTriggerError: !!a,
49
50
  modalTitle: "Country code",
50
51
  searchInputLabel: "Search country",
51
52
  searchInputPlaceholder: "Search country",
52
53
  selectButtonLabel: "Select",
53
54
  isPhone: !0,
54
- value: o?.code,
55
- onChange: N
55
+ value: i?.code,
56
+ onChange: C
56
57
  }
57
58
  )
58
59
  ] }),
59
60
  /* @__PURE__ */ e("div", { className: `${t}__input`, children: /* @__PURE__ */ e(
60
- $,
61
+ T,
61
62
  {
62
63
  id: "phone-input",
63
64
  type: "tel",
64
- labelText: c,
65
+ labelText: `${n.replace("*", "")} phone`,
65
66
  hideLabel: !0,
66
- value: l,
67
- onChange: g,
67
+ value: s,
68
+ onChange: N,
68
69
  required: m,
69
- invalid: !!n,
70
- disabled: f,
70
+ invalid: !!a,
71
+ disabled: y,
71
72
  invalidText: "",
72
- "aria-describedby": i.invalidId
73
+ "aria-describedby": r.invalidId
73
74
  }
74
75
  ) })
75
76
  ] }),
76
- i.validation ? i.validation : /* @__PURE__ */ e("p", { className: `${x}-input__validation`, children: " " })
77
+ r.validation ? r.validation : /* @__PURE__ */ e("p", { className: `${x}-input__validation`, children: " " })
77
78
  ] });
78
79
  }
79
80
  );
@@ -2,7 +2,7 @@ import { CallbackProps, ProgressWizardBaseProps } from './types';
2
2
  /**
3
3
  * Props for the main ProgressWizard component.
4
4
  *
5
- * @property customHeader - Optional custom header ReactNode displayed above the progress indicator. This can be used to add a logo or other branding element to the top of the wizard. If not provided, no header will be shown. For Phillips, it should probably be ` <Icon icon="PhillipsLogo" height={32} width={120} aria-label="Phillips Logo" />
5
+ * @property isFullHeight - Sets the wizard component to take up all available height of its container. Defaults true.
6
6
  * @property hideNavigation - If true, hides the default footer navigation. When hidden you must manage step index changes yourself (e.g. via currentStepIndex prop)
7
7
  * @property hideProgressIndicator - If true, hides the progress indicator bar.
8
8
  * @property isEnableHistoryManagement - If true step advances push a history state so the browser back/forward buttons navigate between steps. Default is false and if you want this behavior you should use the useHistoryManagement hook directly in your controlling component.
@@ -5,13 +5,13 @@ import { useHistoryManagement as T } from "./hooks/useHistoryManagement.js";
5
5
  import { getCommonProps as Y } from "../../utils/index.js";
6
6
  import { ProgressWizardFooter as D } from "./components/ProgressWizardFooter.js";
7
7
  import G from "../../components/ProgressIndicator/ProgressIndicator.js";
8
- import { isControlled as c, getLabelsFromChildren as J, wrapChildren as K } from "./utils.js";
8
+ import { isControlled as p, getLabelsFromChildren as J, wrapChildren as K } from "./utils.js";
9
9
  const O = B((g, f) => {
10
10
  const {
11
- customHeader: S,
11
+ isFullHeight: S = !0,
12
12
  hideNavigation: a,
13
13
  hideProgressIndicator: h,
14
- isEnableHistoryManagement: p = !1,
14
+ isEnableHistoryManagement: c = !1,
15
15
  currentStepIndex: r,
16
16
  defaultStepIndex: I,
17
17
  shouldAllowContinue: x = !0,
@@ -23,40 +23,40 @@ const O = B((g, f) => {
23
23
  onFormSubmit: y,
24
24
  children: z,
25
25
  ...W
26
- } = g, { className: o, ...N } = Y(W, "ProgressWizard");
26
+ } = g, { className: t, ...N } = Y(W, "ProgressWizard");
27
27
  let i = I;
28
28
  i !== void 0 && r !== void 0 && (console.warn(
29
29
  "ProgressWizard: Both defaultStepIndex and currentStepIndex props are provided. defaultStepIndex will be ignored."
30
30
  ), i = void 0);
31
- const [m, H] = q(i ?? 0), u = E(
31
+ const [u, L] = q(i ?? 0), m = E(
32
32
  (A) => {
33
- !a && !c(r) && H(A);
33
+ !a && !p(r) && L(A);
34
34
  },
35
35
  [a, r]
36
36
  ), e = d(
37
- () => r ?? m,
38
- [r, m]
37
+ () => r ?? u,
38
+ [r, u]
39
39
  );
40
- p && c(r) && console.warn(
40
+ c && p(r) && console.warn(
41
41
  "ProgressWizard: History management is disabled in controlled mode (currentStepIndex prop). To enable history management, remove the currentStepIndex prop. You may also import and use the useHistoryManagement hook directly in your controlling component."
42
42
  );
43
- const t = R.toArray(z), L = d(() => J(t), [t]), _ = d(
44
- () => K(t, e, o),
45
- [t, e, o]
46
- ), n = t.length;
47
- (!t || n === 0) && console.warn(
43
+ const o = R.toArray(z), $ = d(() => J(o), [o]), H = d(
44
+ () => K(o, e, t),
45
+ [o, e, t]
46
+ ), n = o.length;
47
+ (!o || n === 0) && console.warn(
48
48
  "ProgressWizard: No children provided. At least one child is required to render steps, two for normal behavior."
49
- ), t[e] || console.warn(`ProgressWizard: currentStepIndex ${e} is out of bounds (0 to ${n - 1})`), T({
50
- enabled: !c(r) && p,
49
+ ), o[e] || console.warn(`ProgressWizard: currentStepIndex ${e} is out of bounds (0 to ${n - 1})`), T({
50
+ enabled: !p(r) && c,
51
51
  currentStepIndex: e,
52
52
  stepCount: n,
53
- setCurrentStepIndex: u
53
+ setCurrentStepIndex: m
54
54
  });
55
- const F = e === 0, M = e === n - 1, $ = _, k = {
56
- setCurrentStepIndex: u,
55
+ const F = e === 0, _ = e === n - 1, M = H, k = {
56
+ setCurrentStepIndex: m,
57
57
  isFirstStep: F,
58
- isLastStep: M,
59
- baseClassName: o,
58
+ isLastStep: _,
59
+ baseClassName: t,
60
60
  shouldAllowContinue: x,
61
61
  isLoading: [l.Loading, l.Submitting].includes(C),
62
62
  labels: b,
@@ -65,12 +65,20 @@ const O = B((g, f) => {
65
65
  onCancel: w,
66
66
  onFormSubmit: y
67
67
  };
68
- return /* @__PURE__ */ j("section", { ...N, className: o, ref: f, "aria-label": "Progress Wizard", children: [
69
- S,
70
- h ? null : /* @__PURE__ */ s(G, { totalSteps: n, currentStep: e + 1, labels: L }),
71
- /* @__PURE__ */ s("div", { className: `${o}__content`, children: $ }),
72
- a ? null : /* @__PURE__ */ s("div", { className: `${o}__footer`, children: /* @__PURE__ */ s(D, { ...k }) })
73
- ] });
68
+ return /* @__PURE__ */ j(
69
+ "section",
70
+ {
71
+ ...N,
72
+ className: `${t}${S ? ` ${t}--full-height` : ""}`,
73
+ ref: f,
74
+ "aria-label": "Progress Wizard",
75
+ children: [
76
+ h ? null : /* @__PURE__ */ s(G, { totalSteps: n, currentStep: e + 1, stepLabels: $ }),
77
+ /* @__PURE__ */ s("div", { className: `${t}__content`, children: M }),
78
+ a ? null : /* @__PURE__ */ s("div", { className: `${t}__footer`, children: /* @__PURE__ */ s(D, { ...k }) })
79
+ ]
80
+ }
81
+ );
74
82
  });
75
83
  O.displayName = "ProgressWizard";
76
84
  export {