@phillips/seldon 1.141.0 → 1.142.1
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/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -44
- package/dist/index.js +169 -168
- package/dist/patterns/UserManagement/UserManagement.js +14 -14
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +4 -0
- package/dist/scss/patterns/UserManagement/_userManagement.scss +4 -9
- package/dist/site-furniture/Header/Header.stories.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +12 -8
- package/dist/utils/utils.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as $, findChildrenOfType as b, px as f } from "../../../utils/index.js";
|
|
1
|
+
import { jsx as n, Fragment as _, jsxs as f } from "react/jsx-runtime";
|
|
3
2
|
import k from "../../../node_modules/classnames/index.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import v from "../../Text/Text.js";
|
|
7
|
-
import O from "../NavigationList/NavigationList.js";
|
|
8
|
-
import S from "../../Accordion/Accordion.js";
|
|
9
|
-
import y from "../../Accordion/AccordionItem.js";
|
|
3
|
+
import i, { forwardRef as $, useState as I } from "react";
|
|
4
|
+
import M from "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
10
5
|
import { SSRMediaQuery as g } from "../../../providers/SeldonProvider/utils.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
import { HeaderContext as v } from "../../../site-furniture/Header/Header.js";
|
|
7
|
+
import { getCommonProps as O, findChildrenOfType as S, focusElementById as y, px as h } from "../../../utils/index.js";
|
|
8
|
+
import E from "../../Accordion/Accordion.js";
|
|
9
|
+
import R from "../../Accordion/AccordionItem.js";
|
|
10
|
+
import { AccordionItemVariant as w } from "../../Accordion/types.js";
|
|
11
|
+
import { TextVariants as C } from "../../Text/types.js";
|
|
12
|
+
import N from "../../Text/Text.js";
|
|
13
|
+
import L from "../NavigationList/NavigationList.js";
|
|
14
|
+
const A = ({ id: a, label: o, children: l }) => {
|
|
15
|
+
const { isMenuOpen: c } = i.useContext(v);
|
|
16
|
+
return /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
|
|
17
|
+
R,
|
|
18
18
|
{
|
|
19
19
|
hasTransition: !0,
|
|
20
|
-
id: `accordion-item-${
|
|
21
|
-
label: /* @__PURE__ */
|
|
22
|
-
variant:
|
|
23
|
-
children:
|
|
20
|
+
id: `accordion-item-${a}`,
|
|
21
|
+
label: /* @__PURE__ */ n(N, { variant: C.snwHeaderLink, children: o }),
|
|
22
|
+
variant: w.lg,
|
|
23
|
+
children: l
|
|
24
24
|
},
|
|
25
25
|
`accordion-key-${o}`
|
|
26
|
-
) }, `accordion-key-${o}-${
|
|
27
|
-
},
|
|
28
|
-
({ id:
|
|
29
|
-
const { className:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
) }, `accordion-key-${o}-${c}`);
|
|
27
|
+
}, H = $(
|
|
28
|
+
({ id: a, label: o, children: l, className: c, onClick: b, ...x }, t) => {
|
|
29
|
+
const { className: m, ...u } = O({ id: a }, "NavigationItemTrigger"), [d, s] = I(!1), e = S(l, L), { closeMenu: p } = i.useContext(v), T = i.useCallback(() => {
|
|
30
|
+
s(!0), e && e[0]?.props?.id && y(e[0].props.id, !0);
|
|
31
|
+
const r = t && "current" in t ? t.current : null;
|
|
32
|
+
r && r.focus();
|
|
33
|
+
}, [e, t]);
|
|
34
|
+
return /* @__PURE__ */ n(_, { children: /* @__PURE__ */ f(M, { enabled: d, allowPinchZoom: !0, removeScrollBar: !1, children: [
|
|
35
|
+
/* @__PURE__ */ n(g.Media, { lessThan: "md", children: /* @__PURE__ */ n(A, { id: a, label: o, ...u, children: e ? i.cloneElement(e[0], {
|
|
36
|
+
className: `${m}__submenu--mobile`,
|
|
37
|
+
onClick: (r) => {
|
|
38
|
+
e[0].props?.onClick?.(r), s?.(!1), p?.();
|
|
35
39
|
}
|
|
36
40
|
}) : null }) }),
|
|
37
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ n(g.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ f(
|
|
38
42
|
"li",
|
|
39
43
|
{
|
|
40
|
-
...
|
|
41
|
-
ref:
|
|
42
|
-
"aria-expanded":
|
|
43
|
-
className: k(
|
|
44
|
-
[`${
|
|
44
|
+
...u,
|
|
45
|
+
ref: t,
|
|
46
|
+
"aria-expanded": d,
|
|
47
|
+
className: k(c, m, `${h}-nav__item`, {
|
|
48
|
+
[`${m}--hovered`]: d
|
|
45
49
|
}),
|
|
46
|
-
onClick:
|
|
47
|
-
onMouseOver:
|
|
48
|
-
onMouseOut: () =>
|
|
50
|
+
onClick: b,
|
|
51
|
+
onMouseOver: T,
|
|
52
|
+
onMouseOut: () => s(!1),
|
|
49
53
|
...x,
|
|
50
54
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
className: `${
|
|
54
|
-
onClick: (
|
|
55
|
-
|
|
55
|
+
/* @__PURE__ */ n("button", { className: `${h}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ n(N, { variant: C.snwHeaderLink, children: o }) }),
|
|
56
|
+
e ? i.cloneElement(e[0], {
|
|
57
|
+
className: `${m}__submenu`,
|
|
58
|
+
onClick: (r) => {
|
|
59
|
+
e[0].props?.onClick?.(r), s?.(!1), p?.();
|
|
56
60
|
}
|
|
57
61
|
}) : null
|
|
58
62
|
]
|
|
@@ -61,7 +65,7 @@ const E = ({ id: n, label: o, children: m }) => {
|
|
|
61
65
|
] }) });
|
|
62
66
|
}
|
|
63
67
|
);
|
|
64
|
-
|
|
68
|
+
H.displayName = "NavigationItemTrigger";
|
|
65
69
|
export {
|
|
66
|
-
|
|
70
|
+
H as default
|
|
67
71
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,200 +1,201 @@
|
|
|
1
|
-
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p,
|
|
2
|
-
import { default as
|
|
3
|
-
import { SSRMediaQuery as
|
|
1
|
+
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p, focusElementById as u, generatePaddingClassName as i, getCommonProps as n, noOp as x, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
|
+
import { default as C } from "./pages/Page.js";
|
|
3
|
+
import { SSRMediaQuery as B, ssrMediaQueryStyle as L } from "./providers/SeldonProvider/utils.js";
|
|
4
4
|
import { usePendingState as A } from "./utils/hooks.js";
|
|
5
|
-
import { AuctionStatus as
|
|
6
|
-
import { default as
|
|
5
|
+
import { AuctionStatus as V, LotStatus as b, SupportedLanguages as h } from "./types/commonTypes.js";
|
|
6
|
+
import { default as w } from "./components/Button/Button.js";
|
|
7
7
|
import { ButtonVariants as v } from "./components/Button/types.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { AccordionItemVariant as
|
|
12
|
-
import { default as
|
|
8
|
+
import { default as D } from "./components/IconButton/IconButton.js";
|
|
9
|
+
import { default as M } from "./components/Accordion/Accordion.js";
|
|
10
|
+
import { default as E } from "./components/Accordion/AccordionItem.js";
|
|
11
|
+
import { AccordionItemVariant as G, AccordionVariants as O } from "./components/Accordion/types.js";
|
|
12
|
+
import { default as Q } from "./components/Breadcrumb/Breadcrumb.js";
|
|
13
13
|
import "react/jsx-runtime";
|
|
14
14
|
import "./node_modules/classnames/index.js";
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { HeightUnits as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { Grid as
|
|
15
|
+
import { default as z } from "./components/Icon/Icon.js";
|
|
16
|
+
import { default as Y } from "./components/Carousel/Carousel.js";
|
|
17
|
+
import { default as q } from "./components/Carousel/CarouselArrows.js";
|
|
18
|
+
import { default as K } from "./components/Carousel/CarouselContent.js";
|
|
19
|
+
import { default as _ } from "./components/Carousel/CarouselItem.js";
|
|
20
|
+
import { default as ee } from "./components/Carousel/CarouselDots.js";
|
|
21
|
+
import { default as oe } from "./components/Collapsible/Collapsible.js";
|
|
22
|
+
import { default as ae } from "./components/Collapsible/CollapsibleContent.js";
|
|
23
|
+
import { default as se } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
24
|
+
import { default as de } from "./components/ContentPeek/ContentPeek.js";
|
|
25
|
+
import { HeightUnits as pe } from "./components/ContentPeek/utils.js";
|
|
26
|
+
import { default as ie } from "./components/Detail/Detail.js";
|
|
27
|
+
import { default as xe } from "./components/Drawer/Drawer.js";
|
|
28
|
+
import { default as ce } from "./components/Dropdown/Dropdown.js";
|
|
29
|
+
import { default as Ce } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
30
|
+
import { Grid as Be } from "./components/Grid/Grid.js";
|
|
31
31
|
import { default as Pe } from "./components/GridItem/GridItem.js";
|
|
32
|
-
import { GridItemAlign as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { LinkVariants as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
32
|
+
import { GridItemAlign as Ie } from "./components/GridItem/types.js";
|
|
33
|
+
import { default as be } from "./components/Input/Input.js";
|
|
34
|
+
import { default as ke } from "./components/Link/Link.js";
|
|
35
|
+
import { LinkVariants as ye } from "./components/Link/types.js";
|
|
36
|
+
import { default as He } from "./components/LinkBlock/LinkBlock.js";
|
|
37
|
+
import { default as Fe } from "./components/LinkList/LinkList.js";
|
|
38
|
+
import { default as Ne } from "./components/Modal/Modal.js";
|
|
39
39
|
import { default as Ue } from "./components/Navigation/Navigation.js";
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { SelectVariants as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { Tag as
|
|
55
|
-
import { TextAlignments as
|
|
56
|
-
import { default as
|
|
40
|
+
import { default as Oe } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
41
|
+
import { default as Qe } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
42
|
+
import { default as ze } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
43
|
+
import { default as Ye } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
44
|
+
import { default as qe } from "./components/Pagination/Pagination.js";
|
|
45
|
+
import { default as Ke } from "./components/PinchZoom/PinchZoom.js";
|
|
46
|
+
import { default as _e } from "./components/Row/Row.js";
|
|
47
|
+
import { default as et } from "./components/Search/Search.js";
|
|
48
|
+
import { default as ot } from "./components/SeldonImage/SeldonImage.js";
|
|
49
|
+
import { default as at } from "./components/Select/Select.js";
|
|
50
|
+
import { SelectVariants as st } from "./components/Select/types.js";
|
|
51
|
+
import { default as dt } from "./components/SplitPanel/SplitPanel.js";
|
|
52
|
+
import { default as pt } from "./components/Tabs/TabsContainer.js";
|
|
53
|
+
import { default as it } from "./components/Tabs/TabsContent.js";
|
|
54
|
+
import { Tag as xt, default as gt } from "./components/Tags/Tags.js";
|
|
55
|
+
import { TextAlignments as St, TextVariants as Ct } from "./components/Text/types.js";
|
|
56
|
+
import { default as Bt } from "./components/Text/Text.js";
|
|
57
57
|
import { TextSymbolVariants as Pt } from "./components/TextSymbol/types.js";
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { DetailListAlignment as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
58
|
+
import { default as It } from "./components/TextSymbol/TextSymbol.js";
|
|
59
|
+
import { default as bt } from "./components/Video/Video.js";
|
|
60
|
+
import { default as kt } from "./patterns/DetailList/DetailList.js";
|
|
61
|
+
import { DetailListAlignment as yt } from "./patterns/DetailList/types.js";
|
|
62
|
+
import { default as Ht } from "./patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
|
|
63
|
+
import { default as Ft } from "./patterns/HeroBanner/HeroBanner.js";
|
|
64
|
+
import { default as Nt } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
65
65
|
import { default as Ut } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { SubscriptionState as
|
|
70
|
-
import { AuthState as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { SeldonProvider as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { CountdownVariants as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
66
|
+
import { default as Ot } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
|
|
67
|
+
import { default as Qt } from "./patterns/Social/Social.js";
|
|
68
|
+
import { default as zt } from "./patterns/Subscribe/Subscribe.js";
|
|
69
|
+
import { SubscriptionState as Yt } from "./patterns/Subscribe/types.js";
|
|
70
|
+
import { AuthState as qt } from "./patterns/UserManagement/types.js";
|
|
71
|
+
import { default as Kt } from "./patterns/UserManagement/UserManagement.js";
|
|
72
|
+
import { default as _t } from "./patterns/ViewingsList/StatefulViewingsList.js";
|
|
73
|
+
import { default as eo } from "./patterns/ViewingsList/ViewingsList.js";
|
|
74
|
+
import { SeldonProvider as oo } from "./providers/SeldonProvider/SeldonProvider.js";
|
|
75
|
+
import { default as ao } from "./site-furniture/Footer/Footer.js";
|
|
76
|
+
import { default as so } from "./site-furniture/Header/Header.js";
|
|
77
|
+
import { default as mo } from "./components/Article/Article.js";
|
|
78
|
+
import { default as uo } from "./components/Countdown/Countdown.js";
|
|
79
|
+
import { CountdownVariants as no } from "./components/Countdown/types.js";
|
|
80
|
+
import { default as go } from "./components/Divider/Divider.js";
|
|
81
|
+
import { default as So } from "./components/FavoritingTileButton/FavoritingTileButton.js";
|
|
82
|
+
import { default as To } from "./components/Filter/Filter.js";
|
|
83
83
|
import { default as Lo } from "./components/Filter/FilterInput.js";
|
|
84
84
|
import { default as Ao } from "./components/Filter/FilterHeader.js";
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
85
|
+
import { default as Vo } from "./components/TextArea/TextArea.js";
|
|
86
|
+
import { default as ho } from "./patterns/AccountPageHeader/AccountPageHeader.js";
|
|
87
|
+
import { default as wo } from "./patterns/BidSnapshot/BidSnapshot.js";
|
|
88
88
|
import { default as vo } from "./patterns/BidSnapshot/BidMessage.js";
|
|
89
|
-
import { BidMessageVariants as
|
|
90
|
-
import { default as
|
|
89
|
+
import { BidMessageVariants as Do, BidStatusEnum as Fo } from "./patterns/BidSnapshot/types.js";
|
|
90
|
+
import { default as No } from "./patterns/FilterMenu/FilterMenu.js";
|
|
91
91
|
import { default as Uo } from "./patterns/ObjectTile/ObjectTile.js";
|
|
92
92
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
M as Accordion,
|
|
94
|
+
E as AccordionItem,
|
|
95
|
+
G as AccordionItemVariant,
|
|
96
|
+
O as AccordionVariants,
|
|
97
|
+
ho as AccountPageHeader,
|
|
98
|
+
mo as Article,
|
|
99
|
+
V as AuctionStatus,
|
|
100
|
+
qt as AuthState,
|
|
101
101
|
vo as BidMessage,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
Do as BidMessageVariants,
|
|
103
|
+
wo as BidSnapshot,
|
|
104
|
+
Fo as BidStatusEnum,
|
|
105
|
+
Q as Breadcrumb,
|
|
106
|
+
w as Button,
|
|
107
107
|
v as ButtonVariants,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
108
|
+
Y as Carousel,
|
|
109
|
+
q as CarouselArrows,
|
|
110
|
+
K as CarouselContent,
|
|
111
|
+
ee as CarouselDots,
|
|
112
|
+
_ as CarouselItem,
|
|
113
|
+
oe as Collapsible,
|
|
114
|
+
ae as CollapsibleContent,
|
|
115
|
+
se as CollapsibleTrigger,
|
|
116
|
+
de as ContentPeek,
|
|
117
|
+
pe as ContentPeekHeightUnits,
|
|
118
|
+
uo as Countdown,
|
|
119
|
+
no as CountdownVariants,
|
|
120
|
+
ie as Detail,
|
|
121
|
+
kt as DetailList,
|
|
122
|
+
yt as DetailListAlignment,
|
|
123
|
+
go as Divider,
|
|
124
|
+
xe as Drawer,
|
|
125
|
+
ce as Dropdown,
|
|
126
|
+
Ce as ErrorBoundary,
|
|
127
|
+
Ht as FavoritesCollectionTile,
|
|
128
|
+
So as FavoritingTileButton,
|
|
129
|
+
To as Filter,
|
|
130
130
|
Ao as FilterHeader,
|
|
131
131
|
Lo as FilterInput,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
No as FilterMenu,
|
|
133
|
+
ao as Footer,
|
|
134
|
+
Be as Grid,
|
|
135
135
|
Pe as GridItem,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
136
|
+
Ie as GridItemAlign,
|
|
137
|
+
so as Header,
|
|
138
|
+
Ft as HeroBanner,
|
|
139
|
+
z as Icon,
|
|
140
|
+
D as IconButton,
|
|
141
|
+
be as Input,
|
|
142
|
+
Nt as LanguageSelector,
|
|
143
|
+
ke as Link,
|
|
144
|
+
He as LinkBlock,
|
|
145
|
+
Fe as LinkList,
|
|
146
|
+
ye as LinkVariants,
|
|
147
|
+
b as LotStatus,
|
|
148
|
+
Ne as Modal,
|
|
149
149
|
Ue as Navigation,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
Oe as NavigationItem,
|
|
151
|
+
Qe as NavigationItemTrigger,
|
|
152
|
+
ze as NavigationList,
|
|
153
153
|
Uo as ObjectTile,
|
|
154
154
|
a as PaddingTokens,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
C as Page,
|
|
156
|
+
Ye as PageContentWrapper,
|
|
157
|
+
qe as Pagination,
|
|
158
|
+
Ke as PinchZoom,
|
|
159
|
+
_e as Row,
|
|
160
|
+
B as SSRMediaQuery,
|
|
161
161
|
Ut as SaleHeaderBanner,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
Ot as SaleHeaderBrowseAuctions,
|
|
163
|
+
et as Search,
|
|
164
|
+
ot as SeldonImage,
|
|
165
|
+
oo as SeldonProvider,
|
|
166
|
+
at as Select,
|
|
167
|
+
st as SelectVariants,
|
|
168
|
+
Qt as Social,
|
|
169
169
|
f as SpacingTokens,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
dt as SplitPanel,
|
|
171
|
+
_t as StatefulViewingsList,
|
|
172
|
+
zt as Subscribe,
|
|
173
|
+
Yt as SubscriptionState,
|
|
174
|
+
h as SupportedLanguages,
|
|
175
|
+
pt as TabsContainer,
|
|
176
|
+
it as TabsContent,
|
|
177
|
+
xt as Tag,
|
|
178
|
+
gt as TagsList,
|
|
179
|
+
Bt as Text,
|
|
180
|
+
St as TextAlignments,
|
|
181
|
+
Vo as TextArea,
|
|
182
182
|
Pt as TextSymbolVariants,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
It as TextSymbols,
|
|
184
|
+
Ct as TextVariants,
|
|
185
|
+
Kt as UserManagement,
|
|
186
|
+
bt as Video,
|
|
187
|
+
eo as ViewingsList,
|
|
188
188
|
s as defaultYear,
|
|
189
189
|
l as emailValidation,
|
|
190
190
|
d as encodeURLSearchParams,
|
|
191
191
|
m as findChildrenExcludingTypes,
|
|
192
192
|
p as findChildrenOfType,
|
|
193
|
-
u as
|
|
194
|
-
i as
|
|
195
|
-
n as
|
|
196
|
-
x as
|
|
193
|
+
u as focusElementById,
|
|
194
|
+
i as generatePaddingClassName,
|
|
195
|
+
n as getCommonProps,
|
|
196
|
+
x as noOp,
|
|
197
|
+
g as px,
|
|
197
198
|
L as ssrMediaQueryStyle,
|
|
198
|
-
|
|
199
|
+
c as useNormalizedInputProps,
|
|
199
200
|
A as usePendingState
|
|
200
201
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as o, Fragment as x, jsxs as
|
|
1
|
+
import { jsx as o, Fragment as x, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as A } from "react";
|
|
3
3
|
import { getCommonProps as w, noOp as C } from "../../utils/index.js";
|
|
4
4
|
import $ from "../../node_modules/classnames/index.js";
|
|
5
|
-
import { AuthState as
|
|
6
|
-
import { TextVariants as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import { AuthState as t } from "./types.js";
|
|
6
|
+
import { TextVariants as i } from "../../components/Text/types.js";
|
|
7
|
+
import r from "../../components/Text/Text.js";
|
|
8
|
+
import m from "../../components/Icon/Icon.js";
|
|
9
9
|
const b = A(
|
|
10
10
|
({
|
|
11
11
|
accountDetailsLinkComponent: l = "a",
|
|
12
12
|
className: d,
|
|
13
13
|
onLogin: g = C,
|
|
14
|
-
authState:
|
|
14
|
+
authState: a = t.LoggedOut,
|
|
15
15
|
loginLabel: h = "Login",
|
|
16
16
|
accountLabel: u = "Account",
|
|
17
17
|
href: f = "/account",
|
|
18
|
-
disabled:
|
|
18
|
+
disabled: e = !1,
|
|
19
19
|
...c
|
|
20
20
|
}, p) => {
|
|
21
|
-
const { className: n, ...N } = w(c, "UserManagement"), _ =
|
|
22
|
-
return /* @__PURE__ */ o("div", { ...N, className: $(n, d), ...c, ref: p, children: L && /* @__PURE__ */ o(x, { children: _ ? /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ o(
|
|
24
|
-
/* @__PURE__ */ o(
|
|
25
|
-
] }) : /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ o(
|
|
27
|
-
/* @__PURE__ */ o(
|
|
21
|
+
const { className: n, ...N } = w(c, "UserManagement"), _ = a === t.LoggedIn, L = a !== t.Loading;
|
|
22
|
+
return /* @__PURE__ */ o("div", { ...N, className: $(n, d), ...c, ref: p, children: L && /* @__PURE__ */ o(x, { children: _ ? /* @__PURE__ */ s(l, { className: `${n}__login`, href: f, disabled: e, children: [
|
|
23
|
+
/* @__PURE__ */ o(m, { icon: "Account", className: `${n}__account-icon`, height: "100%", width: "100%" }),
|
|
24
|
+
/* @__PURE__ */ o(r, { variant: i.body3, children: u })
|
|
25
|
+
] }) : /* @__PURE__ */ s("button", { className: `${n}__login`, onClick: g, disabled: e, children: [
|
|
26
|
+
/* @__PURE__ */ o(m, { icon: "Account", className: `${n}__account-icon`, height: "100%", width: "100%" }),
|
|
27
|
+
/* @__PURE__ */ o(r, { variant: i.body3, children: h })
|
|
28
28
|
] }) }) });
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -55,17 +55,12 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
&__account-icon {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
display: flex;
|
|
61
|
-
height: $mobile-minimum-clickable-area;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
width: $mobile-minimum-clickable-area;
|
|
64
|
-
}
|
|
58
|
+
height: 1.5rem;
|
|
59
|
+
width: 1.5rem;
|
|
65
60
|
|
|
66
61
|
@include isHeaderDesktop {
|
|
67
|
-
height:
|
|
68
|
-
width:
|
|
62
|
+
height: 1rem;
|
|
63
|
+
width: 1rem;
|
|
69
64
|
}
|
|
70
65
|
}
|
|
71
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HeaderProps } from './Header';
|
|
2
|
-
import { AuthState } from '../../patterns/UserManagement/types';
|
|
3
1
|
import { default as React } from 'react';
|
|
2
|
+
import { AuthState } from '../../patterns/UserManagement/types';
|
|
3
|
+
import { HeaderProps } from './Header';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: React.ForwardRefExoticComponent<Omit<HeaderProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -102,4 +102,5 @@ export declare const emailValidation: (email: string) => boolean;
|
|
|
102
102
|
export declare const findChildrenOfType: <ComponentProps>(children: React.ReactNode, componentType?: React.ElementType, inverse?: boolean) => React.ReactElement<ComponentProps, string | React.JSXElementConstructor<any>>[] | null;
|
|
103
103
|
export declare const findChildrenExcludingTypes: <ComponentProps>(children: React.ReactNode, excludedTypes: React.ElementType[]) => React.ReactElement<ComponentProps, string | React.JSXElementConstructor<any>>[] | null;
|
|
104
104
|
export declare const encodeURLSearchParams: (url: string) => string;
|
|
105
|
+
export declare const focusElementById: (elementId: string, focus: boolean) => void;
|
|
105
106
|
export {};
|
package/dist/utils/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const s = "seldon", v = ({ id: e, ...r }, n) => {
|
|
|
9
9
|
className: `${s}-${t}`
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var f = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))(f || {}), x = /* @__PURE__ */ ((e) => (e.micro = "micro", e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))(x || {});
|
|
13
13
|
const C = () => {
|
|
14
14
|
};
|
|
15
15
|
function g({
|
|
@@ -33,7 +33,7 @@ function g({
|
|
|
33
33
|
};
|
|
34
34
|
return l.invalid && (l.validation = /* @__PURE__ */ d("div", { className: `${s}-input__validation ${s}-${o}-input--invalid`, id: l.invalidId, children: t })), l.warn && (l.validation = /* @__PURE__ */ d("div", { className: `${s}-input__validation ${s}-${o}-input--warn`, id: l.warnId, children: m })), l;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const y = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, r = "end", n = "vertical") => `${s}-padding-${n}-${e}-${r}`, I = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), h = (e, r, n = !1) => {
|
|
37
37
|
const t = c.Children.toArray(e).filter((a) => a && a.type === r && !n ? a : a && a.type !== r && n);
|
|
38
38
|
return t.length > 0 ? t : null;
|
|
39
39
|
}, N = (e, r) => {
|
|
@@ -45,16 +45,20 @@ const w = (/* @__PURE__ */ new Date()).getFullYear(), h = (e, r = "end", n = "ve
|
|
|
45
45
|
}, R = (e) => {
|
|
46
46
|
const r = e.split("?"), n = new URLSearchParams(r[1]), a = Array.from(n.entries()).map(([i, m]) => [i, encodeURIComponent(m)]).map(([i, m]) => `${i}=${m}`).join("&");
|
|
47
47
|
return `${r[0]}?${a}`;
|
|
48
|
+
}, b = (e, r) => {
|
|
49
|
+
const n = document.getElementById(e);
|
|
50
|
+
n && r ? n.focus() : n && n.blur();
|
|
48
51
|
};
|
|
49
52
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
f as PaddingTokens,
|
|
54
|
+
x as SpacingTokens,
|
|
55
|
+
y as defaultYear,
|
|
56
|
+
I as emailValidation,
|
|
54
57
|
R as encodeURLSearchParams,
|
|
55
58
|
N as findChildrenExcludingTypes,
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
h as findChildrenOfType,
|
|
60
|
+
b as focusElementById,
|
|
61
|
+
w as generatePaddingClassName,
|
|
58
62
|
v as getCommonProps,
|
|
59
63
|
C as noOp,
|
|
60
64
|
s as px,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|