@groupeactual/ui-kit 0.2.0 → 0.2.1

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 (72) hide show
  1. package/dist/cjs/{material-ui-components → components}/Accordion/Accordion.d.ts +0 -0
  2. package/dist/cjs/{material-ui-components → components}/Accordion/index.d.ts +0 -0
  3. package/dist/cjs/components/Button/Button.d.ts +5 -0
  4. package/{src/material-ui-components/Button/index.ts → dist/cjs/components/Button/index.d.ts} +0 -0
  5. package/dist/cjs/components/Form/Checkbox/Checkbox.d.ts +12 -0
  6. package/{src/material-ui-components/Form/Checkbox/index.ts → dist/cjs/components/Form/Checkbox/index.d.ts} +0 -0
  7. package/dist/cjs/components/Form/TextField/TextField.d.ts +15 -0
  8. package/dist/cjs/components/Form/TextField/index.d.ts +1 -0
  9. package/dist/cjs/components/Heading/Heading.d.ts +8 -0
  10. package/{src/material-ui-components/Heading/index.ts → dist/cjs/components/Heading/index.d.ts} +0 -0
  11. package/dist/cjs/{material-ui-components → components}/Icon/IconProvider.d.ts +0 -0
  12. package/dist/cjs/{material-ui-components → components}/Icon/index.d.ts +0 -0
  13. package/dist/cjs/components/Text/Text.d.ts +8 -0
  14. package/{src/material-ui-components/Text/index.ts → dist/cjs/components/Text/index.d.ts} +0 -0
  15. package/dist/cjs/components/index.d.ts +7 -0
  16. package/dist/cjs/from-scratch-components/Tag/Tag.d.ts +1 -1
  17. package/dist/cjs/from-scratch-components/Tag/index.d.ts +1 -1
  18. package/dist/cjs/from-scratch-components/index.d.ts +1 -1
  19. package/dist/cjs/index.d.ts +1 -3
  20. package/dist/cjs/index.js +12 -52
  21. package/dist/cjs/index.js.map +1 -1
  22. package/dist/cjs/material-ui-components/Button/Button.d.ts +1 -1
  23. package/dist/cjs/material-ui-components/Heading/Heading.d.ts +1 -1
  24. package/dist/cjs/material-ui-components/index.d.ts +0 -2
  25. package/dist/esm/{material-ui-components → components}/Accordion/Accordion.d.ts +0 -0
  26. package/dist/esm/{material-ui-components → components}/Accordion/index.d.ts +0 -0
  27. package/dist/esm/components/Button/Button.d.ts +5 -0
  28. package/dist/esm/components/Button/index.d.ts +1 -0
  29. package/dist/esm/components/Form/Checkbox/Checkbox.d.ts +12 -0
  30. package/dist/esm/components/Form/Checkbox/index.d.ts +1 -0
  31. package/dist/esm/components/Form/TextField/TextField.d.ts +15 -0
  32. package/dist/esm/components/Form/TextField/index.d.ts +1 -0
  33. package/dist/esm/components/Heading/Heading.d.ts +8 -0
  34. package/dist/esm/components/Heading/index.d.ts +1 -0
  35. package/dist/esm/{material-ui-components → components}/Icon/IconProvider.d.ts +0 -0
  36. package/dist/esm/{material-ui-components → components}/Icon/index.d.ts +0 -0
  37. package/dist/esm/components/Text/Text.d.ts +8 -0
  38. package/dist/esm/components/Text/index.d.ts +1 -0
  39. package/dist/esm/components/index.d.ts +7 -0
  40. package/dist/esm/from-scratch-components/Tag/Tag.d.ts +1 -1
  41. package/dist/esm/from-scratch-components/Tag/index.d.ts +1 -1
  42. package/dist/esm/from-scratch-components/index.d.ts +1 -1
  43. package/dist/esm/index.d.ts +1 -3
  44. package/dist/esm/index.js +12 -51
  45. package/dist/esm/index.js.map +1 -1
  46. package/dist/esm/material-ui-components/Button/Button.d.ts +1 -1
  47. package/dist/esm/material-ui-components/Heading/Heading.d.ts +1 -1
  48. package/dist/esm/material-ui-components/index.d.ts +0 -2
  49. package/dist/index.d.ts +2 -8
  50. package/package.json +1 -1
  51. package/src/{material-ui-components → components}/Accordion/Accordion.tsx +0 -0
  52. package/src/{material-ui-components → components}/Accordion/index.ts +0 -0
  53. package/src/{material-ui-components → components}/Button/Button.tsx +0 -0
  54. package/src/components/Button/index.ts +1 -0
  55. package/src/{material-ui-components → components}/Form/Checkbox/Checkbox.tsx +0 -0
  56. package/src/components/Form/Checkbox/index.ts +1 -0
  57. package/src/{material-ui-components/Form/TextInput/TextInput.tsx → components/Form/TextField/TextField.tsx} +5 -5
  58. package/src/components/Form/TextField/index.ts +1 -0
  59. package/src/{material-ui-components → components}/Heading/Heading.tsx +0 -0
  60. package/src/components/Heading/index.ts +1 -0
  61. package/src/{material-ui-components → components}/Icon/IconProvider.tsx +0 -0
  62. package/src/{material-ui-components → components}/Icon/index.ts +0 -0
  63. package/src/{material-ui-components → components}/Text/Text.tsx +0 -0
  64. package/src/components/Text/index.ts +1 -0
  65. package/src/{material-ui-components → components}/index.ts +1 -1
  66. package/src/index.ts +1 -3
  67. package/src/from-scratch-components/Tag/Tag.scss +0 -23
  68. package/src/from-scratch-components/Tag/Tag.tsx +0 -24
  69. package/src/from-scratch-components/Tag/index.ts +0 -1
  70. package/src/from-scratch-components/index.ts +0 -1
  71. package/src/material-ui-components/Form/TextInput/index.ts +0 -1
  72. package/src/mui-base-components/index.ts +0 -1
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from '@mui/material/Button';
3
+ declare type ActButtonType = (props: ButtonProps) => JSX.Element | null;
4
+ declare const ActButton: ActButtonType;
5
+ export default ActButton;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { SxProps, Theme } from '@mui/system';
3
+ interface Props {
4
+ error?: string;
5
+ label: string;
6
+ value: boolean;
7
+ name: string;
8
+ onChange: (field: string, value: any, shouldValidate?: boolean | undefined) => void;
9
+ sx: SxProps<Theme>;
10
+ }
11
+ declare const Checkbox: ({ name, value, error, label, onChange, sx }: Props) => JSX.Element;
12
+ export default Checkbox;
@@ -0,0 +1,15 @@
1
+ import { ChangeEventHandler, FocusEventHandler, ReactNode } from 'react';
2
+ import { TextFieldProps } from '@mui/material/TextField';
3
+ interface Props {
4
+ error?: string;
5
+ onBlur: FocusEventHandler<unknown>;
6
+ onChange: ChangeEventHandler<unknown>;
7
+ label: string;
8
+ value: string;
9
+ name: string;
10
+ placeholder?: string;
11
+ disabled?: boolean;
12
+ endAdornment?: ReactNode;
13
+ }
14
+ declare const TextField: ({ name, value, error, onBlur, onChange, label, disabled, endAdornment, placeholder, ...props }: Omit<TextFieldProps, 'error'> & Props) => JSX.Element;
15
+ export default TextField;
@@ -0,0 +1 @@
1
+ export { default } from './TextField';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TypographyProps } from '@mui/material/Typography';
3
+ interface Props extends Omit<TypographyProps, 'paragraph'> {
4
+ variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2';
5
+ component?: string;
6
+ }
7
+ declare const ActHeading: (props: Props) => JSX.Element;
8
+ export default ActHeading;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TypographyProps } from '@mui/material';
3
+ interface Props extends TypographyProps {
4
+ variant?: 'body1' | 'body2' | 'caption';
5
+ component?: string;
6
+ }
7
+ declare const ActText: (props: Props) => JSX.Element;
8
+ export default ActText;
@@ -0,0 +1,7 @@
1
+ export { default as ActText } from './Text';
2
+ export { default as ActHeading } from './Heading';
3
+ export { default as ActButton } from './Button';
4
+ export { default as TextField } from './Form/TextField';
5
+ export { default as ActCheckbox } from './Form/Checkbox';
6
+ export { default as ActAccordion } from './Accordion';
7
+ export { default as IconProvider } from './Icon/IconProvider';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import './Tag.scss';
2
+ import "./Tag.scss";
3
3
  export interface ActTagProps {
4
4
  label?: string;
5
5
  color?: 'red' | 'green' | 'blue';
@@ -1 +1 @@
1
- export { default } from './Tag';
1
+ export { default } from "./Tag";
@@ -1 +1 @@
1
- export { default as ActTag } from './Tag';
1
+ export { default as ActTag } from "./Tag";
@@ -1,4 +1,2 @@
1
- export * from './from-scratch-components';
2
- export * from './material-ui-components';
3
- export * from './mui-base-components';
1
+ export * from './components';
4
2
  export { default as DesignSystemProvider, DesignSystemContext, type DesignSystemContextValues } from './DesignSystemProvider';
package/dist/cjs/index.js CHANGED
@@ -66,47 +66,6 @@ function __rest(s, e) {
66
66
  return t;
67
67
  }
68
68
 
69
- function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
70
-
71
- function styleInject(css, ref) {
72
- if ( ref === void 0 ) ref = {};
73
- var insertAt = ref.insertAt;
74
-
75
- if (!css || typeof document === 'undefined') { return; }
76
-
77
- var head = document.head || document.getElementsByTagName('head')[0];
78
- var style = document.createElement('style');
79
- style.type = 'text/css';
80
-
81
- if (insertAt === 'top') {
82
- if (head.firstChild) {
83
- head.insertBefore(style, head.firstChild);
84
- } else {
85
- head.appendChild(style);
86
- }
87
- } else {
88
- head.appendChild(style);
89
- }
90
-
91
- if (style.styleSheet) {
92
- style.styleSheet.cssText = css;
93
- } else {
94
- style.appendChild(document.createTextNode(css));
95
- }
96
- }
97
-
98
- var css_248z = ".tag {\n padding: 4px 8px;\n border-radius: 4px;\n background: rgb(244, 244, 244);\n color: black;\n font-size: 14px;\n font-family: sans-serif;\n}\n\n.tag.red {\n background: tomato;\n color: white;\n}\n\n.tag.blue {\n background: blue;\n color: white;\n}\n\n.tag.green {\n background: green;\n color: white;\n}";
99
- styleInject(css_248z);
100
-
101
- var ActTag = function (props) {
102
- return (jsxRuntime.jsx("span", __assign$1({ className: clsx({
103
- tag: true,
104
- red: props.color === 'red',
105
- green: props.color === 'green',
106
- blue: props.color === 'blue'
107
- }) }, { children: props.label })));
108
- };
109
-
110
69
  const common = {
111
70
  black: '#000',
112
71
  white: '#fff'
@@ -1650,11 +1609,11 @@ var reactIs_production_min$1 = {};
1650
1609
  * LICENSE file in the root directory of this source tree.
1651
1610
  */
1652
1611
  var b$1="function"===typeof Symbol&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d$1=b$1?Symbol.for("react.portal"):60106,e$1=b$1?Symbol.for("react.fragment"):60107,f$1=b$1?Symbol.for("react.strict_mode"):60108,g$1=b$1?Symbol.for("react.profiler"):60114,h$1=b$1?Symbol.for("react.provider"):60109,k$1=b$1?Symbol.for("react.context"):60110,l$1=b$1?Symbol.for("react.async_mode"):60111,m$1=b$1?Symbol.for("react.concurrent_mode"):60111,n$1=b$1?Symbol.for("react.forward_ref"):60112,p$2=b$1?Symbol.for("react.suspense"):60113,q$1=b$1?
1653
- Symbol.for("react.suspense_list"):60120,r=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$2=b$1?Symbol.for("react.block"):60121,w=b$1?Symbol.for("react.fundamental"):60117,x=b$1?Symbol.for("react.responder"):60118,y=b$1?Symbol.for("react.scope"):60119;
1654
- function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$2:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$1:case r:case h$1:return a;default:return u}}case d$1:return u}}}function A$1(a){return z$1(a)===m$1}reactIs_production_min$1.AsyncMode=l$1;reactIs_production_min$1.ConcurrentMode=m$1;reactIs_production_min$1.ContextConsumer=k$1;reactIs_production_min$1.ContextProvider=h$1;reactIs_production_min$1.Element=c$1;reactIs_production_min$1.ForwardRef=n$1;reactIs_production_min$1.Fragment=e$1;reactIs_production_min$1.Lazy=t$1;reactIs_production_min$1.Memo=r;reactIs_production_min$1.Portal=d$1;
1612
+ Symbol.for("react.suspense_list"):60120,r$1=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$2=b$1?Symbol.for("react.block"):60121,w=b$1?Symbol.for("react.fundamental"):60117,x=b$1?Symbol.for("react.responder"):60118,y=b$1?Symbol.for("react.scope"):60119;
1613
+ function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$1:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$2:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$1:case r$1:case h$1:return a;default:return u}}case d$1:return u}}}function A$1(a){return z$1(a)===m$1}reactIs_production_min$1.AsyncMode=l$1;reactIs_production_min$1.ConcurrentMode=m$1;reactIs_production_min$1.ContextConsumer=k$1;reactIs_production_min$1.ContextProvider=h$1;reactIs_production_min$1.Element=c$1;reactIs_production_min$1.ForwardRef=n$1;reactIs_production_min$1.Fragment=e$1;reactIs_production_min$1.Lazy=t$1;reactIs_production_min$1.Memo=r$1;reactIs_production_min$1.Portal=d$1;
1655
1614
  reactIs_production_min$1.Profiler=g$1;reactIs_production_min$1.StrictMode=f$1;reactIs_production_min$1.Suspense=p$2;reactIs_production_min$1.isAsyncMode=function(a){return A$1(a)||z$1(a)===l$1};reactIs_production_min$1.isConcurrentMode=A$1;reactIs_production_min$1.isContextConsumer=function(a){return z$1(a)===k$1};reactIs_production_min$1.isContextProvider=function(a){return z$1(a)===h$1};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$1};reactIs_production_min$1.isForwardRef=function(a){return z$1(a)===n$1};reactIs_production_min$1.isFragment=function(a){return z$1(a)===e$1};reactIs_production_min$1.isLazy=function(a){return z$1(a)===t$1};
