@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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AAoDA,gDAkCC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AAsDA,gDAkCC"}
@@ -20,9 +20,11 @@ const getTitleStyle = (type, size) => {
20
20
  return style.xlStrongTitle;
21
21
  case 'medium':
22
22
  return style.mediumTitleFormGroup;
23
+ case 'medium-light-color':
24
+ return style.mediumAndLightColorTitleFormGroup;
23
25
  case 'small':
24
26
  return style.smallTitleFormGroup;
25
- case 'smallAndLight':
27
+ case 'small-and-light':
26
28
  return style.smallAndLightTitleFormGroup;
27
29
  }
28
30
  }
@@ -84,7 +86,7 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
84
86
  subtitle: PropTypes.string,
85
87
  type: PropTypes.oneOf(['page', 'form-group']),
86
88
  'data-name': PropTypes.string,
87
- titleSize: PropTypes.oneOf(['xl-strong', 'standard', 'standard-light-weight', 'medium', 'small', 'smallAndLight']),
89
+ titleSize: PropTypes.oneOf(['xl-strong', 'standard', 'standard-light-weight', 'medium', 'medium-light-color', 'small', 'small-and-light']),
88
90
  subtitleSize: PropTypes.oneOf(['standard', 'standard-without-margin', 'medium', 'small', 'small-without-margin', 'extra-small']),
89
91
  icon: PropTypes.shape(Icon.propTypes),
