@coorpacademy/components 11.42.10 → 11.42.12

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 (102) hide show
  1. package/es/atom/input-checkbox/index.d.ts +1 -0
  2. package/es/atom/input-checkbox/index.d.ts.map +1 -1
  3. package/es/atom/input-checkbox/index.js +6 -4
  4. package/es/atom/input-checkbox/index.js.map +1 -1
  5. package/es/atom/input-checkbox/style.css +22 -0
  6. package/es/atom/radio-group/style.css +1 -0
  7. package/es/molecule/coorp-manager-roles/index.d.ts +1 -0
  8. package/es/molecule/setup-cohort-item/index.d.ts +2 -0
  9. package/es/molecule/table/index.d.ts +33 -5
  10. package/es/molecule/table/index.d.ts.map +1 -1
  11. package/es/molecule/table/index.js +43 -2
  12. package/es/molecule/table/index.js.map +1 -1
  13. package/es/molecule/table/style.css +21 -2
  14. package/es/organism/assignment-audience/index.d.ts +23 -1
  15. package/es/organism/assignment-audience/index.d.ts.map +1 -1
  16. package/es/organism/assignment-audience/index.js +69 -3
  17. package/es/organism/assignment-audience/index.js.map +1 -1
  18. package/es/organism/assignment-audience/style.css +21 -1
  19. package/es/organism/assignment-audience/types.d.ts +36 -0
  20. package/es/organism/assignment-audience/types.d.ts.map +1 -1
  21. package/es/organism/assignment-audience/types.js +18 -0
  22. package/es/organism/assignment-audience/types.js.map +1 -1
  23. package/es/organism/assignment-edition/index.d.ts +18 -0
  24. package/es/organism/assignment-edition/index.d.ts.map +1 -1
  25. package/es/organism/assignment-edition/types.d.ts +18 -0
  26. package/es/organism/assignment-edition/types.d.ts.map +1 -1
  27. package/es/organism/brand-table/index.d.ts +6 -0
  28. package/es/organism/header-with-actions/index.d.ts +0 -4
  29. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  30. package/es/organism/header-with-actions/index.js +2 -9
  31. package/es/organism/header-with-actions/index.js.map +1 -1
  32. package/es/organism/header-with-actions/types.d.ts +0 -8
  33. package/es/organism/header-with-actions/types.d.ts.map +1 -1
  34. package/es/organism/header-with-actions/types.js +0 -2
  35. package/es/organism/header-with-actions/types.js.map +1 -1
  36. package/es/template/back-office/brand-update/index.d.ts +30 -4
  37. package/lib/atom/input-checkbox/index.d.ts +1 -0
  38. package/lib/atom/input-checkbox/index.d.ts.map +1 -1
  39. package/lib/atom/input-checkbox/index.js +6 -4
  40. package/lib/atom/input-checkbox/index.js.map +1 -1
  41. package/lib/atom/input-checkbox/style.css +22 -0
  42. package/lib/atom/radio-group/style.css +1 -0
  43. package/lib/molecule/coorp-manager-roles/index.d.ts +1 -0
  44. package/lib/molecule/setup-cohort-item/index.d.ts +2 -0
  45. package/lib/molecule/table/index.d.ts +33 -5
  46. package/lib/molecule/table/index.d.ts.map +1 -1
  47. package/lib/molecule/table/index.js +44 -3
  48. package/lib/molecule/table/index.js.map +1 -1
  49. package/lib/molecule/table/style.css +21 -2
  50. package/lib/organism/assignment-audience/index.d.ts +23 -1
  51. package/lib/organism/assignment-audience/index.d.ts.map +1 -1
  52. package/lib/organism/assignment-audience/index.js +69 -3
  53. package/lib/organism/assignment-audience/index.js.map +1 -1
  54. package/lib/organism/assignment-audience/style.css +21 -1
  55. package/lib/organism/assignment-audience/types.d.ts +36 -0
  56. package/lib/organism/assignment-audience/types.d.ts.map +1 -1
  57. package/lib/organism/assignment-audience/types.js +18 -0
  58. package/lib/organism/assignment-audience/types.js.map +1 -1
  59. package/lib/organism/assignment-edition/index.d.ts +18 -0
  60. package/lib/organism/assignment-edition/index.d.ts.map +1 -1
  61. package/lib/organism/assignment-edition/types.d.ts +18 -0
  62. package/lib/organism/assignment-edition/types.d.ts.map +1 -1
  63. package/lib/organism/brand-table/index.d.ts +6 -0
  64. package/lib/organism/header-with-actions/index.d.ts +0 -4
  65. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  66. package/lib/organism/header-with-actions/index.js +2 -9
  67. package/lib/organism/header-with-actions/index.js.map +1 -1
  68. package/lib/organism/header-with-actions/types.d.ts +0 -8
  69. package/lib/organism/header-with-actions/types.d.ts.map +1 -1
  70. package/lib/organism/header-with-actions/types.js +0 -2
  71. package/lib/organism/header-with-actions/types.js.map +1 -1
  72. package/lib/template/back-office/brand-update/index.d.ts +30 -4
  73. package/locales/bs/global.json +1 -0
  74. package/locales/cs/global.json +1 -0
  75. package/locales/de/global.json +1 -0
  76. package/locales/en/global.json +1 -0
  77. package/locales/es/global.json +1 -0
  78. package/locales/et/global.json +1 -0
  79. package/locales/fi/global.json +1 -0
  80. package/locales/fr/global.json +1 -0
  81. package/locales/hr/global.json +1 -0
  82. package/locales/hu/global.json +1 -0
  83. package/locales/hy/global.json +1 -0
  84. package/locales/it/global.json +1 -0
  85. package/locales/ja/global.json +1 -0
  86. package/locales/ko/global.json +1 -0
  87. package/locales/lt/global.json +1 -0
  88. package/locales/nl/global.json +1 -0
  89. package/locales/pl/global.json +1 -0
  90. package/locales/pt/global.json +1 -0
  91. package/locales/ro/global.json +1 -0
  92. package/locales/ru/global.json +1 -0
  93. package/locales/sk/global.json +1 -0
  94. package/locales/sl/global.json +1 -0
  95. package/locales/sv/global.json +1 -0
  96. package/locales/tl/global.json +1 -0
  97. package/locales/tr/global.json +1 -0
  98. package/locales/uk/global.json +1 -0
  99. package/locales/vi/global.json +1 -0
  100. package/locales/zh/global.json +1 -0
  101. package/locales/zh_TW/global.json +1 -0
  102. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","AssignmentStatusTag","Breadcrumbs","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","breadcrumbs","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasBreadcrumbs","hasAdditionalContent","undefined","createElement","className","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","_extends","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","buttonsWrapper","buttons","action","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport Breadcrumbs from '../../molecule/breadcrumbs';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n breadcrumbs,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasBreadcrumbs = !isEmpty(breadcrumbs);\n const hasAdditionalContent = tags !== undefined || hasSubtitle || hasBreadcrumbs;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n {hasBreadcrumbs ? (\n <div data-name={getDataName('breadcrumbs')}>\n <Breadcrumbs breadcrumbs={breadcrumbs} />\n </div>\n ) : null}\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p className={style.subtitle} data-name={getDataName('subtitle')}>\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,WAAW,MAAM,4BAA4B;AACpD,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAI1B,SAAS;AAChB,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,MAAc,IAAK,uBAAuBA,MAAM,EAAE;AACvE;AACA,MAAMC,WAAW,GAAGX,GAAG,CAACY,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAE7C,MAAMC,gBAAgB,GAAGA,CAAC;EAACC,OAAO;EAAEC;AAAmD,CAAC,KAAK;EAC3F,OAAO;IACLC,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAEF,SAAS;IACvBD;EACF,CAAC;AACH,CAAC;AAED,MAAMI,eAAe,GAAGA,CAAC;EAACC,QAAQ;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,SAAS;EAAER;AAAwB,CAAC,KAAK;EAC5F,OAAO;IACL,WAAW,EAAEK,QA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A,IAAI,EACPE,WAAW,CAAC,CAAC+D,MAAyB,EAAEJ,GAAW,KAAK;IACvD,oBAAOxE,KAAA,CAAAwD,aAAA,CAACrD,UAAU,EAAA0D,QAAA,KAAK7B,iBAAiB,CAAC4C,MAAM,CAAC;MAAEJ,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAExB,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDV,iBAAiB,CAACuC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGvE,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","AssignmentStatusTag","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasAdditionalContent","undefined","createElement","className","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","_extends","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","buttonsWrapper","buttons","action","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasAdditionalContent = tags !== undefined || hasSubtitle;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p className={style.subtitle} data-name={getDataName('subtitle')}>\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAI1B,SAAS;AAChB,OAAOC,KAAK,MAAM,aAAa;AA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C4C,qBAAqB,CAAC2B,OAAO,CAAC,gBAC/DxE,KAAA,CAAAqD,aAAA,CAAC9C,qBAAqB,EAAAmD,QAAA,KAChBb,qBAAqB;IACzB2B,OAAO,EAAE5D,WAAW,CAACQ,eAAe,EAAEyB,qBAAqB,CAAC2B,OAAO,CAAE;IACrE,aAAW9D,WAAW,CAAC,0BAA0B;EAAE,EACpD,CAAC,GACA,IAAI,EACPE,WAAW,CAAC,CAAC6D,MAAyB,EAAEJ,GAAW,KAAK;IACvD,oBAAOrE,KAAA,CAAAqD,aAAA,CAAClD,UAAU,EAAAuD,QAAA,KAAK3B,iBAAiB,CAAC0C,MAAM,CAAC;MAAEJ,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEvB,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDT,iBAAiB,CAACqC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrE,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
