@coorpacademy/components 11.13.3 → 11.13.5

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 (158) hide show
  1. package/es/atom/avatar/style.css +1 -1
  2. package/es/atom/button-link/index.d.ts +23 -24
  3. package/es/atom/button-link/index.d.ts.map +1 -1
  4. package/es/atom/button-link/index.js +10 -30
  5. package/es/atom/button-link/index.js.map +1 -1
  6. package/es/atom/button-link/style.css +10 -1
  7. package/es/atom/button-link/types.d.ts +50 -0
  8. package/es/atom/button-link/types.d.ts.map +1 -0
  9. package/es/atom/button-link/types.js +25 -0
  10. package/es/atom/button-link/types.js.map +1 -0
  11. package/es/atom/button-link-icon-only/style.css +16 -1
  12. package/es/atom/button-menu/index.d.ts +14 -13
  13. package/es/atom/button-menu/index.d.ts.map +1 -1
  14. package/es/atom/button-menu/index.js +5 -13
  15. package/es/atom/button-menu/index.js.map +1 -1
  16. package/es/atom/button-menu/types.d.ts +35 -0
  17. package/es/atom/button-menu/types.d.ts.map +1 -0
  18. package/es/atom/button-menu/types.js +14 -0
  19. package/es/atom/button-menu/types.js.map +1 -0
  20. package/es/atom/difficulty-level/style.css +1 -1
  21. package/es/atom/link/index.d.ts +1 -0
  22. package/es/atom/link/index.js +1 -0
  23. package/es/atom/link/index.js.map +1 -1
  24. package/es/atom/status-item/style.css +3 -0
  25. package/es/molecule/brand-form-group/index.d.ts +0 -2
  26. package/es/molecule/bullet-point-menu-button/index.d.ts +20 -17
  27. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  28. package/es/molecule/bullet-point-menu-button/index.js +9 -11
  29. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  30. package/es/molecule/bullet-point-menu-button/style.css +20 -0
  31. package/es/molecule/bullet-point-menu-button/types.d.ts +31 -0
  32. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -0
  33. package/es/molecule/bullet-point-menu-button/types.js +13 -0
  34. package/es/molecule/bullet-point-menu-button/types.js.map +1 -0
  35. package/es/molecule/empty-state-dashboard/index.d.ts +1 -1
  36. package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -1
  37. package/es/molecule/empty-state-dashboard/index.js +2 -2
  38. package/es/molecule/empty-state-dashboard/index.js.map +1 -1
  39. package/es/molecule/empty-state-dashboard/types.d.ts +8 -0
  40. package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -1
  41. package/es/molecule/empty-state-dashboard/types.js.map +1 -1
  42. package/es/molecule/expandible-actionable-table/index.d.ts +103 -0
  43. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -0
  44. package/es/molecule/expandible-actionable-table/index.js +193 -0
  45. package/es/molecule/expandible-actionable-table/index.js.map +1 -0
  46. package/es/molecule/expandible-actionable-table/style.css +134 -0
  47. package/es/molecule/expandible-actionable-table/types.d.ts +116 -0
  48. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -0
  49. package/es/molecule/expandible-actionable-table/types.js +33 -0
  50. package/es/molecule/expandible-actionable-table/types.js.map +1 -0
  51. package/es/molecule/questions/qcm-graphic/style.css +2 -1
  52. package/es/molecule/uploading-file-progress/index.d.ts +1 -1
  53. package/es/molecule/uploading-file-progress/index.d.ts.map +1 -1
  54. package/es/molecule/uploading-file-progress/index.js.map +1 -1
  55. package/es/molecule/uploading-file-progress/types.d.ts +10 -1
  56. package/es/molecule/uploading-file-progress/types.d.ts.map +1 -1
  57. package/es/molecule/uploading-file-progress/types.js.map +1 -1
  58. package/es/organism/brand-form/index.d.ts +0 -2
  59. package/es/organism/list-items/index.d.ts +109 -6
  60. package/es/organism/list-items/index.d.ts.map +1 -1
  61. package/es/organism/list-items/index.js +44 -15
  62. package/es/organism/list-items/index.js.map +1 -1
  63. package/es/organism/setup-header/index.d.ts +0 -8
  64. package/es/organism/wizard-contents/index.d.ts +71 -2
  65. package/es/organism/wizard-contents/index.d.ts.map +1 -1
  66. package/es/organism/wizard-contents/index.js +6 -0
  67. package/es/organism/wizard-contents/index.js.map +1 -1
  68. package/es/template/back-office/brand-create/index.d.ts +0 -8
  69. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  70. package/es/template/back-office/brand-list/index.d.ts +0 -8
  71. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  72. package/es/template/back-office/brand-update/index.d.ts +288 -802
  73. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  74. package/es/template/back-office/brand-update/index.js +14 -2
  75. package/es/template/back-office/brand-update/index.js.map +1 -1
  76. package/es/template/back-office/dashboard-preview/index.d.ts +0 -8
  77. package/es/template/back-office/layout/index.d.ts +0 -8
  78. package/es/template/back-office/layout/index.d.ts.map +1 -1
  79. package/lib/atom/avatar/style.css +1 -1
  80. package/lib/atom/button-link/index.d.ts +23 -24
  81. package/lib/atom/button-link/index.d.ts.map +1 -1
  82. package/lib/atom/button-link/index.js +10 -32
  83. package/lib/atom/button-link/index.js.map +1 -1
  84. package/lib/atom/button-link/style.css +10 -1
  85. package/lib/atom/button-link/types.d.ts +50 -0
  86. package/lib/atom/button-link/types.d.ts.map +1 -0
  87. package/lib/atom/button-link/types.js +36 -0
  88. package/lib/atom/button-link/types.js.map +1 -0
  89. package/lib/atom/button-link-icon-only/style.css +16 -1
  90. package/lib/atom/button-menu/index.d.ts +14 -13
  91. package/lib/atom/button-menu/index.d.ts.map +1 -1
  92. package/lib/atom/button-menu/index.js +6 -14
  93. package/lib/atom/button-menu/index.js.map +1 -1
  94. package/lib/atom/button-menu/types.d.ts +35 -0
  95. package/lib/atom/button-menu/types.d.ts.map +1 -0
  96. package/lib/atom/button-menu/types.js +24 -0
  97. package/lib/atom/button-menu/types.js.map +1 -0
  98. package/lib/atom/difficulty-level/style.css +1 -1
  99. package/lib/atom/link/index.d.ts +1 -0
  100. package/lib/atom/link/index.js +1 -0
  101. package/lib/atom/link/index.js.map +1 -1
  102. package/lib/atom/status-item/style.css +3 -0
  103. package/lib/molecule/brand-form-group/index.d.ts +0 -2
  104. package/lib/molecule/bullet-point-menu-button/index.d.ts +20 -17
  105. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  106. package/lib/molecule/bullet-point-menu-button/index.js +10 -11
  107. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  108. package/lib/molecule/bullet-point-menu-button/style.css +20 -0
  109. package/lib/molecule/bullet-point-menu-button/types.d.ts +31 -0
  110. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -0
  111. package/lib/molecule/bullet-point-menu-button/types.js +23 -0
  112. package/lib/molecule/bullet-point-menu-button/types.js.map +1 -0
  113. package/lib/molecule/empty-state-dashboard/index.d.ts +1 -1
  114. package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -1
  115. package/lib/molecule/empty-state-dashboard/index.js +2 -2
  116. package/lib/molecule/empty-state-dashboard/index.js.map +1 -1
  117. package/lib/molecule/empty-state-dashboard/types.d.ts +8 -0
  118. package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -1
  119. package/lib/molecule/empty-state-dashboard/types.js.map +1 -1
  120. package/lib/molecule/expandible-actionable-table/index.d.ts +103 -0
  121. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -0
  122. package/lib/molecule/expandible-actionable-table/index.js +215 -0
  123. package/lib/molecule/expandible-actionable-table/index.js.map +1 -0
  124. package/lib/molecule/expandible-actionable-table/style.css +134 -0
  125. package/lib/molecule/expandible-actionable-table/types.d.ts +116 -0
  126. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -0
  127. package/lib/molecule/expandible-actionable-table/types.js +47 -0
  128. package/lib/molecule/expandible-actionable-table/types.js.map +1 -0
  129. package/lib/molecule/questions/qcm-graphic/style.css +2 -1
  130. package/lib/molecule/uploading-file-progress/index.d.ts +1 -1
  131. package/lib/molecule/uploading-file-progress/index.d.ts.map +1 -1
  132. package/lib/molecule/uploading-file-progress/index.js.map +1 -1
  133. package/lib/molecule/uploading-file-progress/types.d.ts +10 -1
  134. package/lib/molecule/uploading-file-progress/types.d.ts.map +1 -1
  135. package/lib/molecule/uploading-file-progress/types.js.map +1 -1
  136. package/lib/organism/brand-form/index.d.ts +0 -2
  137. package/lib/organism/list-items/index.d.ts +109 -6
  138. package/lib/organism/list-items/index.d.ts.map +1 -1
  139. package/lib/organism/list-items/index.js +45 -15
  140. package/lib/organism/list-items/index.js.map +1 -1
  141. package/lib/organism/setup-header/index.d.ts +0 -8
  142. package/lib/organism/wizard-contents/index.d.ts +71 -2
  143. package/lib/organism/wizard-contents/index.d.ts.map +1 -1
  144. package/lib/organism/wizard-contents/index.js +7 -0
  145. package/lib/organism/wizard-contents/index.js.map +1 -1
  146. package/lib/template/back-office/brand-create/index.d.ts +0 -8
  147. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  148. package/lib/template/back-office/brand-list/index.d.ts +0 -8
  149. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  150. package/lib/template/back-office/brand-update/index.d.ts +288 -802
  151. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  152. package/lib/template/back-office/brand-update/index.js +15 -2
  153. package/lib/template/back-office/brand-update/index.js.map +1 -1
  154. package/lib/template/back-office/dashboard-preview/index.d.ts +0 -8
  155. package/lib/template/back-office/layout/index.d.ts +0 -8
  156. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  157. package/locales/en/global.json +2 -1
  158. package/package.json +3 -3
