@coorpacademy/components 11.34.2 → 11.34.3-alpha.29

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 (215) hide show
  1. package/es/atom/button-link/index.js.map +1 -1
  2. package/es/atom/button-link/style.css +2 -2
  3. package/es/atom/cta/test/fixtures/primary.d.ts +9 -0
  4. package/es/atom/cta/test/fixtures/primary.d.ts.map +1 -0
  5. package/es/atom/cta/test/fixtures/secondary.d.ts +10 -0
  6. package/es/atom/cta/test/fixtures/secondary.d.ts.map +1 -0
  7. package/es/atom/icon/index.d.ts +30 -17
  8. package/es/atom/icon/index.d.ts.map +1 -1
  9. package/es/atom/icon/index.js +4 -6
  10. package/es/atom/icon/index.js.map +1 -1
  11. package/es/atom/radio-with-title/index.d.ts +16 -3
  12. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  13. package/es/atom/radio-with-title/types.d.ts +16 -2
  14. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  15. package/es/atom/tag/index.d.ts +15 -1
  16. package/es/atom/tag/style.css +1 -0
  17. package/es/atom/title/index.d.ts +16 -2
  18. package/es/molecule/base-modal/style.css +0 -1
  19. package/es/molecule/cm-popin/types.d.ts +33 -6
  20. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  21. package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
  22. package/es/molecule/progress-wrapper/index.js +39 -19
  23. package/es/molecule/progress-wrapper/index.js.map +1 -1
  24. package/es/molecule/progress-wrapper/style.css +37 -2
  25. package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  26. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  27. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +16 -2
  28. package/es/molecule/title-radio-wrapper/index.d.ts +16 -3
  29. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  30. package/es/molecule/title-radio-wrapper/types.d.ts +16 -2
  31. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  32. package/es/organism/cards-grid/index.d.ts +48 -10
  33. package/es/organism/cards-grid/index.d.ts.map +1 -1
  34. package/es/organism/cards-grid/index.js +3 -2
  35. package/es/organism/cards-grid/index.js.map +1 -1
  36. package/es/organism/content-skill-modal/index.d.ts +16 -3
  37. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  38. package/es/organism/content-skill-modal/types.d.ts +15 -2
  39. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  40. package/es/organism/list-item/index.js +5 -5
  41. package/es/organism/list-item/index.js.map +1 -1
  42. package/es/organism/list-item/style.css +38 -19
  43. package/es/organism/list-items/index.d.ts +16 -2
  44. package/es/organism/rewards-form/index.d.ts +16 -2
  45. package/es/organism/select-opponents/index.d.ts +16 -3
  46. package/es/organism/select-opponents/index.d.ts.map +1 -1
  47. package/es/organism/select-opponents/types.d.ts +16 -2
  48. package/es/organism/select-opponents/types.d.ts.map +1 -1
  49. package/es/organism/sidebar/index.d.ts +2 -2
  50. package/es/organism/skill-edition/index.d.ts +76 -11
  51. package/es/organism/skill-edition/index.d.ts.map +1 -1
  52. package/es/organism/skill-edition/types.d.ts +76 -10
  53. package/es/organism/skill-edition/types.d.ts.map +1 -1
  54. package/es/organism/title-and-input/index.d.ts +31 -5
  55. package/es/organism/title-and-input/index.d.ts.map +1 -1
  56. package/es/organism/title-and-input/types.d.ts +30 -4
  57. package/es/organism/title-and-input/types.d.ts.map +1 -1
  58. package/es/organism/wizard-contents/index.d.ts +16 -2
  59. package/es/template/app-player/loading/index.d.ts +33 -6
  60. package/es/template/app-player/player/index.d.ts +65 -12
  61. package/es/template/app-player/player/slides/index.d.ts +33 -6
  62. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  63. package/es/template/app-player/popin-correction/index.d.ts +32 -6
  64. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  65. package/es/template/app-player/popin-end/index.d.ts +33 -6
  66. package/es/template/app-review/index.d.ts +33 -7
  67. package/es/template/app-review/index.d.ts.map +1 -1
  68. package/es/template/app-review/player/prop-types.d.ts +33 -6
  69. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  70. package/es/template/app-review/prop-types.d.ts +33 -6
  71. package/es/template/app-review/prop-types.d.ts.map +1 -1
  72. package/es/template/back-office/brand-update/index.d.ts +138 -20
  73. package/es/template/back-office/brand-update/utils.d.ts +1 -1
  74. package/es/template/certification-detail/style.css +5 -2
  75. package/es/template/common/dashboard/index.d.ts +65 -12
  76. package/es/template/common/search-page/index.d.ts +33 -6
  77. package/es/template/external-course/index.d.ts +33 -6
  78. package/es/template/skill-detail/all-courses.d.ts +61 -17
  79. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  80. package/es/template/skill-detail/all-courses.js +12 -11
  81. package/es/template/skill-detail/all-courses.js.map +1 -1
  82. package/es/template/skill-detail/continue-learning.d.ts +25 -12
  83. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  84. package/es/template/skill-detail/continue-learning.js.map +1 -1
  85. package/es/template/skill-detail/index.d.ts +81 -71
  86. package/es/template/skill-detail/index.d.ts.map +1 -1
  87. package/es/template/skill-detail/index.js +93 -59
  88. package/es/template/skill-detail/index.js.map +1 -1
  89. package/es/template/skill-detail/style.css +96 -38
  90. package/es/variables/colors.d.ts +5 -1
  91. package/es/variables/colors.d.ts.map +1 -1
  92. package/es/variables/colors.js +6 -2
  93. package/es/variables/colors.js.map +1 -1
  94. package/lib/atom/button-link/index.js.map +1 -1
  95. package/lib/atom/button-link/style.css +2 -2
  96. package/lib/atom/cta/test/fixtures/primary.d.ts +9 -0
  97. package/lib/atom/cta/test/fixtures/primary.d.ts.map +1 -0
  98. package/lib/atom/cta/test/fixtures/secondary.d.ts +10 -0
  99. package/lib/atom/cta/test/fixtures/secondary.d.ts.map +1 -0
  100. package/lib/atom/icon/index.d.ts +30 -17
  101. package/lib/atom/icon/index.d.ts.map +1 -1
  102. package/lib/atom/icon/index.js +4 -6
  103. package/lib/atom/icon/index.js.map +1 -1
  104. package/lib/atom/radio-with-title/index.d.ts +16 -3
  105. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  106. package/lib/atom/radio-with-title/types.d.ts +16 -2
  107. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  108. package/lib/atom/tag/index.d.ts +15 -1
  109. package/lib/atom/tag/style.css +1 -0
  110. package/lib/atom/title/index.d.ts +16 -2
  111. package/lib/molecule/base-modal/style.css +0 -1
  112. package/lib/molecule/cm-popin/types.d.ts +33 -6
  113. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  114. package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
  115. package/lib/molecule/progress-wrapper/index.js +39 -19
  116. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  117. package/lib/molecule/progress-wrapper/style.css +37 -2
  118. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  119. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  120. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +16 -2
  121. package/lib/molecule/title-radio-wrapper/index.d.ts +16 -3
  122. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  123. package/lib/molecule/title-radio-wrapper/types.d.ts +16 -2
  124. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  125. package/lib/organism/cards-grid/index.d.ts +48 -10
  126. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  127. package/lib/organism/cards-grid/index.js +3 -2
  128. package/lib/organism/cards-grid/index.js.map +1 -1
  129. package/lib/organism/content-skill-modal/index.d.ts +16 -3
  130. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  131. package/lib/organism/content-skill-modal/types.d.ts +15 -2
  132. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  133. package/lib/organism/list-item/index.js +5 -5
  134. package/lib/organism/list-item/index.js.map +1 -1
  135. package/lib/organism/list-item/style.css +38 -19
  136. package/lib/organism/list-items/index.d.ts +16 -2
  137. package/lib/organism/rewards-form/index.d.ts +16 -2
  138. package/lib/organism/select-opponents/index.d.ts +16 -3
  139. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  140. package/lib/organism/select-opponents/types.d.ts +16 -2
  141. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  142. package/lib/organism/sidebar/index.d.ts +2 -2
  143. package/lib/organism/skill-edition/index.d.ts +76 -11
  144. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  145. package/lib/organism/skill-edition/types.d.ts +76 -10
  146. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  147. package/lib/organism/title-and-input/index.d.ts +31 -5
  148. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  149. package/lib/organism/title-and-input/types.d.ts +30 -4
  150. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  151. package/lib/organism/wizard-contents/index.d.ts +16 -2
  152. package/lib/template/app-player/loading/index.d.ts +33 -6
  153. package/lib/template/app-player/player/index.d.ts +65 -12
  154. package/lib/template/app-player/player/slides/index.d.ts +33 -6
  155. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  156. package/lib/template/app-player/popin-correction/index.d.ts +32 -6
  157. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  158. package/lib/template/app-player/popin-end/index.d.ts +33 -6
  159. package/lib/template/app-review/index.d.ts +33 -7
  160. package/lib/template/app-review/index.d.ts.map +1 -1
  161. package/lib/template/app-review/player/prop-types.d.ts +33 -6
  162. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  163. package/lib/template/app-review/prop-types.d.ts +33 -6
  164. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  165. package/lib/template/back-office/brand-update/index.d.ts +138 -20
  166. package/lib/template/back-office/brand-update/utils.d.ts +1 -1
  167. package/lib/template/certification-detail/style.css +5 -2
  168. package/lib/template/common/dashboard/index.d.ts +65 -12
  169. package/lib/template/common/search-page/index.d.ts +33 -6
  170. package/lib/template/external-course/index.d.ts +33 -6
  171. package/lib/template/skill-detail/all-courses.d.ts +61 -17
  172. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  173. package/lib/template/skill-detail/all-courses.js +11 -11
  174. package/lib/template/skill-detail/all-courses.js.map +1 -1
  175. package/lib/template/skill-detail/continue-learning.d.ts +25 -12
  176. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  177. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  178. package/lib/template/skill-detail/index.d.ts +81 -71
  179. package/lib/template/skill-detail/index.d.ts.map +1 -1
  180. package/lib/template/skill-detail/index.js +93 -59
  181. package/lib/template/skill-detail/index.js.map +1 -1
  182. package/lib/template/skill-detail/style.css +96 -38
  183. package/lib/variables/colors.d.ts +5 -1
  184. package/lib/variables/colors.d.ts.map +1 -1
  185. package/lib/variables/colors.js +6 -2
  186. package/lib/variables/colors.js.map +1 -1
  187. package/locales/bs/global.json +1 -0
  188. package/locales/cs/global.json +1 -0
  189. package/locales/de/global.json +1 -0
  190. package/locales/en/global.json +1 -0
  191. package/locales/es/global.json +1 -0
  192. package/locales/et/global.json +1 -0
  193. package/locales/fi/global.json +1 -0
  194. package/locales/fr/global.json +1 -0
  195. package/locales/hr/global.json +1 -0
  196. package/locales/hu/global.json +1 -0
  197. package/locales/hy/global.json +1 -0
  198. package/locales/it/global.json +1 -0
  199. package/locales/ja/global.json +1 -0
  200. package/locales/ko/global.json +1 -0
  201. package/locales/nl/global.json +1 -0
  202. package/locales/pl/global.json +1 -0
  203. package/locales/pt/global.json +1 -0
  204. package/locales/ro/global.json +1 -0
  205. package/locales/ru/global.json +1 -0
  206. package/locales/sk/global.json +1 -0
  207. package/locales/sl/global.json +1 -0
  208. package/locales/sv/global.json +1 -0
  209. package/locales/tl/global.json +1 -0
  210. package/locales/tr/global.json +1 -0
  211. package/locales/uk/global.json +1 -0
  212. package/locales/vi/global.json +1 -0
  213. package/locales/zh/global.json +1 -0
  214. package/locales/zh_TW/global.json +1 -0
  215. package/package.json +2 -2