@@ -10,10 +10,6 @@ declare const HeaderWithActionsPropTypes: {
10
10
  label: PropTypes.Validator<string>;
11
11
  }> | null | undefined)[]>;
12
12
  subtitle: PropTypes.Requireable<string>;
13
- breadcrumbs: PropTypes.Requireable<(PropTypes.InferProps<{
14
- title: PropTypes.Validator<string>;
15
- href: PropTypes.Requireable<string>;
16
- }> | null | undefined)[]>;
17
13
  tag: PropTypes.Requireable<PropTypes.InferProps<{
18
14
  label: PropTypes.Validator<string>;
19
15
  type: PropTypes.Validator<string>;
@@ -86,10 +82,6 @@ export declare type HeaderWithActionsProps = {
86
82
  label: string;
87
83
  }>;
88
84
  subtitle?: string;
89
- breadcrumbs?: Array<{
90
- title: string;
91
- href?: string;
92
- }>;
93
85
  tag?: TagProps;
94
86
  saveStatus?: SaveStatusProps;
95
87
  actionButtons: ButtonActionProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/types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import Breadcrumbs from '../../molecule/breadcrumbs';
4
3
  const ButtonMenuPropTypes = {
5
4
  dataName: PropTypes.string,
6
5
  label: PropTypes.string.isRequired,
@@ -24,7 +23,6 @@ const HeaderWithActionsPropTypes = {
24
23
  title: PropTypes.string.isRequired,
25
24
  tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),
26
25
  subtitle: PropTypes.string,
27
- breadcrumbs: Breadcrumbs.propTypes.breadcrumbs,
28
26
  tag: PropTypes.shape({
29
27
  label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,
30
28
  type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","AssignmentStatusTagPropTypes","Breadcrumbs","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tags","arrayOf","subtitle","breadcrumbs","propTypes","tag","size","saveStatus","display","actionButtons","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';\nimport Breadcrumbs from '../../molecule/breadcrumbs';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),\n subtitle: PropTypes.string,\n breadcrumbs: Breadcrumbs.propTypes.breadcrumbs,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }),\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n }),\n isFetching: PropTypes.bool\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tags?: Array<{status?: string; label: string}>;\n subtitle?: string;\n breadcrumbs?: Array<{title: string; href?: string}>;\n tag?: TagProps;\n saveStatus?: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,4BAA4B,MAAM,4CAA4C;AACrF,OAAOC,WAAW,MAAM,4BAA4B;AAEpD,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEJ,SAAS,CAACK,MAAM;EAC1BC,KAAK,EAAEN,SAAS,CAACK,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAER,SAAS,CAACK,MAAM,CAACE,UAAU;EACrCE,SAAS,EAAET,SAAS,CAACK,MAAM,CAACE,UAAU;EACtCG,OAAO,EAAEV,SAAS,CAACW,IAAI,CAACJ;AAC1B,CAAC;AAED,MAAMK,qBAAqB,GAAG;EAC5BC,IAAI,EAAEb,SAAS,CAACc,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAACP,UAAU;EAC1DD,KAAK,EAAEN,SAAS,CAACK,MAAM,CAACE,UAAU;EAClCG,OAAO,EAAEV,SAAS,CAACW,IAAI,CAACJ,UAAU;EAClCQ,QAAQ,EAAEf,SAAS,CAACgB,IAAI;EACxBR,QAAQ,EAAER,SAAS,CAACK,MAAM;EAC1BI,SAAS,EAAET,SAAS,CAACK;AACvB,CAAC;AAED,MAAMY,0BAA0B,GAAG;EACjCC,WAAW,EAAElB,SAAS,CAACmB,KAAK,CAAC;IAC3B,YAAY,EAAEnB,SAAS,CAACK,MAAM;IAC9BK,OAAO,EAAEV,SAAS,CAACW,IAAI,CAACJ;EAC1B,CAAC,CAAC;EACFa,KAAK,EAAEpB,SAAS,CAACK,MAAM,CAACE,UAAU;EAClCc,IAAI,EAAErB,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACmB,KAAK,CAAClB,4BAA4B,CAAC,CAAC;EACtEsB,QAAQ,EAAEvB,SAAS,CAACK,MAAM;EAC1BmB,WAAW,EAAEtB,WAAW,CAACuB,SAAS,CAACD,WAAW;EAC9CE,GAAG,EAAE1B,SAAS,CAACmB,KAAK,CAAC;IACnBb,KAAK,EAAEN,SAAS,CAACc,KAAK,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAACP,UAAU;IACxFM,IAAI,EAAEb,SAAS,CAACc,KAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAACP,UAAU;IACpEoB,IAAI,EAAE3B,SAAS,CAACK,MAAM,CAACE;EACzB,CAAC,CAAC;EACFqB,UAAU,EAAE5B,SAAS,CAACmB,KAAK,CAAC;IAC1BU,OAAO,EAAE7B,SAAS,CAACgB,IAAI,CAACT,UAAU;IAClCD,KAAK,EAAEN,SAAS,CAACc,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC;EACrD,CAAC,CAAC;EACFgB,aAAa,EAAE9B,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACmB,KAAK,CAACP,qBAAqB,CAAC,CAAC,CAACL,UAAU;EACnFwB,qBAAqB,EAAE/B,SAAS,CAACmB,KAAK,CAAC;IACrCa,OAAO,EAAEhC,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACmB,KAAK,CAAChB,mBAAmB,CAAC,CAAC,CAACI,UAAU;IAC3E0B,eAAe,EAAEjC,SAAS,CAACK,MAAM;IACjCU,QAAQ,EAAEf,SAAS,CAACgB,IAAI,CAACT;EAC3B,CAAC,CAAC;EACF2B,UAAU,EAAElC,SAAS,CAACgB;AACxB,CAAC;AAED,eAAeC,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","AssignmentStatusTagPropTypes","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tags","arrayOf","subtitle","tag","size","saveStatus","display","actionButtons","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),\n subtitle: PropTypes.string,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }),\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n }),\n isFetching: PropTypes.bool\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tags?: Array<{status?: string; label: string}>;\n subtitle?: string;\n tag?: TagProps;\n saveStatus?: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,4BAA4B,MAAM,4CAA4C;AAErF,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEH,SAAS,CAACI,MAAM;EAC1BC,KAAK,EAAEL,SAAS,CAACI,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAEP,SAAS,CAACI,MAAM,CAACE,UAAU;EACrCE,SAAS,EAAER,SAAS,CAACI,MAAM,CAACE,UAAU;EACtCG,OAAO,EAAET,SAAS,CAACU,IAAI,CAACJ;AAC1B,CAAC;AAED,MAAMK,qBAAqB,GAAG;EAC5BC,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAACP,UAAU;EAC1DD,KAAK,EAAEL,SAAS,CAACI,MAAM,CAACE,UAAU;EAClCG,OAAO,EAAET,SAAS,CAACU,IAAI,CAACJ,UAAU;EAClCQ,QAAQ,EAAEd,SAAS,CAACe,IAAI;EACxBR,QAAQ,EAAEP,SAAS,CAACI,MAAM;EAC1BI,SAAS,EAAER,SAAS,CAACI;AACvB,CAAC;AAED,MAAMY,0BAA0B,GAAG;EACjCC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AC;EACFyB,UAAU,EAAE/B,SAAS,CAACe;AACxB,CAAC;AAED,eAAeC,0BAA0B","ignoreList":[]}
@@ -262,10 +262,6 @@ declare namespace BrandUpdate {
262
262
  label: PropTypes.Validator<string>;
263
263
  }> | null | undefined)[]>;
264
264
  subtitle: PropTypes.Requireable<string>;
265
- breadcrumbs: PropTypes.Requireable<(PropTypes.InferProps<{
266
- title: PropTypes.Validator<string>;
267
- href: PropTypes.Requireable<string>;
268
- }> | null | undefined)[]>;
269
265
  tag: PropTypes.Requireable<PropTypes.InferProps<{
270
266
  label: PropTypes.Validator<string>;
271
267
  type: PropTypes.Validator<string>;
@@ -385,6 +381,12 @@ declare namespace BrandUpdate {
385
381
  label: PropTypes.Validator<string>;
386
382
  }> | null | undefined)[]>;
387
383
  }> | null | undefined> | null | undefined)[]>;
384
+ select: PropTypes.Requireable<PropTypes.InferProps<{
385
+ checked: PropTypes.Validator<boolean>;
386
+ disabled: PropTypes.Requireable<boolean>;
387
+ ariaLabel: PropTypes.Validator<string>;
388
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
389
+ }>>;
388
390
  editHref: PropTypes.Requireable<string>;
389
391
  highlighted: PropTypes.Requireable<boolean>;
390
392
  }> | null | undefined)[]>;
