@coorpacademy/components 11.40.6-alpha.7 → 11.40.6

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 (228) hide show
  1. package/es/atom/button-link/index.d.ts +8 -15
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +37 -75
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/atom/button-link/types.d.ts +14 -20
  6. package/es/atom/button-link/types.d.ts.map +1 -1
  7. package/es/atom/button-link/types.js +3 -4
  8. package/es/atom/button-link/types.js.map +1 -1
  9. package/es/atom/button-menu/index.d.ts +3 -1
  10. package/es/atom/button-menu/index.d.ts.map +1 -1
  11. package/es/atom/button-menu/index.js +7 -1
  12. package/es/atom/button-menu/index.js.map +1 -1
  13. package/es/atom/button-menu/types.d.ts +6 -2
  14. package/es/atom/button-menu/types.d.ts.map +1 -1
  15. package/es/atom/radio-with-title/index.d.ts +8 -15
  16. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  17. package/es/atom/radio-with-title/types.d.ts +8 -15
  18. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  19. package/es/atom/title/index.d.ts +8 -15
  20. package/es/molecule/bullet-point-menu-button/index.d.ts +3 -1
  21. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  22. package/es/molecule/bullet-point-menu-button/types.d.ts +3 -1
  23. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  24. package/es/molecule/button-menu-action/index.d.ts +11 -19
  25. package/es/molecule/button-menu-action/index.d.ts.map +1 -1
  26. package/es/molecule/button-menu-action/index.js +3 -27
  27. package/es/molecule/button-menu-action/index.js.map +1 -1
  28. package/es/molecule/button-menu-action/types.d.ts +12 -22
  29. package/es/molecule/button-menu-action/types.d.ts.map +1 -1
  30. package/es/molecule/button-menu-action/types.js +2 -7
  31. package/es/molecule/button-menu-action/types.js.map +1 -1
  32. package/es/molecule/cm-popin/types.d.ts +85 -133
  33. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  34. package/es/molecule/expandible-actionable-table/index.d.ts +14 -17
  35. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  36. package/es/molecule/expandible-actionable-table/types.d.ts +14 -17
  37. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  38. package/es/molecule/quick-filters/index.d.ts +8 -15
  39. package/es/molecule/quick-filters/index.d.ts.map +1 -1
  40. package/es/molecule/quick-filters/types.d.ts +8 -15
  41. package/es/molecule/quick-filters/types.d.ts.map +1 -1
  42. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +8 -15
  43. package/es/molecule/title-radio-wrapper/index.d.ts +8 -15
  44. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  45. package/es/molecule/title-radio-wrapper/types.d.ts +8 -15
  46. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  47. package/es/organism/content-skill-modal/index.d.ts +68 -115
  48. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  49. package/es/organism/content-skill-modal/types.d.ts +68 -115
  50. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  51. package/es/organism/icon-editor/index.d.ts +8 -15
  52. package/es/organism/icon-editor/index.d.ts.map +1 -1
  53. package/es/organism/icon-editor/types.d.ts +8 -15
  54. package/es/organism/icon-editor/types.d.ts.map +1 -1
  55. package/es/organism/list-items/index.d.ts +68 -115
  56. package/es/organism/rewards-form/index.d.ts +8 -15
  57. package/es/organism/select-opponents/index.d.ts +8 -15
  58. package/es/organism/select-opponents/index.d.ts.map +1 -1
  59. package/es/organism/select-opponents/types.d.ts +8 -15
  60. package/es/organism/select-opponents/types.d.ts.map +1 -1
  61. package/es/organism/setup-header/index.d.ts +32 -60
  62. package/es/organism/title-and-input/index.d.ts +24 -45
  63. package/es/organism/title-and-input/index.d.ts.map +1 -1
  64. package/es/organism/title-and-input/types.d.ts +24 -45
  65. package/es/organism/title-and-input/types.d.ts.map +1 -1
  66. package/es/organism/wizard-contents/index.d.ts +38 -62
  67. package/es/template/app-player/loading/index.d.ts +85 -133
  68. package/es/template/app-player/player/index.d.ts +170 -274
  69. package/es/template/app-player/player/slides/header/index.d.ts +0 -8
  70. package/es/template/app-player/player/slides/header/index.d.ts.map +1 -1
  71. package/es/template/app-player/player/slides/header/index.js +3 -92
  72. package/es/template/app-player/player/slides/header/index.js.map +1 -1
  73. package/es/template/app-player/player/slides/header/style.css +1 -1
  74. package/es/template/app-player/player/slides/index.d.ts +85 -141
  75. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  76. package/es/template/app-player/popin-correction/index.d.ts +85 -133
  77. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  78. package/es/template/app-player/popin-end/index.d.ts +85 -141
  79. package/es/template/app-review/index.d.ts +85 -133
  80. package/es/template/app-review/index.d.ts.map +1 -1
  81. package/es/template/app-review/player/prop-types.d.ts +85 -133
  82. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  83. package/es/template/app-review/prop-types.d.ts +85 -133
  84. package/es/template/app-review/prop-types.d.ts.map +1 -1
  85. package/es/template/back-office/brand-create/index.d.ts +32 -60
  86. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  87. package/es/template/back-office/brand-list/index.d.ts +32 -60
  88. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  89. package/es/template/back-office/brand-update/index.d.ts +292 -486
  90. package/es/template/back-office/dashboard-preview/index.d.ts +32 -60
  91. package/es/template/back-office/layout/index.d.ts +32 -60
  92. package/es/template/back-office/layout/index.d.ts.map +1 -1
  93. package/es/template/common/dashboard/index.d.ts +170 -266
  94. package/es/template/common/search-page/index.d.ts +85 -133
  95. package/es/template/external-course/index.d.ts +85 -133
  96. package/es/variables/colors.d.ts +0 -1
  97. package/es/variables/colors.d.ts.map +1 -1
  98. package/es/variables/colors.js +0 -1
  99. package/es/variables/colors.js.map +1 -1
  100. package/lib/atom/button-link/index.d.ts +8 -15
  101. package/lib/atom/button-link/index.d.ts.map +1 -1
  102. package/lib/atom/button-link/index.js +37 -75
  103. package/lib/atom/button-link/index.js.map +1 -1
  104. package/lib/atom/button-link/types.d.ts +14 -20
  105. package/lib/atom/button-link/types.d.ts.map +1 -1
  106. package/lib/atom/button-link/types.js +3 -4
  107. package/lib/atom/button-link/types.js.map +1 -1
  108. package/lib/atom/button-menu/index.d.ts +3 -1
  109. package/lib/atom/button-menu/index.d.ts.map +1 -1
  110. package/lib/atom/button-menu/index.js +7 -1
  111. package/lib/atom/button-menu/index.js.map +1 -1
  112. package/lib/atom/button-menu/types.d.ts +6 -2
  113. package/lib/atom/button-menu/types.d.ts.map +1 -1
  114. package/lib/atom/radio-with-title/index.d.ts +8 -15
  115. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  116. package/lib/atom/radio-with-title/types.d.ts +8 -15
  117. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  118. package/lib/atom/title/index.d.ts +8 -15
  119. package/lib/molecule/bullet-point-menu-button/index.d.ts +3 -1
  120. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  121. package/lib/molecule/bullet-point-menu-button/types.d.ts +3 -1
  122. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  123. package/lib/molecule/button-menu-action/index.d.ts +11 -19
  124. package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
  125. package/lib/molecule/button-menu-action/index.js +2 -26
  126. package/lib/molecule/button-menu-action/index.js.map +1 -1
  127. package/lib/molecule/button-menu-action/types.d.ts +12 -22
  128. package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
  129. package/lib/molecule/button-menu-action/types.js +2 -7
  130. package/lib/molecule/button-menu-action/types.js.map +1 -1
  131. package/lib/molecule/cm-popin/types.d.ts +85 -133
  132. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  133. package/lib/molecule/expandible-actionable-table/index.d.ts +14 -17
  134. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  135. package/lib/molecule/expandible-actionable-table/types.d.ts +14 -17
  136. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  137. package/lib/molecule/quick-filters/index.d.ts +8 -15
  138. package/lib/molecule/quick-filters/index.d.ts.map +1 -1
  139. package/lib/molecule/quick-filters/types.d.ts +8 -15
  140. package/lib/molecule/quick-filters/types.d.ts.map +1 -1
  141. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +8 -15
  142. package/lib/molecule/title-radio-wrapper/index.d.ts +8 -15
  143. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  144. package/lib/molecule/title-radio-wrapper/types.d.ts +8 -15
  145. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  146. package/lib/organism/content-skill-modal/index.d.ts +68 -115
  147. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  148. package/lib/organism/content-skill-modal/types.d.ts +68 -115
  149. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  150. package/lib/organism/icon-editor/index.d.ts +8 -15
  151. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  152. package/lib/organism/icon-editor/types.d.ts +8 -15
  153. package/lib/organism/icon-editor/types.d.ts.map +1 -1
  154. package/lib/organism/list-items/index.d.ts +68 -115
  155. package/lib/organism/rewards-form/index.d.ts +8 -15
  156. package/lib/organism/select-opponents/index.d.ts +8 -15
  157. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  158. package/lib/organism/select-opponents/types.d.ts +8 -15
  159. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  160. package/lib/organism/setup-header/index.d.ts +32 -60
  161. package/lib/organism/title-and-input/index.d.ts +24 -45
  162. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  163. package/lib/organism/title-and-input/types.d.ts +24 -45
  164. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  165. package/lib/organism/wizard-contents/index.d.ts +38 -62
  166. package/lib/template/app-player/loading/index.d.ts +85 -133
  167. package/lib/template/app-player/player/index.d.ts +170 -274
  168. package/lib/template/app-player/player/slides/header/index.d.ts +0 -8
  169. package/lib/template/app-player/player/slides/header/index.d.ts.map +1 -1
  170. package/lib/template/app-player/player/slides/header/index.js +3 -92
  171. package/lib/template/app-player/player/slides/header/index.js.map +1 -1
  172. package/lib/template/app-player/player/slides/header/style.css +1 -1
  173. package/lib/template/app-player/player/slides/index.d.ts +85 -141
  174. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  175. package/lib/template/app-player/popin-correction/index.d.ts +85 -133
  176. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  177. package/lib/template/app-player/popin-end/index.d.ts +85 -141
  178. package/lib/template/app-review/index.d.ts +85 -133
  179. package/lib/template/app-review/index.d.ts.map +1 -1
  180. package/lib/template/app-review/player/prop-types.d.ts +85 -133
  181. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  182. package/lib/template/app-review/prop-types.d.ts +85 -133
  183. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  184. package/lib/template/back-office/brand-create/index.d.ts +32 -60
  185. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  186. package/lib/template/back-office/brand-list/index.d.ts +32 -60
  187. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  188. package/lib/template/back-office/brand-update/index.d.ts +292 -486
  189. package/lib/template/back-office/dashboard-preview/index.d.ts +32 -60
  190. package/lib/template/back-office/layout/index.d.ts +32 -60
  191. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  192. package/lib/template/common/dashboard/index.d.ts +170 -266
  193. package/lib/template/common/search-page/index.d.ts +85 -133
  194. package/lib/template/external-course/index.d.ts +85 -133
  195. package/lib/variables/colors.d.ts +0 -1
  196. package/lib/variables/colors.d.ts.map +1 -1
  197. package/lib/variables/colors.js +0 -1
  198. package/lib/variables/colors.js.map +1 -1
  199. package/locales/bs/global.json +2 -1
  200. package/locales/cs/global.json +2 -1
  201. package/locales/de/global.json +2 -1
  202. package/locales/en/global.json +2 -1
  203. package/locales/es/global.json +2 -1
  204. package/locales/et/global.json +2 -1
  205. package/locales/fi/global.json +2 -1
  206. package/locales/fr/global.json +2 -1
  207. package/locales/hr/global.json +2 -1
  208. package/locales/hu/global.json +2 -1
  209. package/locales/hy/global.json +2 -1
  210. package/locales/it/global.json +2 -1
  211. package/locales/ja/global.json +2 -1
  212. package/locales/ko/global.json +2 -1
  213. package/locales/lt/global.json +2 -1
  214. package/locales/nl/global.json +2 -1
  215. package/locales/pl/global.json +2 -1
  216. package/locales/pt/global.json +2 -1
  217. package/locales/ro/global.json +2 -1
  218. package/locales/ru/global.json +2 -1
  219. package/locales/sk/global.json +2 -1
  220. package/locales/sl/global.json +2 -1
  221. package/locales/sv/global.json +2 -1
  222. package/locales/tl/global.json +2 -1
  223. package/locales/tr/global.json +2 -1
  224. package/locales/uk/global.json +2 -1
  225. package/locales/vi/global.json +2 -1
  226. package/locales/zh/global.json +2 -1
  227. package/locales/zh_TW/global.json +2 -1
  228. package/package.json +2 -2