@@ -5,7 +5,8 @@ exports.default = void 0;
5
5
  var _get2 = _interopRequireDefault(require("lodash/fp/get"));
6
6
  var _map2 = _interopRequireDefault(require("lodash/fp/map"));
7
7
  var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
8
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _classnames = _interopRequireDefault(require("classnames"));
9
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
11
  var _cssColorFunction = require("css-color-function");
11
12
  var _title = _interopRequireDefault(require("../../atom/title"));
@@ -65,19 +66,6 @@ const DetailSection = ({
65
66
  },
66
67
  disabled: isLocked
67
68
  };
68
- const LockedTag = /*#__PURE__*/_react.default.createElement(_tag.default, {
69
- label: translate('locked'),
70
- size: "S",
71
- icon: {
72
- position: 'left',
73
- iconName: 'lock',
74
- iconColor: _colors.COLORS.cm_grey_500,
75
- preset: 's',
76
- customStyle: {
77
- padding: 0
78
- }
79
- }
80
- });
81
69
  return isTypeStars ? /*#__PURE__*/_react.default.createElement("div", {
82
70
  className: _style.default[`detailsSection${index}`],
83
71
  "data-name": type,
@@ -88,7 +76,7 @@ const DetailSection = ({
88
76
  className: _style.default.detailsInfoText
89
77
  }, /*#__PURE__*/_react.default.createElement("span", {
90
78
  className: _style.default.detailsTitle
91
- }, translate('bonus_stars')), isLocked ? LockedTag : null), /*#__PURE__*/_react.default.createElement("div", {
79
+ }, translate('bonus_stars'))), /*#__PURE__*/_react.default.createElement("div", {
92
80
  className: _style.default.stars
93
81
  }, /*#__PURE__*/_react.default.createElement(_icon.default, {
94
82
  iconName: "star",
@@ -108,7 +96,7 @@ const DetailSection = ({
108
96
  className: _style.default.detailsInfoText
109
97
  }, /*#__PURE__*/_react.default.createElement("span", {
110
98
  className: _style.default.detailsTitle
111
- }, type === 'diploma' ? translate('diploma') : translate('badge')), isLocked ? LockedTag : null), /*#__PURE__*/_react.default.createElement("div", {
99
+ }, type === 'diploma' ? translate('diploma') : translate('badge'))), /*#__PURE__*/_react.default.createElement("div", {
112
100
  className: _style.default.buttonContainer
113
101
  }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, downloadButtonProps))));
