@coorpacademy/components 11.12.3-alpha.4 → 11.12.3-alpha.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 (79) hide show
  1. package/es/atom/battle-opponent/index.d.ts.map +1 -1
  2. package/es/atom/battle-opponent/index.js +4 -2
  3. package/es/atom/battle-opponent/index.js.map +1 -1
  4. package/es/atom/battle-opponent/style.css +12 -0
  5. package/es/atom/button/index.d.ts +14 -3
  6. package/es/atom/button/index.d.ts.map +1 -1
  7. package/es/atom/button/index.js +60 -27
  8. package/es/atom/button/index.js.map +1 -1
  9. package/es/atom/tooltip/index.d.ts.map +1 -1
  10. package/es/atom/tooltip/index.js +2 -1
  11. package/es/atom/tooltip/index.js.map +1 -1
  12. package/es/molecule/brand-form-group/index.d.ts +14 -3
  13. package/es/molecule/card/customer.js +1 -1
  14. package/es/molecule/card/customer.js.map +1 -1
  15. package/es/molecule/card/favorite.css +15 -35
  16. package/es/molecule/card/favorite.d.ts +1 -0
  17. package/es/molecule/card/favorite.d.ts.map +1 -1
  18. package/es/molecule/card/favorite.js +73 -18
  19. package/es/molecule/card/favorite.js.map +1 -1
  20. package/es/molecule/card/selectable.js +1 -1
  21. package/es/molecule/card/selectable.js.map +1 -1
  22. package/es/molecule/course-section/style.css +6 -4
  23. package/es/molecule/draggable/style.css +5 -9
  24. package/es/molecule/draggable-list/index.d.ts +2 -50
  25. package/es/molecule/draggable-list/index.d.ts.map +1 -1
  26. package/es/molecule/draggable-list/index.js +2 -4
  27. package/es/molecule/draggable-list/index.js.map +1 -1
  28. package/es/organism/brand-form/index.d.ts +14 -3
  29. package/es/organism/list-item/index.d.ts +0 -1
  30. package/es/organism/list-item/index.js +1 -2
  31. package/es/organism/list-item/index.js.map +1 -1
  32. package/es/organism/list-item/style.css +4 -6
  33. package/es/organism/list-items/index.d.ts +1 -4
  34. package/es/organism/list-items/index.d.ts.map +1 -1
  35. package/es/organism/list-items/index.js +13 -31
  36. package/es/organism/list-items/index.js.map +1 -1
  37. package/es/organism/wizard-contents/index.d.ts +14 -3
  38. package/es/template/back-office/brand-update/index.d.ts +28 -8
  39. package/es/template/common/search-page/index.d.ts +14 -3
  40. package/lib/atom/battle-opponent/index.d.ts.map +1 -1
  41. package/lib/atom/battle-opponent/index.js +4 -2
  42. package/lib/atom/battle-opponent/index.js.map +1 -1
  43. package/lib/atom/battle-opponent/style.css +12 -0
  44. package/lib/atom/button/index.d.ts +14 -3
  45. package/lib/atom/button/index.d.ts.map +1 -1
  46. package/lib/atom/button/index.js +65 -27
  47. package/lib/atom/button/index.js.map +1 -1
  48. package/lib/atom/tooltip/index.d.ts.map +1 -1
  49. package/lib/atom/tooltip/index.js +2 -1
  50. package/lib/atom/tooltip/index.js.map +1 -1
  51. package/lib/molecule/brand-form-group/index.d.ts +14 -3
  52. package/lib/molecule/card/customer.js +1 -1
  53. package/lib/molecule/card/customer.js.map +1 -1
  54. package/lib/molecule/card/favorite.css +15 -35
  55. package/lib/molecule/card/favorite.d.ts +1 -0
  56. package/lib/molecule/card/favorite.d.ts.map +1 -1
  57. package/lib/molecule/card/favorite.js +75 -16
  58. package/lib/molecule/card/favorite.js.map +1 -1
  59. package/lib/molecule/card/selectable.js +1 -1
  60. package/lib/molecule/card/selectable.js.map +1 -1
  61. package/lib/molecule/course-section/style.css +6 -4
  62. package/lib/molecule/draggable/style.css +5 -9
  63. package/lib/molecule/draggable-list/index.d.ts +2 -50
  64. package/lib/molecule/draggable-list/index.d.ts.map +1 -1
  65. package/lib/molecule/draggable-list/index.js +2 -5
  66. package/lib/molecule/draggable-list/index.js.map +1 -1
  67. package/lib/organism/brand-form/index.d.ts +14 -3
  68. package/lib/organism/list-item/index.d.ts +0 -1
  69. package/lib/organism/list-item/index.js +1 -2
  70. package/lib/organism/list-item/index.js.map +1 -1
  71. package/lib/organism/list-item/style.css +4 -6
  72. package/lib/organism/list-items/index.d.ts +1 -4
  73. package/lib/organism/list-items/index.d.ts.map +1 -1
  74. package/lib/organism/list-items/index.js +13 -33
  75. package/lib/organism/list-items/index.js.map +1 -1
  76. package/lib/organism/wizard-contents/index.d.ts +14 -3
  77. package/lib/template/back-office/brand-update/index.d.ts +28 -8
  78. package/lib/template/common/search-page/index.d.ts +14 -3
  79. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","findIndex","PropTypes","ListItem","DraggableList","Title","ButtonLink","style","buildItemsView","items","contentType","onDrop","ariaLabel","isPublished","type","tags","map","item","itemsView","index","id","list","ListItems","title","buttonLink","header","buttonCreate","propTypes","string","shape","arrayOf","func"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport findIndex from 'lodash/fp/findIndex';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport DraggableList from '../../molecule/draggable-list';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsView = (items, contentType, onDrop, ariaLabel) => {\n const isPublished = findIndex({type: 'published'}, items[0]?.tags) !== -1;\n\n if (isPublished && contentType === 'certification')\n return (\n <DraggableList\n items={items.map(item => ({...item, contentType}))}\n itemType=\"list-item\"\n onDrop={onDrop}\n />\n );\n\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\n return (\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n );\n};\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType, onDrop}) => {\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n {buildItemsView(items, contentType, onDrop, ariaLabel)}\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string,\n onDrop: PropTypes.func\n};\n\nexport default ListItems;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,qBAAtB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA6BC,SAA7B,KAA2C;EAChE,MAAMC,WAAW,GAAGZ,SAAS,CAAC;IAACa,IAAI,EAAE;EAAP,CAAD,EAAsBL,KAAK,CAAC,CAAD,CAAL,EAAUM,IAAhC,CAAT,KAAmD,CAAC,CAAxE;EAEA,IAAIF,WAAW,IAAIH,WAAW,KAAK,eAAnC,EACE,oBACE,oBAAC,aAAD;IACE,KAAK,EAAED,KAAK,CAACO,GAAN,CAAUC,IAAI,iBAASA,IAAT;MAAeP;IAAf,EAAd,CADT;IAEE,QAAQ,EAAC,WAFX;IAGE,MAAM,EAAEC;EAHV,EADF;EAQF,MAAMO,SAAS,GAAGT,KAAK,CAACO,GAAN,CAAU,CAACC,IAAD,EAAOE,KAAP,kBAC1B;IAAI,GAAG,EAAEF,IAAI,CAACG,EAAd;IAAkB,SAAS,EAAEb,KAAK,CAACU,IAAnC;IAAyC,aAAY,WAAUE,KAAM;EAArE,gBACE,oBAAC,QAAD,eAAcF,IAAd;IAAoB,KAAK,EAAEE,KAA3B;IAAkC,WAAW,EAAET;EAA/C,GADF,CADgB,CAAlB;EAMA,oBACE;IAAI,SAAS,EAAEH,KAAK,CAACc,IAArB;IAA2B,cAAYT,SAAvC;IAAkD,aAAW;EAA7D,GACGM,SADH,CADF;AAKD,CAvBD;;AAyBA,MAAMI,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBf,KAApB;EAA2B,cAAcG,SAAzC;EAAoDF,WAApD;EAAiEC;AAAjE,CAAD,KAA8E;EAC9F,oBACE,8CACE;IAAK,SAAS,EAAEJ,KAAK,CAACkB;EAAtB,gBACE;IAAK,SAAS,EAAElB,KAAK,CAACgB;EAAtB,gBACE,oBAAC,KAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAEhB,KAAK,CAACmB;EAAtB,gBACE,oBAAC,UAAD,EAAgBF,UAAhB,CADF,CAJF,CADF,EASGhB,cAAc,CAACC,KAAD,EAAQC,WAAR,EAAqBC,MAArB,EAA6BC,SAA7B,CATjB,CADF;AAaD,CAdD;;AAgBAU,SAAS,CAACK,SAAV,2CAAsB;EACpB,cAAczB,SAAS,CAAC0B,MADJ;EAEpBJ,UAAU,EAAEtB,SAAS,CAAC2B,KAAV,CAAgBvB,UAAU,CAACqB,SAA3B,CAFQ;EAGpBlB,KAAK,EAAEP,SAAS,CAAC4B,OAAV,CAAkB5B,SAAS,CAAC2B,KAAV,CAAgB1B,QAAQ,CAACwB,SAAzB,CAAlB,CAHa;EAIpBJ,KAAK,EAAErB,SAAS,CAAC0B,MAJG;EAKpBlB,WAAW,EAAER,SAAS,CAAC0B,MALH;EAMpBjB,MAAM,EAAET,SAAS,CAAC6B;AANE,CAAtB;AASA,eAAeT,SAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","ListItem","Title","ButtonLink","style","ListItems","title","buttonLink","items","ariaLabel","contentType","itemsView","map","item","index","id","header","buttonCreate","list","propTypes","string","shape","arrayOf"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC,SAAzC;EAAoDC;AAApD,CAAD,KAAsE;EACtF,MAAMC,SAAS,GAAGH,KAAK,CAACI,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEX,KAAK,CAACS,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,oBAAC,QAAD,eAAcD,IAAd;IAAoB,KAAK,EAAEC,KAA3B;IAAkC,WAAW,EAAEJ;EAA/C,GADF,CADgB,CAAlB;EAMA,oBACE,8CACE;IAAK,SAAS,EAAEN,KAAK,CAACY;EAAtB,gBACE;IAAK,SAAS,EAAEZ,KAAK,CAACE;EAAtB,gBACE,oBAAC,KAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAEF,KAAK,CAACa;EAAtB,gBACE,oBAAC,UAAD,EAAgBV,UAAhB,CADF,CAJF,CADF,eASE;IAAI,SAAS,EAAEH,KAAK,CAACc,IAArB;IAA2B,cAAYT,SAAvC;IAAkD,aAAW;EAA7D,GACGE,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAN,SAAS,CAACc,SAAV,2CAAsB;EACpB,cAAcnB,SAAS,CAACoB,MADJ;EAEpBb,UAAU,EAAEP,SAAS,CAACqB,KAAV,CAAgBlB,UAAU,CAACgB,SAA3B,CAFQ;EAGpBX,KAAK,EAAER,SAAS,CAACsB,OAAV,CAAkBtB,SAAS,CAACqB,KAAV,CAAgBpB,QAAQ,CAACkB,SAAzB,CAAlB,CAHa;EAIpBb,KAAK,EAAEN,SAAS,CAACoB,MAJG;EAKpBV,WAAW,EAAEV,SAAS,CAACoB;AALH,CAAtB;AAQA,eAAef,SAAf"}