@@ -48,5 +48,5 @@
48
48
  .icon {
49
49
  width: 20px;
50
50
  height: 20px;
51
- color: "#fff";
51
+ color: white;
52
52
  }
@@ -1,28 +1,27 @@
1
- export default ButtonLink;
2
- declare function ButtonLink(props: any): JSX.Element;
3
- declare namespace ButtonLink {
4
- const propTypes: {
5
- type: PropTypes.Requireable<string>;
6
- label: PropTypes.Requireable<string>;
7
- 'aria-label': PropTypes.Requireable<string>;
8
- 'data-name': PropTypes.Requireable<string>;
9
- 'data-testid': PropTypes.Requireable<string>;
10
- icon: PropTypes.Requireable<PropTypes.InferProps<{
11
- position: PropTypes.Requireable<string>;
12
- type: PropTypes.Requireable<string>;
1
+ /// <reference types="react" />
2
+ import { ButtonLinkProps } from './types';
3
+ declare const ButtonLink: {
4
+ (props: ButtonLinkProps): JSX.Element;
5
+ propTypes: {
6
+ type: import("prop-types").Requireable<string>;
7
+ label: import("prop-types").Requireable<string>;
8
+ 'aria-label': import("prop-types").Requireable<string>;
9
+ 'data-name': import("prop-types").Requireable<string>;
10
+ 'data-testid': import("prop-types").Requireable<string>;
11
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
12
+ position: import("prop-types").Requireable<string>;
13
+ type: import("prop-types").Requireable<string>;
13
14
  }>>;
14
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
15
- onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
16
- link: PropTypes.Requireable<PropTypes.InferProps<{
17
- href: PropTypes.Requireable<string>;
18
- download: PropTypes.Requireable<boolean>;
19
- target: PropTypes.Requireable<string>;
15
+ onClick: import("prop-types").Requireable<(...args: any[]) => any>;
16
+ link: import("prop-types").Requireable<import("prop-types").InferProps<{
17
+ href: import("prop-types").Requireable<string>;
18
+ download: import("prop-types").Requireable<boolean>;
19
+ target: import("prop-types").Requireable<string>;
20
20
  }>>;
21
- disabled: PropTypes.Requireable<boolean>;
22
- className: PropTypes.Requireable<string>;
23
- customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
24
- useTitle: PropTypes.Requireable<boolean>;
21
+ disabled: import("prop-types").Requireable<boolean>;
22
+ className: import("prop-types").Requireable<string>;
23
+ customStyle: import("prop-types").Requireable<import("prop-types").InferProps<{}>>;
25
24
  };
26
- }
27
- import PropTypes from "prop-types";
25
+ };
26
+ export default ButtonLink;
28
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.js"],"names":[],"mappings":";AA6BA,qDAqEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAyB7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;CAqEzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -1,23 +1,24 @@
1
1
  import _noop from "lodash/fp/noop";
2
- import _keys from "lodash/fp/keys";
3
- import _getOr from "lodash/fp/getOr";
4
2
 
5
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
4
 
7
5
  import React, { useCallback } from 'react';
8
- import PropTypes from 'prop-types';
9
6
  import classnames from 'classnames';
10
7
  import Link from '../link';
11
8
  import { ICONS } from '../../util/button-icons';
9
+ import propTypes from './types'; // eslint-disable-next-line css-modules/no-unused-class
10
+
12
11
  import style from './style.css';
13
12
 
14
13
  const getButtonContent = (icon, label) => {
15
14
  const {
16
15
  type,
17
16
  position
18
- } = icon;
19
-
20
- const Icon = _getOr(null, type, ICONS);
17
+ } = icon || {
18
+ type: '',
19
+ position: ''
20
+ };
21
+ const Icon = type && ICONS[type];
21
22
 
22
23
  if (!Icon) {
23
24
  return /*#__PURE__*/React.createElement("div", {
@@ -43,7 +44,7 @@ const ButtonLink = props => {
43
44
  type,
44
45
  label,
45
46
  disabled,
46
- icon = {},
47
+ icon,
47
48
  'data-name': dataName,
48
49
  'data-testid': dataTestId = 'button-link',
49
50
  'aria-label': ariaLabel,
@@ -55,7 +56,7 @@ const ButtonLink = props => {
55
56
  useTitle = true
56
57
  } = props;
57
58
  const contentView = getButtonContent(icon, label);
58
- const styleButton = classnames(className, style.button, type === 'primary' && style.primary, type === 'secondary' && style.secondary, type === 'tertiary' && style.tertiary, type === 'text' && style.text, type === 'dangerous' && style.dangerous, link && style.link, disabled && style.disabled);
59
+ const styleButton = classnames(style[`${className}`], style.button, type === 'primary' && style.primary, type === 'secondary' && style.secondary, type === 'tertiary' && style.tertiary, type === 'text' && style.text, type === 'dangerous' && style.dangerous, link && style.link, disabled && style.disabled);
59
60
  const handleOnClick = useCallback(() => onClick(), [onClick]);
60
61
  const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);
61
62
 
@@ -86,27 +87,6 @@ const ButtonLink = props => {
86
87
  }), contentView);
87
88
  };
88
89
 
89
- ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
90
- type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
91
- label: PropTypes.string,
92
- 'aria-label': PropTypes.string,
93
- 'data-name': PropTypes.string,
94
- 'data-testid': PropTypes.string,
95
- icon: PropTypes.shape({
96
- position: PropTypes.oneOf(['right', 'left']),
97
- type: PropTypes.oneOf(_keys(ICONS))
98
- }),
99
- onClick: PropTypes.func,
100
- onKeyDown: PropTypes.func,
101
- link: PropTypes.shape({
102
- href: PropTypes.string,
103
- download: PropTypes.bool,
104
- target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
105
- }),
106
- disabled: PropTypes.bool,
107
- className: PropTypes.string,
108
- customStyle: PropTypes.shape({}),
109
- useTitle: PropTypes.bool
110
- } : {};
90
+ ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
111
91
  export default ButtonLink;
112
92
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Link","ICONS","style","getButtonContent","icon","label","type","position","Icon","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","handleOnKeyDown","event","title","propTypes","oneOf","string","shape","func","href","download","bool","target"],"sources":["../../../src/atom/button-link/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n onKeyDown: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({}),\n useTitle: PropTypes.bool\n};\n\nexport default ButtonLink;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;EACxC,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAzB;;EACA,MAAMI,IAAI,GAAG,OAAM,IAAN,EAAYF,IAAZ,EAAkBL,KAAlB,CAAb;;EAEA,IAAI,CAACO,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEN,KAAK,CAACO;IAAtB,gBACE;MAAM,SAAS,EAAEP,KAAK,CAACG;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,oBACE;IAAK,SAAS,EAAEH,KAAK,CAACO;EAAtB,GACGF,QAAQ,KAAK,MAAb,gBAAsB,oBAAC,IAAD;IAAM,SAAS,EAAEL,KAAK,CAACE;EAAvB,EAAtB,GAAwD,IAD3D,eAEE;IAAM,SAAS,EAAEF,KAAK,CAACG;EAAvB,GAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,oBAAC,IAAD;IAAM,SAAS,EAAEL,KAAK,CAACE;EAAvB,EAAvB,GAAyD,IAH5D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AAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAZe;EAiBrBvB,QAAQ,EAAEd,SAAS,CAAC2C,IAjBC;EAkBrBtB,SAAS,EAAErB,SAAS,CAACsC,MAlBA;EAmBrBhB,WAAW,EAAEtB,SAAS,CAACuC,KAAV,CAAgB,EAAhB,CAnBQ;EAoBrBhB,QAAQ,EAAEvB,SAAS,CAAC2C;AApBC,CAAvB;AAuBA,eAAe/B,UAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","classnames","Link","ICONS","propTypes","style","getButtonContent","icon","label","type","position","Icon","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","handleOnKeyDown","event","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n style[`${className}`],\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,SAAP,MAAmD,SAAnD,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,KAAlB,KAAqC;EAC5D,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWC,QAAQ,EAAE;EAArB,CAAjC;EACA,MAAMC,IAAI,GAAGF,IAAI,IAAIN,KAAK,CAACM,IAAD,CAA1B;;EAEA,IAAI,CAACE,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEN,KAAK,CAACO;IAAtB,gBACE;MAAM,SAAS,EAAEP,KAAK,CAACG;IAAvB,GAA+BA,KAA/B,CADF,CADF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W,CAAC,MAAMoB,OAAO,EAAd,EAAkB,CAACA,OAAD,CAAlB,CAAjC;EAEA,MAAMc,eAAe,GAAGlC,WAAW,CAACmC,KAAK,IAAId,SAAS,CAACc,KAAD,CAAnB,EAA4B,CAACd,SAAD,CAA5B,CAAnC;;EAEA,IAAIF,IAAJ,EAAU;IACR,oBACE,oBAAC,IAAD,eACMA,IADN,EAEOK,QAAQ,IAAI;MACfY,KAAK,EAAElB,SAAS,IAAIV;IADL,CAFnB;MAKE,KAAK,EAAEe,WALT;MAME,SAAS,EAAEG,WANb;MAOE,aAAWV,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIV;IAT3B,IAWGiB,WAXH,CADF;EAeD;;EAED,oBACE,2CACOD,QAAQ,IAAI;IACfY,KAAK,EAAElB,SAAS,IAAIV;EADL,CADnB;IAIE,IAAI,EAAC,QAJP;IAKE,cAAYU,SAAS,IAAIV,KAL3B;IAME,aAAWQ,QANb;IAOE,eAAaC,UAPf;IAQE,KAAK,EAAEM,WART;IASE,SAAS,EAAEG,WATb;IAUE,OAAO,EAAEO,aAVX;IAWE,SAAS,EAAEC,eAXb;IAYE,QAAQ,EAAE;EAZZ,IAcGT,WAdH,CADF;AAkBD,CArED;;AAuEAZ,UAAU,CAACT,SAAX,2CAAuBA,SAAvB;AAEA,eAAeS,UAAf"}
@@ -93,4 +93,13 @@
93
93
  color: inherit;
