@phillips/seldon 1.53.1 → 1.54.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/_virtual/Breakpoints.js +4 -0
- package/dist/_virtual/DynamicResponsive.js +4 -0
- package/dist/_virtual/Interactions.js +4 -0
- package/dist/_virtual/Media.js +4 -0
- package/dist/_virtual/MediaQueries.js +4 -0
- package/dist/_virtual/Utils.js +4 -0
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index6.js +4 -0
- package/dist/components/{ReadMore/ReadMore.d.ts → ContentPeek/ContentPeek.d.ts} +8 -8
- package/dist/components/ContentPeek/ContentPeek.js +64 -0
- package/dist/components/ContentPeek/index.d.ts +1 -0
- package/dist/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/Navigation/Navigation.js +24 -24
- package/dist/components/Search/Search.js +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.js +52 -50
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +281 -0
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +151 -0
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +138 -0
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +167 -0
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +130 -0
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +94 -0
- package/dist/node_modules/@artsy/fresnel/dist/index.js +21 -0
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-modal/lib/index.js +1 -1
- package/dist/{components → patterns}/HeroBanner/HeroBanner.js +2 -2
- package/dist/patterns/LanguageSelector/LanguageSelector.js +74 -0
- package/dist/{components → patterns}/Social/Social.js +4 -4
- package/dist/{components → patterns}/Subscribe/Subscribe.d.ts +1 -1
- package/dist/{components → patterns}/Subscribe/Subscribe.js +3 -3
- package/dist/{components → patterns}/UserManagement/UserManagement.d.ts +1 -1
- package/dist/{components → patterns}/UserManagement/UserManagement.js +2 -2
- package/dist/{components → patterns}/ViewingsList/ViewingsList.js +1 -1
- package/dist/{components → patterns}/ViewingsList/ViewingsListCard.js +3 -3
- package/dist/{components → patterns}/ViewingsList/ViewingsListCardForm.js +1 -1
- package/dist/providers/SeldonProvider.d.ts +7 -0
- package/dist/providers/SeldonProvider.js +9 -0
- package/dist/providers/utils.d.ts +5 -0
- package/dist/providers/utils.js +8 -0
- package/dist/scss/_vars.scss +1 -1
- package/dist/scss/componentStyles.scss +13 -9
- package/dist/scss/components/{ReadMore/_readMore.scss → ContentPeek/_contentPeek.scss} +2 -2
- package/dist/scss/{components → patterns}/LanguageSelector/_languageSelector.scss +5 -22
- package/dist/scss/{components → site-furniture}/Header/_header.scss +0 -9
- package/dist/{components → site-furniture}/Footer/Footer.js +2 -2
- package/dist/{components → site-furniture}/Header/Header.d.ts +1 -1
- package/dist/{components → site-furniture}/Header/Header.js +23 -23
- package/dist/utils/constants.d.ts +8 -0
- package/dist/utils/constants.js +10 -0
- package/package.json +2 -1
- package/dist/components/LanguageSelector/LanguageSelector.js +0 -73
- package/dist/components/ReadMore/ReadMore.js +0 -57
- package/dist/components/ReadMore/index.d.ts +0 -1
- /package/dist/{components → patterns}/HeroBanner/HeroBanner.d.ts +0 -0
- /package/dist/{components → patterns}/LanguageSelector/LanguageSelector.d.ts +0 -0
- /package/dist/{components → patterns}/LanguageSelector/index.d.ts +0 -0
- /package/dist/{components → patterns}/Social/Social.d.ts +0 -0
- /package/dist/{components → patterns}/Subscribe/types.d.ts +0 -0
- /package/dist/{components → patterns}/Subscribe/types.js +0 -0
- /package/dist/{components → patterns}/UserManagement/types.d.ts +0 -0
- /package/dist/{components → patterns}/UserManagement/types.js +0 -0
- /package/dist/{components → patterns}/ViewingsList/StatefulViewingsList.d.ts +0 -0
- /package/dist/{components → patterns}/ViewingsList/StatefulViewingsList.js +0 -0
- /package/dist/{components → patterns}/ViewingsList/ViewingsList.d.ts +0 -0
- /package/dist/{components → patterns}/ViewingsList/ViewingsListCard.d.ts +0 -0
- /package/dist/{components → patterns}/ViewingsList/ViewingsListCardForm.d.ts +0 -0
- /package/dist/scss/{components → patterns}/HeroBanner/_heroBanner.scss +0 -0
- /package/dist/scss/{components → patterns}/Social/_social.scss +0 -0
- /package/dist/scss/{components → patterns}/Subscribe/_subscribe.scss +0 -0
- /package/dist/scss/{components → patterns}/UserManagement/_userManagement.scss +0 -0
- /package/dist/scss/{components → patterns}/ViewingsList/_viewingsList.scss +0 -0
- /package/dist/scss/{components → site-furniture}/Footer/_footer.scss +0 -0
- /package/dist/{components → site-furniture}/Footer/Footer.d.ts +0 -0
- /package/dist/{components → site-furniture}/Header/utils.d.ts +0 -0
- /package/dist/{components → site-furniture}/Header/utils.js +0 -0
package/dist/scss/_vars.scss
CHANGED
|
@@ -100,7 +100,7 @@ $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $h
|
|
|
100
100
|
$snwHeaderLink;
|
|
101
101
|
|
|
102
102
|
////////////////////////
|
|
103
|
-
/// Breakpoint TOKENS to be used for min-width comparisons
|
|
103
|
+
/// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
|
|
104
104
|
///////////////////////
|
|
105
105
|
$breakpoint-sm: 361px;
|
|
106
106
|
$breakpoint-md: 961px;
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
// ⚛️ Components
|
|
9
9
|
@use 'components/Button/button';
|
|
10
10
|
@use 'components/IconButton/iconButton';
|
|
11
|
-
@use 'components/Footer/footer';
|
|
12
11
|
@use 'components/Grid/grid';
|
|
13
|
-
@use 'components/Header/header';
|
|
14
|
-
@use 'components/HeroBanner/heroBanner';
|
|
15
12
|
@use 'components/Navigation/navigation';
|
|
16
13
|
@use 'components/Navigation/NavigationItem/navigationItem';
|
|
17
14
|
@use 'components/Navigation/NavigationItemTrigger/navigationItemTrigger';
|
|
@@ -22,12 +19,8 @@
|
|
|
22
19
|
@use 'components/Search/search';
|
|
23
20
|
@use 'components/Search/searchButton';
|
|
24
21
|
@use 'components/Search/SearchResults/searchResults';
|
|
25
|
-
@use 'components/Social/social';
|
|
26
22
|
@use 'components/SplitPanel/splitPanel';
|
|
27
|
-
@use 'components/Subscribe/subscribe';
|
|
28
23
|
@use 'components/Toggle/toggle';
|
|
29
|
-
@use 'components/UserManagement/userManagement';
|
|
30
|
-
@use 'components/ViewingsList/viewingsList';
|
|
31
24
|
@use 'components/Link/link';
|
|
32
25
|
@use 'components/LinkBlock/linkBlock';
|
|
33
26
|
@use 'components/LinkList/linkList';
|
|
@@ -39,5 +32,16 @@
|
|
|
39
32
|
@use 'components/HTMLParser/htmlParser';
|
|
40
33
|
@use 'components/Dropdown/dropdown';
|
|
41
34
|
@use 'components/Video/video';
|
|
42
|
-
@use 'components/
|
|
43
|
-
|
|
35
|
+
@use 'components/ContentPeek/contentPeek';
|
|
36
|
+
|
|
37
|
+
// Patterns
|
|
38
|
+
@use 'patterns/HeroBanner/heroBanner';
|
|
39
|
+
@use 'patterns/LanguageSelector/languageSelector';
|
|
40
|
+
@use 'patterns/UserManagement/userManagement';
|
|
41
|
+
@use 'patterns/ViewingsList/viewingsList';
|
|
42
|
+
@use 'patterns/Subscribe/subscribe';
|
|
43
|
+
@use 'patterns/Social/social';
|
|
44
|
+
|
|
45
|
+
// Site Furniture
|
|
46
|
+
@use 'site-furniture/Header/header';
|
|
47
|
+
@use 'site-furniture/Footer/footer';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '../../allPartials' as *;
|
|
2
2
|
|
|
3
|
-
.#{$px}-
|
|
3
|
+
.#{$px}-content-peek {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
gap: 12px;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
|
|
12
12
|
&[data-state='closed'] {
|
|
13
|
-
max-height: var(--
|
|
13
|
+
max-height: var(--content-peek-max-height);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -13,35 +13,18 @@
|
|
|
13
13
|
pointer-events: none;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@include isHeaderDesktop {
|
|
17
|
-
&.#{$px}-accordion {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
16
|
&.#{$px}-dropdown {
|
|
23
|
-
display:
|
|
24
|
-
padding:
|
|
17
|
+
display: flex;
|
|
18
|
+
padding: 0;
|
|
25
19
|
|
|
26
20
|
button {
|
|
27
21
|
border: none;
|
|
28
22
|
box-shadow: unset;
|
|
29
|
-
justify-content:
|
|
23
|
+
justify-content: center;
|
|
30
24
|
outline: none;
|
|
31
|
-
padding: 0.5rem 0.65rem;
|
|
32
|
-
text-transform: unset;
|
|
33
|
-
width: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@include isHeaderDesktop {
|
|
37
|
-
display: flex;
|
|
38
25
|
padding: 0;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
justify-content: center;
|
|
42
|
-
padding: 0;
|
|
43
|
-
width: fit-content;
|
|
44
|
-
}
|
|
26
|
+
text-transform: unset;
|
|
27
|
+
width: fit-content;
|
|
45
28
|
}
|
|
46
29
|
}
|
|
47
30
|
}
|
|
@@ -96,11 +96,6 @@
|
|
|
96
96
|
justify-content: space-between;
|
|
97
97
|
padding: $padding-sm $spacing-md;
|
|
98
98
|
width: 100%;
|
|
99
|
-
|
|
100
|
-
/** There are actually two language selectors in the DOM, show this one in desktop */
|
|
101
|
-
.#{$px}-language-selector {
|
|
102
|
-
display: none;
|
|
103
|
-
}
|
|
104
99
|
}
|
|
105
100
|
|
|
106
101
|
&__nav {
|
|
@@ -130,10 +125,6 @@
|
|
|
130
125
|
position: relative;
|
|
131
126
|
top: 0;
|
|
132
127
|
width: 100%;
|
|
133
|
-
|
|
134
|
-
div.#{$px}-language-selector {
|
|
135
|
-
display: none; // hide this one on mobile
|
|
136
|
-
}
|
|
137
128
|
}
|
|
138
129
|
|
|
139
130
|
.#{$px}-nav__item {
|
|
@@ -2,8 +2,8 @@ import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import l from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { px as r, defaultYear as m } from "../../utils/index.js";
|
|
4
4
|
import f from "../../assets/PhillipsLogo.svg.js";
|
|
5
|
-
import { TextVariants as c } from "
|
|
6
|
-
import d from "
|
|
5
|
+
import { TextVariants as c } from "../../components/Text/types.js";
|
|
6
|
+
import d from "../../components/Text/Text.js";
|
|
7
7
|
const $ = ({
|
|
8
8
|
children: a,
|
|
9
9
|
className: i,
|
|
@@ -36,7 +36,7 @@ export declare const HeaderContext: React.Context<HeaderContextType>;
|
|
|
36
36
|
/**
|
|
37
37
|
* ## Overview
|
|
38
38
|
*
|
|
39
|
-
* This component allows navigation, search, login/logout, and language selection and supports desktop and mobile layouts
|
|
39
|
+
* This component allows navigation, search, login/logout, and language selection and supports desktop and mobile layouts. It requires the <SeldonProvider> to be wrapped around it to support SSR Media Queries.
|
|
40
40
|
*
|
|
41
41
|
* [Figma Link Mobile](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10877-33417&node-type=INSTANCE&m=dev)
|
|
42
42
|
*
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import l, { createContext as O, forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { findChildrenOfType as
|
|
2
|
+
import l, { createContext as O, forwardRef as T, useState as h } from "react";
|
|
3
|
+
import d from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { findChildrenOfType as s, findChildrenExcludingTypes as P, px as e } from "../../utils/index.js";
|
|
5
5
|
import j from "../../assets/PhillipsLogo.svg.js";
|
|
6
|
-
import p from "
|
|
7
|
-
import g from "
|
|
8
|
-
import f from "
|
|
9
|
-
import { defaultHeaderContext as
|
|
10
|
-
|
|
6
|
+
import p from "../../patterns/UserManagement/UserManagement.js";
|
|
7
|
+
import g from "../../patterns/LanguageSelector/LanguageSelector.js";
|
|
8
|
+
import f from "../../components/Navigation/Navigation.js";
|
|
9
|
+
import { defaultHeaderContext as R } from "./utils.js";
|
|
10
|
+
import { SSRMediaQuery as w } from "../../providers/utils.js";
|
|
11
|
+
const I = O(R), L = T(
|
|
11
12
|
({
|
|
12
|
-
logo:
|
|
13
|
+
logo: i = /* @__PURE__ */ a(j, {}),
|
|
13
14
|
className: u,
|
|
14
15
|
children: r,
|
|
15
16
|
toggleOpenText: _ = "Open Menu",
|
|
16
17
|
toggleCloseText: v = "Close Menu",
|
|
17
18
|
logoText: x = "Home Page",
|
|
18
19
|
...C
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
}, y) => {
|
|
21
|
+
const E = s(r, p), m = s(r, g), [c, M] = h(!1), $ = s(r, f), b = P(r, [f, p, g]), [n, N] = h(!1), S = n ? v : _, H = function() {
|
|
22
|
+
N((t) => !t);
|
|
22
23
|
};
|
|
23
|
-
return /* @__PURE__ */ o("header", { ...C, className:
|
|
24
|
+
return /* @__PURE__ */ o("header", { ...C, className: d(`${e}-header`, u), ref: y, children: [
|
|
24
25
|
/* @__PURE__ */ o("div", { className: `${e}-header__top-row`, children: [
|
|
25
|
-
m,
|
|
26
|
-
" ",
|
|
26
|
+
/* @__PURE__ */ a(w.Media, { greaterThanOrEqual: "md", children: m }),
|
|
27
27
|
/* @__PURE__ */ o(
|
|
28
28
|
"button",
|
|
29
29
|
{
|
|
@@ -31,7 +31,7 @@ const I = O(w), L = P(
|
|
|
31
31
|
"data-testid": "mobile-menu-toggle",
|
|
32
32
|
type: "button",
|
|
33
33
|
onClick: H,
|
|
34
|
-
className:
|
|
34
|
+
className: d(`${e}-header__toggle-btn`, {
|
|
35
35
|
[`${e}-header__toggle-btn--open`]: n
|
|
36
36
|
}),
|
|
37
37
|
children: [
|
|
@@ -40,20 +40,20 @@ const I = O(w), L = P(
|
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: "/", "aria-label": x, children: typeof
|
|
44
|
-
|
|
43
|
+
/* @__PURE__ */ a("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ a("a", { href: "/", "aria-label": x, children: typeof i == "object" ? i : /* @__PURE__ */ a("img", { alt: "Phillips", "data-testid": "header-logo-img", src: i, height: "14" }) }) }),
|
|
44
|
+
E
|
|
45
45
|
] }),
|
|
46
|
-
/* @__PURE__ */ a("div", { className:
|
|
46
|
+
/* @__PURE__ */ a("div", { className: d(`${e}-header__nav`, { [`${e}-header__nav--closed`]: !n }), children: /* @__PURE__ */ o(
|
|
47
47
|
I.Provider,
|
|
48
48
|
{
|
|
49
49
|
value: {
|
|
50
50
|
isMenuOpen: n,
|
|
51
51
|
isSearchExpanded: c,
|
|
52
|
-
setIsSearchExpanded:
|
|
52
|
+
setIsSearchExpanded: M
|
|
53
53
|
},
|
|
54
54
|
children: [
|
|
55
55
|
l.Children.map(
|
|
56
|
-
|
|
56
|
+
$,
|
|
57
57
|
(t) => l.isValidElement(t) ? l.cloneElement(t, {
|
|
58
58
|
children: [
|
|
59
59
|
...l.Children.toArray(t.props.children),
|
|
@@ -61,11 +61,11 @@ const I = O(w), L = P(
|
|
|
61
61
|
]
|
|
62
62
|
}) : t
|
|
63
63
|
),
|
|
64
|
-
|
|
64
|
+
b
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
) }),
|
|
68
|
-
/* @__PURE__ */ a("div", { className:
|
|
68
|
+
/* @__PURE__ */ a("div", { className: d(`${e}-header__overlay`, { [`${e}-header__overlay--active`]: c }) })
|
|
69
69
|
] });
|
|
70
70
|
}
|
|
71
71
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"prepare": "husky install"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@artsy/fresnel": "^7.1.4",
|
|
43
44
|
"@radix-ui/react-accordion": "^1.2.0",
|
|
44
45
|
"@radix-ui/react-collapsible": "^1.1.0",
|
|
45
46
|
"@radix-ui/react-dialog": "^1.1.1",
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { jsxs as b, Fragment as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as L } from "react";
|
|
3
|
-
import { getCommonProps as N, noOp as x } from "../../utils/index.js";
|
|
4
|
-
import C from "../../node_modules/classnames/index.js";
|
|
5
|
-
import { SupportedLanguages as s } from "../../types/commonTypes.js";
|
|
6
|
-
import S from "../Dropdown/Dropdown.js";
|
|
7
|
-
import k from "../Accordion/Accordion.js";
|
|
8
|
-
import w from "../Accordion/AccordionItem.js";
|
|
9
|
-
import y from "../Navigation/NavigationItem/NavigationItem.js";
|
|
10
|
-
import { LinkVariants as P } from "../Link/types.js";
|
|
11
|
-
import { TextVariants as T } from "../Text/types.js";
|
|
12
|
-
import V from "../Text/Text.js";
|
|
13
|
-
import j from "../Navigation/NavigationList/NavigationList.js";
|
|
14
|
-
const A = ({
|
|
15
|
-
id: o,
|
|
16
|
-
value: n,
|
|
17
|
-
// can't be passed to the accordion
|
|
18
|
-
onValueChange: r,
|
|
19
|
-
label: t,
|
|
20
|
-
options: l,
|
|
21
|
-
...m
|
|
22
|
-
}) => /* @__PURE__ */ e(k, { ...m, children: /* @__PURE__ */ e(
|
|
23
|
-
w,
|
|
24
|
-
{
|
|
25
|
-
variation: "sm",
|
|
26
|
-
id: o != null ? o : "language-selector-accordion",
|
|
27
|
-
label: /* @__PURE__ */ e(V, { variant: T.snwHeaderLink, children: t }),
|
|
28
|
-
children: /* @__PURE__ */ e(j, { id: `${o}-navlist`, children: l.map((a) => /* @__PURE__ */ e(
|
|
29
|
-
y,
|
|
30
|
-
{
|
|
31
|
-
label: a.label,
|
|
32
|
-
onClick: () => r(a.value),
|
|
33
|
-
navType: P.snwFlyoutLink
|
|
34
|
-
},
|
|
35
|
-
a.value
|
|
36
|
-
)) })
|
|
37
|
-
}
|
|
38
|
-
) }), E = L(
|
|
39
|
-
({
|
|
40
|
-
className: o,
|
|
41
|
-
currentLanguage: n = s.en,
|
|
42
|
-
languageOptions: r = [
|
|
43
|
-
{ label: "English", value: s.en },
|
|
44
|
-
{ label: "中文", value: s.zh }
|
|
45
|
-
],
|
|
46
|
-
onLanguageChange: t = x,
|
|
47
|
-
id: l,
|
|
48
|
-
isHidden: m,
|
|
49
|
-
...a
|
|
50
|
-
}, c) => {
|
|
51
|
-
var g, f;
|
|
52
|
-
const { className: p, ...v } = N({ id: l }, "LanguageSelector"), d = (f = (g = r.find((i) => i.value === n)) == null ? void 0 : g.label) != null ? f : "English", u = {
|
|
53
|
-
...v,
|
|
54
|
-
...a,
|
|
55
|
-
id: l,
|
|
56
|
-
className: C(p, o, {
|
|
57
|
-
[`${p}--hidden`]: m
|
|
58
|
-
}),
|
|
59
|
-
options: r,
|
|
60
|
-
value: n,
|
|
61
|
-
onValueChange: (i) => t(i),
|
|
62
|
-
label: d
|
|
63
|
-
};
|
|
64
|
-
return /* @__PURE__ */ b(h, { children: [
|
|
65
|
-
/* @__PURE__ */ e(S, { ...u, ref: c }),
|
|
66
|
-
/* @__PURE__ */ e(A, { ...u, ref: c })
|
|
67
|
-
] });
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
E.displayName = "LanguageSelector";
|
|
71
|
-
export {
|
|
72
|
-
E as default
|
|
73
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as N, useState as i, useRef as R, useEffect as x, useCallback as $ } from "react";
|
|
3
|
-
import c from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { getCommonProps as M } from "../../utils/index.js";
|
|
5
|
-
import b from "../Button/Button.js";
|
|
6
|
-
import { ButtonVariants as w } from "../Button/types.js";
|
|
7
|
-
import E from "../Collapsible/Collapsible.js";
|
|
8
|
-
import O from "../Collapsible/CollapsibleContent.js";
|
|
9
|
-
import P from "../Collapsible/CollapsibleTrigger.js";
|
|
10
|
-
import S from "../../assets/plus.svg.js";
|
|
11
|
-
import j from "../../assets/minus.svg.js";
|
|
12
|
-
const B = N(
|
|
13
|
-
({ className: d, children: l, readMoreText: f = "Read More", readLessText: u = "Read Less", maxHeight: s = 480, ...o }, p) => {
|
|
14
|
-
const { className: e, ...g } = M(o, "ReadMore"), [a, v] = i(!1), [n, C] = i(!1), t = R(null);
|
|
15
|
-
x(() => {
|
|
16
|
-
t.current && C(t.current.scrollHeight > s);
|
|
17
|
-
}, [l, s]);
|
|
18
|
-
const h = $(() => {
|
|
19
|
-
v((y) => !y);
|
|
20
|
-
}, []);
|
|
21
|
-
return /* @__PURE__ */ m(
|
|
22
|
-
E,
|
|
23
|
-
{
|
|
24
|
-
id: o == null ? void 0 : o.id,
|
|
25
|
-
open: a,
|
|
26
|
-
onOpenChange: h,
|
|
27
|
-
className: c(e, d),
|
|
28
|
-
style: {
|
|
29
|
-
"--read-more-max-height": `${s}px`
|
|
30
|
-
},
|
|
31
|
-
ref: p,
|
|
32
|
-
...g,
|
|
33
|
-
...o,
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ r(O, { className: `${e}-content`, ref: t, forceMount: !0, children: l }),
|
|
36
|
-
n ? /* @__PURE__ */ r(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
className: c(`${e}-overlay`, {
|
|
40
|
-
[`${e}-overlay--expanded`]: a,
|
|
41
|
-
[`${e}-overlay--gradient`]: n && !a
|
|
42
|
-
}),
|
|
43
|
-
children: /* @__PURE__ */ r("div", { className: `${e}-overlay-trigger-wrapper`, children: /* @__PURE__ */ r(P, { asChild: !0, className: `${e}-overlay-trigger`, children: /* @__PURE__ */ m(b, { variant: w.secondary, children: [
|
|
44
|
-
a ? /* @__PURE__ */ r(j, {}) : /* @__PURE__ */ r(S, {}),
|
|
45
|
-
a ? u : f
|
|
46
|
-
] }) }) })
|
|
47
|
-
}
|
|
48
|
-
) : null
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
B.displayName = "ReadMore";
|
|
55
|
-
export {
|
|
56
|
-
B as default
|
|
57
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ReadMore, type ReadMoreProps } from './ReadMore';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|