@groupeactual/ui-kit 0.2.0 → 0.2.2

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 (75) hide show
  1. package/dist/cjs/DesignSystemProvider.d.ts +1 -1
  2. package/dist/cjs/{material-ui-components → components}/Accordion/Accordion.d.ts +0 -0
  3. package/dist/cjs/{material-ui-components → components}/Accordion/index.d.ts +0 -0
  4. package/dist/cjs/components/Button/Button.d.ts +5 -0
  5. package/{src/material-ui-components/Button/index.ts → dist/cjs/components/Button/index.d.ts} +0 -0
  6. package/dist/cjs/components/Form/Checkbox/Checkbox.d.ts +12 -0
  7. package/{src/material-ui-components/Form/Checkbox/index.ts → dist/cjs/components/Form/Checkbox/index.d.ts} +0 -0
  8. package/dist/cjs/components/Form/TextField/TextField.d.ts +15 -0
  9. package/dist/cjs/components/Form/TextField/index.d.ts +1 -0
  10. package/dist/cjs/components/Heading/Heading.d.ts +8 -0
  11. package/{src/material-ui-components/Heading/index.ts → dist/cjs/components/Heading/index.d.ts} +0 -0
  12. package/dist/cjs/{material-ui-components → components}/Icon/IconProvider.d.ts +0 -0
  13. package/dist/cjs/{material-ui-components → components}/Icon/index.d.ts +0 -0
  14. package/dist/cjs/components/Text/Text.d.ts +8 -0
  15. package/{src/material-ui-components/Text/index.ts → dist/cjs/components/Text/index.d.ts} +0 -0
  16. package/dist/cjs/components/index.d.ts +7 -0
  17. package/dist/cjs/from-scratch-components/Tag/Tag.d.ts +1 -1
  18. package/dist/cjs/from-scratch-components/Tag/index.d.ts +1 -1
  19. package/dist/cjs/from-scratch-components/index.d.ts +1 -1
  20. package/dist/cjs/index.d.ts +1 -3
  21. package/dist/cjs/index.js +279 -203
  22. package/dist/cjs/index.js.map +1 -1
  23. package/dist/cjs/material-ui-components/Button/Button.d.ts +1 -1
  24. package/dist/cjs/material-ui-components/Heading/Heading.d.ts +1 -1
  25. package/dist/cjs/material-ui-components/index.d.ts +0 -2
  26. package/dist/esm/DesignSystemProvider.d.ts +1 -1
  27. package/dist/esm/{material-ui-components → components}/Accordion/Accordion.d.ts +0 -0
  28. package/dist/esm/{material-ui-components → components}/Accordion/index.d.ts +0 -0
  29. package/dist/esm/components/Button/Button.d.ts +5 -0
  30. package/dist/esm/components/Button/index.d.ts +1 -0
  31. package/dist/esm/components/Form/Checkbox/Checkbox.d.ts +12 -0
  32. package/dist/esm/components/Form/Checkbox/index.d.ts +1 -0
  33. package/dist/esm/components/Form/TextField/TextField.d.ts +15 -0
  34. package/dist/esm/components/Form/TextField/index.d.ts +1 -0
  35. package/dist/esm/components/Heading/Heading.d.ts +8 -0
  36. package/dist/esm/components/Heading/index.d.ts +1 -0
  37. package/dist/esm/{material-ui-components → components}/Icon/IconProvider.d.ts +0 -0
  38. package/dist/esm/{material-ui-components → components}/Icon/index.d.ts +0 -0
  39. package/dist/esm/components/Text/Text.d.ts +8 -0
  40. package/dist/esm/components/Text/index.d.ts +1 -0
  41. package/dist/esm/components/index.d.ts +7 -0
  42. package/dist/esm/from-scratch-components/Tag/Tag.d.ts +1 -1
  43. package/dist/esm/from-scratch-components/Tag/index.d.ts +1 -1
  44. package/dist/esm/from-scratch-components/index.d.ts +1 -1
  45. package/dist/esm/index.d.ts +1 -3
  46. package/dist/esm/index.js +279 -202
  47. package/dist/esm/index.js.map +1 -1
  48. package/dist/esm/material-ui-components/Button/Button.d.ts +1 -1
  49. package/dist/esm/material-ui-components/Heading/Heading.d.ts +1 -1
  50. package/dist/esm/material-ui-components/index.d.ts +0 -2
  51. package/dist/index.d.ts +3 -9
  52. package/package.json +2 -2
  53. package/src/DesignSystemProvider.tsx +4 -7
  54. package/src/{material-ui-components → components}/Accordion/Accordion.tsx +0 -0
  55. package/src/{material-ui-components → components}/Accordion/index.ts +0 -0
  56. package/src/{material-ui-components → components}/Button/Button.tsx +0 -0
  57. package/src/components/Button/index.ts +1 -0
  58. package/src/{material-ui-components → components}/Form/Checkbox/Checkbox.tsx +0 -0
  59. package/src/components/Form/Checkbox/index.ts +1 -0
  60. package/src/{material-ui-components/Form/TextInput/TextInput.tsx → components/Form/TextField/TextField.tsx} +5 -5
  61. package/src/components/Form/TextField/index.ts +1 -0
  62. package/src/{material-ui-components → components}/Heading/Heading.tsx +0 -0
  63. package/src/components/Heading/index.ts +1 -0
  64. package/src/{material-ui-components → components}/Icon/IconProvider.tsx +0 -0
  65. package/src/{material-ui-components → components}/Icon/index.ts +0 -0
  66. package/src/{material-ui-components → components}/Text/Text.tsx +0 -0
  67. package/src/components/Text/index.ts +1 -0
  68. package/src/{material-ui-components → components}/index.ts +1 -1
  69. package/src/index.ts +1 -3
  70. package/src/from-scratch-components/Tag/Tag.scss +0 -23
  71. package/src/from-scratch-components/Tag/Tag.tsx +0 -24
  72. package/src/from-scratch-components/Tag/index.ts +0 -1
  73. package/src/from-scratch-components/index.ts +0 -1
  74. package/src/material-ui-components/Form/TextInput/index.ts +0 -1
  75. package/src/mui-base-components/index.ts +0 -1
