@recursica/mui-adapter 0.11.0 → 0.12.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 (42) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/mui-adapter.cjs +18 -18
  3. package/dist/mui-adapter.cjs.map +1 -1
  4. package/dist/mui-adapter.css +1 -1
  5. package/dist/mui-adapter.js +1878 -1812
  6. package/dist/mui-adapter.js.map +1 -1
  7. package/dist/src/components/DatePicker/DatePicker.d.ts +17 -1
  8. package/dist/src/components/Dropdown/Dropdown.d.ts +1 -1
  9. package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +2 -1
  10. package/dist/src/components/TextArea/TextArea.d.ts +1 -1
  11. package/dist/src/components/TextField/TextField.d.ts +1 -1
  12. package/dist/src/components/Tree/Tree.d.ts +9 -0
  13. package/dist/src/components/Tree/index.d.ts +1 -0
  14. package/dist/src/components/index.d.ts +1 -0
  15. package/dist/src/index.d.ts +1 -0
  16. package/package.json +2 -2
  17. package/src/components/Accordion/Accordion.tsx +7 -6
  18. package/src/components/Checkbox/CheckboxGroup.tsx +1 -0
  19. package/src/components/Container/Container.tsx +6 -3
  20. package/src/components/DatePicker/DatePicker.stories.tsx +0 -1
  21. package/src/components/DatePicker/DatePicker.tsx +40 -3
  22. package/src/components/Dropdown/Dropdown.stories.tsx +0 -6
  23. package/src/components/Dropdown/Dropdown.tsx +1 -0
  24. package/src/components/FormControlWrapper/FormControlWrapper.tsx +5 -1
  25. package/src/components/HoverCard/HoverCard.stories.tsx +1 -1
  26. package/src/components/Menu/Menu.stories.tsx +1 -1
  27. package/src/components/NumberInput/NumberInput.stories.tsx +0 -2
  28. package/src/components/NumberInput/NumberInput.tsx +27 -0
  29. package/src/components/Pagination/Pagination.tsx +12 -5
  30. package/src/components/Stack/Stack.tsx +8 -2
  31. package/src/components/Stepper/Stepper.stories.tsx +2 -2
  32. package/src/components/Tabs/Tabs.stories.tsx +2 -2
  33. package/src/components/Tabs/Tabs.tsx +2 -0
  34. package/src/components/TextArea/TextArea.tsx +1 -0
  35. package/src/components/TextField/TextField.tsx +6 -1
  36. package/src/components/Timeline/TimelineItem.tsx +2 -0
  37. package/src/components/Tree/Tree.module.css +43 -0
  38. package/src/components/Tree/Tree.stories.tsx +14 -0
  39. package/src/components/Tree/Tree.tsx +24 -0
  40. package/src/components/Tree/index.ts +1 -0
  41. package/src/components/index.ts +1 -0
  42. package/src/index.ts +3 -0
@@ -1,4 +1,20 @@
1
1
  import { default as React } from 'react';
2
2
  import { RecursicaDatePickerProps } from '@recursica/adapter-common';
3
- export type DatePickerProps = React.HTMLAttributes<HTMLDivElement> & RecursicaDatePickerProps;
3
+ export type DatePickerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "value" | "onChange" | "defaultValue"> & RecursicaDatePickerProps & {
4
+ disabled?: boolean;
5
+ label?: React.ReactNode;
6
+ assistiveText?: string;
7
+ error?: React.ReactNode;
8
+ required?: boolean;
9
+ withAsterisk?: boolean;
10
+ placeholder?: string;
11
+ value?: Date | null;
12
+ defaultValue?: Date | null;
13
+ onChange?: (value: Date | null) => void;
14
+ readOnly?: boolean;
15
+ formLayout?: "stacked" | "side-by-side";
16
+ leftSection?: React.ReactNode;
17
+ labelWithEditIcon?: boolean;
18
+ onLabelEditClick?: () => void;
19
+ };
4
20
  export declare const DatePicker: React.FC<DatePickerProps>;