90
92
  tag: PropTypes.shape(Tag.propTypes),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","ButtonLink","style","getTitleStyle","type","size","titlePage","titleFormGroup","titleFormGroupLightWeight","xlStrongTitle","mediumTitleFormGroup","smallTitleFormGroup","smallAndLightTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","subtitleFormGroupWithoutMargin","mediumSubtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","button","required","titleStyle","subtitleStyle","subtitleSection","createElement","className","container","_extends","titleContainer","_isEmpty","propTypes","process","env","NODE_ENV","string","oneOf","shape","bool"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'standard-light-weight':\n return style.titleFormGroupLightWeight;\n case 'xl-strong':\n return style.xlStrongTitle;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n case 'smallAndLight':\n return style.smallAndLightTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'standard-without-margin':\n return style.subtitleFormGroupWithoutMargin;\n case 'medium':\n return style.mediumSubtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag,\n button,\n required\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div className={style.titleContainer}>\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n {required ? <span className={style.required}>*</span> : null}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n {!isEmpty(button) ? <ButtonLink {...button} /> : null}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf([\n 'xl-strong',\n 'standard',\n 'standard-light-weight',\n 'medium',\n 'small',\n 'smallAndLight'\n ]),\n subtitleSize: PropTypes.oneOf([\n 'standard',\n 'standard-without-margin',\n 'medium',\n 'small',\n 'small-without-margin',\n 'extra-small'\n ]),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes),\n button: PropTypes.shape(ButtonLink.propTypes),\n required: PropTypes.bool\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,GAAG,MAAM,QAAQ;AACxB,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,aAAa,GAAGA,CAACC,IAAI,EAAEC,IAAI,KAAK;EACpC,QAAQD,IAAI;IACV,KAAK,MAAM;MACT,OAAOF,KAAK,CAACI,SAAS;IACxB,KAAK,YAAY;MACf,QAAQD,IAAI;QACV,KAAK,UAAU;UACb,OAAOH,KAAK,CAACK,cAAc;QAC7B,KAAK,uBAAuB;UAC1B,OAAOL,KAAK,CAACM,yBAAyB;QACxC,KAAK,WAAW;UACd,OAAON,KAAK,CAACO,aAAa;QAC5B,KAAK,QAAQ;UACX,OAAOP,KAAK,CAACQ,oBAAoB;QACnC,KAAK,OAAO;UACV,OAAOR,KAAK,CAACS,mBAAmB;QAClC,KAAK,eAAe;UAClB,OAAOT,KAAK,CAACU,2BAA2B;MAC5C;EACJ;AACF,CAAC;AAED,MAAMC,gBAAgB,GAAGA,CAACT,IAAI,EAAEC,IAAI,KAAK;EACvC,QAAQD,IAAI;IACV,KAAK,MAAM;MACT,OAAOF,KAAK,CAACY,YAAY;IAC3B,KAAK,YAAY;MACf,QAAQT,IAAI;QACV,KAAK,UAAU;UACb,OAAOH,KAAK,CAACa,iBAAiB;QAChC,KAAK,yBAAyB;UAC5B,OAAOb,KA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,CAAC6B;EAAS,GAAC,GAAO,CAAC,GAAG,IAAI,EAC3DF,GAAG,gBAAGhC,KAAA,CAAAsC,aAAA,CAACnC,GAAG,EAAK6B,GAAM,CAAC,GAAG,IACvB,CAAC,EACLK,eACE,CAAC,EACL,CAACM,QAAA,CAAQV,MAAM,CAAC,gBAAGjC,KAAA,CAAAsC,aAAA,CAAClC,UAAU,EAAK6B,MAAS,CAAC,GAAG,IAC9C,CACF,CAAC;AAEV,CAAC;AAEDT,KAAK,CAACoB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAChBrB,KAAK,EAAEzB,SAAS,CAAC+C,MAAM;EACvBrB,QAAQ,EAAE1B,SAAS,CAAC+C,MAAM;EAC1BzC,IAAI,EAAEN,SAAS,CAACgD,KAAK,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;EAC7C,WAAW,EAAEhD,SAAS,CAAC+C,MAAM;EAC7BnB,SAAS,EAAE5B,SAAS,CAACgD,KAAK,CAAC,CACzB,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,QAAQ,EACR,OAAO,EACP,eAAe,CAChB,CAAC;EACFnB,YAAY,EAAE7B,SAAS,CAACgD,KAAK,CAAC,CAC5B,UAAU,EACV,yBAAyB,EACzB,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,aAAa,CACd,CAAC;EACFlB,IAAI,EAAE9B,SAAS,CAACiD,KAAK,CAAChD,IAAI,CAAC0C,SAAS,CAAC;EACrCZ,GAAG,EAAE/B,SAAS,CAACiD,KAAK,CAAC/C,GAAG,CAACyC,SAAS,CAAC;EACnCX,MAAM,EAAEhC,SAAS,CAACiD,KAAK,CAAC9C,UAAU,CAACwC,SAAS,CAAC;EAC7CV,QAAQ,EAAEjC,SAAS,CAACkD;AACtB,CAAC;AACD,eAAe3B,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","ButtonLink","style","getTitleStyle","type","size","titlePage","titleFormGroup","titleFormGroupLightWeight","xlStrongTitle","mediumTitleFormGroup","mediumAndLightColorTitleFormGroup","smallTitleFormGroup","smallAndLightTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","subtitleFormGroupWithoutMargin","mediumSubtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","button","required","titleStyle","subtitleStyle","subtitleSection","createElement","className","container","_extends","titleContainer","_isEmpty","propTypes","process","env","NODE_ENV","string","oneOf","shape","bool"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'standard-light-weight':\n return style.titleFormGroupLightWeight;\n case 'xl-strong':\n return style.xlStrongTitle;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'medium-light-color':\n return style.mediumAndLightColorTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n case 'small-and-light':\n return style.smallAndLightTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'standard-without-margin':\n return style.subtitleFormGroupWithoutMargin;\n case 'medium':\n return style.mediumSubtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag,\n button,\n required\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div className={style.titleContainer}>\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n {required ? <span className={style.required}>*</span> : null}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n {!isEmpty(button) ? <ButtonLink {...button} /> : null}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf([\n 'xl-strong',\n 'standard',\n 'standard-light-weight',\n 'medium',\n 'medium-light-color',\n 'small',\n 'small-and-light'\n ]),\n subtitleSize: PropTypes.oneOf([\n 'standard',\n 'standard-without-margin',\n 'medium',\n 'small',\n 'small-without-margin',\n 'extra-small'\n ]),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes),\n button: PropTypes.shape(ButtonLink.propTypes),\n required: PropTypes.bool\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,GAAG,MAAM,QAAQ;AACxB,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,aAAa,GAAGA,CAACC,IAAI,EAAEC,IAAI,KAAK;EACpC,QAAQD,IAAI;IACV,KAAK,MAAM;MACT,OAAOF,KAAK,CAACI,SAAS;IACxB,KAAK,YAAY;MACf,QAAQD,IAAI;QACV,KAAK,UAAU;UACb,OAAOH,KAAK,CAACK,cAAc;QAC7B,KAAK,uBAAuB;UAC1B,O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ACvB,QAAQ,EACR,oBAAoB,EACpB,OAAO,EACP,iBAAiB,CAClB,CAAC;EACFnB,YAAY,EAAE9B,SAAS,CAACiD,KAAK,CAAC,CAC5B,UAAU,EACV,yBAAyB,EACzB,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,aAAa,CACd,CAAC;EACFlB,IAAI,EAAE/B,SAAS,CAACkD,KAAK,CAACjD,IAAI,CAAC2C,SAAS,CAAC;EACrCZ,GAAG,EAAEhC,SAAS,CAACkD,KAAK,CAAChD,GAAG,CAAC0C,SAAS,CAAC;EACnCX,MAAM,EAAEjC,SAAS,CAACkD,KAAK,CAAC/C,UAAU,CAACyC,SAAS,CAAC;EAC7CV,QAAQ,EAAElC,SAAS,CAACmD;AACtB,CAAC;AACD,eAAe3B,KAAK","ignoreList":[]}
@@ -55,6 +55,12 @@
55
55
  font-size: 16px;
