@ultraviolet/plus 3.0.0-beta.16 → 3.0.0-beta.18
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/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/components/CodeEditor/CodeEditor.js +41 -11
- package/dist/components/ContentCard/Skeleton.d.ts +1 -1
- package/dist/components/ContentCard/Skeleton.js +13 -8
- package/dist/components/ContentCard/index.js +131 -51
- package/dist/components/ContentCardGroup/Card.js +63 -22
- package/dist/components/ContentCardGroup/SkeletonCard.d.ts +1 -1
- package/dist/components/ContentCardGroup/SkeletonCard.js +1 -1
- package/dist/components/ContentCardGroup/index.js +11 -6
- package/dist/components/ContentCardGroup/styles.css.js +1 -0
- package/dist/components/Conversation/index.d.ts +9 -9
- package/dist/components/Conversation/index.js +23 -6
- package/dist/components/CustomerSatisfaction/index.d.ts +1 -1
- package/dist/components/CustomerSatisfaction/index.js +68 -39
- package/dist/components/EstimateCost/Components/CustomUnitInput.d.ts +1 -1
- package/dist/components/EstimateCost/Components/CustomUnitInput.js +47 -27
- package/dist/components/EstimateCost/Components/Item.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Item.js +303 -203
- package/dist/components/EstimateCost/Components/LineThrough.d.ts +1 -1
- package/dist/components/EstimateCost/Components/LineThrough.js +8 -2
- package/dist/components/EstimateCost/Components/NumberInput.d.ts +1 -1
- package/dist/components/EstimateCost/Components/NumberInput.js +17 -9
- package/dist/components/EstimateCost/Components/Region.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Region.js +43 -25
- package/dist/components/EstimateCost/Components/Regular.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Regular.js +20 -16
- package/dist/components/EstimateCost/Components/Strong.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Strong.js +11 -10
- package/dist/components/EstimateCost/Components/Unit.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Unit.js +20 -13
- package/dist/components/EstimateCost/Components/Zone.d.ts +1 -1
- package/dist/components/EstimateCost/Components/Zone.js +41 -24
- package/dist/components/EstimateCost/EstimateCost.d.ts +11 -11
- package/dist/components/EstimateCost/EstimateCost.js +61 -10
- package/dist/components/EstimateCost/EstimateCostContent.d.ts +1 -1
- package/dist/components/EstimateCost/EstimateCostContent.js +264 -120
- package/dist/components/EstimateCost/EstimateCostProvider.d.ts +1 -1
- package/dist/components/EstimateCost/EstimateCostProvider.js +24 -21
- package/dist/components/EstimateCost/OverlayComponent.d.ts +1 -1
- package/dist/components/EstimateCost/OverlayComponent.js +53 -41
- package/dist/components/EstimateCost/OverlayContext.d.ts +1 -1
- package/dist/components/EstimateCost/OverlayContext.js +2 -4
- package/dist/components/FAQ/index.d.ts +1 -1
- package/dist/components/FAQ/index.js +1 -1
- package/dist/components/InfoTable/InfoTable.d.ts +3 -3
- package/dist/components/InfoTable/InfoTable.js +10 -4
- package/dist/components/InfoTable/components/Cell.d.ts +1 -1
- package/dist/components/InfoTable/components/Cell.js +24 -4
- package/dist/components/InfoTable/components/Row.d.ts +1 -1
- package/dist/components/InfoTable/components/Row.js +16 -10
- package/dist/components/InfoTable/styles.css.d.ts +0 -1
- package/dist/components/InfoTable/styles.css.js +0 -2
- package/dist/components/Navigation/Footer.d.ts +1 -1
- package/dist/components/Navigation/Footer.js +34 -19
- package/dist/components/Navigation/Header.d.ts +1 -1
- package/dist/components/Navigation/Header.js +12 -9
- package/dist/components/Navigation/Navigation.d.ts +5 -5
- package/dist/components/Navigation/Navigation.js +2 -5
- package/dist/components/Navigation/NavigationContent.d.ts +1 -1
- package/dist/components/Navigation/NavigationContent.js +56 -18
- package/dist/components/Navigation/NavigationProvider.d.ts +1 -1
- package/dist/components/Navigation/NavigationProvider.js +108 -70
- package/dist/components/Navigation/components/Group.d.ts +1 -1
- package/dist/components/Navigation/components/Group.js +20 -19
- package/dist/components/Navigation/components/Item.d.ts +1 -1
- package/dist/components/Navigation/components/Item.js +551 -254
- package/dist/components/Navigation/components/ItemProvider.d.ts +1 -1
- package/dist/components/Navigation/components/ItemProvider.js +2 -4
- package/dist/components/Navigation/components/PinnedItems.d.ts +1 -1
- package/dist/components/Navigation/components/PinnedItems.js +91 -37
- package/dist/components/Navigation/components/Separator.d.ts +1 -1
- package/dist/components/Navigation/components/Separator.js +1 -1
- package/dist/components/Navigation/styles.css.js +0 -1
- package/dist/components/Navigation/variables.css.js +1 -0
- package/dist/components/OfferList/OfferList.d.ts +3 -3
- package/dist/components/OfferList/OfferList.js +41 -9
- package/dist/components/OfferList/OfferListProvider.d.ts +1 -1
- package/dist/components/OfferList/OfferListProvider.js +25 -15
- package/dist/components/OfferList/components/Banner.d.ts +1 -1
- package/dist/components/OfferList/components/Banner.js +30 -8
- package/dist/components/OfferList/components/Cell.d.ts +1 -1
- package/dist/components/OfferList/components/Cell.js +12 -5
- package/dist/components/OfferList/components/Row.d.ts +1 -1
- package/dist/components/OfferList/components/Row.js +135 -42
- package/dist/components/OrderSummary/NonScrollableContent.d.ts +1 -1
- package/dist/components/OrderSummary/NonScrollableContent.js +68 -22
- package/dist/components/OrderSummary/Provider.js +1 -4
- package/dist/components/OrderSummary/ScrollableContent.d.ts +1 -1
- package/dist/components/OrderSummary/ScrollableContent.js +174 -33
- package/dist/components/OrderSummary/constants.js +7 -1
- package/dist/components/OrderSummary/helpers.js +36 -18
- package/dist/components/OrderSummary/index.d.ts +1 -1
- package/dist/components/OrderSummary/index.js +135 -48
- package/dist/components/Plans/FeatureHint.d.ts +1 -1
- package/dist/components/Plans/FeatureHint.js +26 -8
- package/dist/components/Plans/PlanHeader.d.ts +1 -1
- package/dist/components/Plans/PlanHeader.js +79 -25
- package/dist/components/Plans/index.d.ts +1 -1
- package/dist/components/Plans/index.js +142 -53
- package/dist/components/Plans/styles.css.js +0 -1
- package/dist/components/SteppedListCard/Step.d.ts +1 -1
- package/dist/components/SteppedListCard/Step.js +42 -2
- package/dist/components/SteppedListCard/SteppedListCard.d.ts +2 -2
- package/dist/components/SteppedListCard/SteppedListCard.js +66 -19
- package/dist/components/SteppedListCard/SteppedListContent.d.ts +1 -1
- package/dist/components/SteppedListCard/SteppedListContent.js +13 -11
- package/dist/components/SteppedListCard/helper.js +3 -1
- package/dist/plus.css +1 -1
- package/package.json +6 -6
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext } from "react";
|
|
4
|
-
const OverlayContext = createContext({
|
|
5
|
-
isOverlay: false
|
|
6
|
-
});
|
|
4
|
+
const OverlayContext = createContext({ isOverlay: false });
|
|
7
5
|
const useOverlay = () => useContext(OverlayContext);
|
|
8
6
|
const OverlayContextProvider = ({
|
|
9
7
|
children,
|
|
@@ -9,5 +9,5 @@ type FAQProps = {
|
|
|
9
9
|
title: string;
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
};
|
|
12
|
-
export declare const FAQ: ({ productIconName, illustrationText, title, description, notes, style, }: FAQProps) => import("
|
|
12
|
+
export declare const FAQ: ({ productIconName, illustrationText, title, description, notes, style, }: FAQProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs } from "
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as ProductIcon from "@ultraviolet/icons/product";
|
|
4
4
|
import { Card, Stack, Bullet, Text } from "@ultraviolet/ui";
|
|
5
5
|
import { faq } from "./styles.css.js";
|
|
@@ -11,17 +11,17 @@ type InfoTableProps = {
|
|
|
11
11
|
* Create rows with `InfoTable.Row` and place cells within each row using `InfoTable.Cell`.
|
|
12
12
|
*/
|
|
13
13
|
export declare const InfoTable: {
|
|
14
|
-
({ children, width, className, style, "data-testid": dataTestId, }: InfoTableProps): import("
|
|
14
|
+
({ children, width, className, style, "data-testid": dataTestId, }: InfoTableProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
Row: ({ children, templateColumns, style, }: {
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
templateColumns: string;
|
|
18
18
|
style?: CSSProperties;
|
|
19
|
-
}) => import("
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
Cell: ({ children, title, multiline, style, }: {
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
title: ReactNode;
|
|
23
23
|
multiline?: boolean;
|
|
24
24
|
style?: CSSProperties;
|
|
25
|
-
}) => import("
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
};
|
|
27
27
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { InfoTableCell } from "./components/Cell.js";
|
|
4
4
|
import { InfoTableRow } from "./components/Row.js";
|
|
5
5
|
import { InfoTableContext } from "./context.js";
|
|
@@ -10,9 +10,15 @@ const InfoTable = ({
|
|
|
10
10
|
className,
|
|
11
11
|
style,
|
|
12
12
|
"data-testid": dataTestId
|
|
13
|
-
}) => /* @__PURE__ */ jsx(InfoTableContext.Provider, { value: {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
}) => /* @__PURE__ */ jsx(InfoTableContext.Provider, { value: { width }, children: /* @__PURE__ */ jsx(
|
|
14
|
+
"dl",
|
|
15
|
+
{
|
|
16
|
+
className: `${className ? `${className} ` : ""}${dl}`,
|
|
17
|
+
"data-testid": dataTestId,
|
|
18
|
+
style,
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
) });
|
|
16
22
|
InfoTable.Row = InfoTableRow;
|
|
17
23
|
InfoTable.Cell = InfoTableCell;
|
|
18
24
|
export {
|
|
@@ -5,5 +5,5 @@ type CellProps = {
|
|
|
5
5
|
multiline?: boolean;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
};
|
|
8
|
-
export declare const InfoTableCell: ({ children, title, multiline, style, }: CellProps) => import("
|
|
8
|
+
export declare const InfoTableCell: ({ children, title, multiline, style, }: CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, jsx } from "
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Stack, Text } from "@ultraviolet/ui";
|
|
4
|
-
import { term, desc, cellText
|
|
4
|
+
import { term, desc, cellText } from "../styles.css.js";
|
|
5
5
|
const InfoTableCell = ({
|
|
6
6
|
children,
|
|
7
7
|
title,
|
|
8
8
|
multiline = false,
|
|
9
9
|
style
|
|
10
10
|
}) => /* @__PURE__ */ jsxs(Stack, { gap: "0.5", minWidth: "0", style, width: "100%", children: [
|
|
11
|
-
/* @__PURE__ */ jsx("dt", { className: term, children: /* @__PURE__ */ jsx(
|
|
12
|
-
|
|
11
|
+
/* @__PURE__ */ jsx("dt", { className: term, children: /* @__PURE__ */ jsx(
|
|
12
|
+
Text,
|
|
13
|
+
{
|
|
14
|
+
as: "div",
|
|
15
|
+
prominence: "weak",
|
|
16
|
+
sentiment: "neutral",
|
|
17
|
+
variant: "bodySmallStrong",
|
|
18
|
+
children: title
|
|
19
|
+
}
|
|
20
|
+
) }),
|
|
21
|
+
/* @__PURE__ */ jsx("dd", { className: desc, children: /* @__PURE__ */ jsx(
|
|
22
|
+
Text,
|
|
23
|
+
{
|
|
24
|
+
as: "div",
|
|
25
|
+
className: `${cellText}`,
|
|
26
|
+
oneLine: !multiline,
|
|
27
|
+
prominence: "default",
|
|
28
|
+
sentiment: "neutral",
|
|
29
|
+
variant: "body",
|
|
30
|
+
children
|
|
31
|
+
}
|
|
32
|
+
) })
|
|
13
33
|
] });
|
|
14
34
|
export {
|
|
15
35
|
InfoTableCell
|
|
@@ -4,5 +4,5 @@ type RowProps = {
|
|
|
4
4
|
templateColumns: string;
|
|
5
5
|
style?: CSSProperties;
|
|
6
6
|
};
|
|
7
|
-
export declare const InfoTableRow: ({ children, templateColumns, style, }: RowProps) => import("
|
|
7
|
+
export declare const InfoTableRow: ({ children, templateColumns, style, }: RowProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Row } from "@ultraviolet/ui";
|
|
4
4
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
5
5
|
import { useContext } from "react";
|
|
@@ -10,15 +10,21 @@ const InfoTableRow = ({
|
|
|
10
10
|
templateColumns,
|
|
11
11
|
style
|
|
12
12
|
}) => {
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
const { width } = useContext(InfoTableContext);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Row,
|
|
16
|
+
{
|
|
17
|
+
className: infoTableRow,
|
|
18
|
+
style: {
|
|
19
|
+
...assignInlineVars({
|
|
20
|
+
[rowWidth]: width ?? "100%"
|
|
21
|
+
}),
|
|
22
|
+
...style
|
|
23
|
+
},
|
|
24
|
+
templateColumns,
|
|
25
|
+
children
|
|
26
|
+
}
|
|
27
|
+
);
|
|
22
28
|
};
|
|
23
29
|
export {
|
|
24
30
|
InfoTableRow
|
|
@@ -4,5 +4,5 @@ type FooterProps = {
|
|
|
4
4
|
onToggleExpand: NavigationProps['onToggleExpand'];
|
|
5
5
|
contentRef: RefObject<HTMLDivElement | null>;
|
|
6
6
|
};
|
|
7
|
-
export declare const Footer: ({ onToggleExpand, contentRef }: FooterProps) => import("
|
|
7
|
+
export declare const Footer: ({ onToggleExpand, contentRef }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowLeftDoubleIcon, ArrowRightDoubleIcon } from "@ultraviolet/icons";
|
|
4
4
|
import { Tooltip, Button } from "@ultraviolet/ui";
|
|
5
5
|
import { useCallback, useState, useEffect, useMemo } from "react";
|
|
6
6
|
import { useNavigation } from "./NavigationProvider.js";
|
|
7
7
|
import { navigationStickyFooter } from "./styles.css.js";
|
|
8
|
-
const Footer = ({
|
|
9
|
-
|
|
10
|
-
contentRef
|
|
11
|
-
}) => {
|
|
12
|
-
const {
|
|
13
|
-
expanded,
|
|
14
|
-
toggleExpand,
|
|
15
|
-
locales
|
|
16
|
-
} = useNavigation();
|
|
8
|
+
const Footer = ({ onToggleExpand, contentRef }) => {
|
|
9
|
+
const { expanded, toggleExpand, locales } = useNavigation();
|
|
17
10
|
const isScrollAtBottom = useCallback(() => {
|
|
18
11
|
if (contentRef.current) {
|
|
19
12
|
if (contentRef.current.scrollTop + contentRef.current.offsetHeight >= contentRef.current.scrollHeight) {
|
|
@@ -23,7 +16,9 @@ const Footer = ({
|
|
|
23
16
|
}
|
|
24
17
|
return true;
|
|
25
18
|
}, [contentRef]);
|
|
26
|
-
const [footerHasOverflowStyle, setFooterHasOverflowStyle] = useState(
|
|
19
|
+
const [footerHasOverflowStyle, setFooterHasOverflowStyle] = useState(
|
|
20
|
+
isScrollAtBottom()
|
|
21
|
+
);
|
|
27
22
|
useEffect(() => {
|
|
28
23
|
const currentContentRef = contentRef.current;
|
|
29
24
|
const scroll = () => {
|
|
@@ -42,14 +37,34 @@ const Footer = ({
|
|
|
42
37
|
useEffect(() => {
|
|
43
38
|
setFooterHasOverflowStyle(isScrollAtBottom());
|
|
44
39
|
}, [isScrollAtBottom]);
|
|
45
|
-
const Icon = useMemo(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
const Icon = useMemo(
|
|
41
|
+
() => expanded ? ArrowLeftDoubleIcon : ArrowRightDoubleIcon,
|
|
42
|
+
[expanded]
|
|
43
|
+
);
|
|
44
|
+
const label = useMemo(
|
|
45
|
+
() => expanded ? locales["navigation.collapse.button"] : locales["navigation.expand.button"],
|
|
46
|
+
[expanded, locales]
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: navigationStickyFooter({ overflow: footerHasOverflowStyle }),
|
|
52
|
+
children: /* @__PURE__ */ jsx(Tooltip, { placement: "right", text: label, children: /* @__PURE__ */ jsx(
|
|
53
|
+
Button,
|
|
54
|
+
{
|
|
55
|
+
"aria-label": label,
|
|
56
|
+
onClick: () => {
|
|
57
|
+
toggleExpand();
|
|
58
|
+
onToggleExpand?.(!expanded);
|
|
59
|
+
},
|
|
60
|
+
sentiment: "neutral",
|
|
61
|
+
size: "small",
|
|
62
|
+
variant: "ghost",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
64
|
+
}
|
|
65
|
+
) })
|
|
66
|
+
}
|
|
67
|
+
);
|
|
53
68
|
};
|
|
54
69
|
export {
|
|
55
70
|
Footer
|
|
@@ -2,5 +2,5 @@ import type { NavigationProps } from './types';
|
|
|
2
2
|
type HeaderProps = {
|
|
3
3
|
logo: NavigationProps['logo'];
|
|
4
4
|
};
|
|
5
|
-
export declare const Header: import("react").MemoExoticComponent<({ logo }: HeaderProps) => import("
|
|
5
|
+
export declare const Header: import("react").MemoExoticComponent<({ logo }: HeaderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
6
6
|
export {};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Stack } from "@ultraviolet/ui";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { useNavigation } from "./NavigationProvider.js";
|
|
6
6
|
import { navigationHeader, navigationLogoContainer } from "./styles.css.js";
|
|
7
|
-
const Header = memo(({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const Header = memo(({ logo }) => {
|
|
8
|
+
const { animation, expanded } = useNavigation();
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { className: navigationHeader, children: /* @__PURE__ */ jsx(
|
|
10
|
+
Stack,
|
|
11
|
+
{
|
|
12
|
+
alignItems: "start",
|
|
13
|
+
className: navigationLogoContainer,
|
|
14
|
+
justifyContent: !expanded ? "center" : void 0,
|
|
15
|
+
children: typeof logo === "function" ? logo(animation ? false : expanded) : logo
|
|
16
|
+
}
|
|
17
|
+
) });
|
|
15
18
|
});
|
|
16
19
|
export {
|
|
17
20
|
Header
|
|
@@ -5,12 +5,12 @@ import type { NavigationProps } from './types';
|
|
|
5
5
|
* to make it work in your application.
|
|
6
6
|
*/
|
|
7
7
|
export declare const Navigation: {
|
|
8
|
-
({ children, ...props }: NavigationProps): import("
|
|
8
|
+
({ children, ...props }: NavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
Group: ({ children, label, style }: {
|
|
10
10
|
children: import("react").ReactNode;
|
|
11
11
|
label: string;
|
|
12
12
|
style?: import("react").CSSProperties;
|
|
13
|
-
}) => import("
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
14
|
Item: import("react").MemoExoticComponent<({ children, categoryIcon, label, labelDescription, subLabel, badgeText, badgeSentiment, href, target, rel, onToggle, onClickPinUnpin, toggle, active, noPinButton, type, as, disabled, noExpand, index, id, "data-testid": dataTestId, style, }: {
|
|
15
15
|
children?: import("react").ReactNode;
|
|
16
16
|
categoryIcon?: import("react").ReactNode;
|
|
@@ -35,13 +35,13 @@ export declare const Navigation: {
|
|
|
35
35
|
disabled?: boolean;
|
|
36
36
|
'data-testid'?: string;
|
|
37
37
|
style?: import("react").CSSProperties;
|
|
38
|
-
}) => import("
|
|
38
|
+
}) => import("react/jsx-runtime").JSX.Element | null>;
|
|
39
39
|
PinnedItems: ({ toggle, onReorder, onToggle, itemWrapper, style, }: {
|
|
40
40
|
toggle?: boolean;
|
|
41
41
|
onToggle?: (toggle: boolean) => void;
|
|
42
42
|
onReorder?: (pinnedItems: string[]) => void;
|
|
43
43
|
itemWrapper?: (item: import("react").ReactElement, itemId: string) => import("react").ReactElement;
|
|
44
44
|
style?: import("react").CSSProperties;
|
|
45
|
-
}) => import("
|
|
46
|
-
Separator: () => import("
|
|
45
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
46
|
+
Separator: () => import("react/jsx-runtime").JSX.Element;
|
|
47
47
|
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Group } from "./components/Group.js";
|
|
4
4
|
import { Item } from "./components/Item.js";
|
|
5
5
|
import { PinnedItems } from "./components/PinnedItems.js";
|
|
6
6
|
import { Separator } from "./components/Separator.js";
|
|
7
7
|
import { NavigationContent } from "./NavigationContent.js";
|
|
8
|
-
const Navigation = ({
|
|
9
|
-
children,
|
|
10
|
-
...props
|
|
11
|
-
}) => /* @__PURE__ */ jsx(NavigationContent, { ...props, children });
|
|
8
|
+
const Navigation = ({ children, ...props }) => /* @__PURE__ */ jsx(NavigationContent, { ...props, children });
|
|
12
9
|
Navigation.Group = Group;
|
|
13
10
|
Navigation.Item = Item;
|
|
14
11
|
Navigation.PinnedItems = PinnedItems;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NavigationProps } from './types';
|
|
2
|
-
export declare const NavigationContent: ({ children, logo, onWidthResize, className, "data-testid": dataTestId, id, onToggleExpand, }: NavigationProps) => import("
|
|
2
|
+
export declare const NavigationContent: ({ children, logo, onWidthResize, className, "data-testid": dataTestId, id, onToggleExpand, }: NavigationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, jsx } from "
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Stack } from "@ultraviolet/ui";
|
|
4
4
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
5
5
|
import { useRef, useEffect } from "react";
|
|
@@ -20,7 +20,9 @@ const NavigationContent = ({
|
|
|
20
20
|
}) => {
|
|
21
21
|
const context = useNavigation();
|
|
22
22
|
if (!context) {
|
|
23
|
-
throw new Error(
|
|
23
|
+
throw new Error(
|
|
24
|
+
"Navigation should be inside NavigationProvider to use it properly."
|
|
25
|
+
);
|
|
24
26
|
}
|
|
25
27
|
const {
|
|
26
28
|
setWidth,
|
|
@@ -90,22 +92,58 @@ const NavigationContent = ({
|
|
|
90
92
|
return () => {
|
|
91
93
|
sliderRefCurrent?.removeEventListener("mousedown", mousedown);
|
|
92
94
|
};
|
|
93
|
-
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
}, [
|
|
96
|
+
expanded,
|
|
97
|
+
navigationRef,
|
|
98
|
+
onToggleExpand,
|
|
99
|
+
onWidthResize,
|
|
100
|
+
setWidth,
|
|
101
|
+
toggleExpand
|
|
102
|
+
]);
|
|
103
|
+
return /* @__PURE__ */ jsxs(
|
|
104
|
+
"nav",
|
|
105
|
+
{
|
|
106
|
+
className: `${className ? `${className} ` : ""}${navigation}`,
|
|
107
|
+
"data-testid": dataTestId,
|
|
108
|
+
id,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsxs(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
className: navigationContainer({
|
|
114
|
+
animation: shouldAnimate ? animation : void 0,
|
|
115
|
+
expanded
|
|
116
|
+
}),
|
|
117
|
+
ref: navigationRef,
|
|
118
|
+
style: assignInlineVars({
|
|
119
|
+
[widthNavigationContainer]: `${width}px`
|
|
120
|
+
}),
|
|
121
|
+
children: [
|
|
122
|
+
logo ? /* @__PURE__ */ jsx(Header, { logo }) : null,
|
|
123
|
+
/* @__PURE__ */ jsxs(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
className: `${navigationContentContainer}${expanded ? "" : ` ${navigationContentContainerCollapsed}`}`,
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ jsx(Stack, { className: navigationContent, gap: 0.25, ref: contentRef, children }),
|
|
129
|
+
allowNavigationResize ? /* @__PURE__ */ jsx(Footer, { contentRef, onToggleExpand }) : null
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
allowNavigationResize ? /* @__PURE__ */ jsx(
|
|
137
|
+
"div",
|
|
138
|
+
{
|
|
139
|
+
className: navigationSlider,
|
|
140
|
+
"data-testid": "slider",
|
|
141
|
+
ref: sliderRef
|
|
142
|
+
}
|
|
143
|
+
) : null
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
);
|
|
109
147
|
};
|
|
110
148
|
export {
|
|
111
149
|
NavigationContent
|
|
@@ -87,5 +87,5 @@ type NavigationProviderProps = {
|
|
|
87
87
|
*/
|
|
88
88
|
animationType?: AnimationType;
|
|
89
89
|
};
|
|
90
|
-
export declare const NavigationProvider: ({ children, pinnedFeature, initialPinned, initialExpanded, locales, pinLimit, onExpandChange, initialWidth, initialAllowNavigationResize, animation: shouldAnimate, animationType, }: NavigationProviderProps) => import("
|
|
90
|
+
export declare const NavigationProvider: ({ children, pinnedFeature, initialPinned, initialExpanded, locales, pinLimit, onExpandChange, initialWidth, initialAllowNavigationResize, animation: shouldAnimate, animationType, }: NavigationProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
91
91
|
export {};
|