@phillips/seldon 1.213.0 → 1.214.0-beta.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 (155) hide show
  1. package/dist/_virtual/index4.js +2 -2
  2. package/dist/_virtual/index5.js +2 -2
  3. package/dist/_virtual/index6.js +2 -2
  4. package/dist/assets/formatted/index.d.ts +0 -1
  5. package/dist/assets/formatted/index.js +30 -32
  6. package/dist/components/AddToCalendar/AddToCalendar.js +24 -25
  7. package/dist/components/Article/Article.js +17 -17
  8. package/dist/components/Button/Button.d.ts +4 -0
  9. package/dist/components/Button/Button.js +71 -53
  10. package/dist/components/Button/Button.stories.d.ts +7 -1
  11. package/dist/components/ComboBox/ComboBox.js +33 -30
  12. package/dist/components/ComposedModal/ComposedModal.js +33 -33
  13. package/dist/components/ComposedModal/ComposedModal.stories.d.ts +1 -0
  14. package/dist/components/Countdown/Countdown.js +90 -51
  15. package/dist/components/Countdown/Duration.d.ts +3 -1
  16. package/dist/components/Countdown/Duration.js +17 -9
  17. package/dist/components/Countdown/types.d.ts +2 -1
  18. package/dist/components/Countdown/types.js +1 -1
  19. package/dist/components/DescriptiveRadioButton/DescriptiveRadioButton.js +21 -21
  20. package/dist/components/Detail/Detail.d.ts +2 -0
  21. package/dist/components/Detail/Detail.js +26 -15
  22. package/dist/components/Detail/Detail.stories.d.ts +9 -2
  23. package/dist/components/Drawer/DrawerHeader.js +22 -20
  24. package/dist/components/ExitGateCard/ExitGateCard.js +29 -29
  25. package/dist/components/FavoritingTileButton/FavoritingTileButton.js +30 -31
  26. package/dist/components/Filter/Filter.js +36 -34
  27. package/dist/components/Filter/FilterHeader.d.ts +4 -0
  28. package/dist/components/Filter/FilterHeader.js +30 -22
  29. package/dist/components/Input/Input.js +43 -39
  30. package/dist/components/Input/Input.stories.d.ts +16 -0
  31. package/dist/components/Link/Link.js +11 -11
  32. package/dist/components/Link/Link.stories.d.ts +17 -1
  33. package/dist/components/Link/types.d.ts +9 -4
  34. package/dist/components/Link/types.js +3 -3
  35. package/dist/components/LinkBlock/LinkBlock.js +19 -11
  36. package/dist/components/Modal/Modal.d.ts +0 -4
  37. package/dist/components/Modal/Modal.js +6 -6
  38. package/dist/components/Navigation/NavigationItem/NavigationItem.js +31 -23
  39. package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +29 -29
  40. package/dist/components/Navigation/NavigationList/NavigationList.js +5 -5
  41. package/dist/components/ProgressIndicator/ProgressIndicator.js +22 -22
  42. package/dist/components/Search/Search.js +55 -53
  43. package/dist/components/Search/SearchResults/SearchResults.js +16 -16
  44. package/dist/components/Select/Select.d.ts +4 -0
  45. package/dist/components/Select/Select.js +51 -45
  46. package/dist/components/Select/Select.stories.d.ts +1 -0
  47. package/dist/components/Tabs/TabsContainer.js +1 -1
  48. package/dist/components/Tags/Tags.js +32 -30
  49. package/dist/components/Text/Text.js +17 -9
  50. package/dist/components/Text/types.d.ts +42 -1
  51. package/dist/components/Text/types.js +3 -3
  52. package/dist/components/Text/utils.js +40 -7
  53. package/dist/components/TextArea/TextArea.js +38 -34
  54. package/dist/components/Toast/Toast.js +4 -4
  55. package/dist/node_modules/ics/dist/index.js +2 -2
  56. package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
  57. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  58. package/dist/patterns/AccountPageHeader/AccountPageHeader.js +45 -28
  59. package/dist/patterns/BidSnapshot/BidMessage.d.ts +6 -1
  60. package/dist/patterns/BidSnapshot/BidMessage.js +14 -13
  61. package/dist/patterns/BidSnapshot/BidSnapshot.d.ts +7 -1
  62. package/dist/patterns/BidSnapshot/BidSnapshot.js +84 -66
  63. package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +100 -0
  64. package/dist/patterns/CountryPicker/CountryPickerCountryList.js +5 -5
  65. package/dist/patterns/CountryPicker/CountryPickerModal.js +8 -8
  66. package/dist/patterns/CountryPicker/CountryPickerOption.js +22 -20
  67. package/dist/patterns/CountryPicker/CountryPickerTrigger.js +39 -38
  68. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +52 -52
  69. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +1 -0
  70. package/dist/patterns/FiltersInline/FilterButton.js +41 -25
  71. package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +50 -52
  72. package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +31 -31
  73. package/dist/patterns/HeroBanner/HeroBanner.js +21 -21
  74. package/dist/patterns/LanguageSelector/LanguageSelector.js +34 -34
  75. package/dist/patterns/ObjectTile/ObjectTile.js +57 -72
  76. package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +36 -0
  77. package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +7 -6
  78. package/dist/patterns/SaleCard/SaleCard.js +37 -45
  79. package/dist/patterns/SaleCard/SaleCard.stories.d.ts +1 -1
  80. package/dist/patterns/SaleCard/SaleCardActions.js +9 -8
  81. package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +49 -49
  82. package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js +19 -12
  83. package/dist/patterns/Social/Social.js +20 -20
  84. package/dist/patterns/Subscribe/Subscribe.stories.d.ts +0 -1
  85. package/dist/patterns/TextBanner/TextBanner.js +12 -12
  86. package/dist/patterns/UserManagement/UserManagement.js +13 -13
  87. package/dist/patterns/ViewingDetails/ViewingDetails.d.ts +4 -0
  88. package/dist/patterns/ViewingDetails/ViewingDetails.js +36 -34
  89. package/dist/patterns/ViewingDetails/ViewingDetails.stories.d.ts +2 -0
  90. package/dist/patterns/ViewingDetails/ViewingDetailsMock.d.ts +2 -0
  91. package/dist/scss/_reset.scss +4 -0
  92. package/dist/scss/_type.scss +172 -65
  93. package/dist/scss/_vars.scss +92 -197
  94. package/dist/scss/_vars.scss.js +94 -199
  95. package/dist/scss/componentStyles.scss +178 -0
  96. package/dist/scss/components/Accordion/_accordion.scss +6 -4
  97. package/dist/scss/components/Breadcrumb/_breadcrumb.scss +1 -1
  98. package/dist/scss/components/Button/_button.scss +33 -7
  99. package/dist/scss/components/ComboBox/_combobox.scss +7 -5
  100. package/dist/scss/components/ComposedModal/_composedModal.scss +0 -4
  101. package/dist/scss/components/Countdown/_countdown.scss +8 -9
  102. package/dist/scss/components/Countdown/_duration.scss +0 -2
  103. package/dist/scss/components/DatePicker/_datePicker.scss +11 -10
  104. package/dist/scss/components/Detail/_detail.scss +15 -6
  105. package/dist/scss/components/Divider/_divider.scss +3 -3
  106. package/dist/scss/components/Drawer/_drawerHeader.scss +0 -7
  107. package/dist/scss/components/Dropdown/_dropdown.scss +2 -2
  108. package/dist/scss/components/FavoritingTileButton/_favoritingTileButton.scss +5 -0
  109. package/dist/scss/components/Filter/_filter.scss +23 -8
  110. package/dist/scss/components/Icon/_icon.stories.scss +1 -1
  111. package/dist/scss/components/IconButton/_iconButton.scss +3 -5
  112. package/dist/scss/components/Input/_input.scss +22 -14
  113. package/dist/scss/components/Link/_link.scss +13 -8
  114. package/dist/scss/components/LinkBlock/_linkBlock.scss +5 -1
  115. package/dist/scss/components/LinkList/_linkList.scss +8 -0
  116. package/dist/scss/components/Modal/_modal.scss +2 -2
  117. package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +33 -14
  118. package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +1 -1
  119. package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +2 -2
  120. package/dist/scss/components/NotificationBanner/_notificationBanner.scss +4 -10
  121. package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +5 -0
  122. package/dist/scss/components/Search/SearchResults/_searchResults.scss +5 -0
  123. package/dist/scss/components/Search/_search.scss +9 -10
  124. package/dist/scss/components/Search/_searchButton.scss +0 -1
  125. package/dist/scss/components/Select/_select.scss +8 -3
  126. package/dist/scss/components/Tabs/_tabs.scss +4 -5
  127. package/dist/scss/components/Tags/_tags.scss +0 -2
  128. package/dist/scss/components/TextArea/_textArea.scss +2 -4
  129. package/dist/scss/components/TextSymbol/_textSymbol.scss +2 -2
  130. package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +4 -0
  131. package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +9 -10
  132. package/dist/scss/patterns/CountryPicker/_countryPickerModal.scss +4 -0
  133. package/dist/scss/patterns/CountryPicker/_countryPickerOption.scss +3 -0
  134. package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +4 -7
  135. package/dist/scss/patterns/DetailList/_detailList.scss +4 -0
  136. package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +6 -8
  137. package/dist/scss/patterns/FilterMenu/_filterMenu.scss +2 -1
  138. package/dist/scss/patterns/FiltersInline/_filterButton.scss +11 -2
  139. package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +1 -9
  140. package/dist/scss/patterns/FiltersInline/_filtersInline.scss +5 -0
  141. package/dist/scss/patterns/HeroBanner/_heroBanner.scss +13 -6
  142. package/dist/scss/patterns/ObjectTile/_objectTile.scss +13 -12
  143. package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +9 -2
  144. package/dist/scss/patterns/SaleCard/_saleCard.scss +13 -22
  145. package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +16 -3
  146. package/dist/scss/patterns/Social/_social.scss +4 -1
  147. package/dist/scss/patterns/Subscribe/_subscribe.scss +3 -3
  148. package/dist/scss/patterns/TextBanner/_textBanner.scss +9 -3
  149. package/dist/scss/patterns/ViewingDetails/_viewingDetails.scss +15 -3
  150. package/dist/scss/site-furniture/Footer/_footer.scss +8 -2
  151. package/dist/scss/site-furniture/Header/_header.scss +8 -4
  152. package/dist/site-furniture/Footer/Footer.js +4 -4
  153. package/package.json +4 -3
  154. package/dist/assets/formatted/LiveNow.d.ts +0 -9
  155. package/dist/assets/formatted/LiveNow.js +0 -63
