@coorpacademy/components 11.33.14 → 11.33.15

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 (103) hide show
  1. package/es/atom/title/index.d.ts.map +1 -1
  2. package/es/atom/title/index.js +4 -2
  3. package/es/atom/title/index.js.map +1 -1
  4. package/es/atom/title/style.css +6 -0
  5. package/es/atom/title/types.d.ts +1 -1
  6. package/es/atom/title/types.d.ts.map +1 -1
  7. package/es/atom/title/types.js.map +1 -1
  8. package/es/molecule/icon-preview/index.d.ts +12 -9
  9. package/es/molecule/icon-preview/index.d.ts.map +1 -1
  10. package/es/molecule/icon-preview/index.js +8 -13
  11. package/es/molecule/icon-preview/index.js.map +1 -1
  12. package/es/molecule/icon-preview/style.css +0 -1
  13. package/es/molecule/icon-preview/types.d.ts +18 -0
  14. package/es/molecule/icon-preview/types.d.ts.map +1 -0
  15. package/es/molecule/icon-preview/types.js +11 -0
  16. package/es/molecule/icon-preview/types.js.map +1 -0
  17. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  18. package/es/organism/header-with-actions/index.js +9 -1
  19. package/es/organism/header-with-actions/index.js.map +1 -1
  20. package/es/organism/icon-editor/index.d.ts +73 -23
  21. package/es/organism/icon-editor/index.d.ts.map +1 -1
  22. package/es/organism/icon-editor/index.js +22 -35
  23. package/es/organism/icon-editor/index.js.map +1 -1
  24. package/es/organism/icon-editor/style.css +5 -5
  25. package/es/organism/icon-editor/types.d.ts +77 -0
  26. package/es/organism/icon-editor/types.d.ts.map +1 -0
  27. package/es/organism/icon-editor/types.js +11 -0
  28. package/es/organism/icon-editor/types.js.map +1 -0
  29. package/es/organism/list-item/style.css +3 -2
  30. package/es/organism/skill-edition/index.d.ts +1661 -0
  31. package/es/organism/skill-edition/index.d.ts.map +1 -0
  32. package/es/organism/skill-edition/index.js +26 -0
  33. package/es/organism/skill-edition/index.js.map +1 -0
  34. package/es/organism/skill-edition/style.css +23 -0
  35. package/es/organism/skill-edition/types.d.ts +1674 -0
  36. package/es/organism/skill-edition/types.d.ts.map +1 -0
  37. package/es/organism/skill-edition/types.js +18 -0
  38. package/es/organism/skill-edition/types.js.map +1 -0
  39. package/es/organism/title-and-input/index.d.ts +64 -0
  40. package/es/organism/title-and-input/index.d.ts.map +1 -1
  41. package/es/organism/title-and-input/index.js +3 -0
  42. package/es/organism/title-and-input/index.js.map +1 -1
  43. package/es/organism/title-and-input/types.d.ts +68 -3
  44. package/es/organism/title-and-input/types.d.ts.map +1 -1
  45. package/es/organism/title-and-input/types.js +3 -2
  46. package/es/organism/title-and-input/types.js.map +1 -1
  47. package/es/template/back-office/brand-update/index.d.ts +1747 -2
  48. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  49. package/es/template/back-office/brand-update/index.js +14 -3
  50. package/es/template/back-office/brand-update/index.js.map +1 -1
  51. package/lib/atom/title/index.d.ts.map +1 -1
  52. package/lib/atom/title/index.js +4 -2
  53. package/lib/atom/title/index.js.map +1 -1
  54. package/lib/atom/title/style.css +6 -0
  55. package/lib/atom/title/types.d.ts +1 -1
  56. package/lib/atom/title/types.d.ts.map +1 -1
  57. package/lib/atom/title/types.js.map +1 -1
  58. package/lib/molecule/icon-preview/index.d.ts +12 -9
  59. package/lib/molecule/icon-preview/index.d.ts.map +1 -1
  60. package/lib/molecule/icon-preview/index.js +8 -13
  61. package/lib/molecule/icon-preview/index.js.map +1 -1
  62. package/lib/molecule/icon-preview/style.css +0 -1
  63. package/lib/molecule/icon-preview/types.d.ts +18 -0
  64. package/lib/molecule/icon-preview/types.d.ts.map +1 -0
  65. package/lib/molecule/icon-preview/types.js +16 -0
  66. package/lib/molecule/icon-preview/types.js.map +1 -0
  67. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  68. package/lib/organism/header-with-actions/index.js +9 -1
  69. package/lib/organism/header-with-actions/index.js.map +1 -1
  70. package/lib/organism/icon-editor/index.d.ts +73 -23
  71. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  72. package/lib/organism/icon-editor/index.js +24 -35
  73. package/lib/organism/icon-editor/index.js.map +1 -1
  74. package/lib/organism/icon-editor/style.css +5 -5
  75. package/lib/organism/icon-editor/types.d.ts +77 -0
  76. package/lib/organism/icon-editor/types.d.ts.map +1 -0
  77. package/lib/organism/icon-editor/types.js +16 -0
  78. package/lib/organism/icon-editor/types.js.map +1 -0
  79. package/lib/organism/list-item/style.css +3 -2
  80. package/lib/organism/skill-edition/index.d.ts +1661 -0
  81. package/lib/organism/skill-edition/index.d.ts.map +1 -0
  82. package/lib/organism/skill-edition/index.js +31 -0
  83. package/lib/organism/skill-edition/index.js.map +1 -0
  84. package/lib/organism/skill-edition/style.css +23 -0
  85. package/lib/organism/skill-edition/types.d.ts +1674 -0
  86. package/lib/organism/skill-edition/types.d.ts.map +1 -0
  87. package/lib/organism/skill-edition/types.js +23 -0
  88. package/lib/organism/skill-edition/types.js.map +1 -0
  89. package/lib/organism/title-and-input/index.d.ts +64 -0
  90. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  91. package/lib/organism/title-and-input/index.js +3 -0
  92. package/lib/organism/title-and-input/index.js.map +1 -1
  93. package/lib/organism/title-and-input/types.d.ts +68 -3
  94. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  95. package/lib/organism/title-and-input/types.js +3 -2
  96. package/lib/organism/title-and-input/types.js.map +1 -1
  97. package/lib/template/back-office/brand-update/index.d.ts +1747 -2
  98. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  99. package/lib/template/back-office/brand-update/index.js +14 -3
  100. package/lib/template/back-office/brand-update/index.js.map +1 -1
  101. package/locales/en/global.json +6 -0
  102. package/locales/fr/global.json +11 -5
  103. package/package.json +2 -2
