@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.
Files changed (205) hide show
  1. package/dist/main.js +46 -59
  2. package/dist/main.js.map +1 -1
  3. package/dist/main.module.js +46 -59
  4. package/dist/main.module.js.map +1 -1
  5. package/dist/src/Alert/Alert.story.d.ts +1 -1
  6. package/dist/src/Alert/Alert.story.js +11 -0
  7. package/dist/src/AppTag/stories/AppTag.story.d.ts +2 -2
  8. package/dist/src/AppTag/stories/AppTag.story.js +6 -4
  9. package/dist/src/AppTag/stories/AppTag.usecases.story.d.ts +13 -10
  10. package/dist/src/AppTag/stories/AppTag.usecases.story.js +71 -51
  11. package/dist/src/AsyncSelect/AsyncSelect.story.d.ts +17 -13
  12. package/dist/src/AsyncSelect/AsyncSelect.story.js +46 -23
  13. package/dist/src/BottomSheet/BottomSheet.parts.d.ts +2 -2
  14. package/dist/src/BottomSheet/BottomSheet.styled.d.ts +10 -6
  15. package/dist/src/BottomSheet/stories/BottomSheet.actions.story.d.ts +8 -1
  16. package/dist/src/BottomSheet/stories/BottomSheet.actions.story.js +22 -3
  17. package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +9 -2
  18. package/dist/src/BottomSheet/stories/BottomSheet.features.story.js +27 -12
  19. package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +7 -1
  20. package/dist/src/BottomSheet/stories/BottomSheet.story.js +20 -3
  21. package/dist/src/Box/Box.d.ts +12 -13
  22. package/dist/src/Box/Box.story.d.ts +22 -44
  23. package/dist/src/Box/Box.story.js +30 -30
  24. package/dist/src/BrandedNavBar/DesktopMenu.d.ts +3 -1
  25. package/dist/src/BrandedNavBar/NavBar.js +2 -2
  26. package/dist/src/BrandedNavBar/NavBar.story.d.ts +16 -28
  27. package/dist/src/BrandedNavBar/NavBar.story.js +41 -35
  28. package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +1 -1
  29. package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +4 -8
  30. package/dist/src/Breadcrumbs/Breadcrumbs.story.js +4 -4
  31. package/dist/src/Button/Button.story.d.ts +14 -28
  32. package/dist/src/Button/Button.story.js +14 -14
  33. package/dist/src/Button/ControlIcon.story.js +1 -1
  34. package/dist/src/Button/DangerButton.d.ts +3 -1
  35. package/dist/src/Button/IconicButton.story.d.ts +23 -45
  36. package/dist/src/Button/IconicButton.story.js +27 -25
  37. package/dist/src/Button/PrimaryButton.d.ts +3 -1
  38. package/dist/src/Button/QuietButton.d.ts +3 -1
  39. package/dist/src/ButtonGroup/ButtonGroup.story.d.ts +13 -23
  40. package/dist/src/ButtonGroup/ButtonGroup.story.js +10 -10
  41. package/dist/src/Card/Card.story.d.ts +3 -5
  42. package/dist/src/Card/Card.story.js +9 -7
  43. package/dist/src/Checkbox/Checkbox.story.d.ts +18 -34
  44. package/dist/src/Checkbox/Checkbox.story.js +28 -24
  45. package/dist/src/Checkbox/CheckboxGroup.story.d.ts +10 -20
  46. package/dist/src/Checkbox/CheckboxGroup.story.js +10 -10
  47. package/dist/src/DatePickers/stories/DatePicker.story.d.ts +9 -2
  48. package/dist/src/DatePickers/stories/DatePicker.story.js +43 -2
  49. package/dist/src/DatePickers/stories/MonthPicker.story.d.ts +8 -1
  50. package/dist/src/DatePickers/stories/MonthPicker.story.js +21 -2
  51. package/dist/src/DatePickers/stories/WeekPicker.story.d.ts +32 -4
  52. package/dist/src/DatePickers/stories/WeekPicker.story.js +57 -8
  53. package/dist/src/DateRange/DateRange.story.d.ts +16 -2
  54. package/dist/src/DateRange/DateRange.story.js +41 -3
  55. package/dist/src/DateRange/EndTime.d.ts +5 -7
  56. package/dist/src/DateRange/StartTime.d.ts +5 -7
  57. package/dist/src/DescriptionList/stories/DescriptionList.column.story.d.ts +1 -1
  58. package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +10 -8
  59. package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +1 -1
  60. package/dist/src/DescriptionList/stories/DescriptionList.layout.story.d.ts +1 -1
  61. package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +12 -10
  62. package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +1 -1
  63. package/dist/src/DescriptionList/stories/DescriptionList.story.d.ts +1 -0
  64. package/dist/src/DescriptionList/stories/DescriptionList.story.js +3 -0
  65. package/dist/src/DescriptionList/stories/fixtures.d.ts +2 -2
  66. package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +32 -32
  67. package/dist/src/DropdownMenu/DropdownMenu.story.js +58 -16
  68. package/dist/src/DropdownMenu/DropdownMenuContainer.d.ts +1 -1
  69. package/dist/src/DropdownMenu/DropdownText.d.ts +1 -1
  70. package/dist/src/FieldLabel/FieldLabel.story.d.ts +2 -4
  71. package/dist/src/FieldLabel/FieldLabel.story.js +2 -2
  72. package/dist/src/FieldLabel/HelpText.d.ts +1 -1
  73. package/dist/src/Flex/Flex.story.d.ts +34 -68
  74. package/dist/src/Flex/Flex.story.js +36 -36
  75. package/dist/src/Form/Form.story.d.ts +8 -16
  76. package/dist/src/Form/Form.story.js +8 -8
  77. package/dist/src/Icon/Icon.d.ts +6 -2
  78. package/dist/src/Icon/Icon.story.d.ts +12 -24
  79. package/dist/src/Icon/Icon.story.js +15 -15
  80. package/dist/src/Input/Input.story.d.ts +16 -32
  81. package/dist/src/Input/Input.story.js +23 -23
  82. package/dist/src/Layout/Page.applicationFrame.story.d.ts +1 -1
  83. package/dist/src/Layout/Page.story.d.ts +1 -1
  84. package/dist/src/Layout/Sidebar.story.d.ts +1 -1
  85. package/dist/src/Link/Link.story.d.ts +16 -32
  86. package/dist/src/Link/Link.story.js +16 -17
  87. package/dist/src/List/List.story.d.ts +8 -16
  88. package/dist/src/List/List.story.js +8 -8
  89. package/dist/src/LoadingAnimation/LoadingAnimation.story.d.ts +4 -8
  90. package/dist/src/LoadingAnimation/LoadingAnimation.story.js +4 -4
  91. package/dist/src/MaybeTooltip/MaybeTooltip.story.d.ts +1 -1
  92. package/dist/src/Modal/Modal.d.ts +5 -3
  93. package/dist/src/Modal/Modal.js +2 -2
  94. package/dist/src/Modal/Modal.story.d.ts +2 -24
  95. package/dist/src/Modal/ModalCloseButton.d.ts +4 -2
  96. package/dist/src/Modal/ModalContent.d.ts +1 -1
  97. package/dist/src/Navigation/components/AppSwitcher/parts/Item.d.ts +3 -1
  98. package/dist/src/Navigation/components/AppSwitcher/parts/index.d.ts +15 -7
  99. package/dist/src/Navigation/components/DesktopNav/parts/MoreMenuItem.d.ts +5 -1
  100. package/dist/src/Navigation/components/MenuSubItem/parts/styled.d.ts +17 -5
  101. package/dist/src/Navigation/components/MobileNav/parts/styled.d.ts +10 -4
  102. package/dist/src/Navigation/components/UserMenu/UserMenu.d.ts +5 -1
  103. package/dist/src/Navigation/components/UserMenu/parts/styled.d.ts +6 -2
  104. package/dist/src/Navigation/components/shared/NavigationMenuContent.d.ts +5 -1
  105. package/dist/src/Navigation/components/shared/NavigationMenuItem.d.ts +3 -1
  106. package/dist/src/Navigation/components/shared/components.d.ts +35 -9
  107. package/dist/src/Navigation/stories/Navigation.appSwitcher.story.d.ts +8 -1
  108. package/dist/src/Navigation/stories/Navigation.appSwitcher.story.js +19 -1
  109. package/dist/src/Navigation/stories/Navigation.logos.story.d.ts +2 -4
  110. package/dist/src/Navigation/stories/Navigation.logos.story.js +4 -4
  111. package/dist/src/Navigation/stories/Navigation.story.d.ts +7 -1
  112. package/dist/src/Navigation/stories/Navigation.story.js +145 -136
  113. package/dist/src/Navigation/stories/Navigation.userMenu.story.d.ts +8 -1
  114. package/dist/src/Navigation/stories/Navigation.userMenu.story.js +22 -1
  115. package/dist/src/Overlay/Overlay.story.d.ts +2 -4
  116. package/dist/src/Overlay/Overlay.story.js +2 -2
  117. package/dist/src/Pagination/Pagination.story.d.ts +14 -13
  118. package/dist/src/Pagination/Pagination.story.js +32 -11
  119. package/dist/src/Radio/Radio.story.d.ts +13 -15
  120. package/dist/src/Radio/Radio.story.js +44 -1
  121. package/dist/src/Radio/RadioGroup.story.d.ts +29 -21
  122. package/dist/src/Radio/RadioGroup.story.js +67 -14
  123. package/dist/src/RangeContainer/RangeContainer.story.d.ts +2 -4
  124. package/dist/src/RangeContainer/RangeContainer.story.js +2 -2
  125. package/dist/src/Select/Select.story.d.ts +37 -65
  126. package/dist/src/Select/Select.story.js +93 -49
  127. package/dist/src/StatusIndicator/StatusIndicator.story.d.ts +4 -8
  128. package/dist/src/StatusIndicator/StatusIndicator.story.js +4 -4
  129. package/dist/src/Summary/Summary.d.ts +1 -2
  130. package/dist/src/Summary/Summary.js +2 -2
  131. package/dist/src/Summary/SummaryContext.d.ts +3 -1
  132. package/dist/src/Summary/SummaryContext.js +2 -2
  133. package/dist/src/Summary/SummaryItem.d.ts +1 -1
  134. package/dist/src/Summary/SummaryItem.js +2 -2
  135. package/dist/src/Switcher/Switcher.d.ts +2 -2
  136. package/dist/src/Switcher/Switcher.js +2 -2
  137. package/dist/src/Switcher/Switcher.story.d.ts +8 -1
  138. package/dist/src/Switcher/Switcher.story.js +13 -1
  139. package/dist/src/Table/stories/BaseTable.story.d.ts +1 -1
  140. package/dist/src/Table/stories/BaseTable.story.js +1 -1
  141. package/dist/src/Table/stories/CustomContent.story.js +1 -1
  142. package/dist/src/Table/stories/Density.story.d.ts +4 -8
  143. package/dist/src/Table/stories/Density.story.js +4 -4
  144. package/dist/src/Table/stories/SortingColumnHeader.story.d.ts +1 -1
  145. package/dist/src/Table/stories/SortingColumnHeader.story.js +1 -1
  146. package/dist/src/Table/stories/Table.story.d.ts +1 -1
  147. package/dist/src/Table/stories/Table.story.js +37 -1
  148. package/dist/src/Table/stories/TableWithCustomSorting.story.d.ts +2 -4
  149. package/dist/src/Table/stories/TableWithCustomSorting.story.js +2 -2
  150. package/dist/src/Table/stories/TableWithExpandableRows.story.d.ts +4 -8
  151. package/dist/src/Table/stories/TableWithExpandableRows.story.js +5 -5
  152. package/dist/src/Table/stories/TableWithFiltering.story.d.ts +8 -8
  153. package/dist/src/Table/stories/TableWithFiltering.story.js +15 -4
  154. package/dist/src/Table/stories/TableWithSelectableRows.story.d.ts +8 -8
  155. package/dist/src/Table/stories/TableWithSelectableRows.story.js +22 -5
  156. package/dist/src/Table/stories/TableWithServerSidePagination.story.d.ts +2 -4
  157. package/dist/src/Table/stories/TableWithServerSidePagination.story.js +2 -2
  158. package/dist/src/Tabs/TabScrollIndicator.d.ts +1 -1
  159. package/dist/src/Tabs/TabScrollIndicator.js +2 -2
  160. package/dist/src/Tabs/Tabs.story.d.ts +33 -33
  161. package/dist/src/Tabs/Tabs.story.js +52 -16
  162. package/dist/src/Textarea/Textarea.story.js +1 -1
  163. package/dist/src/TimePicker/TimePicker.d.ts +1 -1
  164. package/dist/src/TimePicker/TimePicker.js +2 -0
  165. package/dist/src/TimePicker/TimePicker.story.d.ts +24 -40
  166. package/dist/src/TimePicker/TimePicker.story.js +40 -27
  167. package/dist/src/TimePicker/TimePickerInput.d.ts +3 -1
  168. package/dist/src/TimeRange/TimeRange.d.ts +3 -2
  169. package/dist/src/TimeRange/TimeRange.story.d.ts +14 -20
  170. package/dist/src/TimeRange/TimeRange.story.js +34 -20
  171. package/dist/src/Toast/Toast.story.d.ts +24 -25
  172. package/dist/src/Toast/Toast.story.js +170 -142
  173. package/dist/src/ToastContainer/ToastContainer.story.d.ts +8 -1
  174. package/dist/src/ToastContainer/ToastContainer.story.js +13 -1
  175. package/dist/src/ToastContainer/ToastFunction.js +2 -2
  176. package/dist/src/Toggle/Toggle.story.d.ts +25 -15
  177. package/dist/src/Toggle/Toggle.story.js +77 -43
  178. package/dist/src/Toggle/ToggleButton.js +2 -2
  179. package/dist/src/Tooltip/Tooltip.story.d.ts +1 -1
  180. package/dist/src/Tooltip/Tooltip.story.js +16 -0
  181. package/dist/src/TopBar/TopBar.styled.d.ts +16 -15
  182. package/dist/src/TopBar/components/BackLink.d.ts +3 -1
  183. package/dist/src/TopBar/components/MenuItemLink.d.ts +3 -1
  184. package/dist/src/TopBar/stories/TopBar.backButton.story.js +1 -1
  185. package/dist/src/TopBar/stories/TopBar.menu.story.js +1 -1
  186. package/dist/src/TopBar/stories/TopBar.story.d.ts +7 -1
  187. package/dist/src/TopBar/stories/TopBar.story.js +18 -1
  188. package/dist/src/TruncatedText/TruncatedText.story.d.ts +29 -34
  189. package/dist/src/TruncatedText/TruncatedText.story.js +46 -19
  190. package/dist/src/Type/Headings.d.ts +4 -4
  191. package/dist/src/Type/Text.story.d.ts +10 -20
  192. package/dist/src/Type/Text.story.js +10 -10
  193. package/dist/src/Validation/InlineValidation.story.d.ts +6 -12
  194. package/dist/src/Validation/InlineValidation.story.js +6 -6
  195. package/dist/src/VisualTests/Select.story.d.ts +12 -24
  196. package/dist/src/VisualTests/Select.story.js +19 -19
  197. package/dist/src/pages/ErrorPage.story.d.ts +3 -5
  198. package/dist/src/pages/ErrorPage.story.js +10 -10
  199. package/dist/src/pages/LoginPage.story.d.ts +8 -16
  200. package/dist/src/pages/LoginPage.story.js +8 -8
  201. package/dist/src/utils/story/dashed.d.ts +1 -3
  202. package/dist/src/utils/story/resizable.d.ts +4 -2
  203. package/dist/src/utils/ts/FocusManager.d.ts +1 -1
  204. package/dist/src/utils/ts/FocusManager.js +2 -2
  205. 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
