@nulogy/components 16.0.1 → 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 +46 -59
- package/dist/main.js.map +1 -1
- package/dist/main.module.js +46 -59
- 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/BottomSheet.parts.d.ts +2 -2
- package/dist/src/BottomSheet/BottomSheet.styled.d.ts +10 -6
- 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.d.ts +12 -13
- package/dist/src/Box/Box.story.d.ts +22 -44
- package/dist/src/Box/Box.story.js +30 -30
- package/dist/src/BrandedNavBar/DesktopMenu.d.ts +3 -1
- package/dist/src/BrandedNavBar/NavBar.js +2 -2
- 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/DangerButton.d.ts +3 -1
- package/dist/src/Button/IconicButton.story.d.ts +23 -45
- package/dist/src/Button/IconicButton.story.js +27 -25
- package/dist/src/Button/PrimaryButton.d.ts +3 -1
- package/dist/src/Button/QuietButton.d.ts +3 -1
- 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/DateRange/EndTime.d.ts +5 -7
- package/dist/src/DateRange/StartTime.d.ts +5 -7
- 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/DescriptionList/stories/fixtures.d.ts +2 -2
- package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +32 -32
- package/dist/src/DropdownMenu/DropdownMenu.story.js +58 -16
- package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
- package/dist/src/DropdownMenu/DropdownText.d.ts +1 -1
- package/dist/src/FieldLabel/FieldLabel.story.d.ts +2 -4
- package/dist/src/FieldLabel/FieldLabel.story.js +2 -2
- package/dist/src/FieldLabel/HelpText.d.ts +1 -1
- 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.d.ts +6 -2
- 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.d.ts +5 -3
- package/dist/src/Modal/Modal.js +2 -2
- package/dist/src/Modal/Modal.story.d.ts +2 -24
- package/dist/src/Modal/ModalCloseButton.d.ts +4 -2
- package/dist/src/Modal/ModalContent.d.ts +1 -1
- package/dist/src/Navigation/components/AppSwitcher/parts/Item.d.ts +3 -1
- package/dist/src/Navigation/components/AppSwitcher/parts/index.d.ts +15 -7
- package/dist/src/Navigation/components/DesktopNav/parts/MoreMenuItem.d.ts +5 -1
- package/dist/src/Navigation/components/MenuSubItem/parts/styled.d.ts +17 -5
- package/dist/src/Navigation/components/MobileNav/parts/styled.d.ts +10 -4
- package/dist/src/Navigation/components/UserMenu/UserMenu.d.ts +5 -1
- package/dist/src/Navigation/components/UserMenu/parts/styled.d.ts +6 -2
- package/dist/src/Navigation/components/shared/NavigationMenuContent.d.ts +5 -1
- package/dist/src/Navigation/components/shared/NavigationMenuItem.d.ts +3 -1
- package/dist/src/Navigation/components/shared/components.d.ts +35 -9
- 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 +13 -15
- 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/Summary/Summary.d.ts +1 -2
- package/dist/src/Summary/Summary.js +2 -2
- package/dist/src/Summary/SummaryContext.d.ts +3 -1
- package/dist/src/Summary/SummaryContext.js +2 -2
- package/dist/src/Summary/SummaryItem.d.ts +1 -1
- package/dist/src/Summary/SummaryItem.js +2 -2
- package/dist/src/Switcher/Switcher.d.ts +2 -2
- package/dist/src/Switcher/Switcher.js +2 -2
- 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/TabScrollIndicator.d.ts +1 -1
- package/dist/src/Tabs/TabScrollIndicator.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.d.ts +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/TimePicker/TimePickerInput.d.ts +3 -1
- package/dist/src/TimeRange/TimeRange.d.ts +3 -2
- 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/ToastContainer/ToastFunction.js +2 -2
- package/dist/src/Toggle/Toggle.story.d.ts +25 -15
- package/dist/src/Toggle/Toggle.story.js +77 -43
- package/dist/src/Toggle/ToggleButton.js +2 -2
- package/dist/src/Tooltip/Tooltip.story.d.ts +1 -1
- package/dist/src/Tooltip/Tooltip.story.js +16 -0
- package/dist/src/TopBar/TopBar.styled.d.ts +16 -15
- package/dist/src/TopBar/components/BackLink.d.ts +3 -1
- package/dist/src/TopBar/components/MenuItemLink.d.ts +3 -1
- package/dist/src/TopBar/stories/TopBar.backButton.story.js +1 -1
- package/dist/src/TopBar/stories/TopBar.menu.story.js +1 -1
- 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/Headings.d.ts +4 -4
- 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/dist/src/utils/story/dashed.d.ts +1 -3
- package/dist/src/utils/story/resizable.d.ts +4 -2
- package/dist/src/utils/ts/FocusManager.d.ts +1 -1
- package/dist/src/utils/ts/FocusManager.js +2 -2
- package/package.json +25 -34
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { expect, screen, userEvent, waitFor, within } from "storybook/test";
|
|
3
4
|
import { Button } from "../../Button";
|
|
4
5
|
import { Placeholder } from "../../utils/story/placeholder";
|
|
5
6
|
import BottomSheet from "../BottomSheet";
|
|
@@ -10,7 +11,23 @@ export default {
|
|
|
10
11
|
chromatic: { delay: 3000 },
|
|
11
12
|
},
|
|
12
13
|
};
|
|
13
|
-
export const BasicUsage =
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export const BasicUsage = {
|
|
15
|
+
render: () => {
|
|
16
|
+
const [isOpen, setIsOpen] = React.useState(true);
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setIsOpen(true), children: "Open Sheet" }), _jsx(BottomSheet, { title: "Edit Profile", isOpen: isOpen, onClose: () => setIsOpen(false), children: _jsx(Placeholder, {}) })] }));
|
|
18
|
+
},
|
|
19
|
+
play: async ({ canvasElement, step }) => {
|
|
20
|
+
const canvas = within(canvasElement);
|
|
21
|
+
await step("is open initially", async () => {
|
|
22
|
+
await waitFor(() => expect(screen.getByRole("dialog")).toBeVisible());
|
|
23
|
+
});
|
|
24
|
+
await step("closes when Close button is clicked", async () => {
|
|
25
|
+
await userEvent.click(screen.getByText("Close"));
|
|
26
|
+
await waitFor(() => expect(screen.queryByRole("dialog")).not.toBeInTheDocument());
|
|
27
|
+
});
|
|
28
|
+
await step("opens when trigger button is clicked", async () => {
|
|
29
|
+
await userEvent.click(canvas.getByText("Open Sheet"));
|
|
30
|
+
await waitFor(() => expect(screen.getByRole("dialog")).toBeVisible());
|
|
31
|
+
});
|
|
32
|
+
},
|
|
16
33
|
};
|
package/dist/src/Box/Box.d.ts
CHANGED
|
@@ -7,15 +7,15 @@ export interface BoxProps extends StyledProps, ComponentPropsWithRef<"div"> {
|
|
|
7
7
|
declare const Box: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BoxProps>> & string;
|
|
8
8
|
export interface AnimatedBoxProps extends MotionProps, Omit<BoxProps, "onAnimationStart" | "onDrag" | "onDragStart" | "onDragEnd" | "style" | "transition"> {
|
|
9
9
|
}
|
|
10
|
-
export declare const AnimatedBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
|
|
11
|
-
children?: import("react").ReactNode
|
|
12
|
-
slot?: string;
|
|
13
|
-
title?: string;
|
|
10
|
+
export declare const AnimatedBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
|
|
11
|
+
children?: import("react").ReactNode;
|
|
14
12
|
property?: string;
|
|
15
13
|
color?: string;
|
|
16
14
|
content?: string;
|
|
17
15
|
translate?: "yes" | "no";
|
|
18
16
|
hidden?: boolean;
|
|
17
|
+
slot?: string;
|
|
18
|
+
title?: string;
|
|
19
19
|
defaultChecked?: boolean;
|
|
20
20
|
defaultValue?: string | number | readonly string[];
|
|
21
21
|
suppressContentEditableWarning?: boolean;
|
|
@@ -24,7 +24,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
24
24
|
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters";
|
|
25
25
|
autoFocus?: boolean;
|
|
26
26
|
className?: string;
|
|
27
|
-
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
27
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only";
|
|
28
28
|
contextMenu?: string;
|
|
29
29
|
dir?: string;
|
|
30
30
|
draggable?: boolean | "true" | "false";
|
|
@@ -32,7 +32,6 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
32
32
|
id?: string;
|
|
33
33
|
lang?: string;
|
|
34
34
|
nonce?: string;
|
|
35
|
-
placeholder?: string;
|
|
36
35
|
spellCheck?: boolean | "true" | "false";
|
|
37
36
|
tabIndex?: number;
|
|
38
37
|
radioGroup?: string;
|
|
@@ -56,7 +55,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
56
55
|
results?: number;
|
|
57
56
|
security?: string;
|
|
58
57
|
unselectable?: "off" | "on";
|
|
59
|
-
inputMode?: "search" | "
|
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
60
59
|
is?: string;
|
|
61
60
|
exportparts?: string;
|
|
62
61
|
part?: string;
|
|
@@ -72,7 +71,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
72
71
|
"aria-colindextext"?: string;
|
|
73
72
|
"aria-colspan"?: number;
|
|
74
73
|
"aria-controls"?: string;
|
|
75
|
-
"aria-current"?: boolean | "
|
|
74
|
+
"aria-current"?: boolean | "page" | "time" | "true" | "false" | "step" | "location" | "date";
|
|
76
75
|
"aria-describedby"?: string;
|
|
77
76
|
"aria-description"?: string;
|
|
78
77
|
"aria-details"?: string;
|
|
@@ -82,7 +81,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
82
81
|
"aria-expanded"?: boolean | "true" | "false";
|
|
83
82
|
"aria-flowto"?: string;
|
|
84
83
|
"aria-grabbed"?: boolean | "true" | "false";
|
|
85
|
-
"aria-haspopup"?: boolean | "
|
|
84
|
+
"aria-haspopup"?: boolean | "grid" | "dialog" | "menu" | "true" | "false" | "listbox" | "tree";
|
|
86
85
|
"aria-hidden"?: boolean | "true" | "false";
|
|
87
86
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
88
87
|
"aria-keyshortcuts"?: string;
|
|
@@ -99,7 +98,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
99
98
|
"aria-posinset"?: number;
|
|
100
99
|
"aria-pressed"?: boolean | "true" | "false" | "mixed";
|
|
101
100
|
"aria-readonly"?: boolean | "true" | "false";
|
|
102
|
-
"aria-relevant"?: "
|
|
101
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
103
102
|
"aria-required"?: boolean | "true" | "false";
|
|
104
103
|
"aria-roledescription"?: string;
|
|
105
104
|
"aria-rowcount"?: number;
|
|
@@ -250,9 +249,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
250
249
|
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
251
250
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
252
251
|
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
253
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
254
252
|
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
255
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
256
253
|
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
257
254
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
258
255
|
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement>;
|
|
@@ -272,5 +269,7 @@ export declare const AnimatedBox: import("styled-components/dist/types").IStyled
|
|
|
272
269
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement>;
|
|
273
270
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement>;
|
|
274
271
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement>;
|
|
275
|
-
} & MotionProps & import("react").RefAttributes<HTMLDivElement>,
|
|
272
|
+
} & MotionProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
273
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
274
|
+
}, AnimatedBoxProps>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
|
|
276
275
|
export default Box;
|
|
@@ -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
|
};
|
|
@@ -7,5 +7,7 @@ export type DesktopMenuProps = {
|
|
|
7
7
|
themeColorObject: any;
|
|
8
8
|
};
|
|
9
9
|
/** @deprecated The BrandedNavBar component is deprecated. Use the Navigation component instead. */
|
|
10
|
-
declare const DesktopMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<DesktopMenuProps & React.RefAttributes<HTMLElement>,
|
|
10
|
+
declare const DesktopMenu: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<DesktopMenuProps & React.RefAttributes<HTMLElement>, "ref"> & {
|
|
11
|
+
ref?: React.Ref<HTMLElement>;
|
|
12
|
+
}, never>> & string & Omit<React.ForwardRefExoticComponent<DesktopMenuProps & React.RefAttributes<HTMLElement>>, keyof React.Component<any, {}, any>>;
|
|
11
13
|
export default DesktopMenu;
|
|
@@ -22,10 +22,10 @@ const themeColorObject = {
|
|
|
22
22
|
textColor: "blackBlue",
|
|
23
23
|
logoColor: "blue",
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
function MediumNavBar({ menuData, environment, logo, showNulogyLogo, subtext, ...props }) {
|
|
26
26
|
const { t } = useTranslation();
|
|
27
27
|
return (_jsxs(_Fragment, { children: [environment && _jsx(EnvironmentBanner, { children: environment }), _jsx("header", { ...props, children: _jsxs(NavBarBackground, { backgroundColor: "white", height: NAVBAR_HEIGHT, children: [logo, _jsxs(Flex, { justifyContent: "space-between", alignContent: "flex-end", flexGrow: 1, ml: "x3", alignItems: "center", children: [menuData.primaryMenu && (_jsx(DesktopMenu, { themeColorObject: themeColorObject, "aria-label": t("primary navigation"), menuType: "primary", menuData: menuData.primaryMenu })), _jsxs(Flex, { justifySelf: "flex-end", alignItems: "center", children: [menuData.secondaryMenu && (_jsx(DesktopMenu, { themeColorObject: themeColorObject, "aria-label": t("secondary navigation"), menuType: "secondary", menuData: menuData.secondaryMenu })), showNulogyLogo && (_jsx(Box, { pl: "x3", children: _jsx(NulogyLogoContainer, { height: NAVBAR_HEIGHT, subText: subtext }) }))] })] })] }) })] }));
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
const SelectNavBarBasedOnWidth = ({ width, defaultOpen, breakpointUpper, brandingLinkHref = "/", brandingLinkTo, brandingLinkComponent, logoSrc, ...props }) => {
|
|
30
30
|
const currentWidth = width || (typeof window !== "undefined" && window.innerWidth);
|
|
31
31
|
const logo = (_jsx(BrandLogoContainer, { logoSrc: logoSrc, brandingLinkHref: brandingLinkHref, brandingLinkTo: brandingLinkTo, brandingLinkComponent: brandingLinkComponent, subtext: props.subtext }));
|
|
@@ -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
|
};
|