@phillips/seldon 1.214.0 → 1.216.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 +11 -11
  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 +33 -41
  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 +33 -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 +13 -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 +4 -10
  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 +0 -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,47 +1,49 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import N, { forwardRef as C } from "react";
1
+ import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
+ import N, { forwardRef as b } from "react";
3
3
  import d from "../../node_modules/classnames/index.js";
4
- import { getCommonProps as y, px as t } from "../../utils/index.js";
5
- import $ from "../Button/Button.js";
6
- import { ButtonVariants as g } from "../Button/types.js";
7
- import u from "../Icon/Icon.js";
8
- const j = ({ id: i, className: a, onRemove: e, label: o, removeText: s = "Remove" }) => /* @__PURE__ */ n(
9
- $,
4
+ import { getCommonProps as x, px as r } from "../../utils/index.js";
5
+ import f from "../Button/Button.js";
6
+ import { ButtonVariants as p } from "../Button/types.js";
7
+ import $ from "../Icon/Icon.js";
8
+ import { TextVariants as u } from "../Text/types.js";
9
+ import g from "../Text/Text.js";
10
+ const L = ({ id: s, className: t, onRemove: e, label: o, removeText: i = "Remove" }) => /* @__PURE__ */ n(
11
+ f,
10
12
  {
11
- className: d(`${t}-tag`, `${t}-button`, a),
12
- "aria-label": `${s} ${o}`,
13
+ className: d(`${r}-tag`, `${r}-button`, t),
14
+ "aria-label": `${i} ${o}`,
13
15
  onClick: () => e(o),
14
- variant: g.tertiary,
16
+ variant: p.tertiary,
15
17
  children: [
16
- /* @__PURE__ */ r("div", { className: `${t}-tag__label`, children: o }),
17
- /* @__PURE__ */ r("div", { className: `${t}-tag__button`, "data-testid": `${i}-item-close-button`, children: /* @__PURE__ */ r(u, { icon: "CloseX", height: 8, width: 8, color: "currentColor", className: `${t}-tag__icon` }) })
18
+ /* @__PURE__ */ a(g, { variant: u.labelSmall, children: o }),
19
+ /* @__PURE__ */ a("div", { className: `${r}-tag__button`, "data-testid": `${s}-item-close-button`, children: /* @__PURE__ */ a($, { icon: "CloseX", height: 8, width: 8, color: "currentColor", className: `${r}-tag__icon` }) })
18
20
  ]
19
21
  }
20
- ), _ = C(
21
- ({ className: i, children: a, clearAllLabel: e = "Clear All", onClear: o, ...s }, f) => {
22
- const l = "tags-list", { className: p, ...h } = y(s, "TagsList"), { id: m } = s;
22
+ ), v = b(
23
+ ({ className: s, children: t, clearAllLabel: e = "Clear All", onClear: o, ...i }, h) => {
24
+ const l = "tags-list", { className: C, ...y } = x(i, "TagsList"), { id: m } = i;
23
25
  return /* @__PURE__ */ n(
24
26
  "ul",
25
27
  {
26
- className: d(`${t}-${l}`, p, i),
27
- ...h,
28
- ...s,
28
+ className: d(`${r}-${l}`, C, s),
29
+ ...y,
30
+ ...i,
29
31
  tabIndex: 0,
30
32
  "data-testid": `${l}-${m}`,
31
- ref: f,
33
+ ref: h,
32
34
  children: [
33
- Array.isArray(a) ? N.Children.map(a, (c) => /* @__PURE__ */ r("li", { children: c }, c.props.id)) : a,
34
- Array.isArray(a) && a.length > 0 && /* @__PURE__ */ r("li", { children: /* @__PURE__ */ n(
35
- $,
35
+ Array.isArray(t) ? N.Children.map(t, (c) => /* @__PURE__ */ a("li", { children: c }, c.props.id)) : t,
36
+ Array.isArray(t) && t.length > 0 && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ n(
37
+ f,
36
38
  {
37
39
  onClick: o,
38
40
  "data-testid": `${m}-clear-all-button`,
39
- className: `${t}-${l}--clear`,
41
+ className: `${r}-${l}--clear`,
40
42
  "aria-label": e,
41
- variant: g.tertiary,
43
+ variant: p.tertiary,
42
44
  children: [
43
- /* @__PURE__ */ r(u, { icon: "ArrowLeft", color: "currentColor", height: 24, width: 24 }),
44
- /* @__PURE__ */ r("div", { className: `${t}-label`, children: e })
45
+ /* @__PURE__ */ a($, { icon: "ArrowLeft", color: "currentColor", height: 24, width: 24 }),
46
+ /* @__PURE__ */ a(g, { variant: u.labelSmall, children: e })
45
47
  ]
46
48
  }
47
49
  ) })
@@ -50,8 +52,8 @@ const j = ({ id: i, className: a, onRemove: e, label: o, removeText: s = "Remove
50
52
  );
51
53
  }
52
54
  );
53
- _.displayName = "Tags";
55
+ v.displayName = "Tags";
54
56
  export {
55
- j as Tag,
56
- _ as default
57
+ L as Tag,
58
+ v as default
57
59
  };
@@ -1,17 +1,25 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as c } from "react";
3
- import { getCommonProps as i, px as d } from "../../utils/index.js";
2
+ import { forwardRef as x } from "react";
3
+ import { getCommonProps as c, px as d } from "../../utils/index.js";
4
4
  import { TextVariants as N } from "./types.js";
5
- import { determineDefaultTextElement as T, determineTextClassName as C } from "./utils.js";
6
- import u from "../../node_modules/classnames/index.js";
7
- const $ = c(
8
- ({ children: e, className: a, element: n, variant: m = N.body2, align: o, isSkeletonLoading: l, ...t }, p) => {
9
- const f = n || T(m), { className: s, ...x } = i(t, "Text");
5
+ import { determineDefaultTextElement as T, determineTextClassName as u } from "./utils.js";
6
+ import C from "../../node_modules/classnames/index.js";
7
+ const $ = x(
8
+ ({
9
+ children: e,
10
+ className: a,
11
+ element: n,
12
+ variant: m = N.bodyMedium,
13
+ align: o,
14
+ isSkeletonLoading: l,
15
+ ...t
16
+ }, p) => {
17
+ const f = n || T(m), { className: s, ...i } = c(t, "Text");
10
18
  return /* @__PURE__ */ r(
11
19
  f,
12
20
  {
13
- ...x,
14
- className: u(s, a, C(m), {
21
+ ...i,
22
+ className: C(s, a, u(m), {
15
23
  [`${s}--${o}`]: !!o
16
24
  }),
17
25
  ref: p,
@@ -1,29 +1,70 @@
1
1
  export declare enum TextVariants {
2
+ /** @deprecated Use headingLarge instead */
2
3
  blockquote = "blockquote",
4
+ /** @deprecated Use headingLarge instead */
3
5
  heading1 = "heading1",
6
+ /** @deprecated Use headingLarge instead */
4
7
  heading2 = "heading2",
8
+ /** @deprecated Use headingMedium instead */
5
9
  heading3 = "heading3",
10
+ /** @deprecated Use headingSmall instead */
6
11
  heading4 = "heading4",
12
+ /** @deprecated Use headingExtraSmall instead */
7
13
  heading5 = "heading5",
14
+ /** @deprecated Use displayMedium instead */
8
15
  title1 = "title1",
16
+ /** @deprecated Use displaySmall instead */
9
17
  title2 = "title2",
18
+ /** @deprecated Use displaySmall instead */
10
19
  title3 = "title3",
20
+ /** @deprecated Use bodySmall instead */
11
21
  title4 = "title4",
22
+ /** @deprecated Use bodyLarge instead */
12
23
  body1 = "body1",
24
+ /** @deprecated Use bodyMedium instead */
13
25
  body2 = "body2",
26
+ /** @deprecated Use bodySmall instead */
14
27
  body3 = "body3",
28
+ /** @deprecated Use headingMedium instead */
15
29
  string1 = "string1",
30
+ /** @deprecated Use bodySmall instead */
16
31
  string2 = "string2",
32
+ /** @deprecated Use bodySmall instead */
17
33
  string3 = "string3",
34
+ /** @deprecated Use bodySmall instead */
18
35
  button = "button",
36
+ /** @deprecated Use the bodyMedium variant instead */
19
37
  email = "email",
38
+ /** @deprecated Use labelSmall instead */
20
39
  label = "label",
40
+ /** @deprecated Use linkMedium instead */
21
41
  link = "link",
42
+ /** @deprecated Use labelSmall instead */
22
43
  badge = "badge",
44
+ /** @deprecated Use linkLarge instead */
23
45
  snwFlyoutLink = "snwFlyoutLink",
46
+ /** @deprecated Use linkStylised instead */
24
47
  snwHeaderLink = "snwHeaderLink",
48
+ /** @deprecated Use displaySmall instead */
25
49
  snwHeadingHero1 = "snwHeadingHero1",
26
- snwHeadingHero2 = "snwHeadingHero2"
50
+ /** @deprecated Use headingLarge instead */
51
+ snwHeadingHero2 = "snwHeadingHero2",
52
+ displayMedium = "displayMedium",
53
+ displaySmall = "displaySmall",
54
+ headingLarge = "headingLarge",
55
+ headingMedium = "headingMedium",
56
+ headingSmall = "headingSmall",
57
+ headingExtraSmall = "headingExtraSmall",
58
+ bodyLarge = "bodyLarge",
59
+ bodyMedium = "bodyMedium",
60
+ bodySmall = "bodySmall",
61
+ labelLarge = "labelLarge",
62
+ labelMedium = "labelMedium",
63
+ labelSmall = "labelSmall",
64
+ linkStylised = "linkStylised",
65
+ linkLarge = "linkLarge",
66
+ linkMedium = "linkMedium",
67
+ linkSmall = "linkSmall"
27
68
  }
28
69
  export declare enum TextAlignments {
29
70
  left = "left",
@@ -1,5 +1,5 @@
1
- var g = /* @__PURE__ */ ((d) => (d.blockquote = "blockquote", d.heading1 = "heading1", d.heading2 = "heading2", d.heading3 = "heading3", d.heading4 = "heading4", d.heading5 = "heading5", d.title1 = "title1", d.title2 = "title2", d.title3 = "title3", d.title4 = "title4", d.body1 = "body1", d.body2 = "body2", d.body3 = "body3", d.string1 = "string1", d.string2 = "string2", d.string3 = "string3", d.button = "button", d.email = "email", d.label = "label", d.link = "link", d.badge = "badge", d.snwFlyoutLink = "snwFlyoutLink", d.snwHeaderLink = "snwHeaderLink", d.snwHeadingHero1 = "snwHeadingHero1", d.snwHeadingHero2 = "snwHeadingHero2", d))(g || {}), l = /* @__PURE__ */ ((d) => (d.left = "left", d.center = "center", d.right = "right", d))(l || {});
1
+ var d = /* @__PURE__ */ ((l) => (l.blockquote = "blockquote", l.heading1 = "heading1", l.heading2 = "heading2", l.heading3 = "heading3", l.heading4 = "heading4", l.heading5 = "heading5", l.title1 = "title1", l.title2 = "title2", l.title3 = "title3", l.title4 = "title4", l.body1 = "body1", l.body2 = "body2", l.body3 = "body3", l.string1 = "string1", l.string2 = "string2", l.string3 = "string3", l.button = "button", l.email = "email", l.label = "label", l.link = "link", l.badge = "badge", l.snwFlyoutLink = "snwFlyoutLink", l.snwHeaderLink = "snwHeaderLink", l.snwHeadingHero1 = "snwHeadingHero1", l.snwHeadingHero2 = "snwHeadingHero2", l.displayMedium = "displayMedium", l.displaySmall = "displaySmall", l.headingLarge = "headingLarge", l.headingMedium = "headingMedium", l.headingSmall = "headingSmall", l.headingExtraSmall = "headingExtraSmall", l.bodyLarge = "bodyLarge", l.bodyMedium = "bodyMedium", l.bodySmall = "bodySmall", l.labelLarge = "labelLarge", l.labelMedium = "labelMedium", l.labelSmall = "labelSmall", l.linkStylised = "linkStylised", l.linkLarge = "linkLarge", l.linkMedium = "linkMedium", l.linkSmall = "linkSmall", l))(d || {}), g = /* @__PURE__ */ ((l) => (l.left = "left", l.center = "center", l.right = "right", l))(g || {});
2
2
  export {
3
- l as TextAlignments,
4
- g as TextVariants
3
+ g as TextAlignments,
4
+ d as TextVariants
5
5
  };
@@ -1,10 +1,43 @@
1
- import { px as n } from "../../utils/index.js";
2
- import { TextVariants as r } from "./types.js";
3
- const o = (e = r.body1) => `${n}-text--${e.charAt(0).toLowerCase() + e.slice(1)}`, u = (e = r.body1) => {
4
- let t = e.toLowerCase();
5
- return e === r.blockquote ? "blockquote" : e.includes("body") || e.includes("string") || e.includes("title") ? "span" : e === r.label ? "label" : t.includes("heading") ? (t = t.replace("italic", ""), `h${isNaN(parseInt(t.slice(-1))) ? 3 : parseInt(t.slice(-1))}`) : "span";
1
+ import { px as r } from "../../utils/index.js";
2
+ import { TextVariants as t } from "./types.js";
3
+ const u = (e = t.body1) => {
4
+ switch (e) {
5
+ case t.email:
6
+ return `${r}-text--bodyMedium`;
7
+ case t.link:
8
+ return `${r}-text--bodyMedium`;
9
+ case t.linkSmall:
10
+ return `${r}-text--bodySmall`;
11
+ case t.linkMedium:
12
+ return `${r}-text--bodyMedium`;
13
+ case t.linkLarge:
14
+ return `${r}-text--bodyLarge`;
15
+ default:
16
+ return `${r}-text--${e.charAt(0).toLowerCase() + e.slice(1)}`;
17
+ }
18
+ }, i = (e = t.body1) => {
19
+ if (e === t.blockquote) return "blockquote";
20
+ if (e.includes("body") || e.includes("string") || e.includes("title")) return "span";
21
+ if (e.includes("label"))
22
+ return "label";
23
+ if (e.includes("heading") || e.includes("display"))
24
+ switch (e) {
25
+ case t.headingLarge:
26
+ case t.displayMedium:
27
+ return "h1";
28
+ case t.headingMedium:
29
+ case t.displaySmall:
30
+ return "h2";
31
+ case t.headingSmall:
32
+ return "h3";
33
+ case t.headingExtraSmall:
34
+ return "h4";
35
+ default:
36
+ return `h${isNaN(parseInt(e.slice(-1))) ? 3 : parseInt(e.slice(-1))}`;
37
+ }
38
+ return "span";
6
39
  };
7
40
  export {
8
- u as determineDefaultTextElement,
9
- o as determineTextClassName
41
+ i as determineDefaultTextElement,
42
+ u as determineTextClassName
10
43
  };
@@ -1,46 +1,50 @@
1
1
  import { jsxs as n, Fragment as w, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as I, useId as A } from "react";
2
+ import { forwardRef as I, useId as T } from "react";
3
3
  import l from "../../node_modules/classnames/index.js";
4
- import { px as a, useNormalizedInputProps as j } from "../../utils/index.js";
5
- import y from "../Icon/Icon.js";
6
- const z = I(
4
+ import { px as e, useNormalizedInputProps as A } from "../../utils/index.js";
5
+ import j from "../Icon/Icon.js";
6
+ import y from "../Text/Text.js";
7
+ import { TextVariants as z } from "../Text/types.js";
8
+ const C = I(
7
9
  ({
8
10
  className: o,
9
11
  id: t,
10
12
  isSkeletonLoading: d,
11
13
  labelText: m,
12
- maxLength: c = 3e3,
13
- name: p,
14
- rows: x = 2,
14
+ maxLength: p = 3e3,
15
+ name: x,
16
+ rows: c = 2,
15
17
  disabled: $,
16
- warn: _,
17
- warnText: N,
18
+ warn: f,
19
+ warnText: _,
18
20
  invalid: b,
19
- invalidText: f,
20
- ...u
21
- }, v) => {
22
- const i = `${a}-text-area`, r = A(), e = j({
21
+ invalidText: u,
22
+ ...v
23
+ }, N) => {
24
+ const i = `${e}-text-area`, r = T(), a = A({
23
25
  disabled: $,
24
26
  id: t ?? r,
25
27
  invalid: b,
26
- invalidText: f,
28
+ invalidText: u,
27
29
  type: "text-area",
28
- warn: _,
29
- warnText: N
30
+ warn: f,
31
+ warnText: _
30
32
  }), h = l(`${i}__wrapper`, {
31
- [`${a}-text-area--disabled`]: e.disabled,
32
- [`${a}-text-area--invalid`]: e.invalid,
33
- [`${a}-text-area--warn`]: e.warn
33
+ [`${e}-text-area--disabled`]: a.disabled,
34
+ [`${e}-text-area--invalid`]: a.invalid,
35
+ [`${e}-text-area--warn`]: a.warn
34
36
  });
35
37
  return /* @__PURE__ */ n(w, { children: [
36
38
  /* @__PURE__ */ n("div", { className: h, children: [
37
39
  /* @__PURE__ */ s(
38
- "label",
40
+ y,
39
41
  {
42
+ element: "label",
43
+ variant: z.labelMedium,
40
44
  "data-testid": `text-area-${t ?? r}-label`,
41
45
  htmlFor: t ?? r,
42
- className: l(`${a}-text-area__label`, {
43
- [`${a}-skeleton`]: d
46
+ className: l(`${e}-text-area__label`, {
47
+ [`${e}-skeleton`]: d
44
48
  }),
45
49
  children: m
46
50
  }
@@ -48,26 +52,26 @@ const z = I(
48
52
  /* @__PURE__ */ s(
49
53
  "textarea",
50
54
  {
51
- ...u,
52
- className: l(i, o, `${a}-text-area__input`, {
53
- [`${a}-skeleton`]: d
55
+ ...v,
56
+ className: l(i, o, `${e}-text-area__input`, {
57
+ [`${e}-skeleton`]: d
54
58
  }),
55
59
  id: t ?? r,
56
- rows: x,
57
- maxLength: c,
58
- name: p,
59
- ref: v,
60
+ rows: c,
61
+ maxLength: p,
62
+ name: x,
63
+ ref: N,
60
64
  "data-testid": `text-area-${t ?? r}-input`,
61
- disabled: e.disabled
65
+ disabled: a.disabled
62
66
  }
63
67
  ),
64
- /* @__PURE__ */ s(y, { icon: "Menu", className: `${i}-resizer__icon` })
68
+ /* @__PURE__ */ s(j, { icon: "Menu", className: `${i}-resizer__icon` })
65
69
  ] }),
66
- /* @__PURE__ */ s("div", { children: e.validation ?? /* @__PURE__ */ s("div", { className: `${a}-text-area__validation`, id: e.invalidId }) })
70
+ /* @__PURE__ */ s("div", { children: a.validation ?? /* @__PURE__ */ s("div", { className: `${e}-text-area__validation`, id: a.invalidId }) })
67
71
  ] });
68
72
  }
69
73
  );
70
- z.displayName = "TextArea";
74
+ C.displayName = "TextArea";
71
75
  export {
72
- z as default
76
+ C as default
73
77
  };
@@ -7,14 +7,14 @@ import _ from "../Icon/Icon.js";
7
7
  import T from "../IconButton/IconButton.js";
8
8
  import { ButtonVariants as $ } from "../Button/types.js";
9
9
  const x = d(
10
- ({ className: i, title: m, actionElement: a, actionAltText: s, closeButtonLabel: t, ...l }, n) => {
11
- const { className: r, ...c } = p(l, "Toast");
12
- return /* @__PURE__ */ e(h, { ...c, className: f(r, i), ref: n, children: [
10
+ ({ className: i, title: m, actionElement: a, actionAltText: s, closeButtonLabel: t, ...l }, c) => {
11
+ const { className: r, ...n } = p(l, "Toast");
12
+ return /* @__PURE__ */ e(h, { ...n, className: f(r, i), ref: c, children: [
13
13
  /* @__PURE__ */ e("div", { className: `${r}__content`, children: [
14
14
  /* @__PURE__ */ o(N, { children: m }),
15
15
  a && s && /* @__PURE__ */ o(u, { asChild: !0, altText: s, className: `${r}__action`, children: a })
16
16
  ] }),
17
- /* @__PURE__ */ o(C, { className: `${r}__close`, "aria-label": t, asChild: !0, children: /* @__PURE__ */ o(T, { variant: $.link, children: /* @__PURE__ */ o(_, { icon: "CloseX", title: t, color: "$white-100", "aria-hidden": !0 }) }) })
17
+ /* @__PURE__ */ o(C, { className: `${r}__close`, "aria-label": t, asChild: !0, children: /* @__PURE__ */ o(T, { variant: $.tertiary, children: /* @__PURE__ */ o(_, { icon: "CloseX", title: t, color: "$white-100", "aria-hidden": !0 }) }) })
18
18
  ] });
19
19
  }
20
20
  );