@@ -3,7 +3,7 @@ import { SelectProps as MuiSelectProps } from '@mui/material';
3
3
  import { ReadOnlyControlProps, RecursicaDropdownProps as BaseRecursicaDropdownProps } from '@recursica/adapter-common';
4
4
  import { RecursicaOverStyled } from '../../utils/filterStylingProps';
5
5
  import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
6
- export interface RecursicaDropdownProps extends Omit<MuiSelectProps, keyof React.HTMLAttributes<HTMLDivElement> | "size" | "variant" | "classes" | "inputProps" | "SelectDisplayProps" | "ref">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps, BaseRecursicaDropdownProps {
6
+ export interface RecursicaDropdownProps extends Omit<MuiSelectProps, keyof React.HTMLAttributes<HTMLDivElement> | "size" | "variant" | "classes" | "inputProps" | "SelectDisplayProps" | "ref" | "error">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps, BaseRecursicaDropdownProps {
7
7
  }
8
8
  export type DropdownProps = RecursicaOverStyled<RecursicaDropdownProps>;
9
9
  export declare const Dropdown: React.ForwardRefExoticComponent<(Omit<Omit<import('@recursica/adapter-common').WithRecursicaSpacing<RecursicaDropdownProps>, import('@recursica/adapter-common').BlockedStylingKeys> & import('@recursica/adapter-common').ForbiddenStyles & {
@@ -1,10 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  import { FormControlProps } from '@mui/material';
3
3
  import { RecursicaFormControlWrapperProps as BaseRecursicaFormControlWrapperProps } from '@recursica/adapter-common';
4
- export interface RecursicaFormControlWrapperProps extends Omit<FormControlProps, "margin" | "variant" | "size" | "color">, BaseRecursicaFormControlWrapperProps {
4
+ export interface RecursicaFormControlWrapperProps extends Omit<FormControlProps, "margin" | "variant" | "size" | "color" | "error">, BaseRecursicaFormControlWrapperProps {
5
5
  overStyled?: boolean;
6
6
  label?: React.ReactNode;
7
7
  focused?: boolean;
8
+ error?: React.ReactNode;
8
9
  }
9
10
  export type FormControlWrapperProps = RecursicaFormControlWrapperProps;
10
11
  export declare const FormControlWrapper: React.ForwardRefExoticComponent<Omit<RecursicaFormControlWrapperProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -3,7 +3,7 @@ import { TextFieldProps as MuiTextareaProps } from '@mui/material';
3
3
  import { ReadOnlyControlProps, RecursicaTextAreaProps as BaseRecursicaTextAreaProps } from '@recursica/adapter-common';
4
4
  import { RecursicaOverStyled } from '../../utils/filterStylingProps';
5
5
  import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
6
- export interface RecursicaTextAreaProps extends Omit<MuiTextareaProps, keyof React.HTMLAttributes<HTMLDivElement> | "size" | "variant" | "radius" | "wrapperProps" | "maxRows" | "minRows" | "classes">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps, BaseRecursicaTextAreaProps {
6
+ export interface RecursicaTextAreaProps extends Omit<MuiTextareaProps, keyof React.HTMLAttributes<HTMLDivElement> | "size" | "variant" | "radius" | "wrapperProps" | "maxRows" | "minRows" | "classes" | "error">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth">, ReadOnlyControlProps, BaseRecursicaTextAreaProps {
7
7
  }
8
8
  export type TextAreaProps = RecursicaOverStyled<RecursicaTextAreaProps>;
9
9
  export declare const TextArea: React.ForwardRefExoticComponent<(Omit<Omit<import('@recursica/adapter-common').WithRecursicaSpacing<RecursicaTextAreaProps>, import('@recursica/adapter-common').BlockedStylingKeys> & import('@recursica/adapter-common').ForbiddenStyles & {
@@ -3,7 +3,7 @@ import { InputBaseProps } from '@mui/material';
3
3
  import { ReadOnlyControlProps, RecursicaTextFieldProps as BaseRecursicaTextFieldProps } from '@recursica/adapter-common';
4
4
  import { RecursicaOverStyled } from '../../utils/filterStylingProps';
5
5
  import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
6
- export interface RecursicaTextFieldProps extends Omit<InputBaseProps, "color" | "size" | "startAdornment" | "endAdornment" | "autoComplete">, Omit<React.ComponentPropsWithoutRef<"input">, keyof InputBaseProps | "size" | "color" | "style" | "className" | "id">, Pick<RecursicaFormControlWrapperProps, "label" | "error" | "required" | "id" | "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps, BaseRecursicaTextFieldProps {
6
+ export interface RecursicaTextFieldProps extends Omit<InputBaseProps, "color" | "size" | "startAdornment" | "endAdornment" | "autoComplete" | "error">, Omit<React.ComponentPropsWithoutRef<"input">, keyof InputBaseProps | "size" | "color" | "style" | "className" | "id">, Pick<RecursicaFormControlWrapperProps, "label" | "error" | "required" | "id" | "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps, BaseRecursicaTextFieldProps {
7
7
  }
8
8
  export type TextFieldProps = RecursicaOverStyled<RecursicaTextFieldProps>;
9
9
  export declare const TextField: React.ForwardRefExoticComponent<(Omit<Omit<import('@recursica/adapter-common').WithRecursicaSpacing<RecursicaTextFieldProps>, import('@recursica/adapter-common').BlockedStylingKeys> & import('@recursica/adapter-common').ForbiddenStyles & {
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { RecursicaOverStyled } from '../../utils/filterStylingProps';
3
+ export interface TreeProps extends React.ComponentPropsWithoutRef<"div"> {
4
+ overStyled?: boolean;
5
+ }
6
+ /**
7
+ * Placeholder component for Tree (Coming Soon).
8
+ */
9
+ export declare const Tree: React.ForwardRefExoticComponent<RecursicaOverStyled<TreeProps> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './Tree';
@@ -46,3 +46,4 @@ export * from './Toast';
46
46
  export * from './Tooltip';
47
47
  export * from './TransferList';
48
48
  export * from './Typography';
49
+ export * from './Tree';
@@ -83,4 +83,5 @@ export declare const Title: typeof rawComponents.Title;
83
83
  export declare const Toast: typeof rawComponents.Toast;
84
84
  export declare const Tooltip: typeof rawComponents.Tooltip;
85
85
  export declare const TransferList: typeof rawComponents.TransferList;
86
+ export declare const Tree: typeof rawComponents.Tree;
86
87
  export type { RecursicaAutocompleteProps, RecursicaDropdownProps, RecursicaFormControlWrapperProps, RecursicaNumberInputProps, RecursicaSliderProps, RecursicaTextAreaProps, RecursicaTextFieldProps, RecursicaToastProps, } from './components';
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/borderux/recursica.git",
14
14
  "directory": "packages/mui-adapter"
15
15
  },
16
- "version": "0.11.0",
16
+ "version": "0.12.0",
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
@@ -56,7 +56,7 @@
56
56
  "build-storybook": "storybook build -o storybook-static",
57
57
  "lint": "eslint .",
58
58
  "storybook": "storybook dev -p 6012",
59
- "analyze-tokens": "analyze-tokens --css recursica_variables_scoped.css --dir src/components --output token-analysis.json",
59
+ "analyze-tokens": "analyze-tokens --css @recursica/official-release/recursica_variables_scoped.css --dir src/components --output token-analysis.json",
60
60
  "prebuild": "npm run analyze-tokens"
61
61
  },
62
62
  "devDependencies": {
@@ -37,6 +37,7 @@ const ChevronIcon = () => (
37
37
  const AccordionContext = createContext<{
38
38
  value: string | string[] | null;
39
39
  onChange: (val: string) => void;
40
+ chevron?: React.ReactNode;
40
41
  } | null>(null);
41
42
 
42
43
  // ==== ACCORDION CONTAINER ====
@@ -53,6 +54,7 @@ const AccordionBase = forwardRef<HTMLDivElement, AccordionProps>(
53
54
  defaultValue,
54
55
  onChange,
55
56
  multiple = false,
57
+ chevron,
56
58
  children,
57
59
  ...rest
58
60
  },
@@ -90,7 +92,7 @@ const AccordionBase = forwardRef<HTMLDivElement, AccordionProps>(
90
92
 
91
93
  return (
92
94
  <AccordionContext.Provider
93
- value={{ value: activeValue, onChange: handleItemChange }}
95
+ value={{ value: activeValue, onChange: handleItemChange, chevron }}
94
96
  >
95
97
  <div
96
98
  ref={ref}
@@ -202,15 +204,14 @@ export const AccordionControl = forwardRef<
202
204
  const finalClass =
203
205
  [styles.control, classNameProp].filter(Boolean).join(" ") || undefined;
204
206
 
207
+ const ctx = useContext(AccordionContext);
208
+ const resolvedChevron = ctx?.chevron ?? <ChevronIcon />;
209
+
205
210
  return (
206
211
  <MuiAccordionSummary
207
212
  ref={ref}
208
213
  className={finalClass}
209
- expandIcon={
210
- <span className={styles.chevron}>
211
- <ChevronIcon />
212
- </span>
213
- }
214
+ expandIcon={<span className={styles.chevron}>{resolvedChevron}</span>}
214
215
  {...(sanitizedProps as unknown as MuiAccordionSummaryProps)}
215
216
  >
216
217
  {leftIcon && (
@@ -11,6 +11,7 @@ import styles from "./Checkbox.module.css";
11
11
 
12
12
  import { FormGroup as MuiFormGroup } from "@mui/material";
13
13
 
14
+ // eslint-disable-next-line react-refresh/only-export-components
14
15
  export const CheckboxGroupContext = React.createContext<{
15
16
  value?: any[];
16
17
  onChange?: (event: React.SyntheticEvent, value: any) => void;
@@ -20,7 +20,7 @@ export type ContainerProps = WithRecursicaSpacing<
20
20
  >;
21
21
 
22
22
  export const Container = forwardRef<HTMLDivElement, ContainerProps>(
23
- function Container({ children, size, ...rest }, ref) {
23
+ function Container({ children, size, fluid, ...rest }, ref) {
24
24
  const mapSize: Record<string, "xs" | "sm" | "md" | "lg" | "xl"> = {
25
25
  "rec-sm": "sm",
26
26
  "rec-default": "md",
@@ -30,8 +30,11 @@ export const Container = forwardRef<HTMLDivElement, ContainerProps>(
30
30
  "rec-2xl": "xl",
31
31
  };
32
32
 
33
- const resolvedSize =
34
- typeof size === "string" && mapSize[size] ? mapSize[size] : size;
33
+ const resolvedSize = fluid
34
+ ? false
35
+ : typeof size === "string" && mapSize[size]
36
+ ? mapSize[size]
37
+ : size;
35
38
 
36
39
  return (
37
40
  <MUIContainer
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import type { Meta, StoryObj } from "@storybook/react";
3
2
  import { DatePicker } from "./DatePicker";
4
3
  import { formControlArgTypes } from "../../../.storybook/commonArgTypes";
@@ -1,10 +1,47 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1
2
  import React from "react";
2
3
  import "./DatePicker.module.css";
3
4
  import { type RecursicaDatePickerProps } from "@recursica/adapter-common";
4
5
 
5
- export type DatePickerProps = React.HTMLAttributes<HTMLDivElement> &
6
- RecursicaDatePickerProps;
6
+ export type DatePickerProps = Omit<
7
+ React.HTMLAttributes<HTMLDivElement>,
8
+ "value" | "onChange" | "defaultValue"
9
+ > &
10
+ RecursicaDatePickerProps & {
11
+ disabled?: boolean;
12
+ label?: React.ReactNode;
13
+ assistiveText?: string;
14
+ error?: React.ReactNode;
15
+ required?: boolean;
16
+ withAsterisk?: boolean;
17
+ placeholder?: string;
18
+ value?: Date | null;
19
+ defaultValue?: Date | null;
20
+ onChange?: (value: Date | null) => void;
21
+ readOnly?: boolean;
22
+ formLayout?: "stacked" | "side-by-side";
23
+ leftSection?: React.ReactNode;
24
+ labelWithEditIcon?: boolean;
25
+ onLabelEditClick?: () => void;
26
+ };
7
27
 
8
- export const DatePicker: React.FC<DatePickerProps> = (props) => {
28
+ export const DatePicker: React.FC<DatePickerProps> = ({
29
+ disabled,
30
+ label,
31
+ assistiveText,
32
+ error,
33
+ required,
34
+ withAsterisk,
35
+ placeholder,
36
+ value,
37
+ defaultValue,
38
+ onChange,
39
+ readOnly,
40
+ formLayout,
41
+ leftSection,
42
+ labelWithEditIcon,
43
+ onLabelEditClick,
44
+ ...props
45
+ }) => {
9
46
  return <div {...props}>DatePicker</div>;
10
47
  };
@@ -42,12 +42,6 @@ const meta: Meta<DropdownStoryProps> = {
42
42
  clearable: {
43
43
  control: "boolean",
44
44
  },
45
- checked: {
46
- table: { disable: true },
47
- },
48
- defaultChecked: {
49
- table: { disable: true },
50
- },
51
45
  containerWidth: {
52
46
  table: { disable: true },
53
47
  },
@@ -25,6 +25,7 @@ export interface RecursicaDropdownProps
25
25
  | "inputProps"
26
26
  | "SelectDisplayProps"
27
27
  | "ref"
28
+ | "error"
28
29
  >,
29
30
  Omit<
30
31
  RecursicaFormControlWrapperProps,
@@ -9,11 +9,15 @@ import styles from "./FormControlWrapper.module.css";
9
9
  import { type RecursicaFormControlWrapperProps as BaseRecursicaFormControlWrapperProps } from "@recursica/adapter-common";
10
10
 
11
11
  export interface RecursicaFormControlWrapperProps
12
- extends Omit<FormControlProps, "margin" | "variant" | "size" | "color">,
12
+ extends Omit<
13
+ FormControlProps,
14
+ "margin" | "variant" | "size" | "color" | "error"
15
+ >,
13
16
  BaseRecursicaFormControlWrapperProps {
14
17
  overStyled?: boolean;
15
18
  label?: React.ReactNode;
16
19
  focused?: boolean;
20
+ error?: React.ReactNode;
17
21
  }
18
22
 
19
23
  export type FormControlWrapperProps = RecursicaFormControlWrapperProps;
@@ -159,7 +159,7 @@ export const RichContent: Story = {
159
159
 
160
160
  <HoverCard.Dropdown>
161
161
  <Group>
162
- <Avatar src={null} alt="User avatar" />
162
+ <Avatar src={undefined} alt="User avatar" />
163
163
  <Stack>
164
164
  <Text>Jane Doe</Text>
165
165
  <Text>Software Engineer at Recursica</Text>
@@ -145,7 +145,7 @@ const InteractiveMenu = ({ children, ...args }: InteractiveMenuProps) => {
145
145
  const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
146
146
  const buttonRef = useRef<HTMLButtonElement>(null);
147
147
 
148
- const open = Boolean(anchorEl) || args.opened;
148
+ const open = Boolean(anchorEl) || Boolean(args.opened);
149
149
 
150
150
  useEffect(() => {
151
151
  if (args.opened && buttonRef.current) {
@@ -21,8 +21,6 @@ const meta: Meta<typeof NumberInput> = {
21
21
  control: "select",
22
22
  options: ["small", "default", "large"],
23
23
  },
24
- checked: { table: { disable: true } },
25
- defaultChecked: { table: { disable: true } },
26
24
  assistiveWithIcon: { table: { disable: true } },
27
25
  labelOptionalText: { table: { disable: true } },
28
26
  labelWithEditIcon: { table: { disable: true } },
@@ -63,6 +63,11 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
63
63
  emptyValueComponent,
64
64
  value,
65
65
  defaultValue,
66
+ leftSection,
67
+ rightSection,
68
+ min,
69
+ max,
70
+ step,
66
71
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
72
  hideControls = false,
68
73
  ...rest
@@ -89,6 +94,18 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
89
94
  ? `${styles.layoutOverride} ${className}`
90
95
  : styles.layoutOverride;
91
96
 
97
+ const startAdornment = leftSection ? (
98
+ <div className={mergedClassNames.section} data-position="left">
99
+ {leftSection}
100
+ </div>
101
+ ) : undefined;
102
+
103
+ const endAdornment = rightSection ? (
104
+ <div className={mergedClassNames.section} data-position="right">
105
+ {rightSection}
106
+ </div>
107
+ ) : undefined;
108
+
92
109
  return (
93
110
  <WithReadOnlyWrapper
94
111
  className={wrapperClass}
@@ -127,6 +144,16 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
127
144
  label={undefined}
128
145
  error={undefined}
129
146
  required={undefined}
147
+ InputProps={{
148
+ startAdornment,
149
+ endAdornment,
150
+ }}
151
+ inputProps={{
152
+ min,
153
+ max,
154
+ step,
155
+ ...(restRecord.inputProps as Record<string, unknown>),
156
+ }}
130
157
  {...(sanitizedProps as unknown as MuiNumberInputProps)}
131
158
  />
132
159
  }
@@ -44,15 +44,17 @@ function usePaginationClassNames(restRecord: Record<string, unknown>): {
44
44
  }
45
45
 
46
46
  const _Pagination = forwardRef<HTMLDivElement, PaginationProps>(
47
- function Pagination(
48
- {
47
+ function Pagination(props, ref) {
48
+ const {
49
49
  overStyled = false,
50
50
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
51
51
  withLabels,
52
+ total,
53
+ withEdges,
54
+ withControls,
52
55
  ...rest
53
- },
54
- ref,
55
- ) {
56
+ } = props;
57
+
56
58
  const sanitizedProps = filterStylingProps(rest, overStyled);
57
59
  const stylingParams = usePaginationClassNames(
58
60
  sanitizedProps as Record<string, unknown>,
@@ -61,6 +63,11 @@ const _Pagination = forwardRef<HTMLDivElement, PaginationProps>(
61
63
  return (
62
64
  <div ref={ref} className={stylingParams.className}>
63
65
  <MuiPagination
66
+ count={total}
67
+ showFirstButton={withEdges}
68
+ showLastButton={withEdges}
69
+ hidePrevButton={withControls === false ? true : undefined}
70
+ hideNextButton={withControls === false ? true : undefined}
64
71
  classes={stylingParams.classNames}
65
72
  {...(sanitizedProps as MuiPaginationProps)}
66
73
  />
@@ -17,7 +17,7 @@ export type StackProps = WithRecursicaSpacing<
17
17
  >;
18
18
 
19
19
  export const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(
20
- { children, gap = "rec-default", ...rest },
20
+ { children, gap = "rec-default", align, justify, ...rest },
21
21
  ref,
22
22
  ) {
23
23
  const safeProps = filterSxProp(rest as Record<string, unknown>);
@@ -27,7 +27,13 @@ export const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(
27
27
  : gap;
28
28
 
29
29
  return (
30
- <MUIStack ref={ref} spacing={resolvedGap} {...safeProps}>
30
+ <MUIStack
31
+ ref={ref}
32
+ spacing={resolvedGap}
33
+ alignItems={align}
34
+ justifyContent={justify}
35
+ {...safeProps}
36
+ >
31
37
  {children}
32
38
  </MUIStack>
33
39
  );
@@ -48,7 +48,7 @@ const InteractiveStepper = (args: React.ComponentProps<typeof Stepper>) => {
48
48
  ];
49
49
 
50
50
  return (
51
- <Flex direction="column" w={600}>
51
+ <Flex direction="column" style={{ width: 600 }}>
52
52
  <Stepper {...args} activeStep={active}>
53
53
  {steps.map((step, index) => (
54
54
  <Step key={index} completed={active > index}>
@@ -125,7 +125,7 @@ const StressTestStepper = (args: React.ComponentProps<typeof Stepper>) => {
125
125
  ];
126
126
 
127
127
  return (
128
- <Flex direction="column" w={600}>
128
+ <Flex direction="column" style={{ width: 600 }}>
129
129
  <Stepper {...args} activeStep={active}>
130
130
  {steps.map((step, index) => (
131
131
  <Step key={index} completed={active > index}>
@@ -43,12 +43,12 @@ const InteractiveTabs = (
43
43
  ) => {
44
44
  const [value, setValue] = useState("gallery");
45
45
 
46
- const handleChange = (event: React.SyntheticEvent, newValue: string) => {
46
+ const handleChange = (_event: React.SyntheticEvent, newValue: string) => {
47
47
  setValue(newValue);
48
48
  };
49
49
 
50
50
  return (
51
- <Flex w={600} h={300}>
51
+ <Flex style={{ width: 600, height: 300 }}>
52
52
  <TabContext value={value}>
53
53
  <Tabs onChange={handleChange} {...args}>
54
54
  <Tab
@@ -24,6 +24,7 @@ export const Tabs = forwardRef<HTMLDivElement, TabsProps>(
24
24
  const {
25
25
  variant = "default",
26
26
  orientation = "horizontal",
27
+ inverted = false,
27
28
  overStyled = false,
28
29
  className,
29
30
  ...rest
@@ -38,6 +39,7 @@ export const Tabs = forwardRef<HTMLDivElement, TabsProps>(
38
39
  className={`${styles.root} ${className || ""}`}
39
40
  data-variant={variant}
40
41
  data-orientation={orientation}
42
+ data-inverted={inverted || undefined}
41
43
  classes={{
42
44
  flexContainer: styles.list,
43
45
  indicator: styles.indicator,
@@ -26,6 +26,7 @@ export interface RecursicaTextAreaProps
26
26
  | "maxRows"
27
27
  | "minRows"
28
28
  | "classes"
29
+ | "error"
29
30
  >,
30
31
  Omit<
31
32
  RecursicaFormControlWrapperProps,
@@ -14,7 +14,12 @@ import { type RecursicaTextFieldProps as BaseRecursicaTextFieldProps } from "@re
14
14
  export interface RecursicaTextFieldProps
15
15
  extends Omit<
16
16
  InputBaseProps,
17
- "color" | "size" | "startAdornment" | "endAdornment" | "autoComplete"
17
+ | "color"
18
+ | "size"
19
+ | "startAdornment"
20
+ | "endAdornment"
21
+ | "autoComplete"
22
+ | "error"
18
23
  >,
19
24
  Omit<
20
25
  React.ComponentPropsWithoutRef<"input">,
@@ -29,11 +29,13 @@ export const TimelineItem = React.forwardRef<HTMLDivElement, TimelineItemProps>(
29
29
  overStyled = false,
30
30
  timestamp,
31
31
  bulletVariant = "default",
32
+ bullet,
32
33
  children,
33
34
  ...rest
34
35
  },
35
36
  ref,
36
37
  ) {
38
+ void bullet;
37
39
  const sanitizedProps = filterStylingProps(rest, overStyled);
38
40
 
39
41
  const mergedClassNames: Partial<Record<string, string>> = {
@@ -0,0 +1,43 @@
1
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_border-radius */
2
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_border-size */
3
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_button-node-gap */
4
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_horizontal-padding */
5
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_indent */
6
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_item-gap */
7
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_max-width */
8
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_font-family */
9
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_font-size */
10
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_font-style */
11
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_font-weight */
12
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_letter-spacing */
13
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_line-height */
14
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_text-decoration */
15
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_selected-text_text-transform */
16
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_font-family */
17
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_font-size */
18
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_font-style */
19
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_font-weight */
20
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_letter-spacing */
21
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_line-height */
22
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_text-decoration */
23
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_unselected-text_text-transform */
24
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_vertical-padding */
25
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_hover-background */
26
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_hover-border-color */
27
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_hover-text */
28
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_selected-background */
29
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_selected-border-color */
30
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_selected-text */
31
+ /* recursica-ignore: --recursica_ui-kit_components_tree_properties_colors_unselected-text */
32
+
33
+ .root {
34
+ box-sizing: border-box;
35
+ font-family: sans-serif;
36
+ padding: 24px;
37
+ border: 1px dashed #ccc;
38
+ border-radius: 8px;
39
+ color: #666;
40
+ text-align: center;
41
+ font-weight: 500;
42
+ background-color: #fafafa;
43
+ }
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Tree } from "./Tree";
3
+
4
+ const meta: Meta<typeof Tree> = {
5
+ title: "Components/Tree",
6
+ component: Tree,
7
+ };
8
+
9
+ export default meta;
10
+ type Story = StoryObj<typeof Tree>;
11
+
12
+ export const ComingSoon: Story = {
13
+ args: {},
14
+ };
@@ -0,0 +1,24 @@
1
+ import React, { forwardRef } from "react";
2
+ import { type RecursicaOverStyled } from "../../utils/filterStylingProps";
3
+ import styles from "./Tree.module.css";
4
+
5
+ export interface TreeProps extends React.ComponentPropsWithoutRef<"div"> {
6
+ overStyled?: boolean;
7
+ }
8
+
9
+ /**
10
+ * Placeholder component for Tree (Coming Soon).
11
+ */
12
+ export const Tree = forwardRef<HTMLDivElement, RecursicaOverStyled<TreeProps>>(
13
+ function Tree({ overStyled: _overStyled = false, className, ...rest }, ref) {
14
+ void _overStyled;
15
+ const finalClass = className ? `${styles.root} ${className}` : styles.root;
16
+ return (
17
+ <div ref={ref} className={finalClass} {...rest}>
18
+ Tree (Coming Soon)
19
+ </div>
20
+ );
21
+ },
22
+ );
23
+
24
+ Tree.displayName = "Tree";
@@ -0,0 +1 @@
1
+ export * from "./Tree";
@@ -46,3 +46,4 @@ export * from "./Toast";
46
46
  export * from "./Tooltip";
47
47
  export * from "./TransferList";
48
48
  export * from "./Typography";
49
+ export * from "./Tree";
package/src/index.ts CHANGED
@@ -169,6 +169,9 @@ export const Tooltip = wrapComponent(
169
169
  export const TransferList = wrapComponent(
170
170
  rawComponents.TransferList,
171
171
  ) as typeof rawComponents.TransferList;
172
+ export const Tree = wrapComponent(
173
+ rawComponents.Tree,
174
+ ) as typeof rawComponents.Tree;
172
175
 
173
176
  export type {
174
177
  RecursicaAutocompleteProps,