56
56
  }
57
57
 
58
+ .mediumAndLightColorTitleFormGroup {
59
+ composes: mediumTitleFormGroup;
60
+ color: cm_grey_500;
61
+ font-weight: 600;
62
+ }
63
+
58
64
  .smallTitleFormGroup {
59
65
  composes: title;
60
66
  font-size: 14px;
@@ -3,7 +3,7 @@ export declare type TitleProps = {
3
3
  subtitle: string;
4
4
  type: 'page' | 'form-group';
5
5
  'data-name'?: string;
6
- titleSize: 'xl-strong' | 'standard' | 'standard-light-weight' | 'medium' | 'small' | 'smallAndLight';
6
+ titleSize: 'xl-strong' | 'standard' | 'standard-light-weight' | 'medium' | 'medium-light-color' | 'small' | 'small-and-light';
7
7
  subtitleSize: 'standard' | 'medium' | 'small-without-margin' | 'small' | 'extra-small';
8
8
  required: boolean;
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/title/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EACL,WAAW,GACX,UAAU,GACV,uBAAuB,GACvB,QAAQ,GACR,OAAO,GACP,eAAe,CAAC;IACpB,YAAY,EAAE,UAAU,GAAG,QAAQ,GAAG,sBAAsB,GAAG,OAAO,GAAG,aAAa,CAAC;IACvF,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/title/types.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EACL,WAAW,GACX,UAAU,GACV,uBAAuB,GACvB,QAAQ,GACR,oBAAoB,GACpB,OAAO,GACP,iBAAiB,CAAC;IACtB,YAAY,EAAE,UAAU,GAAG,QAAQ,GAAG,sBAAsB,GAAG,OAAO,GAAG,aAAa,CAAC;IACvF,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/atom/title/types.ts"],"sourcesContent":["export type TitleProps = {\n title: string;\n subtitle: string;\n type: 'page' | 'form-group';\n 'data-name'?: string;\n titleSize:\n | 'xl-strong'\n | 'standard'\n | 'standard-light-weight'\n | 'medium'\n | 'small'\n | 'smallAndLight';\n subtitleSize: 'standard' | 'medium' | 'small-without-margin' | 'small' | 'extra-small';\n required: boolean;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/atom/title/types.ts"],"sourcesContent":["export type TitleProps = {\n title: string;\n subtitle: string;\n type: 'page' | 'form-group';\n 'data-name'?: string;\n titleSize:\n | 'xl-strong'\n | 'standard'\n | 'standard-light-weight'\n | 'medium'\n | 'medium-light-color'\n | 'small'\n | 'small-and-light';\n subtitleSize: 'standard' | 'medium' | 'small-without-margin' | 'small' | 'extra-small';\n required: boolean;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,11 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { IconPreviewProps } from './types';
3
+ declare const IconPreview: {
4
+ (props: IconPreviewProps): JSX.Element;
5
+ propTypes: {
6
+ title: import("prop-types").Requireable<string>;
7
+ icon: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
8
+ name: import("prop-types").Validator<string>;
9
+ color: import("prop-types").Requireable<string>;
10
+ }>>>;
11
+ };
12
+ };
1
13
  export default IconPreview;
2
- declare function IconPreview(props: any): JSX.Element;
3
- declare namespace IconPreview {
4
- namespace propTypes {
5
- const iconName: PropTypes.Validator<string>;
6
- const iconColor: PropTypes.Requireable<string>;
7
- const title: PropTypes.Requireable<string>;
8
- }
9
- }
10
- import PropTypes from "prop-types";
11
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/index.js"],"names":[],"mappings":";AAMA,sDAuBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAGpD,QAAA,MAAM,WAAW;YAAW,gBAAgB;;;;;;;;CAyB3C,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -1,39 +1,34 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import FaIcon from '../../atom/icon';
4
3
  import { createGradientBackground } from '../../util/get-background-gradient-color';
4
+ import propTypes from './types';
5
5
  import style from './style.css';
6
6
  const IconPreview = props => {
7
7
  const {
8
- iconName,
9
- iconColor,
8
+ icon,
10
9
  title
11
10
  } = props;
12
11
  return /*#__PURE__*/React.createElement("div", {
13
12
  className: style.iconPreviewWrapper,
14
13
  style: {
15
- background: createGradientBackground(iconColor, '93%', '100%')
14
+ background: createGradientBackground(icon.color, '93%', '100%')
16
15
  }
17
16
  }, /*#__PURE__*/React.createElement("div", {
18
17
  className: style.iconPreview
19
18
  }, /*#__PURE__*/React.createElement("div", {
20
19
  className: style.iconWrapper
21
20
  }, /*#__PURE__*/React.createElement(FaIcon, {
22
- iconName: iconName,
23
- iconColor: iconColor,
24
- gradientBackground: true,
21
+ iconName: icon.name,
22
+ iconColor: icon.color,
25
23
  size: {
26
24
  faSize: 36,
27
25
  wrapperSize: 80
28
- }
26
+ },
27
+ gradientBackground: true
29
28
  })), /*#__PURE__*/React.createElement("div", {
30
29
  className: style.titleWrapper
31
30
  }, title)));
32
31
  };
33
- IconPreview.propTypes = process.env.NODE_ENV !== "production" ? {
34
- iconName: PropTypes.string.isRequired,
35
- iconColor: PropTypes.string,
36
- title: PropTypes.string
37
- } : {};
32
+ IconPreview.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
38
33
  export default IconPreview;
39
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","FaIcon","createGradientBackground","style","IconPreview","props","iconName","iconColor","title","createElement","className","iconPreviewWrapper","background","iconPreview","iconWrapper","gradientBackground","size","faSize","wrapperSize","titleWrapper","propTypes","process","env","NODE_ENV","string","isRequired"],"sources":["../../../src/molecule/icon-preview/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport FaIcon from '../../atom/icon';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport style from './style.css';\n\nconst IconPreview = props => {\n const {iconName, iconColor, title} = props;\n return (\n <div\n className={style.iconPreviewWrapper}\n style={{background: createGradientBackground(iconColor, '93%', '100%')}}\n >\n <div className={style.iconPreview}>\n <div className={style.iconWrapper}>\n <FaIcon\n iconName={iconName}\n iconColor={iconColor}\n gradientBackground\n size={{\n faSize: 36,\n wrapperSize: 80\n }}\n />\n </div>\n <div className={style.titleWrapper}>{title}</div>\n </div>\n </div>\n );\n};\n\nIconPreview.propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n title: PropTypes.string\n};\n\nexport default IconPreview;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IAACC,QAAQ;IAAEC,SAAS;IAAEC;EAAK,CAAC,GAAGH,KAAK;EAC1C,oBACEN,KAAA,CAAAU,aAAA;IACEC,SAAS,EAAEP,KAAK,CAACQ,kBAAmB;IACpCR,KAAK,EAAE;MAACS,UAAU,EAAEV,wBAAwB,CAACK,SAAS,EAAE,KAAK,EAAE,MAAM;IAAC;EAAE,gBAExER,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAEP,KAAK,CAACU;EAAY,gBAChCd,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAEP,KAAK,CAACW;EAAY,gBAChCf,KAAA,CAAAU,aAAA,CAACR,MAAM;IACLK,QAAQ,EAAEA,QAAS;IACnBC,SAAS,EAAEA,SAAU;IACrBQ,kBAAkB;IAClBC,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE;IACf;EAAE,CACH,CACE,CAAC,eACNnB,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAEP,KAAK,CAACgB;EAAa,GAAEX,KAAW,CAC7C,CACF,CAAC;AAEV,CAAC;AAEDJ,WAAW,CAACgB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACtBjB,QAAQ,EAAEN,SAAS,CAACwB,MAAM,CAACC,UAAU;EACrClB,SAAS,EAAEP,SAAS,CAACwB,MAAM;EAC3BhB,KAAK,EAAER,SAAS,CAACwB;AACnB,CAAC;AAED,eAAepB,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","FaIcon","createGradientBackground","propTypes","style","IconPreview","props","icon","title","createElement","className","iconPreviewWrapper","background","color","iconPreview","iconWrapper","iconName","name","iconColor","size","faSize","wrapperSize","gradientBackground","titleWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/icon-preview/index.tsx"],"sourcesContent":["import React from 'react';\nimport FaIcon from '../../atom/icon';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport propTypes, {IconPreviewProps} from './types';\nimport style from './style.css';\n\nconst IconPreview = (props: IconPreviewProps) => {\n const {icon, title} = props;\n return (\n <div\n className={style.iconPreviewWrapper}\n style={{background: createGradientBackground(icon.color, '93%', '100%')}}\n >\n <div className={style.iconPreview}>\n <div className={style.iconWrapper}>\n <FaIcon\n {...{\n iconName: icon.name,\n iconColor: icon.color,\n size: {\n faSize: 36,\n wrapperSize: 80\n },\n gradientBackground: true\n }}\n />\n </div>\n <div className={style.titleWrapper}>{title}</div>\n </div>\n </div>\n );\n};\n\nIconPreview.propTypes = propTypes;\n\nexport default IconPreview;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,SAAS,MAA0B,SAAS;AACnD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EAC/C,MAAM;IAACC,IAAI;IAAEC;EAAK,CAAC,GAAGF,KAAK;EAC3B,oBACEN,KAAA,CAAAS,aAAA;IACEC,SAAS,EAAEN,KAAK,CAACO,kBAAmB;IACpCP,KAAK,EAAE;MAACQ,UAAU,EAAEV,wBAAwB,CAACK,IAAI,CAACM,KAAK,EAAE,KAAK,EAAE,MAAM;IAAC;EAAE,gBAEzEb,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACU;EAAY,gBAChCd,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACW;EAAY,gBAChCf,KAAA,CAAAS,aAAA,CAACR,MAAM;IAEHe,QAAQ,EAAET,IAAI,CAACU,IAAI;IACnBC,SAAS,EAAEX,IAAI,CAACM,KAAK;IACrBM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE;IACf,CAAC;IACDC,kBAAkB,EAAE;EAAI,CAE3B,CACE,CAAC,eACNtB,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACmB;EAAa,GAAEf,KAAW,CAC7C,CACF,CAAC;AAEV,CAAC;AAEDH,WAAW,CAACF,SAAS,GAAAqB,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGvB,SAAS;AAEjC,eAAeE,WAAW","ignoreList":[]}
@@ -2,7 +2,6 @@
2
2
  @value cm_grey_700 from colors;
3
3
 
4
4
  .iconPreviewWrapper {
5
- padding: 32px;
6
5
  border-radius: 8px;
7
6
  }
8
7
 
@@ -0,0 +1,18 @@
1
+ import PropTypes from 'prop-types';
2
+ declare const IconPreviewPropTypes: {
3
+ title: PropTypes.Requireable<string>;
4
+ icon: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
5
+ name: PropTypes.Validator<string>;
6
+ color: PropTypes.Requireable<string>;
7
+ }>>>;
8
+ };
9
+ export default IconPreviewPropTypes;
10
+ declare type IconProps = {
11
+ name: string;
12
+ color?: string;
13
+ };
14
+ export declare type IconPreviewProps = {
15
+ title?: string;
16
+ icon: IconProps;
17
+ };
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,QAAA,MAAM,oBAAoB;;;;;;CAGzB,CAAC;AAEF,eAAe,oBAAoB,CAAC;AAEpC,aAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import PropTypes from 'prop-types';
2
+ const IconPropTypes = {
3
+ name: PropTypes.string.isRequired,
4
+ color: PropTypes.string
5
+ };
6
+ const IconPreviewPropTypes = {
7
+ title: PropTypes.string,
8
+ icon: PropTypes.shape(IconPropTypes).isRequired
9
+ };
10
+ export default IconPreviewPropTypes;
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","IconPropTypes","name","string","isRequired","color","IconPreviewPropTypes","title","icon","shape"],"sources":["../../../src/molecule/icon-preview/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst IconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string\n};\n\nconst IconPreviewPropTypes = {\n title: PropTypes.string,\n icon: PropTypes.shape(IconPropTypes).isRequired\n};\n\nexport default IconPreviewPropTypes;\n\ntype IconProps = {\n name: string;\n color?: string;\n};\n\nexport type IconPreviewProps = {\n title?: string;\n icon: IconProps;\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,MAAMC,aAAa,GAAG;EACpBC,IAAI,EAAEF,SAAS,CAACG,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEL,SAAS,CAACG;AACnB,CAAC;AAED,MAAMG,oBAAoB,GAAG;EAC3BC,KAAK,EAAEP,SAAS,CAACG,MAAM;EACvBK,IAAI,EAAER,SAAS,CAACS,KAAK,CAACR,aAAa,CAAC,CAACG;AACvC,CAAC;AAED,eAAeE,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAQA,OAAmC,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAK3E,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAQA,OAAmC,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAO3E,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -9,6 +9,10 @@ import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
9
9
  import headerWithActionsPropTypes from './types';
10
10
  import style from './style.css';
11
11
  const getDataName = suffix => `header-with-actions-${suffix}`;
12
+ // @ts-expect-error (need to get the index)
13
+ const uncappedMap = map.convert({
14
+ cap: false
15
+ });
12
16
  const HeaderWithActions = props => {
13
17
  const {
14
18
  closeButton,
@@ -41,7 +45,11 @@ const HeaderWithActions = props => {
41
45
  "data-name": getDataName('buttons-wrapper')
42
46
  }, bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? /*#__PURE__*/React.createElement(BulletPointMenuButton, _extends({}, bulletPointMenuButton, {
43
47
  buttonAriaLabel: "More actions"
44
- })) : null, map(action => /*#__PURE__*/React.createElement(ButtonLink, action))(actionButtons)));
48
+ })) : null, uncappedMap((action, key) => {
49
+ return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, action, {
50
+ key: key
51
+ }));
52
+ }, actionButtons)));
45
53
  };
