@phillips/seldon 1.212.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/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 -29
- 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/_virtual/index4.js
CHANGED
package/dist/_virtual/index5.js
CHANGED
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as a, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useState as h } from "react";
|
|
3
3
|
import { getCommonProps as g } from "../../utils/index.js";
|
|
4
4
|
import u from "../../node_modules/classnames/index.js";
|
|
5
|
-
import
|
|
6
|
-
import O from "
|
|
7
|
-
import
|
|
8
|
-
import P from "../Icon/Icon.js";
|
|
5
|
+
import N from "../Text/Text.js";
|
|
6
|
+
import { Root as O, Trigger as I, Portal as T, Content as x, Item as A } from "../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
|
|
7
|
+
import L from "../Icon/Icon.js";
|
|
9
8
|
import "../Link/types.js";
|
|
10
|
-
import
|
|
11
|
-
import { generateGoogleCalendarLink as
|
|
12
|
-
import
|
|
13
|
-
const G =
|
|
14
|
-
({ className: r, event: o, label: s = "Add to calendar", linkElement: d =
|
|
15
|
-
const { className: l, ...
|
|
16
|
-
|
|
9
|
+
import P from "../Link/Link.js";
|
|
10
|
+
import { generateGoogleCalendarLink as $, generateOutlookOnlineLink as w, generateYahooCalendarLink as R, generateCalendarFile as S } from "./calendarLinks.js";
|
|
11
|
+
import j from "../IconButton/IconButton.js";
|
|
12
|
+
const G = b(
|
|
13
|
+
({ className: r, event: o, label: s = "Add to calendar", linkElement: d = P, ...n }, c) => {
|
|
14
|
+
const { className: l, ...m } = g(n, "AddToCalendar"), [t, f] = h(!1), k = (e, i) => {
|
|
15
|
+
e === "file" ? S(o) : e === "link" && i && window.open(i, "_blank");
|
|
17
16
|
}, p = [
|
|
18
17
|
{ label: "iCalendar", action: "file" },
|
|
19
|
-
{ label: "Google Calendar", action: "link", link:
|
|
18
|
+
{ label: "Google Calendar", action: "link", link: $(o) },
|
|
20
19
|
{ label: "Outlook", action: "file" },
|
|
21
|
-
{ label: "Outlook Online", action: "link", link:
|
|
22
|
-
{ label: "Yahoo Calendar", action: "link", link:
|
|
20
|
+
{ label: "Outlook Online", action: "link", link: w(o) },
|
|
21
|
+
{ label: "Yahoo Calendar", action: "link", link: R(o) }
|
|
23
22
|
];
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
23
|
+
return /* @__PURE__ */ a("div", { ...m, className: u(l, r), ...n, ref: c, children: /* @__PURE__ */ C(O, { open: t, onOpenChange: f, children: [
|
|
24
|
+
/* @__PURE__ */ a(I, { asChild: !0, children: /* @__PURE__ */ a(j, { children: /* @__PURE__ */ a(L, { icon: t ? "CloseX" : "Calendar", title: s }) }) }),
|
|
25
|
+
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
26
|
+
x,
|
|
28
27
|
{
|
|
29
28
|
sideOffset: 5,
|
|
30
29
|
align: "start",
|
|
@@ -32,14 +31,14 @@ const G = C(
|
|
|
32
31
|
"data-side": "bottom",
|
|
33
32
|
avoidCollisions: !1,
|
|
34
33
|
className: `${l}-atcb-list`,
|
|
35
|
-
children: p.map((
|
|
36
|
-
|
|
34
|
+
children: p.map((e) => /* @__PURE__ */ a(
|
|
35
|
+
A,
|
|
37
36
|
{
|
|
38
37
|
className: `${l}-atcb-item`,
|
|
39
|
-
onSelect: () => k(
|
|
40
|
-
children:
|
|
38
|
+
onSelect: () => k(e.action, e.link),
|
|
39
|
+
children: e.action === "link" ? /* @__PURE__ */ a(d, { className: `${l}-atcb-item-link`, href: e.link, children: e.label }) : /* @__PURE__ */ a("button", { className: `${l}-atcb-item-link`, children: /* @__PURE__ */ a(N, { children: e.label }) })
|
|
41
40
|
},
|
|
42
|
-
|
|
41
|
+
e.label
|
|
43
42
|
))
|
|
44
43
|
}
|
|
45
44
|
) })
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N } from "react";
|
|
3
3
|
import { getCommonProps as h } from "../../utils/index.js";
|
|
4
4
|
import x from "../../node_modules/classnames/index.js";
|
|
5
5
|
import $ from "../SeldonImage/SeldonImage.js";
|
|
6
|
-
import { TextVariants as
|
|
7
|
-
import
|
|
8
|
-
import "../Link/types.js";
|
|
6
|
+
import { TextVariants as c } from "../Text/types.js";
|
|
7
|
+
import t from "../Text/Text.js";
|
|
8
|
+
import { LinkVariants as k } from "../Link/types.js";
|
|
9
9
|
import v from "../Link/Link.js";
|
|
10
|
-
const
|
|
11
|
-
({ className:
|
|
12
|
-
const { className:
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
a ? /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
m ? /* @__PURE__ */
|
|
19
|
-
|
|
10
|
+
const A = N(
|
|
11
|
+
({ className: d, imageSrc: n, label: a, header: r, description: m, linkElement: f = v, linkLabel: i, linkHref: p, ...o }, u) => {
|
|
12
|
+
const { className: e, ..._ } = h(o, "Article");
|
|
13
|
+
return /* @__PURE__ */ s("article", { ..._, className: x(e, d), ...o, ref: u, children: [
|
|
14
|
+
n ? /* @__PURE__ */ l($, { aspectRatio: "16/9", src: n, alt: "bull" }) : null,
|
|
15
|
+
/* @__PURE__ */ s("div", { className: `${e}__content`, children: [
|
|
16
|
+
a ? /* @__PURE__ */ l(t, { variant: c.labelSmall, className: `${e}__content-label`, children: a }) : null,
|
|
17
|
+
r ? /* @__PURE__ */ l(t, { variant: c.headingMedium, className: `${e}__content-title`, children: r }) : null,
|
|
18
|
+
m ? /* @__PURE__ */ l(t, { className: `${e}__content-description`, element: "p", children: m }) : null,
|
|
19
|
+
i ? /* @__PURE__ */ l(f, { href: p, variant: k.linkMedium, className: `${e}__content-link`, children: i }) : null
|
|
20
20
|
] })
|
|
21
21
|
] });
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
|
-
|
|
24
|
+
A.displayName = "Article";
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
A as default
|
|
27
27
|
};
|
|
@@ -40,6 +40,10 @@ export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement | HT
|
|
|
40
40
|
* Boolean to specify whether we need to display skeleton loader
|
|
41
41
|
*/
|
|
42
42
|
isSkeletonLoading?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* This is only used when a button is rendered as a link. It controls the size of the link.
|
|
45
|
+
*/
|
|
46
|
+
linkSize?: 'sm' | 'md' | 'lg';
|
|
43
47
|
}
|
|
44
48
|
/**
|
|
45
49
|
* ## Overview
|
|
@@ -1,78 +1,96 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import { ButtonVariants as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
|
|
1
|
+
import { jsxs as P, Fragment as B, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import C from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as V, px as j } from "../../utils/index.js";
|
|
4
|
+
import { ButtonVariants as s } from "./types.js";
|
|
5
|
+
import { forwardRef as v, useState as w } from "react";
|
|
6
|
+
import { LinkVariants as l } from "../Link/types.js";
|
|
7
|
+
import H from "../Link/Link.js";
|
|
8
|
+
const g = v(
|
|
7
9
|
({
|
|
8
|
-
variant:
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
11
|
-
isIconLast:
|
|
12
|
-
type:
|
|
13
|
-
isDisabled:
|
|
14
|
-
href:
|
|
15
|
-
target:
|
|
16
|
-
prefetch:
|
|
17
|
-
isSkeletonLoading:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
variant: t = s.primary,
|
|
11
|
+
children: k,
|
|
12
|
+
className: c,
|
|
13
|
+
isIconLast: u = !1,
|
|
14
|
+
type: N = "button",
|
|
15
|
+
isDisabled: a = !1,
|
|
16
|
+
href: o,
|
|
17
|
+
target: f,
|
|
18
|
+
prefetch: d = "none",
|
|
19
|
+
isSkeletonLoading: i,
|
|
20
|
+
linkSize: y = "md",
|
|
21
|
+
...m
|
|
22
|
+
}, p) => {
|
|
23
|
+
const { className: e, ...$ } = V(m, "Button"), [L, M] = w(!1);
|
|
24
|
+
if (o || t === s.link) {
|
|
25
|
+
const b = () => /* @__PURE__ */ n(B, { children: /* @__PURE__ */ n("link", { "data-testid": "prefetch-link", rel: "prefetch", href: o }) });
|
|
26
|
+
let r = l.linkMedium;
|
|
27
|
+
switch (y) {
|
|
28
|
+
case "lg":
|
|
29
|
+
r = l.linkLarge;
|
|
30
|
+
break;
|
|
31
|
+
case "md":
|
|
32
|
+
r = l.linkMedium;
|
|
33
|
+
break;
|
|
34
|
+
case "sm":
|
|
35
|
+
r = l.linkSmall;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ P(B, { children: [
|
|
39
|
+
/* @__PURE__ */ n(
|
|
40
|
+
H,
|
|
26
41
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
...$,
|
|
43
|
+
variant: r,
|
|
44
|
+
ref: p,
|
|
45
|
+
href: o,
|
|
46
|
+
className: C(
|
|
31
47
|
`${e}`,
|
|
32
|
-
`${e}--${s}
|
|
48
|
+
{ [`${e}--${t}`]: t !== s.link },
|
|
49
|
+
{ [`${e}--link`]: t === s.link },
|
|
33
50
|
{
|
|
34
|
-
[`${e}--icon-last`]:
|
|
51
|
+
[`${e}--icon-last`]: u
|
|
35
52
|
},
|
|
36
|
-
|
|
53
|
+
c
|
|
37
54
|
),
|
|
38
|
-
target:
|
|
39
|
-
rel:
|
|
55
|
+
target: f,
|
|
56
|
+
rel: f === "_blank" ? "noopener noreferrer" : void 0,
|
|
40
57
|
onMouseOver: () => {
|
|
41
|
-
|
|
58
|
+
a || M(!0);
|
|
42
59
|
},
|
|
43
|
-
onClick: (
|
|
44
|
-
|
|
60
|
+
onClick: (x) => {
|
|
61
|
+
a ? x.preventDefault() : m.onClick?.(x);
|
|
45
62
|
},
|
|
46
|
-
children:
|
|
63
|
+
children: k
|
|
47
64
|
}
|
|
48
65
|
),
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
d === "intent" && o && L && /* @__PURE__ */ n(b, {}),
|
|
67
|
+
d === "render" && o && /* @__PURE__ */ n(b, {})
|
|
51
68
|
] });
|
|
52
69
|
} else
|
|
53
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ n(
|
|
54
71
|
"button",
|
|
55
72
|
{
|
|
56
|
-
|
|
57
|
-
ref:
|
|
58
|
-
type:
|
|
59
|
-
|
|
73
|
+
...$,
|
|
74
|
+
ref: p,
|
|
75
|
+
type: N,
|
|
76
|
+
"aria-busy": i,
|
|
77
|
+
className: C(
|
|
60
78
|
`${e}`,
|
|
61
|
-
`${e}--${
|
|
79
|
+
`${e}--${t}`,
|
|
62
80
|
{
|
|
63
|
-
[`${e}--icon-last`]:
|
|
64
|
-
[`${
|
|
81
|
+
[`${e}--icon-last`]: u,
|
|
82
|
+
[`${j}-skeleton`]: i
|
|
65
83
|
},
|
|
66
|
-
|
|
84
|
+
c
|
|
67
85
|
),
|
|
68
|
-
disabled:
|
|
69
|
-
...
|
|
70
|
-
children:
|
|
86
|
+
disabled: i || a,
|
|
87
|
+
...m,
|
|
88
|
+
children: k
|
|
71
89
|
}
|
|
72
90
|
);
|
|
73
91
|
}
|
|
74
92
|
);
|
|
75
|
-
|
|
93
|
+
g.displayName = "Button";
|
|
76
94
|
export {
|
|
77
|
-
|
|
95
|
+
g as default
|
|
78
96
|
};
|
|
@@ -10,12 +10,19 @@ declare const meta: {
|
|
|
10
10
|
type: "select";
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
+
linkSize: {
|
|
14
|
+
options: string[];
|
|
15
|
+
control: {
|
|
16
|
+
type: "select";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
13
19
|
isIconLast: {
|
|
14
20
|
control: "boolean";
|
|
15
21
|
};
|
|
16
22
|
};
|
|
17
23
|
};
|
|
18
24
|
export default meta;
|
|
25
|
+
export declare const Default: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
26
|
export declare const ButtonDisabled: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
27
|
export declare const ButtonWithIcon: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
28
|
export declare const ButtonWithIconDisabled: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,7 +30,6 @@ export declare const ButtonAsLink: {
|
|
|
23
30
|
(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
24
31
|
args: {
|
|
25
32
|
variant: ButtonVariants;
|
|
26
|
-
size: string;
|
|
27
33
|
};
|
|
28
34
|
};
|
|
29
35
|
export declare const ButtonAsLinkWithPrefetch: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as T, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Root as ht, Trigger as _t, Portal as vt, Content as
|
|
2
|
+
import { Root as ht, Trigger as _t, Portal as vt, Content as bt } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
3
|
import d from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { Command as
|
|
5
|
-
import Nt, { useState as B, useCallback as g, useRef as
|
|
4
|
+
import { Command as Ct, CommandInput as yt, CommandList as $t, CommandGroup as wt, CommandItem as gt } from "../../node_modules/cmdk/dist/index.js";
|
|
5
|
+
import Nt, { useState as B, useCallback as g, useRef as x, useMemo as k } from "react";
|
|
6
6
|
import { useOnClickOutside as It } from "../../node_modules/usehooks-ts/dist/index.js";
|
|
7
7
|
import "../../assets/formatted/AccountActive.js";
|
|
8
8
|
import "../../assets/formatted/Account.js";
|
|
@@ -33,7 +33,7 @@ import Tt from "../../assets/formatted/ChevronDown.js";
|
|
|
33
33
|
import "../../assets/formatted/ChevronLeft.js";
|
|
34
34
|
import "../../assets/formatted/ChevronRight.js";
|
|
35
35
|
import "../../assets/formatted/ChevronUp.js";
|
|
36
|
-
import
|
|
36
|
+
import xt from "../../assets/formatted/CloseX.js";
|
|
37
37
|
import "../../assets/formatted/ConditionReport.js";
|
|
38
38
|
import "../../assets/formatted/Delete.js";
|
|
39
39
|
import "../../assets/formatted/Download.js";
|
|
@@ -84,11 +84,13 @@ import "../../assets/formatted/VolumeMaximum.js";
|
|
|
84
84
|
import "../../assets/formatted/VolumeMid.js";
|
|
85
85
|
import "../../assets/formatted/VolumeMinimum.js";
|
|
86
86
|
import "../../assets/formatted/WeChat.js";
|
|
87
|
-
import { getCommonProps as
|
|
87
|
+
import { getCommonProps as kt, useNormalizedInputProps as Lt } from "../../utils/index.js";
|
|
88
88
|
import U from "../IconButton/IconButton.js";
|
|
89
89
|
import { ButtonVariants as W } from "../Button/types.js";
|
|
90
90
|
import { usePrevious as Ot } from "../../utils/usePrevious.js";
|
|
91
|
-
|
|
91
|
+
import { TextVariants as Vt } from "../Text/types.js";
|
|
92
|
+
import Dt from "../Text/Text.js";
|
|
93
|
+
const Mt = Nt.forwardRef(function({
|
|
92
94
|
options: n = [],
|
|
93
95
|
className: X,
|
|
94
96
|
id: s,
|
|
@@ -110,19 +112,19 @@ const Dt = Nt.forwardRef(function({
|
|
|
110
112
|
invalidText: it,
|
|
111
113
|
countOfCharsBeforeDropdown: j = 0,
|
|
112
114
|
...at
|
|
113
|
-
},
|
|
114
|
-
const { className: e, ...lt } =
|
|
115
|
+
}, V) {
|
|
116
|
+
const { className: e, ...lt } = kt({ id: s }, "ComboBox"), st = Tt, nt = xt, q = Lt({
|
|
115
117
|
id: s,
|
|
116
118
|
invalid: N,
|
|
117
119
|
invalidText: it,
|
|
118
120
|
type: "text"
|
|
119
|
-
}), [f, z] = B(!1), [mt, ct] = B(""), G = Ot(p),
|
|
121
|
+
}), [f, z] = B(!1), [mt, ct] = B(""), G = Ot(p), D = g((t) => t.label || t.value, []), [o, b] = B(() => {
|
|
120
122
|
if (p !== void 0) {
|
|
121
123
|
const t = n.find((r) => r.value === p);
|
|
122
|
-
return t ? t.displayValue ||
|
|
124
|
+
return t ? t.displayValue || D(t) : "";
|
|
123
125
|
}
|
|
124
126
|
return "";
|
|
125
|
-
}),
|
|
127
|
+
}), C = x(null), y = x(null), $ = x(!1), M = x(null), m = g((t) => D(t), [D]), h = p !== void 0, R = h ? p : mt, a = k(() => n.find((t) => t.value === R) || null, [n, R]), _ = k(() => a ? a.displayValue || m(a) : "", [a, m]), c = k(() => {
|
|
126
128
|
if (!o || a && o === _)
|
|
127
129
|
return n;
|
|
128
130
|
const t = o.toLowerCase().trim();
|
|
@@ -146,20 +148,20 @@ const Dt = Nt.forwardRef(function({
|
|
|
146
148
|
(t) => {
|
|
147
149
|
h || ct(t.value);
|
|
148
150
|
const r = t.displayValue || m(t);
|
|
149
|
-
|
|
151
|
+
b(r), u && u(t.value, t), l(!1), $.current = !0, requestAnimationFrame(() => {
|
|
150
152
|
$.current = !1;
|
|
151
153
|
});
|
|
152
154
|
},
|
|
153
155
|
[h, u, l, m]
|
|
154
156
|
), pt = (t) => {
|
|
155
|
-
l(!1), $.current = !0, t.preventDefault(), t.stopPropagation(), u && h && u("", null),
|
|
157
|
+
l(!1), $.current = !0, t.preventDefault(), t.stopPropagation(), u && h && u("", null), b(""), y.current?.focus(), requestAnimationFrame(() => {
|
|
156
158
|
$.current = !1;
|
|
157
159
|
});
|
|
158
160
|
}, ut = () => {
|
|
159
161
|
z(!f), y.current?.focus();
|
|
160
162
|
}, ft = (t) => {
|
|
161
|
-
|
|
162
|
-
}, K =
|
|
163
|
+
b(t), t !== "" && c.length > 0 && l(!0, t);
|
|
164
|
+
}, K = k(() => {
|
|
163
165
|
if (h) {
|
|
164
166
|
if (p !== G)
|
|
165
167
|
return a ? _ : o;
|
|
@@ -173,9 +175,9 @@ const Dt = Nt.forwardRef(function({
|
|
|
173
175
|
}, [h, o, p, G, a, _]), E = (t) => {
|
|
174
176
|
if (a) {
|
|
175
177
|
const r = _;
|
|
176
|
-
r !== K && !t &&
|
|
178
|
+
r !== K && !t && b(r);
|
|
177
179
|
} else
|
|
178
|
-
|
|
180
|
+
b("");
|
|
179
181
|
}, F = g(() => {
|
|
180
182
|
const t = n.filter((r) => {
|
|
181
183
|
const w = m(r).toLowerCase(), P = r.value.toLowerCase(), A = r.displayValue?.toLowerCase(), v = o.toLowerCase();
|
|
@@ -183,9 +185,9 @@ const Dt = Nt.forwardRef(function({
|
|
|
183
185
|
});
|
|
184
186
|
t.length === 1 && I(t[0]);
|
|
185
187
|
}, [o, n, I, m]);
|
|
186
|
-
return It(
|
|
187
|
-
t.target.closest(`.${e}__item`) || t.target.closest(`.${e}__content`) ||
|
|
188
|
-
}), /* @__PURE__ */ T("div", { ref:
|
|
188
|
+
return It(C, (t) => {
|
|
189
|
+
t.target.closest(`.${e}__item`) || t.target.closest(`.${e}__content`) || C.current?.contains(t.target) || t.target === C.current || (F(), E(), l(!1));
|
|
190
|
+
}), /* @__PURE__ */ T("div", { ref: V, className: d(e, X), id: s, ...lt, ...at, children: [
|
|
189
191
|
L && /* @__PURE__ */ i(
|
|
190
192
|
"input",
|
|
191
193
|
{
|
|
@@ -194,14 +196,16 @@ const Dt = Nt.forwardRef(function({
|
|
|
194
196
|
id: L,
|
|
195
197
|
value: R || "",
|
|
196
198
|
ref: (t) => {
|
|
197
|
-
typeof
|
|
199
|
+
typeof V == "function" && t && V(t);
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
),
|
|
201
|
-
/* @__PURE__ */ T("div", { ref:
|
|
203
|
+
/* @__PURE__ */ T("div", { ref: C, className: `${e}__wrapper`, children: [
|
|
202
204
|
/* @__PURE__ */ i(
|
|
203
|
-
|
|
205
|
+
Dt,
|
|
204
206
|
{
|
|
207
|
+
element: "label",
|
|
208
|
+
variant: Vt.labelMedium,
|
|
205
209
|
htmlFor: `${s}-input`,
|
|
206
210
|
className: d(`${e}__label`, {
|
|
207
211
|
[`${e}__label--hidden`]: et,
|
|
@@ -212,7 +216,7 @@ const Dt = Nt.forwardRef(function({
|
|
|
212
216
|
}
|
|
213
217
|
),
|
|
214
218
|
/* @__PURE__ */ i(
|
|
215
|
-
|
|
219
|
+
Ct,
|
|
216
220
|
{
|
|
217
221
|
loop: !0,
|
|
218
222
|
onKeyDown: (t) => {
|
|
@@ -303,7 +307,7 @@ const Dt = Nt.forwardRef(function({
|
|
|
303
307
|
}
|
|
304
308
|
) }),
|
|
305
309
|
f && /* @__PURE__ */ i(vt, { container: rt?.current || document.body, children: /* @__PURE__ */ i(
|
|
306
|
-
|
|
310
|
+
bt,
|
|
307
311
|
{
|
|
308
312
|
className: `${e}__content`,
|
|
309
313
|
"aria-label": tt,
|
|
@@ -315,7 +319,7 @@ const Dt = Nt.forwardRef(function({
|
|
|
315
319
|
document.activeElement !== y.current && y.current?.focus();
|
|
316
320
|
},
|
|
317
321
|
style: {
|
|
318
|
-
width:
|
|
322
|
+
width: C.current?.offsetWidth || "100%"
|
|
319
323
|
},
|
|
320
324
|
children: /* @__PURE__ */ i($t, { className: `${e}__list`, children: c.length > 0 ? /* @__PURE__ */ i(wt, { className: `${e}__group`, children: c.map((t) => /* @__PURE__ */ i(
|
|
321
325
|
gt,
|
|
@@ -335,11 +339,11 @@ const Dt = Nt.forwardRef(function({
|
|
|
335
339
|
] })
|
|
336
340
|
}
|
|
337
341
|
),
|
|
338
|
-
q.validation ? q.validation : /* @__PURE__ */ i("p", { className: d(`${e}
|
|
342
|
+
q.validation ? q.validation : /* @__PURE__ */ i("p", { className: d(`${e}__empty-validation`), children: " " })
|
|
339
343
|
] })
|
|
340
344
|
] });
|
|
341
345
|
});
|
|
342
|
-
|
|
346
|
+
Mt.displayName = "ComboBox";
|
|
343
347
|
export {
|
|
344
|
-
|
|
348
|
+
Mt as default
|
|
345
349
|
};
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { jsxs as o, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as o, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import h from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { forwardRef as x } from "react";
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import
|
|
4
|
+
import { getCommonProps as $, noOp as b } from "../../utils/index.js";
|
|
5
|
+
import g from "../Divider/Divider.js";
|
|
6
6
|
import y from "../Modal/Modal.js";
|
|
7
|
-
import { TextVariants as
|
|
8
|
-
import
|
|
7
|
+
import { TextVariants as C } from "../Text/types.js";
|
|
8
|
+
import M from "../Text/Text.js";
|
|
9
9
|
const j = x(
|
|
10
10
|
({
|
|
11
|
-
children:
|
|
12
|
-
className:
|
|
13
|
-
overlayClassName:
|
|
14
|
-
isOpen:
|
|
15
|
-
onClose:
|
|
16
|
-
maxHeightValue:
|
|
17
|
-
title:
|
|
11
|
+
children: i,
|
|
12
|
+
className: t,
|
|
13
|
+
overlayClassName: P,
|
|
14
|
+
isOpen: c = !1,
|
|
15
|
+
onClose: p = b,
|
|
16
|
+
maxHeightValue: f = "60vh",
|
|
17
|
+
title: N,
|
|
18
18
|
footerContent: m,
|
|
19
|
-
secondaryButton:
|
|
20
|
-
primaryButton:
|
|
21
|
-
id:
|
|
19
|
+
secondaryButton: r,
|
|
20
|
+
primaryButton: d,
|
|
21
|
+
id: s,
|
|
22
22
|
...l
|
|
23
|
-
},
|
|
23
|
+
}, n) => {
|
|
24
24
|
const {
|
|
25
25
|
className: a,
|
|
26
|
-
"data-testid":
|
|
26
|
+
"data-testid": T,
|
|
27
27
|
...v
|
|
28
|
-
} =
|
|
28
|
+
} = $({ id: s, ...l }, "ComposedModal");
|
|
29
29
|
return /* @__PURE__ */ o(
|
|
30
30
|
y,
|
|
31
31
|
{
|
|
32
|
-
isOpen:
|
|
33
|
-
onClose:
|
|
32
|
+
isOpen: c,
|
|
33
|
+
onClose: p,
|
|
34
34
|
...l,
|
|
35
35
|
...v,
|
|
36
|
-
className:
|
|
37
|
-
id:
|
|
38
|
-
ref:
|
|
36
|
+
className: h(`${a}`, t),
|
|
37
|
+
id: s,
|
|
38
|
+
ref: n,
|
|
39
|
+
title: N,
|
|
39
40
|
children: [
|
|
40
|
-
|
|
41
|
-
/* @__PURE__ */ s(
|
|
41
|
+
/* @__PURE__ */ e(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
44
|
className: `${a}__body`,
|
|
45
|
-
style: { "--max-modal-body-height":
|
|
46
|
-
children:
|
|
45
|
+
style: { "--max-modal-body-height": f },
|
|
46
|
+
children: i
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
(
|
|
50
|
-
/* @__PURE__ */
|
|
49
|
+
(r || d || m) && /* @__PURE__ */ o(_, { children: [
|
|
50
|
+
/* @__PURE__ */ e(g, { className: `${a}__divider`, id: `${s}-divider` }),
|
|
51
51
|
/* @__PURE__ */ o("div", { className: `${a}__btns-group`, children: [
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
r,
|
|
53
|
+
d
|
|
54
54
|
] }),
|
|
55
|
-
m && /* @__PURE__ */
|
|
55
|
+
m && /* @__PURE__ */ e(M, { variant: C.bodySmall, className: `${a}__disclaimer`, children: m })
|
|
56
56
|
] })
|
|
57
57
|
]
|
|
58
58
|
}
|