@phillips/seldon 1.245.0 → 1.247.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/index10.js +2 -2
- package/dist/_virtual/index11.js +2 -2
- package/dist/_virtual/index6.js +5 -3
- package/dist/_virtual/index7.js +3 -5
- package/dist/_virtual/index8.js +2 -2
- package/dist/_virtual/index9.js +2 -2
- package/dist/assets/formatted/Search.js +8 -9
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -1
- package/dist/components/Accordion/AccordionItem.d.ts +0 -5
- package/dist/components/Accordion/AccordionItem.js +66 -94
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Accordion/types.d.ts +0 -12
- package/dist/components/Accordion/types.js +1 -2
- package/dist/components/Accordion/utils.d.ts +2 -3
- package/dist/components/Accordion/utils.js +7 -9
- package/dist/components/AddToCalendar/calendarLinks.js +1 -1
- package/dist/components/Input/utils.js +5 -3
- package/dist/components/Navigation/Navigation.js +51 -27
- package/dist/components/Navigation/Navigation.stories.d.ts +1 -2
- package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +8 -0
- package/dist/components/Navigation/NavigationItem/NavigationItem.js +43 -42
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationDesktopSubmenu.d.ts +17 -0
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationDesktopSubmenu.js +70 -0
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.d.ts +31 -0
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.js +68 -0
- package/dist/components/Navigation/NavigationItemWithSubmenu/index.d.ts +2 -0
- package/dist/components/Navigation/NavigationList/NavigationList.d.ts +11 -8
- package/dist/components/Navigation/NavigationList/NavigationList.js +21 -46
- package/dist/components/Navigation/NavigationSubmenu/NavigationSubmenu.d.ts +33 -0
- package/dist/components/Navigation/NavigationSubmenu/NavigationSubmenu.js +41 -0
- package/dist/components/Navigation/NavigationSubmenu/NavigationSubmenu.test.d.ts +1 -0
- package/dist/components/Search/Search.js +51 -47
- package/dist/components/Search/SearchButton.js +10 -10
- package/dist/components/Search/SearchResults/SearchResults.d.ts +2 -1
- package/dist/components/Search/SearchResults/SearchResults.js +22 -21
- package/dist/index.d.ts +3 -1
- package/dist/index.js +236 -233
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +597 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-collection/dist/index.js +50 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/node_modules/@radix-ui/react-visually-hidden/dist/index.js +32 -0
- package/dist/node_modules/ics/dist/index.js +1 -1
- package/dist/node_modules/ics/dist/pipeline/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-transition-group/esm/CSSTransition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/dist/patterns/UserManagement/UserManagement.js +45 -27
- package/dist/scss/componentStyles.scss +1 -1
- package/dist/scss/components/Accordion/_accordion.scss +6 -12
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +0 -12
- package/dist/scss/components/Navigation/NavigationItemWithSubmenu/_navigationItemWithSubmenu.scss +114 -0
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +15 -3
- package/dist/scss/components/Navigation/_navigation.scss +109 -0
- package/dist/scss/components/Search/_search.scss +1 -0
- package/dist/scss/site-furniture/Header/_header.scss +24 -0
- package/dist/site-furniture/Header/Header.d.ts +8 -4
- package/dist/site-furniture/Header/Header.js +55 -50
- package/dist/site-furniture/Header/Header.stories.d.ts +278 -0
- package/dist/site-furniture/Header/utils.js +1 -2
- package/package.json +5 -1
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.d.ts +0 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +0 -80
- package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +0 -111
- /package/dist/components/Navigation/{NavigationItemTrigger/NavigationItemTrigger.test.d.ts → NavigationItemWithSubmenu/NavigationItemWithSubmenu.test.d.ts} +0 -0
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index11.js
CHANGED
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../node_modules/prop-types/index.js";
|
|
3
|
+
var p = /* @__PURE__ */ o();
|
|
4
|
+
const s = /* @__PURE__ */ r(p);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
s as default
|
|
5
7
|
};
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var p = /* @__PURE__ */ o();
|
|
4
|
-
const s = /* @__PURE__ */ r(p);
|
|
1
|
+
import { __require as r } from "../node_modules/ics/dist/index.js";
|
|
2
|
+
var i = r();
|
|
5
3
|
export {
|
|
6
|
-
|
|
4
|
+
i as d
|
|
7
5
|
};
|
package/dist/_virtual/index8.js
CHANGED
package/dist/_virtual/index9.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { memo as m, forwardRef as f } from "react";
|
|
3
|
-
import { kebabCase as
|
|
4
|
-
const
|
|
5
|
-
f((
|
|
6
|
-
const { color: r, height: d, width: a, title: e, titleId: n } =
|
|
3
|
+
import { kebabCase as h } from "../../node_modules/change-case/dist/index.js";
|
|
4
|
+
const u = m(
|
|
5
|
+
f((t, o) => {
|
|
6
|
+
const { color: r, height: d, width: a, title: e, titleId: n } = t, l = e ? n || h(e) : void 0;
|
|
7
7
|
return /* @__PURE__ */ s(
|
|
8
8
|
"svg",
|
|
9
9
|
{
|
|
@@ -12,12 +12,11 @@ const g = m(
|
|
|
12
12
|
viewBox: "0 0 24 24",
|
|
13
13
|
height: d,
|
|
14
14
|
width: a,
|
|
15
|
-
role: "img",
|
|
16
15
|
ref: o,
|
|
17
|
-
"aria-labelledby":
|
|
18
|
-
...
|
|
16
|
+
...l ? { role: "img", "aria-labelledby": l } : { "aria-hidden": !0 },
|
|
17
|
+
...t,
|
|
19
18
|
children: [
|
|
20
|
-
e ? /* @__PURE__ */ i("title", { id:
|
|
19
|
+
e && l ? /* @__PURE__ */ i("title", { id: l, children: e }) : null,
|
|
21
20
|
/* @__PURE__ */ i(
|
|
22
21
|
"path",
|
|
23
22
|
{
|
|
@@ -33,5 +32,5 @@ const g = m(
|
|
|
33
32
|
})
|
|
34
33
|
);
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
u as default
|
|
37
36
|
};
|
|
@@ -15,7 +15,6 @@ declare const meta: {
|
|
|
15
15
|
};
|
|
16
16
|
export default meta;
|
|
17
17
|
export declare const Default: ({ transitionTimeInMs, ...props }: AccordionProps & AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare const AccordionSmall: ({ transitionTimeInMs, ...props }: AccordionProps & AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
18
|
export declare const AccordionSubmenu: ({ transitionTimeInMs, ...props }: AccordionProps & AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export declare const ControlledAccordion: ({ items, ...props }: AccordionProps & {
|
|
21
20
|
items: AccordionItemProps[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { AccordionItemVariant } from './types';
|
|
3
2
|
export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
/**
|
|
5
4
|
* When true, prevents border bottom style from being applied to the item.
|
|
@@ -9,10 +8,6 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
9
8
|
* When true, prevents the user from interacting with the item.
|
|
10
9
|
*/
|
|
11
10
|
isLocked?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Determines whether the variant on text style is large or small.
|
|
14
|
-
*/
|
|
15
|
-
variant?: AccordionItemVariant;
|
|
16
11
|
/**
|
|
17
12
|
* Uniqueid for the Accordion Item.
|
|
18
13
|
*/
|
|
@@ -1,140 +1,112 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Item as
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
import { getCommonProps as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
className: n,
|
|
14
|
-
baseClassName: o,
|
|
15
|
-
disable: r,
|
|
16
|
-
id: c,
|
|
17
|
-
variant: i = d.md,
|
|
18
|
-
onOpen: l,
|
|
19
|
-
onClose: m
|
|
20
|
-
}) => {
|
|
21
|
-
const u = w(null), s = r, p = i === d.md ? h.labelMedium : h.labelSmall, f = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
22
|
-
I,
|
|
1
|
+
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Item as C, Trigger as N, Content as x } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
3
|
+
import $ from "../../_virtual/index.js";
|
|
4
|
+
import { forwardRef as _, useRef as A, useCallback as k } from "react";
|
|
5
|
+
import f from "../Icon/Icon.js";
|
|
6
|
+
import { getCommonProps as w, px as T } from "../../utils/index.js";
|
|
7
|
+
import { getIconClasses as g } from "./utils.js";
|
|
8
|
+
import { TextVariants as I } from "../Text/types.js";
|
|
9
|
+
import v from "../Text/Text.js";
|
|
10
|
+
const y = ({ children: e, className: o, baseClassName: n, disable: a, id: i, onOpen: s, onClose: d }) => {
|
|
11
|
+
const l = A(null), r = a, m = I.labelMedium, u = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
12
|
+
f,
|
|
23
13
|
{
|
|
24
14
|
icon: "Lock",
|
|
25
15
|
height: 24,
|
|
26
16
|
width: 24,
|
|
27
|
-
className:
|
|
28
|
-
"data-testid": `${
|
|
17
|
+
className: g(n, "lock"),
|
|
18
|
+
"data-testid": `${i}-lockedIcon`,
|
|
29
19
|
"aria-hidden": !0
|
|
30
20
|
}
|
|
31
|
-
) }),
|
|
32
|
-
|
|
21
|
+
) }), h = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
22
|
+
f,
|
|
33
23
|
{
|
|
34
24
|
icon: "Add",
|
|
35
25
|
height: 24,
|
|
36
26
|
width: 24,
|
|
37
|
-
className:
|
|
38
|
-
"data-testid": `${
|
|
27
|
+
className: g(n, "plus"),
|
|
28
|
+
"data-testid": `${i}-plusIcon`,
|
|
39
29
|
"aria-hidden": !0
|
|
40
30
|
}
|
|
41
|
-
) }),
|
|
42
|
-
|
|
31
|
+
) }), p = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
32
|
+
f,
|
|
43
33
|
{
|
|
44
34
|
icon: "Subtract",
|
|
45
35
|
height: 24,
|
|
46
36
|
width: 24,
|
|
47
|
-
className:
|
|
48
|
-
"data-testid": `${
|
|
37
|
+
className: g(n, "minus"),
|
|
38
|
+
"data-testid": `${i}-minusIcon`,
|
|
49
39
|
"aria-hidden": !0
|
|
50
40
|
}
|
|
51
|
-
) }),
|
|
52
|
-
|
|
53
|
-
}, [
|
|
41
|
+
) }), c = k(() => {
|
|
42
|
+
l.current?.getAttribute("data-state") === "closed" ? s?.() : d?.();
|
|
43
|
+
}, [s, d]);
|
|
54
44
|
return /* @__PURE__ */ t(
|
|
55
|
-
|
|
45
|
+
N,
|
|
56
46
|
{
|
|
57
|
-
"data-disabled":
|
|
47
|
+
"data-disabled": a,
|
|
58
48
|
asChild: !0,
|
|
59
|
-
className:
|
|
60
|
-
ref:
|
|
61
|
-
onClick:
|
|
62
|
-
children: /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */ t(
|
|
64
|
-
|
|
65
|
-
!
|
|
66
|
-
!
|
|
49
|
+
className: $(n, { [`${n}--hoverable`]: !a }, o),
|
|
50
|
+
ref: l,
|
|
51
|
+
onClick: c,
|
|
52
|
+
children: /* @__PURE__ */ b("button", { type: "button", "data-testid": `${i}-trigger`, children: [
|
|
53
|
+
/* @__PURE__ */ t(v, { className: `${T}-accordion-item-label__text`, variant: m, children: e }),
|
|
54
|
+
r && u,
|
|
55
|
+
!r && h,
|
|
56
|
+
!r && p
|
|
67
57
|
] })
|
|
68
58
|
}
|
|
69
59
|
);
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
baseClassName: n,
|
|
73
|
-
disable: o,
|
|
74
|
-
hasTransition: r,
|
|
75
|
-
className: c,
|
|
76
|
-
variant: i = d.md
|
|
77
|
-
}) => o && e ? /* @__PURE__ */ t("div", { className: `${n}__content--locked`, children: e }) : /* @__PURE__ */ t(
|
|
78
|
-
k,
|
|
60
|
+
}, R = ({ children: e, baseClassName: o, disable: n, hasTransition: a, className: i }) => n && e ? /* @__PURE__ */ t("div", { className: `${o}__content--locked`, children: e }) : /* @__PURE__ */ t(
|
|
61
|
+
x,
|
|
79
62
|
{
|
|
80
63
|
asChild: !0,
|
|
81
|
-
className:
|
|
82
|
-
`${
|
|
83
|
-
{ [`${
|
|
84
|
-
|
|
64
|
+
className: $(
|
|
65
|
+
`${o}__content`,
|
|
66
|
+
{ [`${o}--transition`]: a },
|
|
67
|
+
i
|
|
85
68
|
),
|
|
86
|
-
children: /* @__PURE__ */ t(
|
|
69
|
+
children: /* @__PURE__ */ t(v, { variant: I.bodyMedium, children: e })
|
|
87
70
|
}
|
|
88
|
-
), j =
|
|
71
|
+
), j = _(
|
|
89
72
|
({
|
|
90
73
|
isLocked: e = !1,
|
|
91
|
-
variant: n = d.md,
|
|
92
74
|
id: o,
|
|
93
|
-
label:
|
|
94
|
-
isLastItem:
|
|
75
|
+
label: n,
|
|
76
|
+
isLastItem: a,
|
|
95
77
|
hasTransition: i = !1,
|
|
96
|
-
children:
|
|
97
|
-
className:
|
|
98
|
-
transitionTimeInMs:
|
|
99
|
-
onOpen:
|
|
100
|
-
onClose:
|
|
101
|
-
...
|
|
102
|
-
},
|
|
103
|
-
const { className:
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
|
|
78
|
+
children: s,
|
|
79
|
+
className: d,
|
|
80
|
+
transitionTimeInMs: l = 250,
|
|
81
|
+
onOpen: r,
|
|
82
|
+
onClose: m,
|
|
83
|
+
...u
|
|
84
|
+
}, h) => {
|
|
85
|
+
const { className: p } = w({ id: o }, "Accordion"), c = `${p}-item`;
|
|
86
|
+
return /* @__PURE__ */ b(
|
|
87
|
+
C,
|
|
106
88
|
{
|
|
107
89
|
disabled: e,
|
|
108
90
|
value: o,
|
|
109
|
-
style: { "--seldon-accordion-transition-time": `${
|
|
110
|
-
className:
|
|
111
|
-
[`${
|
|
91
|
+
style: { "--seldon-accordion-transition-time": `${l}ms` },
|
|
92
|
+
className: $(c, d, {
|
|
93
|
+
[`${c}__border-bottom`]: !a
|
|
112
94
|
}),
|
|
113
|
-
ref:
|
|
114
|
-
...
|
|
95
|
+
ref: h,
|
|
96
|
+
...u,
|
|
115
97
|
children: [
|
|
116
98
|
/* @__PURE__ */ t(
|
|
117
|
-
|
|
99
|
+
y,
|
|
118
100
|
{
|
|
119
|
-
variant: n,
|
|
120
101
|
disable: e,
|
|
121
102
|
id: o,
|
|
122
|
-
baseClassName: `${
|
|
123
|
-
onOpen:
|
|
124
|
-
onClose:
|
|
125
|
-
children:
|
|
103
|
+
baseClassName: `${c}-label`,
|
|
104
|
+
onOpen: r,
|
|
105
|
+
onClose: m,
|
|
106
|
+
children: n
|
|
126
107
|
}
|
|
127
108
|
),
|
|
128
|
-
/* @__PURE__ */ t(
|
|
129
|
-
V,
|
|
130
|
-
{
|
|
131
|
-
disable: e,
|
|
132
|
-
hasTransition: i,
|
|
133
|
-
variant: n,
|
|
134
|
-
baseClassName: a,
|
|
135
|
-
children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: l })
|
|
136
|
-
}
|
|
137
|
-
)
|
|
109
|
+
/* @__PURE__ */ t(R, { disable: e, hasTransition: i, baseClassName: c, children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: s }) })
|
|
138
110
|
]
|
|
139
111
|
}
|
|
140
112
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as Accordion, type AccordionProps } from './Accordion';
|
|
2
2
|
export { default as AccordionItem, type AccordionItemProps } from './AccordionItem';
|
|
3
|
-
export {
|
|
3
|
+
export { AccordionVariants } from './types';
|
|
@@ -25,10 +25,6 @@ export interface AccordionHeaderType {
|
|
|
25
25
|
* Callback function that is called when the header is closed.
|
|
26
26
|
*/
|
|
27
27
|
onClose?: () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Determines whether the variant on text style is large or small.
|
|
30
|
-
*/
|
|
31
|
-
variant?: AccordionItemVariant;
|
|
32
28
|
}
|
|
33
29
|
export interface AccordionContentType {
|
|
34
30
|
/**
|
|
@@ -48,10 +44,6 @@ export interface AccordionContentType {
|
|
|
48
44
|
* When true applied the transition keyframe animation on item expand. Default as false.
|
|
49
45
|
*/
|
|
50
46
|
hasTransition?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Determines whether the variant on text style is larger or smaller.
|
|
53
|
-
*/
|
|
54
|
-
variant?: AccordionItemVariant;
|
|
55
47
|
}
|
|
56
48
|
export declare enum AccordionVariants {
|
|
57
49
|
multiple = "multiple",
|
|
@@ -70,7 +62,3 @@ export interface AccordionVariantProps {
|
|
|
70
62
|
*/
|
|
71
63
|
collapsible?: boolean;
|
|
72
64
|
}
|
|
73
|
-
export declare enum AccordionItemVariant {
|
|
74
|
-
md = "md",
|
|
75
|
-
sm = "sm"
|
|
76
|
-
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
var e = /* @__PURE__ */ ((l) => (l.multiple = "multiple", l.singleCollapsible = "singleCollapsible", l.singleNonCollapsible = "singleNonCollapsible", l))(e || {})
|
|
1
|
+
var e = /* @__PURE__ */ ((l) => (l.multiple = "multiple", l.singleCollapsible = "singleCollapsible", l.singleNonCollapsible = "singleNonCollapsible", l))(e || {});
|
|
2
2
|
export {
|
|
3
|
-
s as AccordionItemVariant,
|
|
4
3
|
e as AccordionVariants
|
|
5
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccordionVariantKey
|
|
1
|
+
import { AccordionVariantKey } from './types';
|
|
2
2
|
import { AccordionMultipleProps, AccordionSingleProps } from '@radix-ui/react-accordion';
|
|
3
3
|
/**
|
|
4
4
|
* Sets the type and collapsible props based on the variant prop
|
|
@@ -8,8 +8,7 @@ export declare const getAccordionVariantProps: (variant?: AccordionVariantKey, v
|
|
|
8
8
|
/**
|
|
9
9
|
* A helper for getting the classes of the Accordion icons
|
|
10
10
|
* @param className - The className of the component
|
|
11
|
-
* @param variant - The size variant of the accordion item
|
|
12
11
|
* @param iconName - The name of the icon to be displayed
|
|
13
12
|
* @returns the classes that should be applied for the icon
|
|
14
13
|
*/
|
|
15
|
-
export declare const getIconClasses: (className: string,
|
|
14
|
+
export declare const getIconClasses: (className: string, iconName: string) => string;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AccordionVariants as
|
|
3
|
-
const
|
|
1
|
+
import l from "../../_virtual/index.js";
|
|
2
|
+
import { AccordionVariants as e } from "./types.js";
|
|
3
|
+
const t = (o, n) => {
|
|
4
4
|
const r = { type: "multiple" };
|
|
5
|
-
return (o ===
|
|
6
|
-
},
|
|
7
|
-
[`${o}__icon--sm`]: e === i.sm
|
|
8
|
-
});
|
|
5
|
+
return (o === e.singleCollapsible || o === e.singleNonCollapsible) && Array.isArray(n) && console.error("The value prop should not be an array when using a single variant"), o === e.singleCollapsible ? { type: "single" } : o === e.singleNonCollapsible ? { type: "single" } : r;
|
|
6
|
+
}, p = (o, n) => l(`${o}__icon`, `${o}-${n}__icon`);
|
|
9
7
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
t as getAccordionVariantProps,
|
|
9
|
+
p as getIconClasses
|
|
12
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as u } from "../../_virtual/
|
|
1
|
+
import { d as u } from "../../_virtual/index7.js";
|
|
2
2
|
import { isValid as p } from "../../node_modules/date-fns/isValid.js";
|
|
3
3
|
import { toZonedTime as m } from "../../node_modules/date-fns-tz/dist/esm/toZonedTime/index.js";
|
|
4
4
|
import { addHours as i } from "../../node_modules/date-fns/addHours.js";
|
|
@@ -30,8 +30,10 @@ import "../LinkList/LinkList.js";
|
|
|
30
30
|
import "../Modal/Modal.js";
|
|
31
31
|
import "../Navigation/Navigation.js";
|
|
32
32
|
import "../Navigation/NavigationItem/NavigationItem.js";
|
|
33
|
-
import "../Navigation/
|
|
33
|
+
import "../Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.js";
|
|
34
|
+
import "../Navigation/NavigationItemWithSubmenu/NavigationDesktopSubmenu.js";
|
|
34
35
|
import "../Navigation/NavigationList/NavigationList.js";
|
|
36
|
+
import "../Navigation/NavigationSubmenu/NavigationSubmenu.js";
|
|
35
37
|
import "../Pagination/Pagination.js";
|
|
36
38
|
import "../PinchZoom/PinchZoom.js";
|
|
37
39
|
import "../Row/Row.js";
|
|
@@ -92,7 +94,7 @@ import "../../patterns/CountryPicker/CountryPicker.js";
|
|
|
92
94
|
import "../../patterns/ProgressWizard/ProgressWizard.js";
|
|
93
95
|
import "../../patterns/ProgressWizard/types.js";
|
|
94
96
|
import "../../patterns/PhoneNumberInput/PhoneNumberInput.js";
|
|
95
|
-
const
|
|
97
|
+
const Op = () => ({
|
|
96
98
|
adornment: `${p}-input__wrapper__adornment`,
|
|
97
99
|
emptyValidation: `${p}-input__empty-validation`,
|
|
98
100
|
input: `${p}-input__input`,
|
|
@@ -104,5 +106,5 @@ const Lp = () => ({
|
|
|
104
106
|
wrapperInput: `${p}-input__wrapper__input`
|
|
105
107
|
});
|
|
106
108
|
export {
|
|
107
|
-
|
|
109
|
+
Op as getInputClassNames
|
|
108
110
|
};
|
|
@@ -1,36 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import e, { forwardRef as
|
|
3
|
-
import { findChildrenOfType as
|
|
4
|
-
import
|
|
5
|
-
import { HeaderContext as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { SSRMediaQuery as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import e, { forwardRef as C } from "react";
|
|
3
|
+
import { findChildrenOfType as f, findChildrenExcludingTypes as M, px as a } from "../../utils/index.js";
|
|
4
|
+
import u from "../../_virtual/index.js";
|
|
5
|
+
import { HeaderContext as R } from "../../site-furniture/Header/Header.js";
|
|
6
|
+
import p from "./NavigationList/NavigationList.js";
|
|
7
|
+
import v from "../../patterns/LanguageSelector/LanguageSelector.js";
|
|
8
|
+
import { SSRMediaQuery as l } from "../../providers/SeldonProvider/utils.js";
|
|
9
|
+
import V from "../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
10
|
+
import { Viewport as T, Root as $ } from "../../node_modules/@radix-ui/react-navigation-menu/dist/index.js";
|
|
11
|
+
const w = C(
|
|
12
|
+
({ "aria-label": h, children: t, className: S, id: s, visible: g = !0, dir: O, ...x }, _) => {
|
|
13
|
+
const { isSearchExpanded: n, activeSubmenuId: b, setActiveSubmenuId: E } = e.useContext(R), o = f(t, p)?.[0], N = M(t, [p, v]), r = f(t, v)?.[0], d = b ?? "", y = /* @__PURE__ */ c(
|
|
14
|
+
"div",
|
|
14
15
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
e.isValidElement(o) ?
|
|
25
|
-
|
|
16
|
+
className: u(`${a}-nav__list-container`, {
|
|
17
|
+
[`${a}-nav__list-container--search-expanded`]: n
|
|
18
|
+
}),
|
|
19
|
+
children: [
|
|
20
|
+
N,
|
|
21
|
+
/* @__PURE__ */ i(l.Media, { lessThan: "md", children: e.isValidElement(o) ? e.cloneElement(o, {
|
|
22
|
+
isOffScreen: n,
|
|
23
|
+
isMobile: !0
|
|
24
|
+
}) : void 0 }),
|
|
25
|
+
/* @__PURE__ */ i(l.Media, { greaterThanOrEqual: "md", children: e.isValidElement(o) ? /* @__PURE__ */ c(V, { enabled: !!d, allowPinchZoom: !0, removeScrollBar: !1, children: [
|
|
26
|
+
e.cloneElement(o, {
|
|
27
|
+
isOffScreen: n,
|
|
28
|
+
isMobile: !1
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ i(T, { className: `${a}-nav__radix-viewport` })
|
|
31
|
+
] }) : void 0 }),
|
|
32
|
+
/* @__PURE__ */ i(l.Media, { lessThan: "md", children: e.isValidElement(r) && r ? e.cloneElement(r, {
|
|
26
33
|
isHidden: n
|
|
27
34
|
}) : void 0 })
|
|
28
|
-
]
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ i(
|
|
39
|
+
$,
|
|
40
|
+
{
|
|
41
|
+
"aria-label": h ?? "Main navigation",
|
|
42
|
+
"data-testid": s,
|
|
43
|
+
id: s,
|
|
44
|
+
style: { "--visible": g ? "visible" : "hidden" },
|
|
45
|
+
className: u(`${a}-nav`, `${a}-nav__radix-root`, S),
|
|
46
|
+
delayDuration: 0,
|
|
47
|
+
skipDelayDuration: 300,
|
|
48
|
+
value: d,
|
|
49
|
+
onValueChange: (m) => E(m === "" ? null : m),
|
|
50
|
+
ref: _,
|
|
51
|
+
...x,
|
|
52
|
+
children: y
|
|
29
53
|
}
|
|
30
54
|
);
|
|
31
55
|
}
|
|
32
56
|
);
|
|
33
|
-
|
|
57
|
+
w.displayName = "Navigation";
|
|
34
58
|
export {
|
|
35
|
-
|
|
59
|
+
w as default
|
|
36
60
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
declare const meta: {
|
|
3
2
|
title: string;
|
|
4
|
-
component:
|
|
3
|
+
component: import('react').ForwardRefExoticComponent<Omit<import('./Navigation').NavigationProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
5
4
|
tags: string[];
|
|
6
5
|
parameters: {
|
|
7
6
|
docs: {
|
|
@@ -30,6 +30,14 @@ export interface NavigationItemProps extends ComponentProps<'li'> {
|
|
|
30
30
|
* Element to render within the navigation item, renders <Link> by default
|
|
31
31
|
*/
|
|
32
32
|
element?: ElementType<LinkProps>;
|
|
33
|
+
/**
|
|
34
|
+
* When false (desktop), render as NavigationMenu.Item + Link for arrow-key navigation. Set by NavigationList.
|
|
35
|
+
*/
|
|
36
|
+
isMobile?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* When true (desktop submenu), wrap link in NavigationMenu.Link so Radix closes the submenu on click
|
|
39
|
+
*/
|
|
40
|
+
asRadixSubmenuLink?: boolean;
|
|
33
41
|
}
|
|
34
42
|
/**
|
|
35
43
|
* ## Overview
|