@@ -433,16 +433,27 @@ declare namespace WizardContents {
433
433
  color: any;
434
434
  submitValue: PropTypes.Requireable<string>;
435
435
  disabled: PropTypes.Requireable<boolean>;
436
- isLinkDisabled: PropTypes.Requireable<boolean>;
437
436
  href: PropTypes.Requireable<string>;
438
437
  download: PropTypes.Requireable<boolean>;
439
438
  target: PropTypes.Requireable<string>;
440
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
441
439
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
442
440
  className: PropTypes.Requireable<string>;
443
- buttonContentClassName: PropTypes.Requireable<string>;
444
441
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
445
442
  'data-name': PropTypes.Requireable<string>;
443
+ 'aria-label': PropTypes.Requireable<string>;
444
+ 'data-testid': PropTypes.Requireable<string>;
445
+ useButtonTag: PropTypes.Requireable<boolean>;
446
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
447
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
448
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
449
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
450
+ buttonRef: PropTypes.Requireable<string>;
451
+ 'data-for': PropTypes.Requireable<string>;
452
+ 'data-tooltip-place': PropTypes.Requireable<string>;
453
+ 'data-tip': PropTypes.Requireable<boolean>;
454
+ isLinkDisabled: PropTypes.Requireable<boolean>;
455
+ useWrapper: PropTypes.Requireable<boolean>;
456
+ buttonContentClassName: PropTypes.Requireable<string>;
446
457
  }> | PropTypes.InferProps<{
447
458
  buttonType: PropTypes.Requireable<string>;
448
459
  type: PropTypes.Requireable<string>;
@@ -518,16 +518,27 @@ declare namespace BrandUpdate {
518
518
  color: any;
519
519
  submitValue: PropTypes.Requireable<string>;
520
520
  disabled: PropTypes.Requireable<boolean>;
521
- isLinkDisabled: PropTypes.Requireable<boolean>;
522
521
  href: PropTypes.Requireable<string>;
523
522
  download: PropTypes.Requireable<boolean>;
524
523
  target: PropTypes.Requireable<string>;
525
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
526
524
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
527
525
  className: PropTypes.Requireable<string>;
528
- buttonContentClassName: PropTypes.Requireable<string>;
529
526
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
530
527
  'data-name': PropTypes.Requireable<string>;
528
+ 'aria-label': PropTypes.Requireable<string>;
529
+ 'data-testid': PropTypes.Requireable<string>;
530
+ useButtonTag: PropTypes.Requireable<boolean>;
531
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
532
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
533
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
534
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
535
+ buttonRef: PropTypes.Requireable<string>;
536
+ 'data-for': PropTypes.Requireable<string>;
537
+ 'data-tooltip-place': PropTypes.Requireable<string>;
538
+ 'data-tip': PropTypes.Requireable<boolean>;
539
+ isLinkDisabled: PropTypes.Requireable<boolean>;
540
+ useWrapper: PropTypes.Requireable<boolean>;
541
+ buttonContentClassName: PropTypes.Requireable<string>;
531
542
  }> | PropTypes.InferProps<{
532
543
  buttonType: PropTypes.Requireable<string>;
533
544
  type: PropTypes.Requireable<string>;
@@ -1176,16 +1187,27 @@ declare namespace BrandUpdate {
1176
1187
  color: any;
1177
1188
  submitValue: PropTypes.Requireable<string>;
1178
1189
  disabled: PropTypes.Requireable<boolean>;
1179
- isLinkDisabled: PropTypes.Requireable<boolean>;
1180
1190
  href: PropTypes.Requireable<string>;
1181
1191
  download: PropTypes.Requireable<boolean>;
1182
1192
  target: PropTypes.Requireable<string>;
1183
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
1184
1193
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
1185
1194
  className: PropTypes.Requireable<string>;
1186
- buttonContentClassName: PropTypes.Requireable<string>;
1187
1195
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
1188
1196
  'data-name': PropTypes.Requireable<string>;
1197
+ 'aria-label': PropTypes.Requireable<string>;
1198
+ 'data-testid': PropTypes.Requireable<string>;
1199
+ useButtonTag: PropTypes.Requireable<boolean>;
1200
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
1201
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
1202
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
1203
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
1204
+ buttonRef: PropTypes.Requireable<string>;
1205
+ 'data-for': PropTypes.Requireable<string>;
1206
+ 'data-tooltip-place': PropTypes.Requireable<string>;
1207
+ 'data-tip': PropTypes.Requireable<boolean>;
1208
+ isLinkDisabled: PropTypes.Requireable<boolean>;
1209
+ useWrapper: PropTypes.Requireable<boolean>;
1210
+ buttonContentClassName: PropTypes.Requireable<string>;
1189
1211
  }> | PropTypes.InferProps<{
1190
1212
  buttonType: PropTypes.Requireable<string>;
1191
1213
  type: PropTypes.Requireable<string>;
@@ -1522,10 +1544,8 @@ declare namespace BrandUpdate {
1522
1544
  order: PropTypes.Requireable<number>;
1523
1545
  'aria-label': PropTypes.Requireable<string>;
1524
1546
  contentType: PropTypes.Requireable<string>;
1525
- id: PropTypes.Requireable<string>;
1526
1547
  }> | null | undefined)[]>;
1527
1548
  title: PropTypes.Requireable<string>;
1528
- onDrop: PropTypes.Requireable<(...args: any[]) => any>;
1529
1549
  }> | PropTypes.InferProps<{
1530
1550
  key: PropTypes.Requireable<string>;
1531
1551
  type: PropTypes.Requireable<string>;
@@ -85,17 +85,28 @@ declare namespace SearchPage {
85
85
  color: any;
86
86
  submitValue: PropTypes.Requireable<string>;
87
87
  disabled: PropTypes.Requireable<boolean>;
88
- isLinkDisabled: PropTypes.Requireable<boolean>;
89
88
  href: PropTypes.Requireable<string>;
90
89
  download: PropTypes.Requireable<boolean>;
91
90
  target: PropTypes.Requireable<string>;
92
91
  type: PropTypes.Requireable<string>;
93
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
94
92
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
95
93
  className: PropTypes.Requireable<string>;
96
- buttonContentClassName: PropTypes.Requireable<string>;
97
94
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
98
95
  'data-name': PropTypes.Requireable<string>;
96
+ 'aria-label': PropTypes.Requireable<string>;
97
+ 'data-testid': PropTypes.Requireable<string>;
98
+ useButtonTag: PropTypes.Requireable<boolean>;
99
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
100
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
101
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
102
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
103
+ buttonRef: PropTypes.Requireable<string>;
104
+ 'data-for': PropTypes.Requireable<string>;
105
+ 'data-tooltip-place': PropTypes.Requireable<string>;
106
+ 'data-tip': PropTypes.Requireable<boolean>;
107
+ isLinkDisabled: PropTypes.Requireable<boolean>;
108
+ useWrapper: PropTypes.Requireable<boolean>;
109
+ buttonContentClassName: PropTypes.Requireable<string>;
99
110
  }>>;
100
111
  const recommendations: PropTypes.Requireable<PropTypes.InferProps<{
101
112
  contentType: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;gHASf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;;CAyGhC,CAAC;AAQF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;gHASf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;;CA2GhC,CAAC;AAQF,eAAe,cAAc,CAAC"}
@@ -102,13 +102,15 @@ const BattleOpponent = ({
102
102
  className: _style.default.informationIcon,
103
103
  width: 20,
104
104
  height: 20
105
- })), /*#__PURE__*/_react.default.createElement(_tooltip.default, {
105
+ })), /*#__PURE__*/_react.default.createElement("span", {
106
+ className: _style.default.toolTipWrapper
107
+ }, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
106
108
  fontSize: 12,
107
109
  anchorId: battleOpponentInfoId,
108
110
  toolTipIsVisible: toolTipIsVisible,
109
111
  TooltipContent: TooltipContent,
110
112
  closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text')
111
- })) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
113
+ }))) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
112
114
  className: _style.default.rightArrow,
