@coorpacademy/components 10.1.1 → 10.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button/index.js +3 -1
- package/es/atom/button/index.js.map +1 -1
- package/es/atom/button-link/index.js +108 -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/chips/index.js +8 -4
- package/es/atom/chips/index.js.map +1 -1
- package/es/atom/chips/style.css +17 -2
- package/es/atom/chips/test/fixtures/long-text.js +9 -0
- package/es/atom/chips/test/fixtures/long-text.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-search/index.js +65 -0
- package/es/atom/input-search/index.js.map +1 -0
- package/es/atom/input-search/style.css +202 -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 +1 -1
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text/style.css +22 -13
- 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/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/feedback/test/fixtures.js +2 -0
- package/es/molecule/feedback/test/fixtures.js.map +1 -1
- package/es/molecule/search-form/index.js +1 -1
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/select-multiple/index.js +113 -146
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/test/index.js +20 -79
- package/es/molecule/select-multiple/test/index.js.map +1 -1
- package/es/molecule/wizard-summary/index.js +60 -25
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +100 -20
- package/es/molecule/wizard-summary/test/fixtures/default.js +11 -4
- package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/one-section.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -1
- 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 +2 -1
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/two-sections.js +2 -1
- package/es/molecule/wizard-summary/test/fixtures/two-sections.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/search-and-chips-results/index.js +91 -0
- package/es/organism/search-and-chips-results/index.js.map +1 -0
- package/es/organism/search-and-chips-results/style.css +57 -0
- package/es/organism/search-and-chips-results/test/fixtures/default.js +46 -0
- package/es/organism/search-and-chips-results/test/fixtures/default.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures/empty.js +23 -0
- package/es/organism/search-and-chips-results/test/fixtures/empty.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures/filtered.js +26 -0
- package/es/organism/search-and-chips-results/test/fixtures/filtered.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures/sorted-selected.js +49 -0
- package/es/organism/search-and-chips-results/test/fixtures/sorted-selected.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures/unsorted-selected.js +49 -0
- package/es/organism/search-and-chips-results/test/fixtures/unsorted-selected.js.map +1 -0
- package/es/template/app-player/popin-end/test/fixtures.js +2 -0
- package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
- 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/variables/colors.css +7 -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 +125 -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/chips/index.js +8 -4
- package/lib/atom/chips/index.js.map +1 -1
- package/lib/atom/chips/style.css +17 -2
- package/lib/atom/chips/test/fixtures/long-text.js +14 -0
- package/lib/atom/chips/test/fixtures/long-text.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/{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 +202 -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 +1 -1
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text/style.css +22 -13
- 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/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/feedback/test/fixtures.js +3 -0
- package/lib/molecule/feedback/test/fixtures.js.map +1 -1
- package/lib/molecule/search-form/index.js +3 -3
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/select-multiple/index.js +117 -143
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/test/index.js +25 -79
- package/lib/molecule/select-multiple/test/index.js.map +1 -1
- package/lib/molecule/wizard-summary/index.js +59 -23
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +100 -20
- package/lib/molecule/wizard-summary/test/fixtures/default.js +11 -4
- package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/one-section.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/one-section.js.map +1 -1
- 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 +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/two-sections.js +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/two-sections.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/search-and-chips-results/index.js +104 -0
- package/lib/organism/search-and-chips-results/index.js.map +1 -0
- package/lib/organism/search-and-chips-results/style.css +57 -0
- package/lib/organism/search-and-chips-results/test/fixtures/default.js +51 -0
- package/lib/organism/search-and-chips-results/test/fixtures/default.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures/empty.js +28 -0
- package/lib/organism/search-and-chips-results/test/fixtures/empty.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures/filtered.js +31 -0
- package/lib/organism/search-and-chips-results/test/fixtures/filtered.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures/sorted-selected.js +54 -0
- package/lib/organism/search-and-chips-results/test/fixtures/sorted-selected.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures/unsorted-selected.js +54 -0
- package/lib/organism/search-and-chips-results/test/fixtures/unsorted-selected.js.map +1 -0
- package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
- package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
- 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/variables/colors.css +7 -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/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/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/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
|
@@ -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"}
|
|
@@ -22,6 +22,8 @@ var _successWithTitleAndDescriptionAndImage = _interopRequireDefault(require("./
|
|
|
22
22
|
|
|
23
23
|
var _successWithTitleAndDescriptionAndPdf = _interopRequireDefault(require("./fixtures/success-with-title-and-description-and-pdf"));
|
|
24
24
|
|
|
25
|
+
var _successWithTitleAndDescriptionAndVideo = _interopRequireDefault(require("./fixtures/success-with-title-and-description-and-video"));
|
|
26
|
+
|
|
25
27
|
var _successWithTitleAndDescription = _interopRequireDefault(require("./fixtures/success-with-title-and-description"));
|
|
26
28
|
|
|
27
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -39,5 +41,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
39
41
|
(0, _ava.default)('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndAudio › should be rendered', _renderComponent.default, _.default, _successWithTitleAndDescriptionAndAudio.default);
|
|
40
42
|
(0, _ava.default)('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndImage › should be rendered', _renderComponent.default, _.default, _successWithTitleAndDescriptionAndImage.default);
|
|
41
43
|
(0, _ava.default)('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndPdf › should be rendered', _renderComponent.default, _.default, _successWithTitleAndDescriptionAndPdf.default);
|
|
44
|
+
(0, _ava.default)('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndVideo › should be rendered', _renderComponent.default, _.default, _successWithTitleAndDescriptionAndVideo.default);
|
|
42
45
|
(0, _ava.default)('Molecule › MoleculeFeedback › SuccessWithTitleAndDescription › should be rendered', _renderComponent.default, _.default, _successWithTitleAndDescription.default);
|
|
43
46
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/feedback/test/fixtures.js"],"names":["t","pass","MoleculeFeedback","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureFailExitNode","fixtureFailureWithTitleAndDescriptionAndVideo","fixtureSuccessExitNode","fixtureSuccessWithTitleAndDescriptionAndAudio","fixtureSuccessWithTitleAndDescriptionAndImage","fixtureSuccessWithTitleAndDescriptionAndPdf","fixtureSuccessWithTitleAndDescription"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,2DAAL,EAAkEA,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,4DAAL,EAAmEG,wBAAnE,EAAyFN,SAAzF,EAA2GO,gBAA3G;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAgHQ,qBAAhH;AACA,kBAAK,2FAAL,EAAkGF,wBAAlG,EAAwHN,SAAxH,EAA0IS,+CAA1I;AACA,kBAAK,oEAAL,EAA2EH,wBAA3E,EAAiGN,SAAjG,EAAmHU,wBAAnH;AACA,kBAAK,2FAAL,EAAkGJ,wBAAlG,EAAwHN,SAAxH,EAA0IW,+CAA1I;AACA,kBAAK,2FAAL,EAAkGL,wBAAlG,EAAwHN,SAAxH,EAA0IY,+CAA1I;AACA,kBAAK,yFAAL,EAAgGN,wBAAhG,EAAsHN,SAAtH,EAAwIa,6CAAxI;AACA,kBAAK,mFAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/feedback/test/fixtures.js"],"names":["t","pass","MoleculeFeedback","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureFailExitNode","fixtureFailureWithTitleAndDescriptionAndVideo","fixtureSuccessExitNode","fixtureSuccessWithTitleAndDescriptionAndAudio","fixtureSuccessWithTitleAndDescriptionAndImage","fixtureSuccessWithTitleAndDescriptionAndPdf","fixtureSuccessWithTitleAndDescriptionAndVideo","fixtureSuccessWithTitleAndDescription"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,2DAAL,EAAkEA,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,4DAAL,EAAmEG,wBAAnE,EAAyFN,SAAzF,EAA2GO,gBAA3G;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAgHQ,qBAAhH;AACA,kBAAK,2FAAL,EAAkGF,wBAAlG,EAAwHN,SAAxH,EAA0IS,+CAA1I;AACA,kBAAK,oEAAL,EAA2EH,wBAA3E,EAAiGN,SAAjG,EAAmHU,wBAAnH;AACA,kBAAK,2FAAL,EAAkGJ,wBAAlG,EAAwHN,SAAxH,EAA0IW,+CAA1I;AACA,kBAAK,2FAAL,EAAkGL,wBAAlG,EAAwHN,SAAxH,EAA0IY,+CAA1I;AACA,kBAAK,yFAAL,EAAgGN,wBAAhG,EAAsHN,SAAtH,EAAwIa,6CAAxI;AACA,kBAAK,2FAAL,EAAkGP,wBAAlG,EAAwHN,SAAxH,EAA0Ic,+CAA1I;AACA,kBAAK,mFAAL,EAA0FR,wBAA1F,EAAgHN,SAAhH,EAAkIe,uCAAlI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeFeedback from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureFailExitNode from './fixtures/fail-exit-node';\nimport fixtureFailureWithTitleAndDescriptionAndVideo from './fixtures/failure-with-title-and-description-and-video';\nimport fixtureSuccessExitNode from './fixtures/success-exit-node';\nimport fixtureSuccessWithTitleAndDescriptionAndAudio from './fixtures/success-with-title-and-description-and-audio';\nimport fixtureSuccessWithTitleAndDescriptionAndImage from './fixtures/success-with-title-and-description-and-image';\nimport fixtureSuccessWithTitleAndDescriptionAndPdf from './fixtures/success-with-title-and-description-and-pdf';\nimport fixtureSuccessWithTitleAndDescriptionAndVideo from './fixtures/success-with-title-and-description-and-video';\nimport fixtureSuccessWithTitleAndDescription from './fixtures/success-with-title-and-description';\n\ntest('Molecule › MoleculeFeedback > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeFeedback.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeFeedback.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeFeedback › Default › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureDefault);\ntest('Molecule › MoleculeFeedback › FailExitNode › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureFailExitNode);\ntest('Molecule › MoleculeFeedback › FailureWithTitleAndDescriptionAndVideo › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureFailureWithTitleAndDescriptionAndVideo);\ntest('Molecule › MoleculeFeedback › SuccessExitNode › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureSuccessExitNode);\ntest('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndAudio › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureSuccessWithTitleAndDescriptionAndAudio);\ntest('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndImage › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureSuccessWithTitleAndDescriptionAndImage);\ntest('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndPdf › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureSuccessWithTitleAndDescriptionAndPdf);\ntest('Molecule › MoleculeFeedback › SuccessWithTitleAndDescriptionAndVideo › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureSuccessWithTitleAndDescriptionAndVideo);\ntest('Molecule › MoleculeFeedback › SuccessWithTitleAndDescription › should be rendered', renderComponentMacro, MoleculeFeedback, fixtureSuccessWithTitleAndDescription);\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"}
|