@coorpacademy/components 10.1.0 → 10.1.4
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.
- package/es/atom/button/index.js +3 -1
- package/es/atom/button/index.js.map +1 -1
- package/es/atom/button-link/index.js +107 -0
- package/es/atom/button-link/index.js.map +1 -0
- package/es/atom/button-link/style.css +97 -0
- package/es/atom/button-link/test/fixtures/button-dangerous-no-icon.js +10 -0
- package/es/atom/button-link/test/fixtures/button-dangerous-no-icon.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-primary-icon-left.js +14 -0
- package/es/atom/button-link/test/fixtures/button-primary-icon-left.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-primary-no-icon.js +10 -0
- package/es/atom/button-link/test/fixtures/button-primary-no-icon.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js +11 -0
- package/es/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js.map +1 -0
- package/es/atom/button-link/test/fixtures/button-tertiary-icon-left.js +14 -0
- package/es/atom/button-link/test/fixtures/button-tertiary-icon-left.js.map +1 -0
- package/es/atom/button-link/test/fixtures/icon-button.js +13 -0
- package/es/atom/button-link/test/fixtures/icon-button.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js +17 -0
- package/es/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-secondary-icon-right.js +20 -0
- package/es/atom/button-link/test/fixtures/link-secondary-icon-right.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-tertiary-no-icon.js +16 -0
- package/es/atom/button-link/test/fixtures/link-tertiary-no-icon.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js +17 -0
- package/es/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js.map +1 -0
- package/es/atom/button-link/test/fixtures/link-text-no-icon-download.js +13 -0
- package/es/atom/button-link/test/fixtures/link-text-no-icon-download.js.map +1 -0
- package/es/atom/content-badge/index.js +4 -4
- package/es/atom/content-badge/index.js.map +1 -1
- package/es/atom/input-checkbox/test/fixtures.js +0 -2
- package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/es/atom/input-search/index.js +65 -0
- package/es/atom/input-search/index.js.map +1 -0
- package/es/atom/input-search/style.css +201 -0
- package/es/{molecule/search → atom/input-search}/test/change.js +0 -0
- package/es/atom/input-search/test/change.js.map +1 -0
- package/es/atom/input-search/test/fixtures/coorpmanager-with-value.js +14 -0
- package/es/atom/input-search/test/fixtures/coorpmanager-with-value.js.map +1 -0
- package/es/atom/input-search/test/fixtures/coorpmanager.js +13 -0
- package/es/atom/input-search/test/fixtures/coorpmanager.js.map +1 -0
- package/es/{molecule/search → atom/input-search}/test/fixtures/default.js +0 -0
- package/es/atom/input-search/test/fixtures/default.js.map +1 -0
- package/es/{molecule/search → atom/input-search}/test/fixtures/with-value.js +0 -0
- package/es/atom/input-search/test/fixtures/with-value.js.map +1 -0
- package/es/atom/input-text/index.js +34 -6
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text/style.css +229 -1
- package/es/atom/input-text/test/fixtures/cm-default.js +17 -0
- package/es/atom/input-text/test/fixtures/cm-default.js.map +1 -0
- package/es/atom/input-textarea/index.js +36 -11
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/atom/input-textarea/style.css +265 -0
- package/es/atom/input-textarea/test/fixtures/cm-default.js +17 -0
- package/es/atom/input-textarea/test/fixtures/cm-default.js.map +1 -0
- package/es/atom/input-textarea/test/fixtures/cm-empty.js +17 -0
- package/es/atom/input-textarea/test/fixtures/cm-empty.js.map +1 -0
- package/es/atom/tag/index.js +27 -0
- package/es/atom/tag/index.js.map +1 -0
- package/es/atom/tag/style.css +38 -0
- package/es/atom/tag/test/fixtures/archived.js +7 -0
- package/es/atom/tag/test/fixtures/archived.js.map +1 -0
- package/es/atom/tag/test/fixtures/default.js +7 -0
- package/es/atom/tag/test/fixtures/default.js.map +1 -0
- package/es/atom/tag/test/fixtures/published.js +7 -0
- package/es/atom/tag/test/fixtures/published.js.map +1 -0
- package/es/atom/tag/test/fixtures/revision.js +7 -0
- package/es/atom/tag/test/fixtures/revision.js.map +1 -0
- package/es/atom/title/test/fixtures.js +2 -6
- package/es/atom/title/test/fixtures.js.map +1 -1
- package/es/molecule/banner/index.js +46 -0
- package/es/molecule/banner/index.js.map +1 -0
- package/es/molecule/banner/style.css +63 -0
- package/es/molecule/banner/test/fixtures/default.js +11 -0
- package/es/molecule/banner/test/fixtures/default.js.map +1 -0
- package/es/molecule/banner/test/fixtures/error-banner.js +7 -0
- package/es/molecule/banner/test/fixtures/error-banner.js.map +1 -0
- package/es/molecule/brand-form-group/test/fixtures/cm-default.js +51 -0
- package/es/molecule/brand-form-group/test/fixtures/cm-default.js.map +1 -0
- package/es/molecule/brand-form-group/test/fixtures/default.js +12 -3
- package/es/molecule/brand-form-group/test/fixtures/default.js.map +1 -1
- package/es/molecule/card/index.js +16 -5
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/selectable.css +71 -0
- package/es/molecule/card/selectable.js +32 -0
- package/es/molecule/card/selectable.js.map +1 -0
- package/es/molecule/card/test/fixtures/default.js +1 -0
- package/es/molecule/card/test/fixtures/default.js.map +1 -1
- package/es/molecule/card/test/fixtures/selectable-false.js +16 -0
- package/es/molecule/card/test/fixtures/selectable-false.js.map +1 -0
- package/es/molecule/card/test/fixtures/selectable-true.js +17 -0
- package/es/molecule/card/test/fixtures/selectable-true.js.map +1 -0
- package/es/molecule/card-content/index.js +13 -3
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/card-content/style.css +13 -3
- package/es/molecule/cm-popin/index.js +82 -0
- package/es/molecule/cm-popin/index.js.map +1 -0
- package/es/molecule/cm-popin/style.css +115 -0
- package/es/molecule/cm-popin/test/fixtures/dangerous.js +19 -0
- package/es/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -0
- package/es/molecule/cm-popin/test/fixtures/default.js +19 -0
- package/es/molecule/cm-popin/test/fixtures/default.js.map +1 -0
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js +20 -0
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -0
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/search-form/index.js +1 -1
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/wizard-summary/index.js +195 -0
- package/es/molecule/wizard-summary/index.js.map +1 -0
- package/es/molecule/wizard-summary/style.css +230 -0
- package/es/molecule/wizard-summary/test/fixtures/default.js +124 -0
- package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures/one-section.js +23 -0
- package/es/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js +118 -0
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js +42 -0
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures/two-sections.js +35 -0
- package/es/molecule/wizard-summary/test/fixtures/two-sections.js.map +1 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js +0 -4
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/es/organism/brand-dashboard/test/fixtures.js +10 -2
- package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/es/organism/brand-table/index.js +1 -1
- package/es/organism/brand-table/index.js.map +1 -1
- package/es/organism/mooc-header/index.js +1 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/test/fixtures/default.js +1 -1
- package/es/organism/mooc-header/test/fixtures/default.js.map +1 -1
- package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
- package/es/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
- package/es/organism/user-preferences/style.css +1 -0
- package/es/template/back-office/brand-list/index.js +6 -2
- package/es/template/back-office/brand-list/index.js.map +1 -1
- package/es/template/back-office/brand-list/style.css +1 -0
- package/es/template/back-office/brand-update/test/fixtures.js +0 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/variables/colors.css +11 -3
- package/lib/atom/button/index.js +3 -1
- package/lib/atom/button/index.js.map +1 -1
- package/lib/atom/button-link/index.js +124 -0
- package/lib/atom/button-link/index.js.map +1 -0
- package/lib/atom/button-link/style.css +97 -0
- package/lib/atom/button-link/test/fixtures/button-dangerous-no-icon.js +15 -0
- package/lib/atom/button-link/test/fixtures/button-dangerous-no-icon.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-primary-icon-left.js +19 -0
- package/lib/atom/button-link/test/fixtures/button-primary-icon-left.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-primary-no-icon.js +15 -0
- package/lib/atom/button-link/test/fixtures/button-primary-no-icon.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js +16 -0
- package/lib/atom/button-link/test/fixtures/button-secondary-no-icon-disabled.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/button-tertiary-icon-left.js +19 -0
- package/lib/atom/button-link/test/fixtures/button-tertiary-icon-left.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/icon-button.js +18 -0
- package/lib/atom/button-link/test/fixtures/icon-button.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js +22 -0
- package/lib/atom/button-link/test/fixtures/link-primary-disabled-icon-right.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-secondary-icon-right.js +25 -0
- package/lib/atom/button-link/test/fixtures/link-secondary-icon-right.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-tertiary-no-icon.js +21 -0
- package/lib/atom/button-link/test/fixtures/link-tertiary-no-icon.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js +22 -0
- package/lib/atom/button-link/test/fixtures/link-text-icon-right-target-blank.js.map +1 -0
- package/lib/atom/button-link/test/fixtures/link-text-no-icon-download.js +18 -0
- package/lib/atom/button-link/test/fixtures/link-text-no-icon-download.js.map +1 -0
- package/lib/atom/content-badge/index.js +4 -4
- package/lib/atom/content-badge/index.js.map +1 -1
- package/lib/atom/input-checkbox/test/fixtures.js +0 -3
- package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/lib/{molecule/search → atom/input-search}/index.js +29 -18
- package/lib/atom/input-search/index.js.map +1 -0
- package/lib/atom/input-search/style.css +201 -0
- package/lib/{molecule/search → atom/input-search}/test/change.js +0 -0
- package/lib/atom/input-search/test/change.js.map +1 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager-with-value.js +19 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager-with-value.js.map +1 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager.js +18 -0
- package/lib/atom/input-search/test/fixtures/coorpmanager.js.map +1 -0
- package/lib/{molecule/search → atom/input-search}/test/fixtures/default.js +0 -0
- package/lib/atom/input-search/test/fixtures/default.js.map +1 -0
- package/lib/{molecule/search → atom/input-search}/test/fixtures/with-value.js +0 -0
- package/lib/atom/input-search/test/fixtures/with-value.js.map +1 -0
- package/lib/atom/input-text/index.js +36 -6
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text/style.css +229 -1
- package/lib/atom/input-text/test/fixtures/cm-default.js +22 -0
- package/lib/atom/input-text/test/fixtures/cm-default.js.map +1 -0
- package/lib/atom/input-textarea/index.js +38 -11
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/atom/input-textarea/style.css +265 -0
- package/lib/atom/input-textarea/test/fixtures/cm-default.js +22 -0
- package/lib/atom/input-textarea/test/fixtures/cm-default.js.map +1 -0
- package/lib/atom/input-textarea/test/fixtures/cm-empty.js +22 -0
- package/lib/atom/input-textarea/test/fixtures/cm-empty.js.map +1 -0
- package/lib/atom/tag/index.js +39 -0
- package/lib/atom/tag/index.js.map +1 -0
- package/lib/atom/tag/style.css +38 -0
- package/lib/atom/tag/test/fixtures/archived.js +12 -0
- package/lib/atom/tag/test/fixtures/archived.js.map +1 -0
- package/lib/atom/tag/test/fixtures/default.js +12 -0
- package/lib/atom/tag/test/fixtures/default.js.map +1 -0
- package/lib/atom/tag/test/fixtures/published.js +12 -0
- package/lib/atom/tag/test/fixtures/published.js.map +1 -0
- package/lib/atom/tag/test/fixtures/revision.js +12 -0
- package/lib/atom/tag/test/fixtures/revision.js.map +1 -0
- package/lib/atom/title/test/fixtures.js +2 -8
- package/lib/atom/title/test/fixtures.js.map +1 -1
- package/lib/molecule/banner/index.js +59 -0
- package/lib/molecule/banner/index.js.map +1 -0
- package/lib/molecule/banner/style.css +63 -0
- package/lib/molecule/banner/test/fixtures/default.js +16 -0
- package/lib/molecule/banner/test/fixtures/default.js.map +1 -0
- package/lib/molecule/banner/test/fixtures/error-banner.js +12 -0
- package/lib/molecule/banner/test/fixtures/error-banner.js.map +1 -0
- package/lib/molecule/brand-form-group/test/fixtures/cm-default.js +56 -0
- package/lib/molecule/brand-form-group/test/fixtures/cm-default.js.map +1 -0
- package/lib/molecule/brand-form-group/test/fixtures/default.js +12 -3
- package/lib/molecule/brand-form-group/test/fixtures/default.js.map +1 -1
- package/lib/molecule/card/index.js +17 -5
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/selectable.css +71 -0
- package/lib/molecule/card/selectable.js +45 -0
- package/lib/molecule/card/selectable.js.map +1 -0
- package/lib/molecule/card/test/fixtures/default.js +1 -0
- package/lib/molecule/card/test/fixtures/default.js.map +1 -1
- package/lib/molecule/card/test/fixtures/selectable-false.js +26 -0
- package/lib/molecule/card/test/fixtures/selectable-false.js.map +1 -0
- package/lib/molecule/card/test/fixtures/selectable-true.js +27 -0
- package/lib/molecule/card/test/fixtures/selectable-true.js.map +1 -0
- package/lib/molecule/card-content/index.js +14 -3
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/card-content/style.css +13 -3
- package/lib/molecule/cm-popin/index.js +94 -0
- package/lib/molecule/cm-popin/index.js.map +1 -0
- package/lib/molecule/cm-popin/style.css +115 -0
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js +24 -0
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -0
- package/lib/molecule/cm-popin/test/fixtures/default.js +24 -0
- package/lib/molecule/cm-popin/test/fixtures/default.js.map +1 -0
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js +25 -0
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/search-form/index.js +3 -3
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/wizard-summary/index.js +213 -0
- package/lib/molecule/wizard-summary/index.js.map +1 -0
- package/lib/molecule/wizard-summary/style.css +230 -0
- package/lib/molecule/wizard-summary/test/fixtures/default.js +129 -0
- package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures/one-section.js +28 -0
- package/lib/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js +123 -0
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js +47 -0
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures/two-sections.js +40 -0
- package/lib/molecule/wizard-summary/test/fixtures/two-sections.js.map +1 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +0 -6
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/lib/organism/brand-dashboard/test/fixtures.js +14 -2
- package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/lib/organism/brand-table/index.js +3 -3
- package/lib/organism/brand-table/index.js.map +1 -1
- package/lib/organism/mooc-header/index.js +2 -2
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/test/fixtures/default.js +1 -1
- package/lib/organism/mooc-header/test/fixtures/default.js.map +1 -1
- package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js +1 -1
- package/lib/organism/mooc-header/test/fixtures/logged-with-battle-notifications.js.map +1 -1
- package/lib/organism/user-preferences/style.css +1 -0
- package/lib/template/back-office/brand-list/index.js +7 -3
- package/lib/template/back-office/brand-list/index.js.map +1 -1
- package/lib/template/back-office/brand-list/style.css +1 -0
- package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/variables/colors.css +11 -3
- package/package.json +3 -3
- package/es/atom/chips/test/fixtures.js +0 -15
- package/es/atom/chips/test/fixtures.js.map +0 -1
- package/es/atom/content-badge/test/fixtures.js +0 -27
- package/es/atom/content-badge/test/fixtures.js.map +0 -1
- package/es/atom/wizard-steps/test/fixtures.js +0 -17
- package/es/atom/wizard-steps/test/fixtures.js.map +0 -1
- package/es/molecule/coorp-manager-roles/test/fixtures.js +0 -13
- package/es/molecule/coorp-manager-roles/test/fixtures.js.map +0 -1
- package/es/molecule/popin/test/fixtures.js +0 -21
- package/es/molecule/popin/test/fixtures.js.map +0 -1
- package/es/molecule/quick-access-card/test/fixtures.js +0 -21
- package/es/molecule/quick-access-card/test/fixtures.js.map +0 -1
- package/es/molecule/quick-access-cards-group/test/fixtures.js +0 -21
- package/es/molecule/quick-access-cards-group/test/fixtures.js.map +0 -1
- package/es/molecule/search/index.js +0 -57
- package/es/molecule/search/index.js.map +0 -1
- package/es/molecule/search/style.css +0 -86
- package/es/molecule/search/test/change.js.map +0 -1
- package/es/molecule/search/test/fixtures/default.js.map +0 -1
- package/es/molecule/search/test/fixtures/with-value.js.map +0 -1
- package/es/molecule/vertical-tabs/test/fixtures.js +0 -15
- package/es/molecule/vertical-tabs/test/fixtures.js.map +0 -1
- package/es/molecule/wizard-summary/test/fixtures.js +0 -19
- package/es/molecule/wizard-summary/test/fixtures.js.map +0 -1
- package/es/organism/brand-analytics/test/fixtures.js +0 -23
- package/es/organism/brand-analytics/test/fixtures.js.map +0 -1
- package/lib/atom/chips/test/fixtures.js +0 -25
- package/lib/atom/chips/test/fixtures.js.map +0 -1
- package/lib/atom/content-badge/test/fixtures.js +0 -43
- package/lib/atom/content-badge/test/fixtures.js.map +0 -1
- package/lib/atom/wizard-steps/test/fixtures.js +0 -28
- package/lib/atom/wizard-steps/test/fixtures.js.map +0 -1
- package/lib/molecule/coorp-manager-roles/test/fixtures.js +0 -22
- package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +0 -1
- package/lib/molecule/popin/test/fixtures.js +0 -34
- package/lib/molecule/popin/test/fixtures.js.map +0 -1
- package/lib/molecule/quick-access-card/test/fixtures.js +0 -34
- package/lib/molecule/quick-access-card/test/fixtures.js.map +0 -1
- package/lib/molecule/quick-access-cards-group/test/fixtures.js +0 -34
- package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +0 -1
- package/lib/molecule/search/index.js.map +0 -1
- package/lib/molecule/search/style.css +0 -86
- package/lib/molecule/search/test/change.js.map +0 -1
- package/lib/molecule/search/test/fixtures/default.js.map +0 -1
- package/lib/molecule/search/test/fixtures/with-value.js.map +0 -1
- package/lib/molecule/vertical-tabs/test/fixtures.js +0 -25
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +0 -1
- package/lib/molecule/wizard-summary/test/fixtures.js +0 -31
- package/lib/molecule/wizard-summary/test/fixtures.js.map +0 -1
- package/lib/organism/brand-analytics/test/fixtures.js +0 -37
- package/lib/organism/brand-analytics/test/fixtures.js.map +0 -1
|
@@ -13,20 +13,23 @@
|
|
|
13
13
|
.microLearningCardInfo {
|
|
14
14
|
flex: 1 0 auto;
|
|
15
15
|
}
|
|
16
|
+
|
|
16
17
|
.microLearningIcon {
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-direction: column;
|
|
19
20
|
align-self: center;
|
|
20
21
|
margin-top: 53px;
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
.microLearningIcon svg {
|
|
23
25
|
background:white;
|
|
24
26
|
border-radius: 50%;
|
|
25
|
-
margin:
|
|
27
|
+
margin: 0 auto;
|
|
26
28
|
padding: 3px;
|
|
27
29
|
box-sizing: content-box;
|
|
28
30
|
color: lightBlack;
|
|
29
31
|
}
|
|
32
|
+
|
|
30
33
|
.microLearninglabel {
|
|
31
34
|
font-family: 'Open Sans';
|
|
32
35
|
font-size: 10px;
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
color: lightBlack;
|
|
35
38
|
text-transform: uppercase;
|
|
36
39
|
}
|
|
40
|
+
|
|
37
41
|
.infoWrapper {
|
|
38
42
|
display: flex;
|
|
39
43
|
flex-direction: column;
|
|
@@ -60,7 +64,7 @@
|
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
.darkTitle {
|
|
63
|
-
color: lightBlack
|
|
67
|
+
color: lightBlack;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
.darkAuthorTitle {
|
|
@@ -138,8 +142,13 @@
|
|
|
138
142
|
font-size: 5px;
|
|
139
143
|
width: 25px;
|
|
140
144
|
height: 25px;
|
|
141
|
-
margin-top: -25px;
|
|
142
145
|
color: lightBlack;
|
|
146
|
+
margin-right: 5px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.iconWrapper {
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
143
152
|
}
|
|
144
153
|
|
|
145
154
|
.authorIcon {
|
|
@@ -183,6 +192,7 @@
|
|
|
183
192
|
font-size: 10px;
|
|
184
193
|
font-weight: 700;
|
|
185
194
|
}
|
|
195
|
+
|
|
186
196
|
.externalContent .cardInfo {
|
|
187
197
|
flex-grow: 2;
|
|
188
198
|
max-height: 115px;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
11
|
+
|
|
12
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
13
|
+
|
|
14
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const CMPopin = props => {
|
|
19
|
+
const {
|
|
20
|
+
content,
|
|
21
|
+
firstButton,
|
|
22
|
+
secondButton,
|
|
23
|
+
onClose,
|
|
24
|
+
icon
|
|
25
|
+
} = props;
|
|
26
|
+
const logo = {
|
|
27
|
+
AlertDiamond: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
|
|
28
|
+
WindowUpload: _novaIcons.NovaSolidApplicationsWindowUpload3
|
|
29
|
+
};
|
|
30
|
+
const LogoComponent = logo[icon];
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: _style.default.background
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: _style.default.popin
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement("header", {
|
|
36
|
+
className: _style.default.popinHeader
|
|
37
|
+
}, onClose ? /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
className: _style.default.headerCloseIconContainer,
|
|
39
|
+
onClick: onClose,
|
|
40
|
+
"data-name": 'close-icon'
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
|
|
42
|
+
className: _style.default.headerCloseIcon
|
|
43
|
+
})) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
+
className: _style.default.contentSection
|
|
45
|
+
}, LogoComponent ? /*#__PURE__*/_react.default.createElement(LogoComponent, {
|
|
46
|
+
className: _style.default.icon
|
|
47
|
+
}) : null, /*#__PURE__*/_react.default.createElement("p", {
|
|
48
|
+
className: _style.default.content,
|
|
49
|
+
"data-name": `cm-popin-content` // eslint-disable-next-line react/no-danger
|
|
50
|
+
,
|
|
51
|
+
dangerouslySetInnerHTML: {
|
|
52
|
+
__html: content
|
|
53
|
+
}
|
|
54
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: _style.default.buttonContainer
|
|
56
|
+
}, firstButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
className: _style.default.button
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
59
|
+
label: firstButton.label,
|
|
60
|
+
onClick: firstButton.handleOnclick,
|
|
61
|
+
"data-name": `cm-popin-cta`,
|
|
62
|
+
"aria-label": firstButton['aria-label'],
|
|
63
|
+
type: firstButton.type
|
|
64
|
+
})) : null, secondButton ? /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: _style.default.button
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
67
|
+
label: secondButton.label,
|
|
68
|
+
onClick: secondButton.handleOnclick,
|
|
69
|
+
"data-name": `cm-popin-cta-${secondButton.type}`,
|
|
70
|
+
"aria-label": firstButton['aria-label'],
|
|
71
|
+
type: secondButton.type
|
|
72
|
+
})) : null)), ")");
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
CMPopin.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
76
|
+
content: _propTypes.default.string,
|
|
77
|
+
firstButton: _propTypes.default.shape({
|
|
78
|
+
label: _propTypes.default.string,
|
|
79
|
+
handleOnclick: _propTypes.default.func,
|
|
80
|
+
'aria-label': _propTypes.default.string,
|
|
81
|
+
type: _propTypes.default.string
|
|
82
|
+
}),
|
|
83
|
+
secondButton: _propTypes.default.shape({
|
|
84
|
+
label: _propTypes.default.string,
|
|
85
|
+
handleOnclick: _propTypes.default.func,
|
|
86
|
+
type: _propTypes.default.oneOf(['dangerous', 'primary']),
|
|
87
|
+
'aria-label': _propTypes.default.string
|
|
88
|
+
}),
|
|
89
|
+
onClose: _propTypes.default.func,
|
|
90
|
+
icon: _propTypes.default.string
|
|
91
|
+
} : {};
|
|
92
|
+
var _default = CMPopin;
|
|
93
|
+
exports.default = _default;
|
|
94
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["CMPopin","props","content","firstButton","secondButton","onClose","icon","logo","AlertDiamond","WindowUpload","LogoComponent","style","background","popin","popinHeader","headerCloseIconContainer","headerCloseIcon","contentSection","__html","buttonContainer","button","label","handleOnclick","type","propTypes","PropTypes","string","shape","func","oneOf"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAKA;;AACA;;;;AAEA,MAAMA,OAAO,GAAGC,KAAK,IAAI;AACvB,QAAM;AAACC,IAAAA,OAAD;AAAUC,IAAAA,WAAV;AAAuBC,IAAAA,YAAvB;AAAqCC,IAAAA,OAArC;AAA8CC,IAAAA;AAA9C,MAAsDL,KAA5D;AAEA,QAAMM,IAAI,GAAG;AACXC,IAAAA,YAAY,EAAZA,0DADW;AAEXC,IAAAA,YAAY,EAAZA;AAFW,GAAb;AAIA,QAAMC,aAAa,GAAGH,IAAI,CAACD,IAAD,CAA1B;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEK,eAAMC;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAED,eAAME;AAAtB,kBACE;AAAQ,IAAA,SAAS,EAAEF,eAAMG;AAAzB,KACGT,OAAO,gBACN;AACE,IAAA,SAAS,EAAEM,eAAMI,wBADnB;AAEE,IAAA,OAAO,EAAEV,OAFX;AAGE,iBAAW;AAHb,kBAKE,6BAAC,+BAAD;AAAO,IAAA,SAAS,EAAEM,eAAMK;AAAxB,IALF,CADM,GAQJ,IATN,CADF,eAYE;AAAK,IAAA,SAAS,EAAEL,eAAMM;AAAtB,KACGP,aAAa,gBAAG,6BAAC,aAAD;AAAe,IAAA,SAAS,EAAEC,eAAML;AAAhC,IAAH,GAA8C,IAD9D,eAEE;AACE,IAAA,SAAS,EAAEK,eAAMT,OADnB;AAEE,iBAAY,kBAFd,CAGE;AAHF;AAIE,IAAA,uBAAuB,EAAE;AAACgB,MAAAA,MAAM,EAAEhB;AAAT;AAJ3B,IAFF,CAZF,eAsBE;AAAK,IAAA,SAAS,EAAES,eAAMQ;AAAtB,KACGhB,WAAW,gBACV;AAAK,IAAA,SAAS,EAAEQ,eAAMS;AAAtB,kBACE,6BAAC,mBAAD;AACE,IAAA,KAAK,EAAEjB,WAAW,CAACkB,KADrB;AAEE,IAAA,OAAO,EAAElB,WAAW,CAACmB,aAFvB;AAGE,iBAAY,cAHd;AAIE,kBAAYnB,WAAW,CAAC,YAAD,CAJzB;AAKE,IAAA,IAAI,EAAEA,WAAW,CAACoB;AALpB,IADF,CADU,GAUR,IAXN,EAYGnB,YAAY,gBACX;AAAK,IAAA,SAAS,EAAEO,eAAMS;AAAtB,kBACE,6BAAC,mBAAD;AACE,IAAA,KAAK,EAAEhB,YAAY,CAACiB,KADtB;AAEE,IAAA,OAAO,EAAEjB,YAAY,CAACkB,aAFxB;AAGE,iBAAY,gBAAelB,YAAY,CAACmB,IAAK,EAH/C;AAIE,kBAAYpB,WAAW,CAAC,YAAD,CAJzB;AAKE,IAAA,IAAI,EAAEC,YAAY,CAACmB;AALrB,IADF,CADW,GAUT,IAtBN,CAtBF,CADF,MADF;AAoDD,CA7DD;;AA+DAvB,OAAO,CAACwB,SAAR,2CAAoB;AAClBtB,EAAAA,OAAO,EAAEuB,mBAAUC,MADD;AAElBvB,EAAAA,WAAW,EAAEsB,mBAAUE,KAAV,CAAgB;AAC3BN,IAAAA,KAAK,EAAEI,mBAAUC,MADU;AAE3BJ,IAAAA,aAAa,EAAEG,mBAAUG,IAFE;AAG3B,kBAAcH,mBAAUC,MAHG;AAI3BH,IAAAA,IAAI,EAAEE,mBAAUC;AAJW,GAAhB,CAFK;AAQlBtB,EAAAA,YAAY,EAAEqB,mBAAUE,KAAV,CAAgB;AAC5BN,IAAAA,KAAK,EAAEI,mBAAUC,MADW;AAE5BJ,IAAAA,aAAa,EAAEG,mBAAUG,IAFG;AAG5BL,IAAAA,IAAI,EAAEE,mBAAUI,KAAV,CAAgB,CAAC,WAAD,EAAc,SAAd,CAAhB,CAHsB;AAI5B,kBAAcJ,mBAAUC;AAJI,GAAhB,CARI;AAclBrB,EAAAA,OAAO,EAAEoB,mBAAUG,IAdD;AAelBtB,EAAAA,IAAI,EAAEmB,mBAAUC;AAfE,CAApB;eAkBe1B,O","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaSolidStatusClose as Close\n} from '@coorpacademy/nova-icons';\nimport Cta from '../../atom/button-link';\nimport style from './style.css';\n\nconst CMPopin = props => {\n const {content, firstButton, secondButton, onClose, icon} = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload\n };\n const LogoComponent = logo[icon];\n\n return (\n <div className={style.background}>\n <div className={style.popin}>\n <header className={style.popinHeader}>\n {onClose ? (\n <div\n className={style.headerCloseIconContainer}\n onClick={onClose}\n data-name={'close-icon'}\n >\n <Close className={style.headerCloseIcon} />\n </div>\n ) : null}\n </header>\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n <p\n className={style.content}\n data-name={`cm-popin-content`}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n </div>\n\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={`cm-popin-cta`}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={firstButton['aria-label']}\n type={secondButton.type}\n />\n </div>\n ) : null}\n </div>\n </div>\n )\n </div>\n );\n};\n\nCMPopin.propTypes = {\n content: PropTypes.string,\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n type: PropTypes.string\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary']),\n 'aria-label': PropTypes.string\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string\n};\n\nexport default CMPopin;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value dark from colors;
|
|
3
|
+
@value brand from colors;
|
|
4
|
+
@value light from colors;
|
|
5
|
+
@value black from colors;
|
|
6
|
+
@value cm_grey_800 from colors;
|
|
7
|
+
@value negative from colors;
|
|
8
|
+
@value lightGreen from colors;
|
|
9
|
+
@value cm_grey_50 from colors;
|
|
10
|
+
@value cm_negative_100 from colors;
|
|
11
|
+
@value cm_negative_200 from colors;
|
|
12
|
+
@value cm_primary_blue from colors;
|
|
13
|
+
@value cm_grey_100 from colors;
|
|
14
|
+
@value cm_grey_200 from colors;
|
|
15
|
+
@value cm_blue_600 from colors;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
.background {
|
|
19
|
+
top: 0px;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 15% 25%;
|
|
24
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
display: flex;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.popin {
|
|
33
|
+
position: absolute;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
width: 500px;
|
|
36
|
+
height: 414px;
|
|
37
|
+
flex-grow: 0;
|
|
38
|
+
margin: 16px;
|
|
39
|
+
padding: 16px 16px 20px 16px;
|
|
40
|
+
border-radius: 20px;
|
|
41
|
+
background-color: cm_grey_50;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.contentSection {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
width: 65%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.content {
|
|
57
|
+
font-family: Gilroy;
|
|
58
|
+
font-size: 20px;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
font-stretch: normal;
|
|
61
|
+
font-style: normal;
|
|
62
|
+
line-height: 1.4;
|
|
63
|
+
letter-spacing: normal;
|
|
64
|
+
text-align: center;
|
|
65
|
+
color: cm_grey_800;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.buttonContainer {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 80px;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button {
|
|
77
|
+
width: 160px;
|
|
78
|
+
padding: 8px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.icon {
|
|
82
|
+
width: 60px;
|
|
83
|
+
height: 60px;
|
|
84
|
+
color: cm_grey_800;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.headerCloseIconContainer {
|
|
88
|
+
width: 44px;
|
|
89
|
+
height: 44px;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
align-items: center;
|
|
94
|
+
margin-top: 16px;
|
|
95
|
+
margin-right: 16px;
|
|
96
|
+
border-radius: 7px;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
background-color: cm_grey_100;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.headerCloseIconContainer:hover {
|
|
102
|
+
background-color: cm_grey_200;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.headerCloseIcon {
|
|
106
|
+
width: 18px;
|
|
107
|
+
height: 18px;
|
|
108
|
+
color: cm_grey_800;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.popinHeader {
|
|
112
|
+
width: 100%;
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: flex-end;
|
|
115
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
content: 'Are you sure to undo this changes? This will be permanent',
|
|
8
|
+
icon: 'AlertDiamond',
|
|
9
|
+
firstButton: {
|
|
10
|
+
label: 'Cancel',
|
|
11
|
+
type: 'secondary',
|
|
12
|
+
'aria-label': 'Cancel this operation',
|
|
13
|
+
handleOnClick: () => {}
|
|
14
|
+
},
|
|
15
|
+
secondButton: {
|
|
16
|
+
label: 'Undo',
|
|
17
|
+
type: 'dangerous',
|
|
18
|
+
'aria-label': 'Undo this operation',
|
|
19
|
+
handleOnClick: () => {}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
//# sourceMappingURL=dangerous.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","type","handleOnClick","secondButton"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,2DADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,IAAI,EAAE,WAFK;AAGX,oBAAc,uBAHH;AAIXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAJZ,KAHR;AASLC,IAAAA,YAAY,EAAE;AACZH,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,IAAI,EAAE,WAFM;AAGZ,oBAAc,qBAHF;AAIZC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAJX;AATT;AADM,C","sourcesContent":["export default {\n props: {\n content: 'Are you sure to undo this changes? This will be permanent',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Cancel',\n type: 'secondary',\n 'aria-label': 'Cancel this operation',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'dangerous',\n 'aria-label': 'Undo this operation',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"dangerous.js"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
content: 'Do you want to publish the custom playlist?',
|
|
8
|
+
icon: 'WindowUpload',
|
|
9
|
+
firstButton: {
|
|
10
|
+
label: 'Cancel',
|
|
11
|
+
type: 'secondary',
|
|
12
|
+
handleOnClick: () => {},
|
|
13
|
+
'aria-label': 'Cancel this operation'
|
|
14
|
+
},
|
|
15
|
+
secondButton: {
|
|
16
|
+
label: 'Undo',
|
|
17
|
+
type: 'primary',
|
|
18
|
+
handleOnClick: () => {},
|
|
19
|
+
'aria-label': 'Undo this operation'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/default.js"],"names":["props","content","icon","firstButton","label","type","handleOnClick","secondButton"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,6CADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,IAAI,EAAE,WAFK;AAGXC,MAAAA,aAAa,EAAE,MAAM,CAAE,CAHZ;AAIX,oBAAc;AAJH,KAHR;AASLC,IAAAA,YAAY,EAAE;AACZH,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,IAAI,EAAE,SAFM;AAGZC,MAAAA,aAAa,EAAE,MAAM,CAAE,CAHX;AAIZ,oBAAc;AAJF;AATT;AADM,C","sourcesContent":["export default {\n props: {\n content: 'Do you want to publish the custom playlist?',\n icon: 'WindowUpload',\n firstButton: {\n label: 'Cancel',\n type: 'secondary',\n handleOnClick: () => {},\n 'aria-label': 'Cancel this operation'\n },\n secondButton: {\n label: 'Undo',\n type: 'primary',\n handleOnClick: () => {},\n 'aria-label': 'Undo this operation'\n }\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
content: 'Do you want to save changes before quiting?',
|
|
8
|
+
icon: 'AlertDiamond',
|
|
9
|
+
firstButton: {
|
|
10
|
+
label: 'Quit without saving',
|
|
11
|
+
type: 'secondary',
|
|
12
|
+
'aria-label': 'Quit this operation without saving',
|
|
13
|
+
handleOnClick: () => {}
|
|
14
|
+
},
|
|
15
|
+
secondButton: {
|
|
16
|
+
label: 'Save & Quit',
|
|
17
|
+
type: 'primary',
|
|
18
|
+
'aria-label': 'Save and quit',
|
|
19
|
+
handleOnClick: () => {}
|
|
20
|
+
},
|
|
21
|
+
onClose: () => console.log('onClose')
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
//# sourceMappingURL=warning-with-close.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/warning-with-close.js"],"names":["props","content","icon","firstButton","label","type","handleOnClick","secondButton","onClose","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,6CADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,qBADI;AAEXC,MAAAA,IAAI,EAAE,WAFK;AAGX,oBAAc,oCAHH;AAIXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAJZ,KAHR;AASLC,IAAAA,YAAY,EAAE;AACZH,MAAAA,KAAK,EAAE,aADK;AAEZC,MAAAA,IAAI,EAAE,SAFM;AAGZ,oBAAc,eAHF;AAIZC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAJX,KATT;AAeLE,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,SAAZ;AAfV;AADM,C","sourcesContent":["export default {\n props: {\n content: 'Do you want to save changes before quiting?',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Quit without saving',\n type: 'secondary',\n 'aria-label': 'Quit this operation without saving',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Save & Quit',\n type: 'primary',\n 'aria-label': 'Save and quit',\n handleOnClick: () => {}\n },\n onClose: () => console.log('onClose')\n }\n};\n"],"file":"warning-with-close.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
14
|
+
|
|
15
|
+
var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
|
|
20
|
+
t.pass();
|
|
21
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
22
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
26
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
27
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
|
|
28
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
|
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _inputSearch = _interopRequireDefault(require("../../atom/input-search"));
|
|
15
15
|
|
|
16
16
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
17
17
|
|
|
@@ -47,7 +47,7 @@ const SearchForm = (props, context) => {
|
|
|
47
47
|
method: method,
|
|
48
48
|
onSubmit: handleSubmit,
|
|
49
49
|
"data-name": "searchForm"
|
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_inputSearch.default, _extends({}, search, {
|
|
51
51
|
onFocus: onSearchFocus,
|
|
52
52
|
onBlur: onSearchBlur
|
|
53
53
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -67,7 +67,7 @@ SearchForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
67
67
|
onReset: _propTypes.default.func,
|
|
68
68
|
onSearchFocus: _propTypes.default.func,
|
|
69
69
|
onSearchBlur: _propTypes.default.func,
|
|
70
|
-
search: _propTypes.default.shape(
|
|
70
|
+
search: _propTypes.default.shape(_inputSearch.default.propTypes)
|
|
71
71
|
} : {};
|
|
72
72
|
var _default = SearchForm;
|
|
73
73
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/search-form/index.js"],"names":["SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","handleSubmit","evt","preventDefault","skin","dark","style","form","value","wrapperClear","wrapperNoClear","clear","propTypes","PropTypes","string","func","shape","Search"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACrC,QAAM;AAACC,IAAAA,MAAD;AAASC,IAAAA,MAAT;AAAiBC,IAAAA,QAAjB;AAA2BC,IAAAA,OAA3B;AAAoCC,IAAAA,MAApC;AAA4CC,IAAAA,aAA5C;AAA2DC,IAAAA;AAA3D,MAA2ER,KAAjF;AACA,QAAMS,YAAY,GAAG,oBACnB,MAAMC,GAAG,IAAI;AACXA,IAAAA,GAAG,CAACC,cAAJ;AACA,WAAOP,QAAQ,IAAIA,QAAQ,CAACM,GAAD,CAA3B;AACD,GAJkB,EAKnB,CAACN,QAAD,CALmB,CAArB;AAOA,QAAM;AAACQ,IAAAA;AAAD,MAASX,OAAf;AACA,QAAMY,IAAI,GAAG,mBAAI,aAAJ,EAAmBD,IAAnB,CAAb;AAEA,sBACE;AACE,IAAA,SAAS,EAAEE,eAAMC,IADnB;AAEE,IAAA,MAAM,EAAEb,MAFV;AAGE,IAAA,MAAM,EAAEC,MAHV;AAIE,IAAA,QAAQ,EAAEM,YAJZ;AAKE,iBAAU;AALZ,kBAOE,6BAAC,
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/search-form/index.js"],"names":["SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","handleSubmit","evt","preventDefault","skin","dark","style","form","value","wrapperClear","wrapperNoClear","clear","propTypes","PropTypes","string","func","shape","Search"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACrC,QAAM;AAACC,IAAAA,MAAD;AAASC,IAAAA,MAAT;AAAiBC,IAAAA,QAAjB;AAA2BC,IAAAA,OAA3B;AAAoCC,IAAAA,MAApC;AAA4CC,IAAAA,aAA5C;AAA2DC,IAAAA;AAA3D,MAA2ER,KAAjF;AACA,QAAMS,YAAY,GAAG,oBACnB,MAAMC,GAAG,IAAI;AACXA,IAAAA,GAAG,CAACC,cAAJ;AACA,WAAOP,QAAQ,IAAIA,QAAQ,CAACM,GAAD,CAA3B;AACD,GAJkB,EAKnB,CAACN,QAAD,CALmB,CAArB;AAOA,QAAM;AAACQ,IAAAA;AAAD,MAASX,OAAf;AACA,QAAMY,IAAI,GAAG,mBAAI,aAAJ,EAAmBD,IAAnB,CAAb;AAEA,sBACE;AACE,IAAA,SAAS,EAAEE,eAAMC,IADnB;AAEE,IAAA,MAAM,EAAEb,MAFV;AAGE,IAAA,MAAM,EAAEC,MAHV;AAIE,IAAA,QAAQ,EAAEM,YAJZ;AAKE,iBAAU;AALZ,kBAOE,6BAAC,oBAAD,eAAYH,MAAZ;AAAoB,IAAA,OAAO,EAAEC,aAA7B;AAA4C,IAAA,MAAM,EAAEC;AAApD,KAPF,eAQE;AACE,iBAAU,mBADZ;AAEE,IAAA,OAAO,EAAEH,OAFX;AAGE,IAAA,SAAS,EAAEC,MAAM,CAACU,KAAP,GAAeF,eAAMG,YAArB,GAAoCH,eAAMI;AAHvD,kBAKE,6BAAC,wCAAD;AAAW,IAAA,KAAK,EAAEL,IAAlB;AAAwB,IAAA,SAAS,EAAEC,eAAMK;AAAzC,IALF,CARF,CADF;AAkBD,CA9BD;;AAgCApB,UAAU,CAACqB,SAAX,2CAAuB;AACrBlB,EAAAA,MAAM,EAAEmB,mBAAUC,MADG;AAErBnB,EAAAA,MAAM,EAAEkB,mBAAUC,MAFG;AAGrBlB,EAAAA,QAAQ,EAAEiB,mBAAUE,IAHC;AAIrBlB,EAAAA,OAAO,EAAEgB,mBAAUE,IAJE;AAKrBhB,EAAAA,aAAa,EAAEc,mBAAUE,IALJ;AAMrBf,EAAAA,YAAY,EAAEa,mBAAUE,IANH;AAOrBjB,EAAAA,MAAM,EAAEe,mBAAUG,KAAV,CAAgBC,qBAAOL,SAAvB;AAPa,CAAvB;eAUerB,U","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationMore as ClearIcon} from '@coorpacademy/nova-icons';\nimport Search from '../../atom/input-search';\nimport style from './style.css';\n\nconst SearchForm = (props, context) => {\n const {action, method, onSubmit, onReset, search, onSearchFocus, onSearchBlur} = props;\n const handleSubmit = useMemo(\n () => evt => {\n evt.preventDefault();\n return onSubmit && onSubmit(evt);\n },\n [onSubmit]\n );\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <form\n className={style.form}\n action={action}\n method={method}\n onSubmit={handleSubmit}\n data-name=\"searchForm\"\n >\n <Search {...search} onFocus={onSearchFocus} onBlur={onSearchBlur} />\n <div\n data-name=\"search-form-reset\"\n onClick={onReset}\n className={search.value ? style.wrapperClear : style.wrapperNoClear}\n >\n <ClearIcon color={dark} className={style.clear} />\n </div>\n </form>\n );\n};\n\nSearchForm.propTypes = {\n action: PropTypes.string,\n method: PropTypes.string,\n onSubmit: PropTypes.func,\n onReset: PropTypes.func,\n onSearchFocus: PropTypes.func,\n onSearchBlur: PropTypes.func,\n search: PropTypes.shape(Search.propTypes)\n};\n\nexport default SearchForm;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
13
|
+
|
|
14
|
+
var _contentBadge = _interopRequireDefault(require("../../atom/content-badge"));
|
|
15
|
+
|
|
16
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
17
|
+
|
|
18
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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
|
+
|
|
26
|
+
const buildItemsOfSection = items => {
|
|
27
|
+
return items.map((item, index) => {
|
|
28
|
+
const {
|
|
29
|
+
type
|
|
30
|
+
} = item;
|
|
31
|
+
|
|
32
|
+
switch (type) {
|
|
33
|
+
case 'mainElement':
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
35
|
+
key: `${item.title}-${index}`
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
37
|
+
className: _style.default.title
|
|
38
|
+
}, item.title), /*#__PURE__*/_react.default.createElement("span", {
|
|
39
|
+
className: _style.default.value
|
|
40
|
+
}, item.value));
|
|
41
|
+
|
|
42
|
+
case 'content':
|
|
43
|
+
{
|
|
44
|
+
const {
|
|
45
|
+
category,
|
|
46
|
+
label,
|
|
47
|
+
title,
|
|
48
|
+
author,
|
|
49
|
+
unsaved = false
|
|
50
|
+
} = item;
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
52
|
+
className: _style.default.contentWrapper,
|
|
53
|
+
key: `${title}-${index}`
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
55
|
+
className: _style.default.contentCounter
|
|
56
|
+
}, index + 1), /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
+
className: _style.default.contentItem
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
className: _style.default.content
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_contentBadge.default, {
|
|
61
|
+
category: category,
|
|
62
|
+
label: label
|
|
63
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
className: (0, _classnames.default)(_style.default.contentTitle, unsaved && _style.default.unsaved),
|
|
65
|
+
title: title // eslint-disable-next-line react/no-danger
|
|
66
|
+
,
|
|
67
|
+
dangerouslySetInnerHTML: {
|
|
68
|
+
__html: title
|
|
69
|
+
}
|
|
70
|
+
})), author ? /*#__PURE__*/_react.default.createElement("span", {
|
|
71
|
+
className: _style.default.author
|
|
72
|
+
}, author) : null));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
case 'text':
|
|
76
|
+
default:
|
|
77
|
+
{
|
|
78
|
+
const {
|
|
79
|
+
text,
|
|
80
|
+
unsaved = false
|
|
81
|
+
} = item;
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
83
|
+
key: `${item.text}-${index}`
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
85
|
+
className: (0, _classnames.default)(_style.default.valueSimpleText, unsaved && _style.default.unsaved)
|
|
86
|
+
}, text));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const buildSectionHeader = section => {
|
|
93
|
+
const {
|
|
94
|
+
title,
|
|
95
|
+
counterText
|
|
96
|
+
} = section;
|
|
97
|
+
|
|
98
|
+
if (!title) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
+
className: _style.default.sectionHeader
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
105
|
+
className: _style.default.title
|
|
106
|
+
}, title), counterText ? /*#__PURE__*/_react.default.createElement("span", {
|
|
107
|
+
className: _style.default.counterText
|
|
108
|
+
}, counterText) : null);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const buildSections = sections => {
|
|
112
|
+
return sections.map((section, index) => {
|
|
113
|
+
const sectionHeader = buildSectionHeader(section);
|
|
114
|
+
const itemsView = buildItemsOfSection(section.items);
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
+
key: `summary-section-${index}`,
|
|
117
|
+
"data-step": index,
|
|
118
|
+
className: _style.default.sectionWrapper
|
|
119
|
+
}, sectionHeader, /*#__PURE__*/_react.default.createElement("ul", null, itemsView));
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const buildAction = action => {
|
|
124
|
+
if (!action) return null;
|
|
125
|
+
const {
|
|
126
|
+
onClick,
|
|
127
|
+
text,
|
|
128
|
+
icon,
|
|
129
|
+
'aria-label': ariaLabel
|
|
130
|
+
} = action;
|
|
131
|
+
const handleClick = (0, _react.useMemo)(() => () => onClick(), [onClick]);
|
|
132
|
+
const buttonProps = {
|
|
133
|
+
type: 'text',
|
|
134
|
+
label: text,
|
|
135
|
+
'aria-label': ariaLabel,
|
|
136
|
+
'data-name': `${icon}-button`,
|
|
137
|
+
onClick: handleClick,
|
|
138
|
+
icon: {
|
|
139
|
+
position: 'left',
|
|
140
|
+
type: icon
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonProps));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const WizardSummary = props => {
|
|
147
|
+
const {
|
|
148
|
+
title,
|
|
149
|
+
sections,
|
|
150
|
+
action
|
|
151
|
+
} = props;
|
|
152
|
+
const sectionsView = buildSections(sections);
|
|
153
|
+
const actionView = buildAction(action);
|
|
154
|
+
const idSwitch = 'open-summary-wizard';
|
|
155
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
156
|
+
className: _style.default.container
|
|
157
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
158
|
+
className: _style.default.desktopSummaryTitle
|
|
159
|
+
}, title), /*#__PURE__*/_react.default.createElement("input", {
|
|
160
|
+
type: "checkbox",
|
|
161
|
+
id: idSwitch,
|
|
162
|
+
name: "toogle",
|
|
163
|
+
title: idSwitch,
|
|
164
|
+
className: _style.default.checkbox
|
|
165
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
166
|
+
className: _style.default.summary
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
168
|
+
className: _style.default.tabletSummaryHeader
|
|
169
|
+
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
170
|
+
htmlFor: idSwitch
|
|
171
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
172
|
+
className: _style.default.tabletSummaryTitle
|
|
173
|
+
}, title), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
|
|
174
|
+
className: _style.default.tabletSummaryIcon
|
|
175
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
+
className: _style.default.summarySections
|
|
177
|
+
}, sectionsView)), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: _style.default.actionZone
|
|
179
|
+
}, actionView));
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
WizardSummary.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
183
|
+
title: _propTypes.default.string,
|
|
184
|
+
sections: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
185
|
+
title: _propTypes.default.string,
|
|
186
|
+
items: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
|
|
187
|
+
type: _propTypes.default.string,
|
|
188
|
+
title: _propTypes.default.string,
|
|
189
|
+
value: _propTypes.default.string
|
|
190
|
+
}), _propTypes.default.shape({
|
|
191
|
+
type: _propTypes.default.string,
|
|
192
|
+
text: _propTypes.default.string,
|
|
193
|
+
unsaved: _propTypes.default.bool
|
|
194
|
+
}), _propTypes.default.shape({
|
|
195
|
+
type: _propTypes.default.string,
|
|
196
|
+
category: _propTypes.default.oneOf(['base', 'advanced', 'coach', 'chapter', 'scorm', 'video', 'article', 'podcast']),
|
|
197
|
+
title: _propTypes.default.string,
|
|
198
|
+
label: _propTypes.default.string,
|
|
199
|
+
author: _propTypes.default.string,
|
|
200
|
+
unsaved: _propTypes.default.bool
|
|
201
|
+
})])),
|
|
202
|
+
counterText: _propTypes.default.string
|
|
203
|
+
})),
|
|
204
|
+
action: _propTypes.default.shape({
|
|
205
|
+
icon: _propTypes.default.string,
|
|
206
|
+
text: _propTypes.default.string,
|
|
207
|
+
onClick: _propTypes.default.func,
|
|
208
|
+
'aria-label': _propTypes.default.string
|
|
209
|
+
})
|
|
210
|
+
} : {};
|
|
211
|
+
var _default = WizardSummary;
|
|
212
|
+
exports.default = _default;
|
|
213
|
+
//# sourceMappingURL=index.js.map
|