@nulogy/components 15.2.3 → 15.4.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 +38131 -38779
- package/dist/main.js.map +1 -0
- package/dist/main.module.js +38680 -39199
- package/dist/main.module.js.map +1 -0
- 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/dist/vite.config.js +61 -0
- package/package.json +24 -41
- package/dist/src/TruncatedText/components/MaybeTooltip.d.ts +0 -24
- package/dist/vitest.config.js +0 -11
- /package/dist/{vitest.config.d.ts → vite.config.d.ts} +0 -0
|
@@ -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";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { defineConfig } from "vitest/config";
|
|
3
|
+
import react from "@vitejs/plugin-react";
|
|
4
|
+
const PEER_DEPENDENCIES = {
|
|
5
|
+
react: "React",
|
|
6
|
+
"styled-components": "styled",
|
|
7
|
+
"@nulogy/icons": "icons",
|
|
8
|
+
};
|
|
9
|
+
const GLOBALS = {
|
|
10
|
+
...PEER_DEPENDENCIES,
|
|
11
|
+
"deep-equal": "deepEqual",
|
|
12
|
+
"create-react-context": "createReactContext",
|
|
13
|
+
warning: "warning",
|
|
14
|
+
exenv: "exenv",
|
|
15
|
+
classnames: "t",
|
|
16
|
+
"html-parse-stringify2": "HTML",
|
|
17
|
+
"react-fast-compare": "isEqual",
|
|
18
|
+
"path-to-regexp": "pathToRegexp",
|
|
19
|
+
"react-is": "reactIs",
|
|
20
|
+
"react-dom": "reactDom",
|
|
21
|
+
};
|
|
22
|
+
const externals = Object.keys(GLOBALS);
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
plugins: [react()],
|
|
25
|
+
define: {
|
|
26
|
+
ENV: JSON.stringify(process.env.NODE_ENV || "development"),
|
|
27
|
+
},
|
|
28
|
+
resolve: {
|
|
29
|
+
extensions: [".js", ".jsx", ".ts", ".tsx", ".mjs"],
|
|
30
|
+
},
|
|
31
|
+
build: {
|
|
32
|
+
emptyOutDir: false,
|
|
33
|
+
lib: {
|
|
34
|
+
entry: resolve(__dirname, "src/index.ts"),
|
|
35
|
+
name: "NDSComponents",
|
|
36
|
+
formats: ["umd", "es"],
|
|
37
|
+
fileName: (format) => {
|
|
38
|
+
if (format === "umd") {
|
|
39
|
+
return "main.js";
|
|
40
|
+
}
|
|
41
|
+
return "main.module.js";
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
rollupOptions: {
|
|
45
|
+
external: externals,
|
|
46
|
+
output: {
|
|
47
|
+
globals: GLOBALS,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
sourcemap: true,
|
|
51
|
+
minify: false,
|
|
52
|
+
target: "es2020",
|
|
53
|
+
},
|
|
54
|
+
test: {
|
|
55
|
+
environment: "jsdom",
|
|
56
|
+
globals: false,
|
|
57
|
+
include: ["**/*.spec.tsx", "**/*.spec.ts"],
|
|
58
|
+
exclude: ["**/node_modules/**", "**/cypress/**", "**/dist/**"],
|
|
59
|
+
setupFiles: [resolve(__dirname, "spec/support/vitestAutoCleanup.ts")],
|
|
60
|
+
},
|
|
61
|
+
});
|
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.4.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
6
|
"private": false,
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"access": "public"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"ci": "pnpm && pnpm build && pnpm test && pnpm run check",
|
|
11
|
+
"ci": "pnpm && pnpm build && pnpm build:verify && pnpm test && pnpm run check",
|
|
11
12
|
"start-server": "pnpm build:storybook && pnpm http-server -p 9999 ./storybook-static",
|
|
12
13
|
"start": "concurrently \"pnpm build:watch\" \"pnpm start:storybook\"",
|
|
13
14
|
"start:cypress": "start-server-and-test start 9999 'cypress open'",
|
|
14
15
|
"start:storybook": "storybook dev -p 9999",
|
|
15
16
|
"clean:storybook": "rm -rf node_modules/.cache/storybook && rm -rf ./storybook-static",
|
|
16
|
-
"build": "
|
|
17
|
-
"build:
|
|
18
|
-
"build:
|
|
17
|
+
"build": "tsc -p tsconfig.build.json && vite build",
|
|
18
|
+
"build:verify": "node scripts/verify-build.js",
|
|
19
|
+
"build:watch": "vite build --watch",
|
|
20
|
+
"build:storybook": "storybook build --stats-json",
|
|
19
21
|
"warn:prepush": "echo \"Make sure you also run all the other CI steps before pushing by running 'pnpm ci'\"",
|
|
20
22
|
"check": "pnpm warn:prepush && pnpm check:types && pnpm check:lint && pnpm check:format",
|
|
21
23
|
"check:types": "tsc && cd cypress && tsc --noEmit",
|
|
@@ -61,46 +63,34 @@
|
|
|
61
63
|
},
|
|
62
64
|
"devDependencies": {
|
|
63
65
|
"@apollo/client": "^3.11.8",
|
|
64
|
-
"@babel/cli": "^7.28.3",
|
|
65
|
-
"@babel/core": "^7.28.5",
|
|
66
|
-
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
67
|
-
"@babel/preset-env": "^7.28.5",
|
|
68
|
-
"@babel/preset-typescript": "^7.28.5",
|
|
69
66
|
"@nulogy/eslint-config-nulogy": "^1.0.0",
|
|
70
67
|
"@nulogy/icons": "^4.37.2",
|
|
71
|
-
"@rollup/plugin-babel": "^5.0.0",
|
|
72
|
-
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
73
68
|
"@semantic-release/changelog": "^6.0.2",
|
|
74
69
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
75
70
|
"@semantic-release/git": "^10.0.1",
|
|
76
71
|
"@semantic-release/github": "^8.0.7",
|
|
77
72
|
"@semantic-release/npm": "^9.0.0",
|
|
78
73
|
"@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/codemod": "
|
|
86
|
-
"@storybook/react": "
|
|
87
|
-
"@storybook/react-
|
|
88
|
-
"@storybook/theming": "
|
|
74
|
+
"@storybook/addon-a11y": "8.6.14",
|
|
75
|
+
"@storybook/addon-actions": "8.6.14",
|
|
76
|
+
"@storybook/addon-docs": "8.6.14",
|
|
77
|
+
"@storybook/addon-storysource": "8.6.14",
|
|
78
|
+
"@storybook/addon-toolbars": "8.6.14",
|
|
79
|
+
"@storybook/addon-viewport": "8.6.14",
|
|
80
|
+
"@storybook/codemod": "8.6.14",
|
|
81
|
+
"@storybook/react": "8.6.14",
|
|
82
|
+
"@storybook/react-vite": "8.6.14",
|
|
83
|
+
"@storybook/theming": "8.6.14",
|
|
89
84
|
"@testing-library/react": "^12.1.5",
|
|
90
85
|
"@types/css-mediaquery": "^0.1.4",
|
|
91
86
|
"@types/deep-equal": "^1.0.4",
|
|
92
|
-
"@types/node": "^
|
|
87
|
+
"@types/node": "^24.0.0",
|
|
93
88
|
"@types/react": "^17.0.39",
|
|
94
89
|
"@types/react-dom": "^17.0.20",
|
|
95
|
-
"@types/react-router-dom": "
|
|
90
|
+
"@types/react-router-dom": "5.3.0",
|
|
96
91
|
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
|
97
92
|
"@typescript-eslint/parser": "^5.30.5",
|
|
98
|
-
"
|
|
99
|
-
"babel-loader": "8.0.6",
|
|
100
|
-
"babel-plugin-inline-json-import": "^0.3.2",
|
|
101
|
-
"babel-plugin-require-context-hook": "1.0.0",
|
|
102
|
-
"babel-plugin-styled-components": "^2.1.4",
|
|
103
|
-
"babel-preset-react": "6.24.1",
|
|
93
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
104
94
|
"chromatic": "^13.3.3",
|
|
105
95
|
"concurrently": "^9.2.0",
|
|
106
96
|
"css-mediaquery": "^0.1.2",
|
|
@@ -121,22 +111,16 @@
|
|
|
121
111
|
"react-color": "^2.18.1",
|
|
122
112
|
"react-dom": "17.0.2",
|
|
123
113
|
"react-router-dom": "^5.3.3",
|
|
124
|
-
"rollup": "^2.7.3",
|
|
125
|
-
"rollup-plugin-babel": "^4.4.0",
|
|
126
|
-
"rollup-plugin-commonjs": "^10.1.0",
|
|
127
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
128
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
129
114
|
"semantic-release": "^24.2.5",
|
|
130
115
|
"start-server-and-test": "^2.0.12",
|
|
131
|
-
"storybook": "
|
|
116
|
+
"storybook": "8.6.14",
|
|
132
117
|
"styled-components": "^6.1.19",
|
|
133
118
|
"svg-sprite-loader": "^6.0.11",
|
|
134
119
|
"typescript": "^5.9.3",
|
|
135
|
-
"
|
|
136
|
-
"
|
|
120
|
+
"vite": "^6.0.0",
|
|
121
|
+
"vitest": "^3.0.0"
|
|
137
122
|
},
|
|
138
123
|
"dependencies": {
|
|
139
|
-
"@babel/runtime": "^7.9.6",
|
|
140
124
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
141
125
|
"@nulogy/tokens": "^6.1.1",
|
|
142
126
|
"@radix-ui/react-navigation-menu": "^1.1.4",
|
|
@@ -145,8 +129,7 @@
|
|
|
145
129
|
"@styled-system/prop-types": "^5.1.4",
|
|
146
130
|
"@styled-system/theme-get": "^5.1.2",
|
|
147
131
|
"@types/react-window": "^1.8.8",
|
|
148
|
-
"@types/styled-system": "5.1.
|
|
149
|
-
"core-js": "3",
|
|
132
|
+
"@types/styled-system": "5.1.25",
|
|
150
133
|
"date-fns": "2.23.0",
|
|
151
134
|
"debounce": "^1.2.0",
|
|
152
135
|
"deep-equal": "^2.2.1",
|
|
@@ -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;
|
package/dist/vitest.config.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { resolve } from "path";
|
|
2
|
-
import { defineConfig } from "vitest/config";
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
environment: "jsdom",
|
|
6
|
-
globals: false,
|
|
7
|
-
include: ["**/*.spec.tsx", "**/*.spec.ts"],
|
|
8
|
-
exclude: ["**/node_modules/**", "**/cypress/**", "**/dist/**"],
|
|
9
|
-
setupFiles: [resolve(__dirname, "spec/support/vitestAutoCleanup.ts")],
|
|
10
|
-
},
|
|
11
|
-
});
|
|
File without changes
|