@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.
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.js +2 -2
- package/dist/assets/formatted/index.d.ts +0 -1
- package/dist/assets/formatted/index.js +30 -32
- package/dist/components/AddToCalendar/AddToCalendar.js +24 -25
- package/dist/components/Article/Article.js +17 -17
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +71 -53
- package/dist/components/Button/Button.stories.d.ts +7 -1
- package/dist/components/ComboBox/ComboBox.js +33 -30
- package/dist/components/ComposedModal/ComposedModal.js +33 -33
- package/dist/components/ComposedModal/ComposedModal.stories.d.ts +1 -0
- package/dist/components/Countdown/Countdown.js +90 -51
- package/dist/components/Countdown/Duration.d.ts +3 -1
- package/dist/components/Countdown/Duration.js +17 -9
- package/dist/components/Countdown/types.d.ts +2 -1
- package/dist/components/Countdown/types.js +1 -1
- package/dist/components/DescriptiveRadioButton/DescriptiveRadioButton.js +21 -21
- package/dist/components/Detail/Detail.d.ts +2 -0
- package/dist/components/Detail/Detail.js +26 -15
- package/dist/components/Detail/Detail.stories.d.ts +9 -2
- package/dist/components/Drawer/DrawerHeader.js +22 -20
- package/dist/components/ExitGateCard/ExitGateCard.js +29 -29
- package/dist/components/FavoritingTileButton/FavoritingTileButton.js +30 -31
- package/dist/components/Filter/Filter.js +36 -34
- package/dist/components/Filter/FilterHeader.d.ts +4 -0
- package/dist/components/Filter/FilterHeader.js +30 -22
- package/dist/components/Input/Input.js +43 -39
- package/dist/components/Input/Input.stories.d.ts +16 -0
- package/dist/components/Link/Link.js +11 -11
- package/dist/components/Link/Link.stories.d.ts +17 -1
- package/dist/components/Link/types.d.ts +9 -4
- package/dist/components/Link/types.js +3 -3
- package/dist/components/LinkBlock/LinkBlock.js +19 -11
- package/dist/components/Modal/Modal.d.ts +0 -4
- package/dist/components/Modal/Modal.js +6 -6
- package/dist/components/Navigation/NavigationItem/NavigationItem.js +31 -23
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +29 -29
- package/dist/components/Navigation/NavigationList/NavigationList.js +5 -5
- package/dist/components/ProgressIndicator/ProgressIndicator.js +22 -22
- package/dist/components/Search/Search.js +55 -53
- package/dist/components/Search/SearchResults/SearchResults.js +16 -16
- package/dist/components/Select/Select.d.ts +4 -0
- package/dist/components/Select/Select.js +51 -45
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Tabs/TabsContainer.js +1 -1
- package/dist/components/Tags/Tags.js +32 -30
- package/dist/components/Text/Text.js +17 -9
- package/dist/components/Text/types.d.ts +42 -1
- package/dist/components/Text/types.js +3 -3
- package/dist/components/Text/utils.js +40 -7
- package/dist/components/TextArea/TextArea.js +38 -34
- package/dist/components/Toast/Toast.js +4 -4
- package/dist/node_modules/ics/dist/index.js +2 -2
- package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/AccountPageHeader/AccountPageHeader.js +45 -28
- package/dist/patterns/BidSnapshot/BidMessage.d.ts +6 -1
- package/dist/patterns/BidSnapshot/BidMessage.js +14 -13
- package/dist/patterns/BidSnapshot/BidSnapshot.d.ts +7 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +84 -66
- package/dist/patterns/BidSnapshot/BidSnapshot.stories.d.ts +100 -0
- package/dist/patterns/CountryPicker/CountryPickerCountryList.js +5 -5
- package/dist/patterns/CountryPicker/CountryPickerModal.js +8 -8
- package/dist/patterns/CountryPicker/CountryPickerOption.js +22 -20
- package/dist/patterns/CountryPicker/CountryPickerTrigger.js +39 -38
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +52 -52
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +1 -0
- package/dist/patterns/FiltersInline/FilterButton.js +41 -25
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +50 -52
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +31 -31
- package/dist/patterns/HeroBanner/HeroBanner.js +21 -21
- package/dist/patterns/LanguageSelector/LanguageSelector.js +34 -34
- package/dist/patterns/ObjectTile/ObjectTile.js +57 -72
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +36 -0
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/patterns/SaleCard/SaleCard.js +37 -45
- package/dist/patterns/SaleCard/SaleCard.stories.d.ts +1 -1
- package/dist/patterns/SaleCard/SaleCardActions.js +9 -8
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +49 -49
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js +19 -12
- package/dist/patterns/Social/Social.js +20 -20
- package/dist/patterns/Subscribe/Subscribe.stories.d.ts +0 -1
- package/dist/patterns/TextBanner/TextBanner.js +12 -12
- package/dist/patterns/UserManagement/UserManagement.js +13 -13
- package/dist/patterns/ViewingDetails/ViewingDetails.d.ts +4 -0
- package/dist/patterns/ViewingDetails/ViewingDetails.js +36 -34
- package/dist/patterns/ViewingDetails/ViewingDetails.stories.d.ts +2 -0
- package/dist/patterns/ViewingDetails/ViewingDetailsMock.d.ts +2 -0
- package/dist/scss/_reset.scss +4 -0
- package/dist/scss/_type.scss +172 -65
- package/dist/scss/_vars.scss +92 -197
- package/dist/scss/_vars.scss.js +94 -199
- package/dist/scss/componentStyles.scss +178 -0
- package/dist/scss/components/Accordion/_accordion.scss +6 -4
- package/dist/scss/components/Breadcrumb/_breadcrumb.scss +1 -1
- package/dist/scss/components/Button/_button.scss +33 -7
- package/dist/scss/components/ComboBox/_combobox.scss +7 -5
- package/dist/scss/components/ComposedModal/_composedModal.scss +0 -4
- package/dist/scss/components/Countdown/_countdown.scss +8 -9
- package/dist/scss/components/Countdown/_duration.scss +0 -2
- package/dist/scss/components/DatePicker/_datePicker.scss +11 -10
- package/dist/scss/components/Detail/_detail.scss +15 -6
- package/dist/scss/components/Divider/_divider.scss +3 -3
- package/dist/scss/components/Drawer/_drawerHeader.scss +0 -7
- package/dist/scss/components/Dropdown/_dropdown.scss +2 -2
- package/dist/scss/components/FavoritingTileButton/_favoritingTileButton.scss +5 -0
- package/dist/scss/components/Filter/_filter.scss +23 -8
- package/dist/scss/components/Icon/_icon.stories.scss +1 -1
- package/dist/scss/components/IconButton/_iconButton.scss +3 -5
- package/dist/scss/components/Input/_input.scss +22 -14
- package/dist/scss/components/Link/_link.scss +13 -8
- package/dist/scss/components/LinkBlock/_linkBlock.scss +5 -1
- package/dist/scss/components/LinkList/_linkList.scss +8 -0
- package/dist/scss/components/Modal/_modal.scss +2 -2
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +33 -14
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +1 -1
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +2 -2
- package/dist/scss/components/NotificationBanner/_notificationBanner.scss +4 -10
- package/dist/scss/components/ProgressIndicator/_progressIndicator.scss +5 -0
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +5 -0
- package/dist/scss/components/Search/_search.scss +9 -10
- package/dist/scss/components/Search/_searchButton.scss +0 -1
- package/dist/scss/components/Select/_select.scss +8 -3
- package/dist/scss/components/Tabs/_tabs.scss +4 -5
- package/dist/scss/components/Tags/_tags.scss +0 -2
- package/dist/scss/components/TextArea/_textArea.scss +2 -4
- package/dist/scss/components/TextSymbol/_textSymbol.scss +2 -2
- package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +4 -0
- package/dist/scss/patterns/BidSnapshot/_bidSnapshot.scss +9 -10
- package/dist/scss/patterns/CountryPicker/_countryPickerModal.scss +4 -0
- package/dist/scss/patterns/CountryPicker/_countryPickerOption.scss +3 -0
- package/dist/scss/patterns/CountryPicker/_countryPickerTrigger.scss +4 -7
- package/dist/scss/patterns/DetailList/_detailList.scss +4 -0
- package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +6 -8
- package/dist/scss/patterns/FilterMenu/_filterMenu.scss +2 -1
- package/dist/scss/patterns/FiltersInline/_filterButton.scss +11 -2
- package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +1 -9
- package/dist/scss/patterns/FiltersInline/_filtersInline.scss +5 -0
- package/dist/scss/patterns/HeroBanner/_heroBanner.scss +13 -6
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +13 -12
- package/dist/scss/patterns/PhoneNumberInput/_phoneNumberInput.scss +9 -2
- package/dist/scss/patterns/SaleCard/_saleCard.scss +13 -22
- package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +16 -3
- package/dist/scss/patterns/Social/_social.scss +4 -1
- package/dist/scss/patterns/Subscribe/_subscribe.scss +3 -3
- package/dist/scss/patterns/TextBanner/_textBanner.scss +9 -3
- package/dist/scss/patterns/ViewingDetails/_viewingDetails.scss +15 -3
- package/dist/scss/site-furniture/Footer/_footer.scss +8 -2
- package/dist/scss/site-furniture/Header/_header.scss +8 -4
- package/dist/site-furniture/Footer/Footer.js +4 -4
- package/package.json +4 -3
- package/dist/assets/formatted/LiveNow.d.ts +0 -9
- package/dist/assets/formatted/LiveNow.js +0 -63
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/* @__PURE__ */ o
|
|
18
|
-
|
|
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:
|
|
21
|
-
onClose:
|
|
22
|
-
drawerOpenSide:
|
|
22
|
+
baseClassName: o,
|
|
23
|
+
onClose: t,
|
|
24
|
+
drawerOpenSide: i,
|
|
23
25
|
bookendSide: "right"
|
|
24
26
|
}
|
|
25
27
|
)
|
|
26
28
|
] }),
|
|
27
|
-
|
|
29
|
+
e && /* @__PURE__ */ r("div", { className: `${o}__hr` })
|
|
28
30
|
] });
|
|
29
31
|
}
|
|
30
32
|
);
|
|
31
|
-
|
|
33
|
+
u.displayName = "DrawerHeader";
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
u as default
|
|
34
36
|
};
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
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
|
|
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
|
|
9
|
-
import
|
|
10
|
-
import { TextVariants as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
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:
|
|
16
|
-
label:
|
|
15
|
+
imageSrc: r,
|
|
16
|
+
label: n,
|
|
17
17
|
header: m,
|
|
18
|
-
description:
|
|
19
|
-
linkLabel:
|
|
20
|
-
linkHref:
|
|
21
|
-
linkElement:
|
|
18
|
+
description: o,
|
|
19
|
+
linkLabel: s,
|
|
20
|
+
linkHref: l,
|
|
21
|
+
linkElement: i = v,
|
|
22
22
|
variant: _ = E.secondary,
|
|
23
|
-
altText:
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
const { className: t, ...x } =
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
34
|
-
alt:
|
|
33
|
+
src: r,
|
|
34
|
+
alt: u,
|
|
35
35
|
className: `${t}__desktop_image`
|
|
36
36
|
}
|
|
37
37
|
) : null,
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
m ? /* @__PURE__ */ a
|
|
41
|
-
|
|
42
|
-
(
|
|
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
|
-
|
|
47
|
+
j.displayName = "ExitGateCard";
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
j as default
|
|
50
50
|
};
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
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:
|
|
10
|
-
actionAddText:
|
|
11
|
-
actionRemoveText:
|
|
12
|
-
isLotInList:
|
|
13
|
-
listTitle:
|
|
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:
|
|
16
|
-
...
|
|
17
|
-
},
|
|
18
|
-
const { className:
|
|
19
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
23
|
-
className:
|
|
24
|
-
[`${
|
|
21
|
+
...p,
|
|
22
|
+
className: h(r, n, {
|
|
23
|
+
[`${r}--lot-in-list`]: e
|
|
25
24
|
}),
|
|
26
|
-
onClick:
|
|
27
|
-
ref:
|
|
28
|
-
id:
|
|
29
|
-
"aria-label": `${
|
|
30
|
-
"aria-pressed":
|
|
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__ */
|
|
34
|
-
/* @__PURE__ */ o
|
|
35
|
-
/* @__PURE__ */ o
|
|
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
|
|
36
|
+
/* @__PURE__ */ a(o, { className: `${r}__text--number`, children: c })
|
|
38
37
|
]
|
|
39
38
|
}
|
|
40
39
|
);
|
|
41
40
|
}
|
|
42
41
|
);
|
|
43
|
-
|
|
42
|
+
_.displayName = "FavoritingTileButton";
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
_ as default
|
|
46
45
|
};
|
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
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
|
|
8
|
-
import
|
|
9
|
-
|
|
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:
|
|
13
|
-
name:
|
|
14
|
-
viewAllLimit:
|
|
15
|
-
isViewingAll:
|
|
14
|
+
children: _,
|
|
15
|
+
name: i,
|
|
16
|
+
viewAllLimit: l = 10,
|
|
17
|
+
isViewingAll: s = !1,
|
|
16
18
|
isHidden: u = !1,
|
|
17
|
-
setViewAllFilter:
|
|
18
|
-
viewAllLabel:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const [
|
|
22
|
-
(
|
|
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__ */
|
|
26
|
+
return /* @__PURE__ */ o(
|
|
25
27
|
"div",
|
|
26
28
|
{
|
|
27
|
-
...
|
|
28
|
-
className:
|
|
29
|
-
[`${
|
|
30
|
-
"is-closing":
|
|
29
|
+
...y,
|
|
30
|
+
className: R(e, h, {
|
|
31
|
+
[`${I}-filter--hidden`]: u,
|
|
32
|
+
"is-closing": v
|
|
31
33
|
}),
|
|
32
|
-
...
|
|
33
|
-
ref:
|
|
34
|
+
...m,
|
|
35
|
+
ref: N,
|
|
34
36
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ o("fieldset", { name: i, className: `${e}__fieldset`, children: [
|
|
38
|
+
g,
|
|
39
|
+
/* @__PURE__ */ r("div", { className: `${e}__filters`, children: F })
|
|
38
40
|
] }),
|
|
39
|
-
|
|
41
|
+
t.length > l && !s ? /* @__PURE__ */ r("div", { className: `${e}__view-all`, children: /* @__PURE__ */ o(
|
|
40
42
|
k,
|
|
41
43
|
{
|
|
42
|
-
className: `${e}__view-
|
|
43
|
-
variant:
|
|
44
|
+
className: `${e}__view-all__button`,
|
|
45
|
+
variant: M.tertiary,
|
|
44
46
|
onClick: () => {
|
|
45
|
-
|
|
47
|
+
n?.(i);
|
|
46
48
|
},
|
|
47
49
|
children: [
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import { TextVariants as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { ButtonVariants as
|
|
9
|
-
import
|
|
10
|
-
const g =
|
|
11
|
-
({
|
|
12
|
-
|
|
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
|
-
|
|
22
|
+
c?.(null), a?.(!1);
|
|
15
23
|
}, 300);
|
|
16
24
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
|
|
25
|
+
return /* @__PURE__ */ o("div", { ...p, className: x(r, i), ...t, ref: f, children: [
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
l,
|
|
20
28
|
{
|
|
21
|
-
variant:
|
|
22
|
-
className: `${
|
|
23
|
-
element: (
|
|
29
|
+
variant: m.headingSmall,
|
|
30
|
+
className: `${r}__heading`,
|
|
31
|
+
element: (h) => /* @__PURE__ */ e("legend", { ...h, children: n })
|
|
24
32
|
}
|
|
25
33
|
),
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
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
|
|
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:
|
|
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:
|
|
15
|
+
id: a,
|
|
14
16
|
inline: b,
|
|
15
|
-
invalid:
|
|
16
|
-
invalidText:
|
|
17
|
+
invalid: f,
|
|
18
|
+
invalidText: x,
|
|
17
19
|
labelText: v,
|
|
18
|
-
onChange:
|
|
19
|
-
onClick:
|
|
20
|
+
onChange: y,
|
|
21
|
+
onClick: N,
|
|
20
22
|
placeholder: I,
|
|
21
23
|
readOnly: d,
|
|
22
24
|
size: T = "md",
|
|
23
|
-
type:
|
|
25
|
+
type: m = "text",
|
|
24
26
|
value: C,
|
|
25
27
|
warn: P,
|
|
26
28
|
warnText: j,
|
|
27
|
-
isSkeletonLoading:
|
|
29
|
+
isSkeletonLoading: s,
|
|
28
30
|
...o
|
|
29
31
|
}, k) => {
|
|
30
|
-
const
|
|
32
|
+
const e = F({
|
|
31
33
|
disabled: h,
|
|
32
|
-
id:
|
|
33
|
-
invalid:
|
|
34
|
-
invalidText:
|
|
34
|
+
id: a,
|
|
35
|
+
invalid: f,
|
|
36
|
+
invalidText: x,
|
|
35
37
|
readOnly: d,
|
|
36
|
-
type:
|
|
38
|
+
type: m,
|
|
37
39
|
warn: P,
|
|
38
40
|
warnText: j
|
|
39
|
-
}), R =
|
|
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`]:
|
|
43
|
-
[`${t}-input--invalid`]:
|
|
44
|
-
[`${t}-input--warn`]:
|
|
45
|
-
[`${
|
|
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
|
-
}),
|
|
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(
|
|
61
|
-
className: i &&
|
|
62
|
-
"data-testid":
|
|
63
|
-
disabled:
|
|
64
|
-
id:
|
|
65
|
-
onChange:
|
|
66
|
-
onClick:
|
|
67
|
-
placeholder:
|
|
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:
|
|
71
|
-
...
|
|
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
|
-
|
|
78
|
+
V,
|
|
77
79
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
className:
|
|
80
|
+
element: "label",
|
|
81
|
+
variant: M.labelMedium,
|
|
82
|
+
className: r(`${t}-input__label`, {
|
|
81
83
|
[`${t}-input__label--hidden`]: w,
|
|
82
|
-
[`${t}-skeleton`]:
|
|
84
|
+
[`${t}-skeleton`]: s
|
|
83
85
|
}),
|
|
86
|
+
"data-testid": `label-${a}`,
|
|
87
|
+
htmlFor: a,
|
|
84
88
|
children: v
|
|
85
89
|
}
|
|
86
90
|
),
|
|
87
|
-
i &&
|
|
88
|
-
l === "start" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${
|
|
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-${
|
|
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
|
-
|
|
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
|
|
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
|
|
6
|
-
import { LinkVariants as
|
|
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
|
|
9
|
-
({ children:
|
|
10
|
-
const { className: i, ...l } = k(
|
|
11
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
20
|
-
children: /* @__PURE__ */
|
|
19
|
+
...e,
|
|
20
|
+
children: /* @__PURE__ */ m(g, { variant: o, children: s })
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
|
|
25
|
+
u.displayName = "Link";
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
u as default
|
|
28
28
|
};
|
|
@@ -17,7 +17,7 @@ export declare const Playground: {
|
|
|
17
17
|
};
|
|
18
18
|
argTypes: {
|
|
19
19
|
variant: {
|
|
20
|
-
options:
|
|
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
|
|
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
|
-
/**
|
|
6
|
+
/** @deprecated Use linkLarge instead */
|
|
6
7
|
snwFlyoutLink = "snwFlyoutLink",
|
|
7
|
-
/**
|
|
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
|
}
|