- const [isOpen, setIsOpen] = React.useState(true);
15
- 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, {}) })] }));
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
  };
@@ -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 | Record<string, unknown>;
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" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
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 | "time" | "page" | "true" | "false" | "step" | "location" | "date";
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 | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree";
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"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
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>, AnimatedBoxProps>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
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
- (): import("react/jsx-runtime").JSX.Element;
8
- story: {
9
- name: string;
10
- };
7
+ render: () => import("react/jsx-runtime").JSX.Element;
8
+ name: string;
11
9
  };
12
10
  export declare const WithABackgroundColour: {
13
- (): import("react/jsx-runtime").JSX.Element;
14
- story: {
15
- name: string;
16
- };
11
+ render: () => import("react/jsx-runtime").JSX.Element;
12
+ name: string;
17
13
  };
18
14
  export declare const WithASetWidth: {
19
- (): import("react/jsx-runtime").JSX.Element;
20
- story: {
21
- name: string;
22
- };
15
+ render: () => import("react/jsx-runtime").JSX.Element;
16
+ name: string;
23
17
  };
24
18
  export declare const WithAResponsiveWidth: {
25
- (): import("react/jsx-runtime").JSX.Element;
26
- story: {
27
- name: string;
28
- };
19
+ render: () => import("react/jsx-runtime").JSX.Element;
20
+ name: string;
29
21
  };