@@ -39,17 +39,7 @@ declare namespace Title {
39
39
  tooltipPlacement: PropTypes.Requireable<string>;
40
40
  'data-name': PropTypes.Requireable<string>;
41
41
  'data-testid': PropTypes.Requireable<string>;
42
- icon: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
43
- position: PropTypes.Requireable<string>;
44
- type: PropTypes.Requireable<string>;
45
- faIcon: PropTypes.Requireable<PropTypes.InferProps<{
46
- name: PropTypes.Validator<string>;
47
- color: PropTypes.Requireable<string>;
48
- backgroundColor: PropTypes.Requireable<string>;
49
- size: PropTypes.Requireable<number>;
50
- customStyle: PropTypes.Requireable<object>;
51
- }>>;
52
- }> | (PropTypes.InferProps<{
42
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
53
43
  position: PropTypes.Requireable<string>;
54
44
  type: PropTypes.Requireable<string>;
55
45
  faIcon: PropTypes.Requireable<PropTypes.InferProps<{
@@ -57,9 +47,11 @@ declare namespace Title {
57
47
  color: PropTypes.Requireable<string>;
58
48
  backgroundColor: PropTypes.Requireable<string>;
59
49
  size: PropTypes.Requireable<number>;
60
- customStyle: PropTypes.Requireable<object>;
50
+ customStyle: PropTypes.Requireable<{
51
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
52
+ }>;
61
53
  }>>;
62
- }> | null | undefined)[] | null | undefined>>;
54
+ }>>;
63
55
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
64
56
  link: PropTypes.Requireable<PropTypes.InferProps<{
65
57
  href: PropTypes.Requireable<string>;
@@ -70,8 +62,9 @@ declare namespace Title {
70
62
  hoverColor: PropTypes.Requireable<string>;
71
63
  disabled: PropTypes.Requireable<boolean>;
72
64
  className: PropTypes.Requireable<string>;
73
- customStyle: PropTypes.Requireable<object>;
74
- contentCustomStyle: PropTypes.Requireable<object>;
65
+ customStyle: PropTypes.Requireable<{
66
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
67
+ }>;
75
68
  useTitle: PropTypes.Requireable<boolean>;
76
69
  customLabelClassName: PropTypes.Requireable<string>;
77
70
  }>>;
@@ -23,7 +23,9 @@ declare const BulletPointMenuButton: {
23
23
  color: import("prop-types").Requireable<string>;
24
24
  backgroundColor: import("prop-types").Requireable<string>;
25
25
  size: import("prop-types").Requireable<number>;
26
- customStyle: import("prop-types").Requireable<object>;
26
+ customStyle: import("prop-types").Requireable<{
27
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
28
+ }>;
27
29
  }>>;
28
30
  }>>;
