@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
|
@@ -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
|
|
3
|
-
import
|
|
4
|
-
import { px as e, useNormalizedInputProps as
|
|
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
|
|
7
|
-
|
|
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:
|
|
11
|
+
children: m,
|
|
10
12
|
className: i,
|
|
11
|
-
defaultValue:
|
|
13
|
+
defaultValue: d,
|
|
12
14
|
disabled: u,
|
|
13
15
|
hideLabel: $,
|
|
14
16
|
id: t,
|
|
15
|
-
showIcon:
|
|
17
|
+
showIcon: r = !0,
|
|
16
18
|
variant: _ = c.default,
|
|
17
19
|
inline: f,
|
|
18
20
|
invalid: b,
|
|
19
|
-
invalidText:
|
|
20
|
-
labelText:
|
|
21
|
+
invalidText: v,
|
|
22
|
+
labelText: h,
|
|
21
23
|
onChange: w,
|
|
22
|
-
onClick:
|
|
23
|
-
readOnly:
|
|
24
|
-
size:
|
|
25
|
-
value:
|
|
24
|
+
onClick: g,
|
|
25
|
+
readOnly: o,
|
|
26
|
+
size: x = "md",
|
|
27
|
+
value: C,
|
|
26
28
|
warn: y,
|
|
27
29
|
warnText: N,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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:
|
|
35
|
-
readOnly:
|
|
36
|
-
type:
|
|
37
|
+
invalidText: v,
|
|
38
|
+
readOnly: o,
|
|
39
|
+
type: l,
|
|
37
40
|
warn: y,
|
|
38
41
|
warnText: N
|
|
39
|
-
}),
|
|
42
|
+
}), R = n(`${e}-${l}-input`, `${e}-input`, `${e}-input--${x}`, {
|
|
40
43
|
[`${e}-input--inline`]: f,
|
|
41
|
-
[`${e}-input--readonly`]:
|
|
42
|
-
[`${e}-input--disabled`]:
|
|
43
|
-
[`${e}-input--invalid`]:
|
|
44
|
-
[`${e}-input--warn`]:
|
|
45
|
-
[`${i}__wrapper`]: i
|
|
46
|
-
|
|
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
|
-
}),
|
|
49
|
-
[`${e}-select-container--show__icon`]:
|
|
52
|
+
}), V = n(`${e}-select-container`, {
|
|
53
|
+
[`${e}-select-container--show__icon`]: r
|
|
50
54
|
});
|
|
51
|
-
return /* @__PURE__ */ p("div", { className:
|
|
55
|
+
return /* @__PURE__ */ p("div", { className: R, children: [
|
|
52
56
|
/* @__PURE__ */ s(
|
|
53
|
-
|
|
57
|
+
I,
|
|
54
58
|
{
|
|
59
|
+
element: "label",
|
|
60
|
+
variant: F.labelMedium,
|
|
55
61
|
"data-testid": `${t}-label`,
|
|
56
62
|
htmlFor: t,
|
|
57
|
-
className:
|
|
58
|
-
children:
|
|
63
|
+
className: n(`${e}-input__label`, { [`${e}-input__label--hidden`]: $ }),
|
|
64
|
+
children: h
|
|
59
65
|
}
|
|
60
66
|
),
|
|
61
|
-
/* @__PURE__ */ p("div", { className:
|
|
67
|
+
/* @__PURE__ */ p("div", { className: V, children: [
|
|
62
68
|
/* @__PURE__ */ s(
|
|
63
69
|
"select",
|
|
64
70
|
{
|
|
65
|
-
className:
|
|
71
|
+
className: T,
|
|
66
72
|
"data-testid": t,
|
|
67
|
-
defaultValue:
|
|
68
|
-
disabled:
|
|
73
|
+
defaultValue: d,
|
|
74
|
+
disabled: a.disabled,
|
|
69
75
|
id: t,
|
|
70
76
|
onChange: w,
|
|
71
|
-
ref:
|
|
72
|
-
value:
|
|
73
|
-
...
|
|
74
|
-
children:
|
|
77
|
+
ref: P,
|
|
78
|
+
value: C,
|
|
79
|
+
...j,
|
|
80
|
+
children: m
|
|
75
81
|
}
|
|
76
82
|
),
|
|
77
|
-
|
|
83
|
+
r ? /* @__PURE__ */ s(D, { icon: "ChevronDown" }) : null
|
|
78
84
|
] }),
|
|
79
|
-
|
|
85
|
+
a.validation
|
|
80
86
|
] });
|
|
81
87
|
}
|
|
82
88
|
);
|
|
83
|
-
|
|
89
|
+
M.displayName = "Select";
|
|
84
90
|
export {
|
|
85
|
-
|
|
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.
|
|
29
|
+
children: /* @__PURE__ */ r(C, { variant: v.labelMedium, children: e.label })
|
|
30
30
|
},
|
|
31
31
|
e.value
|
|
32
32
|
)),
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import N, { forwardRef as
|
|
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
|
|
5
|
-
import
|
|
6
|
-
import { ButtonVariants as
|
|
7
|
-
import
|
|
8
|
-
|
|
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(`${
|
|
12
|
-
"aria-label": `${
|
|
13
|
+
className: d(`${r}-tag`, `${r}-button`, t),
|
|
14
|
+
"aria-label": `${i} ${o}`,
|
|
13
15
|
onClick: () => e(o),
|
|
14
|
-
variant:
|
|
16
|
+
variant: p.tertiary,
|
|
15
17
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
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
|
-
),
|
|
21
|
-
({ className:
|
|
22
|
-
const l = "tags-list", { className:
|
|
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(`${
|
|
27
|
-
...
|
|
28
|
-
...
|
|
28
|
+
className: d(`${r}-${l}`, C, s),
|
|
29
|
+
...y,
|
|
30
|
+
...i,
|
|
29
31
|
tabIndex: 0,
|
|
30
32
|
"data-testid": `${l}-${m}`,
|
|
31
|
-
ref:
|
|
33
|
+
ref: h,
|
|
32
34
|
children: [
|
|
33
|
-
Array.isArray(
|
|
34
|
-
Array.isArray(
|
|
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: `${
|
|
41
|
+
className: `${r}-${l}--clear`,
|
|
40
42
|
"aria-label": e,
|
|
41
|
-
variant:
|
|
43
|
+
variant: p.tertiary,
|
|
42
44
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
55
|
+
v.displayName = "Tags";
|
|
54
56
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
3
|
-
import { getCommonProps as
|
|
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
|
|
6
|
-
import
|
|
7
|
-
const $ =
|
|
8
|
-
({
|
|
9
|
-
|
|
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
|
-
...
|
|
14
|
-
className:
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
4
|
-
|
|
3
|
+
g as TextAlignments,
|
|
4
|
+
d as TextVariants
|
|
5
5
|
};
|
|
@@ -1,10 +1,43 @@
|
|
|
1
|
-
import { px as
|
|
2
|
-
import { TextVariants as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
9
|
-
|
|
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
|
|
2
|
+
import { forwardRef as I, useId as T } from "react";
|
|
3
3
|
import l from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { px as
|
|
5
|
-
import
|
|
6
|
-
|
|
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:
|
|
13
|
-
name:
|
|
14
|
-
rows:
|
|
14
|
+
maxLength: p = 3e3,
|
|
15
|
+
name: x,
|
|
16
|
+
rows: c = 2,
|
|
15
17
|
disabled: $,
|
|
16
|
-
warn:
|
|
17
|
-
warnText:
|
|
18
|
+
warn: f,
|
|
19
|
+
warnText: _,
|
|
18
20
|
invalid: b,
|
|
19
|
-
invalidText:
|
|
20
|
-
...
|
|
21
|
-
},
|
|
22
|
-
const i = `${
|
|
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:
|
|
28
|
+
invalidText: u,
|
|
27
29
|
type: "text-area",
|
|
28
|
-
warn:
|
|
29
|
-
warnText:
|
|
30
|
+
warn: f,
|
|
31
|
+
warnText: _
|
|
30
32
|
}), h = l(`${i}__wrapper`, {
|
|
31
|
-
[`${
|
|
32
|
-
[`${
|
|
33
|
-
[`${
|
|
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
|
-
|
|
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(`${
|
|
43
|
-
[`${
|
|
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
|
-
...
|
|
52
|
-
className: l(i, o, `${
|
|
53
|
-
[`${
|
|
55
|
+
...v,
|
|
56
|
+
className: l(i, o, `${e}-text-area__input`, {
|
|
57
|
+
[`${e}-skeleton`]: d
|
|
54
58
|
}),
|
|
55
59
|
id: t ?? r,
|
|
56
|
-
rows:
|
|
57
|
-
maxLength:
|
|
58
|
-
name:
|
|
59
|
-
ref:
|
|
60
|
+
rows: c,
|
|
61
|
+
maxLength: p,
|
|
62
|
+
name: x,
|
|
63
|
+
ref: N,
|
|
60
64
|
"data-testid": `text-area-${t ?? r}-input`,
|
|
61
|
-
disabled:
|
|
65
|
+
disabled: a.disabled
|
|
62
66
|
}
|
|
63
67
|
),
|
|
64
|
-
/* @__PURE__ */ s(
|
|
68
|
+
/* @__PURE__ */ s(j, { icon: "Menu", className: `${i}-resizer__icon` })
|
|
65
69
|
] }),
|
|
66
|
-
/* @__PURE__ */ s("div", { children:
|
|
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
|
-
|
|
74
|
+
C.displayName = "TextArea";
|
|
71
75
|
export {
|
|
72
|
-
|
|
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 },
|
|
11
|
-
const { className: r, ...
|
|
12
|
-
return /* @__PURE__ */ e(h, { ...
|
|
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: $.
|
|
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
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __exports as l } from "../../../_virtual/
|
|
1
|
+
import { __exports as l } from "../../../_virtual/index5.js";
|
|
2
2
|
import "./pipeline/index.js";
|
|
3
|
-
import { __exports as _ } from "../../../_virtual/
|
|
3
|
+
import { __exports as _ } from "../../../_virtual/index6.js";
|
|
4
4
|
Object.defineProperty(l, "__esModule", {
|
|
5
5
|
value: !0
|
|
6
6
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index4.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|