@@ -1,26 +1,76 @@
1
- export default IconEditor;
2
- declare function IconEditor(props: any, context: any): JSX.Element;
3
- declare namespace IconEditor {
4
- namespace contextTypes {
5
- const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
- }
7
- namespace propTypes {
8
- const iconName: PropTypes.Validator<string>;
9
- const iconColor: PropTypes.Requireable<string>;
10
- const title: PropTypes.Requireable<string>;
11
- const handleChange: PropTypes.Validator<(...args: any[]) => any>;
12
- const buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
13
- type: PropTypes.Requireable<string>;
14
- label: PropTypes.Requireable<string>;
15
- ariaLabel: PropTypes.Requireable<string>;
16
- dataName: PropTypes.Requireable<string>;
17
- icon: PropTypes.Requireable<PropTypes.InferProps<{
18
- position: PropTypes.Requireable<string>;
19
- type: PropTypes.Requireable<string>;
1
+ /// <reference types="react" />
2
+ import type { WebContextValues } from '../../atom/provider/web-context';
3
+ import { IconEditorProps } from './types';
4
+ declare const IconEditor: {
5
+ (props: IconEditorProps, legacyContext: WebContextValues): JSX.Element;
6
+ contextTypes: {
7
+ translate: import("prop-types").Requireable<(...args: any[]) => any>;
8
+ };
9
+ propTypes: {
10
+ iconPreview: import("prop-types").Requireable<import("prop-types").InferProps<{
11
+ title: import("prop-types").Requireable<string>;
12
+ icon: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
13
+ name: import("prop-types").Validator<string>;
14
+ color: import("prop-types").Requireable<string>;
15
+ }>>>;
16
+ }>>;
17
+ inputText: import("prop-types").Requireable<import("prop-types").InferProps<{
18
+ autoFocus: import("prop-types").Requireable<boolean>;
19
+ title: import("prop-types").Requireable<string>;
20
+ placeholder: import("prop-types").Requireable<string>;
21
+ defaultValue: import("prop-types").Requireable<string>;
22
+ theme: import("prop-types").Requireable<string>;
23
+ disabled: import("prop-types").Requireable<boolean>;
24
+ value: import("prop-types").Requireable<string>;
25
+ hint: import("prop-types").Requireable<string>;
26
+ error: import("prop-types").Requireable<string>;
27
+ onChange: import("prop-types").Requireable<(...args: any[]) => any>;
28
+ description: import("prop-types").Requireable<string>;
29
+ modified: import("prop-types").Requireable<boolean>;
30
+ type: import("prop-types").Requireable<string>;
31
+ valid: import("prop-types").Requireable<boolean>;
32
+ 'aria-label': import("prop-types").Requireable<string>;
33
+ 'data-name': import("prop-types").Requireable<string>;
34
+ inputColor: import("prop-types").Requireable<boolean>;
35
+ }>>;
36
+ buttonLink: import("prop-types").Requireable<import("prop-types").InferProps<{
37
+ type: import("prop-types").Requireable<string>;
38
+ usage: import("prop-types").Requireable<string>;
39
+ label: import("prop-types").Requireable<string>;
40
+ content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
41
+ 'aria-label': import("prop-types").Requireable<string>;
42
+ tooltipText: import("prop-types").Requireable<string>;
43
+ tooltipPlacement: import("prop-types").Requireable<string>;
44
+ 'data-name': import("prop-types").Requireable<string>;
45
+ 'data-testid': import("prop-types").Requireable<string>;
46
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
47
+ position: import("prop-types").Requireable<string>;
48
+ type: import("prop-types").Requireable<string>;
49
+ faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
50
+ name: import("prop-types").Validator<string>;
51
+ color: import("prop-types").Requireable<string>;
52
+ backgroundColor: import("prop-types").Requireable<string>;
53
+ size: import("prop-types").Requireable<number>;
54
+ customStyle: import("prop-types").Requireable<{
55
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
56
+ }>;
57
+ }>>;
20
58
  }>>;
21
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
59
+ onClick: import("prop-types").Requireable<(...args: any[]) => any>;
60
+ link: import("prop-types").Requireable<import("prop-types").InferProps<{
61
+ href: import("prop-types").Requireable<string>;
62
+ download: import("prop-types").Requireable<boolean>;
63
+ target: import("prop-types").Requireable<string>;
64
+ }>>;
65
+ hoverBackgroundColor: import("prop-types").Requireable<string>;
66
+ hoverColor: import("prop-types").Requireable<string>;
67
+ disabled: import("prop-types").Requireable<boolean>;
68
+ className: import("prop-types").Requireable<string>;
69
+ customStyle: import("prop-types").Requireable<{
70
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
71
+ }>;
22
72
  }>>;
23
- }
24
- }
25
- import PropTypes from "prop-types";
73
+ };
74
+ };
75
+ export default IconEditor;
26
76
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.js"],"names":[],"mappings":";AASA,mEA8BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B1E,CAAC;AAQF,eAAe,UAAU,CAAC"}
@@ -3,65 +3,54 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
- var _propTypes = _interopRequireDefault(require("prop-types"));
7
6
  var _iconPreview = _interopRequireDefault(require("../../molecule/icon-preview"));
