@databiosphere/findable-ui 23.0.0 → 24.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/.storybook/preview.js +4 -37
  3. package/CHANGELOG.md +25 -0
  4. package/jest.config.js +1 -0
  5. package/lib/components/Export/components/ExportForm/exportForm.styles.d.ts +2 -2
  6. package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +1 -1
  7. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +1 -1
  8. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/Button/button.styles.d.ts +1 -1
  9. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/Button/button.styles.d.ts +1 -1
  10. package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
  11. package/lib/components/Loading/loading.stories.d.ts +3 -31
  12. package/lib/components/Login/components/Button/button.styles.d.ts +1 -1
  13. package/lib/components/Stepper/components/Step/components/StepContent/stepContent.d.ts +3 -0
  14. package/lib/components/Stepper/components/Step/components/StepContent/stepContent.js +7 -0
  15. package/lib/components/Stepper/components/Step/components/StepContent/stepContent.styles.d.ts +3 -0
  16. package/lib/components/Stepper/components/Step/components/StepContent/stepContent.styles.js +17 -0
  17. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.d.ts +2 -0
  18. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.js +8 -0
  19. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.d.ts +5 -0
  20. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.js +15 -0
  21. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/contants.d.ts +2 -0
  22. package/lib/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/contants.js +4 -0
  23. package/lib/components/Stepper/components/Step/components/StepIcon/constants.d.ts +1 -0
  24. package/lib/components/Stepper/components/Step/components/StepIcon/constants.js +1 -0
  25. package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.d.ts +3 -0
  26. package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.js +6 -0
  27. package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.d.ts +3 -0
  28. package/lib/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.js +27 -0
  29. package/lib/components/Stepper/components/Step/components/StepIcon/stories/stepIcon.stories.d.ts +9 -0
  30. package/lib/components/Stepper/components/Step/components/StepIcon/stories/stepIcon.stories.js +38 -0
  31. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/constants.d.ts +3 -0
  32. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/constants.js +11 -0
  33. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/icon.d.ts +2 -0
  34. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/icon.js +9 -0
  35. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/contants.d.ts +3 -0
  36. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/contants.js +3 -0
  37. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/icon.stories.d.ts +6 -0
  38. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/icon.stories.js +20 -0
  39. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/types.d.ts +7 -0
  40. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/types.js +1 -0
  41. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/constants.d.ts +2 -0
  42. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/constants.js +6 -0
  43. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.d.ts +2 -0
  44. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.js +6 -0
  45. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.d.ts +5 -0
  46. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.js +7 -0
  47. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/stories/label.stories.d.ts +7 -0
  48. package/lib/components/Stepper/components/Step/components/StepLabel/components/Label/stories/label.stories.js +21 -0
  49. package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.d.ts +2 -0
  50. package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.js +5 -0
  51. package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/optional.d.ts +2 -0
  52. package/lib/components/Stepper/components/Step/components/StepLabel/components/Optional/optional.js +6 -0
  53. package/lib/components/Stepper/components/Step/components/StepLabel/constants.d.ts +2 -0
  54. package/lib/components/Stepper/components/Step/components/StepLabel/constants.js +8 -0
  55. package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.d.ts +2 -0
  56. package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.js +6 -0
  57. package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.styles.d.ts +3 -0
  58. package/lib/components/Stepper/components/Step/components/StepLabel/stepLabel.styles.js +12 -0
  59. package/lib/components/Stepper/components/Step/components/StepLabel/stories/contants.d.ts +4 -0
  60. package/lib/components/Stepper/components/Step/components/StepLabel/stories/contants.js +15 -0
  61. package/lib/components/Stepper/components/Step/components/StepLabel/stories/stepLabel.stories.d.ts +8 -0
  62. package/lib/components/Stepper/components/Step/components/StepLabel/stories/stepLabel.stories.js +37 -0
  63. package/lib/components/Stepper/components/Step/constants.d.ts +2 -0
  64. package/lib/components/Stepper/components/Step/constants.js +4 -0
  65. package/lib/components/Stepper/components/Step/step.d.ts +3 -0
  66. package/lib/components/Stepper/components/Step/step.js +6 -0
  67. package/lib/components/Stepper/components/Step/step.styles.d.ts +5 -0
  68. package/lib/components/Stepper/components/Step/step.styles.js +31 -0
  69. package/lib/components/Stepper/components/Step/stories/contants.d.ts +4 -0
  70. package/lib/components/Stepper/components/Step/stories/contants.js +14 -0
  71. package/lib/components/Stepper/components/Step/stories/step.stories.d.ts +8 -0
  72. package/lib/components/Stepper/components/Step/stories/step.stories.js +62 -0
  73. package/lib/components/common/Form/components/Input/input.styles.d.ts +1 -1
  74. package/lib/components/common/Form/components/Select/select.js +2 -1
  75. package/lib/components/common/Form/components/Select/select.styles.d.ts +1 -1
  76. package/lib/components/common/Input/input.styles.d.ts +1 -1
  77. package/lib/components/common/KeyValuePairs/components/KeyElType/keyElType.d.ts +2 -5
  78. package/lib/components/common/KeyValuePairs/components/KeyElType/keyElType.js +6 -2
  79. package/lib/components/common/KeyValuePairs/components/ValueElType/valueElType.d.ts +2 -5
  80. package/lib/components/common/KeyValuePairs/components/ValueElType/valueElType.js +6 -2
  81. package/lib/storybook/controls/constants.d.ts +4 -0
  82. package/lib/storybook/controls/constants.js +6 -0
  83. package/lib/storybook/controls/types.d.ts +4 -0
  84. package/lib/storybook/controls/types.js +5 -0
  85. package/lib/storybook/controls/utils.d.ts +9 -0
  86. package/lib/storybook/controls/utils.js +10 -0
  87. package/lib/storybook/decorators.d.ts +2 -0
  88. package/lib/storybook/decorators.js +11 -0
  89. package/lib/storybook/loremIpsum.d.ts +4 -0
  90. package/lib/storybook/loremIpsum.js +4 -0
  91. package/lib/storybook/parameters.d.ts +2 -0
  92. package/lib/storybook/parameters.js +12 -0
  93. package/lib/styles/common/mui/stepper.d.ts +7 -0
  94. package/lib/styles/common/mui/stepper.js +7 -0
  95. package/lib/styles/common/mui/svgIcon.d.ts +9 -0
  96. package/lib/styles/common/mui/svgIcon.js +26 -0
  97. package/lib/styles/common/mui/typography.js +1 -0
  98. package/lib/tests/mui/constants.d.ts +4 -0
  99. package/lib/tests/mui/constants.js +4 -0
  100. package/lib/theme/common/components.js +0 -4
  101. package/lib/theme/common/typography.d.ts +5 -1
  102. package/lib/theme/common/typography.js +10 -1
  103. package/lib/theme/theme.js +1 -0
  104. package/lib/utils/tests.d.ts +12 -0
  105. package/lib/utils/tests.js +20 -0
  106. package/package.json +1 -1
  107. package/src/components/Loading/loading.stories.tsx +2 -2
  108. package/src/components/Stepper/components/Step/components/StepContent/stepContent.styles.ts +18 -0
  109. package/src/components/Stepper/components/Step/components/StepContent/stepContent.tsx +16 -0
  110. package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.styles.ts +19 -0
  111. package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/completedIcon.tsx +20 -0
  112. package/src/components/Stepper/components/Step/components/StepIcon/components/CompletedIcon/contants.ts +6 -0
  113. package/src/components/Stepper/components/Step/components/StepIcon/constants.ts +1 -0
  114. package/src/components/Stepper/components/Step/components/StepIcon/stepIcon.styles.ts +32 -0
  115. package/src/components/Stepper/components/Step/components/StepIcon/stepIcon.tsx +21 -0
  116. package/src/components/Stepper/components/Step/components/StepIcon/stories/stepIcon.stories.tsx +52 -0
  117. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/constants.ts +14 -0
  118. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/icon.tsx +13 -0
  119. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/contants.ts +6 -0
  120. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/stories/icon.stories.tsx +30 -0
  121. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/components/Icon/types.ts +8 -0
  122. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/constants.ts +8 -0
  123. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/label.styles.ts +8 -0
  124. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/label.tsx +10 -0
  125. package/src/components/Stepper/components/Step/components/StepLabel/components/Label/stories/label.stories.tsx +31 -0
  126. package/src/components/Stepper/components/Step/components/StepLabel/components/Optional/constants.ts +7 -0
  127. package/src/components/Stepper/components/Step/components/StepLabel/components/Optional/optional.tsx +9 -0
  128. package/src/components/Stepper/components/Step/components/StepLabel/constants.ts +10 -0
  129. package/src/components/Stepper/components/Step/components/StepLabel/stepLabel.styles.ts +13 -0
  130. package/src/components/Stepper/components/Step/components/StepLabel/stepLabel.tsx +10 -0
  131. package/src/components/Stepper/components/Step/components/StepLabel/stories/contants.ts +19 -0
  132. package/src/components/Stepper/components/Step/components/StepLabel/stories/stepLabel.stories.tsx +48 -0
  133. package/src/components/Stepper/components/Step/constants.ts +6 -0
  134. package/src/components/Stepper/components/Step/step.styles.ts +33 -0
  135. package/src/components/Stepper/components/Step/step.tsx +12 -0
  136. package/src/components/Stepper/components/Step/stories/contants.ts +18 -0
  137. package/src/components/Stepper/components/Step/stories/step.stories.tsx +87 -0
  138. package/src/components/common/Form/components/Select/select.tsx +8 -1
  139. package/src/components/common/KeyValuePairs/components/KeyElType/keyElType.tsx +14 -9
  140. package/src/components/common/KeyValuePairs/components/ValueElType/valueElType.tsx +8 -9
  141. package/src/storybook/controls/constants.ts +12 -0
  142. package/src/storybook/controls/types.ts +4 -0
  143. package/src/storybook/controls/utils.ts +18 -0
  144. package/src/storybook/decorators.tsx +17 -0
  145. package/src/storybook/loremIpsum.ts +5 -0
  146. package/src/storybook/parameters.ts +14 -0
  147. package/src/styles/common/mui/stepper.ts +14 -0
  148. package/src/styles/common/mui/svgIcon.ts +35 -0
  149. package/src/styles/common/mui/typography.ts +1 -0
  150. package/src/tests/mui/constants.ts +4 -0
  151. package/src/theme/common/components.ts +0 -4
  152. package/src/theme/common/typography.ts +11 -0
  153. package/src/theme/theme.ts +1 -0
  154. package/src/utils/tests.ts +20 -0
  155. package/tests/setup.ts +6 -0
  156. package/tests/stepIcon.test.tsx +42 -0
  157. package/types/data-explorer-ui.d.ts +3 -0
