@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.
Files changed (151) hide show
  1. package/dist/main.js +1 -0
  2. package/dist/main.js.map +1 -1
  3. package/dist/main.module.js +1 -0
  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/stories/BottomSheet.actions.story.d.ts +8 -1
  14. package/dist/src/BottomSheet/stories/BottomSheet.actions.story.js +22 -3
  15. package/dist/src/BottomSheet/stories/BottomSheet.features.story.d.ts +9 -2
  16. package/dist/src/BottomSheet/stories/BottomSheet.features.story.js +27 -12
  17. package/dist/src/BottomSheet/stories/BottomSheet.story.d.ts +7 -1
  18. package/dist/src/BottomSheet/stories/BottomSheet.story.js +20 -3
  19. package/dist/src/Box/Box.story.d.ts +22 -44
  20. package/dist/src/Box/Box.story.js +30 -30
  21. package/dist/src/BrandedNavBar/NavBar.story.d.ts +16 -28
  22. package/dist/src/BrandedNavBar/NavBar.story.js +41 -35
  23. package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +1 -1
  24. package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +4 -8
  25. package/dist/src/Breadcrumbs/Breadcrumbs.story.js +4 -4
  26. package/dist/src/Button/Button.story.d.ts +14 -28
  27. package/dist/src/Button/Button.story.js +14 -14
  28. package/dist/src/Button/ControlIcon.story.js +1 -1
  29. package/dist/src/Button/IconicButton.story.d.ts +23 -45
  30. package/dist/src/Button/IconicButton.story.js +27 -25
  31. package/dist/src/ButtonGroup/ButtonGroup.story.d.ts +13 -23
  32. package/dist/src/ButtonGroup/ButtonGroup.story.js +10 -10
  33. package/dist/src/Card/Card.story.d.ts +3 -5
  34. package/dist/src/Card/Card.story.js +9 -7
  35. package/dist/src/Checkbox/Checkbox.story.d.ts +18 -34
  36. package/dist/src/Checkbox/Checkbox.story.js +28 -24
  37. package/dist/src/Checkbox/CheckboxGroup.story.d.ts +10 -20
  38. package/dist/src/Checkbox/CheckboxGroup.story.js +10 -10
  39. package/dist/src/DatePickers/stories/DatePicker.story.d.ts +9 -2
  40. package/dist/src/DatePickers/stories/DatePicker.story.js +43 -2
  41. package/dist/src/DatePickers/stories/MonthPicker.story.d.ts +8 -1
  42. package/dist/src/DatePickers/stories/MonthPicker.story.js +21 -2
  43. package/dist/src/DatePickers/stories/WeekPicker.story.d.ts +32 -4
  44. package/dist/src/DatePickers/stories/WeekPicker.story.js +57 -8
  45. package/dist/src/DateRange/DateRange.story.d.ts +16 -2
  46. package/dist/src/DateRange/DateRange.story.js +41 -3
  47. package/dist/src/DescriptionList/stories/DescriptionList.column.story.d.ts +1 -1
  48. package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +10 -8
  49. package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +1 -1
  50. package/dist/src/DescriptionList/stories/DescriptionList.layout.story.d.ts +1 -1
  51. package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +12 -10
  52. package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +1 -1
  53. package/dist/src/DescriptionList/stories/DescriptionList.story.d.ts +1 -0
  54. package/dist/src/DescriptionList/stories/DescriptionList.story.js +3 -0
  55. package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +32 -32
  56. package/dist/src/DropdownMenu/DropdownMenu.story.js +58 -16
  57. package/dist/src/FieldLabel/FieldLabel.story.d.ts +2 -4
  58. package/dist/src/FieldLabel/FieldLabel.story.js +2 -2
  59. package/dist/src/Flex/Flex.story.d.ts +34 -68
  60. package/dist/src/Flex/Flex.story.js +36 -36
  61. package/dist/src/Form/Form.story.d.ts +8 -16
  62. package/dist/src/Form/Form.story.js +8 -8
  63. package/dist/src/Icon/Icon.story.d.ts +12 -24
  64. package/dist/src/Icon/Icon.story.js +15 -15
  65. package/dist/src/Input/Input.story.d.ts +16 -32
  66. package/dist/src/Input/Input.story.js +23 -23
  67. package/dist/src/Layout/Page.applicationFrame.story.d.ts +1 -1
  68. package/dist/src/Layout/Page.story.d.ts +1 -1
  69. package/dist/src/Layout/Sidebar.story.d.ts +1 -1
  70. package/dist/src/Link/Link.story.d.ts +16 -32
  71. package/dist/src/Link/Link.story.js +16 -17
  72. package/dist/src/List/List.story.d.ts +8 -16
  73. package/dist/src/List/List.story.js +8 -8
  74. package/dist/src/LoadingAnimation/LoadingAnimation.story.d.ts +4 -8
  75. package/dist/src/LoadingAnimation/LoadingAnimation.story.js +4 -4
  76. package/dist/src/MaybeTooltip/MaybeTooltip.story.d.ts +1 -1
  77. package/dist/src/Modal/Modal.story.d.ts +1 -1
  78. package/dist/src/Navigation/stories/Navigation.appSwitcher.story.d.ts +8 -1
  79. package/dist/src/Navigation/stories/Navigation.appSwitcher.story.js +19 -1
  80. package/dist/src/Navigation/stories/Navigation.logos.story.d.ts +2 -4
  81. package/dist/src/Navigation/stories/Navigation.logos.story.js +4 -4
  82. package/dist/src/Navigation/stories/Navigation.story.d.ts +7 -1
  83. package/dist/src/Navigation/stories/Navigation.story.js +145 -136
  84. package/dist/src/Navigation/stories/Navigation.userMenu.story.d.ts +8 -1
  85. package/dist/src/Navigation/stories/Navigation.userMenu.story.js +22 -1
  86. package/dist/src/Overlay/Overlay.story.d.ts +2 -4
  87. package/dist/src/Overlay/Overlay.story.js +2 -2
  88. package/dist/src/Pagination/Pagination.story.d.ts +14 -13
  89. package/dist/src/Pagination/Pagination.story.js +32 -11
  90. package/dist/src/Radio/Radio.story.d.ts +1 -1
  91. package/dist/src/Radio/Radio.story.js +44 -1
  92. package/dist/src/Radio/RadioGroup.story.d.ts +29 -21
  93. package/dist/src/Radio/RadioGroup.story.js +67 -14
  94. package/dist/src/RangeContainer/RangeContainer.story.d.ts +2 -4
  95. package/dist/src/RangeContainer/RangeContainer.story.js +2 -2
  96. package/dist/src/Select/Select.story.d.ts +37 -65
  97. package/dist/src/Select/Select.story.js +93 -49
  98. package/dist/src/StatusIndicator/StatusIndicator.story.d.ts +4 -8
  99. package/dist/src/StatusIndicator/StatusIndicator.story.js +4 -4
  100. package/dist/src/Switcher/Switcher.story.d.ts +8 -1
  101. package/dist/src/Switcher/Switcher.story.js +13 -1
  102. package/dist/src/Table/stories/BaseTable.story.d.ts +1 -1
  103. package/dist/src/Table/stories/BaseTable.story.js +1 -1
  104. package/dist/src/Table/stories/CustomContent.story.js +1 -1
  105. package/dist/src/Table/stories/Density.story.d.ts +4 -8
  106. package/dist/src/Table/stories/Density.story.js +4 -4
  107. package/dist/src/Table/stories/SortingColumnHeader.story.d.ts +1 -1
  108. package/dist/src/Table/stories/SortingColumnHeader.story.js +1 -1
  109. package/dist/src/Table/stories/Table.story.d.ts +1 -1
  110. package/dist/src/Table/stories/Table.story.js +37 -1
  111. package/dist/src/Table/stories/TableWithCustomSorting.story.d.ts +2 -4
  112. package/dist/src/Table/stories/TableWithCustomSorting.story.js +2 -2
  113. package/dist/src/Table/stories/TableWithExpandableRows.story.d.ts +4 -8
  114. package/dist/src/Table/stories/TableWithExpandableRows.story.js +5 -5
  115. package/dist/src/Table/stories/TableWithFiltering.story.d.ts +8 -8
  116. package/dist/src/Table/stories/TableWithFiltering.story.js +15 -4
  117. package/dist/src/Table/stories/TableWithSelectableRows.story.d.ts +8 -8
  118. package/dist/src/Table/stories/TableWithSelectableRows.story.js +22 -5
  119. package/dist/src/Table/stories/TableWithServerSidePagination.story.d.ts +2 -4
  120. package/dist/src/Table/stories/TableWithServerSidePagination.story.js +2 -2
  121. package/dist/src/Tabs/Tabs.story.d.ts +33 -33
  122. package/dist/src/Tabs/Tabs.story.js +52 -16
  123. package/dist/src/Textarea/Textarea.story.js +1 -1
  124. package/dist/src/TimePicker/TimePicker.js +2 -0
  125. package/dist/src/TimePicker/TimePicker.story.d.ts +24 -40
  126. package/dist/src/TimePicker/TimePicker.story.js +40 -27
  127. package/dist/src/TimeRange/TimeRange.story.d.ts +14 -20
  128. package/dist/src/TimeRange/TimeRange.story.js +34 -20
  129. package/dist/src/Toast/Toast.story.d.ts +24 -25
  130. package/dist/src/Toast/Toast.story.js +170 -142
  131. package/dist/src/ToastContainer/ToastContainer.story.d.ts +8 -1
  132. package/dist/src/ToastContainer/ToastContainer.story.js +13 -1
  133. package/dist/src/Toggle/Toggle.story.d.ts +25 -15
  134. package/dist/src/Toggle/Toggle.story.js +77 -43
  135. package/dist/src/Tooltip/Tooltip.story.d.ts +1 -1
  136. package/dist/src/Tooltip/Tooltip.story.js +16 -0
  137. package/dist/src/TopBar/stories/TopBar.story.d.ts +7 -1
  138. package/dist/src/TopBar/stories/TopBar.story.js +18 -1
  139. package/dist/src/TruncatedText/TruncatedText.story.d.ts +29 -34
  140. package/dist/src/TruncatedText/TruncatedText.story.js +46 -19
  141. package/dist/src/Type/Text.story.d.ts +10 -20
  142. package/dist/src/Type/Text.story.js +10 -10
  143. package/dist/src/Validation/InlineValidation.story.d.ts +6 -12
  144. package/dist/src/Validation/InlineValidation.story.js +6 -6
  145. package/dist/src/VisualTests/Select.story.d.ts +12 -24
  146. package/dist/src/VisualTests/Select.story.js +19 -19
  147. package/dist/src/pages/ErrorPage.story.d.ts +3 -5
  148. package/dist/src/pages/ErrorPage.story.js +10 -10
  149. package/dist/src/pages/LoginPage.story.d.ts +8 -16
  150. package/dist/src/pages/LoginPage.story.js +8 -8
  151. package/package.json +15 -23