94
94
  border-radius: 0px;
95
95
  height: auto;
96
- }
96
+ }
97
+
98
+ /* bulk inspect button style */
99
+ .bulkInspectButton {
100
+ font-family: 'Gilroy';
101
+ font-style: normal;
102
+ font-weight: 600;
103
+ font-size: 14px;
104
+ color: cm_primary_blue;
105
+ }
@@ -0,0 +1,50 @@
1
+ import PropTypes from 'prop-types';
2
+ import { ICONS } from '../../util/button-icons';
3
+ declare const propTypes: {
4
+ type: PropTypes.Requireable<string>;
5
+ label: PropTypes.Requireable<string>;
6
+ 'aria-label': PropTypes.Requireable<string>;
7
+ 'data-name': PropTypes.Requireable<string>;
8
+ 'data-testid': PropTypes.Requireable<string>;
9
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
10
+ position: PropTypes.Requireable<string>;
11
+ type: PropTypes.Requireable<string>;
12
+ }>>;
13
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
14
+ link: PropTypes.Requireable<PropTypes.InferProps<{
15
+ href: PropTypes.Requireable<string>;
16
+ download: PropTypes.Requireable<boolean>;
17
+ target: PropTypes.Requireable<string>;
18
+ }>>;
19
+ disabled: PropTypes.Requireable<boolean>;
20
+ className: PropTypes.Requireable<string>;
21
+ customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
22
+ };
23
+ export declare type IconType = {
24
+ position: 'right' | 'left';
25
+ type: keyof typeof ICONS;
26
+ };
27
+ export declare type ButtonLinkProps = {
28
+ type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';
29
+ label?: string;
30
+ 'aria-label'?: string;
31
+ 'data-name'?: string;
32
+ 'data-testid'?: string;
33
+ icon?: IconType;
34
+ onClick?: () => void;
35
+ onKeyDown?: () => void;
36
+ link?: {
37
+ href?: string;
38
+ download?: boolean;
39
+ target?: '_self' | '_blank' | '_parent' | '_top';
40
+ };
41
+ disabled?: boolean;
42
+ className?: string;
43
+ customStyle?: Record<string, never>;
44
+ useTitle?: boolean;
45
+ };
46
+ export declare type Fixture = {
47
+ props: ButtonLinkProps;
48
+ };
49
+ export default propTypes;
50
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBd,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,OAAO,KAAK,CAAC;CAC1B,CAAC;AACF,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
@@ -0,0 +1,25 @@
1
+ import _keys from "lodash/fp/keys";
2
+ import PropTypes from 'prop-types';
3
+ import { ICONS } from '../../util/button-icons';
4
+ const propTypes = {
5
+ type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
6
+ label: PropTypes.string,
7
+ 'aria-label': PropTypes.string,
8
+ 'data-name': PropTypes.string,
9
+ 'data-testid': PropTypes.string,
10
+ icon: PropTypes.shape({
11
+ position: PropTypes.oneOf(['right', 'left']),
12
+ type: PropTypes.oneOf(_keys(ICONS))
13
+ }),
14
+ onClick: PropTypes.func,
15
+ link: PropTypes.shape({
16
+ href: PropTypes.string,
17
+ download: PropTypes.bool,
18
+ target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
19
+ }),
20
+ disabled: PropTypes.bool,
21
+ className: PropTypes.string,
22
+ customStyle: PropTypes.shape({})
23
+ };
24
+ export default propTypes;
25
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","icon","shape","position","onClick","func","link","href","download","bool","target","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type: keyof typeof ICONS;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, never>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACM,MAFD;EAGhB,cAAcN,SAAS,CAACM,MAHR;EAIhB,aAAaN,SAAS,CAACM,MAJP;EAKhB,eAAeN,SAAS,CAACM,MALT;EAMhBC,IAAI,EAAEP,SAAS,CAACQ,KAAV,CAAgB;IACpBC,QAAQ,EAAET,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CANU;EAUhBS,OAAO,EAAEV,SAAS,CAACW,IAVH;EAWhBC,IAAI,EAAEZ,SAAS,CAACQ,KAAV,CAAgB;IACpBK,IAAI,EAAEb,SAAS,CAACM,MADI;IAEpBQ,QAAQ,EAAEd,SAAS,CAACe,IAFA;IAGpBC,MAAM,EAAEhB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAXU;EAgBhBa,QAAQ,EAAEjB,SAAS,CAACe,IAhBJ;EAiBhBG,SAAS,EAAElB,SAAS,CAACM,MAjBL;EAkBhBa,WAAW,EAAEnB,SAAS,CAACQ,KAAV,CAAgB,EAAhB;AAlBG,CAAlB;AA+CA,eAAeN,SAAf"}
@@ -111,6 +111,21 @@
111
111
  }