29
31
  customStyle: import("prop-types").Requireable<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAM9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsH/D,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAM9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsH/D,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
@@ -21,7 +21,9 @@ declare const propTypes: {
21
21
  color: PropTypes.Requireable<string>;
22
22
  backgroundColor: PropTypes.Requireable<string>;
23
23
  size: PropTypes.Requireable<number>;
24
- customStyle: PropTypes.Requireable<object>;
24
+ customStyle: PropTypes.Requireable<{
25
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
26
+ }>;
25
27
  }>>;
26
28
  }>>;
27
29
  customStyle: PropTypes.Requireable<{
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,iCAAiC,GAAG;IAAC,KAAK,EAAE,0BAA0B,CAAA;CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,iCAAiC,GAAG;IAAC,KAAK,EAAE,0BAA0B,CAAA;CAAC,CAAC"}
@@ -4,7 +4,6 @@ declare const ButtonMenuAction: {
4
4
  (props: ButtonMenuActionProps): JSX.Element;
5
5
  propTypes: {
6
6
  button: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
7
- withChevron: import("prop-types").Requireable<boolean>;
8
7
  type: import("prop-types").Requireable<string>;
9
8
  usage: import("prop-types").Requireable<string>;
10
9
  label: import("prop-types").Requireable<string>;
@@ -14,7 +13,7 @@ declare const ButtonMenuAction: {
14
13
  tooltipPlacement: import("prop-types").Requireable<string>;
15
14
  'data-name': import("prop-types").Requireable<string>;
16
15
  'data-testid': import("prop-types").Requireable<string>;
17
- icon: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
16
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
18
17
  position: import("prop-types").Requireable<string>;
19
18
  type: import("prop-types").Requireable<string>;
20
19
  faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -22,19 +21,11 @@ declare const ButtonMenuAction: {
22
21
  color: import("prop-types").Requireable<string>;
23
22
  backgroundColor: import("prop-types").Requireable<string>;
24
23
  size: import("prop-types").Requireable<number>;
25
- customStyle: import("prop-types").Requireable<object>;
24
+ customStyle: import("prop-types").Requireable<{
25
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
26
+ }>;
26
27
  }>>;
27
- }> | (import("prop-types").InferProps<{
28
- position: import("prop-types").Requireable<string>;
29
- type: import("prop-types").Requireable<string>;
30
- faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
31
- name: import("prop-types").Validator<string>;
32
- color: import("prop-types").Requireable<string>;
33
- backgroundColor: import("prop-types").Requireable<string>;
34
- size: import("prop-types").Requireable<number>;
35
- customStyle: import("prop-types").Requireable<object>;
36
- }>>;
37
- }> | null | undefined)[] | null | undefined>>;
28
+ }>>;
38
29
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
39
30
  link: import("prop-types").Requireable<import("prop-types").InferProps<{
40
31
  href: import("prop-types").Requireable<string>;
@@ -45,8 +36,9 @@ declare const ButtonMenuAction: {
45
36
  hoverColor: import("prop-types").Requireable<string>;
46
37
  disabled: import("prop-types").Requireable<boolean>;
47
38
  className: import("prop-types").Requireable<string>;
48
- customStyle: import("prop-types").Requireable<object>;
49
- contentCustomStyle: import("prop-types").Requireable<object>;
39
+ customStyle: import("prop-types").Requireable<{
40
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
41
+ }>;
50
42
  useTitle: import("prop-types").Requireable<boolean>;
51
43
  customLabelClassName: import("prop-types").Requireable<string>;
52
44
  }>>>;
@@ -67,7 +59,9 @@ declare const ButtonMenuAction: {
67
59
  color: import("prop-types").Requireable<string>;
68
60
  backgroundColor: import("prop-types").Requireable<string>;
69
61
  size: import("prop-types").Requireable<number>;
70
- customStyle: import("prop-types").Requireable<object>;
62
+ customStyle: import("prop-types").Requireable<{
63
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
64
+ }>;
71
65
  }>>;
72
66
  }>>;
73
67
  customStyle: import("prop-types").Requireable<{
@@ -89,8 +83,6 @@ declare const ButtonMenuAction: {
89
83
  primaryColor: import("prop-types").Requireable<string>;
90
84
  closeOnClick: import("prop-types").Requireable<boolean>;
91
85
  enableScroll: import("prop-types").Requireable<boolean>;
92
- containerCustom: import("prop-types").Requireable<object>;
93
- showFade: import("prop-types").Requireable<boolean>;
94
86
  };
95
87
  };
96
88
  export default ButtonMenuAction;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAGzD,QAAA,MAAM,gBAAgB;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqHrD,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAGzD,QAAA,MAAM,gBAAgB;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FrD,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
@@ -9,7 +9,6 @@ var _map = _interopRequireDefault(require("lodash/fp/map"));
9
9
  var _reactFontawesome = require("@fortawesome/react-fontawesome");
10
10
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
11
11
  var _buttonMenu = _interopRequireDefault(require("../../atom/button-menu"));
12
- var _colors = require("../../variables/colors");
13
12
  var _types = _interopRequireDefault(require("./types"));
14
13
  var _style = _interopRequireDefault(require("./style.css"));
15
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -29,8 +28,7 @@ const ButtonMenuAction = props => {
29
28
  showFade = false
30
29
  } = props;
31
30
  const {
32
- onClick = _noop2.default,
33
- withChevron = false
31
+ onClick = _noop2.default
34
32
  } = button;
35
33
  const [visible, setVisible] = (0, _react.useState)(false);
36
34
  const containerRef = (0, _react.useRef)(null);
@@ -68,28 +66,6 @@ const ButtonMenuAction = props => {
68
66
  }, /*#__PURE__*/_react.default.createElement(_buttonMenu.default, _extends({}, menuWithClose, {
69
67
  enableScroll: enableScroll
70
68
  })));