8
7
  var _inputText = _interopRequireDefault(require("../../atom/input-text"));
9
8
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
10
- var _provider = _interopRequireDefault(require("../../atom/provider"));
9
+ var _provider = _interopRequireWildcard(require("../../atom/provider"));
11
10
  var _validateColor = require("../../util/validate-color");
11
+ var _colors = require("../../variables/colors");
12
12
  var _style = _interopRequireDefault(require("./style.css"));
13
+ var _types = _interopRequireDefault(require("./types"));
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- const IconEditor = (props, context) => {
17
+ const IconEditor = (props, legacyContext) => {
18
+ const translate = (0, _provider.GetTranslateFromContext)(legacyContext);
15
19
  const {
16
- iconName,
17
- title,
18
- iconColor,
19
- buttonLink,
20
- handleChange
20
+ iconPreview,
21
+ inputText,
22
+ buttonLink
21
23
  } = props;
22
24
  const {
23
- translate
24
- } = context;
25
- const isValidColor = (0, _validateColor.validateColor)(iconColor);
25
+ title,
26
+ icon
27
+ } = iconPreview;
28
+ const isValidColor = (0, _validateColor.validateColor)(icon.color);
26
29
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_iconPreview.default, {
27
- iconName: iconName,
28
- title: title,
29
- iconColor: isValidColor ? iconColor : '#FFFFFF'
30
+ icon: {
31
+ ...icon,
32
+ color: isValidColor ? icon.color : _colors.COLORS.white
33
+ },
34
+ title: title
30
35
  }), /*#__PURE__*/_react.default.createElement("div", {
31
36
  className: _style.default.inputButtonContainer
32
37
  }, /*#__PURE__*/_react.default.createElement(_inputText.default, {
33
38
  type: "text",
34
39
  title: translate('icon_editor_color'),
35
- placeholder: "#FFFFFF",
40
+ placeholder: _colors.COLORS.white,
36
41
  theme: "coorpmanager",
37
42
  description: translate('icon_editor_color'),
38
- value: iconColor,
39
- error: iconColor && !isValidColor && translate('invalid_color'),
43
+ value: icon.color,
44
+ error: icon.color && !isValidColor ? translate('invalid_color') : undefined,
40
45
  disabled: false,
41
46
  valid: false,
42
- onChange: handleChange,
47
+ onChange: inputText.handleChange,
43
48
  inputColor: true
44
49
  }), /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonLink)));