112
112
 
113
113
  .bulkArrowUp {
114
- composes: bulkArrowDown;
114
+ composes: button;
115
+ width: 24px;
116
+ height: 24px;
117
+ background-color: white;
118
+ border: 1px solid cm_grey_200;
119
+ border-radius: 5px;
120
+ padding: 10px;
121
+ opacity: 0.5;
115
122
  transform: rotate(180deg);
116
123
  }
124
+ .bulkArrowUp .icon {
125
+ width: 8px;
126
+ height: 8px;
127
+ }
128
+
129
+ .bulkBulletButton{
130
+ background-color: white;
131
+ }
@@ -1,16 +1,17 @@
1
- export default ButtonMenu;
2
- declare function ButtonMenu(props: any): JSX.Element;
3
- declare namespace ButtonMenu {
4
- const propTypes: {
5
- buttons: PropTypes.Validator<(PropTypes.InferProps<{
6
- 'data-name': PropTypes.Requireable<string>;
7
- disabled: PropTypes.Requireable<boolean>;
8
- label: PropTypes.Validator<string>;
9
- onClick: PropTypes.Validator<(...args: any[]) => any>;
10
- type: PropTypes.Requireable<string>;
1
+ /// <reference types="react" />
2
+ import { ButtonMenuProps } from './types';
3
+ declare const ButtonMenu: {
4
+ (props: ButtonMenuProps): JSX.Element;
5
+ propTypes: {
6
+ buttons: import("prop-types").Validator<(import("prop-types").InferProps<{
7
+ 'data-name': import("prop-types").Requireable<string>;
8
+ disabled: import("prop-types").Requireable<boolean>;
9
+ label: import("prop-types").Validator<string>;
10
+ onClick: import("prop-types").Validator<(...args: any[]) => any>;
11
+ type: import("prop-types").Requireable<string>;
11
12
  }> | null | undefined)[]>;
12
- 'data-name': PropTypes.Requireable<string>;
13
+ 'data-name': import("prop-types").Requireable<string>;
13
14
  };
14
- }
15
- import PropTypes from "prop-types";
15
+ };
16
+ export default ButtonMenu;
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.js"],"names":[],"mappings":";AAwCA,qDAYC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAIA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AA8BjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;CAazC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -1,10 +1,10 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
3
  import React, { useMemo, useCallback } from 'react';
4
- import PropTypes from 'prop-types';
5
4
  import map from 'lodash/fp/map';
6
5
  import classnames from 'classnames';
7
6
  import style from './style.css';
7
+ import propTypes, { buttonPropTypes } from './types';
8
8
 
9
9
  const Button = props => {
10
10
  const {
@@ -30,13 +30,7 @@ const Button = props => {
30
30
  }, label)));
31
31
  };
32
32
 
33
- Button.propTypes = process.env.NODE_ENV !== "production" ? {
34
- 'data-name': PropTypes.string,
35
- disabled: PropTypes.bool,
36
- label: PropTypes.string.isRequired,
37
- onClick: PropTypes.func.isRequired,
38
- type: PropTypes.oneOf(['default', 'dangerous'])
39
- } : {};
33
+ Button.propTypes = process.env.NODE_ENV !== "production" ? buttonPropTypes : {};
40
34
 
41
35
  const ButtonMenu = props => {
42
36
  const {
@@ -48,7 +42,8 @@ const ButtonMenu = props => {
48
42
  key: button.label + index
49
43
  }));
50
44
  }, []);
