@nulogy/components 15.2.3 → 15.3.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/main.js +4 -0
- package/dist/main.module.js +4 -1
- package/dist/src/Layout/Page.applicationFrame.story.d.ts +8 -3
- package/dist/src/Layout/Page.applicationFrame.story.js +26 -12
- package/dist/src/Layout/Page.d.ts +2 -2
- package/dist/src/Layout/Page.story.d.ts +10 -5
- package/dist/src/Layout/Page.story.js +54 -20
- package/dist/src/MaybeTooltip/MaybeTooltip.d.ts +14 -0
- package/dist/src/{TruncatedText/components → MaybeTooltip}/MaybeTooltip.js +4 -1
- package/dist/src/MaybeTooltip/MaybeTooltip.story.d.ts +12 -0
- package/dist/src/MaybeTooltip/MaybeTooltip.story.js +23 -0
- package/dist/src/Tooltip/Tooltip.d.ts +2 -2
- package/dist/src/TruncatedText/components/TruncatedTextFillWidth.js +1 -1
- package/dist/src/TruncatedText/components/TruncatedTextMaxCharacters.js +1 -1
- package/dist/src/TruncatedText/types.d.ts +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/package.json +20 -17
- package/dist/src/TruncatedText/components/MaybeTooltip.d.ts +0 -24
package/dist/main.js
CHANGED
|
@@ -54598,6 +54598,9 @@
|
|
|
54598
54598
|
MenuItemLink
|
|
54599
54599
|
};
|
|
54600
54600
|
|
|
54601
|
+
/**
|
|
54602
|
+
* Conditionally displays a tooltip.
|
|
54603
|
+
*/
|
|
54601
54604
|
function MaybeTooltip({
|
|
54602
54605
|
tooltip,
|
|
54603
54606
|
showTooltip = true,
|
|
@@ -54772,6 +54775,7 @@
|
|
|
54772
54775
|
exports.List = List$1;
|
|
54773
54776
|
exports.ListItem = ListItem;
|
|
54774
54777
|
exports.LoadingAnimation = LoadingAnimation;
|
|
54778
|
+
exports.MaybeTooltip = MaybeTooltip;
|
|
54775
54779
|
exports.MenuTrigger = MenuTrigger;
|
|
54776
54780
|
exports.Modal = Modal;
|
|
54777
54781
|
exports.MonthPicker = MonthPicker;
|
package/dist/main.module.js
CHANGED
|
@@ -54581,6 +54581,9 @@ const TopBar = {
|
|
|
54581
54581
|
MenuItemLink
|
|
54582
54582
|
};
|
|
54583
54583
|
|
|
54584
|
+
/**
|
|
54585
|
+
* Conditionally displays a tooltip.
|
|
54586
|
+
*/
|
|
54584
54587
|
function MaybeTooltip({
|
|
54585
54588
|
tooltip,
|
|
54586
54589
|
showTooltip = true,
|
|
@@ -54697,4 +54700,4 @@ const TruncatedText = ({
|
|
|
54697
54700
|
}, children));
|
|
54698
54701
|
};
|
|
54699
54702
|
|
|
54700
|
-
export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, AppTag, ApplicationFrame, AsyncSelect, Banner, BottomSheet, BottomSheetParts, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button$1 as Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DescriptionDetails, DescriptionGroup, DescriptionList, DescriptionTerm, DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header$3 as Header, Heading1, Heading2, Heading3, Heading4, HelpText$1 as HelpText, Icon, IconicButton, InlineFlex, InlineIcon, InlineValidation, Input, Link$1 as Link, List$1 as List, ListItem, LoadingAnimation, MenuTrigger, Modal, MonthPicker, NDSProvider, NavBarBackground, Navigation$1 as Navigation, NavigationLogo, NavigationLogoLink, NotificationTypes, NulogyLogo, Overlay$1 as Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, NDSSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, Toggle, Tooltip, TopBar, TruncatedText, VerticalDivider, WeekPicker, addStyledProps, legacy as desktop, phone, tablet, themes, toast, useMediaQuery, useWindowDimensions };
|
|
54703
|
+
export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, AppTag, ApplicationFrame, AsyncSelect, Banner, BottomSheet, BottomSheetParts, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button$1 as Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DescriptionDetails, DescriptionGroup, DescriptionList, DescriptionTerm, DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header$3 as Header, Heading1, Heading2, Heading3, Heading4, HelpText$1 as HelpText, Icon, IconicButton, InlineFlex, InlineIcon, InlineValidation, Input, Link$1 as Link, List$1 as List, ListItem, LoadingAnimation, MaybeTooltip, MenuTrigger, Modal, MonthPicker, NDSProvider, NavBarBackground, Navigation$1 as Navigation, NavigationLogo, NavigationLogoLink, NotificationTypes, NulogyLogo, Overlay$1 as Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, NDSSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, Toggle, Tooltip, TopBar, TruncatedText, VerticalDivider, WeekPicker, addStyledProps, legacy as desktop, phone, tablet, themes, toast, useMediaQuery, useWindowDimensions };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
1
2
|
import React from "react";
|
|
3
|
+
import { Page } from "..";
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
6
|
+
component: ({ breadcrumbs, title, children, headerContent, fullHeight, renderHeader, ...rest }: import("./Page").PageProps) => React.JSX.Element;
|
|
4
7
|
parameters: {
|
|
5
8
|
layout: string;
|
|
6
9
|
};
|
|
10
|
+
render: (args: import("./Page").PageProps) => React.JSX.Element;
|
|
7
11
|
};
|
|
8
12
|
export default _default;
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
13
|
+
type Story = StoryObj<typeof Page>;
|
|
14
|
+
export declare const NoPageTitle: Story;
|
|
15
|
+
export declare const NoBreadcrumbs: Story;
|
|
16
|
+
export declare const WithFullHeight: Story;
|
|
@@ -3,22 +3,36 @@ import { Link } from "../Link";
|
|
|
3
3
|
import { ApplicationFrame, Navigation, Page, Breadcrumbs, Heading2, Text } from "..";
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Page/Within an ApplicationFrame",
|
|
6
|
+
component: Page,
|
|
6
7
|
parameters: {
|
|
7
8
|
layout: "fullscreen",
|
|
8
9
|
},
|
|
10
|
+
render: (args) => (React.createElement(ApplicationFrame, { navBar: React.createElement(Navigation, null), height: "100vh" },
|
|
11
|
+
React.createElement(Page, { ...args }))),
|
|
9
12
|
};
|
|
10
|
-
export const NoPageTitle =
|
|
11
|
-
|
|
13
|
+
export const NoPageTitle = {
|
|
14
|
+
args: {
|
|
15
|
+
breadcrumbs: (React.createElement(Breadcrumbs, null,
|
|
12
16
|
React.createElement(Link, { href: "/" }, "Home"),
|
|
13
|
-
React.createElement(Link, { href: "/" }, "Materials"))
|
|
14
|
-
React.createElement(Text, { fontFamily: "mono", fontSize: "small" }, "content"))
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
React.createElement(Link, { href: "/" }, "Materials"))),
|
|
18
|
+
children: (React.createElement(Text, { fontFamily: "mono", fontSize: "small" }, "content")),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export const NoBreadcrumbs = {
|
|
22
|
+
args: {
|
|
23
|
+
title: "Materials Overview",
|
|
24
|
+
children: (React.createElement(React.Fragment, null,
|
|
18
25
|
React.createElement(Heading2, null, "Overview"),
|
|
19
|
-
React.createElement(Text, null, "I am main content.")))
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
React.createElement(Text, null, "I am main content."))),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export const WithFullHeight = {
|
|
30
|
+
args: {
|
|
31
|
+
title: "Materials Overview",
|
|
32
|
+
fullHeight: true,
|
|
33
|
+
breadcrumbs: (React.createElement(Breadcrumbs, null,
|
|
22
34
|
React.createElement(Link, { href: "/" }, "Home"),
|
|
23
|
-
React.createElement(Link, { href: "/" }, "Materials"))
|
|
24
|
-
React.createElement(Text, null, "I am main content.")
|
|
35
|
+
React.createElement(Link, { href: "/" }, "Materials"))),
|
|
36
|
+
children: React.createElement(Text, null, "I am main content."),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { FlexProps } from "../Flex/Flex";
|
|
3
|
-
interface PageProps extends FlexProps {
|
|
3
|
+
export interface PageProps extends Omit<FlexProps, "title"> {
|
|
4
4
|
breadcrumbs?: ReactNode;
|
|
5
|
-
title?:
|
|
5
|
+
title?: ReactNode;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
headerContent?: ReactNode;
|
|
8
8
|
fullHeight?: boolean;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
1
2
|
import React from "react";
|
|
3
|
+
import { Page } from "..";
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
6
|
+
component: ({ breadcrumbs, title, children, headerContent, fullHeight, renderHeader, ...rest }: import("./Page").PageProps) => React.JSX.Element;
|
|
4
7
|
parameters: {
|
|
5
8
|
layout: string;
|
|
6
9
|
};
|
|
7
10
|
};
|
|
8
11
|
export default _default;
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
12
|
+
type Story = StoryObj<typeof Page>;
|
|
13
|
+
export declare const _Page: Story;
|
|
14
|
+
export declare const NoPageTitle: Story;
|
|
15
|
+
export declare const NoBreadcrumbs: Story;
|
|
16
|
+
export declare const NoBackground: Story;
|
|
17
|
+
export declare const WithFullHeight: Story;
|
|
18
|
+
export declare const WithReactNodeAsTitle: Story;
|
|
@@ -2,30 +2,64 @@ import React from "react";
|
|
|
2
2
|
import { ApplicationFrame, Breadcrumbs, Link, Heading2, Text, Page, StatusIndicator, Navigation } from "..";
|
|
3
3
|
export default {
|
|
4
4
|
title: "Components/Page",
|
|
5
|
+
component: Page,
|
|
5
6
|
parameters: {
|
|
6
7
|
layout: "fullscreen",
|
|
7
8
|
},
|
|
8
9
|
};
|
|
9
|
-
export const _Page =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
React.createElement(React.Fragment, null,
|
|
13
|
-
React.createElement(Text, { fontFamily: "mono", fontSize: "small" }, "content"))));
|
|
14
|
-
export const NoPageTitle = () => (React.createElement(ApplicationFrame, { navBar: React.createElement(Navigation, null) },
|
|
15
|
-
React.createElement(Page, { breadcrumbs: React.createElement(Breadcrumbs, null,
|
|
10
|
+
export const _Page = {
|
|
11
|
+
args: {
|
|
12
|
+
breadcrumbs: (React.createElement(Breadcrumbs, null,
|
|
16
13
|
React.createElement(Link, { href: "/" }, "Home"),
|
|
17
|
-
React.createElement(Link, { href: "/" }, "Materials"))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
React.createElement(Link, { href: "/" }, "Materials"))),
|
|
15
|
+
title: "Materials Overview",
|
|
16
|
+
headerContent: React.createElement(StatusIndicator, { type: "informative" }, "Beta"),
|
|
17
|
+
children: (React.createElement(Text, { fontFamily: "mono", fontSize: "small" }, "content")),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export const NoPageTitle = {
|
|
21
|
+
render: (args) => (React.createElement(ApplicationFrame, { navBar: React.createElement(Navigation, null) },
|
|
22
|
+
React.createElement(Page, { ...args }))),
|
|
23
|
+
args: {
|
|
24
|
+
breadcrumbs: (React.createElement(Breadcrumbs, null,
|
|
25
|
+
React.createElement(Link, { href: "/" }, "Home"),
|
|
26
|
+
React.createElement(Link, { href: "/" }, "Materials"))),
|
|
27
|
+
children: (React.createElement(Text, { fontFamily: "mono", fontSize: "small" }, "content")),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export const NoBreadcrumbs = {
|
|
31
|
+
render: (args) => (React.createElement(ApplicationFrame, { navBar: React.createElement(Navigation, null), height: "100vh" },
|
|
32
|
+
React.createElement(Page, { ...args }))),
|
|
33
|
+
args: {
|
|
34
|
+
title: "Materials Overview",
|
|
35
|
+
children: (React.createElement(React.Fragment, null,
|
|
22
36
|
React.createElement(Heading2, null, "Overview"),
|
|
23
|
-
React.createElement(Text, null, "I am main content.")))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
React.createElement(Text, null, "I am main content."))),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export const NoBackground = {
|
|
41
|
+
args: {
|
|
42
|
+
title: "Materials Overview",
|
|
43
|
+
breadcrumbs: (React.createElement(Breadcrumbs, null,
|
|
29
44
|
React.createElement(Link, { href: "/" }, "Home"),
|
|
30
|
-
React.createElement(Link, { href: "/" }, "Materials"))
|
|
31
|
-
|
|
45
|
+
React.createElement(Link, { href: "/" }, "Materials"))),
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export const WithFullHeight = {
|
|
49
|
+
render: (args) => (React.createElement(ApplicationFrame, { navBar: React.createElement(Navigation, null) },
|
|
50
|
+
React.createElement(Page, { ...args }))),
|
|
51
|
+
args: {
|
|
52
|
+
title: "Materials Overview",
|
|
53
|
+
fullHeight: true,
|
|
54
|
+
breadcrumbs: (React.createElement(Breadcrumbs, null,
|
|
55
|
+
React.createElement(Link, { href: "/" }, "Home"),
|
|
56
|
+
React.createElement(Link, { href: "/" }, "Materials"))),
|
|
57
|
+
children: React.createElement(Text, null, "I am main content."),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
export const WithReactNodeAsTitle = {
|
|
61
|
+
args: {
|
|
62
|
+
title: React.createElement("b", null, "I am a title"),
|
|
63
|
+
children: React.createElement(Text, null, "I am main content."),
|
|
64
|
+
},
|
|
65
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TooltipProps } from "../Tooltip/Tooltip";
|
|
3
|
+
export interface MaybeTooltipProps extends TooltipProps {
|
|
4
|
+
/** Whether to enable the tooltip at all */
|
|
5
|
+
showTooltip?: boolean;
|
|
6
|
+
/** Allow opening tooltip on mobile tap (not supported by new Tooltip) */
|
|
7
|
+
supportMobileTap?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Conditionally displays a tooltip.
|
|
11
|
+
*/
|
|
12
|
+
declare function MaybeTooltip({ tooltip, showTooltip, placement, defaultOpen, showDelay, maxWidth, supportMobileTap: _supportMobileTap, // Note: supportMobileTap is handled internally by the new Tooltip
|
|
13
|
+
className, children, }: MaybeTooltipProps): React.JSX.Element;
|
|
14
|
+
export default MaybeTooltip;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Tooltip } from "
|
|
2
|
+
import { Tooltip } from "../Tooltip";
|
|
3
|
+
/**
|
|
4
|
+
* Conditionally displays a tooltip.
|
|
5
|
+
*/
|
|
3
6
|
function MaybeTooltip({ tooltip, showTooltip = true, placement = "bottom", defaultOpen = false, showDelay = 100, maxWidth = "24em", supportMobileTap: _supportMobileTap = true, // Note: supportMobileTap is handled internally by the new Tooltip
|
|
4
7
|
className, children, }) {
|
|
5
8
|
if (!showTooltip) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
import MaybeTooltip from "./MaybeTooltip";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof MaybeTooltip;
|
|
7
|
+
render: (args: import("./MaybeTooltip").MaybeTooltipProps) => React.JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
type Story = StoryObj<typeof MaybeTooltip>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const WithNoTooltip: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "../Type";
|
|
3
|
+
import { Box } from "../Box";
|
|
4
|
+
import MaybeTooltip from "./MaybeTooltip";
|
|
5
|
+
export default {
|
|
6
|
+
title: "Components/MaybeTooltip",
|
|
7
|
+
component: MaybeTooltip,
|
|
8
|
+
render: (args) => (React.createElement(Box, { width: "100px" },
|
|
9
|
+
React.createElement(MaybeTooltip, { ...args }))),
|
|
10
|
+
};
|
|
11
|
+
export const Default = {
|
|
12
|
+
args: {
|
|
13
|
+
children: React.createElement(Text, null, "Hello"),
|
|
14
|
+
tooltip: "This is a tooltip",
|
|
15
|
+
showTooltip: true,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const WithNoTooltip = {
|
|
19
|
+
args: {
|
|
20
|
+
children: React.createElement(Text, null, "Hello"),
|
|
21
|
+
showTooltip: false,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MaxWidthProps } from "styled-system";
|
|
3
|
-
export
|
|
3
|
+
export interface TooltipProps {
|
|
4
4
|
/** Delay before showing (in ms) */
|
|
5
5
|
showDelay?: string | number;
|
|
6
6
|
/** Whether the tooltip is open by default */
|
|
@@ -15,5 +15,5 @@ export type TooltipProps = {
|
|
|
15
15
|
tooltip?: React.ReactNode;
|
|
16
16
|
/** Child element that triggers the tooltip */
|
|
17
17
|
children?: React.ReactNode;
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
19
|
export default function Tooltip({ showDelay, defaultOpen, placement, maxWidth, className, tooltip, children, }: TooltipProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { Text } from "../../Type";
|
|
3
|
-
import MaybeTooltip from "
|
|
3
|
+
import MaybeTooltip from "../../MaybeTooltip/MaybeTooltip";
|
|
4
4
|
const TruncatedTextFillWidth = ({ element, showTooltip, tooltipProps, children, "data-testid": testId, ...props }) => {
|
|
5
5
|
const [hasOverflowText, setHasOverflowText] = useState(false);
|
|
6
6
|
const hasTooltip = showTooltip && hasOverflowText;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Text } from "../../Type";
|
|
3
|
-
import MaybeTooltip from "
|
|
3
|
+
import MaybeTooltip from "../../MaybeTooltip/MaybeTooltip";
|
|
4
4
|
const TruncatedTextMaxCharacters = ({ children, element, indicator, maxCharacters, showTooltip, tooltipProps, "data-testid": testId, ...props }) => {
|
|
5
5
|
const innerText = children ?? "";
|
|
6
6
|
const requiresTruncation = innerText.length > maxCharacters;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { TextProps } from "../Type";
|
|
3
|
-
import { MaybeTooltipProps } from "
|
|
3
|
+
import { MaybeTooltipProps } from "../MaybeTooltip/MaybeTooltip";
|
|
4
4
|
export interface TruncatedTextProps extends TextProps {
|
|
5
5
|
children?: string;
|
|
6
6
|
indicator?: string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -69,3 +69,4 @@ export type { NulogyAppName } from "./types/NulogyApp";
|
|
|
69
69
|
export { useWindowDimensions } from "./utils";
|
|
70
70
|
export { InlineValidation } from "./Validation";
|
|
71
71
|
export { VerticalDivider } from "./VerticalDivider";
|
|
72
|
+
export { default as MaybeTooltip } from "./MaybeTooltip/MaybeTooltip";
|
package/dist/src/index.js
CHANGED
|
@@ -57,3 +57,4 @@ export { Heading1, Heading2, Heading3, Heading4, Text } from "./Type";
|
|
|
57
57
|
export { useWindowDimensions } from "./utils";
|
|
58
58
|
export { InlineValidation } from "./Validation";
|
|
59
59
|
export { VerticalDivider } from "./VerticalDivider";
|
|
60
|
+
export { default as MaybeTooltip } from "./MaybeTooltip/MaybeTooltip";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"clean:storybook": "rm -rf node_modules/.cache/storybook && rm -rf ./storybook-static",
|
|
16
16
|
"build": "rollup -c",
|
|
17
17
|
"build:watch": "rollup -c --watch",
|
|
18
|
-
"build:storybook": "storybook build",
|
|
18
|
+
"build:storybook": "storybook build --webpack-stats-json",
|
|
19
19
|
"warn:prepush": "echo \"Make sure you also run all the other CI steps before pushing by running 'pnpm ci'\"",
|
|
20
20
|
"check": "pnpm warn:prepush && pnpm check:types && pnpm check:lint && pnpm check:format",
|
|
21
21
|
"check:types": "tsc && cd cypress && tsc --noEmit",
|
|
@@ -65,7 +65,9 @@
|
|
|
65
65
|
"@babel/core": "^7.28.5",
|
|
66
66
|
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
67
67
|
"@babel/preset-env": "^7.28.5",
|
|
68
|
+
"@babel/preset-react": "^7.28.5",
|
|
68
69
|
"@babel/preset-typescript": "^7.28.5",
|
|
70
|
+
"@chromatic-com/storybook": "^3",
|
|
69
71
|
"@nulogy/eslint-config-nulogy": "^1.0.0",
|
|
70
72
|
"@nulogy/icons": "^4.37.2",
|
|
71
73
|
"@rollup/plugin-babel": "^5.0.0",
|
|
@@ -76,20 +78,21 @@
|
|
|
76
78
|
"@semantic-release/github": "^8.0.7",
|
|
77
79
|
"@semantic-release/npm": "^9.0.0",
|
|
78
80
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
79
|
-
"@storybook/addon-a11y": "
|
|
80
|
-
"@storybook/addon-actions": "
|
|
81
|
-
"@storybook/addon-docs": "
|
|
82
|
-
"@storybook/addon-storysource": "
|
|
83
|
-
"@storybook/addon-toolbars": "
|
|
84
|
-
"@storybook/addon-viewport": "
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@storybook/
|
|
87
|
-
"@storybook/react
|
|
88
|
-
"@storybook/
|
|
81
|
+
"@storybook/addon-a11y": "8.6.14",
|
|
82
|
+
"@storybook/addon-actions": "8.6.14",
|
|
83
|
+
"@storybook/addon-docs": "8.6.14",
|
|
84
|
+
"@storybook/addon-storysource": "8.6.14",
|
|
85
|
+
"@storybook/addon-toolbars": "8.6.14",
|
|
86
|
+
"@storybook/addon-viewport": "8.6.14",
|
|
87
|
+
"@storybook/addon-webpack5-compiler-babel": "^4.0.0",
|
|
88
|
+
"@storybook/codemod": "8.6.14",
|
|
89
|
+
"@storybook/react": "8.6.14",
|
|
90
|
+
"@storybook/react-webpack5": "8.6.14",
|
|
91
|
+
"@storybook/theming": "8.6.14",
|
|
89
92
|
"@testing-library/react": "^12.1.5",
|
|
90
93
|
"@types/css-mediaquery": "^0.1.4",
|
|
91
94
|
"@types/deep-equal": "^1.0.4",
|
|
92
|
-
"@types/node": "^
|
|
95
|
+
"@types/node": "^24.0.0",
|
|
93
96
|
"@types/react": "^17.0.39",
|
|
94
97
|
"@types/react-dom": "^17.0.20",
|
|
95
98
|
"@types/react-router-dom": "^5.3.3",
|
|
@@ -128,12 +131,12 @@
|
|
|
128
131
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
129
132
|
"semantic-release": "^24.2.5",
|
|
130
133
|
"start-server-and-test": "^2.0.12",
|
|
131
|
-
"storybook": "
|
|
134
|
+
"storybook": "8.6.14",
|
|
132
135
|
"styled-components": "^6.1.19",
|
|
133
136
|
"svg-sprite-loader": "^6.0.11",
|
|
134
137
|
"typescript": "^5.9.3",
|
|
135
|
-
"
|
|
136
|
-
"
|
|
138
|
+
"typescript-eslint": "^0.0.1-alpha.0",
|
|
139
|
+
"vitest": "^4.0.15"
|
|
137
140
|
},
|
|
138
141
|
"dependencies": {
|
|
139
142
|
"@babel/runtime": "^7.9.6",
|
|
@@ -145,7 +148,7 @@
|
|
|
145
148
|
"@styled-system/prop-types": "^5.1.4",
|
|
146
149
|
"@styled-system/theme-get": "^5.1.2",
|
|
147
150
|
"@types/react-window": "^1.8.8",
|
|
148
|
-
"@types/styled-system": "5.1.
|
|
151
|
+
"@types/styled-system": "5.1.25",
|
|
149
152
|
"core-js": "3",
|
|
150
153
|
"date-fns": "2.23.0",
|
|
151
154
|
"debounce": "^1.2.0",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export type MaybeTooltipProps = {
|
|
3
|
-
/** The content to display inside the tooltip */
|
|
4
|
-
tooltip: React.ReactNode;
|
|
5
|
-
/** Whether to enable the tooltip at all */
|
|
6
|
-
showTooltip?: boolean;
|
|
7
|
-
/** Tooltip placement relative to trigger element */
|
|
8
|
-
placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
9
|
-
/** CSS class for the tooltip content */
|
|
10
|
-
className?: string;
|
|
11
|
-
/** Whether tooltip is open by default */
|
|
12
|
-
defaultOpen?: boolean;
|
|
13
|
-
/** Delay before showing the tooltip (ms) */
|
|
14
|
-
showDelay?: number;
|
|
15
|
-
/** Maximum width for tooltip box */
|
|
16
|
-
maxWidth?: string;
|
|
17
|
-
/** Allow opening tooltip on mobile tap (not supported by new Tooltip) */
|
|
18
|
-
supportMobileTap?: boolean;
|
|
19
|
-
/** The trigger element(s) */
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
};
|
|
22
|
-
declare function MaybeTooltip({ tooltip, showTooltip, placement, defaultOpen, showDelay, maxWidth, supportMobileTap: _supportMobileTap, // Note: supportMobileTap is handled internally by the new Tooltip
|
|
23
|
-
className, children, }: MaybeTooltipProps): React.JSX.Element;
|
|
24
|
-
export default MaybeTooltip;
|