@@ -2105,6 +2107,24 @@ declare namespace BrandUpdate {
2105
2107
  }>>;
2106
2108
  actionText: PropTypes.Requireable<string>;
2107
2109
  }>>[]>;
2110
+ selection: PropTypes.Requireable<PropTypes.InferProps<{
2111
+ selectedIds: PropTypes.Validator<string[]>;
2112
+ onToggleRow: PropTypes.Validator<(...args: any[]) => any>;
2113
+ onTogglePage: PropTypes.Validator<(...args: any[]) => any>;
2114
+ summary: PropTypes.Requireable<string>;
2115
+ bulkActions: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
2116
+ label: PropTypes.Validator<string>;
2117
+ variant: PropTypes.Validator<string>;
2118
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
2119
+ }>>[]>;
2120
+ notice: PropTypes.Requireable<PropTypes.InferProps<{
2121
+ message: PropTypes.Validator<string>;
2122
+ action: PropTypes.Requireable<PropTypes.InferProps<{
2123
+ label: PropTypes.Validator<string>;
2124
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
2125
+ }>>;
2126
+ }>>;
2127
+ }>>;
2108
2128
  footnote: PropTypes.Requireable<string>;
2109
2129
  emptyLabel: PropTypes.Validator<string>;
2110
2130
  }>>;