46
54
  HeaderWithActions.propTypes = process.env.NODE_ENV !== "production" ? headerWithActionsPropTypes : {};
47
55
  export default HeaderWithActions;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","BulletPointMenuButton","headerWithActionsPropTypes","style","getDataName","suffix","HeaderWithActions","props","closeButton","title","tag","saveStatus","bulletPointMenuButton","actionButtons","createElement","className","headerWrapper","titleAndButtonWrapper","_extends","button","titleWrapper","statusWrapper","display","label","buttonsWrapper","buttons","buttonAriaLabel","action","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport headerWithActionsPropTypes, {HeaderWithActionsProps} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {closeButton, title, tag, saveStatus, bulletPointMenuButton, actionButtons} = props;\n\n return (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={style.titleAndButtonWrapper}\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon {...closeButton} className={style.button} />\n <div className={style.titleWrapper}>\n <div className={style.statusWrapper}>\n <Tag {...tag} />\n {saveStatus.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n <h3 className={style.title} aria-label={title} data-name={getDataName('title')}>\n {title}\n </h3>\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} buttonAriaLabel=\"More actions\" />\n ) : null}\n {map((action: ButtonLinkProps) => <ButtonLink {...action} />)(actionButtons)}\n </div>\n </div>\n );\n};\n\nHeaderWithActions.propTypes = headerWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAEhC,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAAgC,SAAS;AAC1E,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,MAAc,IAAK,uBAAuBA,MAAM,EAAE;AAEvE,MAAMC,iBAAiB,GAAIC,KAA6B,IAAK;EAC3D,MAAM;IAACC,WAAW;IAAEC,KAAK;IAAEC,GAAG;IAAEC,UAAU;IAAEC,qBAAqB;IAAEC;EAAa,CAAC,GAAGN,KAAK;EAEzF,oBACEZ,KAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAEZ,KAAK,CAACa,aAAc;IAAC,aAAWZ,WAAW,CAAC,SAAS;EAAE,gBACrET,KAAA,CAAAmB,aAAA;IACEC,SAAS,EAAEZ,KAAK,CAACc,qBAAsB;IACvC,aAAWb,WAAW,CAAC,0BAA0B;EAAE,gBAEnDT,KAAA,CAAAmB,aAAA,CAACf,cAAc,EAAAmB,QAAA,KAAKV,WAAW;IAAEO,SAAS,EAAEZ,KAAK,CAACgB;EAAO,EAAE,CAAC,eAC5DxB,KAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAEZ,KAAK,CAACiB;EAAa,gBACjCzB,KAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAEZ,KAAK,CAACkB;EAAc,gBAClC1B,KAAA,CAAAmB,aAAA,CAACd,GAAG,EAAKU,GAAM,CAAC,EACfC,UAAU,CAACW,OAAO,IAAIX,UAAU,CAACY,KAAK,gBACrC5B,KAAA,CAAAmB,aAAA;IAAGC,SAAS,EAAEZ,KAAK,CAACQ;EAAW,GAAEA,UAAU,CAACY,KAAS,CAAC,GACpD,IACD,CAAC,eACN5B,KAAA,CAAAmB,aAAA;IAAIC,SAAS,EAAEZ,KAAK,CAACM,KAAM;IAAC,cAAYA,KAAM;IAAC,aAAWL,WAAW,CAAC,OAAO;EAAE,GAC5EK,KACC,CACD,CACF,CAAC,eACNd,KAAA,CAAAmB,aAAA;IAAKC,SAAS,EAAEZ,KAAK,CAACqB,cAAe;IAAC,aAAWpB,WAAW,CAAC,iBAAiB;EAAE,GAC7EQ,qBAAqB,IAAI,CAAChB,OAAO,CAACgB,qBAAqB,CAACa,OAAO,CAAC,gBAC/D9B,KAAA,CAAAmB,aAAA,CAACb,qBAAqB,EAAAiB,QAAA,KAAKN,qBAAqB;IAAEc,eAAe,EAAC;EAAc,EAAE,CAAC,GACjF,IAAI,EACP7B,GAAG,CAAE8B,MAAuB,iBAAKhC,KAAA,CAAAmB,aAAA,CAAChB,UAAU,EAAK6B,MAAS,CAAC,CAAC,CAACd,aAAa,CACxE,CACF,CAAC;AAEV,CAAC;AAEDP,iBAAiB,CAACsB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG7B,0BAA0B;AAExD,eAAeI,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","BulletPointMenuButton","headerWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","HeaderWithActions","props","closeButton","title","tag","saveStatus","bulletPointMenuButton","actionButtons","createElement","className","headerWrapper","titleAndButtonWrapper","_extends","button","titleWrapper","statusWrapper","display","label","buttonsWrapper","buttons","buttonAriaLabel","action","key","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport headerWithActionsPropTypes, {HeaderWithActionsProps} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {closeButton, title, tag, saveStatus, bulletPointMenuButton, actionButtons} = props;\n\n return (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={style.titleAndButtonWrapper}\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon {...closeButton} className={style.button} />\n <div className={style.titleWrapper}>\n <div className={style.statusWrapper}>\n <Tag {...tag} />\n {saveStatus.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n <h3 className={style.title} aria-label={title} data-name={getDataName('title')}>\n {title}\n </h3>\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} buttonAriaLabel=\"More actions\" />\n ) : null}\n {uncappedMap((action: ButtonLinkProps, key: string) => {\n return <ButtonLink {...action} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n );\n};\n\nHeaderWithActions.propTypes = headerWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;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CAAC,OAAO;EAAE,GAC5EQ,KACC,CACD,CACF,CAAC,eACNjB,KAAA,CAAAsB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACwB,cAAe;IAAC,aAAWvB,WAAW,CAAC,iBAAiB;EAAE,GAC7EW,qBAAqB,IAAI,CAACnB,OAAO,CAACmB,qBAAqB,CAACa,OAAO,CAAC,gBAC/DjC,KAAA,CAAAsB,aAAA,CAAChB,qBAAqB,EAAAoB,QAAA,KAAKN,qBAAqB;IAAEc,eAAe,EAAC;EAAc,EAAE,CAAC,GACjF,IAAI,EACPvB,WAAW,CAAC,CAACwB,MAAuB,EAAEC,GAAW,KAAK;IACrD,oBAAOpC,KAAA,CAAAsB,aAAA,CAACnB,UAAU,EAAAuB,QAAA,KAAKS,MAAM;MAAEC,GAAG,EAAEA;IAAI,EAAE,CAAC;EAC7C,CAAC,EAAEf,aAAa,CACb,CACF,CAAC;AAEV,CAAC;AAEDP,iBAAiB,CAACuB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGjC,0BAA0B;AAExD,eAAeO,iBAAiB","ignoreList":[]}
