@nulogy/components 16.0.2 → 16.0.3
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 +1 -0
- package/dist/main.js.map +1 -1
- package/dist/main.module.js +1 -0
- package/dist/main.module.js.map +1 -1
- package/dist/src/Alert/Alert.story.d.ts +1 -1
- package/dist/src/Alert/Alert.story.js +11 -0
- package/dist/src/AppTag/stories/AppTag.story.d.ts +2 -2
- package/dist/src/AppTag/stories/AppTag.story.js +6 -4
- package/dist/src/AppTag/stories/AppTag.usecases.story.d.ts +13 -10
- package/dist/src/AppTag/stories/AppTag.usecases.story.js +71 -51
- package/dist/src/AsyncSelect/AsyncSelect.story.d.ts +17 -13
- package/dist/src/AsyncSelect/AsyncSelect.story.js +46 -23
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +8 -1
- package/dist/src/BottomSheet/stories/BottomSheet.actions.story.js +22 -3
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +9 -2
- package/dist/src/BottomSheet/stories/BottomSheet.features.story.js +27 -12
- package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +7 -1
- package/dist/src/BottomSheet/stories/BottomSheet.story.js +20 -3
- package/dist/src/Box/Box.story.d.ts +22 -44
- package/dist/src/Box/Box.story.js +30 -30
- package/dist/src/BrandedNavBar/NavBar.story.d.ts +16 -28
- package/dist/src/BrandedNavBar/NavBar.story.js +41 -35
- package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +1 -1
- package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +4 -8
- package/dist/src/Breadcrumbs/Breadcrumbs.story.js +4 -4
- package/dist/src/Button/Button.story.d.ts +14 -28
- package/dist/src/Button/Button.story.js +14 -14
- package/dist/src/Button/ControlIcon.story.js +1 -1
- package/dist/src/Button/IconicButton.story.d.ts +23 -45
- package/dist/src/Button/IconicButton.story.js +27 -25
- package/dist/src/ButtonGroup/ButtonGroup.story.d.ts +13 -23
- package/dist/src/ButtonGroup/ButtonGroup.story.js +10 -10
- package/dist/src/Card/Card.story.d.ts +3 -5
- package/dist/src/Card/Card.story.js +9 -7
- package/dist/src/Checkbox/Checkbox.story.d.ts +18 -34
- package/dist/src/Checkbox/Checkbox.story.js +28 -24
- package/dist/src/Checkbox/CheckboxGroup.story.d.ts +10 -20
- package/dist/src/Checkbox/CheckboxGroup.story.js +10 -10
- package/dist/src/DatePickers/stories/DatePicker.story.d.ts +9 -2
- package/dist/src/DatePickers/stories/DatePicker.story.js +43 -2
- package/dist/src/DatePickers/stories/MonthPicker.story.d.ts +8 -1
- package/dist/src/DatePickers/stories/MonthPicker.story.js +21 -2
- package/dist/src/DatePickers/stories/WeekPicker.story.d.ts +32 -4
- package/dist/src/DatePickers/stories/WeekPicker.story.js +57 -8
- package/dist/src/DateRange/DateRange.story.d.ts +16 -2
- package/dist/src/DateRange/DateRange.story.js +41 -3
- package/dist/src/DescriptionList/stories/DescriptionList.column.story.d.ts +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +10 -8
- package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.layout.story.d.ts +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +12 -10
- package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.story.d.ts +1 -0
- package/dist/src/DescriptionList/stories/DescriptionList.story.js +3 -0
- package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +32 -32
- package/dist/src/DropdownMenu/DropdownMenu.story.js +58 -16
- package/dist/src/FieldLabel/FieldLabel.story.d.ts +2 -4
- package/dist/src/FieldLabel/FieldLabel.story.js +2 -2
- package/dist/src/Flex/Flex.story.d.ts +34 -68
- package/dist/src/Flex/Flex.story.js +36 -36
- package/dist/src/Form/Form.story.d.ts +8 -16
- package/dist/src/Form/Form.story.js +8 -8
- package/dist/src/Icon/Icon.story.d.ts +12 -24
- package/dist/src/Icon/Icon.story.js +15 -15
- package/dist/src/Input/Input.story.d.ts +16 -32
- package/dist/src/Input/Input.story.js +23 -23
- package/dist/src/Layout/Page.applicationFrame.story.d.ts +1 -1
- package/dist/src/Layout/Page.story.d.ts +1 -1
- package/dist/src/Layout/Sidebar.story.d.ts +1 -1
- package/dist/src/Link/Link.story.d.ts +16 -32
- package/dist/src/Link/Link.story.js +16 -17
- package/dist/src/List/List.story.d.ts +8 -16
- package/dist/src/List/List.story.js +8 -8
- package/dist/src/LoadingAnimation/LoadingAnimation.story.d.ts +4 -8
- package/dist/src/LoadingAnimation/LoadingAnimation.story.js +4 -4
- package/dist/src/MaybeTooltip/MaybeTooltip.story.d.ts +1 -1
- package/dist/src/Modal/Modal.story.d.ts +1 -1
- package/dist/src/Navigation/stories/Navigation.appSwitcher.story.d.ts +8 -1
- package/dist/src/Navigation/stories/Navigation.appSwitcher.story.js +19 -1
- package/dist/src/Navigation/stories/Navigation.logos.story.d.ts +2 -4
- package/dist/src/Navigation/stories/Navigation.logos.story.js +4 -4
- package/dist/src/Navigation/stories/Navigation.story.d.ts +7 -1
- package/dist/src/Navigation/stories/Navigation.story.js +145 -136
- package/dist/src/Navigation/stories/Navigation.userMenu.story.d.ts +8 -1
- package/dist/src/Navigation/stories/Navigation.userMenu.story.js +22 -1
- package/dist/src/Overlay/Overlay.story.d.ts +2 -4
- package/dist/src/Overlay/Overlay.story.js +2 -2
- package/dist/src/Pagination/Pagination.story.d.ts +14 -13
- package/dist/src/Pagination/Pagination.story.js +32 -11
- package/dist/src/Radio/Radio.story.d.ts +1 -1
- package/dist/src/Radio/Radio.story.js +44 -1
- package/dist/src/Radio/RadioGroup.story.d.ts +29 -21
- package/dist/src/Radio/RadioGroup.story.js +67 -14
- package/dist/src/RangeContainer/RangeContainer.story.d.ts +2 -4
- package/dist/src/RangeContainer/RangeContainer.story.js +2 -2
- package/dist/src/Select/Select.story.d.ts +37 -65
- package/dist/src/Select/Select.story.js +93 -49
- package/dist/src/StatusIndicator/StatusIndicator.story.d.ts +4 -8
- package/dist/src/StatusIndicator/StatusIndicator.story.js +4 -4
- package/dist/src/Switcher/Switcher.story.d.ts +8 -1
- package/dist/src/Switcher/Switcher.story.js +13 -1
- package/dist/src/Table/stories/BaseTable.story.d.ts +1 -1
- package/dist/src/Table/stories/BaseTable.story.js +1 -1
- package/dist/src/Table/stories/CustomContent.story.js +1 -1
- package/dist/src/Table/stories/Density.story.d.ts +4 -8
- package/dist/src/Table/stories/Density.story.js +4 -4
- package/dist/src/Table/stories/SortingColumnHeader.story.d.ts +1 -1
- package/dist/src/Table/stories/SortingColumnHeader.story.js +1 -1
- package/dist/src/Table/stories/Table.story.d.ts +1 -1
- package/dist/src/Table/stories/Table.story.js +37 -1
- package/dist/src/Table/stories/TableWithCustomSorting.story.d.ts +2 -4
- package/dist/src/Table/stories/TableWithCustomSorting.story.js +2 -2
- package/dist/src/Table/stories/TableWithExpandableRows.story.d.ts +4 -8
- package/dist/src/Table/stories/TableWithExpandableRows.story.js +5 -5
- package/dist/src/Table/stories/TableWithFiltering.story.d.ts +8 -8
- package/dist/src/Table/stories/TableWithFiltering.story.js +15 -4
- package/dist/src/Table/stories/TableWithSelectableRows.story.d.ts +8 -8
- package/dist/src/Table/stories/TableWithSelectableRows.story.js +22 -5
- package/dist/src/Table/stories/TableWithServerSidePagination.story.d.ts +2 -4
- package/dist/src/Table/stories/TableWithServerSidePagination.story.js +2 -2
- package/dist/src/Tabs/Tabs.story.d.ts +33 -33
- package/dist/src/Tabs/Tabs.story.js +52 -16
- package/dist/src/Textarea/Textarea.story.js +1 -1
- package/dist/src/TimePicker/TimePicker.js +2 -0
- package/dist/src/TimePicker/TimePicker.story.d.ts +24 -40
- package/dist/src/TimePicker/TimePicker.story.js +40 -27
- package/dist/src/TimeRange/TimeRange.story.d.ts +14 -20
- package/dist/src/TimeRange/TimeRange.story.js +34 -20
- package/dist/src/Toast/Toast.story.d.ts +24 -25
- package/dist/src/Toast/Toast.story.js +170 -142
- package/dist/src/ToastContainer/ToastContainer.story.d.ts +8 -1
- package/dist/src/ToastContainer/ToastContainer.story.js +13 -1
- package/dist/src/Toggle/Toggle.story.d.ts +25 -15
- package/dist/src/Toggle/Toggle.story.js +77 -43
- package/dist/src/Tooltip/Tooltip.story.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.story.js +16 -0
- package/dist/src/TopBar/stories/TopBar.story.d.ts +7 -1
- package/dist/src/TopBar/stories/TopBar.story.js +18 -1
- package/dist/src/TruncatedText/TruncatedText.story.d.ts +29 -34
- package/dist/src/TruncatedText/TruncatedText.story.js +46 -19
- package/dist/src/Type/Text.story.d.ts +10 -20
- package/dist/src/Type/Text.story.js +10 -10
- package/dist/src/Validation/InlineValidation.story.d.ts +6 -12
- package/dist/src/Validation/InlineValidation.story.js +6 -6
- package/dist/src/VisualTests/Select.story.d.ts +12 -24
- package/dist/src/VisualTests/Select.story.js +19 -19
- package/dist/src/pages/ErrorPage.story.d.ts +3 -5
- package/dist/src/pages/ErrorPage.story.js +10 -10
- package/dist/src/pages/LoginPage.story.d.ts +8 -16
- package/dist/src/pages/LoginPage.story.js +8 -8
- package/package.json +15 -23
|
@@ -4,68 +4,46 @@ declare const _default: {
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const _Box: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const WithATextColour: {
|
|
7
|
-
()
|
|
8
|
-
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
7
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
name: string;
|
|
11
9
|
};
|
|
12
10
|
export declare const WithABackgroundColour: {
|
|
13
|
-
()
|
|
14
|
-
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
11
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
name: string;
|
|
17
13
|
};
|
|
18
14
|
export declare const WithASetWidth: {
|
|
19
|
-
()
|
|
20
|
-
|
|
21
|
-
name: string;
|
|
22
|
-
};
|
|
15
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
name: string;
|
|
23
17
|
};
|
|
24
18
|
export declare const WithAResponsiveWidth: {
|
|
25
|
-
()
|
|
26
|
-
|
|
27
|
-
name: string;
|
|
28
|
-
};
|
|
19
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
name: string;
|
|
29
21
|
};
|
|
30
22
|
export declare const WithPadding: {
|
|
31
|
-
()
|
|
32
|
-
|
|
33
|
-
name: string;
|
|
34
|
-
};
|
|
23
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
name: string;
|
|
35
25
|
};
|
|
36
26
|
export declare const WithMargin: {
|
|
37
|
-
()
|
|
38
|
-
|
|
39
|
-
name: string;
|
|
40
|
-
};
|
|
27
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
name: string;
|
|
41
29
|
};
|
|
42
30
|
export declare const WithAShadow: {
|
|
43
|
-
()
|
|
44
|
-
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
31
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
name: string;
|
|
47
33
|
};
|
|
48
34
|
export declare const WithABackgroundImage: {
|
|
49
|
-
()
|
|
50
|
-
|
|
51
|
-
name: string;
|
|
52
|
-
};
|
|
35
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
name: string;
|
|
53
37
|
};
|
|
54
38
|
export declare const WithHoverTransition: {
|
|
55
|
-
()
|
|
56
|
-
|
|
57
|
-
name: string;
|
|
58
|
-
};
|
|
39
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
name: string;
|
|
59
41
|
};
|
|
60
42
|
export declare const WithTransform: {
|
|
61
|
-
()
|
|
62
|
-
|
|
63
|
-
name: string;
|
|
64
|
-
};
|
|
43
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
name: string;
|
|
65
45
|
};
|
|
66
46
|
export declare const WithAnimation: {
|
|
67
|
-
()
|
|
68
|
-
|
|
69
|
-
name: string;
|
|
70
|
-
};
|
|
47
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
name: string;
|
|
71
49
|
};
|
|
@@ -8,36 +8,36 @@ export default {
|
|
|
8
8
|
title: "Components/Box",
|
|
9
9
|
};
|
|
10
10
|
export const _Box = () => _jsx(Box, { p: "x3", children: "Hello World" });
|
|
11
|
-
export const WithATextColour =
|
|
12
|
-
|
|
11
|
+
export const WithATextColour = {
|
|
12
|
+
render: () => (_jsx(Flex, { p: "x3", color: "blue", children: "Hello World" })),
|
|
13
13
|
name: "With a text colour",
|
|
14
14
|
};
|
|
15
|
-
export const WithABackgroundColour =
|
|
16
|
-
|
|
15
|
+
export const WithABackgroundColour = {
|
|
16
|
+
render: () => (_jsx(Box, { p: "x3", color: "white", bg: "blue", children: "Hello World" })),
|
|
17
17
|
name: "With a background colour",
|
|
18
18
|
};
|
|
19
|
-
export const WithASetWidth =
|
|
20
|
-
|
|
19
|
+
export const WithASetWidth = {
|
|
20
|
+
render: () => (_jsx(Box, { p: "x3", width: 1 / 2, bg: "whiteGrey", children: "Half Width" })),
|
|
21
21
|
name: "With a set width",
|
|
22
22
|
};
|
|
23
|
-
export const WithAResponsiveWidth =
|
|
24
|
-
|
|
23
|
+
export const WithAResponsiveWidth = {
|
|
24
|
+
render: () => (_jsx(Box, { p: "x3", width: { extraSmall: 1, small: 1 / 2, medium: 1 / 4 }, bg: "whiteGrey", children: "Full width on extra small screens, 1/2 width on small and 1/4 width on medium" })),
|
|
25
25
|
name: "With a responsive width",
|
|
26
26
|
};
|
|
27
|
-
export const WithPadding =
|
|
28
|
-
|
|
27
|
+
export const WithPadding = {
|
|
28
|
+
render: () => (_jsxs(Box, { p: "x2", children: [_jsx(Box, { m: "x1", p: "x3", bg: "whiteGrey", children: "Padding" }), _jsx(Box, { m: "x1", p: "x3", bg: "whiteGrey", children: "Padding top" }), _jsx(Box, { m: "x1", pr: "x3", bg: "whiteGrey", children: "Padding right" }), _jsx(Box, { m: "x1", pb: "x3", bg: "whiteGrey", children: "Padding bottom" }), _jsx(Box, { m: "x1", pl: "x3", bg: "whiteGrey", children: "Padding left" }), _jsx(Box, { m: "x1", px: "x3", bg: "whiteGrey", children: "Padding x" }), _jsx(Box, { m: "x1", py: "x3", bg: "whiteGrey", children: "Padding y" })] })),
|
|
29
29
|
name: "With padding",
|
|
30
30
|
};
|
|
31
|
-
export const WithMargin =
|
|
32
|
-
|
|
31
|
+
export const WithMargin = {
|
|
32
|
+
render: () => (_jsxs(Box, { p: "x3", children: [_jsx(Box, { m: "x3", bg: "whiteGrey", children: "Margin" }), _jsx(Box, { mt: "x3", bg: "whiteGrey", children: "Margin top" }), _jsx(Box, { mr: "x3", bg: "whiteGrey", children: "Margin right" }), _jsx(Box, { mb: "x3", bg: "whiteGrey", children: "Margin bottom" }), _jsx(Box, { ml: "x3", bg: "whiteGrey", children: "Margin left" }), _jsx(Box, { mx: "x3", bg: "whiteGrey", children: "Margin x" }), _jsx(Box, { my: "x3", bg: "whiteGrey", children: "Margin y" })] })),
|
|
33
33
|
name: "With margin",
|
|
34
34
|
};
|
|
35
|
-
export const WithAShadow =
|
|
36
|
-
|
|
35
|
+
export const WithAShadow = {
|
|
36
|
+
render: () => (_jsxs(_Fragment, { children: [_jsx(Box, { p: "x1", mb: "x2", boxShadow: "small", children: "Small shadow" }), _jsx(Box, { p: "x3", mb: "x2", boxShadow: "medium", children: "Medium shadow" }), _jsx(Box, { p: "x6", mb: "x2", boxShadow: "large", children: "Large shadow" })] })),
|
|
37
37
|
name: "With a shadow",
|
|
38
38
|
};
|
|
39
|
-
export const WithABackgroundImage =
|
|
40
|
-
|
|
39
|
+
export const WithABackgroundImage = {
|
|
40
|
+
render: () => (_jsx(Box, { p: "x1", mb: "x2", backgroundImage: "linear-gradient(0deg, #E1EBFA, #216BEB)", children: "Gradient" })),
|
|
41
41
|
name: "With a background image",
|
|
42
42
|
};
|
|
43
43
|
const HoverableBox = styled(Box)({
|
|
@@ -45,23 +45,23 @@ const HoverableBox = styled(Box)({
|
|
|
45
45
|
backgroundColor: "blue",
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
|
-
export const WithHoverTransition =
|
|
49
|
-
|
|
48
|
+
export const WithHoverTransition = {
|
|
49
|
+
render: () => (_jsx(HoverableBox, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", transition: "background-color 0.5s linear", children: "Transition" })),
|
|
50
50
|
name: "With hover transition",
|
|
51
51
|
};
|
|
52
|
-
export const WithTransform =
|
|
53
|
-
|
|
52
|
+
export const WithTransform = {
|
|
53
|
+
render: () => (_jsx(Box, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", transform: "rotate(90deg)", children: "Rotated" })),
|
|
54
54
|
name: "with transform",
|
|
55
55
|
};
|
|
56
|
-
export const WithAnimation =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
|
|
56
|
+
export const WithAnimation = {
|
|
57
|
+
render: () => {
|
|
58
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
59
|
+
const variants = {
|
|
60
|
+
open: { opacity: 1, x: 0 },
|
|
61
|
+
closed: { opacity: 0, x: "-100%" },
|
|
62
|
+
};
|
|
63
|
+
const handleClick = () => setIsOpen(!isOpen);
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: handleClick, children: "Animate!" }), _jsx(AnimatedBox, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", animate: isOpen ? "open" : "closed", variants: variants, transition: { duration: 2 }, children: "Animated" })] }));
|
|
65
|
+
},
|
|
66
66
|
name: "with animation",
|
|
67
67
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
2
|
import { BrandedNavBar as NDSBrandedNavBar } from "./index";
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
@@ -6,46 +6,34 @@ declare const _default: {
|
|
|
6
6
|
export default _default;
|
|
7
7
|
type Story = StoryObj<typeof NDSBrandedNavBar>;
|
|
8
8
|
export declare const _BrandedNavBar: {
|
|
9
|
-
()
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
};
|
|
9
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
name: string;
|
|
13
11
|
};
|
|
14
12
|
export declare const WithACompanyLogo: {
|
|
15
|
-
()
|
|
16
|
-
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
13
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
name: string;
|
|
19
15
|
};
|
|
20
16
|
export declare const WithAppName: {
|
|
21
|
-
()
|
|
22
|
-
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
17
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
name: string;
|
|
25
19
|
};
|
|
26
20
|
export declare const WithACompanyLogoAndAppName: {
|
|
27
|
-
()
|
|
28
|
-
|
|
29
|
-
name: string;
|
|
30
|
-
};
|
|
21
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
name: string;
|
|
31
23
|
};
|
|
32
24
|
export declare const WithEnvironmentBanner: Story;
|
|
33
25
|
export declare const WithIcon: {
|
|
34
|
-
()
|
|
35
|
-
|
|
36
|
-
name: string;
|
|
37
|
-
};
|
|
26
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
name: string;
|
|
38
28
|
};
|
|
39
29
|
export declare const WithPrimaryAndSecondarySubMenus: () => import("react/jsx-runtime").JSX.Element;
|
|
40
30
|
export declare const WithExternalLinks: () => import("react/jsx-runtime").JSX.Element;
|
|
41
31
|
export declare const WithReactRouter: {
|
|
42
|
-
()
|
|
43
|
-
|
|
44
|
-
name: string;
|
|
45
|
-
};
|
|
32
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
name: string;
|
|
46
34
|
};
|
|
47
35
|
export declare const WithHamburgerMenu: {
|
|
48
|
-
()
|
|
36
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
49
37
|
parameters: {
|
|
50
38
|
viewport: {
|
|
51
39
|
defaultViewport: string;
|
|
@@ -57,7 +45,7 @@ export declare const WithHamburgerMenu: {
|
|
|
57
45
|
};
|
|
58
46
|
export declare const CustomRendering: () => import("react/jsx-runtime").JSX.Element;
|
|
59
47
|
export declare const CustomRenderingInHamburger: {
|
|
60
|
-
()
|
|
48
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
61
49
|
parameters: {
|
|
62
50
|
viewport: {
|
|
63
51
|
defaultViewport: string;
|
|
@@ -69,7 +57,7 @@ export declare const CustomRenderingInHamburger: {
|
|
|
69
57
|
};
|
|
70
58
|
export declare const CustomMenuTriggers: () => import("react/jsx-runtime").JSX.Element;
|
|
71
59
|
export declare const CustomMenuTriggersInHamburger: {
|
|
72
|
-
()
|
|
60
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
73
61
|
parameters: {
|
|
74
62
|
viewport: {
|
|
75
63
|
defaultViewport: string;
|
|
@@ -120,20 +120,20 @@ const secondaryMenuWithIcon = [
|
|
|
120
120
|
export default {
|
|
121
121
|
title: "Components/BrandedNavBar",
|
|
122
122
|
};
|
|
123
|
-
export const _BrandedNavBar =
|
|
124
|
-
|
|
123
|
+
export const _BrandedNavBar = {
|
|
124
|
+
render: () => _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu } }),
|
|
125
125
|
name: "BrandedNavBar",
|
|
126
126
|
};
|
|
127
|
-
export const WithACompanyLogo =
|
|
128
|
-
|
|
127
|
+
export const WithACompanyLogo = {
|
|
128
|
+
render: () => _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu }, logoSrc: sampleLogo }),
|
|
129
129
|
name: "With a company logo",
|
|
130
130
|
};
|
|
131
|
-
export const WithAppName =
|
|
132
|
-
|
|
131
|
+
export const WithAppName = {
|
|
132
|
+
render: () => _jsx(BrandedNavBar, { subtext: "Quality Control", menuData: { primaryMenu, secondaryMenu } }),
|
|
133
133
|
name: "With app name",
|
|
134
134
|
};
|
|
135
|
-
export const WithACompanyLogoAndAppName =
|
|
136
|
-
|
|
135
|
+
export const WithACompanyLogoAndAppName = {
|
|
136
|
+
render: () => (_jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu }, subtext: "Quality control", logoSrc: sampleLogo })),
|
|
137
137
|
name: "With a company logo and app name",
|
|
138
138
|
};
|
|
139
139
|
export const WithEnvironmentBanner = {
|
|
@@ -149,11 +149,11 @@ export const WithEnvironmentBanner = {
|
|
|
149
149
|
},
|
|
150
150
|
name: "with environment banner",
|
|
151
151
|
};
|
|
152
|
-
export const WithIcon =
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
export const WithIcon = {
|
|
153
|
+
render: () => (_jsx(BrandedNavBar, { menuData: {
|
|
154
|
+
primaryMenu: primaryMenu,
|
|
155
|
+
secondaryMenu: secondaryMenuWithIcon,
|
|
156
|
+
} })),
|
|
157
157
|
name: "With icon",
|
|
158
158
|
};
|
|
159
159
|
export const WithPrimaryAndSecondarySubMenus = () => (_jsx(BrandedNavBar, { menuData: {
|
|
@@ -322,21 +322,23 @@ const primaryMenuReactRouter = [
|
|
|
322
322
|
},
|
|
323
323
|
{ name: "Link", to: "/Link" },
|
|
324
324
|
];
|
|
325
|
-
export const WithReactRouter =
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
325
|
+
export const WithReactRouter = {
|
|
326
|
+
render: () => (_jsx(BrowserRouter, { basename: "/", children: _jsx(BrandedNavBar, { brandingLinkTo: "/Home", brandingLinkComponent: ReactRouterLink, menuData: {
|
|
327
|
+
primaryMenu: primaryMenuReactRouter,
|
|
328
|
+
secondaryMenu: secondaryMenuWithIcon,
|
|
329
|
+
} }) })),
|
|
330
330
|
name: "With react router",
|
|
331
331
|
};
|
|
332
|
-
export const WithHamburgerMenu =
|
|
333
|
-
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
export const WithHamburgerMenu = {
|
|
333
|
+
render: () => {
|
|
334
|
+
return _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu }, defaultOpen: true });
|
|
335
|
+
},
|
|
336
|
+
parameters: {
|
|
337
|
+
viewport: {
|
|
338
|
+
defaultViewport: "small", // for some reason this has to match the viewport key, NOT the name!
|
|
339
|
+
},
|
|
340
|
+
chromatic: { viewports: [parseInt(theme.breakpoints.small)] },
|
|
338
341
|
},
|
|
339
|
-
chromatic: { viewports: [parseInt(theme.breakpoints.small)] },
|
|
340
342
|
};
|
|
341
343
|
const customPrimaryMenu = [
|
|
342
344
|
{
|
|
@@ -364,12 +366,14 @@ const customPrimaryMenu = [
|
|
|
364
366
|
},
|
|
365
367
|
];
|
|
366
368
|
export const CustomRendering = () => _jsx(BrandedNavBar, { menuData: { primaryMenu: customPrimaryMenu, secondaryMenu } });
|
|
367
|
-
export const CustomRenderingInHamburger =
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
export const CustomRenderingInHamburger = {
|
|
370
|
+
render: () => _jsx(BrandedNavBar, { menuData: { primaryMenu: customPrimaryMenu, secondaryMenu }, defaultOpen: true }),
|
|
371
|
+
parameters: {
|
|
372
|
+
viewport: {
|
|
373
|
+
defaultViewport: "small", // for some reason this has to match the viewport key, NOT the name!
|
|
374
|
+
},
|
|
375
|
+
chromatic: { viewports: [parseInt(theme.breakpoints.small)] },
|
|
371
376
|
},
|
|
372
|
-
chromatic: { viewports: [parseInt(theme.breakpoints.small)] },
|
|
373
377
|
};
|
|
374
378
|
const primaryMenuWithCustomTriggers = [
|
|
375
379
|
{
|
|
@@ -400,10 +404,12 @@ const primaryMenuWithCustomTriggers = [
|
|
|
400
404
|
},
|
|
401
405
|
];
|
|
402
406
|
export const CustomMenuTriggers = () => (_jsx(BrandedNavBar, { menuData: { primaryMenu: primaryMenuWithCustomTriggers, secondaryMenu } }));
|
|
403
|
-
export const CustomMenuTriggersInHamburger =
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
+
export const CustomMenuTriggersInHamburger = {
|
|
408
|
+
render: () => _jsx(BrandedNavBar, { menuData: { primaryMenu: primaryMenuWithCustomTriggers, secondaryMenu }, defaultOpen: true }),
|
|
409
|
+
parameters: {
|
|
410
|
+
viewport: {
|
|
411
|
+
defaultViewport: "small", // for some reason this has to match the viewport key, NOT the name!
|
|
412
|
+
},
|
|
413
|
+
chromatic: { viewports: [parseInt(theme.breakpoints.small)] },
|
|
407
414
|
},
|
|
408
|
-
chromatic: { viewports: [parseInt(theme.breakpoints.small)] },
|
|
409
415
|
};
|
|
@@ -4,14 +4,10 @@ declare const _default: {
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const _Breadcrumbs: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const WithoutLink: {
|
|
7
|
-
()
|
|
8
|
-
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
7
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
name: string;
|
|
11
9
|
};
|
|
12
10
|
export declare const WithReactRouter: {
|
|
13
|
-
()
|
|
14
|
-
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
11
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
name: string;
|
|
17
13
|
};
|
|
@@ -7,11 +7,11 @@ export default {
|
|
|
7
7
|
title: "Components/Breadcrumbs",
|
|
8
8
|
};
|
|
9
9
|
export const _Breadcrumbs = () => (_jsxs(_Fragment, { children: [_jsx(Breadcrumbs, { children: _jsx(Link, { href: "/", children: "Home" }) }), _jsxs(Breadcrumbs, { children: [_jsx(Link, { href: "/", children: "Home" }), _jsx(Link, { href: "/", children: "Tenants" })] })] }));
|
|
10
|
-
export const WithoutLink =
|
|
11
|
-
|
|
10
|
+
export const WithoutLink = {
|
|
11
|
+
render: () => (_jsxs(Breadcrumbs, { children: [_jsx(Link, { href: "/", children: "Home" }), _jsx(Link, { href: "/", children: "Tenants" }), _jsx(Text, { children: "Current Tenant" })] })),
|
|
12
12
|
name: "without link",
|
|
13
13
|
};
|
|
14
|
-
export const WithReactRouter =
|
|
15
|
-
|
|
14
|
+
export const WithReactRouter = {
|
|
15
|
+
render: () => (_jsx(BrowserRouter, { children: _jsxs(Breadcrumbs, { children: [_jsx(Link, { as: ReactRouterLink, to: "/", children: "Home" }), _jsx(Link, { as: ReactRouterLink, to: "/", children: "Tenants" }), _jsx(Text, { children: "Current Tenant" })] }) })),
|
|
16
16
|
name: "with react router",
|
|
17
17
|
};
|
|
@@ -4,45 +4,31 @@ declare const _default: {
|
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const _Button: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const _PrimaryButton: {
|
|
7
|
-
()
|
|
8
|
-
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
7
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
name: string;
|
|
11
9
|
};
|
|
12
10
|
export declare const _DangerButton: {
|
|
13
|
-
()
|
|
14
|
-
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
11
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
name: string;
|
|
17
13
|
};
|
|
18
14
|
export declare const _QuietButton: {
|
|
19
|
-
()
|
|
20
|
-
|
|
21
|
-
name: string;
|
|
22
|
-
};
|
|
15
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
name: string;
|
|
23
17
|
};
|
|
24
18
|
export declare const WithDifferentSizes: () => import("react/jsx-runtime").JSX.Element;
|
|
25
19
|
export declare const WithASelectedIcon: {
|
|
26
|
-
()
|
|
27
|
-
|
|
28
|
-
name: string;
|
|
29
|
-
};
|
|
20
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
name: string;
|
|
30
22
|
};
|
|
31
23
|
export declare const SetToFullWidth: {
|
|
32
|
-
()
|
|
33
|
-
|
|
34
|
-
name: string;
|
|
35
|
-
};
|
|
24
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
name: string;
|
|
36
26
|
};
|
|
37
27
|
export declare const SetToDisabled: {
|
|
38
|
-
()
|
|
39
|
-
|
|
40
|
-
name: string;
|
|
41
|
-
};
|
|
28
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
name: string;
|
|
42
30
|
};
|
|
43
31
|
export declare const AsALink: {
|
|
44
|
-
()
|
|
45
|
-
|
|
46
|
-
name: string;
|
|
47
|
-
};
|
|
32
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
name: string;
|
|
48
34
|
};
|
|
@@ -6,32 +6,32 @@ export default {
|
|
|
6
6
|
title: "Components/Buttons",
|
|
7
7
|
};
|
|
8
8
|
export const _Button = () => _jsx(Button, { children: "Create project" });
|
|
9
|
-
export const _PrimaryButton =
|
|
10
|
-
|
|
9
|
+
export const _PrimaryButton = {
|
|
10
|
+
render: () => _jsx(PrimaryButton, { children: "Create project" }),
|
|
11
11
|
name: "PrimaryButton",
|
|
12
12
|
};
|
|
13
|
-
export const _DangerButton =
|
|
14
|
-
|
|
13
|
+
export const _DangerButton = {
|
|
14
|
+
render: () => _jsx(DangerButton, { children: "Delete project" }),
|
|
15
15
|
name: "DangerButton",
|
|
16
16
|
};
|
|
17
|
-
export const _QuietButton =
|
|
18
|
-
|
|
17
|
+
export const _QuietButton = {
|
|
18
|
+
render: () => _jsx(QuietButton, { children: "Create project" }),
|
|
19
19
|
name: "QuietButton",
|
|
20
20
|
};
|
|
21
21
|
export const WithDifferentSizes = () => (_jsxs(Flex, { flexDirection: "column", gap: "x3", children: [_jsxs(Flex, { flexDirection: "column", gap: "x1", children: [_jsx(Heading4, { children: "Medium size (default)" }), _jsxs(Flex, { gap: "x1", children: [_jsx(Button, { children: "Secondary Button" }), _jsx(PrimaryButton, { children: "Primary Button" }), _jsx(DangerButton, { children: "Danger Button" }), _jsx(QuietButton, { children: "Quiet Button" })] })] }), _jsxs(Flex, { flexDirection: "column", gap: "x1", children: [_jsx(Heading4, { children: "Small size" }), _jsxs(Flex, { gap: "x1", children: [_jsx(Button, { size: "small", children: "Secondary Button" }), _jsx(PrimaryButton, { size: "small", children: "Primary Button" }), _jsx(DangerButton, { size: "small", children: "Danger Button" }), _jsx(QuietButton, { size: "small", children: "Quiet Button" })] })] })] }));
|
|
22
|
-
export const WithASelectedIcon =
|
|
23
|
-
|
|
22
|
+
export const WithASelectedIcon = {
|
|
23
|
+
render: () => (_jsxs(_Fragment, { children: [_jsx(Button, { icon: "add", iconSide: "left", size: "small", onClick: () => { }, disabled: true, children: "Create project" }), _jsx(Button, { icon: "add", iconSide: "right", children: "Create project" })] })),
|
|
24
24
|
name: "With a selected Icon",
|
|
25
25
|
};
|
|
26
|
-
export const SetToFullWidth =
|
|
27
|
-
|
|
26
|
+
export const SetToFullWidth = {
|
|
27
|
+
render: () => _jsx(PrimaryButton, { fullWidth: true, children: "Create project" }),
|
|
28
28
|
name: "Set to full width",
|
|
29
29
|
};
|
|
30
|
-
export const SetToDisabled =
|
|
31
|
-
|
|
30
|
+
export const SetToDisabled = {
|
|
31
|
+
render: () => _jsx(PrimaryButton, { disabled: true, children: "Create project" }),
|
|
32
32
|
name: "Set to disabled",
|
|
33
33
|
};
|
|
34
|
-
export const AsALink =
|
|
35
|
-
|
|
34
|
+
export const AsALink = {
|
|
35
|
+
render: () => (_jsx(PrimaryButton, { asLink: true, href: "/", children: "Create project" })),
|
|
36
36
|
name: "As a link",
|
|
37
37
|
};
|