@@ -0,0 +1,8 @@
1
+ import { StepIcon } from "../StepIcon/stepIcon";
2
+ import { Label } from "./components/Label/label";
3
+ export const STEP_LABEL_PROPS = {
4
+ slots: {
5
+ label: Label,
6
+ stepIcon: StepIcon,
7
+ },
8
+ };
@@ -0,0 +1,2 @@
1
+ import { StepLabelProps } from "@mui/material";
2
+ export declare const StepLabel: ({ ...props }: StepLabelProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { STEP_LABEL_PROPS } from "./constants";
3
+ import { StyledStepLabel } from "./stepLabel.styles";
4
+ export const StepLabel = ({ ...props /* MuiStepLabelProps */ }) => {
5
+ return React.createElement(StyledStepLabel, { ...STEP_LABEL_PROPS, ...props });
6
+ };
@@ -0,0 +1,3 @@
1
+ export declare const StyledStepLabel: import("@emotion/styled").StyledComponent<import("@mui/material").StepLabelProps & {
2
+ theme?: import("@emotion/react").Theme;
3
+ }, {}, {}>;
@@ -0,0 +1,12 @@
1
+ import styled from "@emotion/styled";
2
+ import { StepLabel } from "@mui/material";
3
+ export const StyledStepLabel = styled(StepLabel) `
4
+ .MuiStepLabel-iconContainer {
5
+ padding-right: 16px;
6
+ }
7
+
8
+ .MuiStepLabel-labelContainer {
9
+ display: grid;
10
+ gap: 4px;
11
+ }
12
+ `;
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from "react";
2
+ import { StepLabel } from "../stepLabel";
3
+ export declare const DISABLED_CONTROLS: (keyof ComponentProps<typeof StepLabel>)[];
4
+ export declare const EXCLUDED_CONTROLS: (keyof ComponentProps<typeof StepLabel>)[];
@@ -0,0 +1,15 @@
1
+ import { MUI_CONTROLS } from "../../../../../../../storybook/controls/constants";
2
+ export const DISABLED_CONTROLS = [
3
+ ...MUI_CONTROLS,
4
+ "children",
5
+ "error",
6
+ "icon",
7
+ "optional",
8
+ "slotProps",
9
+ "slots",
10
+ ];
11
+ export const EXCLUDED_CONTROLS = [
12
+ "componentsProps", // deprecated
13
+ "StepIconComponent", // deprecated
14
+ "StepIconProps", // deprecated
15
+ ];
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { StepLabel } from "../stepLabel";
3
+ declare const meta: Meta<typeof StepLabel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Active: Story;
7
+ export declare const Completed: Story;
8
+ export declare const Default: Story;
@@ -0,0 +1,37 @@
1
+ import { composeStories } from "@storybook/react";
2
+ import React from "react";
3
+ import { CONTROL_TYPE } from "../../../../../../../storybook/controls/types";
4
+ import { configureControls } from "../../../../../../../storybook/controls/utils";
5
+ import * as stories from "../components/Label/stories/label.stories";
6
+ import { Optional } from "../components/Optional/optional";
7
+ import { StepLabel } from "../stepLabel";
8
+ import { DISABLED_CONTROLS, EXCLUDED_CONTROLS } from "./contants";
9
+ const { Default: Label, WithIcon: LabelWithIcon } = composeStories(stories);
10
+ const meta = {
11
+ argTypes: configureControls(DISABLED_CONTROLS, CONTROL_TYPE.DISABLED),
12
+ component: StepLabel,
13
+ parameters: { controls: { exclude: EXCLUDED_CONTROLS } },
14
+ title: "Components/Stepper/StepLabel",
15
+ };
16
+ export default meta;
17
+ export const Active = {
18
+ args: {
19
+ children: React.createElement(LabelWithIcon, null),
20
+ icon: 1,
21
+ slotProps: { stepIcon: { active: true } },
22
+ },
23
+ };
24
+ export const Completed = {
25
+ args: {
26
+ children: React.createElement(LabelWithIcon, null),
27
+ icon: 1,
28
+ optional: React.createElement(Optional, null, "3 files selected"),
29
+ slotProps: { stepIcon: { completed: true } },
30
+ },
31
+ };
32
+ export const Default = {
33
+ args: {
34
+ children: React.createElement(Label, null),
35
+ icon: 1,
36
+ },
37
+ };
@@ -0,0 +1,2 @@
1
+ import { StepProps } from "@mui/material";
2
+ export declare const STEP_PROPS: StepProps;
@@ -0,0 +1,4 @@
1
+ import { FluidPaper } from "../../../common/Paper/paper.styles";
2
+ export const STEP_PROPS = {
3
+ component: FluidPaper,
4
+ };
@@ -0,0 +1,3 @@
1
+ import { StepProps } from "@mui/material";
2
+ import { BaseComponentProps } from "../../../types";
3
+ export declare const Step: ({ className, ...props }: BaseComponentProps & StepProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { STEP_PROPS } from "./constants";
3
+ import { StyledStep } from "./step.styles";
4
+ export const Step = ({ className, ...props /* MuiStepProps */ }) => {
5
+ return React.createElement(StyledStep, { ...STEP_PROPS, className: className, ...props });
6
+ };
@@ -0,0 +1,5 @@
1
+ export declare const StyledStep: import("@emotion/styled").StyledComponent<import("@mui/material").StepOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
+ }, "style" | "className" | "classes" | "children" | "sx" | "disabled" | "expanded" | "active" | "last" | "completed" | "index"> & {
4
+ theme?: import("@emotion/react").Theme;
5
+ }, {}, {}>;
@@ -0,0 +1,31 @@
1
+ import { css } from "@emotion/react";
2
+ import styled from "@emotion/styled";
3
+ import { Step } from "@mui/material";
4
+ import { smokeLightest, white } from "../../../../styles/common/mixins/colors";
5
+ import { sectionPadding } from "../../../common/Section/section.styles";
6
+ export const StyledStep = styled(Step) `
7
+ &.MuiStep-root {
8
+ &.MuiStep-vertical {
9
+ background-color: ${smokeLightest};
10
+
11
+ .MuiStepLabel-root {
12
+ ${sectionPadding};
13
+ }
14
+
15
+ .MuiStepContent-root {
16
+ border: none;
17
+ margin: 0;
18
+ padding: 0;
19
+ }
20
+
21
+ &.Mui-completed {
22
+ background-color: ${white};
23
+ }
24
+
25
+ ${(props) => props.active &&
26
+ css `
27
+ background-color: ${white(props)};
28
+ `};
29
+ }
30
+ }
31
+ `;
@@ -0,0 +1,4 @@
1
+ import { ComponentProps } from "react";
2
+ import { Step } from "../step";
3
+ export declare const BOOLEAN_CONTROLS: (keyof ComponentProps<typeof Step>)[];
4
+ export declare const DISABLED_CONTROLS: (keyof ComponentProps<typeof Step>)[];
@@ -0,0 +1,14 @@
1
+ import { MUI_CONTROLS } from "../../../../../storybook/controls/constants";
2
+ export const BOOLEAN_CONTROLS = [
3
+ "active",
4
+ "completed",
5
+ "disabled",
6
+ "expanded",
7
+ "last",
8
+ ];
9
+ export const DISABLED_CONTROLS = [
10
+ ...MUI_CONTROLS,
11
+ "children",
12
+ "component",
13
+ "style",
14
+ ];
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { Step } from "../step";
3
+ declare const meta: Meta<typeof Step>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Active: Story;
7
+ export declare const Completed: Story;
8
+ export declare const Default: Story;
@@ -0,0 +1,62 @@
1
+ import { Stepper } from "@mui/material";
2
+ import { composeStories } from "@storybook/react";
3
+ import React from "react";
4
+ import { CONTROL_TYPE } from "../../../../../storybook/controls/types";
5
+ import { configureControls } from "../../../../../storybook/controls/utils";
6
+ import { LOREM_IPSUM } from "../../../../../storybook/loremIpsum";
7
+ import { STEPPER_PROPS } from "../../../../../styles/common/mui/stepper";
8
+ import { StepContent } from "../components/StepContent/stepContent";
9
+ import * as stories from "../components/StepLabel/stories/stepLabel.stories";
10
+ import { Step } from "../step";
11
+ import { BOOLEAN_CONTROLS, DISABLED_CONTROLS } from "./contants";
12
+ const { Active: ActiveStepLabel, Completed: CompletedStepLabel, Default: StepLabel, } = composeStories(stories);
13
+ const meta = {
14
+ argTypes: {
15
+ ...configureControls(DISABLED_CONTROLS, CONTROL_TYPE.DISABLED),
16
+ ...configureControls(BOOLEAN_CONTROLS, CONTROL_TYPE.BOOLEAN),
17
+ index: { control: { type: "number" } },
18
+ },
19
+ component: Step,
20
+ decorators: [
21
+ (Story, context) => (React.createElement(Stepper, { connector: null, orientation: STEPPER_PROPS.ORIENTATION.VERTICAL, sx: {
22
+ display: "grid",
23
+ gridTemplateColumns: "minmax(auto, 816px)",
24
+ height: "100vh",
25
+ placeContent: "center center",
26
+ } },
27
+ React.createElement(Story, { ...context }))),
28
+ ],
29
+ parameters: { layout: "fullscreen" },
30
+ title: "Components/Stepper/Step",
31
+ };
32
+ export default meta;
33
+ export const Active = {
34
+ args: {
35
+ active: true,
36
+ children: [
37
+ React.createElement(ActiveStepLabel, { key: "label" }),
38
+ React.createElement(StepContent, { key: "step-content" }, LOREM_IPSUM.LONG),
39
+ ],
40
+ completed: false,
41
+ },
42
+ };
43
+ export const Completed = {
44
+ args: {
45
+ active: false,
46
+ children: [
47
+ React.createElement(CompletedStepLabel, { key: "label" }),
48
+ React.createElement(StepContent, { key: "step-content" }, LOREM_IPSUM.LONG),
49
+ ],
50
+ completed: true,
51
+ },
52
+ };
53
+ export const Default = {
54
+ args: {
55
+ active: false,
56
+ children: [
57
+ React.createElement(StepLabel, { key: "label" }),
58
+ React.createElement(StepContent, { key: "step-content" }, LOREM_IPSUM.LONG),
59
+ ],
60
+ completed: false,
61
+ },
62
+ };
@@ -3,7 +3,7 @@ interface Props {
3
3
  }
4
4
  export declare const InputFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
5
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
6
- }, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "fullWidth" | "hiddenLabel" | "focused"> & {
6
+ }, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "focused" | "fullWidth" | "hiddenLabel"> & {
7
7
  theme?: import("@emotion/react").Theme;
8
8
  } & Props, {}, {}>;