@@ -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"}
@@ -1,62 +1,49 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import IconPreview from '../../molecule/icon-preview';
4
3
  import InputText from '../../atom/input-text';
5
4
  import ButtonLink from '../../atom/button-link';
6
- import Provider from '../../atom/provider';
5
+ import Provider, { GetTranslateFromContext } from '../../atom/provider';
7
6
  import { validateColor } from '../../util/validate-color';
7
+ import { COLORS } from '../../variables/colors';
8
8
  import style from './style.css';
9
- const IconEditor = (props, context) => {
9
+ import propTypes from './types';
10
+ const IconEditor = (props, legacyContext) => {
11
+ const translate = GetTranslateFromContext(legacyContext);
10
12
  const {
11
- iconName,
12
- title,
13
- iconColor,
14
- buttonLink,
15
- handleChange
13
+ iconPreview,
14
+ inputText,
15
+ buttonLink
16
16
  } = props;
17
17
  const {
18
- translate
19
- } = context;
20
- const isValidColor = validateColor(iconColor);
18
+ title,
19
+ icon
20
+ } = iconPreview;
21
+ const isValidColor = validateColor(icon.color);
21
22
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPreview, {
22
- iconName: iconName,
23
- title: title,
24
- iconColor: isValidColor ? iconColor : '#FFFFFF'
23
+ icon: {
24
+ ...icon,
25
+ color: isValidColor ? icon.color : COLORS.white
26
+ },
27
+ title: title
25
28
  }), /*#__PURE__*/React.createElement("div", {
26
29
  className: style.inputButtonContainer
27
30
  }, /*#__PURE__*/React.createElement(InputText, {
28
31
  type: "text",
29
32
  title: translate('icon_editor_color'),
30
- placeholder: "#FFFFFF",
33
+ placeholder: COLORS.white,
31
34
  theme: "coorpmanager",
32
35
  description: translate('icon_editor_color'),
33
- value: iconColor,
34
- error: iconColor && !isValidColor && translate('invalid_color'),
36
+ value: icon.color,
37
+ error: icon.color && !isValidColor ? translate('invalid_color') : undefined,
35
38
  disabled: false,
36
39
  valid: false,
37
- onChange: handleChange,
40
+ onChange: inputText.handleChange,
38
41
  inputColor: true
39
42
  }), /*#__PURE__*/React.createElement(ButtonLink, buttonLink)));
