@coorpacademy/components 10.13.1 → 10.13.3-alpha.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-link/test/fixtures.js +31 -0
- package/es/atom/button-link/test/fixtures.js.map +1 -0
- package/es/atom/button-link-icon-only/test/fixtures.js +21 -0
- package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -0
- package/es/atom/button-menu/test/fixtures.js +15 -0
- package/es/atom/button-menu/test/fixtures.js.map +1 -0
- package/es/atom/card-image-preview/test/fixtures.js +15 -0
- package/es/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
- package/es/atom/checkbox-with-title/test/fixtures.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 +29 -0
- package/es/atom/content-badge/test/fixtures.js.map +1 -0
- package/es/atom/drag-and-drop/index.js +40 -36
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +110 -75
- package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js +9 -0
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures.js +2 -0
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/empty-search-result/test/fixtures.js +13 -0
- package/es/atom/empty-search-result/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/test/fixtures.js +19 -0
- package/es/atom/input-search/test/fixtures.js.map +1 -0
- package/es/atom/input-switch/test/fixtures.js +10 -0
- package/es/atom/input-switch/test/fixtures.js.map +1 -1
- 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-text-with-title/index.js +35 -0
- package/es/atom/input-text-with-title/index.js.map +1 -0
- package/es/atom/input-text-with-title/style.css +24 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js +12 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js +13 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures.js +15 -0
- package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/es/atom/input-textarea/test/fixtures.js +4 -0
- package/es/atom/input-textarea/test/fixtures.js.map +1 -1
- package/es/atom/loader/style.css +7 -3
- package/es/atom/loader/test/fixtures.js +2 -0
- package/es/atom/loader/test/fixtures.js.map +1 -1
- package/es/atom/review-header-step-item/test/fixtures.js +19 -0
- package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/es/atom/select/test/fixtures.js +4 -0
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/atom/tag/test/fixtures.js +21 -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/test/fixtures.js +23 -0
- package/es/molecule/banner/test/fixtures.js.map +1 -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/bullet-point-menu-button/test/fixtures.js +15 -0
- package/es/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/es/molecule/card/test/fixtures.js +6 -0
- package/es/molecule/card/test/fixtures.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/course-section/test/fixtures.js +15 -0
- package/es/molecule/course-section/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/index.js +20 -4
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +17 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +11 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +17 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/draggable/test/fixtures.js +13 -0
- package/es/molecule/draggable/test/fixtures.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures.js +15 -0
- package/es/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/es/molecule/popin/test/fixtures.js +21 -0
- package/es/molecule/popin/test/fixtures.js.map +1 -0
- package/es/molecule/questions/free-text/test/fixtures.js +4 -2
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- 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/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures.js +23 -0
- package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/es/molecule/select-multiple/test/fixtures.js +8 -0
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/molecule/vertical-tabs/test/fixtures.js +17 -0
- package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures.js +23 -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-analytics/test/fixtures.js +23 -0
- package/es/organism/brand-analytics/test/fixtures.js.map +1 -0
- package/es/organism/brand-dashboard/test/fixtures.js +2 -10
- package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures.js +2 -0
- package/es/organism/brand-form/test/fixtures.js.map +1 -1
- package/es/organism/content-translation/test/fixtures.js +15 -0
- package/es/organism/content-translation/test/fixtures.js.map +1 -0
- package/es/organism/course-selection/index.js +2 -1
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +12 -3
- package/es/organism/course-selection/test/fixtures/loading.js +9 -0
- package/es/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +25 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -0
- package/es/organism/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/list-items/test/fixtures.js +17 -0
- package/es/organism/list-items/test/fixtures.js.map +1 -0
- package/es/organism/playlist-translation/test/fixtures.js +15 -0
- package/es/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/es/organism/search-and-chips-results/index.js +2 -1
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +10 -3
- package/es/organism/search-and-chips-results/test/fixtures/loading.js +9 -0
- package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures.js +23 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +23 -0
- package/es/organism/wizard-contents/test/fixtures.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-update/index.js +5 -2
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +10 -1
- package/es/template/back-office/brand-update/test/fixtures.js +24 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/button-link/test/fixtures.js +49 -0
- package/lib/atom/button-link/test/fixtures.js.map +1 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js +34 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -0
- package/lib/atom/button-menu/test/fixtures.js +25 -0
- package/lib/atom/button-menu/test/fixtures.js.map +1 -0
- package/lib/atom/card-image-preview/test/fixtures.js +25 -0
- package/lib/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js +25 -0
- package/lib/atom/checkbox-with-title/test/fixtures.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 +46 -0
- package/lib/atom/content-badge/test/fixtures.js.map +1 -0
- package/lib/atom/drag-and-drop/index.js +41 -34
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +110 -75
- package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js +18 -0
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures.js +3 -0
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/empty-search-result/test/fixtures.js +22 -0
- package/lib/atom/empty-search-result/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/atom/input-search/test/fixtures.js +31 -0
- package/lib/atom/input-search/test/fixtures.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures.js +15 -0
- package/lib/atom/input-switch/test/fixtures.js.map +1 -1
- 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-text-with-title/index.js +46 -0
- package/lib/atom/input-text-with-title/index.js.map +1 -0
- package/lib/atom/input-text-with-title/style.css +24 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js +21 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js +22 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
- package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/input-textarea/test/fixtures.js +6 -0
- package/lib/atom/input-textarea/test/fixtures.js.map +1 -1
- package/lib/atom/loader/style.css +7 -3
- package/lib/atom/loader/test/fixtures.js +3 -0
- package/lib/atom/loader/test/fixtures.js.map +1 -1
- package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
- package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/lib/atom/select/test/fixtures.js +6 -0
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/atom/tag/test/fixtures.js +34 -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/test/fixtures.js +37 -0
- package/lib/molecule/banner/test/fixtures.js.map +1 -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/bullet-point-menu-button/test/fixtures.js +25 -0
- package/lib/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/lib/molecule/card/test/fixtures.js +9 -0
- package/lib/molecule/card/test/fixtures.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/course-section/test/fixtures.js +25 -0
- package/lib/molecule/course-section/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/index.js +21 -4
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +17 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +21 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +28 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable/test/fixtures.js +22 -0
- package/lib/molecule/draggable/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures.js +25 -0
- package/lib/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/lib/molecule/popin/test/fixtures.js +34 -0
- package/lib/molecule/popin/test/fixtures.js.map +1 -0
- package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- 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/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
- package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/lib/molecule/select-multiple/test/fixtures.js +12 -0
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/molecule/vertical-tabs/test/fixtures.js +28 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures.js +37 -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-analytics/test/fixtures.js +37 -0
- package/lib/organism/brand-analytics/test/fixtures.js.map +1 -0
- package/lib/organism/brand-dashboard/test/fixtures.js +2 -14
- package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures.js +3 -0
- package/lib/organism/brand-form/test/fixtures.js.map +1 -1
- package/lib/organism/content-translation/test/fixtures.js +25 -0
- package/lib/organism/content-translation/test/fixtures.js.map +1 -0
- package/lib/organism/course-selection/index.js +2 -1
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +12 -3
- package/lib/organism/course-selection/test/fixtures/loading.js +19 -0
- package/lib/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +40 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -0
- package/lib/organism/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/test/fixtures.js +28 -0
- package/lib/organism/list-items/test/fixtures.js.map +1 -0
- package/lib/organism/playlist-translation/test/fixtures.js +25 -0
- package/lib/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/lib/organism/search-and-chips-results/index.js +2 -1
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +10 -3
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js +19 -0
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js +37 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +2 -2
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +37 -0
- package/lib/organism/wizard-contents/test/fixtures.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-update/index.js +5 -2
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +10 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +35 -2
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/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
|
@@ -0,0 +1,46 @@
|
|
|
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 _advanced = _interopRequireDefault(require("./fixtures/advanced"));
|
|
12
|
+
|
|
13
|
+
var _article = _interopRequireDefault(require("./fixtures/article"));
|
|
14
|
+
|
|
15
|
+
var _chapter = _interopRequireDefault(require("./fixtures/chapter"));
|
|
16
|
+
|
|
17
|
+
var _coach = _interopRequireDefault(require("./fixtures/coach"));
|
|
18
|
+
|
|
19
|
+
var _course = _interopRequireDefault(require("./fixtures/course"));
|
|
20
|
+
|
|
21
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
22
|
+
|
|
23
|
+
var _podcast = _interopRequireDefault(require("./fixtures/podcast"));
|
|
24
|
+
|
|
25
|
+
var _scorm = _interopRequireDefault(require("./fixtures/scorm"));
|
|
26
|
+
|
|
27
|
+
var _video = _interopRequireDefault(require("./fixtures/video"));
|
|
28
|
+
|
|
29
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
+
|
|
31
|
+
(0, _ava.default)('Atom › AtomContentBadge > should have valid propTypes', t => {
|
|
32
|
+
t.pass();
|
|
33
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
34
|
+
t.not(value, undefined, `PropType for "Atom.AtomContentBadge.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
(0, _ava.default)('Atom › AtomContentBadge › Advanced › should be rendered', _renderComponent.default, _.default, _advanced.default);
|
|
38
|
+
(0, _ava.default)('Atom › AtomContentBadge › Article › should be rendered', _renderComponent.default, _.default, _article.default);
|
|
39
|
+
(0, _ava.default)('Atom › AtomContentBadge › Chapter › should be rendered', _renderComponent.default, _.default, _chapter.default);
|
|
40
|
+
(0, _ava.default)('Atom › AtomContentBadge › Coach › should be rendered', _renderComponent.default, _.default, _coach.default);
|
|
41
|
+
(0, _ava.default)('Atom › AtomContentBadge › Course › should be rendered', _renderComponent.default, _.default, _course.default);
|
|
42
|
+
(0, _ava.default)('Atom › AtomContentBadge › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
43
|
+
(0, _ava.default)('Atom › AtomContentBadge › Podcast › should be rendered', _renderComponent.default, _.default, _podcast.default);
|
|
44
|
+
(0, _ava.default)('Atom › AtomContentBadge › Scorm › should be rendered', _renderComponent.default, _.default, _scorm.default);
|
|
45
|
+
(0, _ava.default)('Atom › AtomContentBadge › Video › should be rendered', _renderComponent.default, _.default, _video.default);
|
|
46
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["t","pass","AtomContentBadge","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureCourse","fixtureDefault","fixturePodcast","fixtureScorm","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,yDAAL,EAAgEG,wBAAhE,EAAsFN,SAAtF,EAAwGO,iBAAxG;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAuGQ,gBAAvG;AACA,kBAAK,wDAAL,EAA+DF,wBAA/D,EAAqFN,SAArF,EAAuGS,gBAAvG;AACA,kBAAK,sDAAL,EAA6DH,wBAA7D,EAAmFN,SAAnF,EAAqGU,cAArG;AACA,kBAAK,uDAAL,EAA8DJ,wBAA9D,EAAoFN,SAApF,EAAsGW,eAAtG;AACA,kBAAK,wDAAL,EAA+DL,wBAA/D,EAAqFN,SAArF,EAAuGY,gBAAvG;AACA,kBAAK,wDAAL,EAA+DN,wBAA/D,EAAqFN,SAArF,EAAuGa,gBAAvG;AACA,kBAAK,sDAAL,EAA6DP,wBAA7D,EAAmFN,SAAnF,EAAqGc,cAArG;AACA,kBAAK,sDAAL,EAA6DR,wBAA7D,EAAmFN,SAAnF,EAAqGe,cAArG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomContentBadge from '..';\nimport fixtureAdvanced from './fixtures/advanced';\nimport fixtureArticle from './fixtures/article';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoach from './fixtures/coach';\nimport fixtureCourse from './fixtures/course';\nimport fixtureDefault from './fixtures/default';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureVideo from './fixtures/video';\n\ntest('Atom › AtomContentBadge > should have valid propTypes', t => {\n t.pass();\n forEach(AtomContentBadge.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomContentBadge.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);\ntest('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);\ntest('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);\ntest('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);\ntest('Atom › AtomContentBadge › Course › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCourse);\ntest('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);\ntest('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);\ntest('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);\ntest('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);\n"],"file":"fixtures.js"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _constant2 = _interopRequireDefault(require("lodash/fp/constant"));
|
|
9
9
|
|
|
10
10
|
var _uniqueId2 = _interopRequireDefault(require("lodash/fp/uniqueId"));
|
|
11
11
|
|
|
@@ -21,9 +21,9 @@ var _loader = _interopRequireDefault(require("../loader"));
|
|
|
21
21
|
|
|
22
22
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
var _buttonLink = _interopRequireDefault(require("../button-link"));
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
28
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
29
|
|
|
@@ -52,10 +52,6 @@ class DragAndDrop extends _react.default.Component {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
render() {
|
|
55
|
-
const {
|
|
56
|
-
skin
|
|
57
|
-
} = this.context;
|
|
58
|
-
const brandColor = (0, _get2.default)('common.brand', skin);
|
|
59
55
|
const idBox = (0, _uniqueId2.default)('drop-box-');
|
|
60
56
|
const {
|
|
61
57
|
children = constantNull,
|
|
@@ -75,25 +71,36 @@ class DragAndDrop extends _react.default.Component {
|
|
|
75
71
|
|
|
76
72
|
if (previewContent && previewContent.type === 'image') {
|
|
77
73
|
previewView = /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: _style.default.
|
|
74
|
+
className: _style.default.preview
|
|
79
75
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
80
76
|
src: previewContent.src
|
|
81
77
|
}));
|
|
82
78
|
} else if (previewContent && previewContent.type === 'video') {
|
|
83
79
|
previewView = /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
-
className:
|
|
85
|
-
width: '300px'
|
|
86
|
-
})
|
|
80
|
+
className: _style.default.preview
|
|
87
81
|
}, /*#__PURE__*/_react.default.createElement("video", {
|
|
88
|
-
width: "100%",
|
|
89
82
|
controls: true,
|
|
90
83
|
src: previewContent.src,
|
|
91
84
|
type: "video/*"
|
|
92
85
|
}));
|
|
93
86
|
} else if (loading) {
|
|
94
87
|
previewView = /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
-
className: _style.default.
|
|
96
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
88
|
+
className: _style.default.loaderWrapper
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
className: _style.default.loadingCancel
|
|
91
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaLineStatusClose, {
|
|
92
|
+
"data-name": "reset-content-icon",
|
|
93
|
+
height: 16,
|
|
94
|
+
width: 16,
|
|
95
|
+
className: _style.default.closeIcon,
|
|
96
|
+
onClick: onReset
|
|
97
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
+
className: _style.default.loader
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
100
|
+
theme: "coorpmanager"
|
|
101
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
102
|
+
className: _style.default.loaderText
|
|
103
|
+
}, "Uploading"));
|
|
97
104
|
} else {
|
|
98
105
|
previewView = /*#__PURE__*/_react.default.createElement("span", null, previewLabel);
|
|
99
106
|
}
|
|
@@ -109,30 +116,30 @@ class DragAndDrop extends _react.default.Component {
|
|
|
109
116
|
className: _style.default.closeIcon,
|
|
110
117
|
onClick: onReset
|
|
111
118
|
})) : null;
|
|
119
|
+
const buttonProps = {
|
|
120
|
+
label: uploadLabel,
|
|
121
|
+
'aria-label': 'aria button',
|
|
122
|
+
'data-name': 'default-button',
|
|
123
|
+
icon: {
|
|
124
|
+
position: 'left',
|
|
125
|
+
type: 'folders'
|
|
126
|
+
}
|
|
127
|
+
};
|
|
112
128
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
113
129
|
className: _style.default.wrapper,
|
|
114
130
|
"data-name": "drag-and-drop-wrapper"
|
|
115
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
116
|
-
className: _style.default.
|
|
117
|
-
},
|
|
118
|
-
className: modified ? _style.default.modified : _style.default.previewWrapper
|
|
119
|
-
}, previewView), /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
+
}, !(0, _isEmpty2.default)(previewContent) || modified || loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
132
|
+
className: _style.default.modificationsContainer
|
|
133
|
+
}, previewView) : /*#__PURE__*/_react.default.createElement("div", {
|
|
120
134
|
className: dragging ? _style.default.dragging : _style.default.inputWrapper,
|
|
121
135
|
id: idBox
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement(_novaIcons.
|
|
123
|
-
className: _style.default.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/*#__PURE__*/
|
|
129
|
-
// eslint-disable-next-line react/no-danger
|
|
130
|
-
_react.default.createElement("div", {
|
|
131
|
-
className: _style.default.description,
|
|
132
|
-
dangerouslySetInnerHTML: {
|
|
133
|
-
__html: description
|
|
134
|
-
}
|
|
135
|
-
}) : null);
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidFilesBasicFileUpload2, {
|
|
137
|
+
className: _style.default.icon
|
|
138
|
+
}), description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
+
className: _style.default.description
|
|
140
|
+
}, description) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: _style.default.title
|
|
142
|
+
}, title), dragging ? null : /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonProps), children(this.handleDragStart, this.handleDragStop)), resetContent);
|
|
136
143
|
}
|
|
137
144
|
|
|
138
145
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["constantNull","DragAndDrop","React","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["constantNull","DragAndDrop","React","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","idBox","children","title","description","uploadLabel","previewLabel","previewContent","loading","modified","onReset","previewView","type","style","preview","src","loaderWrapper","loadingCancel","closeIcon","loader","loaderText","resetContent","resetUploadWrapper","resetSrcLabel","buttonProps","label","icon","position","wrapper","modificationsContainer","inputWrapper","skin","Provider","childContextTypes","propTypes","PropTypes","string","shape","bool","func"],"mappings":"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","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {uniqueId, get, constant, isEmpty} from 'lodash/fp';\nimport {\n NovaLineStatusClose as Close,\n NovaSolidFilesBasicFileUpload2 as FileUploadIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport Loader from '../loader';\nimport style from './style.css';\nimport Button from '../button-link';\n\nconst constantNull = constant(null);\n\nclass DragAndDrop extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n uploadLabel: PropTypes.string,\n previewLabel: PropTypes.string,\n previewContent: PropTypes.shape({\n type: PropTypes.string,\n src: PropTypes.string\n }),\n loading: PropTypes.bool,\n modified: PropTypes.bool,\n children: PropTypes.func,\n onReset: PropTypes.func\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n dragging: false\n };\n\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragStop = this.handleDragStop.bind(this);\n }\n\n handleDragStart() {\n this.setState({\n dragging: true\n });\n }\n\n handleDragStop() {\n this.setState({\n dragging: false\n });\n }\n\n render() {\n const idBox = uniqueId('drop-box-');\n const {\n children = constantNull,\n title,\n description,\n uploadLabel,\n previewLabel = '',\n previewContent,\n loading = false,\n modified = false,\n onReset = null\n } = this.props;\n const {dragging} = this.state;\n\n let previewView = null;\n\n if (previewContent && previewContent.type === 'image') {\n previewView = (\n <div className={style.preview}>\n <img src={previewContent.src} />\n </div>\n );\n } else if (previewContent && previewContent.type === 'video') {\n previewView = (\n <div className={style.preview}>\n <video controls src={previewContent.src} type=\"video/*\" />\n </div>\n );\n } else if (loading) {\n previewView = (\n <div className={style.loaderWrapper}>\n <div className={style.loadingCancel}>\n <Close\n data-name=\"reset-content-icon\"\n height={16}\n width={16}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n <div className={style.loader}>\n <Loader theme='coorpmanager'/>\n </div>\n <span className={style.loaderText}>Uploading</span>\n </div>\n );\n } else {\n previewView = <span>{previewLabel}</span>;\n }\n\n const resetContent =\n previewContent && previewContent.src && onReset ? (\n <div className={style.resetUploadWrapper}>\n <div className={style.resetSrcLabel}>{previewContent.src}</div>\n <Close\n data-name=\"reset-content-icon\"\n height={16}\n width={16}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n ) : null;\n\n const buttonProps = {\n label: uploadLabel,\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'folders'\n },\n }\n\n return (\n <div className={style.wrapper} data-name=\"drag-and-drop-wrapper\">\n {!isEmpty(previewContent) || modified || loading ? \n <div className={style.modificationsContainer}>{previewView}</div> \n : \n <div className={dragging ? style.dragging : style.inputWrapper} id={idBox}>\n <FileUploadIcon className={style.icon} />\n {description ? (\n <div className={style.description}>{description}</div>\n ) : null}\n <div className={style.title}>{title}</div>\n {dragging ? null : <Button {...buttonProps} />}\n {children(this.handleDragStart, this.handleDragStop)}\n </div>\n }\n {resetContent}\n </div>\n );\n }\n}\n\nexport default DragAndDrop;\n"],"file":"index.js"}
|
|
@@ -6,145 +6,180 @@
|
|
|
6
6
|
@value battle from colors;
|
|
7
7
|
@value light from colors;
|
|
8
8
|
@value xtraLightGrey from colors;
|
|
9
|
+
@value cm_grey_300 from colors;
|
|
10
|
+
@value cm_grey_700 from colors;
|
|
11
|
+
@value cm_grey_50 from colors;
|
|
12
|
+
@value cm_grey_200 from colors;
|
|
13
|
+
@value cm_grey_100 from colors;
|
|
14
|
+
@value cm_grey_400 from colors;
|
|
9
15
|
|
|
10
16
|
.wrapper {
|
|
11
|
-
|
|
17
|
+
font-family: "Gilroy";
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
/* height: 133px;
|
|
21
|
+
width: 202px; */
|
|
22
|
+
border-radius: 3px;
|
|
12
23
|
}
|
|
13
24
|
|
|
14
25
|
.title {
|
|
15
|
-
font-
|
|
16
|
-
font-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
margin-bottom: 20px;
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
color: cm_grey_700;
|
|
29
|
+
margin-bottom: 14px;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
.description {
|
|
23
|
-
font-
|
|
24
|
-
font-size: 13px;
|
|
33
|
+
font-size: 10px;
|
|
25
34
|
font-weight: 400;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
text-align: justify;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.previewWrapper {
|
|
35
|
+
color: cm_grey_300;
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
text-align: center;
|
|
33
38
|
width: 100%;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
margin-bottom: 10px;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.modified {
|
|
43
|
-
composes: previewWrapper;
|
|
44
|
-
border: 2px solid battle;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
overflow: hidden;
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
.modificationsContainer {
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
border: none;
|
|
47
|
+
border-radius: 3px;;
|
|
48
|
+
background: cm_grey_50;
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
.
|
|
56
|
-
padding:
|
|
51
|
+
.preview {
|
|
52
|
+
padding: 8px;
|
|
57
53
|
width: 100%;
|
|
58
|
-
height:
|
|
54
|
+
height: 100%;
|
|
59
55
|
box-sizing: border-box;
|
|
60
56
|
display: flex;
|
|
61
57
|
}
|
|
62
58
|
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
.preview img, video {
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
border: 1px cm_grey_100 solid;
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
.inputWrapper {
|
|
66
|
+
background: cm_grey_50;
|
|
70
67
|
width: 100%;
|
|
71
|
-
height:
|
|
68
|
+
height: 100%;
|
|
72
69
|
box-sizing: border-box;
|
|
73
|
-
border: 1px dashed
|
|
74
|
-
border-radius:
|
|
70
|
+
border: 1px dashed cm_grey_200;
|
|
71
|
+
border-radius: 7px;
|
|
75
72
|
position: relative;
|
|
76
73
|
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
77
75
|
align-items: center;
|
|
78
76
|
justify-content: center;
|
|
77
|
+
padding: 14px 8px 8px 8px;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
text-overflow: ellipsis;
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
.resetUploadWrapper {
|
|
82
84
|
width: 100%;
|
|
83
|
-
height:
|
|
85
|
+
height: 20px;
|
|
84
86
|
box-sizing: border-box;
|
|
85
|
-
background-color:
|
|
86
|
-
border: solid 1px light;
|
|
87
|
+
background-color: cm_grey_50;
|
|
87
88
|
border-radius: 3px;
|
|
88
|
-
position: relative;
|
|
89
89
|
display: flex;
|
|
90
90
|
align-items: center;
|
|
91
91
|
justify-content: space-between;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
font-size:
|
|
92
|
+
margin-top: 16px;
|
|
93
|
+
padding: 4px 8px;
|
|
94
|
+
font-size: 10px;
|
|
95
95
|
font-weight: 400;
|
|
96
|
-
margin-top: 15px;
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
.resetSrcLabel {
|
|
100
|
-
|
|
101
|
-
color: dark;
|
|
102
|
-
max-width: 220px;
|
|
99
|
+
color: cm_grey_700;
|
|
103
100
|
display: inline-block;
|
|
104
101
|
white-space: nowrap;
|
|
105
102
|
overflow: hidden;
|
|
106
103
|
text-overflow: ellipsis;
|
|
107
104
|
direction: rtl;
|
|
108
105
|
text-align: left;
|
|
109
|
-
margin-left: 9px;
|
|
110
106
|
}
|
|
111
107
|
|
|
112
108
|
.closeIcon {
|
|
113
|
-
margin-right: 9px;
|
|
114
109
|
cursor: pointer;
|
|
115
|
-
color:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.closeIcon:hover {
|
|
119
|
-
color: black;
|
|
110
|
+
color: cm_grey_400;
|
|
111
|
+
padding: 6px;
|
|
120
112
|
}
|
|
121
113
|
|
|
122
114
|
.dragging {
|
|
123
115
|
composes: inputWrapper;
|
|
124
|
-
border:
|
|
116
|
+
border: 1px solid cm_grey_200;
|
|
117
|
+
background: cm_grey_100;
|
|
125
118
|
}
|
|
126
119
|
|
|
127
|
-
.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
120
|
+
.dragging .description .icon .title {
|
|
121
|
+
font-size: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.dragging .title {
|
|
125
|
+
font-size: 10px;
|
|
132
126
|
}
|
|
133
127
|
|
|
134
|
-
.dragging .
|
|
135
|
-
transform: scale(
|
|
128
|
+
.dragging .icon {
|
|
129
|
+
transform: scale(0.85);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.icon {
|
|
133
|
+
width: 14px;
|
|
134
|
+
height: 14px;
|
|
135
|
+
transition: all 0.2s cubic-bezier(0.47, 1.04, 0.46, 2.16);
|
|
136
|
+
margin-bottom: 4px;
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
.uploadLabel {
|
|
139
|
-
font-
|
|
140
|
-
font-size: 18px;
|
|
141
|
-
text-transform: uppercase;
|
|
140
|
+
font-size: 14px;
|
|
142
141
|
font-weight: 700;
|
|
143
|
-
color:
|
|
142
|
+
color: cm_grey_700;
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
.
|
|
147
|
-
min-height: 100px;
|
|
148
|
-
border: none;
|
|
145
|
+
.loaderWrapper {
|
|
149
146
|
position: relative;
|
|
147
|
+
height: 100%;
|
|
148
|
+
width: 100%;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
align-items: center;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.loader {
|
|
156
|
+
margin-bottom: 8px;
|
|
157
|
+
height: 14px;
|
|
158
|
+
width: 14px;
|
|
150
159
|
}
|
|
160
|
+
|
|
161
|
+
.loaderText {
|
|
162
|
+
font-size: 10px;
|
|
163
|
+
font-weight: 400;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.loadingCancel {
|
|
167
|
+
display: none;
|
|
168
|
+
position: absolute;
|
|
169
|
+
top: 0;
|
|
170
|
+
right: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.button {
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
align-items: center;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.folderIcon {
|
|
180
|
+
margin-right: 8px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.wrapper:hover .loadingCancel {
|
|
184
|
+
display: block;
|
|
185
|
+
}
|
|
@@ -4,9 +4,9 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
-
title: 'Drag &
|
|
8
|
-
description: '
|
|
9
|
-
uploadLabel: '
|
|
7
|
+
title: 'Drag & drop here',
|
|
8
|
+
description: 'JPG or PNG, smaller than 5mb',
|
|
9
|
+
uploadLabel: 'Browse',
|
|
10
10
|
previewLabel: 'File Preview'
|
|
11
11
|
}
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/default.js"],"names":["props","title","description","uploadLabel","previewLabel"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/default.js"],"names":["props","title","description","uploadLabel","previewLabel"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,kBADF;AAELC,IAAAA,WAAW,EAAE,8BAFR;AAGLC,IAAAA,WAAW,EAAE,QAHR;AAILC,IAAAA,YAAY,EAAE;AAJT;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Drag & drop here',\n description: 'JPG or PNG, smaller than 5mb',\n uploadLabel: 'Browse',\n previewLabel: 'File Preview'\n }\n};\n"],"file":"default.js"}
|
|
@@ -11,7 +11,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
11
11
|
|
|
12
12
|
var _default = {
|
|
13
13
|
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
-
loading: true
|
|
14
|
+
loading: true,
|
|
15
|
+
modified: false
|
|
15
16
|
})
|
|
16
17
|
};
|
|
17
18
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/loading.js"],"names":["props","Default","loading"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,kBAAQD,KADR;AAEHE,IAAAA,OAAO,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/loading.js"],"names":["props","Default","loading","modified"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,kBAAQD,KADR;AAEHE,IAAAA,OAAO,EAAE,IAFN;AAGHC,IAAAA,QAAQ,EAAE;AAHP;AADQ,C","sourcesContent":["import Default from './default';\n\nexport default {\n props: {\n ...Default.props,\n loading: true,\n modified: false\n }\n};\n"],"file":"loading.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-children.js"],"names":["props","previewContent","type","src","title","displayName","uploadLabel","children","onDragStart","onDragStop","style","input"],"mappings":";;;;;AAAA;;AACA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-children.js"],"names":["props","modified","previewContent","type","src","title","displayName","uploadLabel","children","onDragStart","onDragStop","style","input"],"mappings":";;;;;AAAA;;AACA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KAFX;AAMLC,IAAAA,KAAK,EAAE,aANF;AAOLC,IAAAA,WAAW,EAAE,cAPR;AAQLC,IAAAA,WAAW,EAAE;AARR,GADM;AAWb;AACAC,EAAAA,QAAQ,EAAE,CAACC,WAAD,EAAcC,UAAd,kBACR;AACE,IAAA,SAAS,EAAEC,eAAMC,KADnB;AAEE,IAAA,GAAG,EAAC,GAFN;AAGE,IAAA,IAAI,EAAC,MAHP;AAIE,IAAA,MAAM,EAAC,SAJT;AAKE,IAAA,QAAQ,EAAE,MAAM,IALlB;AAME,IAAA,WAAW,EAAEH,WANf;AAOE,IAAA,MAAM,EAAEC,UAPV;AAQE,IAAA,WAAW,EAAEA;AARf;AAbW,C","sourcesContent":["import React from 'react';\nimport style from '../../../image-upload/style.css';\n\nexport default {\n props: {\n modified: true,\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n },\n title: 'Desktop (*)',\n displayName: 'Upload image',\n uploadLabel: 'Upload'\n },\n // eslint-disable-next-line react/display-name\n children: (onDragStart, onDragStop) => (\n <input\n className={style.input}\n key=\"1\"\n type=\"file\"\n accept=\"image*/\"\n onChange={() => true}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )\n};\n"],"file":"with-children.js"}
|
|
@@ -4,13 +4,14 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
+
modified: true,
|
|
7
8
|
title: 'Drag & Drop With Image',
|
|
8
9
|
description: 'Drag and drop component with an image',
|
|
9
10
|
uploadLabel: 'Upload Image(s)',
|
|
10
11
|
previewLabel: 'File Preview',
|
|
11
12
|
previewContent: {
|
|
12
13
|
type: 'image',
|
|
13
|
-
src: 'https://static.coorpacademy.com/content/up/raw/
|
|
14
|
+
src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","modified","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,KAAK,EAAE,wBAFF;AAGLC,IAAAA,WAAW,EAAE,uCAHR;AAILC,IAAAA,WAAW,EAAE,iBAJR;AAKLC,IAAAA,YAAY,EAAE,cALT;AAMLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS;AANX;AADM,C","sourcesContent":["export default {\n props: {\n modified: true,\n title: 'Drag & Drop With Image',\n description: 'Drag and drop component with an image',\n uploadLabel: 'Upload Image(s)',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n }\n }\n};\n"],"file":"with-image.js"}
|
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
+
modified: true,
|
|
7
8
|
title: 'Drag & Drop',
|
|
8
9
|
description: 'Drag and drop component with a video',
|
|
9
10
|
uploadLabel: 'Upload',
|
|
@@ -11,7 +12,8 @@ var _default = {
|
|
|
11
12
|
previewContent: {
|
|
12
13
|
type: 'video',
|
|
13
14
|
src: 'https://www.w3schools.com/tags/movie.mp4'
|
|
14
|
-
}
|
|
15
|
+
},
|
|
16
|
+
onReset: () => console.log('reset')
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-video.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-video.js"],"names":["props","modified","title","description","uploadLabel","previewLabel","previewContent","type","src","onReset","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,KAAK,EAAE,aAFF;AAGLC,IAAAA,WAAW,EAAE,sCAHR;AAILC,IAAAA,WAAW,EAAE,QAJR;AAKLC,IAAAA,YAAY,EAAE,cALT;AAMLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KANX;AAULC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAVV;AADM,C","sourcesContent":["export default {\n props: {\n modified: true,\n title: 'Drag & Drop',\n description: 'Drag and drop component with a video',\n uploadLabel: 'Upload',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'video',\n src: 'https://www.w3schools.com/tags/movie.mp4'\n },\n onReset: () => console.log('reset')\n }\n};\n"],"file":"with-video.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
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); }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
+
description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
|
18
|
+
//# sourceMappingURL=withLongDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/withLongDescription.js"],"names":["props","description"],"mappings":";;;;;AACA;;;;;;eAEe;AACXA,EAAAA,KAAK,wBACEA,kBAAMA,KADR;AAEDC,IAAAA,WAAW,EAAE;AAFZ;AADM,C","sourcesContent":["\nimport props from './default';\n\nexport default {\n props: {\n ...props.props,\n description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'\n }\n}\n"],"file":"withLongDescription.js"}
|
|
@@ -20,6 +20,8 @@ var _withImage = _interopRequireDefault(require("./fixtures/with-image"));
|
|
|
20
20
|
|
|
21
21
|
var _withVideo = _interopRequireDefault(require("./fixtures/with-video"));
|
|
22
22
|
|
|
23
|
+
var _withLongDescription = _interopRequireDefault(require("./fixtures/withLongDescription"));
|
|
24
|
+
|
|
23
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
26
|
|
|
25
27
|
(0, _ava.default)('Atom › AtomDragAndDrop > should have valid propTypes', t => {
|
|
@@ -34,4 +36,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
34
36
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImageReset › should be rendered', _renderComponent.default, _.default, _withImageReset.default);
|
|
35
37
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImage › should be rendered', _renderComponent.default, _.default, _withImage.default);
|
|
36
38
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithVideo › should be rendered', _renderComponent.default, _.default, _withVideo.default);
|
|
39
|
+
(0, _ava.default)('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', _renderComponent.default, _.default, _withLongDescription.default);
|
|
37
40
|
//# sourceMappingURL=fixtures.js.map
|