package/dist/esm/index.js CHANGED
@@ -17,15 +17,15 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
17
  PERFORMANCE OF THIS SOFTWARE.
18
18
  ***************************************************************************** */
19
19
 
20
- var __assign$1 = function() {
21
- __assign$1 = Object.assign || function __assign(t) {
20
+ var __assign = function() {
21
+ __assign = Object.assign || function __assign(t) {
22
22
  for (var s, i = 1, n = arguments.length; i < n; i++) {
23
23
  s = arguments[i];
24
24
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
25
25
  }
26
26
  return t;
27
27
  };
28
- return __assign$1.apply(this, arguments);
28
+ return __assign.apply(this, arguments);
29
29
  };
30
30
 
31
31
  function __rest(s, e) {
@@ -40,47 +40,6 @@ function __rest(s, e) {
40
40
  return t;
41
41
  }
42
42
 
43
- 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}
44
-
45
- function styleInject(css, ref) {
46
- if ( ref === void 0 ) ref = {};
47
- var insertAt = ref.insertAt;
48
-
49
- if (!css || typeof document === 'undefined') { return; }
50
-
51
- var head = document.head || document.getElementsByTagName('head')[0];
52
- var style = document.createElement('style');
53
- style.type = 'text/css';
54
-
55
- if (insertAt === 'top') {
56
- if (head.firstChild) {
57
- head.insertBefore(style, head.firstChild);
58
- } else {
59
- head.appendChild(style);
60
- }
61
- } else {
62
- head.appendChild(style);
63
- }
64
-
65
- if (style.styleSheet) {
66
- style.styleSheet.cssText = css;
67
- } else {
68
- style.appendChild(document.createTextNode(css));
69
- }
70
- }
71
-
72
- 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}";
73
- styleInject(css_248z);
74
-
75
- var ActTag = function (props) {
76
- return (jsx("span", __assign$1({ className: clsx({
77
- tag: true,
78
- red: props.color === 'red',
79
- green: props.color === 'green',
80
- blue: props.color === 'blue'
81
- }) }, { children: props.label })));
82
- };
83
-
84
43
  const common = {
85
44
  black: '#000',
86
45
  white: '#fff'
@@ -1624,11 +1583,11 @@ var reactIs_production_min$1 = {};
1624
1583
  * LICENSE file in the root directory of this source tree.
1625
1584
  */
1626
1585
  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?
1627
- 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;
1628
- 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;
1586
+ 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;
1587
+ 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;
1629
1588
  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};
1630
- 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};
1631
- 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;
1589
+ 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};
1590
+ 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;
1632
1591
 
1633
1592
  var reactIs_development$1 = {};
1634
1593
 
@@ -5667,8 +5626,8 @@ const backgroundColor = style$1({
5667
5626
  prop: 'backgroundColor',
5668
5627
  themeKey: 'palette'
5669
5628
  });
5670
- const palette = compose(color, bgcolor, backgroundColor);
5671
- var palette$1 = palette;
5629
+ const palette$1 = compose(color, bgcolor, backgroundColor);
5630
+ var palette$2 = palette$1;
5672
5631
 
5673
5632
  const position = style$1({
5674
5633
  prop: 'position'
@@ -5796,7 +5755,7 @@ const filterPropsMapping = {
5796
5755
  flexbox: flexbox$1.filterProps,
5797
5756
  grid: grid$1.filterProps,
5798
5757
  positions: positions.filterProps,
5799
- palette: palette$1.filterProps,
5758
+ palette: palette$2.filterProps,
5800
5759
  shadows: shadows$2.filterProps,
5801
5760
  sizing: sizing$1.filterProps,
5802
5761
  spacing: spacing.filterProps,
@@ -5808,7 +5767,7 @@ const styleFunctionMapping = {
5808
5767
  flexbox: flexbox$1,
5809
5768
  grid: grid$1,
5810
5769
  positions,
5811
- palette: palette$1,
5770
+ palette: palette$2,
5812
5771
  shadows: shadows$2,
5813
5772
  sizing: sizing$1,
5814
5773
  spacing,
@@ -5974,6 +5933,8 @@ function extendSxProp(props) {
5974
5933
  });
5975
5934
  }
5976
5935
 
5936
+ 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}
5937
+
5977
5938
  const _excluded$J = ["values", "unit", "step"];
5978
5939
 
5979
5940
  const sortBreakpointsValues = values => {
@@ -51030,7 +50991,7 @@ const TextFieldRoot = styled$1(FormControl$1, {
51030
50991
  * - using the underlying components directly as shown in the demos
51031
50992
  */
51032
50993
 
51033
- const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {
50994
+ const TextField$1 = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {
51034
50995
  const props = useThemeProps({
51035
50996
  props: inProps,
51036
50997
  name: 'MuiTextField'
@@ -51169,7 +51130,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
51169
51130
  }))]
51170
51131
  }));
51171
51132
  });