71
- const buttonProps = (0, _react.useMemo)(() => {
72
- if (!withChevron) return button;
73
-
74
- // to handle array/object/undefined
75
- // eslint-disable-next-line no-nested-ternary
76
- const baseIcons = Array.isArray(button.icon) ? button.icon : button.icon ? [button.icon] : [];
77
- const chevronIcon = {
78
- position: 'right',
79
- faIcon: {
80
- name: visible ? 'chevron-up' : 'chevron-down',
81
- color: _colors.COLORS.neutral_700,
82
- size: 14
83
- }
84
- };
85
-
86
- // remove right icon if exists
87
- const icons = [...baseIcons.filter(i => i && i.position !== 'right'), chevronIcon];
88
- return {
89
- ...button,
90
- icon: icons
91
- };
92
- }, [button, withChevron, visible]);
93
69
  return /*#__PURE__*/_react.default.createElement("div", {
94
70
  className: _style.default.container,
95
71
  "data-name": "button-menu-action-wrapper",
@@ -112,7 +88,7 @@ const ButtonMenuAction = props => {
112
88
  color: visible ? primaryColor : undefined
113
89
  },
114
90
  "aria-label": button['aria-label']
115
- })) : /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, buttonProps, {
91
+ })) : /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, button, {
116
92
  onClick: toggleVisibility
117
93
  })), _menu);