1656
- reactIs_production_min$1.isMemo=function(a){return z$1(a)===r};reactIs_production_min$1.isPortal=function(a){return z$1(a)===d$1};reactIs_production_min$1.isProfiler=function(a){return z$1(a)===g$1};reactIs_production_min$1.isStrictMode=function(a){return z$1(a)===f$1};reactIs_production_min$1.isSuspense=function(a){return z$1(a)===p$2};
1657
- reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$2||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v$2)};reactIs_production_min$1.typeOf=z$1;
1615
+ reactIs_production_min$1.isMemo=function(a){return z$1(a)===r$1};reactIs_production_min$1.isPortal=function(a){return z$1(a)===d$1};reactIs_production_min$1.isProfiler=function(a){return z$1(a)===g$1};reactIs_production_min$1.isStrictMode=function(a){return z$1(a)===f$1};reactIs_production_min$1.isSuspense=function(a){return z$1(a)===p$2};
1616
+ reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$2||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$1||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v$2)};reactIs_production_min$1.typeOf=z$1;
1658
1617
 
1659
1618
  var reactIs_development$1 = {};
1660
1619
 
@@ -6000,6 +5959,8 @@ function extendSxProp(props) {
6000
5959
  });
6001
5960
  }
6002
5961
 
5962
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
5963
+
6003
5964
  const _excluded$J = ["values", "unit", "step"];
