@phillips/seldon 1.215.0 → 1.217.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 (165) hide show
  1. package/dist/components/Accordion/Accordion.stories.d.ts +1 -1
  2. package/dist/components/Accordion/AccordionItem.js +101 -105
  3. package/dist/components/Accordion/types.d.ts +9 -3
  4. package/dist/components/Accordion/types.js +1 -1
  5. package/dist/components/Accordion/utils.d.ts +3 -3
  6. package/dist/components/Accordion/utils.js +7 -7
  7. package/dist/components/AddToCalendar/AddToCalendar.js +24 -25
  8. package/dist/components/Article/Article.js +17 -17
  9. package/dist/components/Breadcrumb/BreadcrumbItem.js +13 -13
  10. package/dist/components/Button/Button.d.ts +4 -0
  11. package/dist/components/Button/Button.js +71 -53
  12. package/dist/components/Button/Button.stories.d.ts +7 -1
  13. package/dist/components/ComboBox/ComboBox.js +33 -29
  14. package/dist/components/ComposedModal/ComposedModal.js +33 -33
  15. package/dist/components/ComposedModal/ComposedModal.stories.d.ts +1 -0
  16. package/dist/components/Countdown/Countdown.js +90 -51
  17. package/dist/components/Countdown/Duration.d.ts +3 -1
  18. package/dist/components/Countdown/Duration.js +17 -9
  19. package/dist/components/Countdown/types.d.ts +2 -1
  20. package/dist/components/Countdown/types.js +1 -1
  21. package/dist/components/DescriptiveRadioButton/DescriptiveRadioButton.js +21 -21
  22. package/dist/components/Detail/Detail.d.ts +2 -0
  23. package/dist/components/Detail/Detail.js +27 -16
  24. package/dist/components/Detail/Detail.stories.d.ts +35 -2
  25. package/dist/components/Detail/index.d.ts +1 -0
  26. package/dist/components/Detail/types.d.ts +5 -0
  27. package/dist/components/Detail/types.js +4 -0
  28. package/dist/components/Drawer/DrawerHeader.js +22 -20
  29. package/dist/components/ExitGateCard/ExitGateCard.js +29 -29
  30. package/dist/components/FavoritingTileButton/FavoritingTileButton.js +30 -31
  31. package/dist/components/Filter/Filter.js +36 -34
  32. package/dist/components/Filter/FilterHeader.d.ts +4 -0
  33. package/dist/components/Filter/FilterHeader.js +30 -22
  34. package/dist/components/Input/Input.js +43 -39
  35. package/dist/components/Input/Input.stories.d.ts +16 -0
  36. package/dist/components/Link/Link.js +17 -18
  37. package/dist/components/Link/Link.stories.d.ts +17 -1
  38. package/dist/components/Link/types.d.ts +9 -4
  39. package/dist/components/Link/types.js +3 -3
  40. package/dist/components/LinkBlock/LinkBlock.js +19 -11
  41. package/dist/components/Modal/Modal.d.ts +0 -4
  42. package/dist/components/Modal/Modal.js +6 -6
  43. package/dist/components/Navigation/NavigationItem/NavigationItem.js +31 -23
  44. package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +37 -39
  45. package/dist/components/Navigation/NavigationList/NavigationList.js +5 -5
  46. package/dist/components/Pagination/Pagination.js +22 -21
  47. package/dist/components/ProgressIndicator/ProgressIndicator.js +22 -22
  48. package/dist/components/Search/Search.js +55 -53
  49. package/dist/components/Search/SearchResults/SearchResults.js +16 -16
  50. package/dist/components/Select/Select.d.ts +4 -0
  51. package/dist/components/Select/Select.js +51 -45
  52. package/dist/components/Select/Select.stories.d.ts +1 -0
  53. package/dist/components/Tabs/TabsContainer.js +1 -1
  54. package/dist/components/Tags/Tags.js +32 -30
  55. package/dist/components/Text/Text.js +17 -9
  56. package/dist/components/Text/types.d.ts +42 -1
  57. package/dist/components/Text/types.js +3 -3
  58. package/dist/components/Text/utils.js +40 -7
  59. package/dist/components/TextArea/TextArea.js +38 -34
  60. package/dist/components/Toast/Toast.js +4 -4
  61. package/dist/index.js +192 -190
  62. package/dist/patterns/AccountPageHeader/AccountPageHeader.js +45 -28
  63. package/dist/patterns/BidSnapshot/BidMessage.d.ts +6 -1
  64. package/dist/patterns/BidSnapshot/BidMessage.js +14 -13
  65. package/dist/patterns/BidSnapshot/BidSnapshot.d.ts +11 -1
  66. package/dist/patterns/BidSnapshot/BidSnapshot.js +76 -64
  67. package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +114 -0
  68. package/dist/patterns/CountryPicker/CountryPickerCountryList.js +5 -5
  69. package/dist/patterns/CountryPicker/CountryPickerModal.js +8 -8
  70. package/dist/patterns/CountryPicker/CountryPickerOption.js +22 -20
  71. package/dist/patterns/CountryPicker/CountryPickerTrigger.js +39 -38
  72. package/dist/patterns/DetailList/DetailList.d.ts +7 -2
  73. package/dist/patterns/DetailList/DetailList.js +25 -24
  74. package/dist/patterns/DetailList/DetailList.stories.d.ts +1 -0
  75. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +52 -52
  76. package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +1 -0
  77. package/dist/patterns/FiltersInline/FilterButton.js +41 -25
  78. package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +50 -52
  79. package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +31 -31
  80. package/dist/patterns/HeroBanner/HeroBanner.js +21 -21
  81. package/dist/patterns/LanguageSelector/LanguageSelector.js +26 -28
  82. package/dist/patterns/ObjectTile/ObjectTile.js +66 -73
  83. package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +36 -0
  84. package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +7 -6
  85. package/dist/patterns/SaleCard/SaleCard.js +31 -39
  86. package/dist/patterns/SaleCard/SaleCard.stories.d.ts +1 -1
  87. package/dist/patterns/SaleCard/SaleCardActions.js +9 -8
  88. package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +49 -49
  89. package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js +19 -12
  90. package/dist/patterns/Social/Social.js +22 -22
  91. package/dist/patterns/Subscribe/Subscribe.js +57 -55
  92. package/dist/patterns/Subscribe/Subscribe.stories.d.ts +0 -1
  93. package/dist/patterns/TextBanner/TextBanner.js +12 -12
  94. package/dist/patterns/UserManagement/UserManagement.js +13 -13
  95. package/dist/patterns/ViewingDetails/ViewingDetails.d.ts +4 -0
  96. package/dist/patterns/ViewingDetails/ViewingDetails.js +36 -34
  97. package/dist/patterns/ViewingDetails/ViewingDetails.stories.d.ts +2 -0
  98. package/dist/patterns/ViewingDetails/ViewingDetailsMock.d.ts +2 -0
  99. package/dist/scss/_reset.scss +4 -0
  100. package/dist/scss/_type.scss +172 -65
  101. package/dist/scss/_vars.scss +92 -197
  102. package/dist/scss/_vars.scss.js +94 -199
  103. package/dist/scss/componentStyles.scss +181 -0
  104. package/dist/scss/components/Accordion/_accordion.scss +14 -28
  105. package/dist/scss/components/AddToCalendar/_addToCalendar.scss +0 -4
  106. package/dist/scss/components/Breadcrumb/_breadcrumb.scss +8 -1
  107. package/dist/scss/components/Button/_button.scss +40 -7
  108. package/dist/scss/components/ComboBox/_combobox.scss +7 -5
  109. package/dist/scss/components/ComposedModal/_composedModal.scss +0 -4
  110. package/dist/scss/components/Countdown/_countdown.scss +8 -9
  111. package/dist/scss/components/Countdown/_duration.scss +0 -2
  112. package/dist/scss/components/DatePicker/_datePicker.scss +11 -10
  113. package/dist/scss/components/Detail/_detail.scss +15 -6
  114. package/dist/scss/components/Divider/_divider.scss +3 -3
  115. package/dist/scss/components/Drawer/_drawerHeader.scss +0 -7
  116. package/dist/scss/components/Dropdown/_dropdown.scss +2 -2
  117. package/dist/scss/components/FavoritingTileButton/_favoritingTileButton.scss +5 -0
  118. package/dist/scss/components/Filter/_filter.scss +13 -10
  119. package/dist/scss/components/Icon/_icon.stories.scss +1 -1
  120. package/dist/scss/components/IconButton/_iconButton.scss +3 -5
  121. package/dist/scss/components/Input/_input.scss +22 -14
  122. package/dist/scss/components/Link/_link.scss +29 -8
  123. package/dist/scss/components/LinkBlock/_linkBlock.scss +5 -1
  124. package/dist/scss/components/LinkList/_linkList.scss +6 -0
  125. package/dist/scss/components/Modal/_modal.scss +2 -2
  126. package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +30 -14
  127. package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +2 -2
  128. package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +5 -4
  129. package/dist/scss/components/NotificationBanner/_notificationBanner.scss +10 -21
  130. package/dist/scss/components/Pagination/_pagination.scss +17 -1
  131. package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +5 -0
  132. package/dist/scss/components/Search/SearchResults/_searchResults.scss +5 -0
  133. package/dist/scss/components/Search/_search.scss +3 -11
  134. package/dist/scss/components/Search/_searchButton.scss +0 -1
  135. package/dist/scss/components/Select/_select.scss +8 -3
  136. package/dist/scss/components/Tabs/_tabs.scss +1 -6
  137. package/dist/scss/components/Tags/_tags.scss +1 -2
  138. package/dist/scss/components/TextArea/_textArea.scss +2 -4
  139. package/dist/scss/components/TextSymbol/_textSymbol.scss +1 -4
  140. package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +4 -0
  141. package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +12 -11
  142. package/dist/scss/patterns/CountryPicker/_countryPickerModal.scss +4 -0
  143. package/dist/scss/patterns/CountryPicker/_countryPickerOption.scss +3 -0
  144. package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +4 -7
  145. package/dist/scss/patterns/DetailList/_detailList.scss +8 -2
  146. package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +6 -8
  147. package/dist/scss/patterns/FilterMenu/_filterMenu.scss +2 -1
  148. package/dist/scss/patterns/FiltersInline/_filterButton.scss +12 -2
  149. package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +1 -9
  150. package/dist/scss/patterns/FiltersInline/_filtersInline.scss +5 -0
  151. package/dist/scss/patterns/HeroBanner/_heroBanner.scss +5 -6
  152. package/dist/scss/patterns/LanguageSelector/_languageSelector.scss +4 -0
  153. package/dist/scss/patterns/ObjectTile/_objectTile.scss +13 -12
  154. package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +9 -2
  155. package/dist/scss/patterns/SaleCard/_saleCard.scss +7 -23
  156. package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +16 -3
  157. package/dist/scss/patterns/Social/_social.scss +5 -1
  158. package/dist/scss/patterns/Subscribe/_subscribe.scss +0 -12
  159. package/dist/scss/patterns/TextBanner/_textBanner.scss +9 -3
  160. package/dist/scss/patterns/ViewingDetails/_viewingDetails.scss +15 -3
  161. package/dist/scss/site-furniture/Footer/_footer.scss +24 -4
  162. package/dist/scss/site-furniture/Header/_header.scss +12 -4
  163. package/dist/site-furniture/Footer/Footer.js +4 -4
  164. package/dist/site-furniture/Header/Header.js +76 -57
  165. package/package.json +4 -3