51172
- process.env.NODE_ENV !== "production" ? TextField.propTypes
51133
+ process.env.NODE_ENV !== "production" ? TextField$1.propTypes
51173
51134
  /* remove-proptypes */
51174
51135
  = {
51175
51136
  // ----------------------------- Warning --------------------------------
@@ -51386,11 +51347,11 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes
51386
51347
  */
51387
51348
  variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
51388
51349
  } : void 0;
51389
- var TextField$1 = TextField;
51350
+ var MuiTextField = TextField$1;
51390
51351
 
51391
- var ActText = function (props) { return jsx(Typography$1, __assign$1({}, props)); };
51352
+ var ActText = function (props) { return jsx(Typography$1, __assign({}, props)); };
51392
51353
 
51393
- var ActHeading = function (props) { return jsx(Typography$1, __assign$1({}, props)); };
51354
+ var ActHeading = function (props) { return jsx(Typography$1, __assign({}, props)); };
51394
51355
 
51395
51356
  var ActButton = styled$1(Button$1)(function (_a) {
51396
51357
  var theme = _a.theme;
@@ -51406,7 +51367,7 @@ var ActButton = styled$1(Button$1)(function (_a) {
51406
51367
  });
51407
51368
  });
51408
51369
 
51409
- var TextInput = function (_a) {
51370
+ var TextField = function (_a) {
51410
51371
  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"]);
51411
51372
  var _c = useState(value), internalValue = _c[0], setInternalValue = _c[1];
51412
51373
  useEffect(function () {
@@ -51414,7 +51375,7 @@ var TextInput = function (_a) {
51414
51375
  setInternalValue(value);
51415
51376
  }
51416
51377
  }, [value]);
51417
- return (jsx(TextField$1, __assign$1({ variant: "standard", name: name, label: label, value: internalValue, onClick: function (e) { return e.stopPropagation(); }, InputProps: {
51378
+ return (jsx(MuiTextField, __assign({ variant: "outlined", name: name, label: label, value: internalValue, onClick: function (e) { return e.stopPropagation(); }, InputProps: {
51418
51379
  endAdornment: endAdornment
51419
51380
  }, onChange: function (e) {
51420
51381
  setInternalValue(e.currentTarget.value);
@@ -51432,10 +51393,10 @@ var Checkbox = function (_a) {
51432
51393
  setInternalValue(value);
51433
51394
  }
51434
51395
  }, [value]);
51435
- return (jsxs(FormControl$1, __assign$1({ fullWidth: true }, { children: [jsx(FormControlLabel$1, { sx: { display: 'table' }, control: jsx(Box$3, __assign$1({ sx: { display: 'table-cell' } }, { children: jsx(CheckboxMUI, { name: name, sx: { marginTop: -0.5 }, checked: internalValue, color: "primary", onChange: function (e) {
51396
+ return (jsxs(FormControl$1, __assign({ fullWidth: true }, { children: [jsx(FormControlLabel$1, { sx: { display: 'table' }, control: jsx(Box$3, __assign({ sx: { display: 'table-cell' } }, { children: jsx(CheckboxMUI, { name: name, sx: { marginTop: -0.5 }, checked: internalValue, color: "primary", onChange: function (e) {
51436
51397
  setInternalValue(e.target.checked);
51437
51398
  onChange(name, e.target.checked, true);
51438
- } }) })), label: jsx(Typography$1, __assign$1({ sx: sx }, { children: label })) }), error && (jsx(Typography$1, __assign$1({ sx: {
51399
+ } }) })), label: jsx(Typography$1, __assign({ sx: sx }, { children: label })) }), error && (jsx(Typography$1, __assign({ sx: {
51439
51400
  marginTop: -1,
51440
51401
  color: '#B80025',
51441
51402
  fontWeight: 400,
@@ -51443,158 +51404,274 @@ var Checkbox = function (_a) {
51443
51404
  } }, { children: error })))] })));
51444
51405
  };
51445
51406
 
51446
- /******************************************************************************
51447
- Copyright (c) Microsoft Corporation.
51448
-
51449
- Permission to use, copy, modify, and/or distribute this software for any
51450
- purpose with or without fee is hereby granted.
51451
-
51452
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
51453
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
51454
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
51455
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
51456
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
51457
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
51458
- PERFORMANCE OF THIS SOFTWARE.
51459
- ***************************************************************************** */
51460
-
51461
- var __assign = function() {
51462
- __assign = Object.assign || function __assign(t) {
51463
- for (var s, i = 1, n = arguments.length; i < n; i++) {
51464
- s = arguments[i];
51465
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
51466
- }
51467
- return t;
51468
- };
51469
- return __assign.apply(this, arguments);
51470
- };
51471
-
51472
- var fontSizes$1 = {
51473
- caption: "11px",
51474
- body2: "13px",
51475
- body1: "14px",
51476
- subtitle2: "18px",
51477
- subtitle1: "24px",
51478
- h2: "29px",
51479
- h1: "35px",
51480
- bigNumber: "42px",
51481
- title2: "55px"
51482
- };
51483
- var fontWeights = {
51484
- light: "300",
51485
- regular: "400",
51486
- medium: "500",
51487
- bold: "700",
51488
- caption: "400",
51489
- body2: "400",
51490
- body1: "400",
51491
- subtitle2: "500",
51492
- subtitle1: "400",
51493
- h2: "500",
51494
- h1: "700"
51495
- };
51496
- var lineHeights = {
51497
- caption: "12px",
51498
- body2: "16px",
51499
- body1: "18px",
51500
- subtitle2: "21px",
51501
- subtitle1: "28px",
51502
- h2: "34px",
51503
- h1: "41px"
51504
- };
51505
- var colors$1 = {
51506
- text: {
51507
- primary: "#272727",
51508
- secondary: "#545352"
51509
- },
51510
- black: "#000000",
51511
- white: "#FFFFFF",
51512
- red: "red",
51513
- green: "green",
51514
- blueClickable: "#136CAC",
51515
- greyDark: "#545352",
51516
- greyXDark: "#272727",
51517
- defaultBorder: "#CBCBCB",
51518
- greyLightBorder: "#F0F0F0",
51519
- redLight: "rgba(255, 0, 0, 0.04)"
51520
- };
51521
- var defaultTokens = {
51522
- fontSizes: fontSizes$1,
51523
- fontWeights: fontWeights,
51524
- lineHeights: lineHeights,
51525
- colors: colors$1
51407
+ /**
51408
+ * Do not edit directly
51409
+ * Generated on Fri, 18 Nov 2022 15:06:19 GMT
51410
+ */
51411
+ var DefaultWebShadowAllContent = {
51412
+ color: '#2727271f',
51413
+ type: 'dropShadow',
51414
+ x: '0',
51415
+ y: '2',
51416
+ blur: '10',
51417
+ spread: '0'
51526
51418
  };
51419
+ var DefaultFontFamiliesRoboto = 'Roboto';
51420
+ var DefaultLineHeights12 = '12';
51421
+ var DefaultLineHeights16 = '16';
51422
+ var DefaultLineHeights18 = '18';
51423
+ var DefaultLineHeights21 = '21';
51424
+ var DefaultLineHeights28 = '28';
51425
+ var DefaultLineHeights34 = '34';
51426
+ var DefaultLineHeights41 = '41';
51427
+ var DefaultLineHeights49 = '49';
51428
+ var DefaultFontWeightsRoboto700 = 'Bold';
51429
+ var DefaultFontWeightsRoboto500 = 'Medium';
51430
+ var DefaultFontWeightsRoboto400 = 'Regular';
51431
+ var DefaultFontSize10 = '10';
51432
+ var DefaultFontSize12 = '12';
51433
+ var DefaultFontSize14 = '14';
51434
+ var DefaultFontSize16 = '16';
51435
+ var DefaultFontSize18 = '18';
51436
+ var DefaultFontSize24 = '24';
51437
+ var DefaultFontSize29 = '29';
51438
+ var DefaultFontSize35 = '35';
51439
+ var DefaultFontSize42 = '42';
51440
+ var DefaultLetterSpacing0 = '0%';
51441
+ var DefaultParagraphSpacing0 = '0';
51442
+ var DefaultParagraphSpacing8 = '8';
51443
+ var DefaultTextCaseNone = 'none';
51444
+ var DefaultTextDecorationNone = 'none';
51445
+ var DefaultTextDecorationUnderline = 'underline';
51446
+ var DefaultSpacingXxs = '4';
51447
+ var DefaultSpacingXs = '8';
51448
+ var DefaultSpacingSm = '16';
51449
+ var DefaultSpacingMd = '24';
51450
+ var DefaultSpacingLg = '32';
51451
+ var DefaultSpacingXl = '40';
51452
+ var DefaultSpacingXxl = '72';
51453
+ var DefaultBorderRadius4 = '4';
51454
+ var DefaultBorderRadius8 = '8';
51455
+ var DefaultBorderRadius16 = '16';
51456
+ var DefaultBorderRadius24 = '24';
51457
+ var DefaultSizingXs = '8';
51458
+ var DefaultSizingSm = '12';
51459
+ var DefaultSizingMd = '16';
51460
+ var DefaultSizingLg = '24';
51461
+ var DefaultSizingXl = '32';
51462
+ var DefaultSizingXxl = '40';
51463
+ var DefaultSizingXxxl = '72';
51464
+ var DefaultDefaultColorsRedActual = '#e40521';
51465
+ var DefaultDefaultColorsBlueClickable = '#136cac';
51466
+ var DefaultDefaultColorsBlueHoverClickable = '#004f88';
51467
+ var DefaultDefaultColorsGreyMediumInactive = '#808080';
51468
+ var DefaultDefaultColorsGreyXDark = '#272727';
51469
+ var DefaultDefaultColorsGreyDark = '#545352';
51470
+ var DefaultDefaultColorsWhite = '#ffffff';
51471
+ var DefaultDefaultColorsGreyXLight = '#f0f0f0';
51472
+ var DefaultDefaultColorsGreyXDarkBgModal = '#27272780';
51473
+ var DefaultDefaultColorsBlueHoverEquivalence12 = '#e8f1f7';
51474
+ var DefaultDefaultColorsBlueHoverOpacity12 = '#136cac1f';
51475
+ var DefaultDefaultColorsGreyLightDefaultborder = '#cbcbcb';
51476
+ var DefaultDefaultColorsBlueInfo = '#1d91c3';
51477
+ var DefaultDefaultColorsGreenSuccess = '#23956d';
51478
+ var DefaultDefaultColorsOrangeWarning = '#e46221';
51479
+ var DefaultDefaultColorsRedError = '#b80025';
51480
+ var DefaultDefaultColorsBlueDark = '#0d2c54';
51481
+ var DefaultDefaultColorsBlueMedium = '#3d5a80';
51482
+ var DefaultDefaultColorsBlueLight = '#7fdcea';
51483
+ var DefaultDefaultColorsGreenDark = '#125e42';
51484
+ var DefaultDefaultColorsGreenMedium = '#1f8461';
51485
+ var DefaultDefaultColorsGreen = '#5dca8b';
51486
+ var DefaultDefaultColorsGreenLight = '#bad07a';
51487
+ var DefaultDefaultColorsBrown = '#6f2902';
51488
+ var DefaultDefaultColorsBrownLight = '#b65700';
51489
+ var DefaultDefaultColorsOrangeLight = '#f59b00';
51490
+ var DefaultDefaultColorsYellow = '#f9d25e';
51491
+ var DefaultDefaultColorsPurpleDark = '#530d48';
51492
+ var DefaultDefaultColorsPurple = '#831443';
51493
+ var DefaultDefaultColorsPink = '#ca1e5c';
51494
+ var DefaultDefaultColorsPinkLight = '#fd6972';
51495
+
51496
+ var tokens = /*#__PURE__*/Object.freeze({
51497
+ __proto__: null,
51498
+ DefaultWebShadowAllContent: DefaultWebShadowAllContent,
51499
+ DefaultFontFamiliesRoboto: DefaultFontFamiliesRoboto,
51500
+ DefaultLineHeights12: DefaultLineHeights12,
51501
+ DefaultLineHeights16: DefaultLineHeights16,
51502
+ DefaultLineHeights18: DefaultLineHeights18,
51503
+ DefaultLineHeights21: DefaultLineHeights21,
51504
+ DefaultLineHeights28: DefaultLineHeights28,
51505
+ DefaultLineHeights34: DefaultLineHeights34,
51506
+ DefaultLineHeights41: DefaultLineHeights41,
51507
+ DefaultLineHeights49: DefaultLineHeights49,
51508
+ DefaultFontWeightsRoboto700: DefaultFontWeightsRoboto700,
51509
+ DefaultFontWeightsRoboto500: DefaultFontWeightsRoboto500,
51510
+ DefaultFontWeightsRoboto400: DefaultFontWeightsRoboto400,
51511
+ DefaultFontSize10: DefaultFontSize10,
51512
+ DefaultFontSize12: DefaultFontSize12,
51513
+ DefaultFontSize14: DefaultFontSize14,
51514
+ DefaultFontSize16: DefaultFontSize16,
51515
+ DefaultFontSize18: DefaultFontSize18,
51516
+ DefaultFontSize24: DefaultFontSize24,
51517
+ DefaultFontSize29: DefaultFontSize29,
51518
+ DefaultFontSize35: DefaultFontSize35,
51519
+ DefaultFontSize42: DefaultFontSize42,
51520
+ DefaultLetterSpacing0: DefaultLetterSpacing0,
51521
+ DefaultParagraphSpacing0: DefaultParagraphSpacing0,
51522
+ DefaultParagraphSpacing8: DefaultParagraphSpacing8,
51523
+ DefaultTextCaseNone: DefaultTextCaseNone,
51524
+ DefaultTextDecorationNone: DefaultTextDecorationNone,
51525
+ DefaultTextDecorationUnderline: DefaultTextDecorationUnderline,
51526
+ DefaultSpacingXxs: DefaultSpacingXxs,
51527
+ DefaultSpacingXs: DefaultSpacingXs,
51528
+ DefaultSpacingSm: DefaultSpacingSm,
51529
+ DefaultSpacingMd: DefaultSpacingMd,
51530
+ DefaultSpacingLg: DefaultSpacingLg,
51531
+ DefaultSpacingXl: DefaultSpacingXl,
51532
+ DefaultSpacingXxl: DefaultSpacingXxl,
51533
+ DefaultBorderRadius4: DefaultBorderRadius4,
51534
+ DefaultBorderRadius8: DefaultBorderRadius8,
51535
+ DefaultBorderRadius16: DefaultBorderRadius16,
51536
+ DefaultBorderRadius24: DefaultBorderRadius24,
51537
+ DefaultSizingXs: DefaultSizingXs,
51538
+ DefaultSizingSm: DefaultSizingSm,
51539
+ DefaultSizingMd: DefaultSizingMd,
51540
+ DefaultSizingLg: DefaultSizingLg,
51541
+ DefaultSizingXl: DefaultSizingXl,
51542
+ DefaultSizingXxl: DefaultSizingXxl,
51543
+ DefaultSizingXxxl: DefaultSizingXxxl,
51544
+ DefaultDefaultColorsRedActual: DefaultDefaultColorsRedActual,
51545
+ DefaultDefaultColorsBlueClickable: DefaultDefaultColorsBlueClickable,
51546
+ DefaultDefaultColorsBlueHoverClickable: DefaultDefaultColorsBlueHoverClickable,
51547
+ DefaultDefaultColorsGreyMediumInactive: DefaultDefaultColorsGreyMediumInactive,
51548
+ DefaultDefaultColorsGreyXDark: DefaultDefaultColorsGreyXDark,
51549
+ DefaultDefaultColorsGreyDark: DefaultDefaultColorsGreyDark,
51550
+ DefaultDefaultColorsWhite: DefaultDefaultColorsWhite,
51551
+ DefaultDefaultColorsGreyXLight: DefaultDefaultColorsGreyXLight,
51552
+ DefaultDefaultColorsGreyXDarkBgModal: DefaultDefaultColorsGreyXDarkBgModal,
51553
+ DefaultDefaultColorsBlueHoverEquivalence12: DefaultDefaultColorsBlueHoverEquivalence12,
51554
+ DefaultDefaultColorsBlueHoverOpacity12: DefaultDefaultColorsBlueHoverOpacity12,
51555
+ DefaultDefaultColorsGreyLightDefaultborder: DefaultDefaultColorsGreyLightDefaultborder,
51556
+ DefaultDefaultColorsBlueInfo: DefaultDefaultColorsBlueInfo,
51557
+ DefaultDefaultColorsGreenSuccess: DefaultDefaultColorsGreenSuccess,
51558
+ DefaultDefaultColorsOrangeWarning: DefaultDefaultColorsOrangeWarning,
51559
+ DefaultDefaultColorsRedError: DefaultDefaultColorsRedError,
51560
+ DefaultDefaultColorsBlueDark: DefaultDefaultColorsBlueDark,
51561
+ DefaultDefaultColorsBlueMedium: DefaultDefaultColorsBlueMedium,
51562
+ DefaultDefaultColorsBlueLight: DefaultDefaultColorsBlueLight,
51563
+ DefaultDefaultColorsGreenDark: DefaultDefaultColorsGreenDark,
51564
+ DefaultDefaultColorsGreenMedium: DefaultDefaultColorsGreenMedium,
51565
+ DefaultDefaultColorsGreen: DefaultDefaultColorsGreen,
51566
+ DefaultDefaultColorsGreenLight: DefaultDefaultColorsGreenLight,
51567
+ DefaultDefaultColorsBrown: DefaultDefaultColorsBrown,
51568
+ DefaultDefaultColorsBrownLight: DefaultDefaultColorsBrownLight,
51569
+ DefaultDefaultColorsOrangeLight: DefaultDefaultColorsOrangeLight,
51570
+ DefaultDefaultColorsYellow: DefaultDefaultColorsYellow,
51571
+ DefaultDefaultColorsPurpleDark: DefaultDefaultColorsPurpleDark,
51572
+ DefaultDefaultColorsPurple: DefaultDefaultColorsPurple,
51573
+ DefaultDefaultColorsPink: DefaultDefaultColorsPink,
51574
+ DefaultDefaultColorsPinkLight: DefaultDefaultColorsPinkLight
51575
+ });
51527
51576
 
51528
- var fontSizes = {
51529
- h3: "1.3rem"
51530
- };
51531
- var colors = {
51532
- red: "#E11C31",
51533
- redDark: "#B80025",
51534
- greyLight: "#F0F0F0",
51535
- greyDark: "#808080",
51536
- greySemiDark: "#545352",
51537
- grey: "#CBCBCB",
51538
- blue: "#136CAC",
51539
- orange: "#E46221"
51540
- };
51541
- var lucieTokens = {
51542
- fontSizes: fontSizes,
51543
- colors: colors
51577
+ var getTokensByType = function (type) {
51578
+ var defaultTokens = {};
51579
+ Object.keys(tokens).forEach(function (colorName) {
51580
+ if (colorName.startsWith("Default".concat(type))) {
51581
+ var colorKey = colorName.replace("Default".concat(type), '');
51582
+ colorKey = colorKey.charAt(0).toLowerCase() + colorName.slice(1);
51583
+ defaultTokens[colorKey] = tokens[colorName];
51584
+ }
51585
+ });
51586
+ return defaultTokens;
51544
51587
  };
51545
-
51546
51588
  var useThemeTokens = function (themeName) {
51547
51589
  if (themeName === void 0) { themeName = 'default'; }
51548
- var themeTokens = useMemo(function () {
51549
- switch (themeName) {
51550
- case 'lucie':
51551
- return lucieTokens;
51552
- default:
51553
- return {};
51554
- }
51555
- }, [themeName]);
51556
51590
  var tokens = useMemo(function () {
51557
- var baseTokens = defaultTokens;
51558
51591
  return {
51559
- fontSizes: __assign(__assign({}, baseTokens.fontSizes), themeTokens.fontSizes),
51560
- fontWeights: __assign(__assign({}, baseTokens.fontWeights), themeTokens.fontWeights),
51561
- lineHeights: __assign(__assign({}, baseTokens.lineHeights), themeTokens.lineHeights),
51562
- colors: __assign(__assign({}, baseTokens.colors), themeTokens.colors)
51592
+ fontSizes: getTokensByType('FontSize'),
51593
+ fontWeights: getTokensByType('FontWeights'),
51594
+ lineHeights: getTokensByType('LineHeights'),
51595
+ colors: getTokensByType('DefaultColors'),
51596
+ spacing: getTokensByType('Spacing'),
51597
+ sizing: getTokensByType('Sizing')
51563
51598
  };
51564
- }, [themeName, themeTokens]);
51565
- var materialUIThemeTokens = useMemo(function () {
51566
- var typographies = [
51567
- 'h1',
51568
- 'h2',
51569
- 'h3',
51570
- 'subtitle1',
51571
- 'subtitle2',
51572
- 'body1',
51573
- 'body2',
51574
- 'caption'
51575
- ];
51576
- var typography = {};
51577
- typographies.forEach(function (typo) {
51578
- typography[typo] = {
51579
- fontSize: tokens.fontSizes[typo],
51580
- lineHeight: tokens.lineHeights[typo],
51581
- fontWeight: tokens.fontWeights[typo]
51582
- };
51583
- });
51599
+ }, [themeName]);
51600
+ return { themeName: themeName, tokens: tokens };
51601
+ };
51602
+
51603
+ var palette = {};
51604
+ Object.keys(tokens).forEach(function (colorName) {
51605
+ if (colorName.startsWith('DefaultDefaultColors')) {
51606
+ var colorKey = colorName.replace('DefaultDefaultColors', '');
51607
+ colorKey = colorKey.charAt(0).toLowerCase() + colorName.slice(1);
51608
+ palette[colorKey] = tokens[colorName];
51609
+ }
51610
+ });
51611
+ // TODO ne gère pour le moment que le theme default, possibilité de rendre la fonction
51612
+ // générique en gérant le theme 'Default'FontSize35
51613
+ var useMaterialThemeTokens = function (themeName) {
51614
+ if (themeName === void 0) { themeName = 'default'; }
51615
+ var muiTokens = useMemo(function () {
51584
51616
  return {
51585
- typography: __assign(__assign({}, typography), { fontWeightLight: tokens.fontWeights.light, fontWeightRegular: tokens.fontWeights.regular, fontWeightMedium: tokens.fontWeights.medium, fontWeightBold: tokens.fontWeights.bold }),
51586
- palette: tokens.colors
51617
+ typography: {
51618
+ h1: {
51619
+ fontSize: DefaultFontSize35,
51620
+ lineHeight: DefaultLineHeights41,
51621
+ fontWeight: DefaultFontWeightsRoboto700
51622
+ },
51623
+ h2: {
51624
+ fontSize: DefaultFontSize29,
51625
+ lineHeight: DefaultLineHeights34,
51626
+ fontWeight: DefaultFontWeightsRoboto500
51627
+ },
51628
+ h3: {
51629
+ fontSize: DefaultFontSize24,
51630
+ lineHeight: DefaultLineHeights28,
51631
+ fontWeight: DefaultFontWeightsRoboto400
51632
+ },
51633
+ subtitle1: {
51634
+ fontSize: DefaultFontSize24,
51635
+ lineHeight: DefaultLineHeights28,
51636
+ fontWeight: DefaultFontWeightsRoboto400
51637
+ },
51638
+ subtitle2: {
51639
+ fontSize: DefaultFontSize18,
51640
+ lineHeight: DefaultLineHeights21,
51641
+ fontWeight: DefaultFontWeightsRoboto500
51642
+ },
51643
+ body1: {
51644
+ fontSize: DefaultFontSize14,
51645
+ lineHeight: DefaultLineHeights18,
51646
+ fontWeight: DefaultFontWeightsRoboto400
51647
+ },
51648
+ body2: {
51649
+ fontSize: DefaultFontSize12,
51650
+ lineHeight: DefaultLineHeights16,
51651
+ fontWeight: DefaultFontWeightsRoboto400
51652
+ },
51653
+ caption: {
51654
+ fontSize: DefaultFontSize10,
51655
+ lineHeight: DefaultLineHeights12,
51656
+ fontWeight: DefaultFontWeightsRoboto400
51657
+ },
51658
+ fontWeightLight: DefaultFontWeightsRoboto400,
51659
+ fontWeightRegular: DefaultFontWeightsRoboto500,
51660
+ fontWeightMedium: DefaultFontWeightsRoboto500,
51661
+ fontWeightBold: DefaultFontWeightsRoboto700
51662
+ },
51663
+ palette: palette
51587
51664
  };
51588
51665
  }, [tokens, themeName]);
51589
- return { themeName: themeName, tokens: tokens, materialUIThemeTokens: materialUIThemeTokens };
51666
+ return { muiTokens: muiTokens };
51590
51667
  };
51591
51668
 
51592
51669
  var ActAccordion = function (_a) {
51593
51670
  var icon = _a.icon, title = _a.title, content = _a.content, summaryHeight = _a.summaryHeight;
51594
51671
  var tokens = useThemeTokens('lucie').tokens;
51595
- return (jsxs(Accordion$1, __assign$1({ sx: { border: "1px solid ".concat(tokens.colors.defaultBorder) } }, { children: [jsx(AccordionSummary$1, __assign$1({ expandIcon: icon, sx: {
51672
+ return (jsxs(Accordion$1, __assign({ sx: { border: "1px solid ".concat(tokens.colors.defaultBorder) } }, { children: [jsx(AccordionSummary$1, __assign({ expandIcon: icon, sx: {
51596
51673
  height: summaryHeight || 60
51597
- } }, { children: title })), jsx(AccordionDetails$1, __assign$1({ sx: {
51674
+ } }, { children: title })), jsx(AccordionDetails$1, __assign({ sx: {
51598
51675
  bgcolor: tokens.colors.greyLightBorder,
51599
51676
  borderTop: '1px solid #CBCBCB'
51600
51677
  } }, { children: content }))] })));
@@ -51604,7 +51681,7 @@ var ActAccordion = function (_a) {
51604
51681
  var FontAwesomeSvgIcon = forwardRef(function (_a, ref) {
51605
51682
  var icon = _a.icon, fontSize = _a.fontSize;
51606
51683
  var _b = icon.icon, width = _b[0], height = _b[1], svgPathData = _b[4];
51607
- return (jsx(SvgIcon$1, __assign$1({ ref: ref, viewBox: "0 0 ".concat(width, " ").concat(height), sx: {
51684
+ return (jsx(SvgIcon$1, __assign({ ref: ref, viewBox: "0 0 ".concat(width, " ").concat(height), sx: {
51608
51685
  fontSize: fontSize
51609
51686
  } }, { children: typeof svgPathData === 'string' ? (jsx("path", { d: svgPathData })) : (
51610
51687
  /**
@@ -51680,7 +51757,7 @@ var IconProvider = function (_a) {
51680
51757
  };
51681
51758
  }
51682
51759
  };
51683
- return (jsx(Box$1, __assign$1({ component: "span", sx: getStyles() }, { children: jsx(FontAwesomeSvgIcon, { icon: icon, fontSize: getFontSize() }) })));
51760
+ return (jsx(Box$1, __assign({ component: "span", sx: getStyles() }, { children: jsx(FontAwesomeSvgIcon, { icon: icon, fontSize: getFontSize() }) })));
51684
51761
  };
51685
51762
 
51686
51763
  var DesignSystemContext = createContext({
@@ -51691,9 +51768,9 @@ var DesignSystemContext = createContext({
51691
51768
  var MaterialThemeProvider = function (_a) {
51692
51769
  var children = _a.children;
51693
51770
  var themeName = useContext(DesignSystemContext).themeName;
51694
- var materialUIThemeTokens = useThemeTokens(themeName).materialUIThemeTokens;
51771
+ var materialUIThemeTokens = useMaterialThemeTokens(themeName).materialUIThemeTokens;
51695
51772
  var theme = useMemo(function () { return createTheme(materialUIThemeTokens); }, [materialUIThemeTokens]);
51696
- return jsx(ThemeProvider, __assign$1({ theme: theme }, { children: children }));
51773
+ return jsx(ThemeProvider, __assign({ theme: theme }, { children: children }));
51697
51774
  };
51698
51775
  var DesignSystemProvider = function (_a) {
51699
51776
  var children = _a.children, _b = _a.name, themeName = _b === void 0 ? 'default' : _b;
@@ -51701,8 +51778,8 @@ var DesignSystemProvider = function (_a) {
51701
51778
  var toggleDarkTheme = function () {
51702
51779
  setIsDarkTheme(!isDarkTheme);
51703
51780
  };
51704
- return (jsx(DesignSystemContext.Provider, __assign$1({ value: { isDarkTheme: isDarkTheme, themeName: themeName, toggleDarkTheme: toggleDarkTheme } }, { children: jsx(MaterialThemeProvider, { children: children }) })));
51781
+ return (jsx(DesignSystemContext.Provider, __assign({ value: { isDarkTheme: isDarkTheme, themeName: themeName, toggleDarkTheme: toggleDarkTheme } }, { children: jsx(MaterialThemeProvider, { children: children }) })));
51705
51782
  };
51706
51783
 
51707
- export { ActAccordion, ActButton, Checkbox as ActCheckbox, ActHeading, ActTag, ActText, TextInput as ActTextInput, DesignSystemContext, DesignSystemProvider, IconProvider };
51784
+ export { ActAccordion, ActButton, Checkbox as ActCheckbox, ActHeading, ActText, DesignSystemContext, DesignSystemProvider, IconProvider, TextField };
51708
51785
  //# sourceMappingURL=index.js.map