@phillips/seldon 1.132.0 → 1.133.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/assets/formatted/AccountCircle.d.ts +9 -0
- package/dist/assets/formatted/AccountCircle.js +40 -0
- package/dist/assets/formatted/AppleAppStoreBadge.d.ts +9 -0
- package/dist/assets/formatted/AppleAppStoreBadge.js +52 -0
- package/dist/assets/formatted/ArrowPrev.d.ts +9 -0
- package/dist/assets/formatted/ArrowPrev.js +37 -0
- package/dist/assets/formatted/Calendar.d.ts +9 -0
- package/dist/assets/formatted/Calendar.js +29 -0
- package/dist/assets/formatted/CalendarAlt.d.ts +9 -0
- package/dist/assets/formatted/CalendarAlt.js +44 -0
- package/dist/assets/formatted/CarouselArrowNext.d.ts +9 -0
- package/dist/assets/formatted/CarouselArrowNext.js +29 -0
- package/dist/assets/formatted/CarouselArrowPrev.d.ts +9 -0
- package/dist/assets/formatted/CarouselArrowPrev.js +29 -0
- package/dist/assets/formatted/Checkmark.d.ts +9 -0
- package/dist/assets/formatted/Checkmark.js +37 -0
- package/dist/assets/formatted/ChevronDown.d.ts +9 -0
- package/dist/assets/formatted/ChevronDown.js +37 -0
- package/dist/assets/formatted/ChevronNext.d.ts +9 -0
- package/dist/assets/formatted/ChevronNext.js +37 -0
- package/dist/assets/formatted/ChevronRight.d.ts +9 -0
- package/dist/assets/formatted/ChevronRight.js +37 -0
- package/dist/assets/formatted/Close.d.ts +9 -0
- package/dist/assets/formatted/Close.js +46 -0
- package/dist/assets/formatted/Favorite.d.ts +9 -0
- package/dist/assets/formatted/Favorite.js +38 -0
- package/dist/assets/formatted/FavoriteOutline.d.ts +9 -0
- package/dist/assets/formatted/FavoriteOutline.js +38 -0
- package/dist/assets/formatted/IconFooterFacebook.d.ts +9 -0
- package/dist/assets/formatted/IconFooterFacebook.js +35 -0
- package/dist/assets/formatted/IconFooterInstagram.d.ts +9 -0
- package/dist/assets/formatted/IconFooterInstagram.js +31 -0
- package/dist/assets/formatted/IconFooterLinkedin.d.ts +9 -0
- package/dist/assets/formatted/IconFooterLinkedin.js +35 -0
- package/dist/assets/formatted/IconFooterRed.d.ts +9 -0
- package/dist/assets/formatted/IconFooterRed.js +42 -0
- package/dist/assets/formatted/IconFooterWechat.d.ts +9 -0
- package/dist/assets/formatted/IconFooterWechat.js +37 -0
- package/dist/assets/formatted/IconGreenCircle.d.ts +9 -0
- package/dist/assets/formatted/IconGreenCircle.js +29 -0
- package/dist/assets/formatted/IconRedCircle.d.ts +9 -0
- package/dist/assets/formatted/IconRedCircle.js +29 -0
- package/dist/assets/formatted/Instagram.d.ts +9 -0
- package/dist/assets/formatted/Instagram.js +62 -0
- package/dist/assets/formatted/Lock.d.ts +9 -0
- package/dist/assets/formatted/Lock.js +44 -0
- package/dist/assets/formatted/MagnificentSeven.d.ts +9 -0
- package/dist/assets/formatted/MagnificentSeven.js +36 -0
- package/dist/assets/formatted/Menu.d.ts +9 -0
- package/dist/assets/formatted/Menu.js +29 -0
- package/dist/assets/formatted/Minus.d.ts +9 -0
- package/dist/assets/formatted/Minus.js +46 -0
- package/dist/assets/formatted/PhillipsAppIcon.d.ts +9 -0
- package/dist/assets/formatted/PhillipsAppIcon.js +37 -0
- package/dist/assets/formatted/PhillipsLogo.d.ts +9 -0
- package/dist/assets/formatted/PhillipsLogo.js +38 -0
- package/dist/assets/formatted/Plus.d.ts +9 -0
- package/dist/assets/formatted/Plus.js +46 -0
- package/dist/assets/formatted/React.d.ts +9 -0
- package/dist/assets/formatted/React.js +36 -0
- package/dist/assets/formatted/Search.d.ts +9 -0
- package/dist/assets/formatted/Search.js +37 -0
- package/dist/assets/formatted/Share.d.ts +9 -0
- package/dist/assets/formatted/Share.js +42 -0
- package/dist/assets/formatted/Spotify.d.ts +9 -0
- package/dist/assets/formatted/Spotify.js +35 -0
- package/dist/assets/formatted/Wechat.d.ts +9 -0
- package/dist/assets/formatted/Wechat.js +42 -0
- package/dist/assets/formatted/Youtube.d.ts +9 -0
- package/dist/assets/formatted/Youtube.js +36 -0
- package/dist/assets/formatted/index.d.ts +35 -0
- package/dist/assets/formatted/index.js +72 -0
- package/dist/components/Accordion/AccordionItem.js +78 -71
- package/dist/components/Breadcrumb/Breadcrumb.js +14 -14
- package/dist/components/Breadcrumb/BreadcrumbItem.js +15 -15
- package/dist/components/Carousel/Carousel.stories.d.ts +4 -0
- package/dist/components/Carousel/CarouselArrows.d.ts +1 -1
- package/dist/components/Carousel/CarouselArrows.js +13 -14
- package/dist/components/Carousel/CarouselDots.d.ts +4 -0
- package/dist/components/Carousel/CarouselDots.js +24 -24
- package/dist/components/ContentPeek/ContentPeek.js +42 -43
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +18 -18
- package/dist/components/Dropdown/Dropdown.js +23 -17
- package/dist/components/Filter/Filter.js +20 -20
- package/dist/components/Filter/FilterHeader.js +15 -15
- package/dist/components/Icon/Icon.d.ts +29 -0
- package/dist/components/Icon/Icon.js +21 -0
- package/dist/components/Icon/Icon.stories.d.ts +49 -0
- package/dist/components/Icon/Icon.test.d.ts +1 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.js +53 -53
- package/dist/components/Modal/Modal.js +10 -10
- package/dist/components/Pagination/Pagination.js +42 -41
- package/dist/components/Search/SearchButton.js +14 -15
- package/dist/components/SeldonImage/SeldonImage.js +62 -72
- package/dist/components/SeldonImage/utils.d.ts +6 -0
- package/dist/components/SeldonImage/utils.js +14 -0
- package/dist/components/SeldonImage/utils.test.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +4 -0
- package/dist/components/Select/Select.js +37 -37
- package/dist/components/Tags/Tags.js +25 -26
- package/dist/components/TextArea/TextArea.js +9 -9
- package/dist/design/icons/IconGrid.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +185 -246
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/BidSnapshot/BidMessage.js +15 -17
- package/dist/patterns/Subscribe/Subscribe.d.ts +5 -1
- package/dist/patterns/Subscribe/Subscribe.js +47 -45
- package/dist/patterns/Subscribe/Subscribe.stories.d.ts +1 -1
- package/dist/patterns/UserManagement/UserManagement.js +37 -21
- package/dist/scss/_vars.scss +3 -4
- package/dist/scss/_vars.scss.js +438 -0
- package/dist/scss/components/Icon/_icon.stories.scss +32 -0
- package/dist/scss/components/IconButton/_iconButton.scss +3 -4
- package/dist/scss/components/Pagination/_pagination.scss +2 -2
- package/dist/scss/patterns/UserManagement/_userManagement.scss +0 -3
- package/dist/site-furniture/Footer/Footer.js +5 -5
- package/dist/site-furniture/Header/Header.js +18 -18
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/scssUtils.d.ts +2 -0
- package/dist/utils/scssUtils.js +12 -0
- package/dist/utils/scssUtils.test.d.ts +1 -0
- package/package.json +7 -2
- package/dist/assets/CarouselArrowNext.svg.js +0 -5
- package/dist/assets/CarouselArrowPrev.svg.js +0 -5
- package/dist/assets/PhillipsLogo.svg.js +0 -5
- package/dist/assets/account_circle.svg.js +0 -5
- package/dist/assets/arrowPrev.svg.js +0 -5
- package/dist/assets/calendar.svg.js +0 -5
- package/dist/assets/calendarAlt.svg.js +0 -5
- package/dist/assets/checkmark.svg.js +0 -5
- package/dist/assets/chevronDown.svg.js +0 -5
- package/dist/assets/chevronNext.svg.js +0 -5
- package/dist/assets/chevronRight.svg.js +0 -5
- package/dist/assets/close.svg.js +0 -5
- package/dist/assets/favorite.svg.js +0 -5
- package/dist/assets/favoriteOutline.svg.js +0 -5
- package/dist/assets/icon-footer-facebook.svg.js +0 -5
- package/dist/assets/icon-footer-instagram.svg.js +0 -5
- package/dist/assets/icon-footer-linkedin.svg.js +0 -5
- package/dist/assets/icon-footer-red.svg.js +0 -5
- package/dist/assets/icon-footer-wechat.svg.js +0 -5
- package/dist/assets/icon-green-circle.svg.js +0 -5
- package/dist/assets/icon-red-circle.svg.js +0 -5
- package/dist/assets/icons.d.ts +0 -32
- package/dist/assets/instagram.svg.js +0 -5
- package/dist/assets/lock.svg.js +0 -5
- package/dist/assets/menu.svg.js +0 -5
- package/dist/assets/minus.svg.js +0 -5
- package/dist/assets/plus.svg.js +0 -5
- package/dist/assets/react.svg.js +0 -5
- package/dist/assets/search.svg.js +0 -5
- package/dist/assets/share.svg.js +0 -5
- package/dist/assets/spotify.svg.js +0 -5
- package/dist/assets/wechat.svg.js +0 -5
- package/dist/assets/youtube.svg.js +0 -5
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { default as r } from "./AccountCircle.js";
|
|
2
|
+
import { default as a } from "./AppleAppStoreBadge.js";
|
|
3
|
+
import { default as l } from "./ArrowPrev.js";
|
|
4
|
+
import { default as s } from "./Calendar.js";
|
|
5
|
+
import { default as d } from "./CalendarAlt.js";
|
|
6
|
+
import { default as x } from "./CarouselArrowNext.js";
|
|
7
|
+
import { default as c } from "./CarouselArrowPrev.js";
|
|
8
|
+
import { default as C } from "./Checkmark.js";
|
|
9
|
+
import { default as I } from "./ChevronDown.js";
|
|
10
|
+
import { default as A } from "./ChevronNext.js";
|
|
11
|
+
import { default as g } from "./ChevronRight.js";
|
|
12
|
+
import { default as P } from "./Close.js";
|
|
13
|
+
import { default as w } from "./Favorite.js";
|
|
14
|
+
import { default as L } from "./FavoriteOutline.js";
|
|
15
|
+
import { default as b } from "./IconFooterFacebook.js";
|
|
16
|
+
import { default as W } from "./IconFooterInstagram.js";
|
|
17
|
+
import { default as B } from "./IconFooterLinkedin.js";
|
|
18
|
+
import { default as G } from "./IconFooterRed.js";
|
|
19
|
+
import { default as Y } from "./IconFooterWechat.js";
|
|
20
|
+
import { default as q } from "./IconGreenCircle.js";
|
|
21
|
+
import { default as E } from "./IconRedCircle.js";
|
|
22
|
+
import { default as J } from "./Instagram.js";
|
|
23
|
+
import { default as Q } from "./Lock.js";
|
|
24
|
+
import { default as U } from "./MagnificentSeven.js";
|
|
25
|
+
import { default as X } from "./Menu.js";
|
|
26
|
+
import { default as _ } from "./Minus.js";
|
|
27
|
+
import { default as ee } from "./PhillipsAppIcon.js";
|
|
28
|
+
import { default as re } from "./PhillipsLogo.js";
|
|
29
|
+
import { default as ae } from "./Plus.js";
|
|
30
|
+
import { default as le } from "./React.js";
|
|
31
|
+
import { default as se } from "./Search.js";
|
|
32
|
+
import { default as de } from "./Share.js";
|
|
33
|
+
import { default as xe } from "./Spotify.js";
|
|
34
|
+
import { default as ce } from "./Wechat.js";
|
|
35
|
+
import { default as Ce } from "./Youtube.js";
|
|
36
|
+
export {
|
|
37
|
+
r as AccountCircle,
|
|
38
|
+
a as AppleAppStoreBadge,
|
|
39
|
+
l as ArrowPrev,
|
|
40
|
+
s as Calendar,
|
|
41
|
+
d as CalendarAlt,
|
|
42
|
+
x as CarouselArrowNext,
|
|
43
|
+
c as CarouselArrowPrev,
|
|
44
|
+
C as Checkmark,
|
|
45
|
+
I as ChevronDown,
|
|
46
|
+
A as ChevronNext,
|
|
47
|
+
g as ChevronRight,
|
|
48
|
+
P as Close,
|
|
49
|
+
w as Favorite,
|
|
50
|
+
L as FavoriteOutline,
|
|
51
|
+
b as IconFooterFacebook,
|
|
52
|
+
W as IconFooterInstagram,
|
|
53
|
+
B as IconFooterLinkedin,
|
|
54
|
+
G as IconFooterRed,
|
|
55
|
+
Y as IconFooterWechat,
|
|
56
|
+
q as IconGreenCircle,
|
|
57
|
+
E as IconRedCircle,
|
|
58
|
+
J as Instagram,
|
|
59
|
+
Q as Lock,
|
|
60
|
+
U as MagnificentSeven,
|
|
61
|
+
X as Menu,
|
|
62
|
+
_ as Minus,
|
|
63
|
+
ee as PhillipsAppIcon,
|
|
64
|
+
re as PhillipsLogo,
|
|
65
|
+
ae as Plus,
|
|
66
|
+
le as React,
|
|
67
|
+
se as Search,
|
|
68
|
+
de as Share,
|
|
69
|
+
xe as Spotify,
|
|
70
|
+
ce as Wechat,
|
|
71
|
+
Ce as Youtube
|
|
72
|
+
};
|
|
@@ -1,134 +1,141 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Item as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as A, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Item as k, Trigger as x, Content as w } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
3
|
+
import h from "../../node_modules/classnames/index.js";
|
|
4
4
|
import { forwardRef as C, useRef as N, useCallback as R } from "react";
|
|
5
|
-
import
|
|
6
|
-
import T from "../../
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { getIconClasses as v } from "./utils.js";
|
|
11
|
-
const y = ({
|
|
5
|
+
import I from "../Icon/Icon.js";
|
|
6
|
+
import { getCommonProps as T } from "../../utils/index.js";
|
|
7
|
+
import { AccordionItemVariant as v } from "./types.js";
|
|
8
|
+
import { getIconClasses as _ } from "./utils.js";
|
|
9
|
+
const j = ({
|
|
12
10
|
children: n,
|
|
13
11
|
className: c,
|
|
14
12
|
baseClassName: t,
|
|
15
|
-
disable:
|
|
13
|
+
disable: r,
|
|
16
14
|
isLargeVariation: e,
|
|
17
|
-
id:
|
|
15
|
+
id: i,
|
|
18
16
|
onOpen: d,
|
|
19
17
|
onClose: l
|
|
20
18
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
19
|
+
const a = N(null), s = r, u = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
20
|
+
I,
|
|
23
21
|
{
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
icon: "Lock",
|
|
23
|
+
height: 24,
|
|
24
|
+
width: 24,
|
|
25
|
+
className: _(t, e, "lock"),
|
|
26
|
+
"data-testid": `${i}-lockedIcon`,
|
|
26
27
|
"aria-hidden": !0
|
|
27
28
|
}
|
|
28
|
-
) }),
|
|
29
|
-
|
|
29
|
+
) }), p = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
30
|
+
I,
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
icon: "Plus",
|
|
33
|
+
height: 24,
|
|
34
|
+
width: 24,
|
|
35
|
+
className: _(t, e, "plus"),
|
|
36
|
+
"data-testid": `${i}-plusIcon`,
|
|
33
37
|
"aria-hidden": !0
|
|
34
38
|
}
|
|
35
|
-
) }),
|
|
36
|
-
|
|
39
|
+
) }), f = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
40
|
+
I,
|
|
37
41
|
{
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
icon: "Minus",
|
|
43
|
+
height: 24,
|
|
44
|
+
width: 24,
|
|
45
|
+
className: _(t, e, "minus"),
|
|
46
|
+
"data-testid": `${i}-minusIcon`,
|
|
40
47
|
"aria-hidden": !0
|
|
41
48
|
}
|
|
42
|
-
) }),
|
|
43
|
-
|
|
49
|
+
) }), g = R(() => {
|
|
50
|
+
a.current?.getAttribute("data-state") === "closed" ? d?.() : l?.();
|
|
44
51
|
}, [d, l]);
|
|
45
52
|
return /* @__PURE__ */ o(
|
|
46
|
-
|
|
53
|
+
x,
|
|
47
54
|
{
|
|
48
|
-
"data-disabled":
|
|
55
|
+
"data-disabled": r,
|
|
49
56
|
asChild: !0,
|
|
50
|
-
className:
|
|
57
|
+
className: h(
|
|
51
58
|
t,
|
|
52
59
|
{ [`${t}--large`]: e },
|
|
53
|
-
{ [`${t}--hoverable`]: !
|
|
60
|
+
{ [`${t}--hoverable`]: !r },
|
|
54
61
|
c
|
|
55
62
|
),
|
|
56
|
-
ref:
|
|
57
|
-
onClick:
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */ o("div", { className:
|
|
60
|
-
s &&
|
|
61
|
-
!s &&
|
|
62
|
-
!s &&
|
|
63
|
+
ref: a,
|
|
64
|
+
onClick: g,
|
|
65
|
+
children: /* @__PURE__ */ A("div", { "data-testid": `${i}-trigger`, children: [
|
|
66
|
+
/* @__PURE__ */ o("div", { className: h(`${t}__text`, { [`${t}__text--lg`]: e }), children: n }),
|
|
67
|
+
s && u,
|
|
68
|
+
!s && p,
|
|
69
|
+
!s && f
|
|
63
70
|
] })
|
|
64
71
|
}
|
|
65
72
|
);
|
|
66
|
-
},
|
|
73
|
+
}, y = ({
|
|
67
74
|
children: n,
|
|
68
75
|
baseClassName: c,
|
|
69
76
|
disable: t,
|
|
70
|
-
hasTransition:
|
|
77
|
+
hasTransition: r,
|
|
71
78
|
isLargeVariation: e,
|
|
72
|
-
className:
|
|
79
|
+
className: i
|
|
73
80
|
}) => t && n ? /* @__PURE__ */ o("div", { className: `${c}__content--locked`, children: n }) : /* @__PURE__ */ o(
|
|
74
|
-
|
|
81
|
+
w,
|
|
75
82
|
{
|
|
76
83
|
asChild: !0,
|
|
77
|
-
className:
|
|
84
|
+
className: h(
|
|
78
85
|
`${c}__content`,
|
|
79
86
|
{ [`${c}__content--lg`]: e },
|
|
80
|
-
{ [`${c}--transition`]:
|
|
81
|
-
|
|
87
|
+
{ [`${c}--transition`]: r },
|
|
88
|
+
i
|
|
82
89
|
),
|
|
83
90
|
children: n
|
|
84
91
|
}
|
|
85
|
-
),
|
|
92
|
+
), O = C(
|
|
86
93
|
({
|
|
87
94
|
isLocked: n = !1,
|
|
88
|
-
variant: c =
|
|
95
|
+
variant: c = v.sm,
|
|
89
96
|
id: t,
|
|
90
|
-
label:
|
|
97
|
+
label: r,
|
|
91
98
|
isLastItem: e,
|
|
92
|
-
hasTransition:
|
|
99
|
+
hasTransition: i = !1,
|
|
93
100
|
children: d,
|
|
94
101
|
className: l,
|
|
95
|
-
transitionTimeInMs:
|
|
102
|
+
transitionTimeInMs: a = 250,
|
|
96
103
|
onOpen: s,
|
|
97
|
-
onClose:
|
|
98
|
-
...
|
|
99
|
-
},
|
|
100
|
-
const { className:
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
|
|
104
|
+
onClose: u,
|
|
105
|
+
...p
|
|
106
|
+
}, f) => {
|
|
107
|
+
const { className: g } = T({ id: t }, "Accordion"), $ = c === v.lg, m = `${g}-item`;
|
|
108
|
+
return /* @__PURE__ */ A(
|
|
109
|
+
k,
|
|
103
110
|
{
|
|
104
111
|
disabled: n,
|
|
105
112
|
value: t,
|
|
106
|
-
style: { "--seldon-accordion-transition-time": `${
|
|
107
|
-
className:
|
|
108
|
-
[`${
|
|
113
|
+
style: { "--seldon-accordion-transition-time": `${a}ms` },
|
|
114
|
+
className: h(m, l, {
|
|
115
|
+
[`${m}__border-bottom`]: !e
|
|
109
116
|
}),
|
|
110
|
-
ref:
|
|
111
|
-
...
|
|
117
|
+
ref: f,
|
|
118
|
+
...p,
|
|
112
119
|
children: [
|
|
113
120
|
/* @__PURE__ */ o(
|
|
114
|
-
|
|
121
|
+
j,
|
|
115
122
|
{
|
|
116
123
|
disable: n,
|
|
117
|
-
isLargeVariation:
|
|
124
|
+
isLargeVariation: $,
|
|
118
125
|
id: t,
|
|
119
|
-
baseClassName: `${
|
|
126
|
+
baseClassName: `${m}-label`,
|
|
120
127
|
onOpen: s,
|
|
121
|
-
onClose:
|
|
122
|
-
children:
|
|
128
|
+
onClose: u,
|
|
129
|
+
children: r
|
|
123
130
|
}
|
|
124
131
|
),
|
|
125
132
|
/* @__PURE__ */ o(
|
|
126
|
-
|
|
133
|
+
y,
|
|
127
134
|
{
|
|
128
135
|
disable: n,
|
|
129
|
-
hasTransition:
|
|
130
|
-
isLargeVariation:
|
|
131
|
-
baseClassName:
|
|
136
|
+
hasTransition: i,
|
|
137
|
+
isLargeVariation: $,
|
|
138
|
+
baseClassName: m,
|
|
132
139
|
children: /* @__PURE__ */ o("div", { className: "radix-accordion-content", children: d })
|
|
133
140
|
}
|
|
134
141
|
)
|
|
@@ -137,7 +144,7 @@ const y = ({
|
|
|
137
144
|
);
|
|
138
145
|
}
|
|
139
146
|
);
|
|
140
|
-
|
|
147
|
+
O.displayName = "AccordionItem";
|
|
141
148
|
export {
|
|
142
|
-
|
|
149
|
+
O as default
|
|
143
150
|
};
|
|
@@ -3,38 +3,38 @@ import { getCommonProps as u, px as t } from "../../utils/index.js";
|
|
|
3
3
|
import f from "../../node_modules/classnames/index.js";
|
|
4
4
|
import p from "./BreadcrumbItem.js";
|
|
5
5
|
import { SSRMediaQuery as c } from "../../providers/SeldonProvider/utils.js";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import x from "../Icon/Icon.js";
|
|
7
|
+
const M = ({
|
|
8
8
|
className: s,
|
|
9
9
|
items: a = [],
|
|
10
|
-
truncateIndex:
|
|
11
|
-
linkElement:
|
|
10
|
+
truncateIndex: i,
|
|
11
|
+
linkElement: n = "a",
|
|
12
12
|
...e
|
|
13
13
|
}) => {
|
|
14
|
-
const { className:
|
|
15
|
-
return /* @__PURE__ */ h("nav", { "aria-label": "Breadcrumb", className: f(
|
|
14
|
+
const { className: l, ...d } = u(e, "Breadcrumb"), { id: b } = e;
|
|
15
|
+
return /* @__PURE__ */ h("nav", { "aria-label": "Breadcrumb", className: f(l, s), ...d, ...e, children: [
|
|
16
16
|
/* @__PURE__ */ r(c.Media, { lessThan: "md", children: /* @__PURE__ */ r(
|
|
17
|
-
|
|
17
|
+
n,
|
|
18
18
|
{
|
|
19
19
|
href: a[1].href ? a[1].href : "/",
|
|
20
|
-
className: `${t}-icon-button ${t}-icon-button--primary ${
|
|
20
|
+
className: `${t}-icon-button ${t}-icon-button--primary ${l}__back-button`,
|
|
21
21
|
"data-testid": `${b}-back-button`,
|
|
22
|
-
children: /* @__PURE__ */ r(
|
|
22
|
+
children: /* @__PURE__ */ r(x, { icon: "ArrowPrev" })
|
|
23
23
|
}
|
|
24
24
|
) }),
|
|
25
|
-
/* @__PURE__ */ r(c.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ r("ol", { children: a.map((o,
|
|
25
|
+
/* @__PURE__ */ r(c.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ r("ol", { children: a.map((o, m) => /* @__PURE__ */ r(
|
|
26
26
|
p,
|
|
27
27
|
{
|
|
28
28
|
href: o.href,
|
|
29
29
|
label: o.label,
|
|
30
|
-
element:
|
|
31
|
-
isCurrent: a.length - 1 ===
|
|
32
|
-
isTruncateText:
|
|
30
|
+
element: n,
|
|
31
|
+
isCurrent: a.length - 1 === m,
|
|
32
|
+
isTruncateText: i === m
|
|
33
33
|
},
|
|
34
34
|
o.label
|
|
35
35
|
)) }) })
|
|
36
36
|
] });
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
M as default
|
|
40
40
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { getCommonProps as h } from "../../utils/index.js";
|
|
3
|
-
import
|
|
4
|
-
import u from "
|
|
5
|
-
const
|
|
6
|
-
className:
|
|
7
|
-
href:
|
|
3
|
+
import m from "../../node_modules/classnames/index.js";
|
|
4
|
+
import u from "../Icon/Icon.js";
|
|
5
|
+
const b = ({
|
|
6
|
+
className: o,
|
|
7
|
+
href: s,
|
|
8
8
|
label: r,
|
|
9
9
|
isCurrent: a = !1,
|
|
10
|
-
isTruncateText:
|
|
11
|
-
element:
|
|
10
|
+
isTruncateText: n = !1,
|
|
11
|
+
element: t = "a",
|
|
12
12
|
...l
|
|
13
13
|
}) => {
|
|
14
|
-
const { className: e, ...f } = h(l, "Breadcrumb"), p = a ? "page" : !1, i = a ? "" :
|
|
14
|
+
const { className: e, ...f } = h(l, "Breadcrumb"), p = a ? "page" : !1, i = a ? "" : s;
|
|
15
15
|
return /* @__PURE__ */ d(
|
|
16
16
|
"li",
|
|
17
17
|
{
|
|
18
18
|
"aria-label": r,
|
|
19
|
-
className:
|
|
19
|
+
className: m(`${e}__item`, { [`${e}--truncate`]: n }),
|
|
20
20
|
children: [
|
|
21
|
-
a ? /* @__PURE__ */
|
|
22
|
-
|
|
21
|
+
a ? /* @__PURE__ */ c("span", { className: m(e, o, { [`${e}--current`]: a }), children: r }) : /* @__PURE__ */ c(
|
|
22
|
+
t,
|
|
23
23
|
{
|
|
24
24
|
"aria-current": p,
|
|
25
|
-
className:
|
|
25
|
+
className: m(e, o, {
|
|
26
26
|
[`${e}--current`]: a
|
|
27
27
|
}),
|
|
28
28
|
href: i,
|
|
@@ -30,11 +30,11 @@ const g = ({
|
|
|
30
30
|
children: r
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
a ? null : /* @__PURE__ */
|
|
33
|
+
a ? null : /* @__PURE__ */ c(u, { icon: "ChevronNext", className: `${e}__chevron` })
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
b as default
|
|
40
40
|
};
|
|
@@ -21,7 +21,9 @@ export declare const CarouselWithDots: {
|
|
|
21
21
|
(props: CarouselProps & CarouselDotsProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
args: {
|
|
23
23
|
maxDots: number;
|
|
24
|
+
id: string;
|
|
24
25
|
} | {
|
|
26
|
+
id: string;
|
|
25
27
|
maxDots?: undefined;
|
|
26
28
|
};
|
|
27
29
|
argTypes: {};
|
|
@@ -30,6 +32,7 @@ export declare const CarouselWithDotsAndArrows: {
|
|
|
30
32
|
(props: CarouselProps & CarouselDotsProps): import("react/jsx-runtime").JSX.Element;
|
|
31
33
|
args: {
|
|
32
34
|
maxDots: number;
|
|
35
|
+
id: string;
|
|
33
36
|
};
|
|
34
37
|
argTypes: {};
|
|
35
38
|
};
|
|
@@ -37,6 +40,7 @@ export declare const CarouselWithDotsOverflow: {
|
|
|
37
40
|
(props: CarouselProps & CarouselDotsProps): import("react/jsx-runtime").JSX.Element;
|
|
38
41
|
args: {
|
|
39
42
|
maxDots: number;
|
|
43
|
+
id: string;
|
|
40
44
|
};
|
|
41
45
|
argTypes: {};
|
|
42
46
|
};
|
|
@@ -3,7 +3,7 @@ export type CarouselArrowsProps = ComponentProps<'div'>;
|
|
|
3
3
|
/**
|
|
4
4
|
* ## Overview
|
|
5
5
|
*
|
|
6
|
-
* Arrow
|
|
6
|
+
* Arrow navigation for the carousel.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
declare const CarouselArrows: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import u from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { getCommonProps as
|
|
3
|
+
import { forwardRef as p, useCallback as t } from "react";
|
|
4
|
+
import { getCommonProps as w } from "../../utils/index.js";
|
|
5
5
|
import { useCarousel as C } from "./utils.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const { className: e, ...l } = p(s, "CarouselArrows"), { api: r } = C(), i = a(() => {
|
|
6
|
+
import a from "../Icon/Icon.js";
|
|
7
|
+
const f = p(({ className: i, ...s }, n) => {
|
|
8
|
+
const { className: e, ...l } = w(s, "CarouselArrows"), { api: r } = C(), c = t(() => {
|
|
10
9
|
r && r.scrollPrev(!0);
|
|
11
|
-
}, [r]),
|
|
10
|
+
}, [r]), m = t(() => {
|
|
12
11
|
r && r.scrollNext(!0);
|
|
13
12
|
}, [r]);
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ d(
|
|
15
14
|
"div",
|
|
16
15
|
{
|
|
17
16
|
ref: n,
|
|
18
17
|
"aria-roledescription": "carousel-arrow-navigation",
|
|
19
|
-
className: u(`${e}`,
|
|
18
|
+
className: u(`${e}`, i),
|
|
20
19
|
...s,
|
|
21
20
|
...l,
|
|
22
21
|
children: [
|
|
23
|
-
/* @__PURE__ */ o("button", { "data-testid": "prev-arrow", className: `${e}-prev-btn`, onClick: () =>
|
|
24
|
-
/* @__PURE__ */ o("button", { "data-testid": "next-arrow", className: `${e}-next-btn`, onClick: () =>
|
|
22
|
+
/* @__PURE__ */ o("button", { "data-testid": "prev-arrow", className: `${e}-prev-btn`, onClick: () => c(), children: /* @__PURE__ */ o("div", { className: `${e}-prev-btn__icon`, children: /* @__PURE__ */ o(a, { icon: "CarouselArrowPrev", height: 32, width: 16 }) }) }),
|
|
23
|
+
/* @__PURE__ */ o("button", { "data-testid": "next-arrow", className: `${e}-next-btn`, onClick: () => m(), children: /* @__PURE__ */ o("div", { className: `${e}-next-btn__icon`, children: /* @__PURE__ */ o(a, { icon: "CarouselArrowNext", height: 32, width: 16 }) }) })
|
|
25
24
|
]
|
|
26
25
|
}
|
|
27
26
|
);
|
|
28
27
|
});
|
|
29
|
-
|
|
28
|
+
f.displayName = "CarouselArrows";
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
f as default
|
|
32
31
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import E from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { forwardRef as G,
|
|
4
|
-
import { useCarousel as
|
|
5
|
-
import { getCommonProps as
|
|
6
|
-
import { CarouselDot as
|
|
7
|
-
const h = 10, C = 12,
|
|
8
|
-
({ className:
|
|
9
|
-
const { className: c, ...
|
|
10
|
-
Array.from({ length:
|
|
11
|
-
), r =
|
|
3
|
+
import { forwardRef as G, useState as S, useRef as L, useCallback as l, useEffect as M, useMemo as q } from "react";
|
|
4
|
+
import { useCarousel as z } from "./utils.js";
|
|
5
|
+
import { getCommonProps as A } from "../../utils/index.js";
|
|
6
|
+
import { CarouselDot as F } from "./CarouselDot.js";
|
|
7
|
+
const h = 10, C = 12, H = (h + C) / 2, J = G(
|
|
8
|
+
({ className: v, maxDots: g = 9, position: V = "inline", numberOfSlides: b = 0, id: I, ...D }, k) => {
|
|
9
|
+
const { className: c, ...y } = A({ id: I, ...D }, "CarouselDots"), { api: t, onSlideChange: a } = z(), [R, T] = S(0), [i, O] = S(
|
|
10
|
+
Array.from({ length: b }, (e, o) => o)
|
|
11
|
+
), r = L(null), [$, w] = S([]), N = l((e) => {
|
|
12
12
|
r.current && r.current.scrollTo?.({
|
|
13
|
-
left: e * (h + C) - r.current.offsetWidth / 2 +
|
|
13
|
+
left: e * (h + C) - r.current.offsetWidth / 2 + H,
|
|
14
14
|
// Center dot in container
|
|
15
15
|
behavior: "smooth"
|
|
16
16
|
});
|
|
@@ -23,36 +23,36 @@ const h = 10, C = 12, J = (h + C) / 2, K = G(
|
|
|
23
23
|
O(e.scrollSnapList());
|
|
24
24
|
}, []), n = l(
|
|
25
25
|
(e) => {
|
|
26
|
-
T(e.selectedScrollSnap()),
|
|
26
|
+
T(e.selectedScrollSnap()), N(e.selectedScrollSnap());
|
|
27
27
|
},
|
|
28
|
-
[
|
|
28
|
+
[N]
|
|
29
29
|
), u = l(
|
|
30
30
|
(e) => {
|
|
31
31
|
a?.(e.selectedScrollSnap());
|
|
32
32
|
},
|
|
33
33
|
[a]
|
|
34
34
|
);
|
|
35
|
-
|
|
35
|
+
M(() => {
|
|
36
36
|
if (t)
|
|
37
37
|
return f(t), n(t), t.on("reInit", f).on("reInit", n).on("select", n).on("settle", u), () => {
|
|
38
38
|
t.off("reInit", f).off("reInit", n).off("select", n).off("settle", u);
|
|
39
39
|
};
|
|
40
40
|
}, [t, f, n, u]);
|
|
41
|
-
const s =
|
|
41
|
+
const s = q(() => $.sort((e, o) => e - o), [$]);
|
|
42
42
|
return /* @__PURE__ */ m(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
|
-
ref:
|
|
45
|
+
ref: k,
|
|
46
46
|
role: "group",
|
|
47
47
|
"aria-roledescription": "pagination",
|
|
48
48
|
"aria-label": "pagination",
|
|
49
|
-
className: E(`${c}`,
|
|
50
|
-
...
|
|
51
|
-
...
|
|
49
|
+
className: E(`${c}`, v, `${c}-${V}`),
|
|
50
|
+
...D,
|
|
51
|
+
...y,
|
|
52
52
|
children: /* @__PURE__ */ m("div", { className: `${c}-container`, children: /* @__PURE__ */ m(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
|
-
style: { "--max-width": `${
|
|
55
|
+
style: { "--max-width": `${g * h + (g - 1) * C + 2}px` },
|
|
56
56
|
className: `${c}-container-inner`,
|
|
57
57
|
ref: r,
|
|
58
58
|
children: i.map((e, o) => {
|
|
@@ -64,17 +64,17 @@ const h = 10, C = 12, J = (h + C) / 2, K = G(
|
|
|
64
64
|
!(o >= i.length - 2 && s.includes(i.length - 1) && s.includes(i.length - 2))
|
|
65
65
|
);
|
|
66
66
|
return /* @__PURE__ */ m(
|
|
67
|
-
|
|
67
|
+
F,
|
|
68
68
|
{
|
|
69
69
|
onClick: () => P(o),
|
|
70
70
|
isSelected: W,
|
|
71
71
|
scrollableContainerRef: r,
|
|
72
72
|
onInViewChange: (j) => {
|
|
73
|
-
|
|
73
|
+
w(j ? (p) => [...p, o] : (p) => p.filter((B) => B !== o));
|
|
74
74
|
},
|
|
75
75
|
variant: _ ? "sm" : "md"
|
|
76
76
|
},
|
|
77
|
-
`${
|
|
77
|
+
`${I}-dot-${o}`
|
|
78
78
|
);
|
|
79
79
|
})
|
|
80
80
|
}
|
|
@@ -83,7 +83,7 @@ const h = 10, C = 12, J = (h + C) / 2, K = G(
|
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
|
|
86
|
+
J.displayName = "CarouselDots";
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
J as default
|
|
89
89
|
};
|