30
22
  export declare const WithPadding: {
31
- (): import("react/jsx-runtime").JSX.Element;
32
- story: {
33
- name: string;
34
- };
23
+ render: () => import("react/jsx-runtime").JSX.Element;
24
+ name: string;
35
25
  };
36
26
  export declare const WithMargin: {
37
- (): import("react/jsx-runtime").JSX.Element;
38
- story: {
39
- name: string;
40
- };
27
+ render: () => import("react/jsx-runtime").JSX.Element;
28
+ name: string;
41
29
  };
42
30
  export declare const WithAShadow: {
43
- (): import("react/jsx-runtime").JSX.Element;
44
- story: {
45
- name: string;
46
- };
31
+ render: () => import("react/jsx-runtime").JSX.Element;
32
+ name: string;
47
33
  };
48
34
  export declare const WithABackgroundImage: {
49
- (): import("react/jsx-runtime").JSX.Element;
50
- story: {
51
- name: string;
52
- };
35
+ render: () => import("react/jsx-runtime").JSX.Element;
36
+ name: string;
53
37
  };
54
38
  export declare const WithHoverTransition: {
55
- (): import("react/jsx-runtime").JSX.Element;
56
- story: {
57
- name: string;
58
- };
39
+ render: () => import("react/jsx-runtime").JSX.Element;
40
+ name: string;
59
41
  };