@@ -1,7 +1,7 @@
1
1
  import { jsxs as k, jsx as i } from "react/jsx-runtime";
2
2
  import { forwardRef as B, useMemo as T } from "react";
3
3
  import u from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as F, px as b } from "../../utils/index.js";
4
+ import { getCommonProps as F, px as g } from "../../utils/index.js";
5
5
  import M from "../Select/Select.js";
6
6
  import x from "../IconButton/IconButton.js";
7
7
  import { ButtonVariants as $ } from "../Button/types.js";
@@ -12,34 +12,34 @@ const z = B(
12
12
  ({
13
13
  className: P,
14
14
  onChange: _,
15
- variant: j = "inline",
15
+ variant: S = "inline",
16
16
  options: r = [],
17
- value: g,
17
+ value: b,
18
18
  isDisabled: c,
19
- previousLabel: C = "Previous",
20
- nextLabel: N = "Next",
19
+ previousLabel: j = "Previous",
20
+ nextLabel: C = "Next",
21
21
  selectLabel: v = "Select",
22
22
  ...m
23
- }, S) => {
24
- const I = "pagination", { className: a, ...O } = F(m, "Pagination"), { id: l } = m, { pendingState: w, setPendingState: R } = q(f(g)), s = w || g, p = (e, o) => {
25
- const d = f(e);
26
- R(d), _(d, o);
23
+ }, N) => {
24
+ const w = "pagination", { className: a, ...I } = F(m, "Pagination"), { id: l } = m, { pendingState: O, setPendingState: R } = q(f(b)), d = O || b, p = (e, o) => {
25
+ const s = f(e);
26
+ R(s), _(s, o);
27
27
  }, [t, n] = T(() => {
28
- const e = r.findIndex((h) => f(h) === s) - 1, o = r.at(e) || "", d = (r.findIndex((h) => f(h) === s) + 1) % r.length, V = r[d];
28
+ const e = r.findIndex((h) => f(h) === d) - 1, o = r.at(e) || "", s = (r.findIndex((h) => f(h) === d) + 1) % r.length, V = r[s];
29
29
  return [o, V];
30
- }, [r, s]);
30
+ }, [r, d]);
31
31
  return /* @__PURE__ */ k(
32
32
  "div",
33
33
  {
34
- ref: S,
35
- className: u(`${b}-${I}`, { [`${a}__wrapper`]: a }, P),
36
- ...O,
34
+ ref: N,
35
+ className: u(`${g}-${w}`, { [`${a}__wrapper`]: a }, P),
36
+ ...I,
37
37
  ...m,
38
38
  children: [
39
39
  /* @__PURE__ */ i(
40
40
  x,
41
41
  {
42
- className: u(`${a}__button`, `${b}-left-arrow`, {
42
+ className: u(`${a}__button`, `${g}-left-arrow`, {
43
43
  [`${a}__button--is-disabled`]: c
44
44
  }),
45
45
  onClick: (e) => {
@@ -47,19 +47,19 @@ const z = B(
47
47
  },
48
48
  "data-testid": `${l}-previous-button`,
49
49
  isDisabled: c,
50
- "aria-label": C,
50
+ "aria-label": j,
51
51
  variant: $.primary,
52
52
  href: typeof t == "object" && t.href ? t.href : void 0,
53
53
  prefetch: typeof t == "object" && t.prefetch ? t.prefetch : void 0,
54
- children: /* @__PURE__ */ i(y, { icon: "ChevronRight" })
54
+ children: /* @__PURE__ */ i(y, { icon: "ChevronRight", height: "16", width: "16" })
55
55
  }
56
56
  ),
57
57
  /* @__PURE__ */ i(
58
58
  M,
59
59
  {
60
- className: j === "inline" ? `${b}--inline-pagination` : void 0,
60
+ className: S === "inline" ? `${g}--inline-pagination` : void 0,
61
61
  "aria-label": v,
62
- value: s,
62
+ value: d,
63
63
  onChange: (e) => {
64
64
  const o = W(r, e?.currentTarget.value);
65
65
  o && p(o, e);
@@ -70,6 +70,7 @@ const z = B(
70
70
  disabled: c,
71
71
  showIcon: !1,
72
72
  id: `${l}-select-button`,
73
+ isStandalone: !0,
73
74
  children: r.map((e) => {
74
75
  const o = f(e);
75
76
  return /* @__PURE__ */ i("option", { value: o, children: typeof e == "string" || typeof e == "number" ? e : e.label }, o);
@@ -87,11 +88,11 @@ const z = B(
87
88
  },
88
89
  "data-testid": `${l}-next-button`,
89
90
  isDisabled: c,
90
- "aria-label": N,
91
+ "aria-label": C,
91
92
  variant: $.primary,
92
93
  href: typeof n == "object" && n.href ? n.href : void 0,
93
94
  prefetch: typeof n == "object" && n.prefetch ? n.prefetch : void 0,
94
- children: /* @__PURE__ */ i(y, { icon: "ChevronRight" })
95
+ children: /* @__PURE__ */ i(y, { icon: "ChevronRight", height: "16", width: "16" })
95
96
  }
96
97
  )
97
98
  ]
@@ -1,54 +1,54 @@
1
1
  import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
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";
3
+ import { forwardRef as S, Fragment as $ } from "react";
4
+ import { getCommonProps as C } from "../../utils/index.js";
5
5
  import h from "../../node_modules/classnames/index.js";
6
- import S from "../Icon/Icon.js";
6
+ import I from "../Icon/Icon.js";
7
7
  import { TextVariants as p } from "../Text/types.js";
8
8
  import _ from "../Text/Text.js";
9
- const T = $(
9
+ const T = S(
10
10
  ({
11
- totalSteps: i,
11
+ totalSteps: l,
12
12
  currentStep: f,
13
13
  className: u,
14
14
  stepLabels: e,
15
- progressIndicatorAriaLabel: g = "Progress Indicator",
16
- completedIconAriaLabel: N = "Completed Icon",
17
- ...n
15
+ progressIndicatorAriaLabel: N = "Progress Indicator",
16
+ completedIconAriaLabel: g = "Completed Icon",
17
+ ...m
18
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: [
19
+ const { className: a, ...M } = C(m, "ProgressIndicator");
20
+ if (l <= 0) return null;
21
+ const t = Math.max(1, Math.min(10, Math.floor(l))), c = Math.max(1, Math.min(t, Math.floor(f)));
22
+ return /* @__PURE__ */ r("div", { ...M, className: h(a, u), ...m, ref: v, children: /* @__PURE__ */ r(P, { value: c, max: t, "aria-label": N, children: /* @__PURE__ */ r("div", { className: `${a}__steps`, children: Array.from({ length: t }).map((x, o) => {
23
+ const s = o + 1, i = c > s, n = c === s;
24
+ return /* @__PURE__ */ d($, { children: [
25
25
  /* @__PURE__ */ d(
26
26
  "div",
27
27
  {
28
28
  className: `${a}__item`,
29
- "aria-current": l ? "step" : void 0,
29
+ "aria-current": n ? "step" : void 0,
30
30
  "data-testid": `progress-step-${s}`,
31
31
  children: [
32
32
  /* @__PURE__ */ r(
33
33
  "span",
34
34
  {
35
35
  className: h(`${a}__circle`, {
36
- [`${a}__circle--active`]: m,
37
- [`${a}__circle--current`]: l
36
+ [`${a}__circle--active`]: i,
37
+ [`${a}__circle--current`]: n
38
38
  }),
39
- children: m ? /* @__PURE__ */ r(
40
- S,
39
+ children: i ? /* @__PURE__ */ r(
40
+ I,
41
41
  {
42
42
  icon: "Success",
43
- "aria-label": N,
43
+ "aria-label": g,
44
44
  color: "currentColor",
45
45
  width: 20,
46
46
  height: 20
47
47
  }
48
- ) : /* @__PURE__ */ r(_, { variant: p.badge, children: s })
48
+ ) : /* @__PURE__ */ r(_, { variant: p.labelSmall, children: s })
49
49
  }
50
50
  ),
51
- e && e[o] && /* @__PURE__ */ r("span", { className: `${a}__label`, children: /* @__PURE__ */ r(_, { variant: p.string2, children: e[o] }) })
51
+ e && e[o] && /* @__PURE__ */ r("span", { className: `${a}__label`, children: /* @__PURE__ */ r(_, { variant: p.bodySmall, children: e[o] }) })
52
52
  ]
53
53
  }
54
54
  ),
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
- import { forwardRef as j, useContext as D, useRef as p, useState as H, useEffect as O } from "react";
3
- import { getCommonProps as A, px as F, encodeURLSearchParams as N } from "../../utils/index.js";
4
- import f from "../../node_modules/classnames/index.js";
2
+ import { forwardRef as j, useContext as D, useRef as f, useState as H, useEffect as O } from "react";
3
+ import { getCommonProps as A, px as F, encodeURLSearchParams as w } from "../../utils/index.js";
4
+ import s from "../../node_modules/classnames/index.js";
5
5
  import K from "../Input/Input.js";
6
6
  import M from "../Link/Link.js";
7
7
  import U from "./SearchResults/SearchResults.js";
@@ -11,86 +11,87 @@ import { useOnClickOutside as z } from "../../node_modules/usehooks-ts/dist/inde
11
11
  import { HeaderContext as B } from "../../site-furniture/Header/Header.js";
12
12
  import { SearchButton as G } from "./SearchButton.js";
13
13
  import J from "../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
14
- import Q from "../../node_modules/react-transition-group/esm/CSSTransition.js";
15
- const W = j(
14
+ import { LinkVariants as Q } from "../Link/types.js";
15
+ import W from "../../node_modules/react-transition-group/esm/CSSTransition.js";
16
+ const X = j(
16
17
  ({
17
18
  onSearch: S,
18
19
  onCancel: _,
19
- searchResults: R = [],
20
- state: n = "idle",
21
- defaultValue: w = "",
20
+ searchResults: N = [],
21
+ state: o = "idle",
22
+ defaultValue: R = "",
22
23
  className: C,
23
24
  placeholder: I = "",
24
- searchButtonText: o = "Search",
25
+ searchButtonText: i = "Search",
25
26
  loadingText: E = "Search In Progress...",
26
27
  invalidText: b = "Invalid search",
27
- getAllResultsText: P = (e) => `View all results for ${e}`,
28
+ getAllResultsText: k = (e) => `View all results for ${e}`,
28
29
  getAllResultsLink: v = (e) => `/Search?Search=${e}`,
29
30
  ...x
30
- }, k) => {
31
- const { className: e, "data-testid": i, ...L } = A(x, "Search"), c = D(B), l = p(null), d = p(null), g = p(null), a = c.isSearchExpanded, s = l.current?.value, [T, m] = H(!0), y = S ? (r) => {
31
+ }, L) => {
32
+ const { className: e, "data-testid": l, ...P } = A(x, "Search"), c = D(B), d = f(null), m = f(null), g = f(null), a = c.isSearchExpanded, n = d.current?.value, [T, h] = H(!0), y = S ? (r) => {
32
33
  S(r.target.value);
33
34
  } : void 0;
34
35
  z(g, (r) => {
35
- _?.(), h(!1), r.stopPropagation();
36
+ _?.(), p(!1), r.stopPropagation();
36
37
  });
37
38
  const $ = (r) => {
38
39
  if (r.stopPropagation(), r.key === "Enter") {
39
- if (r.preventDefault(), s && s.length > 2) {
40
- const V = N(v(s));
41
- m(!1), window.location.href = V;
40
+ if (r.preventDefault(), n && n.length > 2) {
41
+ const V = w(v(n));
42
+ h(!1), window.location.href = V;
42
43
  }
43
- r.currentTarget instanceof HTMLAnchorElement && (m(!1), r.currentTarget.click());
44
+ r.currentTarget instanceof HTMLAnchorElement && (h(!1), r.currentTarget.click());
44
45
  }
45
- r.key === "Escape" && (d.current?.reset(), c.setIsSearchExpanded(!1));
46
+ r.key === "Escape" && (m.current?.reset(), c.setIsSearchExpanded(!1));
46
47
  };
47
48
  O(() => {
48
49
  if (a) {
49
- l.current?.focus();
50
+ d.current?.focus();
50
51
  return;
51
52
  }
52
53
  }, [a]);
53
- const h = (r) => {
54
- d.current?.reset(), c.setIsSearchExpanded(r);
54
+ const p = (r) => {
55
+ m.current?.reset(), c.setIsSearchExpanded(r);
55
56
  };
56
- return /* @__PURE__ */ t(J, { enabled: a, allowPinchZoom: !0, removeScrollBar: !1, children: /* @__PURE__ */ t("div", { className: `${e}__container`, ref: k, children: /* @__PURE__ */ u(
57
+ return /* @__PURE__ */ t(J, { enabled: a, allowPinchZoom: !0, removeScrollBar: !1, children: /* @__PURE__ */ t("div", { className: `${e}__container`, ref: L, children: /* @__PURE__ */ u(
57
58
  "div",
58
59
  {
59
60
  className: `${e}__container__inner`,
60
61
  ref: g,
61
62
  onClick: (r) => {
62
- a || (h(!0), r.stopPropagation());
63
+ a || (p(!0), r.stopPropagation());
63
64
  },
64
65
  children: [
65
- /* @__PURE__ */ t(q, { variant: Z.heading4, className: `${e}__container__inner__label`, children: o }),
66
+ /* @__PURE__ */ t(q, { variant: Z.headingSmall, className: `${e}__container__inner__label`, children: i }),
66
67
  /* @__PURE__ */ t(
67
68
  "div",
68
69
  {
69
- ...L,
70
- className: f(e, C, { [`${e}--active`]: a }),
71
- "data-testid": i,
70
+ ...P,
71
+ className: s(e, C, { [`${e}--active`]: a }),
72
+ "data-testid": l,
72
73
  role: "search",
73
74
  ...x,
74
75
  children: /* @__PURE__ */ u(
75
76
  "form",
76
77
  {
77
- "data-testid": `${i}-form`,
78
- className: f(`${e}__form`, {
78
+ "data-testid": `${l}-form`,
79
+ className: s(`${e}__form`, {
79
80
  [`${e}__form--active`]: a
80
81
  }),
81
- ref: d,
82
+ ref: m,
82
83
  children: [
83
84
  /* @__PURE__ */ u(
84
85
  "div",
85
86
  {
86
- className: f(`${e}__content-wrapper`, {
87
+ className: s(`${e}__content-wrapper`, {
87
88
  [`${e}__content-wrapper--active`]: a
88
89
  }),
89
90
  role: "combobox",
90
91
  "aria-haspopup": "listbox",
91
92
  children: [
92
93
  /* @__PURE__ */ t(
93
- Q,
94
+ W,
94
95
  {
95
96
  in: a,
96
97
  classNames: `${F}-input`,
@@ -103,15 +104,15 @@ const W = j(
103
104
  className: `${e}__input`,
104
105
  id: "search-input",
105
106
  hideLabel: !0,
106
- labelText: o,
107
+ labelText: i,
107
108
  placeholder: a ? I : "",
108
109
  type: "text",
109
- defaultValue: w,
110
- invalid: n === "invalid",
110
+ defaultValue: R,
111
+ invalid: o === "invalid",
111
112
  invalidText: b,
112
113
  onKeyDown: $,
113
114
  onChange: y,
114
- ref: l
115
+ ref: d
115
116
  }
116
117
  )
117
118
  }
@@ -120,33 +121,34 @@ const W = j(
120
121
  G,
121
122
  {
122
123
  className: e,
123
- searchButtonText: o,
124
- state: n,
125
- testId: i,
124
+ searchButtonText: i,
125
+ state: o,
126
+ testId: l,
126
127
  isSearchExpanded: a,
127
- setIsSearchExpanded: h,
128
+ setIsSearchExpanded: p,
128
129
  onCancel: _
129
130
  }
130
131
  )
131
132
  ]
132
133
  }
133
134
  ),
134
- a && T && s && s.length > 2 ? /* @__PURE__ */ t(
135
+ a && T && n && n.length > 2 ? /* @__PURE__ */ t(
135
136
  U,
136
137
  {
137
- autoCompleteResults: R,
138
- isLoading: n === "loading",
138
+ autoCompleteResults: N,
139
+ isLoading: o === "loading",
139
140
  loadingText: E,
140
141
  onKeyDown: $,
141
- userInputValue: s,
142
- closeSearch: m,
143
- children: /* @__PURE__ */ t("li", { className: `${e}__result`, children: /* @__PURE__ */ t(
144
- M,
142
+ userInputValue: n,
143
+ closeSearch: h,
144
+ children: /* @__PURE__ */ t(
145
+ "li",
145
146
  {
146
- href: ((r) => N(v(r)))(s),
147
- children: /* @__PURE__ */ t("p", { children: P(s) })
148
- }
149
- ) }, "viewAllSearchResults")
147
+ className: s(`${e}__result`, `${e}__result--view-all`),
148
+ children: /* @__PURE__ */ t(M, { href: w(v(n)), variant: Q.linkLarge, children: /* @__PURE__ */ t("p", { children: k(n) }) })
149
+ },
150
+ "viewAllSearchResults"
151
+ )
150
152
  }
151
153
  ) : null
152
154
  ]
@@ -159,7 +161,7 @@ const W = j(
159
161
  ) }) });
160
162
  }
161
163
  );
162
- W.displayName = "Search";
164
+ X.displayName = "Search";
163
165
  export {
164
- W as default
166
+ X as default
165
167
  };
@@ -1,37 +1,37 @@
1
- import { jsx as r, jsxs as p } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
2
  import { px as e } from "../../../utils/index.js";
3
3
  import f from "../../Link/Link.js";
4
4
  import { LinkVariants as L } from "../../Link/types.js";
5
- const w = ({
5
+ const b = ({
6
6
  autoCompleteResults: l = [],
7
- isLoading: t,
8
- children: i,
7
+ isLoading: n,
8
+ children: t,
9
9
  loadingText: c = "Loading...",
10
10
  onKeyDown: o,
11
11
  userInputValue: h = "",
12
12
  closeSearch: d
13
13
  }) => {
14
14
  const m = Array.isArray(l) && l.length > 0;
15
- function _(s, a) {
16
- return s.split(new RegExp(`(${a})`, "gi")).map(
17
- (n, u) => n.toLocaleLowerCase() === a.toLocaleLowerCase() ? /* @__PURE__ */ r("strong", { children: n }, u) : n
15
+ function _(a, s) {
16
+ return a.split(new RegExp(`(${s})`, "gi")).map(
17
+ (i, p) => i.toLocaleLowerCase() === s.toLocaleLowerCase() ? /* @__PURE__ */ r("strong", { children: i }, p) : i
18
18
  );
19
19
  }
20
- return /* @__PURE__ */ r("div", { className: `${e}-search__results`, children: /* @__PURE__ */ p("ul", { "data-testid": "search-results", className: `${e}-search__results-container`, children: [
21
- t ? /* @__PURE__ */ r("li", { className: `${e}-search__result`, children: c }) : null,
22
- m && l.map((s, a) => /* @__PURE__ */ r("li", { className: `${e}-search__result`, children: /* @__PURE__ */ r(
20
+ return /* @__PURE__ */ r("div", { className: `${e}-search__results`, children: /* @__PURE__ */ u("ul", { "data-testid": "search-results", className: `${e}-search__results-container`, children: [
21
+ n ? /* @__PURE__ */ r("li", { className: `${e}-search__result`, children: c }) : null,
22
+ m && l.map((a, s) => /* @__PURE__ */ r("li", { className: `${e}-search__result`, children: /* @__PURE__ */ r(
23
23
  f,
24
24
  {
25
- href: s.url,
25
+ href: a.url,
26
26
  onKeyDown: o,
27
27
  onClick: () => d(!1),
28
- variant: L.snwFlyoutLink,
29
- children: /* @__PURE__ */ r("span", { "data-testid": `search-result-${a}`, className: "${px}-search__result__label", children: _(s.label, h) })
28
+ variant: L.linkLarge,
29
+ children: /* @__PURE__ */ r("span", { "data-testid": `search-result-${s}`, className: "${px}-search__result__label", children: _(a.label, h) })
30
30
  }
31
- ) }, s.id)),
32
- i
31
+ ) }, a.id)),
32
+ t
33
33
  ] }) });
34
34
  };
35
35
  export {
36
- w as default
36
+ b as default
37
37
  };
@@ -19,6 +19,10 @@ export interface SelectProps extends Merge<InputProps, React.ComponentProps<'sel
19
19
  * Determines the variant of the select
20
20
  */
21
21
  variant?: SelectVariants;
22
+ /**
23
+ * Determines if the select is not in a form
24
+ */
25
+ isStandalone?: boolean;
22
26
  }
23
27
  /**
24
28
  * ## Overview
@@ -1,86 +1,92 @@
1
1
  import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
- import * as z from "react";
3
- import a from "../../node_modules/classnames/index.js";
4
- import { px as e, useNormalizedInputProps as D } from "../../utils/index.js";
2
+ import * as k from "react";
3
+ import n from "../../node_modules/classnames/index.js";
4
+ import { px as e, useNormalizedInputProps as z } from "../../utils/index.js";
5
5
  import { SelectVariants as c } from "./types.js";
6
- import F from "../Icon/Icon.js";
7
- const I = z.forwardRef(
6
+ import D from "../Icon/Icon.js";
7
+ import { TextVariants as F } from "../Text/types.js";
8
+ import I from "../Text/Text.js";
9
+ const M = k.forwardRef(
8
10
  ({
9
- children: d,
11
+ children: m,
10
12
  className: i,
11
- defaultValue: m,
13
+ defaultValue: d,
12
14
  disabled: u,
13
15
  hideLabel: $,
14
16
  id: t,
15
- showIcon: l = !0,
17
+ showIcon: r = !0,
16
18
  variant: _ = c.default,
17
19
  inline: f,
18
20
  invalid: b,
19
- invalidText: h,
20
- labelText: v,
21
+ invalidText: v,
22
+ labelText: h,
21
23
  onChange: w,
22
- onClick: V,
23
- readOnly: r,
24
- size: C = "md",
25
- value: x,
24
+ onClick: g,
25
+ readOnly: o,
26
+ size: x = "md",
27
+ value: C,
26
28
  warn: y,
27
29
  warnText: N,
28
- ...S
29
- }, j) => {
30
- const o = "select", n = D({
30
+ isStandalone: S = !1,
31
+ ...j
32
+ }, P) => {
33
+ const l = "select", a = z({
31
34
  disabled: u,
32
35
  id: t,
33
36
  invalid: b,
34
- invalidText: h,
35
- readOnly: r,
36
- type: o,
37
+ invalidText: v,
38
+ readOnly: o,
39
+ type: l,
37
40
  warn: y,
38
41
  warnText: N
39
- }), P = a(`${e}-${o}-input`, `${e}-input`, `${e}-input--${C}`, {
42
+ }), R = n(`${e}-${l}-input`, `${e}-input`, `${e}-input--${x}`, {
40
43
  [`${e}-input--inline`]: f,
41
- [`${e}-input--readonly`]: r,
42
- [`${e}-input--disabled`]: n.disabled,
43
- [`${e}-input--invalid`]: n.invalid,
44
- [`${e}-input--warn`]: n.warn,
45
- [`${i}__wrapper`]: i
46
- }), R = a(i, `${e}-input__input`, {
44
+ [`${e}-input--readonly`]: o,
45
+ [`${e}-input--disabled`]: a.disabled,
46
+ [`${e}-input--invalid`]: a.invalid,
47
+ [`${e}-input--warn`]: a.warn,
48
+ [`${i}__wrapper`]: i,
49
+ [`${e}-${l}-input__standalone`]: S
50
+ }), T = n(i, `${e}-input__input`, {
47
51
  [`${e}-input__select--tertiary`]: _ === c.tertiary
48
- }), k = a(`${e}-select-container`, {
49
- [`${e}-select-container--show__icon`]: l
52
+ }), V = n(`${e}-select-container`, {
53
+ [`${e}-select-container--show__icon`]: r
50
54
  });
51
- return /* @__PURE__ */ p("div", { className: P, children: [
55
+ return /* @__PURE__ */ p("div", { className: R, children: [
52
56
  /* @__PURE__ */ s(
53
- "label",
57
+ I,
54
58
  {
59
+ element: "label",
60
+ variant: F.labelMedium,
55
61
  "data-testid": `${t}-label`,
56
62
  htmlFor: t,
57
- className: a(`${e}-input__label`, { [`${e}-input__label--hidden`]: $ }),
58
- children: v
63
+ className: n(`${e}-input__label`, { [`${e}-input__label--hidden`]: $ }),
64
+ children: h
59
65
  }
60
66
  ),
61
- /* @__PURE__ */ p("div", { className: k, children: [
67
+ /* @__PURE__ */ p("div", { className: V, children: [
62
68
  /* @__PURE__ */ s(
63
69
  "select",
64
70
  {
65
- className: R,
71
+ className: T,
66
72
  "data-testid": t,
67
- defaultValue: m,
68
- disabled: n.disabled,
73
+ defaultValue: d,
74
+ disabled: a.disabled,
69
75
  id: t,
70
76
  onChange: w,
71
- ref: j,
72
- value: x,
73
- ...S,
74
- children: d
77
+ ref: P,
78
+ value: C,
79
+ ...j,
80
+ children: m
75
81
  }
76
82
  ),
77
- l ? /* @__PURE__ */ s(F, { icon: "ChevronDown" }) : null
83
+ r ? /* @__PURE__ */ s(D, { icon: "ChevronDown" }) : null
78
84
  ] }),
79
- n.validation
85
+ a.validation
80
86
  ] });
81
87
  }
82
88
  );
83
- I.displayName = "Select";
89
+ M.displayName = "Select";
84
90
  export {
85
- I as default
91
+ M as default
86
92
  };
@@ -120,6 +120,7 @@ export declare const Tertiary: {
120
120
  };
121
121
  };
122
122
  };
123
+ export declare const IsStandalone: ({ playgroundWidth, ...args }: StoryProps) => import("react/jsx-runtime").JSX.Element;
123
124
  export declare const CustomLabel: {
124
125
  ({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
125
126
  args: {
@@ -26,7 +26,7 @@ const x = N(
26
26
  value: e.value,
27
27
  className: `${a}__tabs-trigger`,
28
28
  onClick: f,
29
- children: /* @__PURE__ */ r(C, { variant: v.label, children: e.label })
29
+ children: /* @__PURE__ */ r(C, { variant: v.labelMedium, children: e.label })
30
30
  },
31
31
  e.value
32
32
  )),