@@ -1,34 +1,36 @@
1
- import { jsxs as i, Fragment as c, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as m } from "react";
1
+ import { jsxs as s, Fragment as n, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
3
  import { Close as d } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
4
4
  import f from "../IconButton/IconButton.js";
5
5
  import { ButtonVariants as h } from "../Button/types.js";
6
6
  import b from "../Icon/Icon.js";
7
- const n = ({ baseClassName: a, drawerOpenSide: t, onClose: l, bookendSide: e, ...s }) => {
8
- const r = t === "bottom" && e === "left" || t !== "bottom" && e === "right";
9
- return /* @__PURE__ */ o("div", { className: `${a}__bookend ${a}__bookend-${e}`, ...s, children: r && /* @__PURE__ */ o(d, { asChild: !0, children: /* @__PURE__ */ o(f, { onClick: l, "aria-label": "Close", "data-testid": "drawer-close", variant: h.tertiary, children: /* @__PURE__ */ o(b, { icon: "CloseX", color: "currentColor" }) }) }) });
10
- }, _ = m(
11
- ({ baseClassName: a, headerText: t, drawerOpenSide: l, onClose: e }, s) => {
12
- const r = `${a}-header`;
13
- return /* @__PURE__ */ i(c, { children: [
14
- /* @__PURE__ */ i("div", { className: r, children: [
15
- /* @__PURE__ */ o(n, { baseClassName: r, onClose: e, drawerOpenSide: l, bookendSide: "left" }),
16
- /* @__PURE__ */ o("h3", { className: `${r}__title`, children: t }),
17
- /* @__PURE__ */ o(
18
- n,
7
+ import { TextVariants as _ } from "../Text/types.js";
8
+ import p from "../Text/Text.js";
9
+ const m = ({ baseClassName: a, drawerOpenSide: e, onClose: i, bookendSide: t, ...l }) => {
10
+ const o = e === "bottom" && t === "left" || e !== "bottom" && t === "right";
11
+ return /* @__PURE__ */ r("div", { className: `${a}__bookend ${a}__bookend-${t}`, ...l, children: o && /* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ r(f, { onClick: i, "aria-label": "Close", "data-testid": "drawer-close", variant: h.tertiary, children: /* @__PURE__ */ r(b, { icon: "CloseX", color: "currentColor" }) }) }) });
12
+ }, u = c(
13
+ ({ baseClassName: a, headerText: e, drawerOpenSide: i, onClose: t }, l) => {
14
+ const o = `${a}-header`;
15
+ return /* @__PURE__ */ s(n, { children: [
16
+ /* @__PURE__ */ s("div", { className: o, children: [
17
+ /* @__PURE__ */ r(m, { baseClassName: o, onClose: t, drawerOpenSide: i, bookendSide: "left" }),
18
+ /* @__PURE__ */ r(p, { variant: _.headingSmall, className: `${o}__title`, children: e }),
19
+ /* @__PURE__ */ r(
20
+ m,
19
21
  {
20
- baseClassName: r,
21
- onClose: e,
22
- drawerOpenSide: l,
22
+ baseClassName: o,
23
+ onClose: t,
24
+ drawerOpenSide: i,
23
25
  bookendSide: "right"
24
26
  }
25
27
  )
26
28
  ] }),
27
- t && /* @__PURE__ */ o("div", { className: `${r}__hr` })
29
+ e && /* @__PURE__ */ r("div", { className: `${o}__hr` })
28
30
  ] });
29
31
  }
30
32
  );
31
- _.displayName = "DrawerHeader";
33
+ u.displayName = "DrawerHeader";
32
34
  export {
33
- _ as default
35
+ u as default
34
36
  };
@@ -1,50 +1,50 @@
1
- import { jsxs as p, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import h from "../../node_modules/classnames/index.js";
3
3
  import { forwardRef as $ } from "react";
4
- import { getCommonProps as v } from "../../utils/index.js";
4
+ import { getCommonProps as g } from "../../utils/index.js";
5
5
  import C from "../Button/Button.js";
6
6
  import { ButtonVariants as E } from "../Button/types.js";
7
7
  import "../Link/types.js";
8
- import g from "../Link/Link.js";
9
- import y from "../SeldonImage/SeldonImage.js";
10
- import { TextVariants as e } from "../Text/types.js";
11
- import r from "../Text/Text.js";
12
- const G = $(
8
+ import v from "../Link/Link.js";
9
+ import G from "../SeldonImage/SeldonImage.js";
10
+ import { TextVariants as p } from "../Text/types.js";
11
+ import a from "../Text/Text.js";
12
+ const j = $(
13
13
  ({
14
14
  className: f,
15
- imageSrc: n,
16
- label: o,
15
+ imageSrc: r,
16
+ label: n,
17
17
  header: m,
18
- description: s,
19
- linkLabel: l,
20
- linkHref: i,
21
- linkElement: c = g,
18
+ description: o,
19
+ linkLabel: s,
20
+ linkHref: l,
21
+ linkElement: i = v,
22
22
  variant: _ = E.secondary,
23
- altText: N = "Exit Gate Card Image",
24
- ...d
25
- }, u) => {
26
- const { className: t, ...x } = v(d, "ExitGateCard");
27
- return /* @__PURE__ */ p("article", { ...x, className: h(t, f), ...d, ref: u, children: [
28
- n ? /* @__PURE__ */ a(
29
- y,
23
+ altText: u = "Exit Gate Card Image",
24
+ ...c
25
+ }, N) => {
26
+ const { className: t, ...x } = g(c, "ExitGateCard");
27
+ return /* @__PURE__ */ d("article", { ...x, className: h(t, f), ...c, ref: N, children: [
28
+ r ? /* @__PURE__ */ e(
29
+ G,
30
30
  {
31
31
  objectFit: "cover",
32
32
  aspectRatio: "16/9",
33
- src: n,
34
- alt: N,
33
+ src: r,
34
+ alt: u,
35
35
  className: `${t}__desktop_image`
36
36
  }
37
37
  ) : null,
38
- /* @__PURE__ */ p("div", { className: `${t}__content`, children: [
39
- o ? /* @__PURE__ */ a(r, { variant: e.body2, element: "span", className: `${t}__content-label`, children: o }) : null,
40
- m ? /* @__PURE__ */ a(r, { variant: e.heading1, element: "span", className: `${t}__content-title`, children: m }) : null,
41
- s ? /* @__PURE__ */ a(r, { variant: e.body2, element: "span", className: `${t}__content-description`, children: s }) : null,
42
- (l || c) && i ? /* @__PURE__ */ a(c, { href: i, children: /* @__PURE__ */ a(C, { variant: _, className: `${t}__content-link`, children: l }) }) : null
38
+ /* @__PURE__ */ d("div", { className: `${t}__content`, children: [
39
+ n ? /* @__PURE__ */ e(a, { variant: p.labelMedium, element: "span", className: `${t}__content-label`, children: n }) : null,
40
+ m ? /* @__PURE__ */ e(a, { variant: p.headingLarge, element: "span", className: `${t}__content-title`, children: m }) : null,
41
+ o ? /* @__PURE__ */ e(a, { element: "span", className: `${t}__content-description`, children: o }) : null,
42
+ (s || i) && l ? /* @__PURE__ */ e(i, { href: l, children: /* @__PURE__ */ e(C, { variant: _, className: `${t}__content-link`, children: s }) }) : null
43
43
  ] })
44
44
  ] });
45
45
  }
46
46
  );
47
- G.displayName = "ExitGateCard";
47
+ j.displayName = "ExitGateCard";
48
48
  export {
49
- G as default
49
+ j as default
50
50
  };
@@ -1,46 +1,45 @@
1
- import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as v } from "react";
3
- import { getCommonProps as h } from "../../utils/index.js";
4
- import b from "../../node_modules/classnames/index.js";
5
- import { TextVariants as t } from "../Text/types.js";
6
- import e from "../Text/Text.js";
7
- const g = v(
1
+ import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as u } from "react";
3
+ import { getCommonProps as N } from "../../utils/index.js";
4
+ import h from "../../node_modules/classnames/index.js";
5
+ import o from "../Text/Text.js";
6
+ const _ = u(
8
7
  ({
9
- className: d,
10
- actionAddText: i = "Add to",
11
- actionRemoveText: m = "Remove from",
12
- isLotInList: r,
13
- listTitle: n,
8
+ className: n,
9
+ actionAddText: m = "Add to",
10
+ actionRemoveText: t = "Remove from",
11
+ isLotInList: e,
12
+ listTitle: s,
14
13
  numberOfObjects: c,
15
- onClick: f,
16
- ...s
17
- }, p) => {
18
- const { className: a, ...u } = h(s, "FavoritingTileButton");
19
- return /* @__PURE__ */ l(
14
+ onClick: d,
15
+ ...l
16
+ }, f) => {
17
+ const { className: r, ...p } = N(l, "FavoritingTileButton");
18
+ return /* @__PURE__ */ i(
20
19
  "button",
21
20
  {
22
- ...u,
23
- className: b(a, d, {
24
- [`${a}--lot-in-list`]: r
21
+ ...p,
22
+ className: h(r, n, {
23
+ [`${r}--lot-in-list`]: e
25
24
  }),
26
- onClick: f,
27
- ref: p,
28
- id: s?.id,
29
- "aria-label": `${r ? m : i} ${n}`,
30
- "aria-pressed": r,
25
+ onClick: d,
26
+ ref: f,
27
+ id: l?.id,
28
+ "aria-label": `${e ? t : m} ${s}`,
29
+ "aria-pressed": e,
31
30
  role: "switch",
32
31
  children: [
33
- /* @__PURE__ */ l("div", { className: `${a}__text`, children: [
34
- /* @__PURE__ */ o(e, { variant: t.button, children: r ? m : i }),
35
- /* @__PURE__ */ o(e, { variant: t.string2, children: n })
32
+ /* @__PURE__ */ i("div", { className: `${r}__text`, children: [
33
+ /* @__PURE__ */ a(o, { className: `${r}__text--action`, children: e ? t : m }),
34
+ /* @__PURE__ */ a(o, { children: s })
36
35
  ] }),
37
- /* @__PURE__ */ o(e, { variant: t.button, children: c })
36
+ /* @__PURE__ */ a(o, { className: `${r}__text--number`, children: c })
38
37
  ]
39
38
  }
40
39
  );
41
40
  }
42
41
  );
43
- g.displayName = "FavoritingTileButton";
42
+ _.displayName = "FavoritingTileButton";
44
43
  export {
45
- g as default
44
+ _ as default
46
45
  };
@@ -1,55 +1,57 @@
1
- import { jsxs as t, jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as H, useState as P, Children as j, isValidElement as c, cloneElement as f } from "react";
3
- import { getCommonProps as B, findChildrenOfType as I, findChildrenExcludingTypes as R, px as T } from "../../utils/index.js";
4
- import b from "../../node_modules/classnames/index.js";
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as b, useState as E, Children as H, isValidElement as c, cloneElement as f } from "react";
3
+ import { getCommonProps as P, findChildrenOfType as j, findChildrenExcludingTypes as B, px as I } from "../../utils/index.js";
4
+ import R from "../../node_modules/classnames/index.js";
5
5
  import p from "./FilterHeader.js";
6
6
  import k from "../Button/Button.js";
7
- import { ButtonVariants as O } from "../Button/types.js";
8
- import S from "../Icon/Icon.js";
9
- const q = H(
7
+ import { ButtonVariants as M } from "../Button/types.js";
8
+ import O from "../Icon/Icon.js";
9
+ import { TextVariants as S } from "../Text/types.js";
10
+ import V from "../Text/Text.js";
11
+ const q = b(
10
12
  ({
11
13
  className: h,
12
- children: C,
13
- name: a,
14
- viewAllLimit: n = 10,
15
- isViewingAll: r = !1,
14
+ children: _,
15
+ name: i,
16
+ viewAllLimit: l = 10,
17
+ isViewingAll: s = !1,
16
18
  isHidden: u = !1,
17
- setViewAllFilter: l,
18
- viewAllLabel: N = "View All",
19
- ...i
20
- }, _) => {
21
- const [y, g] = P(!1), { className: e, ...v } = B(i, "Filter"), s = j.toArray(C), x = { isViewingAll: r, setViewAllFilter: l, setIsClosing: g }, m = I(s, p)?.[0], F = c(m) ? f(m, x) : null, $ = R(s, [p])?.map(
22
- (o, E) => c(o) ? f(o, { hidden: !r && E + 1 > n }) : o
19
+ setViewAllFilter: n,
20
+ viewAllLabel: C = "View All",
21
+ ...m
22
+ }, N) => {
23
+ const [v, x] = E(!1), { className: e, ...y } = P(m, "Filter"), t = H.toArray(_), $ = { isViewingAll: s, setViewAllFilter: n, setIsClosing: x }, d = j(t, p)?.[0], g = c(d) ? f(d, $) : null, F = B(t, [p])?.map(
24
+ (a, T) => c(a) ? f(a, { hidden: !s && T + 1 > l }) : a
23
25
  );
24
- return /* @__PURE__ */ t(
26
+ return /* @__PURE__ */ o(
25
27
  "div",
26
28
  {
27
- ...v,
28
- className: b(e, h, {
29
- [`${T}-filter--hidden`]: u,
30
- "is-closing": y
29
+ ...y,
30
+ className: R(e, h, {
31
+ [`${I}-filter--hidden`]: u,
32
+ "is-closing": v
31
33
  }),
32
- ...i,
33
- ref: _,
34
+ ...m,
35
+ ref: N,
34
36
  children: [
35
- /* @__PURE__ */ t("fieldset", { name: a, className: `${e}__fieldset`, children: [
36
- F,
37
- /* @__PURE__ */ d("div", { className: `${e}__filters`, children: $ })
37
+ /* @__PURE__ */ o("fieldset", { name: i, className: `${e}__fieldset`, children: [
38
+ g,
39
+ /* @__PURE__ */ r("div", { className: `${e}__filters`, children: F })
38
40
  ] }),
39
- s.length > n && !r ? /* @__PURE__ */ t(
41
+ t.length > l && !s ? /* @__PURE__ */ r("div", { className: `${e}__view-all`, children: /* @__PURE__ */ o(
40
42
  k,
41
43
  {
42
- className: `${e}__view-all`,
43
- variant: O.tertiary,
44
+ className: `${e}__view-all__button`,
45
+ variant: M.tertiary,
44
46
  onClick: () => {
45
- l?.(a);
47
+ n?.(i);
46
48
  },
47
49
  children: [
48
- N,
49
- /* @__PURE__ */ d(S, { icon: "ChevronRight", className: `${e}__chevron` })
50
+ /* @__PURE__ */ r(V, { variant: S.labelMedium, children: C }),
51
+ /* @__PURE__ */ r(O, { icon: "ChevronRight", className: `${e}__chevron` })
50
52
  ]
51
53
  }
52
- ) : null
54
+ ) }) : null
53
55
  ]
54
56
  }
55
57
  );
@@ -4,6 +4,10 @@ export interface FilterHeaderProps extends ComponentProps<'div'> {
4
4
  isViewingAll?: boolean;
5
5
  setViewAllFilter?: Dispatch<SetStateAction<null>>;
6
6
  setIsClosing?: Dispatch<SetStateAction<boolean>>;
7
+ /**
8
+ * translatable string for back to all button
9
+ */
10
+ backToAllLabel?: string;
7
11
  }
8
12
  /**
9
13
  * ## Overview
@@ -1,31 +1,39 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import { getCommonProps as u } from "../../utils/index.js";
4
- import h from "../../node_modules/classnames/index.js";
5
- import { TextVariants as N } from "../Text/types.js";
6
- import x from "../Text/Text.js";
7
- import v from "../Button/Button.js";
8
- import { ButtonVariants as C } from "../Button/types.js";
9
- import _ from "../Icon/Icon.js";
10
- const g = p(
11
- ({ className: m, heading: i, isViewingAll: l = !1, setViewAllFilter: n, setIsClosing: a, ...o }, s) => {
12
- const { className: e, ...c } = u(o, "FilterHeader"), f = () => {
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as N } from "react";
3
+ import { getCommonProps as v } from "../../utils/index.js";
4
+ import x from "../../node_modules/classnames/index.js";
5
+ import { TextVariants as m } from "../Text/types.js";
6
+ import l from "../Text/Text.js";
7
+ import C from "../Button/Button.js";
8
+ import { ButtonVariants as _ } from "../Button/types.js";
9
+ import b from "../Icon/Icon.js";
10
+ const g = N(
11
+ ({
12
+ className: i,
13
+ heading: n,
14
+ isViewingAll: s = !1,
15
+ setViewAllFilter: c,
16
+ setIsClosing: a,
17
+ backToAllLabel: d = "Back to all",
18
+ ...t
19
+ }, f) => {
20
+ const { className: r, ...p } = v(t, "FilterHeader"), u = () => {
13
21
  a?.(!0), setTimeout(() => {
14
- n?.(null), a?.(!1);
22
+ c?.(null), a?.(!1);
15
23
  }, 300);
16
24
  };
17
- return /* @__PURE__ */ t("div", { ...c, className: h(e, m), ...o, ref: s, children: [
18
- /* @__PURE__ */ r(
19
- x,
25
+ return /* @__PURE__ */ o("div", { ...p, className: x(r, i), ...t, ref: f, children: [
26
+ /* @__PURE__ */ e(
27
+ l,
20
28
  {
21
- variant: N.heading4,
22
- className: `${e}__heading`,
23
- element: (d) => /* @__PURE__ */ r("legend", { ...d, children: i })
29
+ variant: m.headingSmall,
30
+ className: `${r}__heading`,
31
+ element: (h) => /* @__PURE__ */ e("legend", { ...h, children: n })
24
32
  }
25
33
  ),
26
- l ? /* @__PURE__ */ t(v, { variant: C.tertiary, onClick: f, className: `${e}__back`, children: [
27
- /* @__PURE__ */ r(_, { icon: "ChevronLeft" }),
28
- "Back to all"
34
+ s ? /* @__PURE__ */ o(C, { variant: _.tertiary, onClick: u, className: `${r}__back`, children: [
35
+ /* @__PURE__ */ e(b, { icon: "ChevronLeft" }),
36
+ /* @__PURE__ */ e(l, { variant: m.labelMedium, children: d })
29
37
  ] }) : null
30
38
  ] });
31
39
  }
@@ -1,50 +1,52 @@
1
1
  import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import * as z from "react";
3
- import p from "../../node_modules/classnames/index.js";
3
+ import r from "../../node_modules/classnames/index.js";
4
4
  import { px as t, useNormalizedInputProps as F } from "../../utils/index.js";
5
+ import { TextVariants as M } from "../Text/types.js";
6
+ import V from "../Text/Text.js";
5
7
  const q = z.forwardRef(
6
8
  ({
7
- className: s,
9
+ className: p,
8
10
  inputAdornment: i,
9
11
  adornmentPosition: l = "start",
10
12
  defaultValue: _,
11
13
  disabled: h,
12
14
  hideLabel: w,
13
- id: e,
15
+ id: a,
14
16
  inline: b,
15
- invalid: N,
16
- invalidText: f,
17
+ invalid: f,
18
+ invalidText: x,
17
19
  labelText: v,
18
- onChange: x,
19
- onClick: y,
20
+ onChange: y,
21
+ onClick: N,
20
22
  placeholder: I,
21
23
  readOnly: d,
22
24
  size: T = "md",
23
- type: u = "text",
25
+ type: m = "text",
24
26
  value: C,
25
27
  warn: P,
26
28
  warnText: j,
27
- isSkeletonLoading: r,
29
+ isSkeletonLoading: s,
28
30
  ...o
29
31
  }, k) => {
30
- const a = F({
32
+ const e = F({
31
33
  disabled: h,
32
- id: e,
33
- invalid: N,
34
- invalidText: f,
34
+ id: a,
35
+ invalid: f,
36
+ invalidText: x,
35
37
  readOnly: d,
36
- type: u,
38
+ type: m,
37
39
  warn: P,
38
40
  warnText: j
39
- }), R = p(`${t}-${u}-input`, `${t}-input`, `${t}-input--${T}`, {
41
+ }), R = r(`${t}-${m}-input`, `${t}-input`, `${t}-input--${T}`, {
40
42
  [`${t}-input--inline`]: b,
41
43
  [`${t}-input--readonly`]: d,
42
- [`${t}-input--disabled`]: a.disabled,
43
- [`${t}-input--invalid`]: a.invalid,
44
- [`${t}-input--warn`]: a.warn,
45
- [`${s}__wrapper`]: s,
44
+ [`${t}-input--disabled`]: e.disabled,
45
+ [`${t}-input--invalid`]: e.invalid,
46
+ [`${t}-input--warn`]: e.warn,
47
+ [`${p}__wrapper`]: p,
46
48
  [`${t}-input--hidden`]: o.hidden
47
- }), m = [
49
+ }), u = [
48
50
  "text",
49
51
  "number",
50
52
  "password",
@@ -57,39 +59,41 @@ const q = z.forwardRef(
57
59
  "month",
58
60
  "time",
59
61
  "week"
60
- ].includes(a.type ?? ""), $ = {
61
- className: i && m ? p(`${t}-input__wrapper__input`, s, { [`${t}-skeleton`]: r }) : p(`${t}-input__input`, s, { [`${t}-skeleton`]: r }),
62
- "data-testid": e,
63
- disabled: a.disabled,
64
- id: e,
65
- onChange: x,
66
- onClick: y,
67
- placeholder: r ? "" : I,
62
+ ].includes(e.type ?? ""), $ = {
63
+ className: i && u ? r(`${t}-input__wrapper__input`, p, { [`${t}-skeleton`]: s }) : r(`${t}-input__input`, p, { [`${t}-skeleton`]: s }),
64
+ "data-testid": a,
65
+ disabled: e.disabled,
66
+ id: a,
67
+ onChange: y,
68
+ onClick: N,
69
+ placeholder: s ? "" : I,
68
70
  readOnly: d,
69
71
  ref: k,
70
- type: a.type,
71
- ...a.type !== "checkbox" && a.type !== "radio" ? { value: C, defaultValue: _ } : {},
72
+ type: e.type,
73
+ ...e.type !== "checkbox" && e.type !== "radio" ? { value: C, defaultValue: _ } : {},
72
74
  ...o
73
75
  };
74
76
  return /* @__PURE__ */ c("div", { className: R, children: [
75
77
  /* @__PURE__ */ n(
76
- "label",
78
+ V,
77
79
  {
78
- "data-testid": `label-${e}`,
79
- htmlFor: e,
80
- className: p(`${t}-input__label`, {
80
+ element: "label",
81
+ variant: M.labelMedium,
82
+ className: r(`${t}-input__label`, {
81
83
  [`${t}-input__label--hidden`]: w,
82
- [`${t}-skeleton`]: r
84
+ [`${t}-skeleton`]: s
83
85
  }),
86
+ "data-testid": `label-${a}`,
87
+ htmlFor: a,
84
88
  children: v
85
89
  }
86
90
  ),
87
- i && m ? /* @__PURE__ */ c("div", { className: `${t}-input__wrapper`, "data-testid": `wrapper-${e}`, children: [
88
- l === "start" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${e}`, children: i }),
91
+ i && u ? /* @__PURE__ */ c("div", { className: `${t}-input__wrapper`, "data-testid": `wrapper-${a}`, children: [
92
+ l === "start" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${a}`, children: i }),
89
93
  /* @__PURE__ */ n("input", { ...$ }),
90
- l === "end" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${e}`, children: i })
94
+ l === "end" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${a}`, children: i })
91
95
  ] }) : /* @__PURE__ */ n("input", { ...$ }),
92
- a.validation ? a.validation : /* @__PURE__ */ n("p", { className: p(`${t}-input__validation`), children: " " })
96
+ e.validation ? e.validation : /* @__PURE__ */ n("p", { className: `${t}-input__empty-validation`, children: " " })
93
97
  ] });
94
98
  }
95
99
  );
@@ -7,6 +7,22 @@ export default meta;
7
7
  interface StoryProps extends InputProps {
8
8
  playgroundWidth: string;
9
9
  }
10
+ export declare const TextInput: {
11
+ ({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
12
+ args: {
13
+ playgroundWidth: number;
14
+ className: string;
15
+ defaultValue: string;
16
+ disabled: boolean;
17
+ invalid: boolean;
18
+ invalidText: string;
19
+ labelText: string;
20
+ warn: boolean;
21
+ warnText: string;
22
+ size: string;
23
+ type: string;
24
+ };
25
+ };
10
26
  export declare const DateTimeInput: {
11
27
  ({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
12
28
  args: {
@@ -1,14 +1,14 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as m } from "react/jsx-runtime";
2
2
  import p from "../../node_modules/classnames/index.js";
3
3
  import { getCommonProps as k } from "../../utils/index.js";
4
4
  import { forwardRef as L } from "react";
5
- import { getLinkVariantClassName as N, isLinkExternal as x } from "./utils.js";
6
- import { LinkVariants as d } from "./types.js";
5
+ import { getLinkVariantClassName as N, isLinkExternal as d } from "./utils.js";
6
+ import { LinkVariants as x } from "./types.js";
7
7
  import g from "../Text/Text.js";
8
- const C = L(
9
- ({ children: m, className: n, element: r = "a", variant: o = d.link, href: a, ...s }, t) => {
10
- const { className: i, ...l } = k(s, "Link"), c = p(i, N(o), n), f = x(a);
11
- return /* @__PURE__ */ e(
8
+ const u = L(
9
+ ({ children: s, className: n, element: r = "a", variant: o = x.linkMedium, href: a, ...e }, t) => {
10
+ const { className: i, ...l } = k(e, "Link"), c = p(i, N(o), n), f = d(a);
11
+ return /* @__PURE__ */ m(
12
12
  r,
13
13
  {
14
14
  ref: t,
@@ -16,13 +16,13 @@ const C = L(
16
16
  href: a,
17
17
  className: c,
18
18
  ...f && r === "a" ? { rel: "noopener noreferrer", target: "_blank" } : {},
19
- ...s,
20
- children: /* @__PURE__ */ e(g, { variant: o, children: m })
19
+ ...e,
20
+ children: /* @__PURE__ */ m(g, { variant: o, children: s })
21
21
  }
22
22
  );
23
23
  }
24
24
  );
25
- C.displayName = "Link";
25
+ u.displayName = "Link";
26
26
  export {
27
- C as default
27
+ u as default
28
28
  };
@@ -17,7 +17,7 @@ export declare const Playground: {
17
17
  };
18
18
  argTypes: {
19
19
  variant: {
20
- options: typeof LinkVariants;
20
+ options: (LinkVariants.linkSmall | LinkVariants.linkMedium | LinkVariants.linkLarge | LinkVariants.linkStylised)[];
21
21
  control: {
22
22
  type: string;
23
23
  };
@@ -38,3 +38,19 @@ export declare const ExternalLink: {
38
38
  href: string;
39
39
  };
40
40
  };
41
+ export declare const LegacyVariants: {
42
+ ({ playgroundWidth, children, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
43
+ args: {
44
+ children: string;
45
+ href: string;
46
+ variant: LinkVariants;
47
+ };
48
+ argTypes: {
49
+ variant: {
50
+ options: (LinkVariants.email | LinkVariants.snwHeaderLink | LinkVariants.snwFlyoutLink | LinkVariants.link)[];
51
+ control: {
52
+ type: string;
53
+ };
54
+ };
55
+ };
56
+ };
@@ -1,9 +1,14 @@
1
1
  export declare enum LinkVariants {
2
- /** link rendering emailto: */
2
+ /** @deprecated Use the corresponding link size variant, linkSmall, linkMedium, or linkLarge instead */
3
3
  email = "email",
4
+ /** @deprecated Use linkStylised instead */
4
5
  snwHeaderLink = "snwHeaderLink",
5
- /** link is being rendered in a footer|header */
6
+ /** @deprecated Use linkLarge instead */
6
7
  snwFlyoutLink = "snwFlyoutLink",
7
- /** standard link */
8
- link = "link"
8
+ /** @deprecated Use linkSmall instead */
9
+ link = "link",
10
+ linkSmall = "linkSmall",
11
+ linkMedium = "linkMedium",
12
+ linkLarge = "linkLarge",
13
+ linkStylised = "linkStylised"
9
14
  }