113
115
  width: 16,
114
116
  height: 16
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","GetTranslateFromContext","wrapperClassnames","useMemo","classnames","style","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","useState","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","uuidV5","URL","buttonRef","useRef","handleMouseOver","useCallback","clearTimeout","has","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","toggleStateOnKeyPress","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","rightArrow","propTypes","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n />\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CACrB;EACEC,gBADF;EAEEC,QAFF;EAGEC,aAHF;EAIEC,OAJF;EAKEC,WALF;EAMEC,WANF;EAOE,cAAcC;AAPhB,CADqB,EAUrBC,aAVqB,KAWlB;EACH,MAAMC,SAAkD,GAAG,IAAAC,iCAAA,EAAwBF,aAAxB,CAA3D;EACA,MAAMG,iBAAiB,GAAG,IAAAC,cAAA,EACxB,MAAM,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,IAAjB,EAAuBD,cAAA,CAAM,eAAN,CAAvB,EAA+CZ,QAAQ,GAAGY,cAAA,CAAME,MAAT,GAAkB,IAAzE,CADkB,EAExB,CAACd,QAAD,CAFwB,CAA1B;EAKA,MAAMe,qBAAqB,GAAG,IAAAL,cAAA,EAC5B,MAAM,IAAAC,mBAAA,EAAWC,cAAA,CAAMI,IAAjB,EAAuBjB,gBAAgB,GAAGa,cAAA,CAAMK,cAAT,GAA0B,IAAjE,CADsB,EAE5B,CAAClB,gBAAD,CAF4B,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D6C;EALjD,EAjBF,CADe,gBA6Bf,6BAAC,8CAAD;IAAY,SAAS,EAAEK,cAAA,CAAMkC,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EAvCJ,CADF;AA4CD,CAnHD;;AAqHAhD,cAAc,CAACiD,SAAf,2CAA2BA,kBAA3B;AAEAjD,cAAc,CAACkD,YAAf,GAA8B;EAC5BzC,SAAS,EAAE0C,iBAAA,CAASC,iBAAT,CAA2B3C;AADV,CAA9B;eAIeT,c"}
1
+ {"version":3,"file":"index.js","names":["BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","GetTranslateFromContext","wrapperClassnames","useMemo","classnames","style","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","useState","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","uuidV5","URL","buttonRef","useRef","handleMouseOver","useCallback","clearTimeout","has","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","toggleStateOnKeyPress","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","toolTipWrapper","rightArrow","propTypes","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <span className={style.toolTipWrapper}>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n />\n </span>\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CACrB;EACEC,gBADF;EAEEC,QAFF;EAGEC,aAHF;EAIEC,OAJF;EAKEC,WALF;EAMEC,WANF;EAOE,cAAcC;AAPhB,CADqB,EAUrBC,aAVqB,KAWlB;EACH,MAAMC,SAAkD,GAAG,IAAAC,iCAAA,EAAwBF,aAAxB,CAA3D;EACA,MAAMG,iBAAiB,GAAG,IAAAC,cAAA,EACxB,MAAM,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,IAAjB,EAAuBD,cAAA,CAAM,eAAN,CAAvB,EAA+CZ,QAAQ,GAAGY,cAAA,CAAME,MAAT,GAAkB,IAAzE,CADkB,EAExB,CAACd,QAAD,CAFwB,CAA1B;EAKA,M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,EAdF,CADF,eAiBE;IAAM,SAAS,EAAEjC,cAAA,CAAMkC;EAAvB,gBACE,6BAAC,gBAAD;IACE,QAAQ,EAAE,EADZ;IAEE,QAAQ,EAAEtB,oBAFZ;IAGE,gBAAgB,EAAEF,gBAHpB;IAIE,cAAc,EAAEmB,cAJlB;IAKE,oCAAoC,EAAElC,SAAS,CAC7C,oDAD6C;EALjD,EADF,CAjBF,CADe,gBA+Bf,6BAAC,8CAAD;IAAY,SAAS,EAAEK,cAAA,CAAMmC,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EAzCJ,CADF;AA8CD,CArHD;;AAuHAjD,cAAc,CAACkD,SAAf,2CAA2BA,kBAA3B;AAEAlD,cAAc,CAACmD,YAAf,GAA8B;EAC5B1C,SAAS,EAAE2C,iBAAA,CAASC,iBAAT,CAA2B5C;AADV,CAA9B;eAIeT,c"}
@@ -112,6 +112,18 @@
112
112
  align-items: center;
113
113
  }