51
- const buttonList = useMemo(() => map.convert({
45
+ const buttonList = useMemo( // @ts-expect-error (to avoid using map as any)
46
+ () => map.convert({
52
47
  cap: false
53
48
  })(buildButton, buttons), [buttons, buildButton]);
54
49
  return /*#__PURE__*/React.createElement("div", {
@@ -56,9 +51,6 @@ const ButtonMenu = props => {
56
51
  }, buttonList);
57
52
  };
58
53
 
59
- ButtonMenu.propTypes = process.env.NODE_ENV !== "production" ? {
60
- buttons: PropTypes.arrayOf(PropTypes.shape(Button.propTypes)).isRequired,
61
- 'data-name': PropTypes.string
62
- } : {};
54
+ ButtonMenu.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
63
55
  export default ButtonMenu;
64
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","useCallback","PropTypes","map","classnames","style","Button","props","dataName","disabled","label","onClick","type","styleButton","button","default","dangerous","handleOnClick","buttonContent","propTypes","string","bool","isRequired","func","oneOf","ButtonMenu","buttons","buildButton","index","buttonList","convert","cap","arrayOf","shape"],"sources":["../../../src/atom/button-menu/index.js"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport style from './style.css';\n\nconst Button = props => {\n const {'data-name': dataName, disabled, label, onClick, type = 'default'} = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.default,\n type === 'dangerous' && style.dangerous,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n >\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n </button>\n );\n};\n\nButton.propTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'dangerous'])\n};\n\nconst ButtonMenu = props => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return <div data-name={dataName}>{buttonList}</div>;\n};\n\nButtonMenu.propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(Button.propTypes)).isRequired,\n 'data-name': PropTypes.string\n};\n\nexport default ButtonMenu;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,WAAxB,QAA0C,OAA1C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC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,EAASc,KAAT,KAAmB;IACjD,oBAAO,oBAAC,MAAD,eAAYd,MAAZ;MAAoB,GAAG,EAAEA,MAAM,CAACJ,KAAP,GAAekB;IAAxC,GAAP;EACD,CAF8B,EAE5B,EAF4B,CAA/B;EAIA,MAAMC,UAAU,GAAG7B,OAAO,CACxB,MAAMG,GAAG,CAAC2B,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0BJ,WAA1B,EAAuCD,OAAvC,CADkB,EAExB,CAACA,OAAD,EAAUC,WAAV,CAFwB,CAA1B;EAKA,oBAAO;IAAK,aAAWnB;EAAhB,GAA2BqB,UAA3B,CAAP;AACD,CAZD;;AAcAJ,UAAU,CAACN,SAAX,2CAAuB;EACrBO,OAAO,EAAExB,SAAS,CAAC8B,OAAV,CAAkB9B,SAAS,CAAC+B,KAAV,CAAgB3B,MAAM,CAACa,SAAvB,CAAlB,EAAqDG,UADzC;EAErB,aAAapB,SAAS,CAACkB;AAFF,CAAvB;AAKA,eAAeK,UAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","useCallback","map","classnames","style","propTypes","buttonPropTypes","Button","props","dataName","disabled","label","onClick","type","styleButton","button","default","dangerous","handleOnClick","buttonContent","ButtonMenu","buttons","buildButton","index","buttonList","convert","cap"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\n\nconst Button = (props: ButtonProps) => {\n const {'data-name': dataName, disabled, label, onClick, type = 'default'} = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.default,\n type === 'dangerous' && style.dangerous,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n >\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n </button>\n );\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return <div data-name={dataName}>{buttonList}</div>;\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,WAAxB,QAA0C,OAA1C;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,IAAiDC,eAAjD,QAAuE,SAAvE;;AAEA,MAAMC,MAAM,GAAIC,KAAD,IAAwB;EACrC,MAAM;IAAC,aAAaC,QAAd;IAAwBC,QAAxB;IAAkCC,KAAlC;IAAyCC,OAAzC;IAAkDC,IAAI,GAAG;EAAzD,IAAsEL,KAA5E;EACA,MAAMM,WAAW,GAAGX,UAAU,CAC5BC,KAAK,CAACW,MADsB,EAE5BF,IAAI,KAAK,SAAT,IAAsBT,KAAK,CAACY,OAFA,EAG5BH,IAAI,KAAK,WAAT,IAAwBT,KAAK,CAACa,SAHF,EAI5BP,QAAQ,IAAIN,KAAK,CAACM,QAJU,CAA9B;EAOA,MAAMQ,aAAa,GAAGjB,WAAW,CAAC,MAAMW,OAAO,EAAd,EAAkB,CAACA,OAAD,CAAlB,CAAjC;EACA,oBACE;IACE,IAAI,EAAC,QADP;IAEE,cAAYD,KAFd;IAGE,KAAK,EAAEA,KAHT;IAIE,aAAWF,QAJb;IAKE,SAAS,EAAEK,WALb;IAME,OAAO,EAAEI;EANX,gBAQE;IAAK,SAAS,EAAEd,KAAK,CAACe;EAAtB,gBACE;IAAM,SAAS,EAAEf,KAAK,CAACO;EAAvB,GAA+BA,KAA/B,CADF,CARF,CADF;AAcD,CAxBD;;AA0BAJ,MAAM,CAACF,SAAP,2CAAmBC,eAAnB;;AAEA,MAAMc,UAAU,GAAIZ,KAAD,IAA4B;EAC7C,MAAM;IAACa,OAAD;IAAU,aAAaZ;EAAvB,IAAmCD,KAAzC;EACA,MAAMc,WAAW,GAAGrB,WAAW,CAAC,CAACc,MAAD,EAASQ,KAAT,KAAmB;IACjD,oBAAO,oBAAC,MAAD,eAAYR,MAAZ;MAAoB,GAAG,EAAEA,MAAM,CAACJ,KAAP,GAAeY;IAAxC,GAAP;EACD,CAF8B,EAE5B,EAF4B,CAA/B;EAIA,MAAMC,UAAU,GAAGxB,OAAO,EACxB;EACA,MAAME,GAAG,CAACuB,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA0BJ,WAA1B,EAAuCD,OAAvC,CAFkB,EAGxB,CAACA,OAAD,EAAUC,WAAV,CAHwB,CAA1B;EAMA,oBAAO;IAAK,aAAWb;EAAhB,GAA2Be,UAA3B,CAAP;AACD,CAbD;;AAeAJ,UAAU,CAACf,SAAX,2CAAuBA,SAAvB;AAEA,eAAee,UAAf"}
@@ -0,0 +1,35 @@
1
+ import PropTypes from 'prop-types';
2
+ export declare const buttonPropTypes: {
3
+ 'data-name': PropTypes.Requireable<string>;
4
+ disabled: PropTypes.Requireable<boolean>;
5
+ label: PropTypes.Validator<string>;
6
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
7
+ type: PropTypes.Requireable<string>;
8
+ };
9
+ declare const propTypes: {
10
+ buttons: PropTypes.Validator<(PropTypes.InferProps<{
11
+ 'data-name': PropTypes.Requireable<string>;
12
+ disabled: PropTypes.Requireable<boolean>;
13
+ label: PropTypes.Validator<string>;
14
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
15
+ type: PropTypes.Requireable<string>;
16
+ }> | null | undefined)[]>;
17
+ 'data-name': PropTypes.Requireable<string>;
18
+ };
19
+ export default propTypes;
20
+ export declare type ButtonProps = {
21
+ 'data-name'?: string;
22
+ disabled?: boolean;
23
+ label: string;
24
+ onClick: () => void;
25
+ type?: 'default' | 'dangerous';
26
+ };
27
+ export declare type ButtonMenuProps = {
28
+ buttons: ButtonProps[];
29
+ 'data-name'?: string;
30
+ 'aria-label'?: string;
31
+ };
32
+ export declare type ButtonMenuPropsFixture = {
33
+ props: ButtonMenuProps;
34
+ };
35
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import PropTypes from 'prop-types';
2
+ export const buttonPropTypes = {
3
+ 'data-name': PropTypes.string,
4
+ disabled: PropTypes.bool,
5
+ label: PropTypes.string.isRequired,
6
+ onClick: PropTypes.func.isRequired,
7
+ type: PropTypes.oneOf(['default', 'dangerous'])
8
+ };
9
+ const propTypes = {
10
+ buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,
11
+ 'data-name': PropTypes.string
12
+ };
13
+ export default propTypes;
14
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","buttonPropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","propTypes","buttons","arrayOf","shape"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'dangerous'])\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string\n};\n\nexport default propTypes;\n\nexport type ButtonProps = {\n 'data-name'?: string;\n disabled?: boolean;\n label: string;\n onClick: () => void;\n type?: 'default' | 'dangerous';\n};\n\nexport type ButtonMenuProps = {\n buttons: ButtonProps[];\n 'data-name'?: string;\n 'aria-label'?: string;\n};\n\nexport type ButtonMenuPropsFixture = {props: ButtonMenuProps};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,OAAO,MAAMC,eAAe,GAAG;EAC7B,aAAaD,SAAS,CAACE,MADM;EAE7BC,QAAQ,EAAEH,SAAS,CAACI,IAFS;EAG7BC,KAAK,EAAEL,SAAS,CAACE,MAAV,CAAiBI,UAHK;EAI7BC,OAAO,EAAEP,SAAS,CAACQ,IAAV,CAAeF,UAJK;EAK7BG,IAAI,EAAET,SAAS,CAACU,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,CAAhB;AALuB,CAAxB;AAQP,MAAMC,SAAS,GAAG;EAChBC,OAAO,EAAEZ,SAAS,CAACa,OAAV,CAAkBb,SAAS,CAACc,KAAV,CAAgBb,eAAhB,CAAlB,EAAoDK,UAD7C;EAEhB,aAAaN,SAAS,CAACE;AAFP,CAAlB;AAKA,eAAeS,SAAf"}
@@ -8,7 +8,7 @@
8
8
  .icon {
9
9
  width: 18px;
10
10
  height: 15px;
11
- color: "#fff";
11
+ color: white;
12
12
  }
13
13
 
14
14
  .text {
@@ -7,6 +7,7 @@ declare namespace Link {
7
7
  href: PropTypes.Requireable<string>;
8
8
  'data-name': PropTypes.Requireable<string>;
9
9
  'aria-label': PropTypes.Requireable<string>;
10
+ title: PropTypes.Requireable<string>;
10
11
  target: PropTypes.Requireable<string>;
11
12
  skinHover: PropTypes.Requireable<boolean>;
12
13
  hoverColor: PropTypes.Requireable<string>;
@@ -84,6 +84,7 @@ Link.propTypes = process.env.NODE_ENV !== "production" ? {
84
84
  href: PropTypes.string,
85
85
  'data-name': PropTypes.string,
86
86
  'aria-label': PropTypes.string,
87
+ title: PropTypes.string,
87
88
  target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
88
89
  skinHover: PropTypes.bool,
89
90
  hoverColor: PropTypes.string,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","Provider","GetSkinFromContext","pushToHistory","Link","props","legacyContext","skin","hovered","setHovered","history","createHref","skinHover","hoverColor","dataName","ariaLabel","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","handleMouseLeave","navigate","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","undefined","propTypes","node","string","target","oneOf","bool","func","shape","contextTypes","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style =\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n };\n const _hoverStyle =\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null;\n\n return (\n <a\n {...linKElementProps}\n data-name={dataName}\n aria-label={ariaLabel}\n href={href ? createHref(href) : undefined}\n onClick={handleOnClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n className={className}\n style={{\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }}\n >\n {children}\n </a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,IA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AV,CAAgB,EAAhB;AAbQ,CAAjB;AAgBAvC,IAAI,CAACwC,YAAL,GAAoB;EAClBrC,IAAI,EAAEN,QAAQ,CAAC4C,iBAAT,CAA2BtC,IADf;EAElBG,OAAO,EAAET,QAAQ,CAAC4C,iBAAT,CAA2BnC;AAFlB,CAApB;AAKA,eAAeN,IAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","Provider","GetSkinFromContext","pushToHistory","Link","props","legacyContext","skin","hovered","setHovered","history","createHref","skinHover","hoverColor","dataName","ariaLabel","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","handleMouseLeave","navigate","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","undefined","propTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style =\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n };\n const _hoverStyle =\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null;\n\n return (\n <a\n {...linKElementProps}\n data-name={dataName}\n aria-label={ariaLabel}\n href={href ? createHref(href) : undefined}\n onClick={handleOnClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n className={className}\n style={{\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }}\n >\n {children}\n </a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;AACA,OAAOC,aAAP,MAA0B,uBAA1B;;AAEA,MAAMC,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAGL,kBAAkB,CAACI,aAAD,CAA/B;EACA,MAAM,CAACE,OAAD,EAAUC,UAAV,IAAwBV,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACW,OAAO,EAAE;MAACC,UAAU;IAAX,IAA0B;EAApC,IAA0CL,aAAhD;;EACA,MAAM;IACJM,SADI;IAEJC,UAAU,GAAG,OAAM,SAAN,EAAiB,gBA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,CAACM,IAAD,CAAb,GAAsBkB,SAJlC;IAKE,OAAO,EAAEN,aALX;IAME,YAAY,EAAEH,gBANhB;IAOE,YAAY,EAAEC,gBAPhB;IAQE,SAAS,EAAER,SARb;IASE,KAAK,eACAE,UADA,EAEAU,MAFA,EAGAE,WAHA;EATP,IAeGX,QAfH,CADF;AAmBD,CA/ED;;AAiFAlB,IAAI,CAACgC,SAAL,2CAAiB;EACfd,QAAQ,EAAEtB,SAAS,CAACqC,IADL;EAEflB,SAAS,EAAEnB,SAAS,CAACsC,MAFN;EAGfrB,IAAI,EAAEjB,SAAS,CAACsC,MAHD;EAIf,aAAatC,SAAS,CAACsC,MAJR;EAKf,cAActC,SAAS,CAACsC,MALT;EAMfC,KAAK,EAAEvC,SAAS,CAACsC,MANF;EAOfE,MAAM,EAAExC,SAAS,CAACyC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB,CAPO;EAQf7B,SAAS,EAAEZ,SAAS,CAAC0C,IARN;EASf7B,UAAU,EAAEb,SAAS,CAACsC,MATP;EAUfb,QAAQ,EAAEzB,SAAS,CAAC0C,IAVL;EAWfxB,OAAO,EAAElB,SAAS,CAAC2C,IAXJ;EAYfnB,YAAY,EAAExB,SAAS,CAAC2C,IAZT;EAafpB,YAAY,EAAEvB,SAAS,CAAC2C,IAbT;EAcfvB,KAAK,EAAEpB,SAAS,CAAC4C,KAAV,CAAgB,EAAhB;AAdQ,CAAjB;AAiBAxC,IAAI,CAACyC,YAAL,GAAoB;EAClBtC,IAAI,EAAEN,QAAQ,CAAC6C,iBAAT,CAA2BvC,IADf;EAElBG,OAAO,EAAET,QAAQ,CAAC6C,iBAAT,CAA2BpC;AAFlB,CAApB;AAKA,eAAeN,IAAf"}
@@ -74,6 +74,7 @@
74
74
  .valid {
75
75
  opacity: 1;
76
76
  width: 24px;
77
+ min-width: 24px;
77
78
  height: 24px;
78
79
  background-color: cm_green_secondary_100;
79
80
  }
@@ -88,6 +89,7 @@
88
89
  .invalid {
89
90
  opacity: 1;
90
91
  width: 24px;
92
+ min-width: 24px;
91
93
  height: 24px;
92
94
  background-color: cm_negative_50;
93
95
  }
@@ -102,6 +104,7 @@
102
104
  .errorsNumber {
103
105
  opacity: 1;
104
106
  width: 24px;
107
+ min-width: 24px;
105
108
  height: 24px;
106
109
  background-color: cm_pink_50;
107
110
  color: cm_negative_100;
@@ -419,7 +419,6 @@ declare namespace BrandFormGroup {
419
419
  type: PropTypes.Requireable<string>;
420
420
  }>>;
421
421
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
422
- onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
423
422
  link: PropTypes.Requireable<PropTypes.InferProps<{
424
423
  href: PropTypes.Requireable<string>;
425
424
  download: PropTypes.Requireable<boolean>;
@@ -428,7 +427,6 @@ declare namespace BrandFormGroup {
428
427
  disabled: PropTypes.Requireable<boolean>;
429
428
  className: PropTypes.Requireable<string>;
430
429
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
431
- useTitle: PropTypes.Requireable<boolean>;
432
430
  }> | PropTypes.InferProps<{
433
431
  type: PropTypes.Requireable<string>;
434
432
  title: PropTypes.Requireable<string>;