@@ -4105,6 +4125,12 @@ declare namespace BrandUpdate {
4105
4125
  label: PropTypes.Validator<string>;
4106
4126
  }> | null | undefined)[]>;
4107
4127
  }> | null | undefined> | null | undefined)[]>;
4128
+ select: PropTypes.Requireable<PropTypes.InferProps<{
4129
+ checked: PropTypes.Validator<boolean>;
4130
+ disabled: PropTypes.Requireable<boolean>;
4131
+ ariaLabel: PropTypes.Validator<string>;
4132
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
4133
+ }>>;
4108
4134
  editHref: PropTypes.Requireable<string>;
4109
4135
  highlighted: PropTypes.Requireable<boolean>;
4110
4136
  }> | null | undefined)[]>;
@@ -10,6 +10,7 @@ declare namespace InputCheckbox {
10
10
  const onChange: PropTypes.Requireable<(...args: any[]) => any>;
11
11
  const modified: PropTypes.Requireable<boolean>;
12
12
  const noLabelMargins: PropTypes.Requireable<boolean>;
13
+ const hideTitle: PropTypes.Requireable<boolean>;
13
14
  const theme: PropTypes.Requireable<string>;
14
15
  const titleStyle: PropTypes.Requireable<string>;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-checkbox/index.js"],"names":[],"mappings":";AAeA,wDAwDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-checkbox/index.js"],"names":[],"mappings":";AAeA,wDA6DC"}
@@ -31,7 +31,8 @@ const InputCheckbox = props => {
31
31
  modified = false,
32
32
  theme = 'default',
33
33
  title: propsTitle,
34
- noLabelMargins = false
34
+ noLabelMargins = false,
35
+ hideTitle = false
35
36
  } = props;
36
37
  const titleStyleClassName = titleStylesClassNames[titleStyle];
37
38
  const idCheckbox = (0, _uniqueId2.default)('input-checkbox-');
@@ -42,12 +43,12 @@ const InputCheckbox = props => {
42
43
  const defaultContainerClassName = theme === 'coorpmanager' ? _style.default.coorpManager : _style.default.defaultStyle;
43
44
  const className = (0, _getClassState.default)(defaultContainerClassName, modifiedClassName, errorClassName, modified, error);
44
45
  return /*#__PURE__*/_react.default.createElement("label", {
45
- className: className,
46
+ className: hideTitle ? (0, _classnames.default)(className, _style.default.hiddenTitle) : className,
46
47
  htmlFor: idCheckbox,
47
48
  "data-name": "checkbox-input-label"
48
49
  }, /*#__PURE__*/_react.default.createElement("input", {
49
50
  type: "checkbox",
50
- className: _style.default.checkbox,
51
+ className: hideTitle ? (0, _classnames.default)(_style.default.checkbox, _style.default.focusableInput) : _style.default.checkbox,
51
52
  name: title,
52
53
  id: idCheckbox,
53
54
  checked: checked,
@@ -60,7 +61,7 @@ const InputCheckbox = props => {
60
61
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusValidate, {
61
62
  className: _style.default.icon
62
63
  })), /*#__PURE__*/_react.default.createElement("span", {
63
- className: titleStyleClassName,
64
+ className: hideTitle ? _style.default.accessibleTitle : titleStyleClassName,
64
65
  title: title
65
66
  }, title));
66
67
  };
@@ -73,6 +74,7 @@ InputCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
73
74
  onChange: _propTypes.default.func,
74
75
  modified: _propTypes.default.bool,
75
76
  noLabelMargins: _propTypes.default.bool,
77
+ hideTitle: _propTypes.default.bool,
76
78
  theme: _propTypes.default.oneOf(['coorpmanager', 'default']),
77
79
  titleStyle: _propTypes.default.oneOf((0, _keys2.default)(titleStylesClassNames))
78
80
  } : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_novaIcons","_getClassState","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","titleStylesClassNames","inherit","style","primary","secondary","tertiary","InputCheckbox","props","checked","onChange","_noop2","error","disabled","required","titleStyle","modified","theme","title","propsTitle","noLabelMargins","titleStyleClassName","idCheckbox","_uniqueId2","handleChange","useCallback","target","modifiedClassName","coorpManagerModified","defaultModified","errorClassName","coorpManagerError","defaultError","defaultContainerClassName","coorpManager","defaultStyle","className","getClassState","createElement","htmlFor","type","checkbox","name","id","classnames","label","undefined","NovaSolidStatusValidate","icon","propTypes","process","env","NODE_ENV","PropTypes","string","isRequired","bool","func","oneOf","_keys2","_default","exports"],"sources":["../../../src/atom/input-checkbox/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {NovaSolidStatusValidate as CheckIcon} from '@coorpacademy/nova-icons';\nimport {keys, noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst titleStylesClassNames = {\n inherit: style.inherit,\n primary: style.primary,\n secondary: style.secondary,\n tertiary: style.tertiary\n};\n\nconst InputCheckbox = props => {\n const {\n checked,\n onChange = noop,\n error,\n disabled,\n required,\n titleStyle = 'primary',\n modified = false,\n theme = 'default',\n title: propsTitle,\n noLabelMargins = false\n } = props;\n\n const titleStyleClassName = titleStylesClassNames[titleStyle];\n const idCheckbox = uniqueId('input-checkbox-');\n const title = `${propsTitle}${required ? '*' : ''}`;\n const handleChange = useCallback(e => onChange(e.target.checked), [onChange]);\n\n const modifiedClassName =\n theme === 'coorpmanager' ? style.coorpManagerModified : style.defaultModified;\n const errorClassName = theme === 'coorpmanager' ? style.coorpManagerError : style.defaultError;\n const defaultContainerClassName =\n theme === 'coorpmanager' ? style.coorpManager : style.defaultStyle;\n\n const className = getClassState(\n defaultContainerClassName,\n modifiedClassName,\n errorClassName,\n modified,\n error\n );\n\n return (\n <label className={className} htmlFor={idCheckbox} data-name=\"checkbox-input-label\">\n <input\n type=\"checkbox\"\n className={style.checkbox}\n name={title}\n id={idCheckbox}\n checked={checked}\n onChange={handleChange}\n disabled={disabled}\n data-name=\"checkbox-input\"\n />\n <div\n data-name=\"checkbox-label\"\n className={classnames(style.label, noLabelMargins ? style.noLabelMargins : undefined)}\n >\n <CheckIcon className={style.icon} />\n </div>\n <span className={titleStyleClassName} title={title}>\n {title}\n </span>\n </label>\n );\n};\n\nInputCheckbox.propTypes = {\n title: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n checked: PropTypes.bool,\n error: PropTypes.bool,\n onChange: PropTypes.func,\n modified: PropTypes.bool,\n noLabelMargins: PropTypes.bool,\n theme: PropTypes.oneOf(['coorpmanager', 'default']),\n titleStyle: PropTypes.oneOf(keys(titleStylesClassNames))\n};\n\nexport default InputCheckbox;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAgC,SAAAO,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,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC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,CAAAe,OAAA,CAAAmD,aAAA;IACE,aAAU,gBAAgB;IAC1BF,SAAS,EAAE,IAAAQ,mBAAU,EAACzC,cAAK,CAAC0C,KAAK,EAAEzB,cAAc,GAAGjB,cAAK,CAACiB,cAAc,GAAG0B,SAAS;EAAE,gBAEtF1E,MAAA,CAAAe,OAAA,CAAAmD,aAAA,CAAC5D,UAAA,CAAAqE,uBAAS;IAACX,SAAS,EAAEjC,cAAK,CAAC6C;EAAK,CAAE,CAChC,CAAC,eACN5E,MAAA,CAAAe,OAAA,CAAAmD,aAAA;IAAMF,SAAS,EAAEf,mBAAoB;IAACH,KAAK,EAAEA;EAAM,GAChDA,KACG,CACD,CAAC;AAEZ,CAAC;AAEDX,aAAa,CAAC0C,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACxBlC,KAAK,EAAEmC,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClC1C,QAAQ,EAAEwC,kBAAS,CAACG,IAAI;EACxB1C,QAAQ,EAAEuC,kBAAS,CAACG,IAAI;EACxB/C,OAAO,EAAE4C,kBAAS,CAACG,IAAI;EACvB5C,KAAK,EAAEyC,kBAAS,CAACG,IAAI;EACrB9C,QAAQ,EAAE2C,kBAAS,CAACI,IAAI;EACxBzC,QAAQ,EAAEqC,kBAAS,CAACG,IAAI;EACxBpC,cAAc,EAAEiC,kBAAS,CAACG,IAAI;EAC9BvC,KAAK,EAAEoC,kBAAS,CAACK,KAAK,CAAC,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;EACnD3C,UAAU,EAAEsC,kBAAS,CAACK,KAAK,CAAC,IAAAC,MAAA,CAAAxE,OAAA,EAAKc,qBAAqB,CAAC;AACzD,CAAC;AAAC,IAAA2D,QAAA,GAAAC,OAAA,CAAA1E,OAAA,GAEaoB,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_novaIcons","_getClassState","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","titleStylesClassNames","inherit","style","primary","secondary","tertiary","InputCheckbox","props","checked","onChange","_noop2","error","disabled","required","titleStyle","modified","theme","title","propsTitle","noLabelMargins","hideTitle","titleStyleClassName","idCheckbox","_uniqueId2","handleChange","useCallback","target","modifiedClassName","coorpManagerModified","defaultModified","errorClassName","coorpManagerError","defaultError","defaultContainerClassName","coorpManager","defaultStyle","className","getClassState","createElement","classnames","hiddenTitle","htmlFor","type","checkbox","focusableInput","name","id","label","undefined","NovaSolidStatusValidate","icon","accessibleTitle","propTypes","process","env","NODE_ENV","PropTypes","string","isRequired","bool","func","oneOf","_keys2","_default","exports"],"sources":["../../../src/atom/input-checkbox/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {NovaSolidStatusValidate as CheckIcon} from '@coorpacademy/nova-icons';\nimport {keys, noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst titleStylesClassNames = {\n inherit: style.inherit,\n primary: style.primary,\n secondary: style.secondary,\n tertiary: style.tertiary\n};\n\nconst InputCheckbox = props => {\n const {\n checked,\n onChange = noop,\n error,\n disabled,\n required,\n titleStyle = 'primary',\n modified = false,\n theme = 'default',\n title: propsTitle,\n noLabelMargins = false,\n hideTitle = false\n } = props;\n\n const titleStyleClassName = titleStylesClassNames[titleStyle];\n const idCheckbox = uniqueId('input-checkbox-');\n const title = `${propsTitle}${required ? '*' : ''}`;\n const handleChange = useCallback(e => onChange(e.target.checked), [onChange]);\n\n const modifiedClassName =\n theme === 'coorpmanager' ? style.coorpManagerModified : style.defaultModified;\n const errorClassName = theme === 'coorpmanager' ? style.coorpManagerError : style.defaultError;\n const defaultContainerClassName =\n theme === 'coorpmanager' ? style.coorpManager : style.defaultStyle;\n\n const className = getClassState(\n defaultContainerClassName,\n modifiedClassName,\n errorClassName,\n modified,\n error\n );\n\n return (\n <label\n className={hideTitle ? classnames(className, style.hiddenTitle) : className}\n htmlFor={idCheckbox}\n data-name=\"checkbox-input-label\"\n >\n <input\n type=\"checkbox\"\n className={hideTitle ? classnames(style.checkbox, style.focusableInput) : style.checkbox}\n name={title}\n id={idCheckbox}\n checked={checked}\n onChange={handleChange}\n disabled={disabled}\n data-name=\"checkbox-input\"\n />\n <div\n data-name=\"checkbox-label\"\n className={classnames(style.label, noLabelMargins ? style.noLabelMargins : undefined)}\n >\n <CheckIcon className={style.icon} />\n </div>\n <span className={hideTitle ? style.accessibleTitle : titleStyleClassName} title={title}>\n {title}\n </span>\n </label>\n );\n};\n\nInputCheckbox.propTypes = {\n title: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n checked: PropTypes.bool,\n error: PropTypes.bool,\n onChange: PropTypes.func,\n modified: PropTypes.bool,\n noLabelMargins: PropTypes.bool,\n hideTitle: PropTypes.bool,\n theme: PropTypes.oneOf(['coorpmanager', 'default']),\n titleStyle: PropTypes.oneOf(keys(titleStylesClassNames))\n};\n\nexport default InputCheckbox;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAgC,SAAAO,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,SAAAT,wBAAAS,CAAA,EAAAE,CAA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,EAAEyC,kBAAS,CAACG,IAAI;EACxBxC,cAAc,EAAEqC,kBAAS,CAACG,IAAI;EAC9BvC,SAAS,EAAEoC,kBAAS,CAACG,IAAI;EACzB3C,KAAK,EAAEwC,kBAAS,CAACK,KAAK,CAAC,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;EACnD/C,UAAU,EAAE0C,kBAAS,CAACK,KAAK,CAAC,IAAAC,MAAA,CAAA5E,OAAA,EAAKc,qBAAqB,CAAC;AACzD,CAAC;AAAC,IAAA+D,QAAA,GAAAC,OAAA,CAAA9E,OAAA,GAEaoB,aAAa","ignoreList":[]}
@@ -158,3 +158,25 @@
158
158
  margin-right: 0;
159
159
  margin-left: 0;
160
160
  }
161
+
162
+ /* Visually hidden, declared here: a cross-file composes would re-emit wizard-summary's whole CSS
163
+ late in the bundle (see organism/assignment-audience/style.css). */
164
+ .accessibleTitle,
165
+ .focusableInput {
166
+ position: absolute;
167
+ width: 1px;
168
+ height: 1px;
169
+ overflow: hidden;
170
+ clip: rect(0 0 0 0);
171
+ white-space: nowrap;
172
+ }
173
+
174
+ .hiddenTitle input {
175
+ display: block;
176
+ margin: 0;
177
+ }
178
+
179
+ .hiddenTitle input:focus-visible + .label {
180
+ outline: 2px solid cm_primary_blue;
181
+ outline-offset: 2px;
182
+ }
@@ -27,6 +27,7 @@
27
27
  border: 0;
28
28
  height: 36px;
29
29
  gap: 4px;
30
+ padding-right: 4px;
30
31
  }
31
32
 
32
33
  .segmentedOption {
@@ -16,6 +16,7 @@ declare namespace Roles {
16
16
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
17
17
  modified: PropTypes.Requireable<boolean>;
18
18
  noLabelMargins: PropTypes.Requireable<boolean>;
19
+ hideTitle: PropTypes.Requireable<boolean>;
19
20
  theme: PropTypes.Requireable<string>;
20
21
  titleStyle: PropTypes.Requireable<string>;
21
22
  }> | null | undefined)[]>;
@@ -17,6 +17,7 @@ declare namespace SetupCohortItem {
17
17
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
18
18
  modified: PropTypes.Requireable<boolean>;
19
19
  noLabelMargins: PropTypes.Requireable<boolean>;
20
+ hideTitle: PropTypes.Requireable<boolean>;
20
21
  theme: PropTypes.Requireable<string>;
21
22
  titleStyle: PropTypes.Requireable<string>;
22
23
  }> | null | undefined)[]>;