45
50
  };
46
51
  IconEditor.contextTypes = {
47
52
  translate: _provider.default.childContextTypes.translate
48
53
  };
49
- IconEditor.propTypes = process.env.NODE_ENV !== "production" ? {
50
- iconName: _propTypes.default.string.isRequired,
51
- iconColor: _propTypes.default.string,
52
- title: _propTypes.default.string,
53
- handleChange: _propTypes.default.func.isRequired,
54
- buttonLink: _propTypes.default.shape({
55
- type: _propTypes.default.string,
56
- label: _propTypes.default.string,
57
- ariaLabel: _propTypes.default.string,
58
- dataName: _propTypes.default.string,
59
- icon: _propTypes.default.shape({
60
- position: _propTypes.default.string,
61
- type: _propTypes.default.string
62
- }),
63
- onClick: _propTypes.default.func
64
- })
65
- } : {};
54
+ IconEditor.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
66
55
  var _default = exports.default = IconEditor;
67
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_iconPreview","_inputText","_buttonLink","_provider","_validateColor","_style","e","__esModule","default","IconEditor","props","context","iconName","title","iconColor","buttonLink","handleChange","translate","isValidColor","validateColor","createElement","Fragment","className","style","inputButtonContainer","type","placeholder","theme","description","value","error","disabled","valid","onChange","inputColor","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","PropTypes","string","isRequired","func","shape","label","ariaLabel","dataName","icon","position","onClick","_default","exports"],"sources":["../../../src/organism/icon-editor/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport IconPreview from '../../molecule/icon-preview';\nimport InputText from '../../atom/input-text';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport {validateColor} from '../../util/validate-color';\nimport style from './style.css';\n\nconst IconEditor = (props, context) => {\n const {iconName, title, iconColor, buttonLink, handleChange} = props;\n const {translate} = context;\n\n const isValidColor = validateColor(iconColor);\n return (\n <>\n <IconPreview\n iconName={iconName}\n title={title}\n iconColor={isValidColor ? iconColor : '#FFFFFF'}\n />\n <div className={style.inputButtonContainer}>\n <InputText\n type=\"text\"\n title={translate('icon_editor_color')}\n placeholder=\"#FFFFFF\"\n theme=\"coorpmanager\"\n description={translate('icon_editor_color')}\n value={iconColor}\n error={iconColor && !isValidColor && translate('invalid_color')}\n disabled={false}\n valid={false}\n onChange={handleChange}\n inputColor\n />\n <ButtonLink {...buttonLink} />\n </div>\n </>\n );\n};\n\nIconEditor.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nIconEditor.propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n title: PropTypes.string,\n handleChange: PropTypes.func.isRequired,\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n })\n};\n\nexport default IconEditor;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,UAAU,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EACrC,MAAM;IAACC,QAAQ;IAAEC,KAAK;IAAEC,SAAS;IAAEC,UAAU;IAAEC;EAAY,CAAC,GAAGN,KAAK;EACpE,MAAM;IAACO;EAAS,CAAC,GAAGN,OAAO;EAE3B,MAAMO,YAAY,GAAG,IAAA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AE6B,kBAAS,CAACC,MAAM;EACvB3B,YAAY,EAAE0B,kBAAS,CAACG,IAAI,CAACD,UAAU;EACvC7B,UAAU,EAAE2B,kBAAS,CAACI,KAAK,CAAC;IAC1BrB,IAAI,EAAEiB,kBAAS,CAACC,MAAM;IACtBI,KAAK,EAAEL,kBAAS,CAACC,MAAM;IACvBK,SAAS,EAAEN,kBAAS,CAACC,MAAM;IAC3BM,QAAQ,EAAEP,kBAAS,CAACC,MAAM;IAC1BO,IAAI,EAAER,kBAAS,CAACI,KAAK,CAAC;MACpBK,QAAQ,EAAET,kBAAS,CAACC,MAAM;MAC1BlB,IAAI,EAAEiB,kBAAS,CAACC;IAClB,CAAC,CAAC;IACFS,OAAO,EAAEV,kBAAS,CAACG;EACrB,CAAC;AACH,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAEaC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_iconPreview","_inputText","_buttonLink","_provider","_interopRequireWildcard","_validateColor","_colors","_style","_types","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","IconEditor","props","legacyContext","translate","GetTranslateFromContext","iconPreview","inputText","buttonLink","title","icon","isValidColor","validateColor","color","createElement","Fragment","COLORS","white","className","style","inputButtonContainer","type","placeholder","theme","description","value","error","undefined","disabled","valid","onChange","handleChange","inputColor","contextTypes","Provider","childContextTypes","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/icon-editor/index.tsx"],"sourcesContent":["import React from 'react';\nimport IconPreview from '../../molecule/icon-preview';\nimport InputText from '../../atom/input-text';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {validateColor} from '../../util/validate-color';\nimport type {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport propTypes, {IconEditorProps} from './types';\n\nconst IconEditor = (props: IconEditorProps, legacyContext: WebContextValues) => {\n const translate = GetTranslateFromContext(legacyContext);\n const {iconPreview, inputText, buttonLink} = props;\n const {title, icon} = iconPreview;\n\n const isValidColor = validateColor(icon.color);\n return (\n <>\n <IconPreview\n icon={{...icon, color: isValidColor ? icon.color : COLORS.white}}\n title={title}\n />\n <div className={style.inputButtonContainer}>\n <InputText\n type=\"text\"\n title={translate('icon_editor_color')}\n placeholder={COLORS.white}\n theme=\"coorpmanager\"\n description={translate('icon_editor_color')}\n value={icon.color}\n error={icon.color && !isValidColor ? translate('invalid_color') : undefined}\n disabled={false}\n valid={false}\n onChange={inputText.handleChange}\n inputColor\n />\n <ButtonLink {...buttonLink} />\n </div>\n </>\n );\n};\n\nIconEditor.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nIconEditor.propTypes = propTypes;\n\nexport default IconEditor;\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,SAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,MAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAmD,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAA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,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAtD,OAAA,GAElBc,UAAU","ignoreList":[]}
@@ -2,11 +2,11 @@
2
2
  @value cm_grey_700 from colors;
3
3
 
4
4
  .inputButtonContainer {
5
- display: flex;
6
- align-items: flex-start;;
7
- gap: 8px;
8
- }
5
+ display: flex;
6
+ align-items: flex-start;
7
+ gap: 8px;
8
+ }
9
9
 
