@recursica/mui-adapter 0.10.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 (68) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/mui-adapter.cjs +30 -20
  3. package/dist/mui-adapter.cjs.map +1 -1
  4. package/dist/mui-adapter.css +1 -1
  5. package/dist/mui-adapter.js +2840 -2484
  6. package/dist/mui-adapter.js.map +1 -1
  7. package/dist/src/components/Avatar/Avatar.d.ts +16 -1
  8. package/dist/src/components/Badge/Badge.d.ts +16 -1
  9. package/dist/src/components/Card/Card.d.ts +36 -1
  10. package/dist/src/components/DatePicker/DatePicker.d.ts +17 -1
  11. package/dist/src/components/Dropdown/Dropdown.d.ts +1 -1
  12. package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +2 -1
  13. package/dist/src/components/Radio/index.d.ts +1 -0
  14. package/dist/src/components/Switch/Switch.d.ts +1 -1
  15. package/dist/src/components/Switch/index.d.ts +1 -0
  16. package/dist/src/components/TextArea/TextArea.d.ts +1 -1
  17. package/dist/src/components/TextField/TextField.d.ts +1 -1
  18. package/dist/src/components/Timeline/index.d.ts +1 -0
  19. package/dist/src/components/Tree/Tree.d.ts +9 -0
  20. package/dist/src/components/Tree/index.d.ts +1 -0
  21. package/dist/src/components/Typography/index.d.ts +1 -0
  22. package/dist/src/components/index.d.ts +2 -0
  23. package/dist/src/index.d.ts +85 -1
  24. package/package.json +2 -2
  25. package/src/OverStyling.tsx +63 -2
  26. package/src/components/Accordion/Accordion.tsx +8 -6
  27. package/src/components/Autocomplete/Autocomplete.tsx +2 -0
  28. package/src/components/Avatar/Avatar.tsx +2 -2
  29. package/src/components/Badge/Badge.tsx +1 -1
  30. package/src/components/Card/Card.tsx +4 -2
  31. package/src/components/Checkbox/Checkbox.tsx +6 -1
  32. package/src/components/Checkbox/CheckboxGroup.tsx +1 -0
  33. package/src/components/Container/Container.tsx +6 -3
  34. package/src/components/DatePicker/DatePicker.stories.tsx +0 -1
  35. package/src/components/DatePicker/DatePicker.tsx +40 -3
  36. package/src/components/Dropdown/Dropdown.stories.tsx +0 -6
  37. package/src/components/Dropdown/Dropdown.tsx +9 -2
  38. package/src/components/FormControlWrapper/FormControlWrapper.tsx +5 -1
  39. package/src/components/HoverCard/HoverCard.stories.tsx +1 -1
  40. package/src/components/HoverCard/HoverCard.tsx +7 -4
  41. package/src/components/Menu/Menu.stories.tsx +15 -9
  42. package/src/components/Modal/Modal.tsx +11 -4
  43. package/src/components/NumberInput/NumberInput.stories.tsx +0 -2
  44. package/src/components/NumberInput/NumberInput.tsx +27 -0
  45. package/src/components/Pagination/Pagination.tsx +12 -5
  46. package/src/components/Radio/Radio.tsx +1 -0
  47. package/src/components/Radio/index.ts +1 -0
  48. package/src/components/SegmentedControl/SegmentedControl.tsx +5 -1
  49. package/src/components/Slider/Slider.tsx +12 -4
  50. package/src/components/Stack/Stack.tsx +8 -2
  51. package/src/components/Stepper/Stepper.stories.tsx +2 -2
  52. package/src/components/Stepper/Stepper.tsx +1 -0
  53. package/src/components/Switch/Switch.tsx +2 -1
  54. package/src/components/Switch/index.ts +1 -0
  55. package/src/components/Table/Table.tsx +1 -1
  56. package/src/components/Tabs/Tabs.stories.tsx +2 -2
  57. package/src/components/Tabs/Tabs.tsx +2 -0
  58. package/src/components/TextArea/TextArea.tsx +10 -1
  59. package/src/components/TextField/TextField.tsx +8 -1
  60. package/src/components/Timeline/TimelineItem.tsx +2 -0
  61. package/src/components/Timeline/index.ts +1 -0
  62. package/src/components/Tree/Tree.module.css +43 -0
  63. package/src/components/Tree/Tree.stories.tsx +14 -0
  64. package/src/components/Tree/Tree.tsx +24 -0
  65. package/src/components/Tree/index.ts +1 -0
  66. package/src/components/Typography/index.ts +1 -0
  67. package/src/components/index.ts +2 -0
  68. package/src/index.ts +172 -1