6004
5965
 
6005
5966
  const sortBreakpointsValues = values => {
@@ -51056,7 +51017,7 @@ const TextFieldRoot = styled$1(FormControl$1, {
51056
51017
  * - using the underlying components directly as shown in the demos
51057
51018
  */
51058
51019
 
51059
- const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(inProps, ref) {
51020
+ const TextField$1 = /*#__PURE__*/React__namespace.forwardRef(function TextField(inProps, ref) {
51060
51021
  const props = useThemeProps({
51061
51022
  props: inProps,
51062
51023
  name: 'MuiTextField'
@@ -51195,7 +51156,7 @@ const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(in
51195
51156
  }))]
51196
51157
  }));
51197
51158
  });
51198
- process.env.NODE_ENV !== "production" ? TextField.propTypes
51159
+ process.env.NODE_ENV !== "production" ? TextField$1.propTypes
51199
51160
  /* remove-proptypes */
51200
51161
  = {
51201
51162
  // ----------------------------- Warning --------------------------------
@@ -51412,7 +51373,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes
51412
51373
  */
51413
51374
  variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
51414
51375
  } : void 0;
51415
- var TextField$1 = TextField;
51376
+ var MuiTextField = TextField$1;
51416
51377
 
51417
51378
  var ActText = function (props) { return jsxRuntime.jsx(Typography$1, __assign$1({}, props)); };