114
114
 
115
+ .toolTipWrapper {
116
+ position: absolute;
117
+ width: 100%;
118
+ }
119
+
120
+ .card .tooltipIconContainer + .toolTipWrapper [class*="__react_component_tooltip"]:not([class*="toolTipReact"]) {
121
+ position: sticky;
122
+ top: unset !important;
123
+ left: unset !important;
124
+ max-width: 75%;
125
+ }
126
+
115
127
  @media mobile {
116
128
  .opponent-card {
117
129
  width: 100%;
@@ -5,17 +5,28 @@ declare namespace Button {
5
5
  color: any;
6
6
  submitValue: PropTypes.Requireable<string>;
7
7
  disabled: PropTypes.Requireable<boolean>;
8
- isLinkDisabled: PropTypes.Requireable<boolean>;
9
8
  href: PropTypes.Requireable<string>;
10
9
  download: PropTypes.Requireable<boolean>;
11
10
  target: PropTypes.Requireable<string>;
12
11
  type: PropTypes.Requireable<string>;
13
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
14
12
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
13
  className: PropTypes.Requireable<string>;
16
- buttonContentClassName: PropTypes.Requireable<string>;
17
14
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
18
15
  'data-name': PropTypes.Requireable<string>;
16
+ 'aria-label': PropTypes.Requireable<string>;
17
+ 'data-testid': PropTypes.Requireable<string>;
18
+ useButtonTag: PropTypes.Requireable<boolean>;
19
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
20
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
21
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
22
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
23
+ buttonRef: PropTypes.Requireable<string>;
24
+ 'data-for': PropTypes.Requireable<string>;
25
+ 'data-tooltip-place': PropTypes.Requireable<string>;
26
+ 'data-tip': PropTypes.Requireable<boolean>;
27
+ isLinkDisabled: PropTypes.Requireable<boolean>;
28
+ useWrapper: PropTypes.Requireable<boolean>;
29
+ buttonContentClassName: PropTypes.Requireable<string>;
19
30
  };
20
31
  }
21
32
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA6FA,iDA0BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA0IA,iDAgCC"}
@@ -3,12 +3,14 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _react = _interopRequireDefault(require("react"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
+ var _noop = _interopRequireDefault(require("lodash/fp/noop"));
13
+
12
14
  var _proptypes = require("../../util/proptypes");
13
15
 
14
16
  var _link = _interopRequireDefault(require("../link"));
@@ -17,6 +19,10 @@ var _style = _interopRequireDefault(require("./style.css"));
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
21
 
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
20
26
  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); }
21
27
 
22
28
  const ButtonContent = props => {
@@ -28,12 +34,21 @@ const ButtonContent = props => {
28
34
  href,
29
35
  target,
30
36
  onClick,
31
- className = _style.default.button,
37
+ className,
32
38
  children,
33
39
  type,
34
40
  style,
35
41
  'data-name': dataName,
36
- 'aria-label': ariaLabel
42
+ 'aria-label': ariaLabel,
43
+ 'data-testid': dataTestid,
44
+ useButtonTag,
45
+ buttonRef,
46
+ 'data-for': dataFor,
47
+ 'data-tooltip-place': dataTooltipPlace,
48
+ 'data-tip': dataTip,
49
+ onKeyDown = _noop.default,
50
+ onMouseLeave = _noop.default,
51
+ onMouseOver = _noop.default
37
52
  } = props;
38
53
  const anchorClassName = disabled && `${className} ${_style.default.disabledAnchor}` || className;
39
54
  const anchorOnClick = disabled && null || onClick;
@@ -63,6 +78,26 @@ const ButtonContent = props => {
63
78
  style: style
64
79
  }, submitValue || children);
65
80
 
81
+ case 'button':
82
+ if (useButtonTag) return /*#__PURE__*/_react.default.createElement("button", {
83
+ ref: buttonRef,
84
+ type: "button",
85
+ "data-for": dataFor,
86
+ "data-tooltip-place": dataTooltipPlace,
87
+ "data-tip": dataTip,
88
+ "data-name": dataName,
89
+ "data-testid": dataTestid,
90
+ "aria-label": ariaLabel.favorite,
91
+ className: className,
92
+ onClick: onClick,
93
+ style: style,
94
+ onKeyDown: onKeyDown,
95
+ onMouseLeave: onMouseLeave,
96
+ onMouseOver: onMouseOver,
97
+ tabIndex: 0
98
+ }, children);
99
+ // falls through in case type is button BUT no button tag is needed, for retro-compatibility
100
+
66
101
  default:
67
102
  return /*#__PURE__*/_react.default.createElement("input", {
68
103
  "data-name": dataName,
@@ -86,12 +121,23 @@ ButtonContent.propTypes = process.env.NODE_ENV !== "production" ? {
86
121
  download: _propTypes.default.bool,
87
122
  target: _propTypes.default.oneOf(['_self', '_blank', '_parent', '_top']),
88
123
  type: _propTypes.default.string,
89
- onClick: _propTypes.default.func,
90
124
  children: _propTypes.default.node,
91
125
  className: _propTypes.default.string,
92
126
  style: _propTypes.default.shape({}),
93
127
  'data-name': _propTypes.default.string,
94
- 'aria-label': _propTypes.default.string
128
+ 'aria-label': _propTypes.default.string,
129
+ 'data-testid': _propTypes.default.string,
130
+ useButtonTag: _propTypes.default.bool,
131
+ // event handlers
132
+ onClick: _propTypes.default.func,
133
+ onKeyDown: _propTypes.default.func,
134
+ onMouseLeave: _propTypes.default.func,
135
+ onMouseOver: _propTypes.default.func,
136
+ // for ReactTooltip handling
137
+ buttonRef: _propTypes.default.string,
138
+ 'data-for': _propTypes.default.string,
139
+ 'data-tooltip-place': _propTypes.default.string,
140
+ 'data-tip': _propTypes.default.bool
95
141
  } : {};
96
142
 
97
143
  const Button = props => {
@@ -101,34 +147,26 @@ const Button = props => {
101
147
  isLinkDisabled,
102
148
  type = 'submit',
103
149
  children,
104
- style
150
+ useWrapper = true
105
151
  } = props;
106
- const cNames = isLinkDisabled && (0, _classnames.default)([_style.default.disabledAnchor, className]) || (0, _classnames.default)([_style.default.button, className]);
107
- return /*#__PURE__*/_react.default.createElement("div", {
108
- className: cNames
152
+ const buttonWrapperClassNames = (0, _react.useMemo)(() => isLinkDisabled && (0, _classnames.default)([_style.default.disabledAnchor, className]) || (0, _classnames.default)([_style.default.button, className]), [className, isLinkDisabled]);
153
+ const contentClassName = (0, _react.useMemo)(() => buttonContentClassName ? buttonContentClassName : _style.default.buttonContent, [buttonContentClassName]);
154
+ return useWrapper ? /*#__PURE__*/_react.default.createElement("div", {
155
+ className: buttonWrapperClassNames
109
156
  }, /*#__PURE__*/_react.default.createElement(ButtonContent, _extends({}, props, {
110
157
  type: type,
111
- className: buttonContentClassName ? buttonContentClassName : _style.default.buttonContent,
112
- style: _extends({}, style)
113
- }), children));
158
+ className: contentClassName
159
+ }), children)) : /*#__PURE__*/_react.default.createElement(ButtonContent, _extends({}, props, {
160
+ type: type,
161
+ className: contentClassName
162
+ }), children);
114
163
  };
115
164
 
116
- Button.propTypes = process.env.NODE_ENV !== "production" ? {
117
- color: _proptypes.ColorPropType,
118
- submitValue: _propTypes.default.string,
119
- disabled: _propTypes.default.bool,
165
+ Button.propTypes = process.env.NODE_ENV !== "production" ? _extends({
120
166
  isLinkDisabled: _propTypes.default.bool,
121
- href: _propTypes.default.string,
122
- download: _propTypes.default.bool,
123
- target: _propTypes.default.oneOf(['_self', '_blank', '_parent', '_top']),
124
- type: _propTypes.default.string,
125
- onClick: _propTypes.default.func,
126
- children: _propTypes.default.node,
127
- className: _propTypes.default.string,
128
- buttonContentClassName: _propTypes.default.string,
129
- style: _propTypes.default.shape({}),
130
- 'data-name': _propTypes.default.string
131
- } : {};
167
+ useWrapper: _propTypes.default.bool,
168
+ buttonContentClassName: _propTypes.default.string
169
+ }, ButtonContent.propTypes) : {};
132
170
  var _default = Button;
133
171
  exports.default = _default;
134
172
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","cssStyle","button","children","type","style","dataName","ariaLabel","anchorClassName","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","propTypes","ColorPropType","PropTypes","string","bool","oneOf","func","node","shape","Button","buttonContentClassName","isLinkDisabled","cNames","classnames","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className = cssStyle.button,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n >\n {submitValue || children}\n </a>\n );\n\n default:\n return (\n <input\n data-name={dataName}\n type={type}\n value={submitValue}\n disabled={disabled}\n onClick={onClick}\n className={inputClassName}\n style={{\n color,\n ...style\n }}\n />\n );\n }\n};\n\nButtonContent.propTypes = {\n color: ColorPropType,\n submitValue: PropTypes.string,\n disabled: PropTypes.bool,\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n type: PropTypes.string,\n onClick: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n style: PropTypes.shape({}),\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string\n};\n\nconst Button = props => {\n const {\n className,\n buttonContentClassName,\n isLinkDisabled,\n type = 'submit',\n children,\n style\n } = props;\n const cNames =\n (isLinkDisabled && classnames([cssStyle.disabledAnchor, className])) ||\n classnames([cssStyle.button, className]);\n return (\n <div className={cNames}>\n <ButtonContent\n {...props}\n type={type}\n className={buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent}\n style={{\n ...style\n }}\n >\n {children}\n </ButtonContent>\n </div>\n );\n};\n\nButton.propTypes = {\n color: ColorPropType,\n submitValue: PropTypes.string,\n disabled: PropTypes.bool,\n isLinkDisabled: PropTypes.bool,\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n type: PropTypes.string,\n onClick: PropTypes.func,\n children: PropTypes.node,\n className: PropTypes.string,\n buttonContentClassName: PropTypes.string,\n style: PropTypes.shape({}),\n 'data-name': PropTypes.string\n};\n\nexport default Button;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,aAAa,GAAGC,KAAK,IAAI;EAC7B,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAHI;IAIJC,QAJI;IAKJC,IALI;IAMJC,MANI;IAOJC,OAPI;IAQJC,SAAS,GAAGC,cAAA,CAASC,MARjB;IASJC,QATI;IAUJC,IAVI;IAWJC,KAXI;IAYJ,aAAaC,QAZT;IAaJ,cAAcC;EAbV,IAcFf,KAdJ;EAeA,MAAMgB,eAAe,GAAIb,QAAQ,IAAK,GAAEK,SAAU,IAAGC,cAAA,CAASQ,cAAe,EAArD,IAA2DT,SAAnF;EACA,MAAMU,aAAa,GAAIf,QAAQ,IAAI,IAAb,IAAsBI,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AAEkB,kBAAA,CAAUG,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB,CAPS;EAQjBf,IAAI,EAAEY,kBAAA,CAAUC,MARC;EASjBlB,OAAO,EAAEiB,kBAAA,CAAUI,IATF;EAUjBjB,QAAQ,EAAEa,kBAAA,CAAUK,IAVH;EAWjBrB,SAAS,EAAEgB,kBAAA,CAAUC,MAXJ;EAYjBO,sBAAsB,EAAER,kBAAA,CAAUC,MAZjB;EAajBZ,KAAK,EAAEW,kBAAA,CAAUM,KAAV,CAAgB,EAAhB,CAbU;EAcjB,aAAaN,kBAAA,CAAUC;AAdN,CAAnB;eAiBeM,M"}
1
+ {"version":3,"file":"index.js","names":["ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","children","type","style","dataName","ariaLabel","dataTestid","useButtonTag","buttonRef","dataFor","dataTooltipPlace","dataTip","onKeyDown","noop","onMouseLeave","onMouseOver","anchorClassName","cssStyle","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","favorite","propTypes","ColorPropType","PropTypes","string","bool","oneOf","node","shape","func","Button","buttonContentClassName","isLinkDisabled","useWrapper","buttonWrapperClassNames","useMemo","classnames","button","contentClassName","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport noop from 'lodash/fp/noop';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestid,\n useButtonTag,\n buttonRef,\n 'data-for': dataFor,\n 'data-tooltip-place': dataTooltipPlace,\n 'data-tip': dataTip,\n onKeyDown = noop,\n onMouseLeave = noop,\n onMouseOver = noop\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n >\n {submitValue || children}\n </a>\n );\n\n case 'button':\n if (useButtonTag)\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={dataFor}\n data-tooltip-place={dataTooltipPlace}\n data-tip={dataTip}\n data-name={dataName}\n data-testid={dataTestid}\n aria-label={ariaLabel.favorite}\n className={className}\n onClick={onClick}\n style={style}\n onKeyDown={onKeyDown}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n tabIndex={0}\n >\n {children}\n </button>\n );\n // falls through in case type is button BUT no button tag is needed, for retro-compatibility\n default:\n return (\n <input\n data-name={dataName}\n type={type}\n value={submitValue}\n disabled={disabled}\n onClick={onClick}\n className={inputClassName}\n style={{\n color,\n ...style\n }}\n />\n );\n }\n};\n\nButtonContent.propTypes = {\n color: ColorPropType,\n submitValue: PropTypes.string,\n disabled: PropTypes.bool,\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n type: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n style: PropTypes.shape({}),\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n useButtonTag: PropTypes.bool,\n // event handlers\n onClick: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseOver: PropTypes.func,\n // for ReactTooltip handling\n buttonRef: PropTypes.string,\n 'data-for': PropTypes.string,\n 'data-tooltip-place': PropTypes.string,\n 'data-tip': PropTypes.bool\n};\n\nconst Button = props => {\n const {\n className,\n buttonContentClassName,\n isLinkDisabled,\n type = 'submit',\n children,\n useWrapper = true\n } = props;\n const buttonWrapperClassNames = useMemo(\n () =>\n (isLinkDisabled && classnames([cssStyle.disabledAnchor, className])) ||\n classnames([cssStyle.button, className]),\n [className, isLinkDisabled]\n );\n\n const contentClassName = useMemo(\n () => (buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent),\n [buttonContentClassName]\n );\n\n return useWrapper ? (\n <div className={buttonWrapperClassNames}>\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n </div>\n ) : (\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n );\n};\n\nButton.propTypes = {\n isLinkDisabled: PropTypes.bool,\n useWrapper: PropTypes.bool,\n buttonContentClassName: PropTypes.string,\n ...ButtonContent.propTypes\n};\n\nexport default Button;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,aAAa,GAAGC,KAAK,IAAI;EAC7B,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAHI;IAIJC,QAJI;IAKJC,IALI;IAMJC,MANI;IAOJC,OAPI;IAQJC,SARI;IASJC,QATI;IAUJC,IAVI;IAWJC,KAXI;IAYJ,aAAaC,QAZT;IAaJ,cAAcC,SAbV;IAcJ,eAAeC,UAdX;IAeJC,YAfI;IAgBJC,SAhBI;IAiBJ,YAAYC,OAjBR;IAkBJ,sBAAsBC,gBAlBlB;IAmBJ,YAAYC,OAnBR;IAoBJC,SAAS,GAAGC,aApBR;IAqBJC,YAAY,GAAGD,aArBX;IAsBJE,WAAW,GAAGF;EAtBV,IAuBFrB,KAvBJ;EAwBA,MAAMwB,eAAe,GAAIrB,QAAQ,IAAK,GAAEK,SAAU,IAAGiB,cAAA,CAASC,cA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}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AAoEO,iGASN;;AAED;;;;;;;;;;;gBA0FC"}
@@ -42,6 +42,7 @@ const ToolTipWrapper = ({
42
42
  handleContentMouseOver,
43
43
  iconSize
44
44
  }) => {
45
+ const coorpToolTipClasses = (0, _classnames.default)(_style.default.toolTip, iconSize === 'big' ? _style.default.bigIconToolTip : _style.default.smallIconToolTip);
45
46
  if (!toolTipIsVisible) return null;
46
47
 
47
48
  if (anchorId) {
@@ -55,7 +56,7 @@ const ToolTipWrapper = ({
55
56
  }, content);
56
57
  } else {
57
58
  return /*#__PURE__*/_react.default.createElement("div", {
58
- className: (0, _classnames.default)(_style.default.toolTip, iconSize === 'big' ? _style.default.bigIconToolTip : _style.default.smallIconToolTip),
59
+ className: coorpToolTipClasses,
59
60
  "data-testid": "tooltip",
60
61
  "aria-label": closeToolTipInformationTextAriaLabel,
61
62
  onMouseOver: handleContentMouseOver
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","toolTipReact","classnames","toolTip","bigIconToolTip","smallIconToolTip","propTypes","PropTypes","bool","string","isRequired","node","func","oneOf","keys","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","useCallback","clearTimeout","handleMouseOver","handleMouseLeave","setTimeout","tooltipContent","tooltipContainer","tooltipIconContainer","informationIcon","oneOfType","number"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport keys from 'lodash/fp/keys';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst FontSizes = {\n 12: style.tooltipContentFontSize12,\n 14: style.tooltipContentFontSize14\n};\n\nconst IconSizes = {\n small: 12,\n big: 20\n};\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content,\n handleContentMouseOver,\n iconSize\n}) => {\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={classnames(\n style.toolTip,\n iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n )}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n onMouseOver={handleContentMouseOver}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node,\n handleContentMouseOver: PropTypes.func,\n iconSize: PropTypes.oneOf(keys(IconSizes))\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible,\n iconContainerClassName,\n delayHide = 250,\n fontSize = 14,\n iconSize = 'small'\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), delayHide));\n }, [delayHide]);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={classnames([style.tooltipContent, FontSizes[fontSize]])}>{TooltipContent}</p>\n );\n }, [TooltipContent, fontSize, isComponent]);\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n fontSize={fontSize}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={classnames([style.tooltipIconContainer, iconContainerClassName])}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={IconSizes[iconSize]}\n height={IconSizes[iconSize]}\n aria-label={ariaLabel}\n />\n </button>\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n handleContentMouseOver={handleContentMouseOver}\n fontSize={fontSize}\n iconSize={iconSize}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- Regular Tooltip exclusive --------------\n iconContainerClassName: PropTypes.string,\n delayHide: PropTypes.number,\n fontSize: PropTypes.oneOf([12, 14]),\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n // ---------- React Tooltip exclusive --------------\n // externalHandling: if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n // data-for={anchorId} && data-tooltip-place=\"left\" are needed on the anchored component\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,IAAIC,cAAA,CAAMC,wBADM;EAEhB,IAAID,cAAA,CAAME;AAFM,CAAlB;AAKA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,EADS;EAEhBC,GAAG,EAAE;AAFW,CAAlB;;AAKA,MAAMC,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC,OAJsB;EAKtBC,sBALsB;EAMtBC;AANsB,CAAD,KAOjB;EACJ,IAAI,CAACL,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,6BAAC,qBAAD;MACE,EAAE,EAAEA,QADN;MAEE,SAAS,EAAER,cAAA,CAAMa,YAFnB;MAGE,kBAAe,OAHjB;MAIE,KAAK,EAAC,MAJR;MAKE,MAAM,EAAC,OALT;MAME,cAAYJ;IANd,GAQGC,OARH,CADF;EAYD,CAbD,MAaO;I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AAA,CAAU6C,SAAV,CAAoB,CAAC7C,kBAAA,CAAUK,IAAX,EAAiBL,kBAAA,CAAUI,IAA3B,EAAiCJ,kBAAA,CAAUE,MAA3C,CAApB,CADE;EAElB,eAAeF,kBAAA,CAAUE,MAFP;EAGlB,cAAcF,kBAAA,CAAUE,MAHN;EAIlBZ,oCAAoC,EAAEU,kBAAA,CAAUE,MAAV,CAAiBC,UAJrC;EAKlB;EACAoB,sBAAsB,EAAEvB,kBAAA,CAAUE,MANhB;EAOlBsB,SAAS,EAAExB,kBAAA,CAAU8C,MAPH;EAQlBrB,QAAQ,EAAEzB,kBAAA,CAAUM,KAAV,CAAgB,CAAC,EAAD,EAAK,EAAL,CAAhB,CARQ;EASlBb,QAAQ,EAAEO,kBAAA,CAAUM,KAAV,CAAgB,IAAAC,aAAA,EAAKvB,SAAL,CAAhB,CATQ;EAUlB;EACA;EACA;EACA;EACAK,QAAQ,EAAEW,kBAAA,CAAUE,MAdF;EAelBd,gBAAgB,EAAEY,kBAAA,CAAUC;AAfV,CAApB;eAkBeiB,O"}
1
+ {"version":3,"file":"index.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","coorpToolTipClasses","classnames","toolTip","bigIconToolTip","smallIconToolTip","toolTipReact","propTypes","PropTypes","bool","string","isRequired","node","func","oneOf","keys","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","useCallback","clearTimeout","handleMouseOver","handleMouseLeave","setTimeout","tooltipContent","tooltipContainer","tooltipIconContainer","informationIcon","oneOfType","number"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport keys from 'lodash/fp/keys';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst FontSizes = {\n 12: style.tooltipContentFontSize12,\n 14: style.tooltipContentFontSize14\n};\n\nconst IconSizes = {\n small: 12,\n big: 20\n};\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content,\n handleContentMouseOver,\n iconSize\n}) => {\n const coorpToolTipClasses = classnames(\n style.toolTip,\n iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n );\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={coorpToolTipClasses}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n onMouseOver={handleContentMouseOver}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node,\n handleContentMouseOver: PropTypes.func,\n iconSize: PropTypes.oneOf(keys(IconSizes))\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible,\n iconContainerClassName,\n delayHide = 250,\n fontSize = 14,\n iconSize = 'small'\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), delayHide));\n }, [delayHide]);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={classnames([style.tooltipContent, FontSizes[fontSize]])}>{TooltipContent}</p>\n );\n }, [TooltipContent, fontSize, isComponent]);\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n fontSize={fontSize}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={classnames([style.tooltipIconContainer, iconContainerClassName])}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={IconSizes[iconSize]}\n height={IconSizes[iconSize]}\n aria-label={ariaLabel}\n />\n </button>\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n handleContentMouseOver={handleContentMouseOver}\n fontSize={fontSize}\n iconSize={iconSize}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- Regular Tooltip exclusive --------------\n iconContainerClassName: PropTypes.string,\n delayHide: PropTypes.number,\n fontSize: PropTypes.oneOf([12, 14]),\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n // ---------- React Tooltip exclusive --------------\n // externalHandling: if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n // data-for={anchorId} && data-tooltip-place=\"left\" are needed on the anchored component\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,IAAIC,cAAA,CAAMC,wBADM;EAEhB,IAAID,cAAA,CAAME;AAFM,CAAlB;AAKA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,EADS;EAEhBC,GAAG,EAAE;AAFW,CAAlB;;AAKA,MAAMC,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC,OAJsB;EAKtBC,sBALsB;EAMtBC;AANsB,CAAD,KAOjB;EACJ,MAAMC,mBAAmB,GAAG,IAAAC,mBAAA,EAC1Bd,cAAA,CAAMe,OADoB,EAE1BH,QAAQ,KAAK,KAAb,GAAqBZ,cAAA,CAAMgB,cAA3B,GAA4ChB,cAAA,CAAMiB,gBAFxB,CAA5B;EAIA,IAAI,CAACV,gBAAL,EAAuB,OAAO,IAAP;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AQ,EAAEjC;EAPZ,EAnBF,CAXF;AAyCD,CA1FD;;AA4FA0B,OAAO,CAACnB,SAAR,2CAAoB;EAClBoB,cAAc,EAAEnB,kBAAA,CAAU6C,SAAV,CAAoB,CAAC7C,kBAAA,CAAUK,IAAX,EAAiBL,kBAAA,CAAUI,IAA3B,EAAiCJ,kBAAA,CAAUE,MAA3C,CAApB,CADE;EAElB,eAAeF,kBAAA,CAAUE,MAFP;EAGlB,cAAcF,kBAAA,CAAUE,MAHN;EAIlBb,oCAAoC,EAAEW,kBAAA,CAAUE,MAAV,CAAiBC,UAJrC;EAKlB;EACAoB,sBAAsB,EAAEvB,kBAAA,CAAUE,MANhB;EAOlBsB,SAAS,EAAExB,kBAAA,CAAU8C,MAPH;EAQlBrB,QAAQ,EAAEzB,kBAAA,CAAUM,KAAV,CAAgB,CAAC,EAAD,EAAK,EAAL,CAAhB,CARQ;EASlBd,QAAQ,EAAEQ,kBAAA,CAAUM,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,SAAL,CAAhB,CATQ;EAUlB;EACA;EACA;EACA;EACAK,QAAQ,EAAEY,kBAAA,CAAUE,MAdF;EAelBf,gBAAgB,EAAEa,kBAAA,CAAUC;AAfV,CAApB;eAkBeiB,O"}
@@ -386,16 +386,27 @@ declare namespace BrandFormGroup {
386
386
  color: any;
387
387
  submitValue: PropTypes.Requireable<string>;
388
388
  disabled: PropTypes.Requireable<boolean>;
389
- isLinkDisabled: PropTypes.Requireable<boolean>;
390
389
  href: PropTypes.Requireable<string>;
391
390
  download: PropTypes.Requireable<boolean>;
392
391
  target: PropTypes.Requireable<string>;
393
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
394
392
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
395
393
  className: PropTypes.Requireable<string>;
396
- buttonContentClassName: PropTypes.Requireable<string>;
397
394
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
398
395
  'data-name': PropTypes.Requireable<string>;
396
+ 'aria-label': PropTypes.Requireable<string>;
397
+ 'data-testid': PropTypes.Requireable<string>;
398
+ useButtonTag: PropTypes.Requireable<boolean>;
399
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
400
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
401
+ onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
402
+ onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
403
+ buttonRef: PropTypes.Requireable<string>;
404
+ 'data-for': PropTypes.Requireable<string>;
405
+ 'data-tooltip-place': PropTypes.Requireable<string>;
406
+ 'data-tip': PropTypes.Requireable<boolean>;
407
+ isLinkDisabled: PropTypes.Requireable<boolean>;
408
+ useWrapper: PropTypes.Requireable<boolean>;
409
+ buttonContentClassName: PropTypes.Requireable<string>;
399
410
  }> | PropTypes.InferProps<{
400
411
  buttonType: PropTypes.Requireable<string>;
401
412
  type: PropTypes.Requireable<string>;