@@ -33,6 +34,7 @@ declare namespace SetupCohortItem {
33
34
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
34
35
  modified: PropTypes.Requireable<boolean>;
35
36
  noLabelMargins: PropTypes.Requireable<boolean>;
37
+ hideTitle: PropTypes.Requireable<boolean>;
36
38
  theme: PropTypes.Requireable<string>;
37
39
  titleStyle: PropTypes.Requireable<string>;
38
40
  }> | null | undefined)[]>;
@@ -1,3 +1,18 @@
1
+ export namespace ACTION_LOOKS {
2
+ namespace danger {
3
+ const className: any;
4
+ const color: "#B81400";
5
+ const icon: string;
6
+ }
7
+ namespace neutral {
8
+ const className_1: any;
9
+ export { className_1 as className };
10
+ const color_1: "#0061FF";
11
+ export { color_1 as color };
12
+ const icon_1: string;
13
+ export { icon_1 as icon };
14
+ }
15
+ }
1
16
  export default Table;
2
17
  declare function Table(props: any, context: any): JSX.Element;
3
18
  declare namespace Table {
@@ -26,8 +41,9 @@ declare namespace Table {
26
41
  const translate: PropTypes.Requireable<(...args: any[]) => any>;
27
42
  }
28
43
  namespace propTypes {
29
- const editable: PropTypes.Requireable<boolean>;
30
- const rows: PropTypes.Requireable<(PropTypes.InferProps<{
44
+ export { selectionPropType as selectAll };
45
+ export const editable: PropTypes.Requireable<boolean>;
46
+ export const rows: PropTypes.Requireable<(PropTypes.InferProps<{
31
47
  fields: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
32
48
  action: PropTypes.Requireable<PropTypes.InferProps<{
33
49
  label: PropTypes.Validator<string>;
@@ -42,10 +58,16 @@ declare namespace Table {
42
58
  label: PropTypes.Validator<string>;
43
59
  }> | null | undefined)[]>;
44
60
  }> | null | undefined> | null | undefined)[]>;
61
+ select: PropTypes.Requireable<PropTypes.InferProps<{
62
+ checked: PropTypes.Validator<boolean>;
63
+ disabled: PropTypes.Requireable<boolean>;
64
+ ariaLabel: PropTypes.Validator<string>;
65
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
66
+ }>>;
45
67
  editHref: PropTypes.Requireable<string>;
46
68
  highlighted: PropTypes.Requireable<boolean>;
47
69
  }> | null | undefined)[]>;
48
- const columns: PropTypes.Requireable<(PropTypes.InferProps<{
70
+ export const columns: PropTypes.Requireable<(PropTypes.InferProps<{
49
71
  title: PropTypes.Validator<string>;
50
72
  info: PropTypes.Requireable<string>;
51
73
  filtered: PropTypes.Requireable<boolean>;
@@ -57,9 +79,15 @@ declare namespace Table {
57
79
  selected: PropTypes.Validator<boolean>;
58
80
  }> | null | undefined)[]>;
59
81
  }> | null | undefined)[]>;
60
- const theme: PropTypes.Requireable<string>;
61
- const headerTitle: PropTypes.Requireable<string>;
82
+ export const theme: PropTypes.Requireable<string>;
83
+ export const headerTitle: PropTypes.Requireable<string>;
62
84
  }
63
85
  }
64
86
  import PropTypes from "prop-types";
87
+ declare const selectionPropType: PropTypes.Requireable<PropTypes.InferProps<{
88
+ checked: PropTypes.Validator<boolean>;
89
+ disabled: PropTypes.Requireable<boolean>;
90
+ ariaLabel: PropTypes.Validator<string>;
91
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
92
+ }>>;
65
93
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/table/index.js"],"names":[],"mappings":";AAqFA,8DAiJC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/table/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuFA,8DAmLC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOD;;;;;IAKG"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = void 0;
4
+ exports.default = exports.ACTION_LOOKS = void 0;
5
5
  var _isString2 = _interopRequireDefault(require("lodash/fp/isString"));
6
6
  var _get2 = _interopRequireDefault(require("lodash/fp/get"));
7
7
  var _react = _interopRequireDefault(require("react"));
@@ -10,6 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _novaIcons = require("@coorpacademy/nova-icons");
11
11
  var _provider = _interopRequireDefault(require("../../atom/provider"));
12
12
  var _checkbox = _interopRequireDefault(require("../../atom/checkbox"));
13
+ var _inputCheckbox = _interopRequireDefault(require("../../atom/input-checkbox"));
13
14
  var _link = _interopRequireDefault(require("../../atom/link"));
14
15
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
15
16
  var _colors = require("../../variables/colors");
@@ -25,7 +26,8 @@ const THEMES = {
25
26
  * The look of a row action, by variant: a discreet text link with a pictogram (Eric's review of
26
27
  * #3054), red with a bin to remove, blue with a back arrow to undo.
27
28
  */
28
- const ACTION_LOOKS = {
29
+
30
+ const ACTION_LOOKS = exports.ACTION_LOOKS = {
29
31
  danger: {
30
32
  className: _style.default.dangerAction,
31
33
  color: _colors.COLORS.cm_negative_200,
@@ -111,7 +113,8 @@ const Table = (props, context) => {
111
113
  columns = [],
112
114
  editable = true,
113
115
  theme,
114
- headerTitle = ''
116
+ headerTitle = '',
117
+ selectAll
115
118
  } = props;
116
119
  const {
117
120
  skin,
@@ -174,6 +177,30 @@ const Table = (props, context) => {
174
177
  className: _style.default.noOptions
175
178
  })));
176
179
  }
180
+ const hasSelection = Boolean(selectAll || rows.some(row => row.select));
181
+ const renderSelection = descriptor => {
182
+ if (!descriptor) return null;
183
+ const {
184
+ onChange: handleChange
185
+ } = descriptor;
186
+ return /*#__PURE__*/_react.default.createElement("div", {
187
+ className: _style.default.selectionControl
188
+ }, /*#__PURE__*/_react.default.createElement(_inputCheckbox.default, {
189
+ title: descriptor.ariaLabel,
190
+ checked: descriptor.checked,
191
+ disabled: descriptor.disabled,
192
+ onChange: handleChange,
193
+ theme: "coorpmanager",
194
+ noLabelMargins: true,
195
+ hideTitle: true
196
+ }));
197
+ };
198
+ if (hasSelection) {
199
+ headerView.unshift(/*#__PURE__*/_react.default.createElement("th", {
200
+ key: "selection",
201
+ className: _style.default.selectionCell
202
+ }, renderSelection(selectAll)));
203
+ }
177
204
  const renderIcon = field => {
178
205
  switch ((0, _get2.default)('icon', field)) {
179
206
  case 'draft':
@@ -272,6 +299,12 @@ const Table = (props, context) => {
272
299
  width: 16
273
300
  }))));
274
301
  }