60
42
  export declare const WithTransform: {
61
- (): import("react/jsx-runtime").JSX.Element;
62
- story: {
63
- name: string;
64
- };
43
+ render: () => import("react/jsx-runtime").JSX.Element;
44
+ name: string;
65
45
  };
66
46
  export declare const WithAnimation: {
67
- (): import("react/jsx-runtime").JSX.Element;
68
- story: {
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 = () => (_jsx(Flex, { p: "x3", color: "blue", children: "Hello World" }));
12
- WithATextColour.story = {
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 = () => (_jsx(Box, { p: "x3", color: "white", bg: "blue", children: "Hello World" }));
16
- WithABackgroundColour.story = {
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 = () => (_jsx(Box, { p: "x3", width: 1 / 2, bg: "whiteGrey", children: "Half Width" }));
20
- WithASetWidth.story = {
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 = () => (_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" }));
24
- WithAResponsiveWidth.story = {
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 = () => (_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" })] }));
28
- WithPadding.story = {
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 = () => (_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" })] }));
32
- WithMargin.story = {
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 = () => (_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" })] }));
36
- WithAShadow.story = {
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 = () => (_jsx(Box, { p: "x1", mb: "x2", backgroundImage: "linear-gradient(0deg, #E1EBFA, #216BEB)", children: "Gradient" }));
40
- WithABackgroundImage.story = {
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 = () => (_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" }));
49
- WithHoverTransition.story = {
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 = () => (_jsx(Box, { p: "x1", mb: "x2", bg: "red", marginLeft: "50px", mt: "50px", color: "white", height: "40px", width: "200px", transform: "rotate(90deg)", children: "Rotated" }));
53
- WithTransform.story = {
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
- const [isOpen, setIsOpen] = useState(true);
58
- const variants = {
59
- open: { opacity: 1, x: 0 },
60
- closed: { opacity: 0, x: "-100%" },
61
- };
62
- const handleClick = () => setIsOpen(!isOpen);
63
- 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" })] }));
64
- };
65
- WithAnimation.story = {
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>, never>> & string & Omit<React.ForwardRefExoticComponent<DesktopMenuProps & React.RefAttributes<HTMLElement>>, keyof React.Component<any, {}, any>>;
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
- const MediumNavBar = ({ menuData, environment, logo, showNulogyLogo, subtext, ...props }) => {
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
- (): import("react/jsx-runtime").JSX.Element;
10
- story: {
11
- name: string;
12
- };
9
+ render: () => import("react/jsx-runtime").JSX.Element;
10
+ name: string;
13
11
  };
14
12
  export declare const WithACompanyLogo: {
15
- (): import("react/jsx-runtime").JSX.Element;
16
- story: {
17
- name: string;
18
- };
13
+ render: () => import("react/jsx-runtime").JSX.Element;
14
+ name: string;
19
15
  };
20
16
  export declare const WithAppName: {
21
- (): import("react/jsx-runtime").JSX.Element;
22
- story: {
23
- name: string;
24
- };
17
+ render: () => import("react/jsx-runtime").JSX.Element;
18
+ name: string;
25
19
  };
26
20
  export declare const WithACompanyLogoAndAppName: {
27
- (): import("react/jsx-runtime").JSX.Element;
28
- story: {
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
- (): import("react/jsx-runtime").JSX.Element;
35
- story: {
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
- (): import("react/jsx-runtime").JSX.Element;
43
- story: {
44
- name: string;
45
- };
32
+ render: () => import("react/jsx-runtime").JSX.Element;
33
+ name: string;
46
34
  };
47
35
  export declare const WithHamburgerMenu: {
48
- (): import("react/jsx-runtime").JSX.Element;
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
- (): import("react/jsx-runtime").JSX.Element;
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
- (): import("react/jsx-runtime").JSX.Element;
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 = () => _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu } });
124
- _BrandedNavBar.story = {
123
+ export const _BrandedNavBar = {
124
+ render: () => _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu } }),
125
125
  name: "BrandedNavBar",
126
126
  };
127
- export const WithACompanyLogo = () => _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu }, logoSrc: sampleLogo });
128
- WithACompanyLogo.story = {
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 = () => _jsx(BrandedNavBar, { subtext: "Quality Control", menuData: { primaryMenu, secondaryMenu } });
132
- WithAppName.story = {
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 = () => (_jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu }, subtext: "Quality control", logoSrc: sampleLogo }));
136
- WithACompanyLogoAndAppName.story = {
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 = () => (_jsx(BrandedNavBar, { menuData: {
153
- primaryMenu: primaryMenu,
154
- secondaryMenu: secondaryMenuWithIcon,
155
- } }));
156
- WithIcon.story = {
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 = () => (_jsx(BrowserRouter, { basename: "/", children: _jsx(BrandedNavBar, { brandingLinkTo: "/Home", brandingLinkComponent: ReactRouterLink, menuData: {
326
- primaryMenu: primaryMenuReactRouter,
327
- secondaryMenu: secondaryMenuWithIcon,
328
- } }) }));
329
- WithReactRouter.story = {
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
- return _jsx(BrandedNavBar, { menuData: { primaryMenu, secondaryMenu }, defaultOpen: true });
334
- };
335
- WithHamburgerMenu.parameters = {
336
- viewport: {
337
- defaultViewport: "small", // for some reason this has to match the viewport key, NOT the name!
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 = () => (_jsx(BrandedNavBar, { menuData: { primaryMenu: customPrimaryMenu, secondaryMenu }, defaultOpen: true }));
368
- CustomRenderingInHamburger.parameters = {
369
- viewport: {
370
- defaultViewport: "small", // for some reason this has to match the viewport key, NOT the name!
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 = () => (_jsx(BrandedNavBar, { menuData: { primaryMenu: primaryMenuWithCustomTriggers, secondaryMenu }, defaultOpen: true }));
404
- CustomMenuTriggersInHamburger.parameters = {
405
- viewport: {
406
- defaultViewport: "small", // for some reason this has to match the viewport key, NOT the name!
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
  };
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from "@storybook/react";
1
+ import type { StoryObj } from "@storybook/react-vite";
2
2
  import { SmallNavBar } from "./index";
3
3
  declare const _default: {
4
4
  title: string;
@@ -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
- (): import("react/jsx-runtime").JSX.Element;
8
- story: {
9
- name: string;
10
- };
7
+ render: () => import("react/jsx-runtime").JSX.Element;
8
+ name: string;
11
9
  };
12
10
  export declare const WithReactRouter: {
13
- (): import("react/jsx-runtime").JSX.Element;
14
- story: {
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 = () => (_jsxs(Breadcrumbs, { children: [_jsx(Link, { href: "/", children: "Home" }), _jsx(Link, { href: "/", children: "Tenants" }), _jsx(Text, { children: "Current Tenant" })] }));
11
- WithoutLink.story = {
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 = () => (_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" })] }) }));
15
- WithReactRouter.story = {
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
  };