9
9
  export {};
@@ -1,9 +1,10 @@
1
1
  import { Select as MSelect, Typography, } from "@mui/material";
2
2
  import React from "react";
3
3
  import { TEXT_BODY_400 } from "../../../../../theme/common/typography";
4
+ import { DropDownIcon } from "./components/DropDownIcon/dropDownIcon";
4
5
  import { InputFormControl } from "./select.styles";
5
6
  export const Select = ({ children, className, isFilled, label, onBlur, ...props /* Spread props to allow for Mui SelectProps specific prop overrides e.g. "disabled". */ }) => {
6
7
  return (React.createElement(InputFormControl, { className: className, isFilled: isFilled },
7
8
  label && React.createElement(Typography, { variant: TEXT_BODY_400 }, label),
8
- React.createElement(MSelect, { fullWidth: true, inputProps: { onBlur }, size: "small", ...props }, children)));
9
+ React.createElement(MSelect, { fullWidth: true, IconComponent: DropDownIcon, inputProps: { onBlur }, size: "small", ...props }, children)));
9
10
  };
@@ -3,7 +3,7 @@ interface Props {
3
3
  }
4
4
  export declare const InputFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
5
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
6
- }, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "fullWidth" | "hiddenLabel" | "focused"> & {
6
+ }, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "focused" | "fullWidth" | "hiddenLabel"> & {
7
7
  theme?: import("@emotion/react").Theme;
8
8
  } & Props, {}, {}>;