10
10
  .inputButtonContainer button {
11
11
  width: 137px;
12
- }
12
+ }
@@ -0,0 +1,77 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ import { IconPreviewProps } from '../../molecule/icon-preview/types';
4
+ import InputText from '../../atom/input-text';
5
+ import { ButtonLinkProps } from '../../atom/button-link/types';
6
+ declare const IconEditorPropTypes: {
7
+ iconPreview: PropTypes.Requireable<PropTypes.InferProps<{
8
+ title: PropTypes.Requireable<string>;
9
+ icon: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
10
+ name: PropTypes.Validator<string>;
11
+ color: PropTypes.Requireable<string>;
12
+ }>>>;
13
+ }>>;
14
+ inputText: PropTypes.Requireable<PropTypes.InferProps<{
15
+ autoFocus: PropTypes.Requireable<boolean>;
16
+ title: PropTypes.Requireable<string>;
17
+ placeholder: PropTypes.Requireable<string>;
18
+ defaultValue: PropTypes.Requireable<string>;
19
+ theme: PropTypes.Requireable<string>;
20
+ disabled: PropTypes.Requireable<boolean>;
21
+ value: PropTypes.Requireable<string>;
22
+ hint: PropTypes.Requireable<string>;
23
+ error: PropTypes.Requireable<string>;
24
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
25
+ description: PropTypes.Requireable<string>;
26
+ modified: PropTypes.Requireable<boolean>;
27
+ type: PropTypes.Requireable<string>;
28
+ valid: PropTypes.Requireable<boolean>;
29
+ 'aria-label': PropTypes.Requireable<string>;
30
+ 'data-name': PropTypes.Requireable<string>;
31
+ inputColor: PropTypes.Requireable<boolean>;
32
+ }>>;
33
+ buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
34
+ type: PropTypes.Requireable<string>;
35
+ usage: PropTypes.Requireable<string>;
36
+ label: PropTypes.Requireable<string>;
37
+ content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
38
+ 'aria-label': PropTypes.Requireable<string>;
39
+ tooltipText: PropTypes.Requireable<string>;
40
+ tooltipPlacement: PropTypes.Requireable<string>;
41
+ 'data-name': PropTypes.Requireable<string>;
42
+ 'data-testid': PropTypes.Requireable<string>;
43
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
44
+ position: PropTypes.Requireable<string>;
45
+ type: PropTypes.Requireable<string>;
46
+ faIcon: PropTypes.Requireable<PropTypes.InferProps<{
47
+ name: PropTypes.Validator<string>;
48
+ color: PropTypes.Requireable<string>;
49
+ backgroundColor: PropTypes.Requireable<string>;
50
+ size: PropTypes.Requireable<number>;
51
+ customStyle: PropTypes.Requireable<{
52
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
53
+ }>;
54
+ }>>;
55
+ }>>;
56
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
57
+ link: PropTypes.Requireable<PropTypes.InferProps<{
58
+ href: PropTypes.Requireable<string>;
59
+ download: PropTypes.Requireable<boolean>;
60
+ target: PropTypes.Requireable<string>;
61
+ }>>;
62
+ hoverBackgroundColor: PropTypes.Requireable<string>;
63
+ hoverColor: PropTypes.Requireable<string>;
64
+ disabled: PropTypes.Requireable<boolean>;
65
+ className: PropTypes.Requireable<string>;
66
+ customStyle: PropTypes.Requireable<{
67
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
68
+ }>;
69
+ }>>;
70
+ };
71
+ export default IconEditorPropTypes;
72
+ export declare type IconEditorProps = {
73
+ iconPreview: IconPreviewProps;
74
+ inputText: React.ComponentProps<typeof InputText>;
75
+ buttonLink?: ButtonLinkProps;
76
+ };
77
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAEnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,oBAAY,eAAe,GAAG;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _propTypes = _interopRequireDefault(require("prop-types"));
6
+ var _iconPreview = _interopRequireDefault(require("../../molecule/icon-preview"));
7
+ var _inputText = _interopRequireDefault(require("../../atom/input-text"));
8
+ var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const IconEditorPropTypes = {
11
+ iconPreview: _propTypes.default.shape(_iconPreview.default.propTypes),
12
+ inputText: _propTypes.default.shape(_inputText.default.propTypes),
13
+ buttonLink: _propTypes.default.shape(_buttonLink.default.propTypes)
14
+ };
15
+ var _default = exports.default = IconEditorPropTypes;
16
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_iconPreview","_inputText","_buttonLink","e","__esModule","default","IconEditorPropTypes","iconPreview","PropTypes","shape","IconPreview","propTypes","inputText","InputText","buttonLink","ButtonLink","_default","exports"],"sources":["../../../src/organism/icon-editor/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {IconPreviewProps} from '../../molecule/icon-preview/types';\nimport IconPreview from '../../molecule/icon-preview';\nimport InputText from '../../atom/input-text';\nimport ButtonLink from '../../atom/button-link';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\n\nconst IconEditorPropTypes = {\n iconPreview: PropTypes.shape(IconPreview.propTypes),\n inputText: PropTypes.shape(InputText.propTypes),\n buttonLink: PropTypes.shape(ButtonLink.propTypes)\n};\n\nexport default IconEditorPropTypes;\n\nexport type IconEditorProps = {\n iconPreview: IconPreviewProps;\n inputText: React.ComponentProps<typeof InputText>;\n buttonLink?: ButtonLinkProps;\n};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgD,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGhD,MAAMG,mBAAmB,GAAG;EAC1BC,WAAW,EAAEC,kBAAS,CAACC,KAAK,CAACC,oBAAW,CAACC,SAAS,CAAC;EACnDC,SAAS,EAAEJ,kBAAS,CAACC,KAAK,CAACI,kBAAS,CAACF,SAAS,CAAC;EAC/CG,UAAU,EAAEN,kBAAS,CAACC,KAAK,CAACM,mBAAU,CAACJ,SAAS;AAClD,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAEaC,mBAAmB","ignoreList":[]}
@@ -145,5 +145,6 @@
145
145
  }
146
146
 
147
147
  .checked {
148
- outline: 2px solid cm_primary_blue;
149
- }
148
+ border: 2px solid cm_primary_blue;
149
+ padding: 10px 14px;
150
+ }