@ceed/ads 0.0.43 → 0.0.44

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.
@@ -1,8 +1,26 @@
1
1
  import React from "react";
2
- import { InputProps } from "@mui/joy";
3
- import { MotionProps } from "framer-motion";
2
+ import { type InputProps } from "@mui/joy";
3
+ import { type MotionProps } from "framer-motion";
4
4
  declare const Input: {
5
- (props: InputProps & MotionProps): React.JSX.Element;
5
+ (props: {
6
+ label?: string | undefined;
7
+ helperText?: React.ReactNode;
8
+ error?: boolean | undefined;
9
+ } & {
10
+ component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
11
+ } & Pick<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "autoFocus" | "id" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "onClick" | "disabled" | "type" | "name" | "value" | "readOnly" | "required" | "autoComplete" | "placeholder"> & {
12
+ className?: string | undefined;
13
+ color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").InputPropsColorOverrides> | undefined;
14
+ endDecorator?: React.ReactNode;
15
+ error?: boolean | undefined;
16
+ fullWidth?: boolean | undefined;
17
+ startDecorator?: React.ReactNode;
18
+ size?: import("@mui/types").OverridableStringUnion<"sm" | "md" | "lg", import("@mui/joy").InputPropsSizeOverrides> | undefined;
19
+ sx?: import("@mui/joy/styles/types").SxProps | undefined;
20
+ variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").InputPropsVariantOverrides> | undefined;
21
+ } & import("@mui/joy").InputSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
23
+ }, "color" | "defaultValue" | "autoFocus" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "onClick" | "variant" | "sx" | "disabled" | "size" | "component" | "type" | "endDecorator" | "fullWidth" | "startDecorator" | "name" | "value" | "readOnly" | "required" | "autoComplete" | "placeholder" | "error" | keyof import("@mui/joy").InputSlotsAndSlotProps> & MotionProps): React.JSX.Element;
6
24
  displayName: string;
7
25
  };
8
26
  export { Input };
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mui/base").ModalOwnProps, "children" | "container" | "open" | "disablePortal" | "keepMounted" | "disableAutoFocus" | "disableEnforceFocus" | "disableRestoreFocus" | "disableEscapeKeyDown" | "disableScrollLock" | "hideBackdrop"> & {
3
- onClose?: ((event: {}, reason: "escapeKeyDown" | "backdropClick" | "closeClick") => void) | undefined;
3
+ onClose?: ((event: {}, reason: "backdropClick" | "escapeKeyDown" | "closeClick") => void) | undefined;
4
4
  sx?: import("@mui/joy/styles/types").SxProps | undefined;
5
5
  } & import("@mui/joy").ModalSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
6
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
@@ -1,17 +1,6 @@
1
1
  import React from "react";