118
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_map","_reactFontawesome","_buttonLink","_buttonMenu","_colors","_types","_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","ButtonMenuAction","props","button","menu","menuWrapper","type","primaryColor","containerCustom","closeOnClick","enableScroll","showFade","onClick","_noop2","withChevron","visible","setVisible","useState","containerRef","useRef","toggleVisibility","useCallback","prevState","useEffect","handleMouseDown","event","current","contains","target","document","addEventListener","removeEventListener","menuWithClose","buttons","map","btn","menuWrapperClass","classnames","style","_menu","createElement","className","ariaLabel","customStyle","buttonProps","useMemo","baseIcons","Array","isArray","icon","chevronIcon","position","faIcon","name","color","COLORS","neutral_700","size","icons","filter","container","ref","currentOption","undefined","label","FontAwesomeIcon","caret","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/molecule/button-menu-action/index.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState, useRef, useMemo} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport map from 'lodash/fp/map';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonMenu from '../../atom/button-menu';\nimport {COLORS} from '../../variables/colors';\nimport propTypes, {ButtonMenuActionProps} from './types';\nimport style from './style.css';\n\nconst ButtonMenuAction = (props: ButtonMenuActionProps) => {\n const {\n button,\n menu,\n menuWrapper,\n type = 'button',\n primaryColor,\n containerCustom,\n closeOnClick = false,\n enableScroll = false,\n showFade = false\n } = props;\n const {onClick = noop, withChevron = false} = button;\n const [visible, setVisible] = useState(false);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const toggleVisibility = useCallback(() => {\n onClick();\n setVisible(prevState => !prevState);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = (event: MouseEvent) => {\n if (visible && containerRef.current && !containerRef.current.contains(event.target as Node)) {\n setVisible(false);\n }\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, [visible, containerRef]);\n\n const menuWithClose = closeOnClick\n ? {\n ...menu,\n buttons: map(\n btn => ({\n ...btn,\n onClick: () => setVisible(false)\n }),\n menu.buttons\n )\n }\n : menu;\n\n const menuWrapperClass = classnames(style.menuWrapper, {\n [style.visible]: visible,\n [style.showFade]: showFade && menuWithClose.buttons && menuWithClose.buttons.length > 6\n });\n\n const _menu = (\n <div\n className={menuWrapperClass}\n data-name=\"menu-wrapper\"\n aria-label={menuWrapper?.ariaLabel}\n style={menuWrapper?.customStyle}\n >\n <ButtonMenu {...menuWithClose} enableScroll={enableScroll} />\n </div>\n );\n\n const buttonProps = useMemo(() => {\n if (!withChevron) return button;\n\n // to handle array/object/undefined\n // eslint-disable-next-line no-nested-ternary\n const baseIcons = Array.isArray(button.icon) ? button.icon : button.icon ? [button.icon] : [];\n\n const chevronIcon = {\n position: 'right' as const,\n faIcon: {\n name: visible ? 'chevron-up' : 'chevron-down',\n color: COLORS.neutral_700,\n size: 14\n }\n };\n\n // remove right icon if exists\n const icons = [...baseIcons.filter(i => i && i.position !== 'right'), chevronIcon];\n\n return {\n ...button,\n icon: icons\n };\n }, [button, withChevron, visible]);\n\n return (\n <div\n className={style.container}\n data-name=\"button-menu-action-wrapper\"\n style={containerCustom}\n ref={containerRef}\n >\n {type === 'link' ? (\n <div\n className={style.currentOption}\n data-name={button['data-name']}\n onClick={toggleVisibility}\n aria-expanded={visible}\n aria-haspopup=\"true\"\n >\n <span style={{color: visible ? primaryColor : undefined}}>{button.label}</span>\n <FontAwesomeIcon\n icon={visible ? 'chevron-up' : 'chevron-down'}\n className={style.caret}\n style={{color: visible ? primaryColor : undefined}}\n aria-label={button['aria-label']}\n />\n </div>\n ) : (\n <ButtonLink {...buttonProps} onClick={toggleVisibility} />\n )}\n {_menu}\n </div>\n );\n};\n\nButtonMenuAction.propTypes = propTypes;\n\nexport default ButtonMenuAction;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA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C,SAAS,EAAEH,cAAK,CAACwB,aAAc;IAC/B,aAAW3D,MAAM,CAAC,WAAW,CAAE;IAC/BS,OAAO,EAAEQ,gBAAiB;IAC1B,iBAAeL,OAAQ;IACvB,iBAAc;EAAM,gBAEpBpD,MAAA,CAAAkB,OAAA,CAAA2D,aAAA;IAAMF,KAAK,EAAE;MAACgB,KAAK,EAAEvC,OAAO,GAAGR,YAAY,GAAGwD;IAAS;EAAE,GAAE5D,MAAM,CAAC6D,KAAY,CAAC,eAC/ErG,MAAA,CAAAkB,OAAA,CAAA2D,aAAA,CAACvE,iBAAA,CAAAgG,eAAe;IACdhB,IAAI,EAAElC,OAAO,GAAG,YAAY,GAAG,cAAe;IAC9C0B,SAAS,EAAEH,cAAK,CAAC4B,KAAM;IACvB5B,KAAK,EAAE;MAACgB,KAAK,EAAEvC,OAAO,GAAGR,YAAY,GAAGwD;IAAS,CAAE;IACnD,cAAY5D,MAAM,CAAC,YAAY;EAAE,CAClC,CACE,CAAC,gBAENxC,MAAA,CAAAkB,OAAA,CAAA2D,aAAA,CAACtE,WAAA,CAAAW,OAAU,EAAAc,QAAA,KAAKiD,WAAW;IAAEhC,OAAO,EAAEQ;EAAiB,EAAE,CAC1D,EACAmB,KACE,CAAC;AAEV,CAAC;AAEDtC,gBAAgB,CAACkE,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA3F,OAAA,GAExBoB,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_map","_reactFontawesome","_buttonLink","_buttonMenu","_types","_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","ButtonMenuAction","props","button","menu","menuWrapper","type","primaryColor","containerCustom","closeOnClick","enableScroll","showFade","onClick","_noop2","visible","setVisible","useState","containerRef","useRef","toggleVisibility","useCallback","prevState","useEffect","handleMouseDown","event","current","contains","target","document","addEventListener","removeEventListener","menuWithClose","buttons","map","btn","menuWrapperClass","classnames","style","_menu","createElement","className","ariaLabel","customStyle","container","ref","currentOption","color","undefined","label","FontAwesomeIcon","icon","caret","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/molecule/button-menu-action/index.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport map from 'lodash/fp/map';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {ButtonMenuActionProps} from './types';\nimport style from './style.css';\n\nconst ButtonMenuAction = (props: ButtonMenuActionProps) => {\n const {\n button,\n menu,\n menuWrapper,\n type = 'button',\n primaryColor,\n containerCustom,\n closeOnClick = false,\n enableScroll = false,\n showFade = false\n } = props;\n const {onClick = noop} = button;\n const [visible, setVisible] = useState(false);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const toggleVisibility = useCallback(() => {\n onClick();\n setVisible(prevState => !prevState);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = (event: MouseEvent) => {\n if (visible && containerRef.current && !containerRef.current.contains(event.target as Node)) {\n setVisible(false);\n }\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, [visible, containerRef]);\n\n const menuWithClose = closeOnClick\n ? {\n ...menu,\n buttons: map(\n btn => ({\n ...btn,\n onClick: () => setVisible(false)\n }),\n menu.buttons\n )\n }\n : menu;\n\n const menuWrapperClass = classnames(style.menuWrapper, {\n [style.visible]: visible,\n [style.showFade]: showFade && menuWithClose.buttons && menuWithClose.buttons.length > 6\n });\n\n const _menu = (\n <div\n className={menuWrapperClass}\n data-name=\"menu-wrapper\"\n aria-label={menuWrapper?.ariaLabel}\n style={menuWrapper?.customStyle}\n >\n <ButtonMenu {...menuWithClose} enableScroll={enableScroll} />\n </div>\n );\n\n return (\n <div\n className={style.container}\n data-name=\"button-menu-action-wrapper\"\n style={containerCustom}\n ref={containerRef}\n >\n {type === 'link' ? (\n <div\n className={style.currentOption}\n data-name={button['data-name']}\n onClick={toggleVisibility}\n aria-expanded={visible}\n aria-haspopup=\"true\"\n >\n <span style={{color: visible ? primaryColor : undefined}}>{button.label}</span>\n <FontAwesomeIcon\n icon={visible ? 'chevron-up' : 'chevron-down'}\n className={style.caret}\n style={{color: visible ? primaryColor : undefined}}\n aria-label={button['aria-label']}\n />\n </div>\n ) : (\n <ButtonLink {...button} onClick={toggleVisibility} />\n )}\n {_menu}\n </div>\n );\n};\n\nButtonMenuAction.propTypes = propTypes;\n\nexport default ButtonMenuAction;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,MAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,MAAA,GAAAN,sBAAA,CAAAF,OAAA;AAAgC,SAAAS,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,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA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AE5C,MAAM,CAAC6C,KAAY,CAAC,eAC/EpF,MAAA,CAAAiB,OAAA,CAAA0D,aAAA,CAACrE,iBAAA,CAAA+E,eAAe;IACdC,IAAI,EAAEpC,OAAO,GAAG,YAAY,GAAG,cAAe;IAC9C0B,SAAS,EAAEH,cAAK,CAACc,KAAM;IACvBd,KAAK,EAAE;MAACS,KAAK,EAAEhC,OAAO,GAAGP,YAAY,GAAGwC;IAAS,CAAE;IACnD,cAAY5C,MAAM,CAAC,YAAY;EAAE,CAClC,CACE,CAAC,gBAENvC,MAAA,CAAAiB,OAAA,CAAA0D,aAAA,CAACpE,WAAA,CAAAU,OAAU,EAAAc,QAAA,KAAKQ,MAAM;IAAES,OAAO,EAAEO;EAAiB,EAAE,CACrD,EACAmB,KACE,CAAC;AAEV,CAAC;AAEDrC,gBAAgB,CAACmD,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA5E,OAAA,GAExBoB,gBAAgB","ignoreList":[]}
@@ -3,7 +3,6 @@ import { ButtonLinkProps } from '../../atom/button-link/types';
3
3
  import { ButtonMenuProps } from '../../atom/button-menu/types';
4
4
  declare const ButtonMenuActionPropTypes: {
5
5
  button: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
6
- withChevron: PropTypes.Requireable<boolean>;
7
6
  type: PropTypes.Requireable<string>;
8
7
  usage: PropTypes.Requireable<string>;
9
8
  label: PropTypes.Requireable<string>;
@@ -13,7 +12,7 @@ declare const ButtonMenuActionPropTypes: {
13
12
  tooltipPlacement: PropTypes.Requireable<string>;
14
13
  'data-name': PropTypes.Requireable<string>;
15
14
  'data-testid': PropTypes.Requireable<string>;
16
- icon: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
15
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
17
16
  position: PropTypes.Requireable<string>;
18
17
  type: PropTypes.Requireable<string>;
19
18
  faIcon: PropTypes.Requireable<PropTypes.InferProps<{
@@ -21,19 +20,11 @@ declare const ButtonMenuActionPropTypes: {
21
20
  color: PropTypes.Requireable<string>;
22
21
  backgroundColor: PropTypes.Requireable<string>;
23
22
  size: PropTypes.Requireable<number>;
24
- customStyle: PropTypes.Requireable<object>;
23
+ customStyle: PropTypes.Requireable<{
24
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
25
+ }>;
25
26
  }>>;
26
- }> | (PropTypes.InferProps<{
27
- position: PropTypes.Requireable<string>;
28
- type: PropTypes.Requireable<string>;
29
- faIcon: PropTypes.Requireable<PropTypes.InferProps<{
30
- name: PropTypes.Validator<string>;
31
- color: PropTypes.Requireable<string>;
32
- backgroundColor: PropTypes.Requireable<string>;
33
- size: PropTypes.Requireable<number>;
34
- customStyle: PropTypes.Requireable<object>;
35
- }>>;
36
- }> | null | undefined)[] | null | undefined>>;
27
+ }>>;
37
28
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
38
29
  link: PropTypes.Requireable<PropTypes.InferProps<{
39
30
  href: PropTypes.Requireable<string>;
@@ -44,8 +35,9 @@ declare const ButtonMenuActionPropTypes: {
44
35
  hoverColor: PropTypes.Requireable<string>;
45
36
  disabled: PropTypes.Requireable<boolean>;
46
37
  className: PropTypes.Requireable<string>;
47
- customStyle: PropTypes.Requireable<object>;
48
- contentCustomStyle: PropTypes.Requireable<object>;
38
+ customStyle: PropTypes.Requireable<{
39
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
40
+ }>;
49
41
  useTitle: PropTypes.Requireable<boolean>;
50
42
  customLabelClassName: PropTypes.Requireable<string>;
51
43
  }>>>;
@@ -66,7 +58,9 @@ declare const ButtonMenuActionPropTypes: {
66
58
  color: PropTypes.Requireable<string>;
67
59
  backgroundColor: PropTypes.Requireable<string>;
68
60
  size: PropTypes.Requireable<number>;
69
- customStyle: PropTypes.Requireable<object>;
61
+ customStyle: PropTypes.Requireable<{
62
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
63
+ }>;
70
64
  }>>;
71
65
  }>>;
72
66
  customStyle: PropTypes.Requireable<{
@@ -88,14 +82,10 @@ declare const ButtonMenuActionPropTypes: {
88
82
  primaryColor: PropTypes.Requireable<string>;
89
83
  closeOnClick: PropTypes.Requireable<boolean>;
90
84
  enableScroll: PropTypes.Requireable<boolean>;
91
- containerCustom: PropTypes.Requireable<object>;
92
- showFade: PropTypes.Requireable<boolean>;
93
85
  };
94
86
  export default ButtonMenuActionPropTypes;
95
87
  export declare type ButtonMenuActionProps = {
96
- button: ButtonLinkProps & {
97
- withChevron?: boolean;
98
- };
88
+ button: ButtonLinkProps;
99
89
  menu: ButtonMenuProps;
100
90
  menuWrapper?: {
101
91
  ariaLabel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAElF,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB9B,CAAC;AACF,eAAe,yBAAyB,CAAC;AAEzC,oBAAY,qBAAqB,GAAG;IAClC,MAAM,EAAE,eAAe,GAAG;QACxB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;KAC/C,CAAC;IACF,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,C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,CAAC"}
@@ -7,10 +7,7 @@ var _types = _interopRequireDefault(require("../../atom/button-link/types"));
7
7
  var _types2 = _interopRequireDefault(require("../../atom/button-menu/types"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  const ButtonMenuActionPropTypes = {
10
- button: _propTypes.default.shape({
11
- ..._types.default,
12
- withChevron: _propTypes.default.bool
13
- }).isRequired,
10
+ button: _propTypes.default.shape(_types.default).isRequired,
14
11
  menu: _propTypes.default.shape(_types2.default).isRequired,
15
12
  menuWrapper: _propTypes.default.shape({
16
13
  ariaLabel: _propTypes.default.string,
@@ -19,9 +16,7 @@ const ButtonMenuActionPropTypes = {
19
16
  type: _propTypes.default.oneOf(['button', 'link']),
20
17
  primaryColor: _propTypes.default.string,
21
18
  closeOnClick: _propTypes.default.bool,
22
- enableScroll: _propTypes.default.bool,
23
- containerCustom: _propTypes.default.object,
24
- showFade: _propTypes.default.bool
19
+ enableScroll: _propTypes.default.bool
25
20
  };
26
21
  var _default = exports.default = ButtonMenuActionPropTypes;
27
22
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_types","_types2","e","__esModule","default","ButtonMenuActionPropTypes","button","PropTypes","shape","ButtonLinkPropTypes","withChevron","bool","isRequired","menu","ButtonMenuPropTypes","menuWrapper","ariaLabel","string","customStyle","objectOf","oneOfType","number","object","type","oneOf","primaryColor","closeOnClick","enableScroll","containerCustom","showFade","_default","exports"],"sources":["../../../src/molecule/button-menu-action/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport ButtonLinkPropTypes, {ButtonLinkProps} from '../../atom/button-link/types';\nimport ButtonMenuPropTypes, {ButtonMenuProps} from '../../atom/button-menu/types';\n\nconst ButtonMenuActionPropTypes = {\n button: PropTypes.shape({\n ...ButtonLinkPropTypes,\n withChevron: PropTypes.bool\n }).isRequired,\n menu: PropTypes.shape(ButtonMenuPropTypes).isRequired,\n menuWrapper: PropTypes.shape({\n ariaLabel: PropTypes.string,\n customStyle: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])\n )\n }),\n type: PropTypes.oneOf(['button', 'link']),\n primaryColor: PropTypes.string,\n closeOnClick: PropTypes.bool,\n enableScroll: PropTypes.bool,\n containerCustom: PropTypes.object,\n showFade: PropTypes.bool\n};\nexport default ButtonMenuActionPropTypes;\n\nexport type ButtonMenuActionProps = {\n button: ButtonLinkProps & {\n withChevron?: boolean;\n };\n menu: ButtonMenuProps;\n menuWrapper?: {\n ariaLabel?: string;\n customStyle?: Record<string, string | number>;\n };\n type?: 'button' | 'link';\n primaryColor?: string;\n containerCustom?: Record<string, string | number>;\n closeOnClick?: boolean;\n enableScroll?: boolean;\n showFade?: boolean;\n};\n\nexport type ButtonMenuActionPropsFixture = {props: ButtonMenuActionProps};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAkF,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElF,MAAMG,yBAAyB,GAAG;EAChCC,MAAM,EAAEC,kBAAS,CAACC,KAAK,CAAC;IACtB,GAAGC,cAAmB;IACtBC,WAAW,EAAEH,kBAAS,CAACI;EACzB,CAAC,CAAC,CAACC,UAAU;EACbC,IAAI,EAAEN,kBAAS,CAACC,KAAK,CAACM,eAAmB,CAAC,CAACF,UAAU;EACrDG,WAAW,EAAER,kBAAS,CAACC,KAAK,CAAC;IAC3BQ,SAAS,EAAET,kBAAS,CAACU,MAAM;IAC3BC,WAAW,EAAEX,kBAAS,CAACY,QAAQ,CAC7BZ,kBAAS,CAACa,SAAS,CAAC,CAACb,kBAAS,CAACU,MAAM,EAAEV,kBAAS,CAACc,MAAM,EAAEd,kBAAS,CAACe,MAAM,CAAC,CAC5E;EACF,CAAC,CAAC;EACFC,IAAI,EAAEhB,kBAAS,CAACiB,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;EACzCC,YAAY,EAAElB,kBAAS,CAACU,MAAM;EAC9BS,YAAY,EAAEnB,kBAAS,CAACI,IAAI;EAC5BgB,YAAY,EAAEpB,kBAAS,CAACI,IAAI;EAC5BiB,eAAe,EAAErB,kBAAS,CAACe,MAAM;EACjCO,QAAQ,EAAEtB,kBAAS,CAACI;AACtB,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GACaC,yBAAyB","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_types","_types2","e","__esModule","default","ButtonMenuActionPropTypes","button","PropTypes","shape","ButtonLinkPropTypes","isRequired","menu","ButtonMenuPropTypes","menuWrapper","ariaLabel","string","customStyle","objectOf","oneOfType","number","object","type","oneOf","primaryColor","closeOnClick","bool","enableScroll","_default","exports"],"sources":["../../../src/molecule/button-menu-action/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport ButtonLinkPropTypes, {ButtonLinkProps} from '../../atom/button-link/types';\nimport ButtonMenuPropTypes, {ButtonMenuProps} from '../../atom/button-menu/types';\n\nconst ButtonMenuActionPropTypes = {\n button: PropTypes.shape(ButtonLinkPropTypes).isRequired,\n menu: PropTypes.shape(ButtonMenuPropTypes).isRequired,\n menuWrapper: PropTypes.shape({\n ariaLabel: PropTypes.string,\n customStyle: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])\n )\n }),\n type: PropTypes.oneOf(['button', 'link']),\n primaryColor: PropTypes.string,\n closeOnClick: PropTypes.bool,\n enableScroll: PropTypes.bool\n};\nexport default ButtonMenuActionPropTypes;\n\nexport type ButtonMenuActionProps = {\n button: ButtonLinkProps;\n menu: ButtonMenuProps;\n menuWrapper?: {\n ariaLabel?: string;\n customStyle?: Record<string, string | number>;\n };\n type?: 'button' | 'link';\n primaryColor?: string;\n containerCustom?: Record<string, string | number>;\n closeOnClick?: boolean;\n enableScroll?: boolean;\n showFade?: boolean;\n};\n\nexport type ButtonMenuActionPropsFixture = {props: ButtonMenuActionProps};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAkF,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElF,MAAMG,yBAAyB,GAAG;EAChCC,MAAM,EAAEC,kBAAS,CAACC,KAAK,CAACC,cAAmB,CAAC,CAACC,UAAU;EACvDC,IAAI,EAAEJ,kBAAS,CAACC,KAAK,CAACI,eAAmB,CAAC,CAACF,UAAU;EACrDG,WAAW,EAAEN,kBAAS,CAACC,KAAK,CAAC;IAC3BM,SAAS,EAAEP,kBAAS,CAACQ,MAAM;IAC3BC,WAAW,EAAET,kBAAS,CAACU,QAAQ,CAC7BV,kBAAS,CAACW,SAAS,CAAC,CAACX,kBAAS,CAACQ,MAAM,EAAER,kBAAS,CAACY,MAAM,EAAEZ,kBAAS,CAACa,MAAM,CAAC,CAC5E;EACF,CAAC,CAAC;EACFC,IAAI,EAAEd,kBAAS,CAACe,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;EACzCC,YAAY,EAAEhB,kBAAS,CAACQ,MAAM;EAC9BS,YAAY,EAAEjB,kBAAS,CAACkB,IAAI;EAC5BC,YAAY,EAAEnB,kBAAS,CAACkB;AAC1B,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAxB,OAAA,GACaC,yBAAyB","ignoreList":[]}