40
43
  };
41
44
  IconEditor.contextTypes = {
42
45
  translate: Provider.childContextTypes.translate
43
46
  };
44
- IconEditor.propTypes = process.env.NODE_ENV !== "production" ? {
45
- iconName: PropTypes.string.isRequired,
46
- iconColor: PropTypes.string,
47
- title: PropTypes.string,
48
- handleChange: PropTypes.func.isRequired,
49
- buttonLink: PropTypes.shape({
50
- type: PropTypes.string,
51
- label: PropTypes.string,
52
- ariaLabel: PropTypes.string,
53
- dataName: PropTypes.string,
54
- icon: PropTypes.shape({
55
- position: PropTypes.string,
56
- type: PropTypes.string
57
- }),
58
- onClick: PropTypes.func
59
- })
60
- } : {};
47
+ IconEditor.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
61
48
  export default IconEditor;
62
49
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","IconPreview","InputText","ButtonLink","Provider","validateColor","style","IconEditor","props","context","iconName","title","iconColor","buttonLink","handleChange","translate","isValidColor","createElement","Fragment","className","inputButtonContainer","type","placeholder","theme","description","value","error","disabled","valid","onChange","inputColor","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","isRequired","func","shape","label","ariaLabel","dataName","icon","position","onClick"],"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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,SAAQC,aAAa,QAAO,2BAA2B;AACvD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,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,GAAGX,aAAa,CAACO,SAAS,CAAC;EAC7C,oBACEb,KAAA,CAAAkB,aAAA,CAAAlB,KAAA,CAAAmB,QAAA,qBACEnB,KAAA,CAAAkB,aAAA,CAAChB,WAAW;IACVS,QAAQ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,SAAS,CAACqC,MAAM;IAC1BO,IAAI,EAAE5C,SAAS,CAACwC,KAAK,CAAC;MACpBK,QAAQ,EAAE7C,SAAS,CAACqC,MAAM;MAC1BhB,IAAI,EAAErB,SAAS,CAACqC;IAClB,CAAC,CAAC;IACFS,OAAO,EAAE9C,SAAS,CAACuC;EACrB,CAAC;AACH,CAAC;AAED,eAAehC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","IconPreview","InputText","ButtonLink","Provider","GetTranslateFromContext","validateColor","COLORS","style","propTypes","IconEditor","props","legacyContext","translate","iconPreview","inputText","buttonLink","title","icon","isValidColor","color","createElement","Fragment","white","className","inputButtonContainer","type","placeholder","theme","description","value","error","undefined","disabled","valid","onChange","handleChange","inputColor","contextTypes","childContextTypes","process","env","NODE_ENV"],"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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,qBAAqB;AACrE,SAAQC,aAAa,QAAO,2BAA2B;AAEvD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,MAAyB,SAAS;AAElD,MAAMC,UAAU,GAAGA,CAACC,KAAsB,EAAEC,aAA+B,KAAK;EAC9E,MAAMC,SAAS,GAAGR,uBAAuB,CAACO,aAAa,CAAC;EACxD,MAAM;IAACE,WAAW;IAAEC,SAAS;IAAEC;EAAU,CAAC,GAAGL,KAAK;EAClD,MAAM;IAACM,KAAK;IAAEC;EAAI,CAAC,GAAGJ,WAAW;EAEjC,MAAMK,YAAY,GAAGb,aAAa,CAACY,IAAI,CAACE,KAAK,CAAC;EAC9C,oBACEpB,KAAA,CAAAqB,aAAA,CAAArB,KAAA,CAAAsB,QAAA,qBACEtB,KAAA,CAAAqB,aAAA,CAACpB,WAAW;IACViB,IAAI,EAAE;MAAC,GAAGA,IAAI;MAAEE,KAAK,EAAED,YAAY,GAAGD,IAAI,CAACE,KAAK,GAAGb,MAAM,CAACgB;IAAK,CAAE;IACjEN,KAAK,EAAEA;EAAM,CACd,CAAC,eACFjB,KAAA,CAAAqB,aAAA;IAAKG,SAAS,EAAEhB,KAAK,CAACiB;EAAqB,gBACzCzB,KAAA,CAAAqB,aAAA,CAACnB,SAAS;IACRwB,IAAI,EAAC,MAAM;IACXT,KAAK,EAAEJ,SAAS,CAAC,mBAAmB,CAAE;IACtCc,WAAW,EAAEpB,MAAM,CAACgB,KAAM;IAC1BK,KAAK,EAAC,cAAc;IACpBC,WAAW,EAAEhB,SAAS,CAAC,mBAAmB,CAAE;IAC5CiB,KAAK,EAAEZ,IAAI,CAACE,KAAM;IAClBW,KAAK,EAAEb,IAAI,CAACE,KAAK,IAAI,CAACD,YAAY,GAAGN,SAAS,CAAC,eAAe,CAAC,GAAGmB,SAAU;IAC5EC,QAAQ,EAAE,KAAM;IAChBC,KAAK,EAAE,KAAM;IACbC,QAAQ,EAAEpB,SAAS,CAACqB,YAAa;IACjCC,UAAU;EAAA,CACX,CAAC,eACFrC,KAAA,CAAAqB,aAAA,CAAClB,UAAU,EAAKa,UAAa,CAC1B,CACL,CAAC;AAEP,CAAC;AAEDN,UAAU,CAAC4B,YAAY,GAAG;EACxBzB,SAAS,EAAET,QAAQ,CAACmC,iBAAiB,CAAC1B;AACxC,CAAC;AAEDH,UAAU,CAACD,SAAS,GAAA+B,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGjC,SAAS;AAEhC,eAAeC,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
+ }