114
102
  };
@@ -128,6 +116,10 @@ const ProgressWrapper = ({
128
116
  count: completedModules > mandatoryModules ? mandatoryModules : completedModules
129
117
  });
130
118
  const isLocked = progression !== 100;
119
+ const [showDetails, setShowDetails] = (0, _react.useState)(false);
120
+ const handleToggleDetails = (0, _react.useCallback)(() => {
121
+ setShowDetails(!showDetails);
122
+ }, [showDetails]);
131
123
  return /*#__PURE__*/_react.default.createElement("div", {
132
124
  className: _style.default.container,
133
125
  "data-name": "prgress-wrapper",
@@ -165,13 +157,41 @@ const ProgressWrapper = ({
165
157
  className: _style.default.statsProgressionMobile
166
158
  }, /*#__PURE__*/_react.default.createElement("span", {
167
159
  className: _style.default.statsNumber
168
- }, progression, "%")), (0, _isEmpty2.default)(sections) ? null : /*#__PURE__*/_react.default.createElement("div", {
169
- className: _style.default.details
160
+ }, progression, "%")), !(0, _isEmpty2.default)(sections) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
161
+ className: _style.default.toggleDetailsButton,
162
+ onClick: handleToggleDetails,
163
+ "data-testid": "progress-wrapper-toggle-details-button"
164
+ }, /*#__PURE__*/_react.default.createElement("div", {
165
+ className: _style.default.toggleDetailsLabel
166
+ }, /*#__PURE__*/_react.default.createElement("span", {
167
+ className: _style.default.toggleDetailsTitle
168
+ }, translate('rewards')), isLocked ? /*#__PURE__*/_react.default.createElement(_tag.default, {
169
+ label: translate('locked'),
170
+ size: "S",
171
+ icon: {
172
+ position: 'left',
173
+ iconName: 'lock',
174
+ iconColor: _colors.COLORS.cm_grey_500,
175
+ preset: 's',
176
+ customStyle: {
177
+ padding: 0
178
+ }
179
+ }
180
+ }) : null), /*#__PURE__*/_react.default.createElement(_icon.default, {
181
+ iconColor: _colors.COLORS.cm_grey_700,
182
+ iconName: showDetails ? 'chevron-up' : 'chevron-down',
183
+ size: {
184
+ faSize: 20,
185
+ wrapperSize: 24
186
+ }
187
+ })), /*#__PURE__*/_react.default.createElement("div", {
188
+ className: (0, _classnames.default)(_style.default.details, showDetails ? _style.default.visibleDetails : _style.default.hiddenDetails),
189
+ "data-testid": "progress-wrapper-details"
170
190
  }, uncappedMap((section, index) => /*#__PURE__*/_react.default.createElement(DetailSection, _extends({}, section, {
171
191
  isLocked: isLocked,
172
192
  key: `${section.type}-${index}`,
173
193
  index: index
174
- })), sections)));
194
+ })), sections))) : null);
175
195
  };
176
196
  const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