@@ -18,7 +18,14 @@ import { type RecursicaDropdownProps as BaseRecursicaDropdownProps } from "@recu
18
18
  export interface RecursicaDropdownProps
19
19
  extends Omit<
20
20
  MuiSelectProps,
21
- "size" | "variant" | "classes" | "inputProps" | "SelectDisplayProps"
21
+ | keyof React.HTMLAttributes<HTMLDivElement>
22
+ | "size"
23
+ | "variant"
24
+ | "classes"
25
+ | "inputProps"
26
+ | "SelectDisplayProps"
27
+ | "ref"
28
+ | "error"
22
29
  >,
23
30
  Omit<
24
31
  RecursicaFormControlWrapperProps,
@@ -160,7 +167,7 @@ export const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
160
167
  inputProps={{
161
168
  "data-disabled": disabled ? "true" : undefined,
162
169
  "data-error": error ? "true" : undefined,
163
- ...(restRecord.inputProps as any),
170
+ ...(restRecord.inputProps as Record<string, unknown>),
164
171
  }}
165
172
  {...(sanitizedProps as unknown as MuiSelectProps)}
166
173
  >
@@ -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>
@@ -63,7 +63,10 @@ const HoverCardBase = function HoverCard({
63
63
 
64
64
  React.Children.forEach(children, (child) => {
65
65
  if (isValidElement(child)) {
66
- const childElement = child as any;
66
+ const childElement = child as unknown as {
67
+ type?: { displayName?: string };
68
+ props: { children?: React.ReactNode };
69
+ };
67
70
  if (childElement.type?.displayName === "HoverCardTarget") {
68
71
  targetNode = childElement.props.children;
69
72
  } else if (childElement.type?.displayName === "HoverCardDropdown") {
@@ -83,7 +86,7 @@ const HoverCardBase = function HoverCard({
83
86
  return (
84
87
  <MuiTooltip
85
88
  title={dropdownNode}
86
- placement={position as any}
89
+ placement={position as unknown as MuiTooltipProps["placement"]}
87
90
  arrow={withBeak}
88
91
  enterDelay={openDelay}
89
92
  leaveDelay={closeDelay}
@@ -100,8 +103,8 @@ const HoverCardBase = function HoverCard({
100
103
  ],
101
104
  },
102
105
  }}
103
- classes={mergedClassNames as any}
104
- {...(sanitizedProps as any)}
106
+ classes={mergedClassNames as unknown as MuiTooltipProps["classes"]}
107
+ {...(sanitizedProps as unknown as Record<string, unknown>)}
105
108
  >
106
109
  {/* Tooltip requires a single valid React element child that accepts a ref */}
107
110
  {isValidElement(targetNode) ? targetNode : <span>{targetNode}</span>}
@@ -13,7 +13,7 @@ import { Menu, MenuItem, MenuDivider } from "./Menu";
13
13
  import { Button } from "../Button";
14
14
  import { ListSubheader } from "@mui/material";
15
15
 
16
- const SettingsIcon = (props: any) => (
16
+ const SettingsIcon = (props: React.ComponentProps<"svg">) => (
17
17
  <svg
18
18
  xmlns="http://www.w3.org/2000/svg"
19
19
  width="14"
@@ -31,7 +31,7 @@ const SettingsIcon = (props: any) => (
31
31
  </svg>
32
32
  );
33
33
 
34
- const SearchIcon = (props: any) => (
34
+ const SearchIcon = (props: React.ComponentProps<"svg">) => (
35
35
  <svg
36
36
  xmlns="http://www.w3.org/2000/svg"
37
37
  width="14"
@@ -49,7 +49,7 @@ const SearchIcon = (props: any) => (
49
49
  </svg>
50
50
  );
51
51
 
52
- const MessageIcon = (props: any) => (
52
+ const MessageIcon = (props: React.ComponentProps<"svg">) => (
53
53
  <svg
54
54
  xmlns="http://www.w3.org/2000/svg"
55
55
  width="14"
@@ -66,7 +66,7 @@ const MessageIcon = (props: any) => (
66
66
  </svg>
67
67
  );
68
68
 
69
- const ImageIcon = (props: any) => (
69
+ const ImageIcon = (props: React.ComponentProps<"svg">) => (
70
70
  <svg
71
71
  xmlns="http://www.w3.org/2000/svg"
72
72
  width="14"
@@ -85,7 +85,7 @@ const ImageIcon = (props: any) => (
85
85
  </svg>
86
86
  );
87
87
 
88
- const TrashIcon = (props: any) => (
88
+ const TrashIcon = (props: React.ComponentProps<"svg">) => (
89
89
  <svg
90
90
  xmlns="http://www.w3.org/2000/svg"
91
91
  width="14"
@@ -103,7 +103,7 @@ const TrashIcon = (props: any) => (
103
103
  </svg>
104
104
  );
105
105
 
106
- const ArrowsIcon = (props: any) => (
106
+ const ArrowsIcon = (props: React.ComponentProps<"svg">) => (
107
107
  <svg
108
108
  xmlns="http://www.w3.org/2000/svg"
109
109
  width="14"
@@ -123,7 +123,7 @@ const ArrowsIcon = (props: any) => (
123
123
  </svg>
124
124
  );
125
125
 
126
- type MenuStoryArgs = Record<string, any>;
126
+ type MenuStoryArgs = Record<string, unknown>;
127
127
 
128
128
  const meta: Meta = {
129
129
  title: "UI-Kit/Menu",
@@ -135,11 +135,17 @@ export default meta;
135
135
 
136
136
  type Story = StoryObj<MenuStoryArgs>;
137
137
 
138
- const InteractiveMenu = ({ children, openDelay, ...args }: any) => {
138
+ interface InteractiveMenuProps {
139
+ children?: React.ReactNode;
140
+ opened?: boolean;
141
+ [key: string]: unknown;
142
+ }
143
+
144
+ const InteractiveMenu = ({ children, ...args }: InteractiveMenuProps) => {
139
145
  const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
140
146
  const buttonRef = useRef<HTMLButtonElement>(null);
141
147
 
142
- const open = Boolean(anchorEl) || args.opened;
148
+ const open = Boolean(anchorEl) || Boolean(args.opened);
143
149
 
144
150
  useEffect(() => {
145
151
  if (args.opened && buttonRef.current) {
@@ -65,7 +65,8 @@ const ModalRoot = forwardRef<HTMLDivElement, ModalProps>(function ModalRoot(
65
65
  if (
66
66
  React.isValidElement(child) &&
67
67
  (child.type === ModalFooter ||
68
- (child.type as any)?.displayName === "Modal.Footer")
68
+ (child.type as unknown as { displayName?: string })?.displayName ===
69
+ "Modal.Footer")
69
70
  ) {
70
71
  footer = child;
71
72
  } else {
@@ -81,7 +82,11 @@ const ModalRoot = forwardRef<HTMLDivElement, ModalProps>(function ModalRoot(
81
82
  paper: styles.inner,
82
83
  }}
83
84
  {...(sanitizedProps as MuiDialogProps)}
84
- open={opened || (sanitizedProps as any).open}
85
+ open={
86
+ opened ||
87
+ ((sanitizedProps as Record<string, unknown>).open as boolean) ||
88
+ false
89
+ }
85
90
  onClose={onClose}
86
91
  >
87
92
  {(title || withCloseButton) && (
@@ -117,6 +122,7 @@ const ModalTitle = forwardRef<HTMLDivElement, ModalTitleProps>(
117
122
 
118
123
  return (
119
124
  <MuiDialogTitle
125
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
120
126
  ref={ref as any}
121
127
  className={`${styles.title} ${className || ""}`}
122
128
  {...(sanitizedProps as MuiDialogTitleProps)}
@@ -159,10 +165,10 @@ const ModalBody = forwardRef<HTMLDivElement, ModalBodyProps>(function ModalBody(
159
165
  return (
160
166
  <MuiDialogContent
161
167
  ref={(node) => {
162
- if (typeof ref === "function") ref(node as any);
168
+ if (typeof ref === "function") ref(node as HTMLDivElement);
163
169
  else if (ref)
164
170
  (ref as React.MutableRefObject<HTMLDivElement | null>).current =
165
- node as any;
171
+ node as HTMLDivElement;
166
172
  if (internalRef)
167
173
  (
168
174
  internalRef as React.MutableRefObject<HTMLDivElement | null>
@@ -193,6 +199,7 @@ const ModalFooter = forwardRef<HTMLDivElement, ModalFooterProps>(
193
199
 
194
200
  return (
195
201
  <MuiDialogActions
202
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
196
203
  ref={ref as any}
197
204
  className={`${styles.footer} ${className || ""}`}
198
205
  {...(sanitizedProps as MuiDialogActionsProps)}
@@ -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
  />
@@ -147,6 +147,7 @@ export const Radio = forwardRef<HTMLInputElement, RadioProps>(
147
147
  // We omit Mui's sizing/coloring so we rely strictly on variables from Radio.module.css
148
148
  const radioNode = (
149
149
  <MuiRadio
150
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
151
  ref={ref as any}
151
152
  icon={<RadioIcon />}
152
153
  checkedIcon={<RadioIcon className={styles.checked} />}
@@ -1 +1,2 @@
1
1
  export * from "./Radio";
2
+ export * from "./RadioGroup";
@@ -108,7 +108,11 @@ const _SegmentedControl = forwardRef<HTMLDivElement, SegmentedControlProps>(
108
108
  data-orientation={orientation}
109
109
  exclusive
110
110
  value={value}
111
- onChange={handleChange as any}
111
+ onChange={
112
+ handleChange as React.ComponentProps<
113
+ typeof MuiSegmentedControl
114
+ >["onChange"]
115
+ }
112
116
  {...(sanitizedProps as Omit<
113
117
  MuiSegmentedControlProps,
114
118
  "variant" | "size" | "value" | "onChange"
@@ -129,7 +129,7 @@ export const Slider = forwardRef<HTMLDivElement, SliderProps>(
129
129
  if (!isNaN(parsed)) {
130
130
  // Clamp input value to bounds
131
131
  const clamped = Math.max(min, Math.min(max, parsed));
132
- handleValueChange(null as any, clamped);
132
+ handleValueChange(null as unknown as Event, clamped);
133
133
  }
134
134
  };
135
135
 
@@ -211,7 +211,7 @@ export const Slider = forwardRef<HTMLDivElement, SliderProps>(
211
211
  label={label}
212
212
  assistiveText={assistiveText}
213
213
  assistiveWithIcon={assistiveWithIcon}
214
- error={error as any}
214
+ error={!!error}
215
215
  required={required}
216
216
  id={id}
217
217
  readOnly={readOnly}
@@ -239,14 +239,22 @@ export const Slider = forwardRef<HTMLDivElement, SliderProps>(
239
239
  disabled={disabled}
240
240
  value={resolvedValue}
241
241
  onChange={handleValueChange}
242
- onChangeCommitted={onChangeEnd as any}
242
+ onChangeCommitted={
243
+ onChangeEnd as unknown as (
244
+ event: Event | React.SyntheticEvent,
245
+ value: number | number[],
246
+ ) => void
247
+ }
243
248
  min={min}
244
249
  max={max}
245
250
  step={step}
246
251
  valueLabelDisplay={tooltipLabel === null ? "off" : "auto"}
247
252
  valueLabelFormat={
248
253
  typeof tooltipLabel === "function"
249
- ? (tooltipLabel as any)
254
+ ? (tooltipLabel as unknown as (
255
+ value: number,
256
+ index: number,
257
+ ) => React.ReactNode)
250
258
  : undefined
251
259
  }
252
260
  {...(sanitizedProps as unknown as MuiSliderProps)}
@@ -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}>
@@ -46,6 +46,7 @@ export const Stepper = forwardRef<HTMLDivElement, StepperProps>(
46
46
  data-orientation={orientation}
47
47
  >
48
48
  <MuiStepper
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
50
  ref={ref as any}
50
51
  orientation={orientation}
51
52
  connector={
@@ -37,7 +37,7 @@ export type RecursicaSwitchPropsAlias =
37
37
 
38
38
  export type SwitchProps = RecursicaOverStyled<RecursicaSwitchPropsAlias>;
39
39
 
40
- type SwitchComponent = any;
40
+ type SwitchComponent = React.ComponentType<SwitchProps>;
41
41
 
42
42
  export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
43
43
  function Switch(props, ref) {
@@ -137,6 +137,7 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
137
137
  // We omit Mui's sizing/coloring so we rely strictly on variables from Switch.module.css
138
138
  const switchNode = (
139
139
  <MuiSwitch
140
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
140
141
  ref={ref as any}
141
142
  className={!label ? `${finalClass} ${styles.inner}` : styles.inner}
142
143
  classes={mergedClassNames}
@@ -1 +1,2 @@
1
1
  export * from "./Switch";
2
+ export * from "./SwitchGroup";
@@ -22,7 +22,7 @@ export type TableProps = RecursicaOverStyled<
22
22
  >;
23
23
 
24
24
  const TableBase = forwardRef<HTMLTableElement, TableProps>(function Table(
25
- { overStyled = false, className, ...rest },
25
+ { overStyled = false, ...rest },
26
26
  ref,
27
27
  ) {
28
28
  const sanitizedProps = filterStylingProps(rest, overStyled);
@@ -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,
@@ -18,7 +18,15 @@ import { type RecursicaTextAreaProps as BaseRecursicaTextAreaProps } from "@recu
18
18
  export interface RecursicaTextAreaProps
19
19
  extends Omit<
20
20
  MuiTextareaProps,
21
- "size" | "variant" | "radius" | "wrapperProps" | "maxRows" | "minRows"
21
+ | keyof React.HTMLAttributes<HTMLDivElement>
22
+ | "size"
23
+ | "variant"
24
+ | "radius"
25
+ | "wrapperProps"
26
+ | "maxRows"
27
+ | "minRows"
28
+ | "classes"
29
+ | "error"
22
30
  >,
23
31
  Omit<
24
32
  RecursicaFormControlWrapperProps,
@@ -122,6 +130,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
122
130
  /* Naked Input execution safely decoupled from Mui's macro Input.Wrapper DOM hooks */
123
131
  <MuiTextarea
124
132
  multiline
133
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
125
134
  inputRef={ref as any}
126
135
  classes={mergedClassNames}
127
136
  disabled={disabled}
@@ -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">,
@@ -137,7 +142,9 @@ export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
137
142
  required={required}
138
143
  id={id}
139
144
  readOnly={readOnly}
145
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
140
146
  readOnlyComponent={readOnlyComponent as any}
147
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
141
148
  emptyValueComponent={(emptyValueComponent as any) || undefined}
142
149
  readOnlyType="text"
143
150
  readOnlyValue={value !== undefined ? value : defaultValue}
@@ -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>> = {
@@ -1 +1,2 @@
1
1
  export * from "./Timeline";
2
+ export * from "./TimelineItem";
@@ -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";
@@ -0,0 +1 @@
1
+ export * from "./Typography";