@@ -4,52 +4,36 @@ declare const _default: {
4
4
  export default _default;
5
5
  export declare const _Input: () => import("react/jsx-runtime").JSX.Element;
6
6
  export declare const WithAllProps: {
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 SetToDisabled: {
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 WithErrorMessage: {
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 WithErrorList: {
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 WithCustomId: {
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 SetToRequired: {
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 WithAAffixPrefixAndSuffix: {
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 WithAnIcon: () => import("react/jsx-runtime").JSX.Element;
49
35
  export declare const WithIconTooltips: () => import("react/jsx-runtime").JSX.Element;
50
36
  export declare const UsingRefToControlFocus: {
51
- (): import("react/jsx-runtime").JSX.Element;
52
- story: {
53
- name: string;
54
- };
37
+ render: () => import("react/jsx-runtime").JSX.Element;
38
+ name: string;
55
39
  };
@@ -1,38 +1,38 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useRef } from "react";
3
- import { action } from "@storybook/addon-actions";
3
+ import { action } from "storybook/actions";
4
4
  import { Input, Form, FormSection, PrimaryButton, Button, Flex, Heading4 } from "../index";
5
5
  const errorList = ["Error message 1", "Error message 2"];
6
6
  export default {
7
7
  title: "Components/Input",
8
8
  };
9
9
  export const _Input = () => _jsx(Input, { labelText: "Input", onChange: action("value changed"), onBlur: action("blurred") });
10
- export const WithAllProps = () => (_jsx(Input, { placeholder: "Placeholder", p: "x3", labelText: "Input", helpText: "Additional help text", requirementText: "Required", onChange: action("value changed"), onBlur: action("blurred"), required: true }));
11
- WithAllProps.story = {
10
+ export const WithAllProps = {
11
+ render: () => (_jsx(Input, { placeholder: "Placeholder", p: "x3", labelText: "Input", helpText: "Additional help text", requirementText: "Required", onChange: action("value changed"), onBlur: action("blurred"), required: true })),
12
12
  name: "with all props",
13
13
  };
14
- export const SetToDisabled = () => (_jsx(Input, { labelText: "Set to disabled", disabled: true, onBlur: action("blurred"), value: "Disabled" }));
15
- SetToDisabled.story = {
14
+ export const SetToDisabled = {
15
+ render: () => _jsx(Input, { labelText: "Set to disabled", disabled: true, onBlur: action("blurred"), value: "Disabled" }),
16
16
  name: "set to disabled",
17
17
  };
18
- export const WithErrorMessage = () => (_jsx(Input, { labelText: "Label", errorMessage: "Error message", onChange: action("value changed"), onBlur: action("blurred") }));
19
- WithErrorMessage.story = {
18
+ export const WithErrorMessage = {
19
+ render: () => (_jsx(Input, { labelText: "Label", errorMessage: "Error message", onChange: action("value changed"), onBlur: action("blurred") })),
20
20
  name: "with error message",
21
21
  };
22
- export const WithErrorList = () => (_jsx(Input, { labelText: "Label", errorMessage: "Error message", errorList: errorList, onChange: action("value changed"), onBlur: action("blurred") }));
23
- WithErrorList.story = {
22
+ export const WithErrorList = {
23
+ render: () => (_jsx(Input, { labelText: "Label", errorMessage: "Error message", errorList: errorList, onChange: action("value changed"), onBlur: action("blurred") })),
24
24
  name: "with error list ",
25
25
  };
26
- export const WithCustomId = () => (_jsx(Input, { id: "my-own-id", labelText: "Label", onChange: action("value changed"), onBlur: action("blurred") }));
27
- WithCustomId.story = {
26
+ export const WithCustomId = {
27
+ render: () => (_jsx(Input, { id: "my-own-id", labelText: "Label", onChange: action("value changed"), onBlur: action("blurred") })),
28
28
  name: "with custom ID",
29
29
  };
30
- export const SetToRequired = () => (_jsx(_Fragment, { children: _jsxs(Form, { title: "Required field example", children: [_jsx(Input, { required: true, labelText: "Label", onChange: action("value changed"), onBlur: action("blurred") }), _jsx(PrimaryButton, { children: "Send" })] }) }));
31
- SetToRequired.story = {
30
+ export const SetToRequired = {
31
+ render: () => (_jsx(_Fragment, { children: _jsxs(Form, { title: "Required field example", children: [_jsx(Input, { required: true, labelText: "Label", onChange: action("value changed"), onBlur: action("blurred") }), _jsx(PrimaryButton, { children: "Send" })] }) })),
32
32
  name: "set to required",
33
33
  };
34
- export const WithAAffixPrefixAndSuffix = () => (_jsxs(_Fragment, { children: [_jsxs(Form, { title: "Suffix", mb: "x6", children: [_jsxs(FormSection, { children: [_jsx(Input, { suffix: "Eaches" }), _jsx(Input, { suffix: "Pallets and boxes" })] }), _jsxs(FormSection, { title: "With Custom Width", children: [_jsx(Input, { suffix: "Eaches", suffixWidth: "360px", prefixAlignment: "right" }), _jsx(Input, { suffix: "Pallets and boxes", suffixWidth: "360px" })] })] }), _jsxs(Form, { title: "Prefix", mb: "x6", children: [_jsxs(FormSection, { children: [_jsx(Input, { prefix: "Eaches" }), _jsx(Input, { prefix: "Pallets and boxes" })] }), _jsxs(FormSection, { title: "With Custom Width", children: [_jsx(Input, { prefix: "Eaches", prefixWidth: "360px" }), _jsx(Input, { prefix: "Pallets and boxes", prefixWidth: "360px" })] }), _jsxs(FormSection, { title: "With right alignment", children: [_jsx(Input, { prefix: "Eaches", prefixWidth: "360px", prefixAlignment: "right" }), _jsx(Input, { prefix: "Pallets and boxes", prefixWidth: "360px", prefixAlignment: "right" })] })] }), _jsx(Form, { title: "Prefix and Suffix", mb: "x6", children: _jsx(Input, { prefix: "Quantity", suffix: "Eaches" }) })] }));
35
- WithAAffixPrefixAndSuffix.story = {
34
+ export const WithAAffixPrefixAndSuffix = {
35
+ render: () => (_jsxs(_Fragment, { children: [_jsxs(Form, { title: "Suffix", mb: "x6", children: [_jsxs(FormSection, { children: [_jsx(Input, { suffix: "Eaches" }), _jsx(Input, { suffix: "Pallets and boxes" })] }), _jsxs(FormSection, { title: "With Custom Width", children: [_jsx(Input, { suffix: "Eaches", suffixWidth: "360px", prefixAlignment: "right" }), _jsx(Input, { suffix: "Pallets and boxes", suffixWidth: "360px" })] })] }), _jsxs(Form, { title: "Prefix", mb: "x6", children: [_jsxs(FormSection, { children: [_jsx(Input, { prefix: "Eaches" }), _jsx(Input, { prefix: "Pallets and boxes" })] }), _jsxs(FormSection, { title: "With Custom Width", children: [_jsx(Input, { prefix: "Eaches", prefixWidth: "360px" }), _jsx(Input, { prefix: "Pallets and boxes", prefixWidth: "360px" })] }), _jsxs(FormSection, { title: "With right alignment", children: [_jsx(Input, { prefix: "Eaches", prefixWidth: "360px", prefixAlignment: "right" }), _jsx(Input, { prefix: "Pallets and boxes", prefixWidth: "360px", prefixAlignment: "right" })] })] }), _jsx(Form, { title: "Prefix and Suffix", mb: "x6", children: _jsx(Input, { prefix: "Quantity", suffix: "Eaches" }) })] })),
36
36
  name: "with a affix (prefix and suffix)",
37
37
  };
38
38
  export const WithAnIcon = () => (_jsxs(Flex, { flexDirection: "column", gap: "x2", children: [_jsx(Input, { maxWidth: "320px", inputWidth: "320px", iconLeft: "search", placeholder: "Search by SKU", labelText: "Left Icon" }), _jsx(Input, { maxWidth: "320px", inputWidth: "320px", iconRight: "barcode", placeholder: "Search by SKU", labelText: "Right Icon" }), _jsx(Input, { maxWidth: "320px", inputWidth: "320px", iconRight: "barcode", iconLeft: "search", placeholder: "Search by SKU", labelText: "Left and right icons" }), _jsx(Input, { maxWidth: "320px", inputWidth: "320px", iconLeft: "search", iconLeftSize: "x2", placeholder: "Search by SKU", labelText: "Custom icon size" })] }));
@@ -48,13 +48,13 @@ export const WithIconTooltips = () => (_jsxs(Flex, { flexDirection: "column", ga
48
48
  placement: "top",
49
49
  maxWidth: "150px",
50
50
  }, placeholder: "Enter your access number", labelText: "Different placements (top and bottom)" })] }));
51
- export const UsingRefToControlFocus = () => {
52
- const ref = useRef(null);
53
- const handleClick = () => {
54
- ref.current.focus();
55
- };
56
- return (_jsxs(_Fragment, { children: [_jsx(Input, { id: "my-own-id", ref: ref, labelText: "Label", onChange: action("value changed"), onBlur: action("blurred") }), _jsx(Button, { onClick: handleClick, children: "Focus the Input" })] }));
57
- };
58
- UsingRefToControlFocus.story = {
51
+ export const UsingRefToControlFocus = {
52
+ render: () => {
53
+ const ref = useRef(null);
54
+ const handleClick = () => {
55
+ ref.current.focus();
56
+ };
57
+ return (_jsxs(_Fragment, { children: [_jsx(Input, { id: "my-own-id", ref: ref, labelText: "Label", onChange: action("value changed"), onBlur: action("blurred") }), _jsx(Button, { onClick: handleClick, children: "Focus the Input" })] }));
58
+ },
59
59
  name: "using ref to control focus",
60
60
  };
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from "@storybook/react";
1
+ import type { StoryObj } from "@storybook/react-vite";
2
2
  import { Page } from "..";
3
3
  declare const _default: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from "@storybook/react";
1
+ import type { StoryObj } from "@storybook/react-vite";
2
2
  import { Page } from "..";
3
3
  declare const _default: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from "@storybook/react";
1
+ import type { StoryObj } from "@storybook/react-vite";
2
2
  import { Sidebar } from "..";
3
3
  declare const _default: {
4
4
  title: string;
@@ -3,52 +3,36 @@ declare const _default: {
3
3
  };
4
4
  export default _default;
5
5
  export declare const _Link: {
6
- (): import("react/jsx-runtime").JSX.Element;
7
- story: {
8
- name: string;
9
- };
6
+ render: () => import("react/jsx-runtime").JSX.Element;
7
+ name: string;
10
8
  };
11
9
  export declare const WithCustomFontSize: {
12
- (): import("react/jsx-runtime").JSX.Element;
13
- story: {
14
- name: string;
15
- };
10
+ render: () => import("react/jsx-runtime").JSX.Element;
11
+ name: string;
16
12
  };
17
13
  export declare const WithoutUnderline: {
18
- (): import("react/jsx-runtime").JSX.Element;
19
- story: {
20
- name: string;
21
- };
14
+ render: () => import("react/jsx-runtime").JSX.Element;
15
+ name: string;
22
16
  };
23
17
  export declare const WithADifferentColor: {
24
- (): import("react/jsx-runtime").JSX.Element;
25
- story: {
26
- name: string;
27
- };
18
+ render: () => import("react/jsx-runtime").JSX.Element;
19
+ name: string;
28
20
  };
29
21
  export declare const WithADifferentFontSize: () => import("react/jsx-runtime").JSX.Element;
30
22
  export declare const AsAButton: {
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 _ReactRouterLink: {
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 WithAppTag: {
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 OpenInNewTab: () => import("react/jsx-runtime").JSX.Element;
49
35
  export declare const OpenInNewTabWithAppTag: {
50
- (): import("react/jsx-runtime").JSX.Element;
51
- story: {
52
- name: string;
53
- };
36
+ render: () => import("react/jsx-runtime").JSX.Element;
37
+ name: string;
54
38
  };
@@ -4,38 +4,37 @@ import { Link } from "../index";
4
4
  export default {
5
5
  title: "Components/Link",
6
6
  };
7
- export const _Link = () => _jsx(Link, { href: "http://nulogy.design", children: "Link" });
8
- _Link.story = {
7
+ export const _Link = {
8
+ render: () => _jsx(Link, { href: "http://nulogy.design", children: "Link" }),
9
9
  name: "Link ",
10
10
  };
11
- export const WithCustomFontSize = () => (_jsx(Link, { href: "http://nulogy.design", fontSize: "small", children: "Link" }));
12
- WithCustomFontSize.story = {
11
+ export const WithCustomFontSize = {
12
+ render: () => (_jsx(Link, { href: "http://nulogy.design", fontSize: "small", children: "Link" })),
13
13
  name: "with custom font size",
14
14
  };
15
- export const WithoutUnderline = () => (_jsx(Link, { underline: false, href: "http://nulogy.design", children: "Link" }));
16
- WithoutUnderline.story = {
15
+ export const WithoutUnderline = {
16
+ render: () => (_jsx(Link, { underline: false, href: "http://nulogy.design", children: "Link" })),
17
17
  name: "Without underline",
18
18
  };
19
- export const WithADifferentColor = () => (_jsx(Link, { color: "black", hover: "red", href: "http://nulogy.design", children: "Link" }));
20
- WithADifferentColor.story = {
19
+ export const WithADifferentColor = {
20
+ render: () => (_jsx(Link, { color: "black", hover: "red", href: "http://nulogy.design", children: "Link" })),
21
21
  name: "With a different color",
22
22
  };
23
23
  export const WithADifferentFontSize = () => (_jsx(Link, { fontSize: "large", href: "http://nulogy.design", children: "Link" }));
24
- export const AsAButton = () => _jsx(Link, { as: "button", children: "Link" });
25
- AsAButton.story = {
24
+ export const AsAButton = {
25
+ render: () => _jsx(Link, { as: "button", children: "Link" }),
26
26
  name: "As a <button>",
27
27
  };
28
- export const _ReactRouterLink = () => (_jsx(BrowserRouter, { children: _jsx(Link, { as: ReactRouterLink, to: "/place", children: "Link" }) }));
29
- _ReactRouterLink.story = {
28
+ export const _ReactRouterLink = {
29
+ render: () => (_jsx(BrowserRouter, { children: _jsx(Link, { as: ReactRouterLink, to: "/place", children: "Link" }) })),
30
30
  name: "with react router",
31
31
  };
32
- export const WithAppTag = () => (_jsx(Link, { href: "#production-scheduling", forApp: "production-scheduling", children: "POLI-120392" }));
33
- WithAppTag.story = {
34
- // This story is referenced in the AppTag story. If you change the name, update the URL in the AppTag story.
32
+ export const WithAppTag = {
33
+ render: () => (_jsx(Link, { href: "#production-scheduling", forApp: "production-scheduling", children: "POLI-120392" })),
35
34
  name: "With AppTag",
36
35
  };
37
36
  export const OpenInNewTab = () => (_jsx(Link, { href: "#production-scheduling", openInNewTab: true, children: "POLI-120392" }));
38
- export const OpenInNewTabWithAppTag = () => (_jsx(Link, { href: "#production-scheduling", forApp: "production-scheduling", openInNewTab: true, children: "POLI-120392" }));
39
- OpenInNewTabWithAppTag.story = {
37
+ export const OpenInNewTabWithAppTag = {
38
+ render: () => (_jsx(Link, { href: "#production-scheduling", forApp: "production-scheduling", openInNewTab: true, children: "POLI-120392" })),
40
39
  name: "Open in new tab with AppTag",
41
40
  };
@@ -4,26 +4,18 @@ declare const _default: {
4
4
  export default _default;
5
5
  export declare const _List: () => import("react/jsx-runtime").JSX.Element;
6
6
  export declare const WithCustomColour: {
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 WithCustomFontSizeAndLineHeight: {
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 WithCompactSpacing: {
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 WithLeftAlignment: {
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
  };
@@ -4,19 +4,19 @@ export default {
4
4
  title: "Components/List",
5
5
  };
6
6
  export const _List = () => (_jsxs(List, { children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] }));
7
- export const WithCustomColour = () => (_jsxs(List, { color: "red", children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] }));
8
- WithCustomColour.story = {
7
+ export const WithCustomColour = {
8
+ render: () => (_jsxs(List, { color: "red", children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] })),
9
9
  name: "With custom colour",
10
10
  };
11
- export const WithCustomFontSizeAndLineHeight = () => (_jsxs(List, { fontSize: "small", lineHeight: "smallTextBase", children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { fontSize: "large", children: "Larger List Item 3" })] }));
12
- WithCustomFontSizeAndLineHeight.story = {
11
+ export const WithCustomFontSizeAndLineHeight = {
12
+ render: () => (_jsxs(List, { fontSize: "small", lineHeight: "smallTextBase", children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { fontSize: "large", children: "Larger List Item 3" })] })),
13
13
  name: "With custom font size and line height",
14
14
  };
15
- export const WithCompactSpacing = () => (_jsxs(List, { compact: true, children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] }));
16
- WithCompactSpacing.story = {
15
+ export const WithCompactSpacing = {
16
+ render: () => (_jsxs(List, { compact: true, children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] })),
17
17
  name: "With compact spacing",
18
18
  };
19
- export const WithLeftAlignment = () => (_jsxs(List, { leftAlign: true, children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] }));
20
- WithLeftAlignment.story = {
19
+ export const WithLeftAlignment = {
20
+ render: () => (_jsxs(List, { leftAlign: true, children: [_jsx(ListItem, { children: "List Item 1" }), _jsx(ListItem, { children: "List Item 2 that is really really really really really really really really really long" }), _jsx(ListItem, { children: "List Item 3" })] })),
21
21
  name: "With left alignment",
22
22
  };
@@ -5,14 +5,10 @@ export default _default;
5
5
  export declare const Active: () => import("react/jsx-runtime").JSX.Element;
6
6
  export declare const Inactive: () => import("react/jsx-runtime").JSX.Element;
7
7
  export declare const PageExampleActive: {
8
- (): import("react/jsx-runtime").JSX.Element;
9
- story: {
10
- name: string;
11
- };
8
+ render: () => import("react/jsx-runtime").JSX.Element;
9
+ name: string;
12
10
  };
13
11
  export declare const PageExampleInactive: {
14
- (): import("react/jsx-runtime").JSX.Element;
15
- story: {
16
- name: string;
17
- };
12
+ render: () => import("react/jsx-runtime").JSX.Element;
13
+ name: string;
18
14
  };
@@ -6,11 +6,11 @@ export default {
6
6
  };
7
7
  export const Active = () => _jsx(LoadingAnimation, { children: "Example" });
8
8
  export const Inactive = () => _jsx(LoadingAnimation, { inactive: true, children: "Example" });
9
- export const PageExampleActive = () => (_jsxs(Overlay, { flexDirection: "column", m: { extraSmall: "x2", small: "x3" }, children: [_jsxs(Flex, { flexGrow: 2, flexDirection: "column", justifyContent: "center", margin: "auto", mb: "x4", children: [_jsx(Text, { mb: "x2", fontWeight: "medium", textAlign: "right", children: "1/4" }), _jsx(Box, { mb: "x1", children: _jsx(LoadingAnimation, {}) }), _jsx(Text, { fontSize: "small", color: "darkGrey", children: "Applying action ..." })] }), _jsxs(Flex, { justifyContent: "center", mb: "x1", children: [_jsx(ControlIcon, { icon: "refresh", disabled: true, mr: "x1", label: "Retry" }), _jsx(ControlIcon, { icon: "close", label: "Abort" })] })] }));
10
- PageExampleActive.story = {
9
+ export const PageExampleActive = {
10
+ render: () => (_jsxs(Overlay, { flexDirection: "column", m: { extraSmall: "x2", small: "x3" }, children: [_jsxs(Flex, { flexGrow: 2, flexDirection: "column", justifyContent: "center", margin: "auto", mb: "x4", children: [_jsx(Text, { mb: "x2", fontWeight: "medium", textAlign: "right", children: "1/4" }), _jsx(Box, { mb: "x1", children: _jsx(LoadingAnimation, {}) }), _jsx(Text, { fontSize: "small", color: "darkGrey", children: "Applying action ..." })] }), _jsxs(Flex, { justifyContent: "center", mb: "x1", children: [_jsx(ControlIcon, { icon: "refresh", disabled: true, mr: "x1", label: "Retry" }), _jsx(ControlIcon, { icon: "close", label: "Abort" })] })] })),
11
11
  name: "Page example - active",
12
12
  };
13
- export const PageExampleInactive = () => (_jsxs(Overlay, { flexDirection: "column", m: { extraSmall: "x2", small: "x3" }, children: [_jsxs(Flex, { flexGrow: 2, flexDirection: "column", justifyContent: "center", margin: "auto", mb: "x4", children: [_jsx(Text, { mb: "x2", fontWeight: "medium", color: "grey", textAlign: "right", children: "1/4" }), _jsx(Box, { mb: "x1", children: _jsx(LoadingAnimation, { inactive: true }) }), _jsx(Text, { fontSize: "small", color: "grey", children: "Applying action ..." })] }), _jsx(Alert, { type: "warning", mb: "x2", position: "absolute", bottom: "x8", children: "This action takes longer than expected. Try again..." }), _jsxs(Flex, { justifyContent: "center", mb: "x1", children: [_jsx(ControlIcon, { icon: "refresh", mr: "x1", label: "Retry" }), _jsx(ControlIcon, { icon: "close", label: "Abort" })] })] }));
14
- PageExampleInactive.story = {
13
+ export const PageExampleInactive = {
14
+ render: () => (_jsxs(Overlay, { flexDirection: "column", m: { extraSmall: "x2", small: "x3" }, children: [_jsxs(Flex, { flexGrow: 2, flexDirection: "column", justifyContent: "center", margin: "auto", mb: "x4", children: [_jsx(Text, { mb: "x2", fontWeight: "medium", color: "grey", textAlign: "right", children: "1/4" }), _jsx(Box, { mb: "x1", children: _jsx(LoadingAnimation, { inactive: true }) }), _jsx(Text, { fontSize: "small", color: "grey", children: "Applying action ..." })] }), _jsx(Alert, { type: "warning", mb: "x2", position: "absolute", bottom: "x8", children: "This action takes longer than expected. Try again..." }), _jsxs(Flex, { justifyContent: "center", mb: "x1", children: [_jsx(ControlIcon, { icon: "refresh", mr: "x1", label: "Retry" }), _jsx(ControlIcon, { icon: "close", label: "Abort" })] })] })),
15
15
  name: "Page example - inactive",
16
16
  };
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from "@storybook/react";
1
+ import type { StoryObj } from "@storybook/react-vite";
2
2
  import MaybeTooltip from "./MaybeTooltip";
3
3
  declare const _default: {
4
4
  title: string;
@@ -1,4 +1,4 @@
1
- import type { StoryObj } from "@storybook/react";
1
+ import type { StoryObj } from "@storybook/react-vite";
2
2
  import { Modal as NDSModal } from "../index";
3
3
  declare const _default: {
4
4
  title: string;
@@ -5,7 +5,14 @@ declare const _default: {
5
5
  };
6
6
  };
7
7
  export default _default;
8
- export declare const AllApps: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const AllApps: {
9
+ render: () => import("react/jsx-runtime").JSX.Element;
10
+ name: string;
11
+ play: ({ canvasElement: _canvasElement, step }: {
12
+ canvasElement: any;
13
+ step: any;
14
+ }) => Promise<void>;
15
+ };
9
16
  export declare const OnlySelectApps: () => import("react/jsx-runtime").JSX.Element;
10
17
  export declare const WithConditionallyVisibleApps: () => import("react/jsx-runtime").JSX.Element;
11
18
  export declare const WithAnIndicator: () => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
+ import { expect, screen, waitFor } from "storybook/test";
3
4
  import useConditionalAutoClick from "../../utils/testing/useConditionalAutoClick";
4
5
  import Navigation from "../Navigation";
5
6
  import { ApplicationFrame, Page } from "../../Layout";
@@ -18,7 +19,7 @@ export default {
18
19
  },
19
20
  };
20
21
  const appSwitcherToggleSelector = 'button[aria-label="Toggle app switcher"]';
21
- export const AllApps = () => {
22
+ const AllAppsComponent = () => {
22
23
  useConditionalAutoClick({
23
24
  selector: appSwitcherToggleSelector,
24
25
  condition: {
@@ -52,6 +53,23 @@ export const AllApps = () => {
52
53
  },
53
54
  } }));
54
55
  };
56
+ export const AllApps = {
57
+ render: () => _jsx(AllAppsComponent, {}),
58
+ name: "All Apps",
59
+ play: async ({ canvasElement: _canvasElement, step }) => {
60
+ await step("auto-opens the app switcher", async () => {
61
+ await waitFor(() => expect(screen.getByText("Production Scheduling")).toBeVisible(), { timeout: 3000 });
62
+ });
63
+ await step("displays all available apps", async () => {
64
+ await expect(screen.getByText("Supplier Collaboration")).toBeVisible();
65
+ await expect(screen.getByText("Digital Quality Inspection")).toBeVisible();
66
+ await expect(screen.getByText(/Shop Floor/)).toBeVisible();
67
+ await expect(screen.getByText("Smart Factory")).toBeVisible();
68
+ await expect(screen.getByText("Connections")).toBeVisible();
69
+ await expect(screen.getByText("Data")).toBeVisible();
70
+ });
71
+ },
72
+ };
55
73
  export const OnlySelectApps = () => {
56
74
  useConditionalAutoClick({
57
75
  selector: appSwitcherToggleSelector,
@@ -14,8 +14,6 @@ export declare const WithoutPassingAPrimaryLogo: () => import("react/jsx-runtime
14
14
  export declare const WithoutAPrimaryLogo: () => import("react/jsx-runtime").JSX.Element;
15
15
  export declare const WithACustomPrimaryLogo: () => import("react/jsx-runtime").JSX.Element;
16
16
  export declare const WithNavigationLogoWrapper: {
17
- (): import("react/jsx-runtime").JSX.Element;
18
- story: {
19
- name: string;
20
- };
17
+ render: () => import("react/jsx-runtime").JSX.Element;
18
+ name: string;
21
19
  };
@@ -49,9 +49,9 @@ export const WithoutAPrimaryLogo = () => {
49
49
  export const WithACustomPrimaryLogo = () => {
50
50
  return (_jsx(ApplicationFrame, { navBar: _jsx(Navigation, { primaryLogo: _jsx(CustomLogo2, { style: { width: "auto", height: 24 } }) }), children: _jsx(Page, { fullHeight: true, children: _jsx(Alert, { type: "danger", children: "This is not a recommended usage of the Navigation component." }) }) }));
51
51
  };
52
- export const WithNavigationLogoWrapper = () => {
53
- return (_jsx(ApplicationFrame, { navBar: _jsx(Navigation, { secondaryLogo: _jsx(NavigationLogoLink, { href: "/", "aria-label": "Custom Logo", children: _jsx(NavigationLogo, { children: _jsx(CustomLogo2, {}) }) }) }), children: _jsx(Page, { fullHeight: true, children: _jsxs(Flex, { flexDirection: "column", gap: "x2", children: [_jsxs(Text, { children: ["Secondary logos are not styled, ensure setting an explicit ", _jsx(Code, { children: "width" }), " / ", _jsx(Code, { children: "height" }), " on the passed ", _jsx(Code, { children: "ReactNode" }), " to prevent overflow, or using the ", _jsx(Code, { children: "NavigationLogo" }), " helper."] }), _jsxs(Text, { children: [_jsx(Code, { children: "NavigationLogo" }), " component constrains logos to maximum ", _jsx(Code, { children: "184px" }), " width and", " ", _jsx(Code, { children: "36px" }), " height by default to prevent overflow in the Navigation."] }), _jsxs(Text, { children: ["You can adjust this by passing ", _jsx(Code, { children: "maxWidth" }), " and ", _jsx(Code, { children: "maxHeight" }), " props to the", " ", _jsx(Code, { children: "NavigationLogo" }), " component."] })] }) }) }));
54
- };
55
- WithNavigationLogoWrapper.story = {
52
+ export const WithNavigationLogoWrapper = {
53
+ render: () => {
54
+ return (_jsx(ApplicationFrame, { navBar: _jsx(Navigation, { secondaryLogo: _jsx(NavigationLogoLink, { href: "/", "aria-label": "Custom Logo", children: _jsx(NavigationLogo, { children: _jsx(CustomLogo2, {}) }) }) }), children: _jsx(Page, { fullHeight: true, children: _jsxs(Flex, { flexDirection: "column", gap: "x2", children: [_jsxs(Text, { children: ["Secondary logos are not styled, ensure setting an explicit ", _jsx(Code, { children: "width" }), " / ", _jsx(Code, { children: "height" }), " on the passed ", _jsx(Code, { children: "ReactNode" }), " to prevent overflow, or using the ", _jsx(Code, { children: "NavigationLogo" }), " helper."] }), _jsxs(Text, { children: [_jsx(Code, { children: "NavigationLogo" }), " component constrains logos to maximum ", _jsx(Code, { children: "184px" }), " width and", " ", _jsx(Code, { children: "36px" }), " height by default to prevent overflow in the Navigation."] }), _jsxs(Text, { children: ["You can adjust this by passing ", _jsx(Code, { children: "maxWidth" }), " and ", _jsx(Code, { children: "maxHeight" }), " props to the", " ", _jsx(Code, { children: "NavigationLogo" }), " component."] })] }) }) }));
55
+ },
56
56
  name: "With NavigationLogo wrapper",
57
57
  };
@@ -5,6 +5,12 @@ declare const _default: {
5
5
  };
6
6
  };
7
7
  export default _default;
8
- export declare const BasicUsage: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const BasicUsage: {
9
+ render: () => import("react/jsx-runtime").JSX.Element;
10
+ play: ({ canvasElement: _canvasElement, step }: {
11
+ canvasElement: any;
12
+ step: any;
13
+ }) => Promise<void>;
14
+ };
9
15
  export declare const WithACustomBreakpoint: () => import("react/jsx-runtime").JSX.Element;
10
16
  export declare const WithBanners: () => import("react/jsx-runtime").JSX.Element;