@phillips/seldon 1.132.0 → 1.132.1

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,7 +21,9 @@ export declare const CarouselWithDots: {
21
21
  (props: CarouselProps & CarouselDotsProps): import("react/jsx-runtime").JSX.Element;
22
22
  args: {
23
23
  maxDots: number;
24
+ id: string;
24
25
  } | {
26
+ id: string;
25
27
  maxDots?: undefined;
26
28
  };
27
29
  argTypes: {};
@@ -30,6 +32,7 @@ export declare const CarouselWithDotsAndArrows: {
30
32
  (props: CarouselProps & CarouselDotsProps): import("react/jsx-runtime").JSX.Element;
31
33
  args: {
32
34
  maxDots: number;
35
+ id: string;
33
36
  };
34
37
  argTypes: {};
35
38
  };
@@ -37,6 +40,7 @@ export declare const CarouselWithDotsOverflow: {
37
40
  (props: CarouselProps & CarouselDotsProps): import("react/jsx-runtime").JSX.Element;
38
41
  args: {
39
42
  maxDots: number;
43
+ id: string;
40
44
  };
41
45
  argTypes: {};
42
46
  };
@@ -1,5 +1,9 @@
1
1
  import { ComponentProps } from 'react';
2
2
  export interface CarouselDotsProps extends ComponentProps<'div'> {
3
+ /**
4
+ * A unique `id` for the `<CarouselDots>`
5
+ */
6
+ id: string;
3
7
  /**
4
8
  * The maximum number of dots to display.
5
9
  */
@@ -1,16 +1,16 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import E from "../../node_modules/classnames/index.js";
3
- import { forwardRef as G, useId as L, useState as S, useRef as M, useCallback as l, useEffect as q, useMemo as z } from "react";
4
- import { useCarousel as A } from "./utils.js";
5
- import { getCommonProps as F } from "../../utils/index.js";
6
- import { CarouselDot as H } from "./CarouselDot.js";
7
- const h = 10, C = 12, J = (h + C) / 2, K = G(
8
- ({ className: N, maxDots: I = 9, position: v = "inline", numberOfSlides: V = 0, ...g }, b) => {
9
- const { className: c, ...k } = F(g, "CarouselDots"), y = L(), { api: t, onSlideChange: a } = A(), [R, T] = S(0), [i, O] = S(
10
- Array.from({ length: V }, (e, o) => o)
11
- ), r = M(null), [D, $] = S([]), w = l((e) => {
3
+ import { forwardRef as G, useState as S, useRef as L, useCallback as l, useEffect as M, useMemo as q } from "react";
4
+ import { useCarousel as z } from "./utils.js";
5
+ import { getCommonProps as A } from "../../utils/index.js";
6
+ import { CarouselDot as F } from "./CarouselDot.js";
7
+ const h = 10, C = 12, H = (h + C) / 2, J = G(
8
+ ({ className: v, maxDots: g = 9, position: V = "inline", numberOfSlides: b = 0, id: I, ...D }, k) => {
9
+ const { className: c, ...y } = A({ id: I, ...D }, "CarouselDots"), { api: t, onSlideChange: a } = z(), [R, T] = S(0), [i, O] = S(
10
+ Array.from({ length: b }, (e, o) => o)
11
+ ), r = L(null), [$, w] = S([]), N = l((e) => {
12
12
  r.current && r.current.scrollTo?.({
13
- left: e * (h + C) - r.current.offsetWidth / 2 + J,
13
+ left: e * (h + C) - r.current.offsetWidth / 2 + H,
14
14
  // Center dot in container
15
15
  behavior: "smooth"
16
16
  });
@@ -23,36 +23,36 @@ const h = 10, C = 12, J = (h + C) / 2, K = G(
23
23
  O(e.scrollSnapList());
24
24
  }, []), n = l(
25
25
  (e) => {
26
- T(e.selectedScrollSnap()), w(e.selectedScrollSnap());
26
+ T(e.selectedScrollSnap()), N(e.selectedScrollSnap());
27
27
  },
28
- [w]
28
+ [N]
29
29
  ), u = l(
30
30
  (e) => {
31
31
  a?.(e.selectedScrollSnap());
32
32
  },
33
33
  [a]
34
34
  );
35
- q(() => {
35
+ M(() => {
36
36
  if (t)
37
37
  return f(t), n(t), t.on("reInit", f).on("reInit", n).on("select", n).on("settle", u), () => {
38
38
  t.off("reInit", f).off("reInit", n).off("select", n).off("settle", u);
39
39
  };
40
40
  }, [t, f, n, u]);
41
- const s = z(() => D.sort((e, o) => e - o), [D]);
41
+ const s = q(() => $.sort((e, o) => e - o), [$]);
42
42
  return /* @__PURE__ */ m(
43
43
  "div",
44
44
  {
45
- ref: b,
45
+ ref: k,
46
46
  role: "group",
47
47
  "aria-roledescription": "pagination",
48
48
  "aria-label": "pagination",
49
- className: E(`${c}`, N, `${c}-${v}`),
50
- ...g,
51
- ...k,
49
+ className: E(`${c}`, v, `${c}-${V}`),
50
+ ...D,
51
+ ...y,
52
52
  children: /* @__PURE__ */ m("div", { className: `${c}-container`, children: /* @__PURE__ */ m(
53
53
  "div",
54
54
  {
55
- style: { "--max-width": `${I * h + (I - 1) * C + 2}px` },
55
+ style: { "--max-width": `${g * h + (g - 1) * C + 2}px` },
56
56
  className: `${c}-container-inner`,
57
57
  ref: r,
58
58
  children: i.map((e, o) => {
@@ -64,17 +64,17 @@ const h = 10, C = 12, J = (h + C) / 2, K = G(
64
64
  !(o >= i.length - 2 && s.includes(i.length - 1) && s.includes(i.length - 2))
65
65
  );
66
66
  return /* @__PURE__ */ m(
67
- H,
67
+ F,
68
68
  {
69
69
  onClick: () => P(o),
70
70
  isSelected: W,
71
71
  scrollableContainerRef: r,
72
72
  onInViewChange: (j) => {
73
- $(j ? (p) => [...p, o] : (p) => p.filter((B) => B !== o));
73
+ w(j ? (p) => [...p, o] : (p) => p.filter((B) => B !== o));
74
74
  },
75
75
  variant: _ ? "sm" : "md"
76
76
  },
77
- `${y}-dot-${o}`
77
+ `${I}-dot-${o}`
78
78
  );
79
79
  })
80
80
  }
@@ -83,7 +83,7 @@ const h = 10, C = 12, J = (h + C) / 2, K = G(
83
83
  );
84
84
  }
85
85
  );
86
- K.displayName = "CarouselDots";
86
+ J.displayName = "CarouselDots";
87
87
  export {
88
- K as default
88
+ J as default
89
89
  };
@@ -23,7 +23,7 @@ export interface DatePickerProps extends Omit<InputProps, 'defaultValue' | 'onCh
23
23
  */
24
24
  hideLabel?: boolean;
25
25
  /**
26
- * A custom `id` for the `<input>`
26
+ * A unique `id` for the `<input>`
27
27
  */
28
28
  id: string;
29
29
  /**
@@ -19,9 +19,9 @@ export interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'>
19
19
  */
20
20
  hideLabel?: boolean;
21
21
  /**
22
- * A custom `id` for the `<input>`
22
+ * A unique `id` for the `<input>`
23
23
  */
24
- id?: string;
24
+ id: string;
25
25
  /**
26
26
  * Boolean to dictate whether input is inline with the label or not. `true` to use the inline version.
27
27
  */
@@ -1,62 +1,62 @@
1
- import { jsxs as k, jsx as s } from "react/jsx-runtime";
2
- import * as u from "react";
1
+ import { jsxs as P, jsx as d } from "react/jsx-runtime";
2
+ import * as R from "react";
3
3
  import n from "../../node_modules/classnames/index.js";
4
- import { px as t, useNormalizedInputProps as z } from "../../utils/index.js";
5
- const C = u.forwardRef(
4
+ import { px as t, useNormalizedInputProps as k } from "../../utils/index.js";
5
+ const z = R.forwardRef(
6
6
  ({
7
7
  className: p,
8
- defaultValue: $,
9
- disabled: m,
10
- hideLabel: c,
8
+ defaultValue: o,
9
+ disabled: u,
10
+ hideLabel: $,
11
11
  id: a,
12
- inline: _,
13
- invalid: b,
14
- invalidText: h,
15
- labelText: f,
16
- onChange: v,
17
- onClick: x,
18
- placeholder: w,
19
- readOnly: d,
20
- size: I = "md",
21
- type: r = "text",
22
- value: N,
23
- warn: y,
24
- warnText: j,
12
+ inline: m,
13
+ invalid: c,
14
+ invalidText: _,
15
+ labelText: b,
16
+ onChange: h,
17
+ onClick: f,
18
+ placeholder: v,
19
+ readOnly: e,
20
+ size: x = "md",
21
+ type: s = "text",
22
+ value: w,
23
+ warn: N,
24
+ warnText: y,
25
25
  isSkeletonLoading: l,
26
- ...o
27
- }, P) => {
28
- const e = u.useId(), i = z({
29
- disabled: m,
30
- id: a || e,
31
- invalid: b,
32
- invalidText: h,
33
- readOnly: d,
34
- type: r,
35
- warn: y,
36
- warnText: j
37
- }), R = n(`${t}-${r}-input`, `${t}-input`, `${t}-input--${I}`, {
38
- [`${t}-input--inline`]: _,
39
- [`${t}-input--readonly`]: d,
26
+ ...r
27
+ }, I) => {
28
+ const i = k({
29
+ disabled: u,
30
+ id: a,
31
+ invalid: c,
32
+ invalidText: _,
33
+ readOnly: e,
34
+ type: s,
35
+ warn: N,
36
+ warnText: y
37
+ }), j = n(`${t}-${s}-input`, `${t}-input`, `${t}-input--${x}`, {
38
+ [`${t}-input--inline`]: m,
39
+ [`${t}-input--readonly`]: e,
40
40
  [`${t}-input--disabled`]: i.disabled,
41
41
  [`${t}-input--invalid`]: i.invalid,
42
42
  [`${t}-input--warn`]: i.warn,
43
43
  [`${p}__wrapper`]: p,
44
- [`${t}-input--hidden`]: o.hidden
44
+ [`${t}-input--hidden`]: r.hidden
45
45
  });
46
- return /* @__PURE__ */ k("div", { className: R, children: [
47
- /* @__PURE__ */ s(
46
+ return /* @__PURE__ */ P("div", { className: j, children: [
47
+ /* @__PURE__ */ d(
48
48
  "label",
49
49
  {
50
- "data-testid": `label-${a || e}`,
51
- htmlFor: a || e,
50
+ "data-testid": `label-${a}`,
51
+ htmlFor: a,
52
52
  className: n(`${t}-input__label`, {
53
- [`${t}-input__label--hidden`]: c,
53
+ [`${t}-input__label--hidden`]: $,
54
54
  [`${t}-skeleton`]: l
55
55
  }),
56
- children: f
56
+ children: b
57
57
  }
58
58
  ),
59
- /* @__PURE__ */ s(
59
+ /* @__PURE__ */ d(
60
60
  "input",
61
61
  {
62
62
  className: n(`${t}-input__input`, p, {
@@ -64,22 +64,22 @@ const C = u.forwardRef(
64
64
  }),
65
65
  "data-testid": a,
66
66
  disabled: i.disabled,
67
- id: a || e,
68
- onChange: v,
69
- onClick: x,
70
- placeholder: l ? "" : w,
71
- readOnly: d,
72
- ref: P,
67
+ id: a,
68
+ onChange: h,
69
+ onClick: f,
70
+ placeholder: l ? "" : v,
71
+ readOnly: e,
72
+ ref: I,
73
73
  type: i.type,
74
- ...i.type !== "checkbox" && i.type !== "radio" ? { value: N, defaultValue: $ } : {},
75
- ...o
74
+ ...i.type !== "checkbox" && i.type !== "radio" ? { value: w, defaultValue: o } : {},
75
+ ...r
76
76
  }
77
77
  ),
78
- i.validation ? i.validation : /* @__PURE__ */ s("p", { className: n(`${t}-input__validation`), children: " " })
78
+ i.validation ? i.validation : /* @__PURE__ */ d("p", { className: n(`${t}-input__validation`), children: " " })
79
79
  ] });
80
80
  }
81
81
  );
82
- C.displayName = "Input";
82
+ z.displayName = "Input";
83
83
  export {
84
- C as default
84
+ z as default
85
85
  };
@@ -18,21 +18,21 @@ const Q = ({
18
18
  previousLabel: j = "Previous",
19
19
  nextLabel: C = "Next",
20
20
  selectLabel: v = "Select",
21
- ...s
21
+ ...d
22
22
  }) => {
23
- const N = "pagination", { className: a, ...O } = T(s, "Pagination"), { id: p } = s, { pendingState: I, setPendingState: w } = R(f(g)), l = I || g, d = (e, r) => {
23
+ const N = "pagination", { className: a, ...O } = T(d, "Pagination"), { id: l } = d, { pendingState: I, setPendingState: w } = R(f(g)), s = I || g, p = (e, r) => {
24
24
  const m = f(e);
25
25
  w(m), _(m, r);
26
26
  }, [t, n] = B(() => {
27
- const e = o.findIndex((h) => f(h) === l) - 1, r = o.at(e) || "", m = (o.findIndex((h) => f(h) === l) + 1) % o.length, V = o[m];
27
+ const e = o.findIndex((h) => f(h) === s) - 1, r = o.at(e) || "", m = (o.findIndex((h) => f(h) === s) + 1) % o.length, V = o[m];
28
28
  return [r, V];
29
- }, [o, l]);
29
+ }, [o, s]);
30
30
  return /* @__PURE__ */ k(
31
31
  "div",
32
32
  {
33
33
  className: u(`${b}-${N}`, { [`${a}__wrapper`]: a }, P),
34
34
  ...O,
35
- ...s,
35
+ ...d,
36
36
  children: [
37
37
  /* @__PURE__ */ i(
38
38
  $,
@@ -41,9 +41,9 @@ const Q = ({
41
41
  [`${a}__button--is-disabled`]: c
42
42
  }),
43
43
  onClick: (e) => {
44
- typeof t == "object" && t.href && e.preventDefault(), d(t);
44
+ typeof t == "object" && t.href && e.preventDefault(), p(t);
45
45
  },
46
- "data-testid": `${p}-previous-button`,
46
+ "data-testid": `${l}-previous-button`,
47
47
  isDisabled: c,
48
48
  "aria-label": j,
49
49
  variant: y.primary,
@@ -57,16 +57,17 @@ const Q = ({
57
57
  {
58
58
  className: S === "inline" ? `${b}--inline-pagination` : void 0,
59
59
  "aria-label": v,
60
- value: l,
60
+ value: s,
61
61
  onChange: (e) => {
62
62
  const r = M(o, e?.currentTarget.value);
63
- r && d(r, e);
63
+ r && p(r, e);
64
64
  },
65
- "data-testid": `${p}-select-button`,
65
+ "data-testid": `${l}-select-button`,
66
66
  hideLabel: !0,
67
67
  labelText: v,
68
68
  disabled: c,
69
69
  showIcon: !1,
70
+ id: `${l}-select-button`,
70
71
  children: o.map((e) => {
71
72
  const r = f(e);
72
73
  return /* @__PURE__ */ i("option", { value: r, children: typeof e == "string" || typeof e == "number" ? e : e.label }, r);
@@ -80,9 +81,9 @@ const Q = ({
80
81
  [`${a}__button--is-disabled`]: c
81
82
  }),
82
83
  onClick: (e) => {
83
- typeof n == "object" && n.href && e.preventDefault(), d(n);
84
+ typeof n == "object" && n.href && e.preventDefault(), p(n);
84
85
  },
85
- "data-testid": `${p}-next-button`,
86
+ "data-testid": `${l}-next-button`,
86
87
  isDisabled: c,
87
88
  "aria-label": C,
88
89
  variant: y.primary,
@@ -7,6 +7,10 @@ export interface SelectProps extends Merge<InputProps, React.ComponentProps<'sel
7
7
  * Option elements that are selectable
8
8
  */
9
9
  children: React.ReactNode;
10
+ /**
11
+ * A unique `id` for the `<Select>`
12
+ */
13
+ id: string;
10
14
  /**
11
15
  * Determines if you want to show the icon
12
16
  */
@@ -1,51 +1,51 @@
1
1
  import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import a from "../../node_modules/classnames/index.js";
2
+ import * as k from "react";
3
+ import n from "../../node_modules/classnames/index.js";
4
4
  import { px as e, useNormalizedInputProps as z } from "../../utils/index.js";
5
5
  import { SelectVariants as c } from "./types.js";
6
6
  import D from "../../assets/chevronDown.svg.js";
7
- const F = d.forwardRef(
7
+ const F = k.forwardRef(
8
8
  ({
9
- children: m,
9
+ children: d,
10
10
  className: i,
11
- defaultValue: u,
12
- disabled: $,
13
- hideLabel: _,
11
+ defaultValue: m,
12
+ disabled: u,
13
+ hideLabel: $,
14
14
  id: t,
15
15
  showIcon: l = !0,
16
- variant: f = c.default,
17
- inline: b,
18
- invalid: v,
19
- invalidText: h,
20
- labelText: w,
21
- onChange: C,
16
+ variant: _ = c.default,
17
+ inline: f,
18
+ invalid: b,
19
+ invalidText: v,
20
+ labelText: h,
21
+ onChange: w,
22
22
  onClick: V,
23
23
  readOnly: r,
24
- size: x = "md",
25
- value: y,
26
- warn: N,
27
- warnText: S,
28
- ...g
24
+ size: C = "md",
25
+ value: x,
26
+ warn: y,
27
+ warnText: N,
28
+ ...S
29
29
  }, j) => {
30
- const o = "select", I = d.useId(), n = z({
31
- disabled: $,
32
- id: t ?? I,
33
- invalid: v,
34
- invalidText: h,
30
+ const o = "select", a = z({
31
+ disabled: u,
32
+ id: t,
33
+ invalid: b,
34
+ invalidText: v,
35
35
  readOnly: r,
36
36
  type: o,
37
- warn: N,
38
- warnText: S
39
- }), P = a(`${e}-${o}-input`, `${e}-input`, `${e}-input--${x}`, {
40
- [`${e}-input--inline`]: b,
37
+ warn: y,
38
+ warnText: N
39
+ }), P = n(`${e}-${o}-input`, `${e}-input`, `${e}-input--${C}`, {
40
+ [`${e}-input--inline`]: f,
41
41
  [`${e}-input--readonly`]: r,
42
- [`${e}-input--disabled`]: n.disabled,
43
- [`${e}-input--invalid`]: n.invalid,
44
- [`${e}-input--warn`]: n.warn,
42
+ [`${e}-input--disabled`]: a.disabled,
43
+ [`${e}-input--invalid`]: a.invalid,
44
+ [`${e}-input--warn`]: a.warn,
45
45
  [`${i}__wrapper`]: i
46
- }), R = a(i, `${e}-input__input`, {
47
- [`${e}-input__select--tertiary`]: f === c.tertiary
48
- }), k = a(`${e}-select-container`, {
46
+ }), R = n(i, `${e}-input__input`, {
47
+ [`${e}-input__select--tertiary`]: _ === c.tertiary
48
+ }), g = n(`${e}-select-container`, {
49
49
  [`${e}-select-container--show__icon`]: l
50
50
  });
51
51
  return /* @__PURE__ */ p("div", { className: P, children: [
@@ -54,29 +54,29 @@ const F = d.forwardRef(
54
54
  {
55
55
  "data-testid": `${t}-label`,
56
56
  htmlFor: t,
57
- className: a(`${e}-input__label`, { [`${e}-input__label--hidden`]: _ }),
58
- children: w
57
+ className: n(`${e}-input__label`, { [`${e}-input__label--hidden`]: $ }),
58
+ children: h
59
59
  }
60
60
  ),
61
- /* @__PURE__ */ p("div", { className: k, children: [
61
+ /* @__PURE__ */ p("div", { className: g, children: [
62
62
  /* @__PURE__ */ s(
63
63
  "select",
64
64
  {
65
65
  className: R,
66
66
  "data-testid": t,
67
- defaultValue: u,
68
- disabled: n.disabled,
67
+ defaultValue: m,
68
+ disabled: a.disabled,
69
69
  id: t,
70
- onChange: C,
70
+ onChange: w,
71
71
  ref: j,
72
- value: y,
73
- ...g,
74
- children: m
72
+ value: x,
73
+ ...S,
74
+ children: d
75
75
  }
76
76
  ),
77
77
  l ? /* @__PURE__ */ s(D, {}) : null
78
78
  ] }),
79
- n.validation
79
+ a.validation
80
80
  ] });
81
81
  }
82
82
  );
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index6.js";
1
+ import { __module as t } from "../../_virtual/index5.js";
2
2
  /*!
3
3
  Copyright (c) 2015 Jed Watson.
4
4
  Based on code that is Copyright 2013-2015, Facebook, Inc.
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../../_virtual/index5.js";
1
+ import { __module as e } from "../../../../_virtual/index6.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.js";
3
3
  import { __require as t } from "./cjs/react-is.development.js";
4
4
  var r;
@@ -17,6 +17,10 @@ export interface SubscribeProps extends React.HTMLAttributes<HTMLFormElement> {
17
17
  * Optional element to render in place of a form e.g. Remix Form, etc
18
18
  */
19
19
  element?: React.ElementType<SubscribeProps>;
20
+ /**
21
+ * A unique `id` for the `<Subscribe>`
22
+ */
23
+ id: string;
20
24
  /**
21
25
  * Subscribe input label
22
26
  */
@@ -63,5 +67,5 @@ export interface SubscribeProps extends React.HTMLAttributes<HTMLFormElement> {
63
67
  *
64
68
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-subscribe--overview)
65
69
  */
66
- declare const Subscribe: ({ autoFocus, blurb, buttonText, buttonProps, className, element: Element, inputLabelText, inputPlaceholder, title, loadingText, invalidText, errorText, successText, privacyText, subscriptionState, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
70
+ declare const Subscribe: ({ autoFocus, blurb, buttonText, buttonProps, className, element: Element, inputLabelText, inputPlaceholder, title, loadingText, invalidText, errorText, successText, privacyText, subscriptionState, id, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
67
71
  export default Subscribe;
@@ -1,66 +1,68 @@
1
- import { jsxs as C, jsx as n } from "react/jsx-runtime";
2
- import I from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as L } from "../../utils/index.js";
4
- import S from "../../components/Input/Input.js";
5
- import T from "../../components/Button/Button.js";
1
+ import { jsxs as I, jsx as n } from "react/jsx-runtime";
2
+ import L from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as S } from "../../utils/index.js";
4
+ import T from "../../components/Input/Input.js";
5
+ import j from "../../components/Button/Button.js";
6
6
  import { SubscriptionState as o } from "./types.js";
7
- import { ButtonVariants as j } from "../../components/Button/types.js";
8
- const k = ({
9
- autoFocus: m = !0,
10
- blurb: a,
11
- buttonText: c = "Sign Up",
7
+ import { ButtonVariants as w } from "../../components/Button/types.js";
8
+ const z = ({
9
+ autoFocus: c = !0,
10
+ blurb: s,
11
+ buttonText: u = "Sign Up",
12
12
  buttonProps: d,
13
- className: s,
14
- element: u = "form",
15
- inputLabelText: p = "Enter Your Email Address To Sign Up*",
16
- inputPlaceholder: f = "example@email.com",
17
- title: g = "Never Miss A Moment",
18
- loadingText: _ = "Loading...",
19
- invalidText: h = "",
20
- errorText: v = "An error occurred. Please try again.",
21
- successText: x,
22
- privacyText: i = "By signing up, you agree to receive email communications from Phillips.",
13
+ className: i,
14
+ element: p = "form",
15
+ inputLabelText: f = "Enter Your Email Address To Sign Up*",
16
+ inputPlaceholder: g = "example@email.com",
17
+ title: _ = "Never Miss A Moment",
18
+ loadingText: h = "Loading...",
19
+ invalidText: v = "",
20
+ errorText: x = "An error occurred. Please try again.",
21
+ successText: N,
22
+ privacyText: t = "By signing up, you agree to receive email communications from Phillips.",
23
23
  subscriptionState: e = o.Default,
24
- ...t
24
+ id: a,
25
+ ...l
25
26
  }) => {
26
- const { className: r, ...N } = L(t, "Subscribe"), y = e === o.Invalid, $ = e === o.Loading, b = e === o.Success, E = e === o.Error, P = {
27
- invalid: h,
28
- success: x,
29
- loading: _,
30
- error: v
31
- }, l = e !== o.Default ? P[e] : "", A = b || $, B = y || E;
32
- return /* @__PURE__ */ C(u, { ...N, className: I(r, s), noValidate: !0, ...t, children: [
33
- /* @__PURE__ */ n("h3", { className: `${r}__title`, children: g }),
34
- a ? /* @__PURE__ */ n("p", { className: `${r}__blurb`, children: a }) : null,
27
+ const { className: r, ...$ } = S({ id: a, ...l }, "Subscribe"), y = e === o.Invalid, b = e === o.Loading, E = e === o.Success, P = e === o.Error, A = {
28
+ invalid: v,
29
+ success: N,
30
+ loading: h,
31
+ error: x
32
+ }, m = e !== o.Default ? A[e] : "", B = E || b, C = y || P;
33
+ return /* @__PURE__ */ I(p, { id: a, ...$, className: L(r, i), noValidate: !0, ...l, children: [
34
+ /* @__PURE__ */ n("h3", { className: `${r}__title`, children: _ }),
35
+ s ? /* @__PURE__ */ n("p", { className: `${r}__blurb`, children: s }) : null,
35
36
  /* @__PURE__ */ n(
36
- S,
37
+ T,
37
38
  {
38
- autoFocus: m,
39
+ autoFocus: c,
39
40
  className: `${r}__input`,
40
41
  type: "email",
41
42
  name: "email",
42
- placeholder: f,
43
- labelText: p,
44
- invalid: B,
45
- invalidText: l,
46
- warn: A,
47
- warnText: l,
48
- required: !0
43
+ placeholder: g,
44
+ labelText: f,
45
+ invalid: C,
46
+ invalidText: m,
47
+ warn: B,
48
+ warnText: m,
49
+ required: !0,
50
+ id: `${a}-input`
49
51
  }
50
52
  ),
51
53
  /* @__PURE__ */ n(
52
- T,
54
+ j,
53
55
  {
54
- className: `${r}__button ${s}`,
55
- variant: j.secondary,
56
+ className: `${r}__button ${i}`,
57
+ variant: w.secondary,
56
58
  type: "submit",
57
59
  ...d,
58
- children: c
60
+ children: u
59
61
  }
60
62
  ),
61
- i ? /* @__PURE__ */ n("p", { className: `${r}__privacy`, children: i }) : null
63
+ t ? /* @__PURE__ */ n("p", { className: `${r}__privacy`, children: t }) : null
62
64
  ] });
63
65
  };
64
66
  export {
65
- k as default
67
+ z as default
66
68
  };
@@ -2,7 +2,7 @@ import { SubscribeProps } from './Subscribe';
2
2
  import { SubscriptionState } from './types';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ autoFocus, blurb, buttonText, buttonProps, className, element: Element, inputLabelText, inputPlaceholder, title, loadingText, invalidText, errorText, successText, privacyText, subscriptionState, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ autoFocus, blurb, buttonText, buttonProps, className, element: Element, inputLabelText, inputPlaceholder, title, loadingText, invalidText, errorText, successText, privacyText, subscriptionState, id, ...props }: SubscribeProps) => import("react/jsx-runtime").JSX.Element;
6
6
  };
7
7
  export default meta;
8
8
  export declare const Playground: {
@@ -103,10 +103,9 @@ $snwHeaderLink: 'snwHeaderLink';
103
103
  $snwFlyoutLink: 'snwFlyoutLink';
104
104
  $snwHeadingHero1: 'snwHeadingHero1';
105
105
  $snwHeadingHero2: 'snwHeadingHero2';
106
- $text-tokens:
107
- $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5, $title1,
108
- $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink, $snwHeaderLink,
109
- $snwHeadingHero1, $snwHeadingHero2;
106
+ $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
107
+ $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
108
+ $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2;
110
109
 
111
110
  ////////////////////////
112
111
  /// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
@@ -40,7 +40,7 @@ export interface InputProps {
40
40
  */
41
41
  disabled?: boolean;
42
42
  /**
43
- * Specify a custom `id` for the `<input>`
43
+ * Specify a unique `id` for the `<input>`
44
44
  */
45
45
  id: string;
46
46
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.132.0",
3
+ "version": "1.132.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"