177
197
  type: _propTypes.default.oneOf(['diploma', 'badge', 'stars']),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_cssColorFunction","_title","_progressBar","_colors","_tag","_buttonLink","_icon","_provider","_interopRequireWildcard","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","uncappedMap","_map2","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","skin","GetSkinFromContext","primarySkinColor","_get2","isTypeStars","downloadButtonProps","label","link","target","href","customStyle","backgroundColor","color","width","transition","hoverBackgroundColor","hoverColor","COLORS","white","icon","position","faIcon","name","size","padding","disabled","LockedTag","createElement","iconName","iconColor","cm_grey_500","preset","className","style","detailsInfo","detailsInfoText","detailsTitle","img","src","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocale","total","count","container","titleContainer","titleSize","statscontainer","stats","dangerouslySetInnerHTML","__html","statsNumber","customProgressBar","positive","displayInfo","value","max","statsProgressionMobile","_isEmpty2","details","section","key","commonDetailSectionPropTypes","process","env","NODE_ENV","PropTypes","oneOf","string","number","contextTypes","Provider","childContextTypes","propTypes","bool","arrayOf","shape","_default","exports"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport {isEmpty, map, get} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, downloadUrl, stars}, context) => {\n const {translate} = context;\n const skin = GetSkinFromContext(context);\n const primarySkinColor = get('common.primary', skin);\n const isTypeStars = type === 'stars';\n\n const downloadButtonProps = {\n label: translate('download'),\n link: {\n target: '_blank',\n href: downloadUrl\n },\n 'data-name': `download-${type}-button`,\n 'aria-label': `download ${type} button`,\n customStyle: {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n width: 'auto',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n hoverBackgroundColor: primarySkinColor,\n hoverColor: COLORS.white,\n icon: {\n position: 'left',\n faIcon: {\n name: 'download',\n color: primarySkinColor,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n disabled: isLocked\n };\n\n const LockedTag = (\n <Tag\n label={translate('locked')}\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: COLORS.cm_grey_500,\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <img\n className={style.img}\n src={\n type === 'badge'\n ? downloadUrl\n : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>\n <ButtonLink {...downloadButtonProps} />\n </div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedModules, mandatoryModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const mandatoryCompletedModulesLocale = translate('modules_completed_mandatory', {\n total: mandatoryModules,\n count: completedModules > mandatoryModules ? mandatoryModules : completedModules\n });\n const isLocked = progression !== 100;\n\n return (\n <div\n className={style.container}\n data-name=\"prgress-wrapper\"\n aria-label=\"progress wrapper section\"\n >\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: mandatoryCompletedModulesLocale}}\n />\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber} data-name=\"progress-value\">\n {progression}%\n </span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n (section, index) => (\n <DetailSection\n {...section}\n isLocked={isLocked}\n key={`${section.type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n downloadUrl: PropTypes.string,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedModules: PropTypes.number,\n mandatoryModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,KAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,SAAA,GAAAC,uBAAA,CAAAV,OAAA;AAEA,IAAAW,MAAA,GAAAZ,sBAAA,CAAAC,OAAA;AAAgC,SAAAY,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,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA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,KAAK,EAAE+E,kBAAS,CAACG,MAAM;EACvBhF,QAAQ,EAAE6E,kBAAS,CAACQ,IAAI;EACxB,GAAGZ;AACL,CAAC;AAED5B,eAAe,CAACoC,YAAY,GAAG;EAC7B7E,SAAS,EAAE8E,iBAAQ,CAACC,iBAAiB,CAAC/E;AACxC,CAAC;AAEDyC,eAAe,CAACuC,SAAS,GAAAV,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAC1B5B,KAAK,EAAE6B,kBAAS,CAACE,MAAM;EACvB9B,QAAQ,EAAE4B,kBAAS,CAACE,MAAM;EAC1BjC,gBAAgB,EAAE+B,kBAAS,CAACG,MAAM;EAClCjC,gBAAgB,EAAE8B,kBAAS,CAACG,MAAM;EAClC9B,WAAW,EAAE2B,kBAAS,CAACG,MAAM;EAC7B7B,QAAQ,EAAE0B,kBAAS,CAACS,OAAO,CAACT,kBAAS,CAACU,KAAK,CAACd,4BAA4B,CAAC;AAC3E,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAApH,OAAA,GAEawE,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_propTypes","_cssColorFunction","_title","_progressBar","_colors","_tag","_buttonLink","_icon","_provider","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","uncappedMap","_map2","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","skin","GetSkinFromContext","primarySkinColor","_get2","isTypeStars","downloadButtonProps","label","link","target","href","customStyle","backgroundColor","color","width","transition","hoverBackgroundColor","hoverColor","COLORS","white","icon","position","faIcon","name","size","padding","disabled","createElement","className","style","detailsInfo","detailsInfoText","detailsTitle","iconName","iconColor","preset","img","src","buttonContainer","ProgressWrapper","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocale","total","count","showDetails","setShowDetails","useState","handleToggleDetails","useCallback","container","titleContainer","titleSize","statscontainer","stats","dangerouslySetInnerHTML","__html","statsNumber","customProgressBar","positive","displayInfo","value","max","statsProgressionMobile","_isEmpty2","Fragment","toggleDetailsButton","onClick","toggleDetailsLabel","toggleDetailsTitle","cm_grey_500","cm_grey_700","faSize","wrapperSize","classNames","details","visibleDetails","hiddenDetails","section","key","commonDetailSectionPropTypes","process","env","NODE_ENV","PropTypes","oneOf","string","number","contextTypes","Provider","childContextTypes","propTypes","bool","arrayOf","shape","_default","exports"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport {isEmpty, map, get} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, downloadUrl, stars}, context) => {\n const {translate} = context;\n const skin = GetSkinFromContext(context);\n const primarySkinColor = get('common.primary', skin);\n const isTypeStars = type === 'stars';\n\n const downloadButtonProps = {\n label: translate('download'),\n link: {\n target: '_blank',\n href: downloadUrl\n },\n 'data-name': `download-${type}-button`,\n 'aria-label': `download ${type} button`,\n customStyle: {\n backgroundColor: convert(`color(${primarySkinColor} a(0.07))`),\n color: primarySkinColor,\n width: 'auto',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n hoverBackgroundColor: primarySkinColor,\n hoverColor: COLORS.white,\n icon: {\n position: 'left',\n faIcon: {\n name: 'download',\n color: primarySkinColor,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n disabled: isLocked\n };\n\n return isTypeStars ? (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div\n className={style[`detailsSection${index}`]}\n data-name={type}\n aria-label={`${type} informations`}\n >\n <img\n className={style.img}\n src={\n type === 'badge'\n ? downloadUrl\n : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n </div>\n\n <div className={style.buttonContainer}>\n <ButtonLink {...downloadButtonProps} />\n </div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedModules, mandatoryModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const mandatoryCompletedModulesLocale = translate('modules_completed_mandatory', {\n total: mandatoryModules,\n count: completedModules > mandatoryModules ? mandatoryModules : completedModules\n });\n const isLocked = progression !== 100;\n\n const [showDetails, setShowDetails] = useState(false);\n\n const handleToggleDetails = useCallback(() => {\n setShowDetails(!showDetails);\n }, [showDetails]);\n return (\n <div\n className={style.container}\n data-name=\"prgress-wrapper\"\n aria-label=\"progress wrapper section\"\n >\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: mandatoryCompletedModulesLocale}}\n />\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber} data-name=\"progress-value\">\n {progression}%\n </span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n\n {!isEmpty(sections) ? (\n <>\n <div\n className={style.toggleDetailsButton}\n onClick={handleToggleDetails}\n data-testid=\"progress-wrapper-toggle-details-button\"\n >\n <div className={style.toggleDetailsLabel}>\n <span className={style.toggleDetailsTitle}>{translate('rewards')}</span>\n {isLocked ? (\n <Tag\n label={translate('locked')}\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: COLORS.cm_grey_500,\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n ) : null}\n </div>\n <Icon\n iconColor={COLORS.cm_grey_700}\n iconName={showDetails ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 20, wrapperSize: 24}}\n />\n </div>\n\n <div\n className={classNames(\n style.details,\n showDetails ? style.visibleDetails : style.hiddenDetails\n )}\n data-testid=\"progress-wrapper-details\"\n >\n {uncappedMap(\n (section, index) => (\n <DetailSection\n {...section}\n isLocked={isLocked}\n key={`${section.type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n </>\n ) : null}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n downloadUrl: PropTypes.string,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedModules: PropTypes.number,\n mandatoryModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\n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]}
@@ -7,6 +7,7 @@
7
7
  @value cm_grey_100 from colors;
8
8
  @value cm_grey_400 from colors;
9
9
  @value cm_grey_500 from colors;
10
+ @value cm_grey_700 from colors;
10
11
 
11
12
  .container {
12
13
  border-radius: 16px;
@@ -52,14 +53,24 @@
52
53
  }
53
54
 
54
55
  .details {
56
+ overflow: hidden;
57
+ transition: max-height 0.3s ease, padding-top 0.3s ease;
55
58
  display: flex;
56
59
  justify-content: space-between;
57
- align-items: "center";
60
+ align-items: center;
58
61
  flex-direction: row;
59
- padding-top: 24px;
60
62
  gap: 16px;
61
63
  }
62
64
 
65
+ .hiddenDetails {
66
+ height: 0;
67
+ }
68
+
69
+ .visibleDetails {
70
+ height: auto;
71
+ padding-top: 24px;
72
+ }
73
+
63
74
  .detailsSectionCommon {
64
75
  display: flex;
65
76
  align-items: center;
@@ -127,6 +138,30 @@
127
138
  padding-top: 16px;
128
139
  }
129
140
 
141
+ .toggleDetailsButton {
142
+ display: flex;
143
+ justify-content: space-between;
144
+ align-items: center;
145
+ cursor: pointer;
146
+ padding-top: 16px;
147
+ width: 100%;
148
+ }
149
+
150
+ .toggleDetailsTitle {
151
+ color: cm_grey_700;
152
+ font-family: Gilroy;
153
+ font-size: 16px;
154
+ font-style: normal;
155
+ font-weight: 600;
156
+ line-height: 22px;
157
+ }
158
+
159
+ .toggleDetailsLabel {
160
+ display: flex;
161
+ align-items: center;
162
+ gap: 8px;
163
+ }
164
+
130
165
  @media mobile, tablet {
131
166
  .details {
132
167
  flex-wrap: wrap;
@@ -7,7 +7,7 @@ declare function SkillsChartSideInformationItem({ title, value, legend, icon: ic
7
7
  }): JSX.Element;
8
8
  declare namespace SkillsChartSideInformationItem {
9
9
  namespace propTypes {
10
- const icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
10
+ const icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
11
11
  const title: PropTypes.Requireable<string>;
12
12
  const value: PropTypes.Requireable<string>;
13
13
  const legend: PropTypes.Requireable<string>;
@@ -5,7 +5,7 @@ declare function SkillsChartSideInformationPanel({ sidePanelItems }: {
5
5
  declare namespace SkillsChartSideInformationPanel {
6
6
  namespace propTypes {
7
7
  const sidePanelItems: PropTypes.Requireable<(PropTypes.InferProps<{
8
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
8
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
9
9
  title: PropTypes.Requireable<string>;
10
10
  value: PropTypes.Requireable<string>;
11
11
  legend: PropTypes.Requireable<string>;
@@ -26,7 +26,7 @@ declare namespace TitleAndCheckBoxWrapper {
26
26
  'data-name': PropTypes.Requireable<string>;
27
27
  titleSize: PropTypes.Requireable<string>;
28
28
  subtitleSize: PropTypes.Requireable<string>;
29
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
29
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
30
30
  tag: PropTypes.Requireable<PropTypes.InferProps<{
31
31
  label: PropTypes.Requireable<string>;
32
32
  type: PropTypes.Requireable<string>;
@@ -34,7 +34,20 @@ declare namespace TitleAndCheckBoxWrapper {
34
34
  customStyle: PropTypes.Requireable<{
35
35
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
36
36
  }>;
37
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
37
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
38
+ position: PropTypes.Requireable<string>;
39
+ iconName?: React.Validator<string> | undefined;
40
+ iconColor?: React.Validator<string | null | undefined> | undefined;
41
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
42
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
43
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
44
+ preset?: React.Validator<string | null | undefined> | undefined;
45
+ size?: React.Validator<{
46
+ faSize: number;
47
+ wrapperSize: number;
48
+ } | null | undefined> | undefined;
49
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
50
+ }>>;
38
51
  }>>;
39
52
  button: PropTypes.Requireable<PropTypes.InferProps<{
40
53
  type: PropTypes.Requireable<string>;
@@ -181,4 +194,5 @@ declare namespace TitleAndCheckBoxWrapper {
181
194
  }
182
195
  }
183
196
  import PropTypes from "prop-types";
197
+ import React from "react";
184
198
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TitleRadioWrapperProps } from './types';
3
3
  declare const TitleRadioWrapper: {
4
4
  (props: TitleRadioWrapperProps): JSX.Element;
@@ -11,7 +11,7 @@ declare const TitleRadioWrapper: {
11
11
  'data-name': import("prop-types").Requireable<string>;
12
12
  titleSize: import("prop-types").Requireable<string>;
13
13
  subtitleSize: import("prop-types").Requireable<string>;
14
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
14
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>;
15
15
  tag: import("prop-types").Requireable<import("prop-types").InferProps<{
16
16
  label: import("prop-types").Requireable<string>;
17
17
  type: import("prop-types").Requireable<string>;
@@ -19,7 +19,20 @@ declare const TitleRadioWrapper: {
19
19
  customStyle: import("prop-types").Requireable<{
20
20
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
21
21
  }>;
22
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
22
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
23
+ position: import("prop-types").Requireable<string>;
24
+ iconName?: React.Validator<string> | undefined;
25
+ iconColor?: React.Validator<string | null | undefined> | undefined;
26
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
27
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
28
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
29
+ preset?: React.Validator<string | null | undefined> | undefined;
30
+ size?: React.Validator<{
31
+ faSize: number;
32
+ wrapperSize: number;
33
+ } | null | undefined> | undefined;
34
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
35
+ }>>;
23
36
  }>>;
24
37
  button: import("prop-types").Requireable<import("prop-types").InferProps<{
25
38
  type: import("prop-types").Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAqB1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAqB1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  import InputFileDraggable from '../../atom/input-file-draggable';
3
4
  import { RadioWithTitleProps } from '../../atom/radio-with-title/types';
@@ -11,7 +12,7 @@ declare const propTypes: {
11
12
  'data-name': PropTypes.Requireable<string>;
12
13
  titleSize: PropTypes.Requireable<string>;
13
14
  subtitleSize: PropTypes.Requireable<string>;
14
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
15
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
15
16
  tag: PropTypes.Requireable<PropTypes.InferProps<{
16
17
  label: PropTypes.Requireable<string>;
17
18
  type: PropTypes.Requireable<string>;
@@ -19,7 +20,20 @@ declare const propTypes: {
19
20
  customStyle: PropTypes.Requireable<{
20
21
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
21
22
  }>;
22
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
23
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
24
+ position: PropTypes.Requireable<string>;
25
+ iconName?: import("react").Validator<string> | undefined;
26
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
27
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
28
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
29
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
30
+ preset?: import("react").Validator<string | null | undefined> | undefined;
31
+ size?: import("react").Validator<{
32
+ faSize: number;
33
+ wrapperSize: number;
34
+ } | null | undefined> | undefined;
35
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
36
+ }>>;
23
37
  }>>;
24
38
  button: PropTypes.Requireable<PropTypes.InferProps<{
25
39
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOd,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,cAAc,EAAE,mBAAmB,CAAC;IACpC,KAAK,EAAE,OAAO,cAAc,CAAC,SAAS,GAAG,OAAO,kBAAkB,CAAC,SAAS,CAAC;IAC7E,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;CACjD,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-radio-wrapper/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACtE,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAEhD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOd,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,cAAc,EAAE,mBAAmB,CAAC;IACpC,KAAK,EAAE,OAAO,cAAc,CAAC,SAAS,GAAG,OAAO,kBAAkB,CAAC,SAAS,CAAC;IAC7E,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAAC;CACjD,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,13 +1,51 @@
1
- export default CardsGrid;
2
- declare function CardsGrid(props: any): JSX.Element;
3
- declare namespace CardsGrid {
4
- namespace propTypes {
5
- const list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
6
- const customStyle: PropTypes.Requireable<{
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ export interface CardProps {
4
+ key?: React.Key;
5
+ badge?: string;
6
+ image?: string;
7
+ disabled?: boolean;
8
+ adaptiv?: boolean;
9
+ type?: string;
10
+ title?: string;
11
+ author?: string;
12
+ certifiedAuthor?: boolean;
13
+ customer?: Record<string, unknown>;
14
+ progress: number;
15
+ favorite?: boolean;
16
+ addFavoriteToolTip?: string;
17
+ removeFavoriteToolTip?: string;
18
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
19
+ onFavoriteClick?: () => void;
20
+ isSelected?: boolean;
21
+ notification?: Record<string, unknown>;
22
+ badgeCategory?: string;
23
+ badgeLabel?: string;
24
+ theme?: 'default' | 'coorpmanager';
25
+ disabledContent?: string;
26
+ 'aria-label'?: string;
27
+ 'background-aria-label'?: string;
28
+ 'favorite-aria-label'?: string;
29
+ 'selectable-aria-label'?: string;
30
+ 'customer-aria-label'?: string;
31
+ 'badge-aria-label'?: string;
32
+ 'disabled-aria-label'?: string;
33
+ 'card-content-aria-label'?: string;
34
+ }
35
+ export interface CardsGridProps {
36
+ list: CardProps[];
37
+ customStyle?: Record<string, string>;
38
+ loading?: boolean;
39
+ }
40
+ declare const CardsGrid: {
41
+ (props: CardsGridProps): JSX.Element;
42
+ propTypes: {
43
+ list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
44
+ customStyle: PropTypes.Requireable<{
7
45
  [x: string]: string | null | undefined;
8
46
  }>;
9
- const loading: PropTypes.Requireable<boolean>;
10
- }
11
- }
12
- import PropTypes from "prop-types";
47
+ loading: PropTypes.Requireable<boolean>;
48
+ };
49
+ };
50
+ export default CardsGrid;
13
51
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/cards-grid/index.js"],"names":[],"mappings":";AAOA,oDAuBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/cards-grid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAA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AAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,SAAS;YAAW,cAAc;;;;;;;;CAuBvC,CAAC;AASF,eAAe,SAAS,CAAC"}
@@ -9,7 +9,7 @@ var _card = _interopRequireDefault(require("../../molecule/card"));
9
9
  var _loader = _interopRequireDefault(require("../../atom/loader"));
10
10
  var _style = _interopRequireDefault(require("./style.css"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- function CardsGrid(props) {
12
+ const CardsGrid = props => {
13
13
  const {
14
14
  list = [],
15
15
  customStyle = {},
@@ -29,8 +29,9 @@ function CardsGrid(props) {
29
29
  className: _style.default.defaultStyle,
30
30
  style: customStyle
31
31
  }, cards, loader);
32
- }
32
+ };
33
33
  CardsGrid.propTypes = process.env.NODE_ENV !== "production" ? {
34
+ // @ts-expect-error component is not typed & wrapped into memo
34
35
  list: _propTypes.default.arrayOf(_propTypes.default.shape(_card.default.propTypes)),
35
36
  customStyle: _propTypes.default.objectOf(_propTypes.default.string),
36
37
  loading: _propTypes.default.bool
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_card","_loader","_style","e","__esModule","default","CardsGrid","props","list","customStyle","loading","loader","createElement","className","style","cards","_map2","cardProps","card","key","defaultStyle","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","shape","Card","objectOf","string","bool","_default","exports"],"sources":["../../../src/organism/cards-grid/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Card from '../../molecule/card';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nfunction CardsGrid(props) {\n const {list = [], customStyle = {}, loading = false} = props;\n\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n\n const cards = map(cardProps => {\n return (\n <div data-name=\"cardGrid\" className={style.card} key={cardProps.key}>\n <Card {...cardProps} />\n </div>\n );\n }, list);\n\n return (\n <div className={style.defaultStyle} style={customStyle}>\n {cards}\n {loader}\n </div>\n );\n}\n\nCardsGrid.propTypes = {\n list: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n customStyle: PropTypes.objectOf(PropTypes.string),\n loading: PropTypes.bool\n};\n\nexport default CardsGrid;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,SAASG,SAASA,CAACC,KAAK,EAAE;EACxB,MAAM;IAACC,IAAI,GAAG,EAAE;IAAEC,WAAW,GAAG,CAAC,CAAC;IAAEC,OAAO,GAAG;EAAK,CAAC,GAAGH,KAAK;EAE5D,MAAMI,MAAM,GAAGD,OAAO,gBACpBd,MAAA,CAAAS,OAAA,CAAAO,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACH;EAAO,gBAC3Bf,MAAA,CAAAS,OAAA,CAAAO,aAAA,CAACX,OAAA,CAAAI,OAAM,MAAE,CACN,CAAC,GACJ,IAAI;EAER,MAAMU,KAAK,GAAG,IAAAC,KAAA,CAAAX,OAAA,EAAIY,SAAS,IAAI;IAC7B,oBACErB,MAAA,CAAAS,OAAA,CAAAO,aAAA;MAAK,aAAU,UAAU;MAACC,SAAS,EAAEC,cAAK,CAACI,IAAK;MAACC,GAAG,EAAEF,SAAS,CAACE;IAAI,gBAClEvB,MAAA,CAAAS,OAAA,CAAAO,aAAA,CAACZ,KAAA,CAAAK,OAAI,EAAKY,SAAY,CACnB,CAAC;EAEV,CAAC,EAAET,IAAI,CAAC;EAER,oBACEZ,MAAA,CAAAS,OAAA,CAAAO,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACM,YAAa;IAACN,KAAK,EAAEL;EAAY,GACpDM,KAAK,EACLJ,MACE,CAAC;AAEV;AAEAL,SAAS,CAACe,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACpBhB,IAAI,EAAEiB,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,KAAK,CAACC,aAAI,CAACP,SAAS,CAAC,CAAC;EACxDZ,WAAW,EAAEgB,kBAAS,CAACI,QAAQ,CAACJ,kBAAS,CAACK,MAAM,CAAC;EACjDpB,OAAO,EAAEe,kBAAS,CAACM;AACrB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA5B,OAAA,GAEaC,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_card","_loader","_style","e","__esModule","default","CardsGrid","props","list","customStyle","loading","loader","createElement","className","style","cards","_map2","cardProps","card","key","defaultStyle","propTypes","process","env","NODE_ENV","PropTypes","arrayOf","shape","Card","objectOf","string","bool","_default","exports"],"sources":["../../../src/organism/cards-grid/index.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Card from '../../molecule/card';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nexport interface CardProps {\n key?: React.Key;\n badge?: string;\n image?: string;\n disabled?: boolean;\n adaptiv?: boolean;\n type?: string;\n title?: string;\n author?: string;\n certifiedAuthor?: boolean;\n customer?: Record<string, unknown>;\n progress: number;\n favorite?: boolean;\n addFavoriteToolTip?: string;\n removeFavoriteToolTip?: string;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n onFavoriteClick?: () => void;\n isSelected?: boolean;\n notification?: Record<string, unknown>;\n badgeCategory?: string;\n badgeLabel?: string;\n theme?: 'default' | 'coorpmanager';\n disabledContent?: string;\n 'aria-label'?: string;\n 'background-aria-label'?: string;\n 'favorite-aria-label'?: string;\n 'selectable-aria-label'?: string;\n 'customer-aria-label'?: string;\n 'badge-aria-label'?: string;\n 'disabled-aria-label'?: string;\n 'card-content-aria-label'?: string;\n}\n\nexport interface CardsGridProps {\n list: CardProps[];\n customStyle?: Record<string, string>;\n loading?: boolean;\n}\n\nconst CardsGrid = (props: CardsGridProps) => {\n const {list = [], customStyle = {}, loading = false} = props;\n\n const loader = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : null;\n\n const cards = map(cardProps => {\n return (\n <div data-name=\"cardGrid\" className={style.card} key={cardProps.key}>\n <Card {...cardProps} />\n </div>\n );\n }, list);\n\n return (\n <div className={style.defaultStyle} style={customStyle}>\n {cards}\n {loader}\n </div>\n );\n};\n\nCardsGrid.propTypes = {\n // @ts-expect-error component is not typed & wrapped into memo\n list: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n customStyle: PropTypes.objectOf(PropTypes.string),\n loading: PropTypes.bool\n};\n\nexport default CardsGrid;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAyChC,MAAMG,SAAS,GAAIC,KAAqB,IAAK;EAC3C,MAAM;IAACC,IAAI,GAAG,EAAE;IAAEC,WAAW,GAAG,CAAC,CAAC;IAAEC,OAAO,GAAG;EAAK,CAAC,GAAGH,KAAK;EAE5D,MAAMI,MAAM,GAAGD,OAAO,gBACpBd,MAAA,CAAAS,OAAA,CAAAO,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACH;EAAO,gBAC3Bf,MAAA,CAAAS,OAAA,CAAAO,aAAA,CAACX,OAAA,CAAAI,OAAM,MAAE,CACN,CAAC,GACJ,IAAI;EAER,MAAMU,KAAK,GAAG,IAAAC,KAAA,CAAAX,OAAA,EAAIY,SAAS,IAAI;IAC7B,oBACErB,MAAA,CAAAS,OAAA,CAAAO,aAAA;MAAK,aAAU,UAAU;MAACC,SAAS,EAAEC,cAAK,CAACI,IAAK;MAACC,GAAG,EAAEF,SAAS,CAACE;IAAI,gBAClEvB,MAAA,CAAAS,OAAA,CAAAO,aAAA,CAACZ,KAAA,CAAAK,OAAI,EAAKY,SAAY,CACnB,CAAC;EAEV,CAAC,EAAET,IAAI,CAAC;EAER,oBACEZ,MAAA,CAAAS,OAAA,CAAAO,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACM,YAAa;IAACN,KAAK,EAAEL;EAAY,GACpDM,KAAK,EACLJ,MACE,CAAC;AAEV,CAAC;AAEDL,SAAS,CAACe,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACpB;EACAhB,IAAI,EAAEiB,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACE,KAAK,CAACC,aAAI,CAACP,SAAS,CAAC,CAAC;EACxDZ,WAAW,EAAEgB,kBAAS,CAACI,QAAQ,CAACJ,kBAAS,CAACK,MAAM,CAAC;EACjDpB,OAAO,EAAEe,kBAAS,CAACM;AACrB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA5B,OAAA,GAEaC,SAAS","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { ContentSkillModalProps } from './types';
3
3
  declare const ContentSkillModal: {
4
4
  (props: ContentSkillModalProps): JSX.Element | null;
@@ -408,7 +408,7 @@ declare const ContentSkillModal: {
408
408
  'data-name': import("prop-types").Requireable<string>;
409
409
  titleSize: import("prop-types").Requireable<string>;
410
410
  subtitleSize: import("prop-types").Requireable<string>;
411
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
411
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>;
412
412
  tag: import("prop-types").Requireable<import("prop-types").InferProps<{
413
413
  label: import("prop-types").Requireable<string>;
414
414
  type: import("prop-types").Requireable<string>;
@@ -416,7 +416,20 @@ declare const ContentSkillModal: {
416
416
  customStyle: import("prop-types").Requireable<{
417
417
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
418
418
  }>;
419
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
419
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
420
+ position: import("prop-types").Requireable<string>;
421
+ iconName?: React.Validator<string> | undefined;
422
+ iconColor?: React.Validator<string | null | undefined> | undefined;
423
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
424
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
425
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
426
+ preset?: React.Validator<string | null | undefined> | undefined;
427
+ size?: React.Validator<{
428
+ faSize: number;
429
+ wrapperSize: number;
430
+ } | null | undefined> | undefined;
431
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
432
+ }>>;
420
433
  }>>;
421
434
  button: import("prop-types").Requireable<import("prop-types").InferProps<{
422
435
  type: import("prop-types").Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DvD,CAAC;AAQF,eAAe,iBAAiB,CAAC"}
@@ -405,7 +405,7 @@ declare const ContentSkillModalPropTypes: {
405
405
  'data-name': PropTypes.Requireable<string>;
406
406
  titleSize: PropTypes.Requireable<string>;
407
407
  subtitleSize: PropTypes.Requireable<string>;
408
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
408
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
409
409
  tag: PropTypes.Requireable<PropTypes.InferProps<{
410
410
  label: PropTypes.Requireable<string>;
411
411
  type: PropTypes.Requireable<string>;
@@ -413,7 +413,20 @@ declare const ContentSkillModalPropTypes: {
413
413
  customStyle: PropTypes.Requireable<{
414
414
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
415
415
  }>;
416
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
416
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
417
+ position: PropTypes.Requireable<string>;
418
+ iconName?: import("react").Validator<string> | undefined;
419
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
420
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
421
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
422
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
423
+ preset?: import("react").Validator<string | null | undefined> | undefined;
424
+ size?: import("react").Validator<{
425
+ faSize: number;
426
+ wrapperSize: number;
427
+ } | null | undefined> | undefined;
428
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
429
+ }>>;
417
430
  }>>;
418
431
  button: PropTypes.Requireable<PropTypes.InferProps<{
419
432
  type: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAkC,EAChC,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAStD,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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