302
+ if (hasSelection) {
303
+ tableRows.unshift(/*#__PURE__*/_react.default.createElement("td", {
304
+ key: "selection",
305
+ className: _style.default.selectionCell
306
+ }, renderSelection(row.select)));
307
+ }
275
308
  return /*#__PURE__*/_react.default.createElement("tr", {
276
309
  className: trClasses,
277
310
  key: index
@@ -290,7 +323,14 @@ Table.contextTypes = {
290
323
  skin: _provider.default.childContextTypes.skin,
291
324
  translate: _provider.default.childContextTypes.translate
292
325
  };
326
+ const selectionPropType = process.env.NODE_ENV !== "production" ? _propTypes.default.shape({
327
+ checked: _propTypes.default.bool.isRequired,
328
+ disabled: _propTypes.default.bool,
329
+ ariaLabel: _propTypes.default.string.isRequired,
330
+ onChange: _propTypes.default.func.isRequired
331
+ }) : {};
293
332
  Table.propTypes = process.env.NODE_ENV !== "production" ? {
333
+ selectAll: selectionPropType,
294
334
  editable: _propTypes.default.bool,
295
335
  rows: _propTypes.default.arrayOf(_propTypes.default.shape({
296
336
  fields: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
@@ -304,6 +344,7 @@ Table.propTypes = process.env.NODE_ENV !== "production" ? {
304
344
  text: _propTypes.default.string,
305
345
  tags: _propTypes.default.arrayOf(_propTypes.default.shape(_assignmentStatusTag.default.propTypes))
306
346
  })])),
347
+ select: selectionPropType,
307
348
  editHref: _propTypes.default.string,
308
349
  highlighted: _propTypes.default.bool
309
350
  })),