9
9
  export {};
@@ -3,7 +3,7 @@ interface Props {
3
3
  }
4
4
  export declare const InputFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
5
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
6
- }, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "fullWidth" | "hiddenLabel" | "focused"> & {
6
+ }, "style" | "className" | "classes" | "color" | "children" | "margin" | "sx" | "variant" | "error" | "disabled" | "required" | "size" | "focused" | "fullWidth" | "hiddenLabel"> & {
7
7
  theme?: import("@emotion/react").Theme;
8
8
  }, {}, {}>;
9
9
  export declare const InputField: import("@emotion/styled").StyledComponent<import("@mui/material").OutlinedInputProps & {
@@ -1,8 +1,5 @@
1
- import { ReactNode } from "react";
1
+ import { TypographyProps } from "@mui/material";
2
2
  /**
3
3
  * Basic KeyValuePairs "key" wrapper component.
4
4
  */
5
- export interface KeyElTypeProps {
6
- children: ReactNode;
7
- }
8
- export declare const KeyElType: ({ children, ...props }: KeyElTypeProps) => JSX.Element;
5
+ export declare const KeyElType: ({ children, color, component, variant, ...props }: TypographyProps) => JSX.Element;
@@ -1,5 +1,9 @@
1
1
  import { Typography } from "@mui/material";
2
2
  import React from "react";
3
- export const KeyElType = ({ children, ...props /* Spread props to allow for Mui TypographyProps specific prop overrides e.g. "variant". */ }) => {
4
- return (React.createElement(Typography, { color: "ink.light", variant: "text-body-400-2lines", ...props }, children));
3
+ import { TYPOGRAPHY_PROPS } from "../../../../../styles/common/mui/typography";
4
+ /**
5
+ * Basic KeyValuePairs "key" wrapper component.
6
+ */
7
+ export const KeyElType = ({ children, color = TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, component = "div", variant = TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_400_2_LINES, ...props /* MuiTypographyProps */ }) => {
8
+ return (React.createElement(Typography, { color: color, component: component, variant: variant, ...props }, children));
5
9
  };
@@ -1,8 +1,5 @@
1
- import { ReactNode } from "react";
1
+ import { TypographyProps } from "@mui/material";
2
2
  /**
3
3
  * Basic KeyValuePairs "value" wrapper component.
4
4
  */
5
- export interface ValueElTypeProps {
6
- children: ReactNode;
7
- }
8
- export declare const ValueElType: ({ children, ...props }: ValueElTypeProps) => JSX.Element;
5
+ export declare const ValueElType: ({ children, component, variant, ...props }: TypographyProps) => JSX.Element;
@@ -1,5 +1,9 @@
1
1
  import { Typography } from "@mui/material";
2
2
  import React from "react";
3
- export const ValueElType = ({ children, ...props /* Spread props to allow for Mui TypographyProps specific prop overrides e.g. "variant". */ }) => {
4
- return (React.createElement(Typography, { variant: "text-body-400-2lines", ...props }, children));
3
+ import { TYPOGRAPHY_PROPS } from "../../../../../styles/common/mui/typography";
4
+ /**
5
+ * Basic KeyValuePairs "value" wrapper component.
6
+ */
7
+ export const ValueElType = ({ children, component = "div", variant = TYPOGRAPHY_PROPS.VARIANT.TEXT_BODY_400_2_LINES, ...props /* MuiTypographyProps */ }) => {
8
+ return (React.createElement(Typography, { component: component, variant: variant, ...props }, children));
5
9
  };
@@ -0,0 +1,4 @@
1
+ import { ArgTypes } from "@storybook/react";
2
+ import { CONTROL_TYPE } from "./types";
3
+ export declare const CONTROL_CONFIG_MAP: Record<CONTROL_TYPE, ArgTypes[keyof ArgTypes]["control"]>;
4
+ export declare const MUI_CONTROLS: readonly ["classes", "className", "ref", "sx"];
@@ -0,0 +1,6 @@
1
+ import { CONTROL_TYPE } from "./types";
2
+ export const CONTROL_CONFIG_MAP = {
3
+ [CONTROL_TYPE.BOOLEAN]: { type: "boolean" },
4
+ [CONTROL_TYPE.DISABLED]: false,
5
+ };
6
+ export const MUI_CONTROLS = ["classes", "className", "ref", "sx"];
@@ -0,0 +1,4 @@
1
+ export declare enum CONTROL_TYPE {
2
+ BOOLEAN = "boolean",
3
+ DISABLED = "disabled"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var CONTROL_TYPE;
2
+ (function (CONTROL_TYPE) {
3
+ CONTROL_TYPE["BOOLEAN"] = "boolean";
4
+ CONTROL_TYPE["DISABLED"] = "disabled";
5
+ })(CONTROL_TYPE || (CONTROL_TYPE = {}));
@@ -0,0 +1,9 @@
1
+ import { Args, ArgTypes } from "@storybook/react";
2
+ import { CONTROL_TYPE } from "./types";
3
+ /**
4
+ * Configures controls for specified keys with the given control type.
5
+ * @param keys - ArgType keys.
6
+ * @param controlType - The type of control to apply (from CONTROL_TYPE enum).
7
+ * @returns An object of ArgTypes with the specified control configuration.
8
+ */
9
+ export declare function configureControls<TArg = Args>(keys: (keyof TArg)[], controlType: CONTROL_TYPE): Partial<ArgTypes<TArg>>;
@@ -0,0 +1,10 @@
1
+ import { CONTROL_CONFIG_MAP } from "./constants";
2
+ /**
3
+ * Configures controls for specified keys with the given control type.
4
+ * @param keys - ArgType keys.
5
+ * @param controlType - The type of control to apply (from CONTROL_TYPE enum).
6
+ * @returns An object of ArgTypes with the specified control configuration.
7
+ */
8
+ export function configureControls(keys, controlType) {
9
+ return Object.fromEntries(keys.map((key) => [key, { control: CONTROL_CONFIG_MAP[controlType] }]));
10
+ }
@@ -0,0 +1,2 @@
1
+ import { Preview } from "@storybook/react";
2
+ export declare const decorators: Preview["decorators"];
@@ -0,0 +1,11 @@
1
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
2
+ import { CssBaseline, ThemeProvider } from "@mui/material";
3
+ import React from "react";
4
+ import { createAppTheme } from "../theme/theme";
5
+ export const decorators = (Story, context) => {
6
+ const theme = createAppTheme();
7
+ return (React.createElement(EmotionThemeProvider, { theme: theme },
8
+ React.createElement(ThemeProvider, { theme: theme },
9
+ React.createElement(CssBaseline, null),
10
+ React.createElement(Story, { ...context }))));
11
+ };
@@ -0,0 +1,4 @@
1
+ export declare const LOREM_IPSUM: {
2
+ LONG: string;
3
+ SHORT: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export const LOREM_IPSUM = {
2
+ LONG: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.",
3
+ SHORT: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.",
4
+ };
@@ -0,0 +1,2 @@
1
+ import { Preview } from "@storybook/react";
2
+ export declare const parameters: Preview["parameters"];
@@ -0,0 +1,12 @@
1
+ export const parameters = {
2
+ actions: { argTypesRegex: "^on[A-Z].*" },
3
+ controls: {
4
+ expanded: true,
5
+ matchers: {
6
+ color: /(background|color)$/i,
7
+ date: /Date$/,
8
+ },
9
+ sort: "alpha",
10
+ },
11
+ layout: "centered",
12
+ };
@@ -0,0 +1,7 @@
1
+ import { StepperProps } from "@mui/material";
2
+ type StepperPropsOptions = {
3
+ ORIENTATION: typeof ORIENTATION;
4
+ };
5
+ declare const ORIENTATION: Record<string, StepperProps["orientation"]>;
6
+ export declare const STEPPER_PROPS: StepperPropsOptions;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ const ORIENTATION = {
2
+ HORIZONTAL: "horizontal",
3
+ VERTICAL: "vertical",
4
+ };
5
+ export const STEPPER_PROPS = {
6
+ ORIENTATION,
7
+ };
@@ -0,0 +1,9 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ type SvgIconPropsOptions = {
3
+ COLOR: typeof COLOR;
4
+ FONT_SIZE: typeof FONT_SIZE;
5
+ };
6
+ declare const COLOR: Record<string, SvgIconProps["color"]>;
7
+ declare const FONT_SIZE: Record<string, SvgIconProps["fontSize"]>;
8
+ export declare const SVG_ICON_PROPS: SvgIconPropsOptions;
9
+ export {};
@@ -0,0 +1,26 @@
1
+ const COLOR = {
2
+ ACTION: "action",
3
+ DISABLED: "disabled",
4
+ ERROR: "error",
5
+ INFO: "info",
6
+ INHERIT: "inherit",
7
+ INK_LIGHT: "inkLight",
8
+ INK_MAIN: "inkMain",
9
+ PRIMARY: "primary",
10
+ SECONDARY: "secondary",
11
+ SUCCESS: "success",
12
+ WARNING: "warning",
13
+ };
14
+ const FONT_SIZE = {
15
+ INHERIT: "inherit",
16
+ LARGE: "large",
17
+ MEDIUM: "medium",
18
+ SMALL: "small",
19
+ XSMALL: "xsmall",
20
+ XXLARGE: "xxlarge",
21
+ XXSMALL: "xxsmall",
22
+ };
23
+ export const SVG_ICON_PROPS = {
24
+ COLOR,
25
+ FONT_SIZE,
26
+ };
@@ -10,6 +10,7 @@ const VARIANT = {
10
10
  TEXT_BODY_SMALL_400: "text-body-small-400",
11
11
  TEXT_HEADING_LARGE: "text-heading-large",
12
12
  TEXT_HEADING_SMALL: "text-heading-small",
13
+ TEXT_HEADING_XSMALL: "text-heading-xsmall",
13
14
  };
14
15
  export const TYPOGRAPHY_PROPS = {
15
16
  COLOR,
@@ -0,0 +1,4 @@
1
+ export declare const MUI_CLASSES: {
2
+ ACTIVE: string;
3
+ COMPLETED: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export const MUI_CLASSES = {
2
+ ACTIVE: "Mui-active",
3
+ COMPLETED: "Mui-completed",
4
+ };
@@ -1,4 +1,3 @@
1
- import { DropDownIcon } from "../../components/common/Form/components/Select/components/DropDownIcon/dropDownIcon";
2
1
  import { CHIP_PROPS } from "../../styles/common/mui/chip";
3
2
  import { desktopUp, mobileUp, tabletUp } from "./breakpoints";
4
3
  import { alpha32, alpha60, alpha64, alpha80, black04, black08, white, } from "./palette";
@@ -1114,9 +1113,6 @@ export const MuiRadio = (theme) => {
1114
1113
  * MuiSelect Component
1115
1114
  */
1116
1115
  export const MuiSelect = {
1117
- defaultProps: {
1118
- IconComponent: DropDownIcon,
1119
- },
1120
1116
  styleOverrides: {
1121
1117
  select: {
1122
1118
  minHeight: "unset",
@@ -3,7 +3,7 @@ import { CSSProperties } from "@mui/material/styles/createTypography";
3
3
  * Typography constants.
4
4
  */
5
5
  export declare const fontFamily = "Inter";
6
- export declare const TEXT_BODY_400: "text-body-400", TEXT_BODY_400_2_LINES: "text-body-400-2lines", TEXT_BODY_500: "text-body-500", TEXT_BODY_500_2_LINES: "text-body-500-2lines", TEXT_BODY_LARGE_400: "text-body-large-400", TEXT_BODY_LARGE_400_2_LINES: "text-body-large-400-2lines", TEXT_BODY_LARGE_500: "text-body-large-500", TEXT_BODY_SMALL_400: "text-body-small-400", TEXT_BODY_SMALL_400_2_LINES: "text-body-small-400-2lines", TEXT_BODY_SMALL_500: "text-body-small-500", TEXT_HEADING: "text-heading", TEXT_HEADING_LARGE: "text-heading-large", TEXT_HEADING_SMALL: "text-heading-small", TEXT_HEADING_XLARGE: "text-heading-xlarge", TEXT_UPPERCASE_500: "text-uppercase-500";
6
+ export declare const TEXT_BODY_400: "text-body-400", TEXT_BODY_400_2_LINES: "text-body-400-2lines", TEXT_BODY_500: "text-body-500", TEXT_BODY_500_2_LINES: "text-body-500-2lines", TEXT_BODY_LARGE_400: "text-body-large-400", TEXT_BODY_LARGE_400_2_LINES: "text-body-large-400-2lines", TEXT_BODY_LARGE_500: "text-body-large-500", TEXT_BODY_SMALL_400: "text-body-small-400", TEXT_BODY_SMALL_400_2_LINES: "text-body-small-400-2lines", TEXT_BODY_SMALL_500: "text-body-small-500", TEXT_HEADING: "text-heading", TEXT_HEADING_LARGE: "text-heading-large", TEXT_HEADING_SMALL: "text-heading-small", TEXT_HEADING_XLARGE: "text-heading-xlarge", TEXT_HEADING_XSMALL: "text-heading-xsmall", TEXT_UPPERCASE_500: "text-uppercase-500";
7
7
  /**
8
8
  * Typography Option "text-body-400"
9
9
  */
@@ -60,6 +60,10 @@ export declare const textHeadingSmall: CSSProperties;
60
60
  * Typography Option "text-heading-xlarge"
61
61
  */
62
62
  export declare const textHeadingXLarge: CSSProperties;
63
+ /**
64
+ * Typography Option "text-heading-xsmall"
65
+ */
66
+ export declare const textHeadingXSmall: CSSProperties;
63
67
  /**
64
68
  * Typography Option "text-uppercase-500"
65
69
  */
@@ -18,9 +18,10 @@ const TYPOGRAPHY = {
18
18
  TEXT_HEADING_LARGE: "text-heading-large",
19
19
  TEXT_HEADING_SMALL: "text-heading-small",
20
20
  TEXT_HEADING_XLARGE: "text-heading-xlarge",
21
+ TEXT_HEADING_XSMALL: "text-heading-xsmall",
21
22
  TEXT_UPPERCASE_500: "text-uppercase-500",
22
23
  };
23
- export const { TEXT_BODY_400, TEXT_BODY_400_2_LINES, TEXT_BODY_500, TEXT_BODY_500_2_LINES, TEXT_BODY_LARGE_400, TEXT_BODY_LARGE_400_2_LINES, TEXT_BODY_LARGE_500, TEXT_BODY_SMALL_400, TEXT_BODY_SMALL_400_2_LINES, TEXT_BODY_SMALL_500, TEXT_HEADING, TEXT_HEADING_LARGE, TEXT_HEADING_SMALL, TEXT_HEADING_XLARGE, TEXT_UPPERCASE_500, } = TYPOGRAPHY;
24
+ export const { TEXT_BODY_400, TEXT_BODY_400_2_LINES, TEXT_BODY_500, TEXT_BODY_500_2_LINES, TEXT_BODY_LARGE_400, TEXT_BODY_LARGE_400_2_LINES, TEXT_BODY_LARGE_500, TEXT_BODY_SMALL_400, TEXT_BODY_SMALL_400_2_LINES, TEXT_BODY_SMALL_500, TEXT_HEADING, TEXT_HEADING_LARGE, TEXT_HEADING_SMALL, TEXT_HEADING_XLARGE, TEXT_HEADING_XSMALL, TEXT_UPPERCASE_500, } = TYPOGRAPHY;
24
25
  /**
25
26
  * Typography Option "text-body-400"
26
27
  */
@@ -156,6 +157,14 @@ export const textHeadingXLarge = {
156
157
  lineHeight: "56px",
157
158
  },
158
159
  };
160
+ /**
161
+ * Typography Option "text-heading-xsmall"
162
+ */
163
+ export const textHeadingXSmall = {
164
+ fontSize: 16,
165
+ fontWeight: 500,
166
+ lineHeight: "24px",
167
+ };
159
168
  /**
160
169
  * Typography Option "text-uppercase-500"
161
170
  */
@@ -49,6 +49,7 @@ export function createAppTheme(customOptions) {
49
49
  [T.TEXT_HEADING_LARGE]: T.textHeadingLarge,
50
50
  [T.TEXT_HEADING_SMALL]: T.textHeadingSmall,
51
51
  [T.TEXT_HEADING_XLARGE]: T.textHeadingXLarge,
52
+ [T.TEXT_HEADING_XSMALL]: T.textHeadingXSmall,
52
53
  [T.TEXT_UPPERCASE_500]: T.textUppercase500,
53
54
  fontFamily: T.fontFamily,
54
55
  },