@coorpacademy/components 10.1.2 → 10.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +93 -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/button-link/test/fixtures.js +33 -0
- package/es/atom/button-link/test/fixtures.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/chips/test/fixtures.js +17 -0
- package/es/atom/chips/test/fixtures.js.map +1 -0
- package/es/atom/content-badge/test/fixtures.js +27 -0
- package/es/atom/content-badge/test/fixtures.js.map +1 -0
- package/es/atom/input-checkbox/test/fixtures.js +2 -0
- 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 +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-search/test/fixtures.js +19 -0
- package/es/atom/input-search/test/fixtures.js.map +1 -0
- package/es/atom/input-text/style.css +6 -2
- package/es/atom/input-text/test/fixtures.js +2 -0
- package/es/atom/input-text/test/fixtures.js.map +1 -1
- package/es/atom/input-textarea/style.css +3 -3
- package/es/atom/input-textarea/test/fixtures.js +4 -0
- package/es/atom/input-textarea/test/fixtures.js.map +1 -1
- 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/tag/test/fixtures.js +19 -0
- package/es/atom/tag/test/fixtures.js.map +1 -0
- package/es/atom/title/test/fixtures.js +6 -2
- package/es/atom/title/test/fixtures.js.map +1 -1
- package/es/atom/wizard-steps/test/fixtures.js +17 -0
- package/es/atom/wizard-steps/test/fixtures.js.map +1 -0
- package/es/molecule/banner/index.js +19 -10
- package/es/molecule/banner/index.js.map +1 -1
- package/es/molecule/banner/style.css +13 -11
- package/es/molecule/banner/test/fixtures.js +15 -0
- package/es/molecule/banner/test/fixtures.js.map +1 -0
- package/es/molecule/brand-form-group/index.js +20 -5
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +19 -0
- package/es/molecule/brand-form-group/test/fixtures.js +2 -0
- package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
- package/es/molecule/card/test/fixtures.js +4 -0
- package/es/molecule/card/test/fixtures.js.map +1 -1
- package/es/molecule/cm-popin/index.js +21 -15
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +2 -44
- package/es/molecule/cm-popin/test/fixtures/dangerous.js +3 -0
- package/es/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -1
- package/es/molecule/cm-popin/test/fixtures/default.js +6 -3
- package/es/molecule/cm-popin/test/fixtures/default.js.map +1 -1
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js +4 -1
- package/es/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -1
- package/es/molecule/cm-popin/test/fixtures.js +17 -0
- package/es/molecule/cm-popin/test/fixtures.js.map +1 -0
- package/es/molecule/coorp-manager-roles/test/fixtures.js +13 -0
- package/es/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
- package/es/molecule/quick-access-card/test/fixtures.js +21 -0
- package/es/molecule/quick-access-card/test/fixtures.js.map +1 -0
- package/es/molecule/quick-access-cards-group/test/fixtures.js +21 -0
- package/es/molecule/quick-access-cards-group/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/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/vertical-tabs/test/fixtures.js +15 -0
- package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -0
- package/es/molecule/wizard-summary/index.js +20 -10
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +12 -21
- package/es/molecule/wizard-summary/test/fixtures/default.js +2 -1
- 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 +2 -1
- package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
- 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/molecule/wizard-summary/test/fixtures.js +21 -0
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js +4 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/es/organism/brand-dashboard/test/fixtures.js +2 -0
- package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js +26 -0
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -0
- package/es/organism/brand-form/test/fixtures.js +2 -0
- package/es/organism/brand-form/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/search-and-chips-results/index.js +92 -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/organism/search-and-chips-results/test/fixtures.js +21 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +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 +2 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/variables/colors.css +2 -2
- 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 +93 -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/button-link/test/fixtures.js +52 -0
- package/lib/atom/button-link/test/fixtures.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/chips/test/fixtures.js +28 -0
- package/lib/atom/chips/test/fixtures.js.map +1 -0
- package/lib/atom/content-badge/test/fixtures.js +43 -0
- package/lib/atom/content-badge/test/fixtures.js.map +1 -0
- package/lib/atom/input-checkbox/test/fixtures.js +3 -0
- 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 +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-search/test/fixtures.js +31 -0
- package/lib/atom/input-search/test/fixtures.js.map +1 -0
- package/lib/atom/input-text/style.css +6 -2
- package/lib/atom/input-text/test/fixtures.js +3 -0
- package/lib/atom/input-text/test/fixtures.js.map +1 -1
- package/lib/atom/input-textarea/style.css +3 -3
- package/lib/atom/input-textarea/test/fixtures.js +6 -0
- package/lib/atom/input-textarea/test/fixtures.js.map +1 -1
- 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/tag/test/fixtures.js +31 -0
- package/lib/atom/tag/test/fixtures.js.map +1 -0
- package/lib/atom/title/test/fixtures.js +8 -2
- package/lib/atom/title/test/fixtures.js.map +1 -1
- package/lib/atom/wizard-steps/test/fixtures.js +28 -0
- package/lib/atom/wizard-steps/test/fixtures.js.map +1 -0
- package/lib/molecule/banner/index.js +19 -10
- package/lib/molecule/banner/index.js.map +1 -1
- package/lib/molecule/banner/style.css +13 -11
- package/lib/molecule/{search → banner}/test/fixtures.js +5 -5
- package/lib/molecule/banner/test/fixtures.js.map +1 -0
- package/lib/molecule/brand-form-group/index.js +22 -5
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +19 -0
- package/lib/molecule/brand-form-group/test/fixtures.js +3 -0
- package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
- package/lib/molecule/card/test/fixtures.js +6 -0
- package/lib/molecule/card/test/fixtures.js.map +1 -1
- package/lib/molecule/cm-popin/index.js +21 -16
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +2 -44
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js +3 -0
- package/lib/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -1
- package/lib/molecule/cm-popin/test/fixtures/default.js +6 -3
- package/lib/molecule/cm-popin/test/fixtures/default.js.map +1 -1
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js +4 -1
- package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -1
- package/lib/molecule/cm-popin/test/fixtures.js +28 -0
- package/lib/molecule/cm-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/coorp-manager-roles/test/fixtures.js +22 -0
- package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
- package/lib/molecule/quick-access-card/test/fixtures.js +34 -0
- package/lib/molecule/quick-access-card/test/fixtures.js.map +1 -0
- package/lib/molecule/quick-access-cards-group/test/fixtures.js +34 -0
- package/lib/molecule/quick-access-cards-group/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/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/vertical-tabs/test/fixtures.js +25 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -0
- package/lib/molecule/wizard-summary/index.js +20 -10
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +12 -21
- package/lib/molecule/wizard-summary/test/fixtures/default.js +2 -1
- 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 +2 -1
- package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
- 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/molecule/wizard-summary/test/fixtures.js +34 -0
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +6 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/lib/organism/brand-dashboard/test/fixtures.js +3 -0
- package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js +31 -0
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -0
- package/lib/organism/brand-form/test/fixtures.js +3 -0
- package/lib/organism/brand-form/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/search-and-chips-results/index.js +105 -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/organism/search-and-chips-results/test/fixtures.js +34 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +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 +3 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/variables/colors.css +2 -2
- package/package.json +3 -3
- package/es/atom/bullet-point-menu-button/test/fixtures.js +0 -27
- package/es/atom/bullet-point-menu-button/test/fixtures.js.map +0 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/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/search/test/fixtures.js +0 -15
- package/es/molecule/search/test/fixtures.js.map +0 -1
- package/lib/atom/bullet-point-menu-button/test/fixtures.js +0 -43
- package/lib/atom/bullet-point-menu-button/test/fixtures.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/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/search/test/fixtures.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaSolidStatusClose","Close","
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaSolidStatusClose","Close","Cta","style","CMPopin","props","content","firstButton","secondButton","onClose","icon","logo","LogoComponent","background","popin","popinHeader","headerCloseIconContainer","headerCloseIcon","contentSection","__html","buttonContainer","button","label","handleOnclick","type","propTypes","string","shape","func","oneOf"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,kCAAkC,IAAIC,YAFxC,EAGEC,oBAAoB,IAAIC,KAH1B,QAIO,0BAJP;AAKA,OAAOC,GAAP,MAAgB,wBAAhB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,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;AACXd,IAAAA,YADW;AAEXE,IAAAA;AAFW,GAAb;AAIA,QAAMa,aAAa,GAAGD,IAAI,CAACD,IAAD,CAA1B;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACU;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEV,KAAK,CAACW;AAAtB,kBACE;AAAQ,IAAA,SAAS,EAAEX,KAAK,CAACY;AAAzB,KACGN,OAAO,gBACN;AACE,IAAA,SAAS,EAAEN,KAAK,CAACa,wBADnB;AAEE,IAAA,OAAO,EAAEP,OAFX;AAGE,iBAAW;AAHb,kBAKE,oBAAC,KAAD;AAAO,IAAA,SAAS,EAAEN,KAAK,CAACc;AAAxB,IALF,CADM,GAQJ,IATN,CADF,eAYE;AAAK,IAAA,SAAS,EAAEd,KAAK,CAACe;AAAtB,KACGN,aAAa,gBAAG,oBAAC,aAAD;AAAe,IAAA,SAAS,EAAET,KAAK,CAACO;AAAhC,IAAH,GAA8C,IAD9D,eAEE;AACE,IAAA,SAAS,EAAEP,KAAK,CAACG,OADnB;AAEE,iBAAY,kBAFd,CAGE;AAHF;AAIE,IAAA,uBAAuB,EAAE;AAACa,MAAAA,MAAM,EAAEb;AAAT;AAJ3B,IAFF,CAZF,eAsBE;AAAK,IAAA,SAAS,EAAEH,KAAK,CAACiB;AAAtB,KACGb,WAAW,gBACV;AAAK,IAAA,SAAS,EAAEJ,KAAK,CAACkB;AAAtB,kBACE,oBAAC,GAAD;AACE,IAAA,KAAK,EAAEd,WAAW,CAACe,KADrB;AAEE,IAAA,OAAO,EAAEf,WAAW,CAACgB,aAFvB;AAGE,iBAAY,cAHd;AAIE,kBAAYhB,WAAW,CAAC,YAAD,CAJzB;AAKE,IAAA,IAAI,EAAEA,WAAW,CAACiB;AALpB,IADF,CADU,GAUR,IAXN,EAYGhB,YAAY,gBACX;AAAK,IAAA,SAAS,EAAEL,KAAK,CAACkB;AAAtB,kBACE,oBAAC,GAAD;AACE,IAAA,KAAK,EAAEb,YAAY,CAACc,KADtB;AAEE,IAAA,OAAO,EAAEd,YAAY,CAACe,aAFxB;AAGE,iBAAY,gBAAef,YAAY,CAACgB,IAAK,EAH/C;AAIE,kBAAYjB,WAAW,CAAC,YAAD,CAJzB;AAKE,IAAA,IAAI,EAAEC,YAAY,CAACgB;AALrB,IADF,CADW,GAUT,IAtBN,CAtBF,CADF,MADF;AAoDD,CA7DD;;AA+DApB,OAAO,CAACqB,SAAR,2CAAoB;AAClBnB,EAAAA,OAAO,EAAEX,SAAS,CAAC+B,MADD;AAElBnB,EAAAA,WAAW,EAAEZ,SAAS,CAACgC,KAAV,CAAgB;AAC3BL,IAAAA,KAAK,EAAE3B,SAAS,CAAC+B,MADU;AAE3BH,IAAAA,aAAa,EAAE5B,SAAS,CAACiC,IAFE;AAG3B,kBAAcjC,SAAS,CAAC+B,MAHG;AAI3BF,IAAAA,IAAI,EAAE7B,SAAS,CAAC+B;AAJW,GAAhB,CAFK;AAQlBlB,EAAAA,YAAY,EAAEb,SAAS,CAACgC,KAAV,CAAgB;AAC5BL,IAAAA,KAAK,EAAE3B,SAAS,CAAC+B,MADW;AAE5BH,IAAAA,aAAa,EAAE5B,SAAS,CAACiC,IAFG;AAG5BJ,IAAAA,IAAI,EAAE7B,SAAS,CAACkC,KAAV,CAAgB,CAAC,WAAD,EAAc,SAAd,CAAhB,CAHsB;AAI5B,kBAAclC,SAAS,CAAC+B;AAJI,GAAhB,CARI;AAclBjB,EAAAA,OAAO,EAAEd,SAAS,CAACiC,IAdD;AAelBlB,EAAAA,IAAI,EAAEf,SAAS,CAAC+B;AAfE,CAApB;AAkBA,eAAetB,OAAf","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"}
|
|
@@ -74,52 +74,10 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.button {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
border-radius: 7px;
|
|
80
|
-
transform: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.dangerousButton {
|
|
84
|
-
background-color: cm_negative_100;
|
|
85
|
-
color: white;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.coloredButton {
|
|
89
|
-
background-color: cm_primary_blue;
|
|
90
|
-
color: white;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.dangerousButton:hover {
|
|
94
|
-
background-color: cm_negative_200;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.coloredButton:hover {
|
|
98
|
-
background-color: cm_blue_600;
|
|
77
|
+
width: 160px;
|
|
78
|
+
padding: 8px;
|
|
99
79
|
}
|
|
100
80
|
|
|
101
|
-
.button::after,
|
|
102
|
-
.button:hover::after,
|
|
103
|
-
.button:focus::after,
|
|
104
|
-
.button:active::after {
|
|
105
|
-
transform: none;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.buttonContent {
|
|
110
|
-
width: 180px;
|
|
111
|
-
padding: 12px 24px;
|
|
112
|
-
line-height: 1.43;
|
|
113
|
-
font-size: 14px;
|
|
114
|
-
font-weight: bold;
|
|
115
|
-
display: block;
|
|
116
|
-
text-transform: inherit;
|
|
117
|
-
font-family: Gilroy;
|
|
118
|
-
text-align: center;
|
|
119
|
-
box-sizing: border-box;
|
|
120
|
-
border: none;
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
}
|
|
123
81
|
.icon {
|
|
124
82
|
width: 60px;
|
|
125
83
|
height: 60px;
|
|
@@ -4,11 +4,14 @@ export default {
|
|
|
4
4
|
icon: 'AlertDiamond',
|
|
5
5
|
firstButton: {
|
|
6
6
|
label: 'Cancel',
|
|
7
|
+
type: 'secondary',
|
|
8
|
+
'aria-label': 'Cancel this operation',
|
|
7
9
|
handleOnClick: () => {}
|
|
8
10
|
},
|
|
9
11
|
secondButton: {
|
|
10
12
|
label: 'Undo',
|
|
11
13
|
type: 'dangerous',
|
|
14
|
+
'aria-label': 'Undo this operation',
|
|
12
15
|
handleOnClick: () => {}
|
|
13
16
|
}
|
|
14
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","type","handleOnClick","secondButton"],"mappings":"AAAA,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,CAAf","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"}
|
|
@@ -4,12 +4,15 @@ export default {
|
|
|
4
4
|
icon: 'WindowUpload',
|
|
5
5
|
firstButton: {
|
|
6
6
|
label: 'Cancel',
|
|
7
|
-
|
|
7
|
+
type: 'secondary',
|
|
8
|
+
handleOnClick: () => {},
|
|
9
|
+
'aria-label': 'Cancel this operation'
|
|
8
10
|
},
|
|
9
11
|
secondButton: {
|
|
10
12
|
label: 'Undo',
|
|
11
|
-
type: '
|
|
12
|
-
handleOnClick: () => {}
|
|
13
|
+
type: 'primary',
|
|
14
|
+
handleOnClick: () => {},
|
|
15
|
+
'aria-label': 'Undo this operation'
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/default.js"],"names":["props","content","icon","firstButton","label","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/default.js"],"names":["props","content","icon","firstButton","label","type","handleOnClick","secondButton"],"mappings":"AAAA,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,CAAf","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"}
|
|
@@ -4,11 +4,14 @@ export default {
|
|
|
4
4
|
icon: 'AlertDiamond',
|
|
5
5
|
firstButton: {
|
|
6
6
|
label: 'Quit without saving',
|
|
7
|
+
type: 'secondary',
|
|
8
|
+
'aria-label': 'Quit this operation without saving',
|
|
7
9
|
handleOnClick: () => {}
|
|
8
10
|
},
|
|
9
11
|
secondButton: {
|
|
10
12
|
label: 'Save & Quit',
|
|
11
|
-
type: '
|
|
13
|
+
type: 'primary',
|
|
14
|
+
'aria-label': 'Save and quit',
|
|
12
15
|
handleOnClick: () => {}
|
|
13
16
|
},
|
|
14
17
|
onClose: () => console.log('onClose')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/warning-with-close.js"],"names":["props","content","icon","firstButton","label","
|
|
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":"AAAA,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,CAAf","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,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeCmPopin from '..';
|
|
5
|
+
import fixtureDangerous from './fixtures/dangerous';
|
|
6
|
+
import fixtureDefault from './fixtures/default';
|
|
7
|
+
import fixtureWarningWithClose from './fixtures/warning-with-close';
|
|
8
|
+
test('Molecule › MoleculeCmPopin > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(MoleculeCmPopin.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCmPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Molecule › MoleculeCmPopin › Dangerous › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDangerous);
|
|
15
|
+
test('Molecule › MoleculeCmPopin › Default › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDefault);
|
|
16
|
+
test('Molecule › MoleculeCmPopin › WarningWithClose › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureWarningWithClose);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cm-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCmPopin","fixtureDangerous","fixtureDefault","fixtureWarningWithClose","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AAEAN,IAAI,CAAC,0DAAD,EAA6DO,CAAC,IAAI;AACpEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,eAAe,CAACM,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,oDAAmDF,GAAI,mEAAhF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,eAAtF,EAAuGC,gBAAvG,CAAJ;AACAJ,IAAI,CAAC,2DAAD,EAA8DE,oBAA9D,EAAoFC,eAApF,EAAqGE,cAArG,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,eAA7F,EAA8GG,uBAA9G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCmPopin from '..';\nimport fixtureDangerous from './fixtures/dangerous';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWarningWithClose from './fixtures/warning-with-close';\n\ntest('Molecule › MoleculeCmPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCmPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCmPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCmPopin › Dangerous › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDangerous);\ntest('Molecule › MoleculeCmPopin › Default › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDefault);\ntest('Molecule › MoleculeCmPopin › WarningWithClose › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureWarningWithClose);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeCoorpManagerRoles from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
test('Molecule › MoleculeCoorpManagerRoles > should have valid propTypes', t => {
|
|
7
|
+
t.pass();
|
|
8
|
+
forEach(MoleculeCoorpManagerRoles.propTypes, (value, key) => {
|
|
9
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCoorpManagerRoles.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('Molecule › MoleculeCoorpManagerRoles › Default › should be rendered', renderComponentMacro, MoleculeCoorpManagerRoles, fixtureDefault);
|
|
13
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/coorp-manager-roles/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCoorpManagerRoles","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,yBAAP,MAAsC,IAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,oEAAD,EAAuEK,CAAC,IAAI;AAC9EA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,yBAAyB,CAACI,SAA3B,EAAsC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8DAA6DF,GAAI,mEAA1F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,yBAA9F,EAAyHC,cAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCoorpManagerRoles from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Molecule › MoleculeCoorpManagerRoles > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCoorpManagerRoles.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCoorpManagerRoles.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCoorpManagerRoles › Default › should be rendered', renderComponentMacro, MoleculeCoorpManagerRoles, fixtureDefault);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeQuickAccessCard from '..';
|
|
5
|
+
import fixtureAnalytics from './fixtures/analytics';
|
|
6
|
+
import fixtureDefault from './fixtures/default';
|
|
7
|
+
import fixtureLookAndFeel from './fixtures/look-and-feel';
|
|
8
|
+
import fixtureMassiveBattle from './fixtures/massive-battle';
|
|
9
|
+
import fixtureUploadUsers from './fixtures/upload-users';
|
|
10
|
+
test('Molecule › MoleculeQuickAccessCard > should have valid propTypes', t => {
|
|
11
|
+
t.pass();
|
|
12
|
+
forEach(MoleculeQuickAccessCard.propTypes, (value, key) => {
|
|
13
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeQuickAccessCard.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
test('Molecule › MoleculeQuickAccessCard › Analytics › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureAnalytics);
|
|
17
|
+
test('Molecule › MoleculeQuickAccessCard › Default › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureDefault);
|
|
18
|
+
test('Molecule › MoleculeQuickAccessCard › LookAndFeel › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureLookAndFeel);
|
|
19
|
+
test('Molecule › MoleculeQuickAccessCard › MassiveBattle › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureMassiveBattle);
|
|
20
|
+
test('Molecule › MoleculeQuickAccessCard › UploadUsers › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureUploadUsers);
|
|
21
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/quick-access-card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuickAccessCard","fixtureAnalytics","fixtureDefault","fixtureLookAndFeel","fixtureMassiveBattle","fixtureUploadUsers","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,uBAAP,MAAoC,IAApC;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,kBAAP,MAA+B,0BAA/B;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AAEAR,IAAI,CAAC,kEAAD,EAAqES,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,uBAAuB,CAACQ,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,uBAA9F,EAAuHC,gBAAvH,CAAJ;AACAJ,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,uBAA5F,EAAqHE,cAArH,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,uBAAhG,EAAyHG,kBAAzH,CAAJ;AACAN,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,uBAAlG,EAA2HI,oBAA3H,CAAJ;AACAP,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,uBAAhG,EAAyHK,kBAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeQuickAccessCard from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLookAndFeel from './fixtures/look-and-feel';\nimport fixtureMassiveBattle from './fixtures/massive-battle';\nimport fixtureUploadUsers from './fixtures/upload-users';\n\ntest('Molecule › MoleculeQuickAccessCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuickAccessCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeQuickAccessCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeQuickAccessCard › Analytics › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureAnalytics);\ntest('Molecule › MoleculeQuickAccessCard › Default › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureDefault);\ntest('Molecule › MoleculeQuickAccessCard › LookAndFeel › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureLookAndFeel);\ntest('Molecule › MoleculeQuickAccessCard › MassiveBattle › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureMassiveBattle);\ntest('Molecule › MoleculeQuickAccessCard › UploadUsers › should be rendered', renderComponentMacro, MoleculeQuickAccessCard, fixtureUploadUsers);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeQuickAccessCardsGroup from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureLoading from './fixtures/loading';
|
|
7
|
+
import fixtureOneCard from './fixtures/one-card';
|
|
8
|
+
import fixtureThreeCards from './fixtures/three-cards';
|
|
9
|
+
import fixtureTwoCards from './fixtures/two-cards';
|
|
10
|
+
test('Molecule › MoleculeQuickAccessCardsGroup > should have valid propTypes', t => {
|
|
11
|
+
t.pass();
|
|
12
|
+
forEach(MoleculeQuickAccessCardsGroup.propTypes, (value, key) => {
|
|
13
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeQuickAccessCardsGroup.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
test('Molecule › MoleculeQuickAccessCardsGroup › Default › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureDefault);
|
|
17
|
+
test('Molecule › MoleculeQuickAccessCardsGroup › Loading › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureLoading);
|
|
18
|
+
test('Molecule › MoleculeQuickAccessCardsGroup › OneCard › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureOneCard);
|
|
19
|
+
test('Molecule › MoleculeQuickAccessCardsGroup › ThreeCards › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureThreeCards);
|
|
20
|
+
test('Molecule › MoleculeQuickAccessCardsGroup › TwoCards › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureTwoCards);
|
|
21
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/quick-access-cards-group/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuickAccessCardsGroup","fixtureDefault","fixtureLoading","fixtureOneCard","fixtureThreeCards","fixtureTwoCards","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AAEAR,IAAI,CAAC,wEAAD,EAA2ES,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,6BAA6B,CAACQ,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,6BAAlG,EAAiIC,cAAjI,CAAJ;AACAJ,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,6BAAlG,EAAiIE,cAAjI,CAAJ;AACAL,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,6BAAlG,EAAiIG,cAAjI,CAAJ;AACAN,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,6BAArG,EAAoII,iBAApI,CAAJ;AACAP,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,6BAAnG,EAAkIK,eAAlI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeQuickAccessCardsGroup from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureOneCard from './fixtures/one-card';\nimport fixtureThreeCards from './fixtures/three-cards';\nimport fixtureTwoCards from './fixtures/two-cards';\n\ntest('Molecule › MoleculeQuickAccessCardsGroup > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuickAccessCardsGroup.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeQuickAccessCardsGroup.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeQuickAccessCardsGroup › Default › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureDefault);\ntest('Molecule › MoleculeQuickAccessCardsGroup › Loading › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureLoading);\ntest('Molecule › MoleculeQuickAccessCardsGroup › OneCard › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureOneCard);\ntest('Molecule › MoleculeQuickAccessCardsGroup › ThreeCards › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureThreeCards);\ntest('Molecule › MoleculeQuickAccessCardsGroup › TwoCards › should be rendered', renderComponentMacro, MoleculeQuickAccessCardsGroup, fixtureTwoCards);\n"],"file":"fixtures.js"}
|
|
@@ -5,7 +5,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
5
5
|
import React, { useMemo } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { NovaCompositionNavigationMore as ClearIcon } from '@coorpacademy/nova-icons';
|
|
8
|
-
import Search from '
|
|
8
|
+
import Search from '../../atom/input-search';
|
|
9
9
|
import style from './style.css';
|
|
10
10
|
|
|
11
11
|
const SearchForm = (props, context) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/search-form/index.js"],"names":["React","useMemo","PropTypes","NovaCompositionNavigationMore","ClearIcon","Search","style","SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","handleSubmit","evt","preventDefault","skin","dark","form","value","wrapperClear","wrapperNoClear","clear","propTypes","string","func","shape"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,6BAA6B,IAAIC,SAAzC,QAAyD,0BAAzD;AACA,OAAOC,MAAP,MAAmB,
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/search-form/index.js"],"names":["React","useMemo","PropTypes","NovaCompositionNavigationMore","ClearIcon","Search","style","SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","handleSubmit","evt","preventDefault","skin","dark","form","value","wrapperClear","wrapperNoClear","clear","propTypes","string","func","shape"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,6BAA6B,IAAIC,SAAzC,QAAyD,0BAAzD;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,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,GAAGhB,OAAO,CAC1B,MAAMiB,GAAG,IAAI;AACXA,IAAAA,GAAG,CAACC,cAAJ;AACA,WAAOP,QAAQ,IAAIA,QAAQ,CAACM,GAAD,CAA3B;AACD,GAJyB,EAK1B,CAACN,QAAD,CAL0B,CAA5B;AAOA,QAAM;AAACQ,IAAAA;AAAD,MAASX,OAAf;;AACA,QAAMY,IAAI,GAAG,KAAI,aAAJ,EAAmBD,IAAnB,CAAb;;AAEA,sBACE;AACE,IAAA,SAAS,EAAEd,KAAK,CAACgB,IADnB;AAEE,IAAA,MAAM,EAAEZ,MAFV;AAGE,IAAA,MAAM,EAAEC,MAHV;AAIE,IAAA,QAAQ,EAAEM,YAJZ;AAKE,iBAAU;AALZ,kBAOE,oBAAC,MAAD,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,CAACS,KAAP,GAAejB,KAAK,CAACkB,YAArB,GAAoClB,KAAK,CAACmB;AAHvD,kBAKE,oBAAC,SAAD;AAAW,IAAA,KAAK,EAAEJ,IAAlB;AAAwB,IAAA,SAAS,EAAEf,KAAK,CAACoB;AAAzC,IALF,CARF,CADF;AAkBD,CA9BD;;AAgCAnB,UAAU,CAACoB,SAAX,2CAAuB;AACrBjB,EAAAA,MAAM,EAAER,SAAS,CAAC0B,MADG;AAErBjB,EAAAA,MAAM,EAAET,SAAS,CAAC0B,MAFG;AAGrBhB,EAAAA,QAAQ,EAAEV,SAAS,CAAC2B,IAHC;AAIrBhB,EAAAA,OAAO,EAAEX,SAAS,CAAC2B,IAJE;AAKrBd,EAAAA,aAAa,EAAEb,SAAS,CAAC2B,IALJ;AAMrBb,EAAAA,YAAY,EAAEd,SAAS,CAAC2B,IANH;AAOrBf,EAAAA,MAAM,EAAEZ,SAAS,CAAC4B,KAAV,CAAgBzB,MAAM,CAACsB,SAAvB;AAPa,CAAvB;AAUA,eAAepB,UAAf","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"}
|
|
@@ -7,9 +7,7 @@ import _map from "lodash/fp/map";
|
|
|
7
7
|
|
|
8
8
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import React from 'react';
|
|
10
|
+
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
13
11
|
import PropTypes from 'prop-types';
|
|
14
12
|
import classnames from 'classnames';
|
|
15
13
|
import { NovaCompositionNavigationArrowDown as ArrowDown } from '@coorpacademy/nova-icons';
|
|
@@ -22,155 +20,124 @@ const themeStyle = {
|
|
|
22
20
|
cockpit: style.cockpit,
|
|
23
21
|
sidebar: style.sidebar
|
|
24
22
|
};
|
|
23
|
+
export const useChoices = options => {
|
|
24
|
+
const choicesRef = useRef(options);
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_defineProperty(this, "handleOnClick", e => {
|
|
31
|
-
const {
|
|
32
|
-
opened
|
|
33
|
-
} = this.state;
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
e.stopPropagation();
|
|
36
|
-
this.setState({
|
|
37
|
-
opened: !opened
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
_defineProperty(this, "closeHandle", e => {
|
|
42
|
-
if (this.node && !this.node.contains(e.target)) {
|
|
43
|
-
this.setState({
|
|
44
|
-
opened: false
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
_defineProperty(this, "handleChange", choice => {
|
|
50
|
-
const {
|
|
51
|
-
multiple,
|
|
52
|
-
onChange
|
|
53
|
-
} = this.props; // if multiple prop is turned on
|
|
54
|
-
// we return all selected choices
|
|
55
|
-
|
|
56
|
-
if (multiple) {
|
|
57
|
-
this.choices = choice;
|
|
58
|
-
return onChange(this.choices);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return onChange(choice);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
this.state = {
|
|
65
|
-
opened: false
|
|
66
|
-
};
|
|
67
|
-
this.node = null;
|
|
26
|
+
const getChoices = () => {
|
|
27
|
+
return choicesRef.current;
|
|
28
|
+
};
|
|
68
29
|
|
|
69
|
-
|
|
70
|
-
|
|
30
|
+
const setChoices = choice => {
|
|
31
|
+
const choices = _set(`[${choice.i}].selected`, !choice.selected, getChoices());
|
|
71
32
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
document.addEventListener('click', this.closeHandle);
|
|
75
|
-
document.addEventListener('touchstart', this.closeHandle);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
33
|
+
choicesRef.current = choices.filter(c => c.selected);
|
|
34
|
+
};
|
|
78
35
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
36
|
+
return [getChoices, setChoices];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const SelectMultiple = ({
|
|
40
|
+
title,
|
|
41
|
+
options,
|
|
42
|
+
theme,
|
|
43
|
+
placeholder,
|
|
44
|
+
description,
|
|
45
|
+
multiple,
|
|
46
|
+
onChange,
|
|
47
|
+
modified = false,
|
|
48
|
+
required = false,
|
|
49
|
+
error = false
|
|
50
|
+
}, {
|
|
51
|
+
skin
|
|
52
|
+
}) => {
|
|
53
|
+
const [isOpened, updateIsOpened] = useState(false);
|
|
54
|
+
const [getChoices, setChoices] = useChoices(options);
|
|
55
|
+
const nodeRef = useRef(null);
|
|
56
|
+
|
|
57
|
+
const defaultColor = _get('common.primary', skin);
|
|
58
|
+
|
|
59
|
+
const black = _get('common.black', skin);
|
|
60
|
+
|
|
61
|
+
const handleOnClick = useCallback(e => {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
updateIsOpened(prev => !prev);
|
|
65
|
+
}, []);
|
|
66
|
+
const closeHandle = useCallback(e => {
|
|
67
|
+
if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {
|
|
68
|
+
updateIsOpened(false);
|
|
83
69
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
className: style.select,
|
|
152
|
-
title: selection || placeholder,
|
|
153
|
-
onClick: this.handleOnClick
|
|
154
|
-
}, selection || placeholder, /*#__PURE__*/React.createElement(ArrowDown, {
|
|
155
|
-
color: black,
|
|
156
|
-
className: classnames(style.arrow, {
|
|
157
|
-
[style.down]: isActive
|
|
158
|
-
})
|
|
159
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
160
|
-
className: isActive ? style.activeChoices : style.choices
|
|
161
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
162
|
-
className: style.list
|
|
163
|
-
}, lines))), /*#__PURE__*/React.createElement("div", {
|
|
164
|
-
className: style.description
|
|
165
|
-
}, description));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
_defineProperty(SelectMultiple, "contextTypes", {
|
|
171
|
-
skin: Provider.childContextTypes.skin
|
|
172
|
-
});
|
|
70
|
+
}, []);
|
|
71
|
+
const handleChange = useCallback(choice => {
|
|
72
|
+
// if multiple prop is turned on
|
|
73
|
+
// we return all selected choices
|
|
74
|
+
if (multiple) {
|
|
75
|
+
setChoices(choice);
|
|
76
|
+
return onChange(getChoices());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return onChange(choice);
|
|
80
|
+
}, [setChoices, multiple, onChange]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
document.addEventListener('click', closeHandle);
|
|
83
|
+
document.addEventListener('touchstart', closeHandle);
|
|
84
|
+
return () => {
|
|
85
|
+
document.removeEventListener('click', closeHandle);
|
|
86
|
+
document.removeEventListener('touchstart', closeHandle);
|
|
87
|
+
};
|
|
88
|
+
}, [closeHandle]);
|
|
89
|
+
|
|
90
|
+
const lines = _map.convert({
|
|
91
|
+
cap: false
|
|
92
|
+
})((choice, i) => {
|
|
93
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
94
|
+
key: i,
|
|
95
|
+
className: style.choice
|
|
96
|
+
}, /*#__PURE__*/React.createElement(TitledCheckbox, {
|
|
97
|
+
onToggle: handleChange,
|
|
98
|
+
choice: _extends(_extends({}, choice), {}, {
|
|
99
|
+
i
|
|
100
|
+
}),
|
|
101
|
+
background: defaultColor
|
|
102
|
+
}));
|
|
103
|
+
}, options);
|
|
104
|
+
|
|
105
|
+
const selection = _pipe(_filter({
|
|
106
|
+
selected: true
|
|
107
|
+
}), _map('name'), _join(', '))(options);
|
|
108
|
+
|
|
109
|
+
const _title = title && `${title}${required ? ' *' : ''}`;
|
|
110
|
+
|
|
111
|
+
const titleView = title ? /*#__PURE__*/React.createElement("span", {
|
|
112
|
+
className: style.title
|
|
113
|
+
}, _title, " ") : null;
|
|
114
|
+
const isActive = isOpened === true;
|
|
115
|
+
const mainClass = theme ? themeStyle[theme] : style.default;
|
|
116
|
+
const behaviourClassName = getClassState(style.default, style.modified, style.error, modified, error);
|
|
117
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
className: classnames(mainClass, behaviourClassName),
|
|
119
|
+
ref: nodeRef
|
|
120
|
+
}, /*#__PURE__*/React.createElement("label", null, titleView, /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: style.select,
|
|
122
|
+
title: selection || placeholder,
|
|
123
|
+
onClick: handleOnClick
|
|
124
|
+
}, selection || placeholder, /*#__PURE__*/React.createElement(ArrowDown, {
|
|
125
|
+
color: black,
|
|
126
|
+
className: classnames(style.arrow, {
|
|
127
|
+
[style.down]: isActive
|
|
128
|
+
})
|
|
129
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: isActive ? style.activeChoices : style.choices
|
|
131
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
132
|
+
className: style.list
|
|
133
|
+
}, lines))), /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: style.description
|
|
135
|
+
}, description));
|
|
136
|
+
};
|
|
173
137
|
|
|
138
|
+
SelectMultiple.contextTypes = {
|
|
139
|
+
skin: Provider.childContextTypes.skin
|
|
140
|
+
};
|
|
174
141
|
SelectMultiple.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
175
142
|
title: PropTypes.string,
|
|
176
143
|
placeholder: PropTypes.string,
|