2
- declare const Select: import("framer-motion").CustomDomComponent<{
3
- multiple?: boolean | undefined;
4
- } & import("@mui/joy").SelectStaticProps & import("@mui/joy").SelectSlotsAndSlotProps<boolean> & {
5
- defaultValue?: {} | {}[] | null | undefined;
6
- multiple?: boolean | undefined;
7
- getSerializedValue?: ((option: import("@mui/joy").SelectOption<{}> | import("@mui/joy").SelectOption<{}>[] | null) => string | number | readonly string[] | undefined) | undefined;
8
- onChange?: ((event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element> | React.FocusEvent<Element, Element> | null, value: {} | {}[] | null) => void) | undefined;
9
- renderValue?: ((option: import("@mui/joy").SelectOption<{}> | import("@mui/joy").SelectOption<{}>[] | null) => React.ReactNode) | undefined;
10
- value?: {} | {}[] | null | undefined;
11
- } & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
12
- ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
13
- }, "defaultValue" | "onChange" | "value" | "multiple" | keyof import("@mui/joy").SelectStaticProps | keyof import("@mui/joy").SelectSlotsAndSlotProps<Multiple> | "getSerializedValue" | "renderValue">>;
14
- export { Select };
2
+ import { type SelectProps } from "@mui/joy";
3
+ import { type MotionProps } from "framer-motion";
15
4
  declare const Option: import("framer-motion").CustomDomComponent<{
16
5
  color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").OptionPropsColorOverrides> | undefined;
17
6
  children?: React.ReactNode;
@@ -24,3 +13,12 @@ declare const Option: import("framer-motion").CustomDomComponent<{
24
13
  ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
25
14
  }, "label" | "children" | "color" | "variant" | "sx" | "disabled" | "value" | keyof import("@mui/joy").OptionSlotsAndSlotProps>>;
26
15
  export { Option };
16
+ declare function Select<OptionValue extends {}, Multiple extends boolean = false>(props: {
17
+ label?: string;
18
+ helperText?: string;
19
+ error?: boolean;
20
+ } & SelectProps<OptionValue, Multiple> & MotionProps): React.JSX.Element;
21
+ declare namespace Select {
22
+ var displayName: string;
23
+ }
24
+ export { Select };
package/dist/index.js CHANGED
@@ -1401,11 +1401,17 @@ import { Popper } from "@mui/base/Popper";
1401
1401
 
1402
1402
  // src/components/Input/Input.tsx
1403
1403
  import React11 from "react";
1404
- import { Input as JoyInput } from "@mui/joy";
1404
+ import {
1405
+ Input as JoyInput,
1406
+ FormControl,
1407
+ FormLabel,
1408
+ FormHelperText
1409
+ } from "@mui/joy";
1405
1410
  import { motion as motion10 } from "framer-motion";
1406
1411
  var MotionInput = motion10(JoyInput);
1407
1412
  var Input = (props) => {
1408
- return /* @__PURE__ */ React11.createElement(MotionInput, { ...props });
1413
+ const { label, helperText, error, style, ...innerProps } = props;
1414
+ return /* @__PURE__ */ React11.createElement(FormControl, { error }, label && /* @__PURE__ */ React11.createElement(FormLabel, null, label), /* @__PURE__ */ React11.createElement(MotionInput, { ...innerProps }), helperText && /* @__PURE__ */ React11.createElement(FormHelperText, null, helperText));
1409
1415
  };
1410
1416
  Input.displayName = "Input";
1411
1417
 
@@ -1426,21 +1432,21 @@ var DialogActions_default = DialogActions;
1426
1432
  import { FormControl as JoyFormControl } from "@mui/joy";
1427
1433
  import { motion as motion12 } from "framer-motion";
1428
1434
  var MotionFormControl = motion12(JoyFormControl);
1429
- var FormControl = MotionFormControl;
1430
- FormControl.displayName = "FormControl";
1435
+ var FormControl2 = MotionFormControl;
1436
+ FormControl2.displayName = "FormControl";
1431
1437
 
1432
1438
  // src/components/FormControl/index.ts
1433
- var FormControl_default = FormControl;
1439
+ var FormControl_default = FormControl2;
1434
1440
 
1435
1441
  // src/components/FormLabel/FormLabel.tsx
1436
1442
  import { FormLabel as JoyFormLabel } from "@mui/joy";
1437
1443
  import { motion as motion13 } from "framer-motion";
1438
1444
  var MotionFormLabel = motion13(JoyFormLabel);
1439
- var FormLabel = MotionFormLabel;
1440
- FormLabel.displayName = "FormLabel";
1445
+ var FormLabel2 = MotionFormLabel;
1446
+ FormLabel2.displayName = "FormLabel";
1441
1447
 
1442
1448
  // src/components/FormLabel/index.ts
1443
- var FormLabel_default = FormLabel;
1449
+ var FormLabel_default = FormLabel2;
1444
1450
 
1445
1451
  // src/components/DatePicker/DatePicker.tsx
1446
1452
  var StyledPopper = styled3(Popper, {
@@ -1905,8 +1911,8 @@ Dropdown.displayName = "Dropdown";
1905
1911
  import { FormHelperText as JoyFormHelperText } from "@mui/joy";
1906
1912
  import { motion as motion20 } from "framer-motion";
1907
1913
  var MotionFormHelperText = motion20(JoyFormHelperText);
1908
- var FormHelperText = MotionFormHelperText;
1909
- FormHelperText.displayName = "FormHelperText";
1914
+ var FormHelperText2 = MotionFormHelperText;
1915
+ FormHelperText2.displayName = "FormHelperText";
1910
1916
 
1911
1917
  // src/components/Grid/Grid.tsx
1912
1918
  import { Grid as JoyGrid } from "@mui/joy";
@@ -1958,17 +1964,27 @@ function RadioList(props) {
1958
1964
  RadioList.displayName = "RadioList";
1959
1965
 
1960
1966
  // src/components/Select/Select.tsx
1961
- import { Select as JoySelect, Option as JoyOption } from "@mui/joy";
1967
+ import React20 from "react";
1968
+ import {
1969
+ Select as JoySelect,
1970
+ Option as JoyOption,
1971
+ FormControl as FormControl3,
1972
+ FormLabel as FormLabel3,
1973
+ FormHelperText as FormHelperText3
1974
+ } from "@mui/joy";
1962
1975
  import { motion as motion24 } from "framer-motion";
1963
1976
  var MotionSelect = motion24(JoySelect);
1964
- var Select = MotionSelect;
1965
- Select.displayName = "Select";
1966
1977
  var MotionOption = motion24(JoyOption);
1967
1978
  var Option = MotionOption;
1968
1979
  Option.displayName = "Option";
1980
+ function Select(props) {
1981
+ const { label, helperText, error, ...innerProps } = props;
1982
+ return /* @__PURE__ */ React20.createElement(FormControl3, { error }, label && /* @__PURE__ */ React20.createElement(FormLabel3, null, label), /* @__PURE__ */ React20.createElement(JoySelect, { ...innerProps }), helperText && /* @__PURE__ */ React20.createElement(FormHelperText3, null, helperText));
1983
+ }
1984
+ Select.displayName = "Select";
1969
1985
 
1970
1986
  // src/components/Switch/Switch.tsx
1971
- import React20 from "react";
1987
+ import React21 from "react";
1972
1988
  import {
1973
1989
  Switch as JoySwitch,
1974
1990
  styled as styled5,
@@ -1994,14 +2010,14 @@ var StyledThumb = styled5(motion25.div)({
1994
2010
  right: "var(--Switch-thumbOffset)"
1995
2011
  }
1996
2012
  });
1997
- var Thumb = (props) => /* @__PURE__ */ React20.createElement(StyledThumb, { ...props, layout: true, transition: spring });
2013
+ var Thumb = (props) => /* @__PURE__ */ React21.createElement(StyledThumb, { ...props, layout: true, transition: spring });
1998
2014
  var spring = {
1999
2015
  type: "spring",
2000
2016
  stiffness: 700,
2001
2017
  damping: 30
2002
2018
  };
2003
2019
  var Switch = (props) => {
2004
- return /* @__PURE__ */ React20.createElement(
2020
+ return /* @__PURE__ */ React21.createElement(
2005
2021
  MotionSwitch,
2006
2022
  {
2007
2023
  ...props,
@@ -2031,17 +2047,17 @@ var TabPanel = MotionTabPanel;
2031
2047
  TabPanel.displayName = "TabPanel";
2032
2048
 
2033
2049
  // src/components/Textarea/Textarea.tsx
2034
- import React21 from "react";
2050
+ import React22 from "react";
2035
2051
  import { Textarea as JoyTextarea } from "@mui/joy";
2036
2052
  import { motion as motion27 } from "framer-motion";
2037
2053
  var MotionTextarea = motion27(JoyTextarea);
2038
2054
  var Textarea = (props) => {
2039
- return /* @__PURE__ */ React21.createElement(MotionTextarea, { ...props });
2055
+ return /* @__PURE__ */ React22.createElement(MotionTextarea, { ...props });
2040
2056
  };
2041
2057
  Textarea.displayName = "Textarea";
2042
2058
 
2043
2059
  // src/components/ThemeProvider/ThemeProvider.tsx
2044
- import React22 from "react";
2060
+ import React23 from "react";
2045
2061
  import {
2046
2062
  CssBaseline,
2047
2063
  CssVarsProvider,
@@ -2088,17 +2104,17 @@ var defaultTheme = extendTheme({
2088
2104
  }
2089
2105
  });
2090
2106
  function ThemeProvider(props) {
2091
- return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React22.createElement(CssBaseline, null), props.children));
2107
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(CssVarsProvider, { theme: defaultTheme }, /* @__PURE__ */ React23.createElement(CssBaseline, null), props.children));
2092
2108
  }
2093
2109
  ThemeProvider.displayName = "ThemeProvider";
2094
2110
 
2095
2111
  // src/components/Tooltip/Tooltip.tsx
2096
- import React23 from "react";
2112
+ import React24 from "react";
2097
2113
  import { Tooltip as JoyTooltip } from "@mui/joy";
2098
2114
  import { motion as motion28 } from "framer-motion";
2099
2115
  var MotionTooltip = motion28(JoyTooltip);
2100
2116
  var Tooltip = (props) => {
2101
- return /* @__PURE__ */ React23.createElement(MotionTooltip, { ...props });
2117
+ return /* @__PURE__ */ React24.createElement(MotionTooltip, { ...props });
2102
2118
  };
2103
2119
  Tooltip.displayName = "Tooltip";
2104
2120
  export {
@@ -2136,9 +2152,9 @@ export {
2136
2152
  Divider,
2137
2153
  Drawer,
2138
2154
  Dropdown,
2139
- FormControl,
2140
- FormHelperText,
2141
- FormLabel,
2155
+ FormControl2 as FormControl,
2156
+ FormHelperText2 as FormHelperText,
2157
+ FormLabel2 as FormLabel,
2142
2158
  Grid,
2143
2159
  IconButton,
2144
2160
  Input,