51418
51379
 
@@ -51432,7 +51393,7 @@ var ActButton = styled$1(Button$1)(function (_a) {
51432
51393
  });
51433
51394
  });
51434
51395
 
51435
- var TextInput = function (_a) {
51396
+ var TextField = function (_a) {
51436
51397
  var name = _a.name, value = _a.value, error = _a.error, onBlur = _a.onBlur, onChange = _a.onChange, label = _a.label, disabled = _a.disabled, endAdornment = _a.endAdornment; _a.placeholder; var props = __rest(_a, ["name", "value", "error", "onBlur", "onChange", "label", "disabled", "endAdornment", "placeholder"]);
51437
51398
  var _c = React.useState(value), internalValue = _c[0], setInternalValue = _c[1];
51438
51399
  React.useEffect(function () {
@@ -51440,7 +51401,7 @@ var TextInput = function (_a) {
51440
51401
  setInternalValue(value);
51441
51402
  }
51442
51403
  }, [value]);
51443
- return (jsxRuntime.jsx(TextField$1, __assign$1({ variant: "standard", name: name, label: label, value: internalValue, onClick: function (e) { return e.stopPropagation(); }, InputProps: {
51404
+ return (jsxRuntime.jsx(MuiTextField, __assign$1({ variant: "outlined", name: name, label: label, value: internalValue, onClick: function (e) { return e.stopPropagation(); }, InputProps: {
51444
51405
  endAdornment: endAdornment
51445
51406
  }, onChange: function (e) {
51446
51407
  setInternalValue(e.currentTarget.value);
@@ -51734,10 +51695,9 @@ exports.ActAccordion = ActAccordion;
51734
51695
  exports.ActButton = ActButton;
51735
51696
  exports.ActCheckbox = Checkbox;
51736
51697
  exports.ActHeading = ActHeading;
51737
- exports.ActTag = ActTag;
51738
51698
  exports.ActText = ActText;
51739
- exports.ActTextInput = TextInput;
51740
51699
  exports.DesignSystemContext = DesignSystemContext;
51741
51700
  exports.DesignSystemProvider = DesignSystemProvider;
51742
51701
  exports.IconProvider = IconProvider;
51702
+ exports.TextField = TextField;
51743
51703
  //# sourceMappingURL=index.js.map