@coorpacademy/components 11.40.22 → 11.40.24
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.d.ts +1 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/types.d.ts +2 -0
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +2 -1
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +10 -0
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/chips/index.d.ts.map +1 -1
- package/es/atom/chips/index.js +9 -0
- package/es/atom/chips/index.js.map +1 -1
- package/es/atom/circular-progress-bar/index.d.ts.map +1 -1
- package/es/atom/circular-progress-bar/index.js +4 -0
- package/es/atom/circular-progress-bar/index.js.map +1 -1
- package/es/atom/input-select/index.d.ts.map +1 -1
- package/es/atom/input-select/index.js +2 -2
- package/es/atom/input-select/index.js.map +1 -1
- package/es/atom/input-text-with-title/index.js +1 -0
- package/es/atom/input-text-with-title/index.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +1 -0
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +1 -0
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +1 -0
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/title/index.d.ts +1 -0
- package/es/atom/title/index.js +1 -0
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/tooltip/index.d.ts.map +1 -1
- package/es/atom/tooltip/index.js +1 -0
- package/es/atom/tooltip/index.js.map +1 -1
- package/es/molecule/base-modal/index.js +1 -0
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.js +1 -0
- package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/es/molecule/button-menu-action/index.d.ts +1 -0
- package/es/molecule/button-menu-action/index.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.js +1 -0
- package/es/molecule/button-menu-action/index.js.map +1 -1
- package/es/molecule/button-menu-action/types.d.ts +1 -0
- package/es/molecule/button-menu-action/types.d.ts.map +1 -1
- package/es/molecule/card/customer.js +1 -0
- package/es/molecule/card/customer.js.map +1 -1
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +7 -0
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card-content/index.d.ts.map +1 -1
- package/es/molecule/card-content/index.js +1 -0
- package/es/molecule/card-content/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +8 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/course-section/index.d.ts.map +1 -1
- package/es/molecule/course-section/index.js +3 -0
- package/es/molecule/course-section/index.js.map +1 -1
- package/es/molecule/dashboard/learning-profile-banner/index.d.ts.map +1 -1
- package/es/molecule/dashboard/learning-profile-banner/index.js +2 -4
- package/es/molecule/dashboard/learning-profile-banner/index.js.map +1 -1
- package/es/molecule/dashboard/review-banner/index.d.ts.map +1 -1
- package/es/molecule/dashboard/review-banner/index.js +2 -4
- package/es/molecule/dashboard/review-banner/index.js.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +11 -0
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learning-priority-card/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-card/index.js +1 -0
- package/es/molecule/learning-priority-card/index.js.map +1 -1
- package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-setup-item/index.js +1 -0
- package/es/molecule/learning-priority-setup-item/index.js.map +1 -1
- package/es/molecule/progress-wrapper/index.d.ts +2 -0
- package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/es/molecule/progress-wrapper/index.js +39 -3
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/molecule/progress-wrapper/style.css +4 -1
- package/es/molecule/questions/qcm/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm/index.js +10 -0
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/es/molecule/questions/qcm-graphic/index.js +1 -0
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/quick-filters/index.d.ts +1 -0
- package/es/molecule/quick-filters/index.d.ts.map +1 -1
- package/es/molecule/quick-filters/index.js +1 -0
- package/es/molecule/quick-filters/index.js.map +1 -1
- package/es/molecule/quick-filters/types.d.ts +1 -0
- package/es/molecule/quick-filters/types.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.d.ts.map +1 -1
- package/es/molecule/review-correction-popin/index.js +3 -0
- package/es/molecule/review-correction-popin/index.js.map +1 -1
- package/es/molecule/search-form/index.d.ts.map +1 -1
- package/es/molecule/search-form/index.js +7 -0
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/skill-card/index.d.ts.map +1 -1
- package/es/molecule/skill-card/index.js +3 -0
- package/es/molecule/skill-card/index.js.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/index.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +1 -0
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +7 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +7 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/header-with-actions/index.js +0 -1
- package/es/organism/header-with-actions/index.js.map +1 -1
- package/es/organism/icon-editor/index.d.ts +1 -0
- package/es/organism/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/types.d.ts +1 -0
- package/es/organism/icon-editor/types.d.ts.map +1 -1
- package/es/organism/list-item/index.js +1 -0
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-items/index.d.ts +7 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +3 -0
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-congrats/index.d.ts.map +1 -1
- package/es/organism/review-congrats/index.js +1 -0
- package/es/organism/review-congrats/index.js.map +1 -1
- package/es/organism/review-header/index.d.ts.map +1 -1
- package/es/organism/review-header/index.js +3 -0
- package/es/organism/review-header/index.js.map +1 -1
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +1 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/setup-header/index.d.ts +4 -0
- package/es/organism/title-and-input/index.d.ts +3 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +3 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/app-player/loading/index.d.ts +8 -0
- package/es/template/app-player/player/index.d.ts +16 -0
- package/es/template/app-player/player/slides/index.d.ts +8 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +8 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +8 -0
- package/es/template/app-review/index.d.ts +8 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +8 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +8 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/app-review/skills/index.js +1 -0
- package/es/template/app-review/skills/index.js.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +4 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +4 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +30 -0
- package/es/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/certification-detail/index.d.ts +10 -0
- package/es/template/certification-detail/index.d.ts.map +1 -1
- package/es/template/certification-detail/index.js +7 -1
- package/es/template/certification-detail/index.js.map +1 -1
- package/es/template/common/dashboard/index.d.ts +16 -0
- package/es/template/common/search-page/index.d.ts +10 -0
- package/es/template/external-course/index.d.ts +8 -0
- package/es/template/playlist-detail/index.d.ts +8 -0
- package/es/template/review-dashboard-skills/index.js +1 -0
- package/es/template/review-dashboard-skills/index.js.map +1 -1
- package/es/util/button-icons.d.ts +1 -0
- package/es/util/button-icons.d.ts.map +1 -1
- package/es/util/button-icons.js +2 -0
- package/es/util/button-icons.js.map +1 -1
- package/es/util/linkedin-icon.d.ts +3 -0
- package/es/util/linkedin-icon.d.ts.map +1 -0
- package/es/util/linkedin-icon.js +17 -0
- package/es/util/linkedin-icon.js.map +1 -0
- package/lib/atom/button-link/index.d.ts +1 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/types.d.ts +2 -0
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +2 -1
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +10 -0
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/chips/index.d.ts.map +1 -1
- package/lib/atom/chips/index.js +9 -0
- package/lib/atom/chips/index.js.map +1 -1
- package/lib/atom/circular-progress-bar/index.d.ts.map +1 -1
- package/lib/atom/circular-progress-bar/index.js +4 -0
- package/lib/atom/circular-progress-bar/index.js.map +1 -1
- package/lib/atom/input-select/index.d.ts.map +1 -1
- package/lib/atom/input-select/index.js +2 -2
- package/lib/atom/input-select/index.js.map +1 -1
- package/lib/atom/input-text-with-title/index.js +1 -0
- package/lib/atom/input-text-with-title/index.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +1 -0
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +1 -0
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +1 -0
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/title/index.d.ts +1 -0
- package/lib/atom/title/index.js +1 -0
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/tooltip/index.d.ts.map +1 -1
- package/lib/atom/tooltip/index.js +1 -0
- package/lib/atom/tooltip/index.js.map +1 -1
- package/lib/molecule/base-modal/index.js +1 -0
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.js +1 -0
- package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/lib/molecule/button-menu-action/index.d.ts +1 -0
- package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.js +1 -0
- package/lib/molecule/button-menu-action/index.js.map +1 -1
- package/lib/molecule/button-menu-action/types.d.ts +1 -0
- package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
- package/lib/molecule/card/customer.js +1 -0
- package/lib/molecule/card/customer.js.map +1 -1
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +7 -0
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card-content/index.d.ts.map +1 -1
- package/lib/molecule/card-content/index.js +1 -0
- package/lib/molecule/card-content/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +8 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/course-section/index.d.ts.map +1 -1
- package/lib/molecule/course-section/index.js +3 -0
- package/lib/molecule/course-section/index.js.map +1 -1
- package/lib/molecule/dashboard/learning-profile-banner/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/learning-profile-banner/index.js +2 -4
- package/lib/molecule/dashboard/learning-profile-banner/index.js.map +1 -1
- package/lib/molecule/dashboard/review-banner/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/review-banner/index.js +2 -4
- package/lib/molecule/dashboard/review-banner/index.js.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +11 -0
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learning-priority-card/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-card/index.js +1 -0
- package/lib/molecule/learning-priority-card/index.js.map +1 -1
- package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-setup-item/index.js +1 -0
- package/lib/molecule/learning-priority-setup-item/index.js.map +1 -1
- package/lib/molecule/progress-wrapper/index.d.ts +2 -0
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/progress-wrapper/index.js +39 -3
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/molecule/progress-wrapper/style.css +4 -1
- package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm/index.js +10 -0
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
- package/lib/molecule/questions/qcm-graphic/index.js +1 -0
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/quick-filters/index.d.ts +1 -0
- package/lib/molecule/quick-filters/index.d.ts.map +1 -1
- package/lib/molecule/quick-filters/index.js +1 -0
- package/lib/molecule/quick-filters/index.js.map +1 -1
- package/lib/molecule/quick-filters/types.d.ts +1 -0
- package/lib/molecule/quick-filters/types.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.d.ts.map +1 -1
- package/lib/molecule/review-correction-popin/index.js +3 -0
- package/lib/molecule/review-correction-popin/index.js.map +1 -1
- package/lib/molecule/search-form/index.d.ts.map +1 -1
- package/lib/molecule/search-form/index.js +7 -0
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/skill-card/index.d.ts.map +1 -1
- package/lib/molecule/skill-card/index.js +3 -0
- package/lib/molecule/skill-card/index.js.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +1 -0
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +7 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +7 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/header-with-actions/index.js +0 -1
- package/lib/organism/header-with-actions/index.js.map +1 -1
- package/lib/organism/icon-editor/index.d.ts +1 -0
- package/lib/organism/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/types.d.ts +1 -0
- package/lib/organism/icon-editor/types.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +1 -0
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +7 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +3 -0
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-congrats/index.d.ts.map +1 -1
- package/lib/organism/review-congrats/index.js +1 -0
- package/lib/organism/review-congrats/index.js.map +1 -1
- package/lib/organism/review-header/index.d.ts.map +1 -1
- package/lib/organism/review-header/index.js +3 -0
- package/lib/organism/review-header/index.js.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +1 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/setup-header/index.d.ts +4 -0
- package/lib/organism/title-and-input/index.d.ts +3 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +3 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/app-player/loading/index.d.ts +8 -0
- package/lib/template/app-player/player/index.d.ts +16 -0
- package/lib/template/app-player/player/slides/index.d.ts +8 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +8 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +8 -0
- package/lib/template/app-review/index.d.ts +8 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +8 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +8 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/skills/index.js +1 -0
- package/lib/template/app-review/skills/index.js.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +4 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +4 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +30 -0
- package/lib/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/certification-detail/index.d.ts +10 -0
- package/lib/template/certification-detail/index.d.ts.map +1 -1
- package/lib/template/certification-detail/index.js +7 -1
- package/lib/template/certification-detail/index.js.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +16 -0
- package/lib/template/common/search-page/index.d.ts +10 -0
- package/lib/template/external-course/index.d.ts +8 -0
- package/lib/template/playlist-detail/index.d.ts +8 -0
- package/lib/template/review-dashboard-skills/index.js +1 -0
- package/lib/template/review-dashboard-skills/index.js.map +1 -1
- package/lib/util/button-icons.d.ts +1 -0
- package/lib/util/button-icons.d.ts.map +1 -1
- package/lib/util/button-icons.js +2 -0
- package/lib/util/button-icons.js.map +1 -1
- package/lib/util/linkedin-icon.d.ts +3 -0
- package/lib/util/linkedin-icon.d.ts.map +1 -0
- package/lib/util/linkedin-icon.js +21 -0
- package/lib/util/linkedin-icon.js.map +1 -0
- package/locales/bs/global.json +2 -1
- package/locales/cs/global.json +2 -1
- package/locales/de/global.json +2 -1
- package/locales/en/global.json +2 -1
- package/locales/es/global.json +2 -1
- package/locales/et/global.json +2 -1
- package/locales/fi/global.json +2 -1
- package/locales/fr/global.json +2 -1
- package/locales/hr/global.json +2 -1
- package/locales/hu/global.json +2 -1
- package/locales/hy/global.json +2 -1
- package/locales/it/global.json +2 -1
- package/locales/ja/global.json +2 -1
- package/locales/ko/global.json +2 -1
- package/locales/lt/global.json +2 -1
- package/locales/nl/global.json +2 -1
- package/locales/pl/global.json +2 -1
- package/locales/pt/global.json +2 -1
- package/locales/ro/global.json +2 -1
- package/locales/ru/global.json +2 -1
- package/locales/sk/global.json +2 -1
- package/locales/sl/global.json +2 -1
- package/locales/sv/global.json +2 -1
- package/locales/tl/global.json +2 -1
- package/locales/tr/global.json +2 -1
- package/locales/uk/global.json +2 -1
- package/locales/vi/global.json +2 -1
- package/locales/zh/global.json +2 -1
- package/locales/zh_TW/global.json +2 -1
- package/package.json +4 -4
|
@@ -38,6 +38,7 @@ declare const ButtonLink: {
|
|
|
38
38
|
href: import("prop-types").Requireable<string>;
|
|
39
39
|
download: import("prop-types").Requireable<boolean>;
|
|
40
40
|
target: import("prop-types").Requireable<string>;
|
|
41
|
+
rel: import("prop-types").Requireable<string>;
|
|
41
42
|
}>>;
|
|
42
43
|
hoverBackgroundColor: import("prop-types").Requireable<string>;
|
|
43
44
|
hoverColor: import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAuG7D,QAAA,MAAM,UAAU;YAAW,eAAe
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAQA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAuG7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -49,6 +49,7 @@ declare const propTypes: {
|
|
|
49
49
|
href: PropTypes.Requireable<string>;
|
|
50
50
|
download: PropTypes.Requireable<boolean>;
|
|
51
51
|
target: PropTypes.Requireable<string>;
|
|
52
|
+
rel: PropTypes.Requireable<string>;
|
|
52
53
|
}>>;
|
|
53
54
|
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
54
55
|
hoverColor: PropTypes.Requireable<string>;
|
|
@@ -88,6 +89,7 @@ export declare type ButtonLinkProps = {
|
|
|
88
89
|
href?: string;
|
|
89
90
|
download?: boolean;
|
|
90
91
|
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
92
|
+
rel?: string;
|
|
91
93
|
};
|
|
92
94
|
hoverBackgroundColor?: string;
|
|
93
95
|
hoverColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAC9C,OAAO,GAAG,MAAM,QAAQ,CAAC;AAUzB,eAAO,MAAM,aAAa;;;;;;;;;;CAIzB,CAAC;AAEF,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAC9C,OAAO,GAAG,MAAM,QAAQ,CAAC;AAUzB,eAAO,MAAM,aAAa;;;;;;;;;;CAIzB,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Bd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACnC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,oBAA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AEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -28,7 +28,8 @@ const propTypes = {
|
|
|
28
28
|
link: PropTypes.shape({
|
|
29
29
|
href: PropTypes.string,
|
|
30
30
|
download: PropTypes.bool,
|
|
31
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
31
|
+
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
|
32
|
+
rel: PropTypes.string
|
|
32
33
|
}),
|
|
33
34
|
hoverBackgroundColor: PropTypes.string,
|
|
34
35
|
hoverColor: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","ICONS","faIconPropTypes","name","string","isRequired","color","backgroundColor","size","number","customStyle","object","iconPropTypes","position","oneOf","type","_keys","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","oneOfType","arrayOf","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","contentCustomStyle","useTitle","customLabelClassName"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\nimport Tag from '../tag';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.object\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.oneOfType([\n PropTypes.shape(iconPropTypes),\n PropTypes.arrayOf(PropTypes.shape(iconPropTypes))\n ]),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.object,\n contentCustomStyle: PropTypes.object,\n useTitle: PropTypes.bool,\n customLabelClassName: PropTypes.string\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: React.CSSProperties;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: PropTypes.ReactNodeLike;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType | IconType[];\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: React.CSSProperties;\n contentCustomStyle?: React.CSSProperties;\n useTitle?: boolean;\n customLabelClassName?: string;\n tag?: React.ComponentProps<typeof Tag>;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAG7C,MAAMC,eAAe,GAAG;EACtBC,IAAI,EAAEH,SA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AO,EAAE7B,SAAS,CAAC8B,IAAI;EACvBC,IAAI,EAAE/B,SAAS,CAACkB,KAAK,CAAC;IACpBc,IAAI,EAAEhC,SAAS,CAACI,MAAM;IACtB6B,QAAQ,EAAEjC,SAAS,CAACkC,IAAI;IACxBC,MAAM,EAAEnC,SAAS,CAACc,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","ICONS","faIconPropTypes","name","string","isRequired","color","backgroundColor","size","number","customStyle","object","iconPropTypes","position","oneOf","type","_keys","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","oneOfType","arrayOf","onClick","func","link","href","download","bool","target","rel","hoverBackgroundColor","hoverColor","disabled","className","contentCustomStyle","useTitle","customLabelClassName"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\nimport Tag from '../tag';\n\nconst faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.object\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS)),\n faIcon: PropTypes.shape(faIconPropTypes)\n};\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.oneOfType([\n PropTypes.shape(iconPropTypes),\n PropTypes.arrayOf(PropTypes.shape(iconPropTypes))\n ]),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n rel: PropTypes.string\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.object,\n contentCustomStyle: PropTypes.object,\n useTitle: PropTypes.bool,\n customLabelClassName: PropTypes.string\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: React.CSSProperties;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIconType;\n};\n\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: PropTypes.ReactNodeLike;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType | IconType[];\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n rel?: string;\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: React.CSSProperties;\n contentCustomStyle?: React.CSSProperties;\n useTitle?: boolean;\n customLabelClassName?: string;\n tag?: React.ComponentProps<typeof Tag>;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAG7C,MAAMC,eAAe,GAAG;EACtBC,IAAI,EAAEH,SAAS,CAACI,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEN,SAAS,CAACI,MAAM;EACvBG,eAAe,EAAEP,SAAS,CAACI,MAAM;EACjCI,IAAI,EAAER,SAAS,CAACS,MAAM;EACtBC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,CAACkC,IAAI;IACxBC,MAAM,EAAEnC,SAAS,CAACc,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC/DsB,GAAG,EAAEpC,SAAS,CAACI;EACjB,CAAC,CAAC;EACFiC,oBAAoB,EAAErC,SAAS,CAACI,MAAM;EACtCkC,UAAU,EAAEtC,SAAS,CAACI,MAAM;EAC5BmC,QAAQ,EAAEvC,SAAS,CAACkC,IAAI;EACxBM,SAAS,EAAExC,SAAS,CAACI,MAAM;EAC3BM,WAAW,EAAEV,SAAS,CAACW,MAAM;EAC7B8B,kBAAkB,EAAEzC,SAAS,CAACW,MAAM;EACpC+B,QAAQ,EAAE1C,SAAS,CAACkC,IAAI;EACxBS,oBAAoB,EAAE3C,SAAS,CAACI;AAClC,CAAC;AAgDD,eAAee,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"AA2BO,qGAG0E;;AAGjF,6DA6EC"}
|
package/es/atom/chip/index.js
CHANGED
|
@@ -15,6 +15,13 @@ const {
|
|
|
15
15
|
cm_primary_blue: DEFAULT_BACKGROUND_COLOR
|
|
16
16
|
} = COLORS;
|
|
17
17
|
const ICON_SIZE = '12px';
|
|
18
|
+
const handleChipKeyDown = onClick => event => {
|
|
19
|
+
if (!onClick) return;
|
|
20
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
onClick(event);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
18
25
|
export const calculateHoveredSelectedBgColor = (selectedBgColor, luminosityDelta = LUMINOSITY_DELTA) => convert(`hsl(from ${selectedBgColor} h s calc(l*(1 - ${luminosityDelta})))`);
|
|
19
26
|
// note: luminosity decrease is relative to the selected color
|
|
20
27
|
|
|
@@ -62,6 +69,9 @@ const Chip = (props, context) => {
|
|
|
62
69
|
onClick: handleClick,
|
|
63
70
|
onMouseEnter: handleMouseEnter,
|
|
64
71
|
onMouseLeave: handleMouseLeave,
|
|
72
|
+
role: onClick ? 'button' : 'group',
|
|
73
|
+
tabIndex: onClick ? 0 : undefined,
|
|
74
|
+
onKeyDown: handleChipKeyDown(onClick),
|
|
65
75
|
"aria-label": text,
|
|
66
76
|
"data-name": `chip-${text}`
|
|
67
77
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","PropTypes","classnames","getOr","convert","FontAwesomeIcon","fas","library","Provider","COLORS","style","add","LUMINOSITY_DELTA","cm_primary_blue","DEFAULT_BACKGROUND_COLOR","ICON_SIZE","calculateHoveredSelectedBgColor","selectedBgColor","luminosityDelta","Chip","props","context","text","subText","textColor","cm_grey_700","selected","customIcon","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","PropTypes","classnames","getOr","convert","FontAwesomeIcon","fas","library","Provider","COLORS","style","add","LUMINOSITY_DELTA","cm_primary_blue","DEFAULT_BACKGROUND_COLOR","ICON_SIZE","handleChipKeyDown","onClick","event","key","preventDefault","calculateHoveredSelectedBgColor","selectedBgColor","luminosityDelta","Chip","props","context","text","subText","textColor","cm_grey_700","selected","customIcon","leftIcon","backgroundColor","customStyle","skin","skinColor","hoveredSelectedBgColor","isHovered","setIsHovered","handleClick","handleMouseEnter","handleMouseLeave","hoverStyle","defaultIcon","showIcon","color","white","createElement","className","container","unselected","onMouseEnter","onMouseLeave","role","tabIndex","undefined","onKeyDown","left","icon","fontSize","title","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","bool","func","objectOf","oneOfType","number"],"sources":["../../../src/atom/chip/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport Provider from '../provider';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst LUMINOSITY_DELTA = 0.08;\nconst {cm_primary_blue: DEFAULT_BACKGROUND_COLOR} = COLORS;\nconst ICON_SIZE = '12px';\n\nconst handleChipKeyDown = onClick => event => {\n if (!onClick) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onClick(event);\n }\n};\n\nexport const calculateHoveredSelectedBgColor = (\n selectedBgColor,\n luminosityDelta = LUMINOSITY_DELTA\n) => convert(`hsl(from ${selectedBgColor} h s calc(l*(1 - ${luminosityDelta})))`);\n// note: luminosity decrease is relative to the selected color\n\nconst Chip = (props, context) => {\n const {\n text,\n subText,\n textColor = COLORS.cm_grey_700,\n selected = false,\n customIcon,\n onClick,\n leftIcon,\n backgroundColor,\n customStyle\n } = props;\n const {skin} = context;\n const skinColor = getOr(DEFAULT_BACKGROUND_COLOR, 'common.primary', skin);\n const selectedBgColor =\n backgroundColor === 'skin' && skinColor\n ? skinColor\n : backgroundColor || DEFAULT_BACKGROUND_COLOR;\n const hoveredSelectedBgColor = calculateHoveredSelectedBgColor(selectedBgColor);\n\n const [isHovered, setIsHovered] = useState(false);\n\n const handleClick = useMemo(() => onClick, [onClick]);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const hoverStyle = isHovered ? {backgroundColor: hoveredSelectedBgColor} : {};\n\n const defaultIcon = selected ? 'fa-check' : 'fa-plus';\n const showIcon = customIcon !== 'none';\n const color = selected ? COLORS.white : textColor;\n\n return (\n <div\n className={classnames(style.container, !selected && style.unselected)}\n style={{\n ...(selected && selectedBgColor ? {backgroundColor: selectedBgColor} : {}),\n ...(selected && hoverStyle),\n ...customStyle\n }}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n role={onClick ? 'button' : 'group'}\n tabIndex={onClick ? 0 : undefined}\n onKeyDown={handleChipKeyDown(onClick)}\n aria-label={text}\n data-name={`chip-${text}`}\n >\n <div className={style.left}>\n {leftIcon ? <FontAwesomeIcon style={{color}} icon={leftIcon} fontSize={ICON_SIZE} /> : null}\n <div title={text}>\n <span className={style.text} style={{color}}>\n {text}\n </span>\n {subText ? (\n <span className={style.subText} style={{color}}>\n {subText}\n </span>\n ) : null}\n </div>\n </div>\n {showIcon ? (\n <FontAwesomeIcon\n style={{color}}\n icon={customIcon ? `fa-${customIcon}` : defaultIcon}\n fontSize={ICON_SIZE}\n />\n ) : null}\n </div>\n );\n};\n\nChip.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nChip.propTypes = {\n text: PropTypes.string,\n subText: PropTypes.string,\n textColor: PropTypes.string,\n selected: PropTypes.bool,\n customIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n onClick: PropTypes.func,\n leftIcon: PropTypes.string,\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport default Chip;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,SAAQC,GAAG,QAAO,kCAAkC;AACpD,SAAQC,OAAO,QAAO,mCAAmC;AACzD,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KA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vBtC,QAAQ,EAAEhC,SAAS,CAACoE,MAAM;EAC1BlC,WAAW,EAAElC,SAAS,CAACuE,QAAQ,CAACvE,SAAS,CAACwE,SAAS,CAAC,CAACxE,SAAS,CAACoE,MAAM,EAAEpE,SAAS,CAACyE,MAAM,CAAC,CAAC;AAC3F,CAAC;AAED,eAAelD,IAAI","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chips/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chips/index.js"],"names":[],"mappings":";AAkBA,gDA0BC"}
|
package/es/atom/chips/index.js
CHANGED
|
@@ -5,6 +5,12 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import { NovaSolidRemoveAddAddCircle1 as AddIcon, NovaSolidStatusCheckCircle2 as SelectedIcon } from '@coorpacademy/nova-icons';
|
|
7
7
|
import style from './style.css';
|
|
8
|
+
const handleChipKeyDown = onClick => event => {
|
|
9
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
onClick();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
8
14
|
const Chips = props => {
|
|
9
15
|
const {
|
|
10
16
|
text,
|
|
@@ -16,6 +22,9 @@ const Chips = props => {
|
|
|
16
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
23
|
className: classnames(style.container, selected ? style.selected : style.unselected),
|
|
18
24
|
onClick: handleClick,
|
|
25
|
+
role: "button",
|
|
26
|
+
tabIndex: 0,
|
|
27
|
+
onKeyDown: handleChipKeyDown(onClick),
|
|
19
28
|
"aria-label": `${text} ${information}`,
|
|
20
29
|
"data-name": text
|
|
21
30
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidRemoveAddAddCircle1","AddIcon","NovaSolidStatusCheckCircle2","SelectedIcon","style","Chips","props","text","information","selected","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidRemoveAddAddCircle1","AddIcon","NovaSolidStatusCheckCircle2","SelectedIcon","style","handleChipKeyDown","onClick","event","key","preventDefault","Chips","props","text","information","selected","handleClick","createElement","className","container","unselected","role","tabIndex","onKeyDown","textZone","title","selectedIconWrapper","unselectedIconWrapper","propTypes","process","env","NODE_ENV","string","bool","func"],"sources":["../../../src/atom/chips/index.js"],"sourcesContent":["// This component is a simpler version of the generic Chip component, in use in CoorpManager.\n\nimport React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaSolidStatusCheckCircle2 as SelectedIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst handleChipKeyDown = onClick => event => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onClick();\n }\n};\n\nconst Chips = props => {\n const {text, information, selected = false, onClick} = props;\n\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n return (\n <div\n className={classnames(style.container, selected ? style.selected : style.unselected)}\n onClick={handleClick}\n role=\"button\"\n tabIndex={0}\n onKeyDown={handleChipKeyDown(onClick)}\n aria-label={`${text} ${information}`}\n data-name={text}\n >\n <div className={style.textZone} title={text}>\n <span className={style.text}>{text}</span>\n <span className={style.information}>{information}</span>\n </div>\n {selected ? (\n <SelectedIcon className={style.selectedIconWrapper} />\n ) : (\n <AddIcon className={style.unselectedIconWrapper} />\n )}\n </div>\n );\n};\n\nChips.propTypes = {\n text: PropTypes.string,\n information: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nexport default Chips;\n"],"mappings":"AAAA;;AAEA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;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AQ,gBACPlB,KAAA,CAAAoB,aAAA,CAACb,YAAY;IAACc,SAAS,EAAEb,KAAK,CAACqB;EAAoB,CAAE,CAAC,gBAEtD7B,KAAA,CAAAoB,aAAA,CAACf,OAAO;IAACgB,SAAS,EAAEb,KAAK,CAACsB;EAAsB,CAAE,CAEjD,CAAC;AAEV,CAAC;AAEDhB,KAAK,CAACiB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAChBlB,IAAI,EAAEd,SAAS,CAACiC,MAAM;EACtBlB,WAAW,EAAEf,SAAS,CAACiC,MAAM;EAC7BjB,QAAQ,EAAEhB,SAAS,CAACkC,IAAI;EACxB1B,OAAO,EAAER,SAAS,CAACmC;AACrB,CAAC;AAED,eAAevB,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/circular-progress-bar/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,6BAA6B,EAA+B,MAAM,SAAS,CAAC;AAmBpF,QAAA,MAAM,mBAAmB;gGAOtB,6BAA6B;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/circular-progress-bar/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,6BAA6B,EAA+B,MAAM,SAAS,CAAC;AAmBpF,QAAA,MAAM,mBAAmB;gGAOtB,6BAA6B;;;;;;;;;CAwD/B,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
|
|
@@ -41,7 +41,11 @@ const CircularProgressBar = ({
|
|
|
41
41
|
useEffect(() => setOffset(Math.ceil(length * ((100 - progression) / 100))), [length, progression]);
|
|
42
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
className: style.container,
|
|
44
|
+
role: "progressbar",
|
|
44
45
|
"aria-label": ariaLabel,
|
|
46
|
+
"aria-valuemin": 0,
|
|
47
|
+
"aria-valuemax": 100,
|
|
48
|
+
"aria-valuenow": progression,
|
|
45
49
|
"data-name": dataName
|
|
46
50
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
47
51
|
className: style.svg,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","useState","useEffect","CircularProgressBarPropTypes","style","ProgressionGradient","createElement","id","x1","y1","x2","y2","gradientUnits","stopColor","offset","CircularProgressBar","label","progression","size","strokeWidth","ariaLabel","dataName","setOffset","center","radius","length","center_","radius_","length_","Math","ceil","PI","className","container","svg","width","height","mainCircle","cx","cy","r","fill","progressionCircle","stroke","strokeDasharray","strokeDashoffset","_isNull","strokeLinecap","infos","propTypes","process","env","NODE_ENV"],"sources":["../../../src/atom/circular-progress-bar/index.tsx"],"sourcesContent":["import React, {useMemo, useState, useEffect} from 'react';\nimport {isNull} from 'lodash/fp';\nimport {LearningPriorityCardPropTypes, CircularProgressBarPropTypes} from './types';\nimport style from './style.css';\n\nconst ProgressionGradient = () => (\n <defs>\n <linearGradient\n id=\"gradient-stroke-progression\"\n x1=\"81\"\n y1=\"0\"\n x2=\"81\"\n y2=\"162\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#35CC7F\" />\n <stop offset=\"1\" stopColor=\"#55F2A7\" />\n </linearGradient>\n </defs>\n);\n\nconst CircularProgressBar = ({\n label,\n progression,\n size,\n strokeWidth,\n 'aria-label': ariaLabel,\n 'data-name': dataName\n}: LearningPriorityCardPropTypes) => {\n const [offset, setOffset] = useState<null | number>(null);\n\n const {center, radius, length} = useMemo(() => {\n const center_ = size / 2;\n const radius_ = center_ - strokeWidth;\n const length_ = Math.ceil(2 * Math.PI * radius_);\n\n return {center: center_, radius: radius_, length: length_};\n }, [size, strokeWidth]);\n\n useEffect(\n () => setOffset(Math.ceil(length * ((100 - progression) / 100))),\n [length, progression]\n );\n\n return (\n <div
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","useState","useEffect","CircularProgressBarPropTypes","style","ProgressionGradient","createElement","id","x1","y1","x2","y2","gradientUnits","stopColor","offset","CircularProgressBar","label","progression","size","strokeWidth","ariaLabel","dataName","setOffset","center","radius","length","center_","radius_","length_","Math","ceil","PI","className","container","role","svg","width","height","mainCircle","cx","cy","r","fill","progressionCircle","stroke","strokeDasharray","strokeDashoffset","_isNull","strokeLinecap","infos","propTypes","process","env","NODE_ENV"],"sources":["../../../src/atom/circular-progress-bar/index.tsx"],"sourcesContent":["import React, {useMemo, useState, useEffect} from 'react';\nimport {isNull} from 'lodash/fp';\nimport {LearningPriorityCardPropTypes, CircularProgressBarPropTypes} from './types';\nimport style from './style.css';\n\nconst ProgressionGradient = () => (\n <defs>\n <linearGradient\n id=\"gradient-stroke-progression\"\n x1=\"81\"\n y1=\"0\"\n x2=\"81\"\n y2=\"162\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#35CC7F\" />\n <stop offset=\"1\" stopColor=\"#55F2A7\" />\n </linearGradient>\n </defs>\n);\n\nconst CircularProgressBar = ({\n label,\n progression,\n size,\n strokeWidth,\n 'aria-label': ariaLabel,\n 'data-name': dataName\n}: LearningPriorityCardPropTypes) => {\n const [offset, setOffset] = useState<null | number>(null);\n\n const {center, radius, length} = useMemo(() => {\n const center_ = size / 2;\n const radius_ = center_ - strokeWidth;\n const length_ = Math.ceil(2 * Math.PI * radius_);\n\n return {center: center_, radius: radius_, length: length_};\n }, [size, strokeWidth]);\n\n useEffect(\n () => setOffset(Math.ceil(length * ((100 - progression) / 100))),\n [length, progression]\n );\n\n return (\n <div\n className={style.container}\n role=\"progressbar\"\n aria-label={ariaLabel}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={progression}\n data-name={dataName}\n >\n <svg className={style.svg} width={size} height={size}>\n <ProgressionGradient />\n <circle\n className={style.mainCircle}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={3}\n fill=\"transparent\"\n />\n <circle cx={center} cy={center} r={radius - (10 / radius) * 100} fill=\"#fafafa\" />\n <circle\n className={style.progressionCircle}\n cx={center}\n cy={center}\n r={radius}\n stroke={`url(#gradient-stroke-progression)`}\n strokeWidth={strokeWidth}\n strokeDasharray={length}\n strokeDashoffset={isNull(offset) ? length : offset}\n fill=\"transparent\"\n strokeLinecap=\"round\"\n />\n </svg>\n <div className={style.infos}>\n <span className={style.progression}>{progression}%</span>\n <span className={style.label}>{label}</span>\n </div>\n </div>\n );\n};\n\nCircularProgressBar.propTypes = CircularProgressBarPropTypes;\n\nexport default CircularProgressBar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,QAAO,OAAO;AAEzD,SAAuCC,4BAA4B,QAAO,SAAS;AACnF,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,mBAAmB,GAAGA,CAAA,kBAC1BN,KAAA,CAAAO,aAAA,4BACEP,KAAA,CAAAO,aAAA;EACEC,EAAE,EAAC,6BAA6B;EAChCC,EAAE,EAAC,IAAI;EACPC,EAAE,EAAC,GAAG;EACNC,EAAE,EAAC,IAAI;EACPC,EAAE,EAAC,KAAK;EACRC,aAAa,EAAC;AAAgB,gBAE9Bb,KAAA,CAAAO,aAAA;EAAMO,SAAS,EAAC;AAAS,CAAE,CAAC,eAC5Bd,KAAA,CAAAO,aAAA;EAAMQ,MAAM,EAAC,GAAG;EAACD,SAAS,EAAC;AAAS,CAAE,CACxB,CACZ,CACP;AAED,MAAME,mBAAmB,GAAGA,CAAC;EAC3BC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,WAAW;EACX,YAAY,EAAEC,SAAS;EACvB,WAAW,EAAEC;AACgB,CAAC,KAAK;EACnC,MAAM,CAACP,MAAM,EAAEQ,SAAS,CAAC,GAAGrB,QAAQ,CAAgB,IAAI,CAAC;EAEzD,MAAM;IAACsB,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGzB,OAAO,CAAC,MAAM;IAC7C,MAAM0B,OAAO,GAAGR,IAAI,GAAG,CAAC;IACxB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C;EAAS,CAAE,CAAC,eAClF3C,KAAA,CAAAO,aAAA;IACE0B,SAAS,EAAE5B,KAAK,CAACuC,iBAAkB;IACnCJ,EAAE,EAAEhB,MAAO;IACXiB,EAAE,EAAEjB,MAAO;IACXkB,CAAC,EAAEjB,MAAO;IACVoB,MAAM,EAAE,mCAAoC;IAC5CzB,WAAW,EAAEA,WAAY;IACzB0B,eAAe,EAAEpB,MAAO;IACxBqB,gBAAgB,EAAEC,OAAA,CAAOjC,MAAM,CAAC,GAAGW,MAAM,GAAGX,MAAO;IACnD4B,IAAI,EAAC,aAAa;IAClBM,aAAa,EAAC;EAAO,CACtB,CACE,CAAC,eACNjD,KAAA,CAAAO,aAAA;IAAK0B,SAAS,EAAE5B,KAAK,CAAC6C;EAAM,gBAC1BlD,KAAA,CAAAO,aAAA;IAAM0B,SAAS,EAAE5B,KAAK,CAACa;EAAY,GAAEA,WAAW,EAAC,GAAO,CAAC,eACzDlB,KAAA,CAAAO,aAAA;IAAM0B,SAAS,EAAE5B,KAAK,CAACY;EAAM,GAAEA,KAAY,CACxC,CACF,CAAC;AAEV,CAAC;AAEDD,mBAAmB,CAACmC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGlD,4BAA4B;AAE5D,eAAeY,mBAAmB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-select/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAK9C,QAAA,MAAM,WAAW;YAAW,gBAAgB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-select/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAK9C,QAAA,MAAM,WAAW;YAAW,gBAAgB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0HtE,CAAC;AAMF,eAAe,WAAW,CAAC"}
|
|
@@ -82,12 +82,12 @@ const InputSelect = (props, context) => {
|
|
|
82
82
|
[style.open]: open
|
|
83
83
|
})
|
|
84
84
|
}), /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: classnames(style.wrapper, className)
|
|
86
|
-
"aria-label": ariaLabel
|
|
85
|
+
className: classnames(style.wrapper, className)
|
|
87
86
|
}, /*#__PURE__*/React.createElement("button", {
|
|
88
87
|
type: "button",
|
|
89
88
|
className: style.display,
|
|
90
89
|
onClick: handleToggle,
|
|
90
|
+
"aria-label": ariaLabel,
|
|
91
91
|
"aria-haspopup": "listbox",
|
|
92
92
|
"aria-expanded": open,
|
|
93
93
|
"aria-controls": open ? `${componentId}-listbox` : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useState","useRef","useCallback","classnames","FontAwesomeIcon","Provider","GetSkinFromContext","style","propTypes","COMPONENT_ID","InputSelect","props","context","options","value","onChange","placeholder","className","ariaLabel","iconClosed","selectedIcon","buttonDataTestId","skin","primaryColor","_get","open","setOpen","wrapperRef","componentId","toLowerCase","replace","handleToggle","o","handleOnOptionClick","optionValue","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","selectedOption","find","opt","renderOption","option","handleClick","isSelected","createElement","key","selected","role","onClick","backgroundOption","backgroundColor","optionIcon","icon","optionLabel","label","checkIcon","color","shouldBeScrollable","length","container","ref","boxShadow","outerWrapper","wrapper","type","display","undefined","id","content","iconWrapper","rotated","menuWrapper","showFade","menu","map","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/atom/input-select/index.tsx"],"sourcesContent":["import React, {useState, useRef, useCallback} from 'react';\nimport classnames from 'classnames';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {IconName} from '@fortawesome/fontawesome-svg-core';\nimport {get} from 'lodash/fp';\nimport {WebContextValues} from '../provider/web-context';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport style from './style.css';\nimport type {InputSelectProps} from './types';\nimport propTypes from './types';\n\nconst COMPONENT_ID = 'input-select';\n\nconst InputSelect = (props: InputSelectProps, context: WebContextValues) => {\n const {\n options = [],\n value,\n onChange,\n placeholder,\n className,\n 'aria-label': ariaLabel,\n iconClosed = 'chevron-down',\n selectedIcon = 'circle-check',\n 'button-data-testid': buttonDataTestId = 'select-input'\n } = props;\n const skin = GetSkinFromContext(context);\n const primaryColor = get('common.primary', skin);\n const [open, setOpen] = useState(false);\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const componentId = `${COMPONENT_ID}-${\n placeholder?.toLowerCase().replace(/\\s+/g, '-') || 'default'\n }`;\n\n const handleToggle = useCallback(() => {\n setOpen(o => !o);\n }, []);\n\n const handleOnOptionClick = useCallback(\n (optionValue: string) => {\n onChange(optionValue);\n setOpen(false);\n },\n [onChange]\n );\n\n React.useEffect(() => {\n if (!open) return;\n const handleClickOutside = (event: MouseEvent) => {\n if (!wrapperRef.current?.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [open]);\n\n const selectedOption = options.find(opt => opt.value === value);\n\n const renderOption = (option: InputSelectProps['options'][0]) => {\n function handleClick() {\n handleOnOptionClick(option.value);\n }\n\n const isSelected = option.value === value;\n\n return (\n <li\n key={option.value}\n className={classnames(style.option, isSelected && style.selected)}\n role=\"option\"\n aria-selected={isSelected}\n onClick={handleClick}\n data-testid={`option-${option.value}`}\n data-name={option['data-name']}\n >\n <div className={style.backgroundOption} style={{backgroundColor: primaryColor}} />\n <span className={style.optionIcon}>{option.icon}</span>\n <span className={style.optionLabel}>{option.label}</span>\n {isSelected ? (\n <span className={style.checkIcon}>\n <FontAwesomeIcon icon={selectedIcon as IconName} color={primaryColor} />\n </span>\n ) : null}\n </li>\n );\n };\n\n const shouldBeScrollable = options.length > 6;\n\n return (\n <div className={style.container} ref={wrapperRef}>\n <div\n style={{\n boxShadow: open\n ? `0 0 0 2px white, 0 0 0 4px${primaryColor}`\n : `0 0 0 2px ${primaryColor}`\n }}\n className={classnames(style.outerWrapper, {\n [style.open]: open\n })}\n />\n <div className={classnames(style.wrapper, className)} aria-label={ariaLabel}>\n <button\n type=\"button\"\n className={style.display}\n onClick={handleToggle}\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n aria-controls={open ? `${componentId}-listbox` : undefined}\n id={componentId}\n data-testid={buttonDataTestId}\n >\n <div className={style.content}>\n <span className={style.label}>{placeholder}</span>\n {selectedOption ? <span className={style.value}>{selectedOption.label}</span> : null}\n </div>\n <span className={classnames(style.iconWrapper, {[style.open]: open})}>\n <FontAwesomeIcon\n className={classnames(style.icon, {[style.rotated]: open})}\n icon={iconClosed as IconName}\n />\n </span>\n </button>\n </div>\n {open ? (\n <div className={classnames(style.menuWrapper, {[style.showFade]: shouldBeScrollable})}>\n <ul id={`${componentId}-listbox`} className={style.menu} role=\"listbox\">\n {options.map(renderOption)}\n </ul>\n </div>\n ) : null}\n </div>\n );\n};\n\nInputSelect.propTypes = propTypes;\nInputSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\nexport default InputSelect;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,QAAO,OAAO;AAC1D,OAAOC,UAAU,MAAM,YAAY;AACnC,SAAQC,eAAe,QAAO,gCAAgC;AAI9D,OAAOC,QAAQ,IAAGC,kBAAkB,QAAO,aAAa;AACxD,OAAOC,KAAK,MAAM,aAAa;AAE/B,OAAOC,SAAS,MAAM,SAAS;AAE/B,MAAMC,YAAY,GAAG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CAACiB,KAAY,CAAC,GAAG,IAC7E,CAAC,eACN9D,KAAA,CAAAoD,aAAA;IAAMlC,SAAS,EAAEd,UAAU,CAACI,KAAK,CAACqE,WAAW,EAAE;MAAC,CAACrE,KAAK,CAACkB,IAAI,GAAGA;IAAI,CAAC;EAAE,gBACnE1B,KAAA,CAAAoD,aAAA,CAAC/C,eAAe;IACda,SAAS,EAAEd,UAAU,CAACI,KAAK,CAACoD,IAAI,EAAE;MAAC,CAACpD,KAAK,CAACsE,OAAO,GAAGpD;IAAI,CAAC,CAAE;IAC3DkC,IAAI,EAAExC;EAAuB,CAC9B,CACG,CACA,CACL,CAAC,EACLM,IAAI,gBACH1B,KAAA,CAAAoD,aAAA;IAAKlC,SAAS,EAAEd,UAAU,CAACI,KAAK,CAACuE,WAAW,EAAE;MAAC,CAACvE,KAAK,CAACwE,QAAQ,GAAGf;IAAkB,CAAC;EAAE,gBACpFjE,KAAA,CAAAoD,aAAA;IAAIuB,EAAE,EAAE,GAAG9C,WAAW,UAAW;IAACX,SAAS,EAAEV,KAAK,CAACyE,IAAK;IAAC1B,IAAI,EAAC;EAAS,GACpEzC,OAAO,CAACoE,GAAG,CAAClC,YAAY,CACvB,CACD,CAAC,GACJ,IACD,CAAC;AAEV,CAAC;AAEDrC,WAAW,CAACF,SAAS,GAAA0E,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG5E,SAAS;AACjCE,WAAW,CAAC2E,YAAY,GAAG;EACzB/D,IAAI,EAAEjB,QAAQ,CAACiF,iBAAiB,CAAChE;AACnC,CAAC;AACD,eAAeZ,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useRef","useCallback","classnames","FontAwesomeIcon","Provider","GetSkinFromContext","style","propTypes","COMPONENT_ID","InputSelect","props","context","options","value","onChange","placeholder","className","ariaLabel","iconClosed","selectedIcon","buttonDataTestId","skin","primaryColor","_get","open","setOpen","wrapperRef","componentId","toLowerCase","replace","handleToggle","o","handleOnOptionClick","optionValue","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","selectedOption","find","opt","renderOption","option","handleClick","isSelected","createElement","key","selected","role","onClick","backgroundOption","backgroundColor","optionIcon","icon","optionLabel","label","checkIcon","color","shouldBeScrollable","length","container","ref","boxShadow","outerWrapper","wrapper","type","display","undefined","id","content","iconWrapper","rotated","menuWrapper","showFade","menu","map","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/atom/input-select/index.tsx"],"sourcesContent":["import React, {useState, useRef, useCallback} from 'react';\nimport classnames from 'classnames';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {IconName} from '@fortawesome/fontawesome-svg-core';\nimport {get} from 'lodash/fp';\nimport {WebContextValues} from '../provider/web-context';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport style from './style.css';\nimport type {InputSelectProps} from './types';\nimport propTypes from './types';\n\nconst COMPONENT_ID = 'input-select';\n\nconst InputSelect = (props: InputSelectProps, context: WebContextValues) => {\n const {\n options = [],\n value,\n onChange,\n placeholder,\n className,\n 'aria-label': ariaLabel,\n iconClosed = 'chevron-down',\n selectedIcon = 'circle-check',\n 'button-data-testid': buttonDataTestId = 'select-input'\n } = props;\n const skin = GetSkinFromContext(context);\n const primaryColor = get('common.primary', skin);\n const [open, setOpen] = useState(false);\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const componentId = `${COMPONENT_ID}-${\n placeholder?.toLowerCase().replace(/\\s+/g, '-') || 'default'\n }`;\n\n const handleToggle = useCallback(() => {\n setOpen(o => !o);\n }, []);\n\n const handleOnOptionClick = useCallback(\n (optionValue: string) => {\n onChange(optionValue);\n setOpen(false);\n },\n [onChange]\n );\n\n React.useEffect(() => {\n if (!open) return;\n const handleClickOutside = (event: MouseEvent) => {\n if (!wrapperRef.current?.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [open]);\n\n const selectedOption = options.find(opt => opt.value === value);\n\n const renderOption = (option: InputSelectProps['options'][0]) => {\n function handleClick() {\n handleOnOptionClick(option.value);\n }\n\n const isSelected = option.value === value;\n\n return (\n <li\n key={option.value}\n className={classnames(style.option, isSelected && style.selected)}\n role=\"option\"\n aria-selected={isSelected}\n onClick={handleClick}\n data-testid={`option-${option.value}`}\n data-name={option['data-name']}\n >\n <div className={style.backgroundOption} style={{backgroundColor: primaryColor}} />\n <span className={style.optionIcon}>{option.icon}</span>\n <span className={style.optionLabel}>{option.label}</span>\n {isSelected ? (\n <span className={style.checkIcon}>\n <FontAwesomeIcon icon={selectedIcon as IconName} color={primaryColor} />\n </span>\n ) : null}\n </li>\n );\n };\n\n const shouldBeScrollable = options.length > 6;\n\n return (\n <div className={style.container} ref={wrapperRef}>\n <div\n style={{\n boxShadow: open\n ? `0 0 0 2px white, 0 0 0 4px${primaryColor}`\n : `0 0 0 2px ${primaryColor}`\n }}\n className={classnames(style.outerWrapper, {\n [style.open]: open\n })}\n />\n <div className={classnames(style.wrapper, className)}>\n <button\n type=\"button\"\n className={style.display}\n onClick={handleToggle}\n aria-label={ariaLabel}\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n aria-controls={open ? `${componentId}-listbox` : undefined}\n id={componentId}\n data-testid={buttonDataTestId}\n >\n <div className={style.content}>\n <span className={style.label}>{placeholder}</span>\n {selectedOption ? <span className={style.value}>{selectedOption.label}</span> : null}\n </div>\n <span className={classnames(style.iconWrapper, {[style.open]: open})}>\n <FontAwesomeIcon\n className={classnames(style.icon, {[style.rotated]: open})}\n icon={iconClosed as IconName}\n />\n </span>\n </button>\n </div>\n {open ? (\n <div className={classnames(style.menuWrapper, {[style.showFade]: shouldBeScrollable})}>\n <ul id={`${componentId}-listbox`} className={style.menu} role=\"listbox\">\n {options.map(renderOption)}\n </ul>\n </div>\n ) : null}\n </div>\n );\n};\n\nInputSelect.propTypes = propTypes;\nInputSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n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F,iBAAiB,CAAChE;AACnC,CAAC;AACD,eAAeZ,WAAW","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@ const InputTextWithTitle = props => {
|
|
|
13
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
14
|
className: style.container,
|
|
15
15
|
"data-name": dataName,
|
|
16
|
+
role: "group",
|
|
16
17
|
"aria-label": ariaLabel
|
|
17
18
|
}, title ? /*#__PURE__*/React.createElement("span", {
|
|
18
19
|
className: style.title
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","InputText","style","InputTextWithTitle","props","inputText","title","dataName","ariaLabel","inputTextClass","size","smallInputText","defaultInputText","createElement","className","container","propTypes","process","env","NODE_ENV","shape","theme","string"],"sources":["../../../src/atom/input-text-with-title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputText from '../input-text';\nimport style from './style.css';\n\nconst InputTextWithTitle = props => {\n const {inputText, title, 'data-name': dataName, 'aria-label': ariaLabel} = props;\n const inputTextClass = inputText.size === 'small' ? style.smallInputText : style.defaultInputText;\n\n return (\n <div className={style.container} data-name={dataName} aria-label={ariaLabel}>\n {title ? <span className={style.title}>{title}</span> : null}\n <div className={inputTextClass}>\n <InputText {...inputText} />\n </div>\n </div>\n );\n};\n\nInputTextWithTitle.propTypes = {\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string,\n size: PropTypes.string\n }),\n title: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputTextWithTitle;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;EAClC,MAAM;IAACC,SAAS;IAAEC,KAAK;IAAE,WAAW,EAAEC,QAAQ;IAAE,YAAY,EAAEC;EAAS,CAAC,GAAGJ,KAAK;EAChF,MAAMK,cAAc,GAAGJ,SAAS,CAACK,IAAI,KAAK,OAAO,GAAGR,KAAK,CAACS,cAAc,GAAGT,KAAK,CAACU,gBAAgB;EAEjG,oBACEb,KAAA,CAAAc,aAAA;IAAKC,SAAS,EAAEZ,KAAK,CAACa,SAAU;IAAC,aAAWR,QAAS;IAAC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","InputText","style","InputTextWithTitle","props","inputText","title","dataName","ariaLabel","inputTextClass","size","smallInputText","defaultInputText","createElement","className","container","role","propTypes","process","env","NODE_ENV","shape","theme","string"],"sources":["../../../src/atom/input-text-with-title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputText from '../input-text';\nimport style from './style.css';\n\nconst InputTextWithTitle = props => {\n const {inputText, title, 'data-name': dataName, 'aria-label': ariaLabel} = props;\n const inputTextClass = inputText.size === 'small' ? style.smallInputText : style.defaultInputText;\n\n return (\n <div className={style.container} data-name={dataName} role=\"group\" aria-label={ariaLabel}>\n {title ? <span className={style.title}>{title}</span> : null}\n <div className={inputTextClass}>\n <InputText {...inputText} />\n </div>\n </div>\n );\n};\n\nInputTextWithTitle.propTypes = {\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string,\n size: PropTypes.string\n }),\n title: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputTextWithTitle;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;EAClC,MAAM;IAACC,SAAS;IAAEC,KAAK;IAAE,WAAW,EAAEC,QAAQ;IAAE,YAAY,EAAEC;EAAS,CAAC,GAAGJ,KAAK;EAChF,MAAMK,cAAc,GAAGJ,SAAS,CAACK,IAAI,KAAK,OAAO,GAAGR,KAAK,CAACS,cAAc,GAAGT,KAAK,CAACU,gBAAgB;EAEjG,oBACEb,KAAA,CAAAc,aAAA;IAAKC,SAAS,EAAEZ,KAAK,CAACa,SAAU;IAAC,aAAWR,QAAS;IAACS,IAAI,EAAC,OAAO;IAAC,cAAYR;EAAU,GACtFF,KAAK,gBAAGP,KAAA,CAAAc,aAAA;IAAMC,SAAS,EAAEZ,KAAK,CAACI;EAAM,GAAEA,KAAY,CAAC,GAAG,IAAI,eAC5DP,KAAA,CAAAc,aAAA;IAAKC,SAAS,EAAEL;EAAe,gBAC7BV,KAAA,CAAAc,aAAA,CAACZ,SAAS,EAAKI,SAAY,CACxB,CACF,CAAC;AAEV,CAAC;AAEDF,kBAAkB,CAACc,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAC7Bf,SAAS,EAAEL,SAAS,CAACqB,KAAK,CAAC;IACzB,GAAGpB,SAAS,CAACgB,SAAS;IACtBK,KAAK,EAAEtB,SAAS,CAACuB,MAAM;IACvBb,IAAI,EAAEV,SAAS,CAACuB;EAClB,CAAC,CAAC;EACFjB,KAAK,EAAEN,SAAS,CAACuB,MAAM;EACvB,YAAY,EAAEvB,SAAS,CAACuB,MAAM;EAC9B,WAAW,EAAEvB,SAAS,CAACuB;AACzB,CAAC;AACD,eAAepB,kBAAkB","ignoreList":[]}
|
|
@@ -67,6 +67,7 @@ declare const RadioWithTitle: {
|
|
|
67
67
|
href: import("prop-types").Requireable<string>;
|
|
68
68
|
download: import("prop-types").Requireable<boolean>;
|
|
69
69
|
target: import("prop-types").Requireable<string>;
|
|
70
|
+
rel: import("prop-types").Requireable<string>;
|
|
70
71
|
}>>;
|
|
71
72
|
hoverBackgroundColor: import("prop-types").Requireable<string>;
|
|
72
73
|
hoverColor: import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -65,6 +65,7 @@ export declare const propTypes: {
|
|
|
65
65
|
href: PropTypes.Requireable<string>;
|
|
66
66
|
download: PropTypes.Requireable<boolean>;
|
|
67
67
|
target: PropTypes.Requireable<string>;
|
|
68
|
+
rel: PropTypes.Requireable<string>;
|
|
68
69
|
}>>;
|
|
69
70
|
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
70
71
|
hoverColor: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -56,6 +56,7 @@ const ReviewPresentation = props => {
|
|
|
56
56
|
} = props;
|
|
57
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
58
58
|
className: style.reviewWrapper,
|
|
59
|
+
role: "group",
|
|
59
60
|
"aria-label": ariaLabel
|
|
60
61
|
}, /*#__PURE__*/React.createElement("div", {
|
|
61
62
|
className: style.reviewTitle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","ToolTip","style","propTypes","ICONS","skills","questions","lifes","allright","ReviewIcon","icon","Icon","createElement","className","labelIcon","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","tabIndex","reviewListText","text","TooltipContent","tooltipText","closeToolTipInformationTextAriaLabel","moreDetailsAriaLabel","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","dangerouslySetInnerHTML","__html","reviewListWrapper","convert","cap","key","reviewList","process","env","NODE_ENV","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip from '../tooltip';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst ReviewIcon = ({icon}) => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n TooltipContent={label.tooltipText}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n aria-label={label.moreDetailsAriaLabel}\n />\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: ToolTip.propTypes.tooltipText,\n moreDetailsAriaLabel: ToolTip.propTypes['aria-label'],\n closeToolTipInformationTextAriaLabel: ToolTip.propTypes.closeToolTipInformationTextAriaLabel,\n text: PropTypes.string\n })\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,6BAA6B,IAAIC,SAAS,EAC1CC,+CAA+C,IAAIC,YAAY,EAC/DC,yCAAyC,IAAIC,UAAU,QAClD,0BAA0B;AACjC,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,MAAM,cAAc;AAEpC,MAAMC,KAAK,GAAG;EACZC,MAAM,EAAEL,UAAU;EAClBM,SAAS,EAAER,YAAY;EACvBS,KAAK,EAAEX,SAAS;EAChBY,QAAQ,EAAEd;AACZ,CAAC;AAED,MAAMe,UAAU,GAAGA,CAAC;EAACC;AAAI,CAAC,KAAK;EAC7B,MAAMC,IAAI,GAAGpB,KAAK,CAAC,IAAI,EAAEmB,IAAI,EAAEN,KAAK,CAAC;;EAErC;EACA,IAAI,CAACO,IAAI,EAAE;IACT,oBAAOtB,KAAA,CAAAuB,aAAA;MAAKC,SAAS,EAAEX,KAAK,CAACY;IAAU,CAAE,CAAC;EAC5C;EACA,oBAAOzB,KAAA,CAAAuB,aAAA,CAACD,IAAI;IAACE,SAAS,EAAEX,KAAK,CAACY;EAAU,CAAE,CAAC;AAC7C,CAAC;AAED,MAAMC,qBAAqB,GAAGA,CAAC;EAACC,OAAO;EAAEC;AAAK,CAAC,KAAK;EAClD,oBACE5B,KAAA,CAAAuB,aAAA;IAAKC,SAAS,EAAEX,KAAK,CAACgB,qBAAsB;IAAC,gBAAQ;IAAC,YAAS,gBAAgB;IAACC,QAAQ,EAAE;EAAE,gBAC1F9B,KAAA,CAAAuB,aAAA;IAAKC,SAAS,EAAEX,KAAK,CAACkB;EAAe,gBACnC/B,KAAA,CAAAuB,aAAA,CAACH,UAAU;IAACC,IAAI,EAAEM;EAAQ,CAAE,CAAC,KAAC,EAACC,KAAK,CAACI,IAClC,CAAC,eACNhC,KAAA,CAAAuB,aAAA,CAACX,OAAO;IACNqB,cAAc,EAAEL,KAAK,CAACM,WAAY;IAClCC,oCAAoC,EAAEP,KAAK,CAACO,oCAAqC;IACjF,eAAa,mCAAmCR,OAAO,EAAG;IAC1D,cAAYC,KAAK,CAACQ;EAAqB,CACxC,CACE,CAAC;AAEV,CAAC;AAED,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;EAClC,MAAM;IAAC,YAAY,EAAEC,SAAS;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAU,CAAC,GAAGJ,KAAK;EAE5E,oBACEtC,KAAA,CAAAuB,aAAA;IAAKC,SAAS,EAAEX,KAAK,CAAC8B,aAAc;IAAC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","ToolTip","style","propTypes","ICONS","skills","questions","lifes","allright","ReviewIcon","icon","Icon","createElement","className","labelIcon","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","tabIndex","reviewListText","text","TooltipContent","tooltipText","closeToolTipInformationTextAriaLabel","moreDetailsAriaLabel","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","role","dangerouslySetInnerHTML","__html","reviewListWrapper","convert","cap","key","reviewList","process","env","NODE_ENV","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip from '../tooltip';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst ReviewIcon = ({icon}) => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n TooltipContent={label.tooltipText}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n aria-label={label.moreDetailsAriaLabel}\n />\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} role=\"group\" aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: ToolTip.propTypes.tooltipText,\n moreDetailsAriaLabel: ToolTip.propTypes['aria-label'],\n closeToolTipInformationTextAriaLabel: ToolTip.propTypes.closeToolTipInformationTextAriaLabel,\n text: PropTypes.string\n })\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,6BAA6B,IAAIC,SAAS,EAC1CC,+CAA+C,IAAIC,YAAY,EAC/DC,yCAAyC,IAAIC,UAAU,QAClD,0BAA0B;AACjC,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,MAAM,cAAc;AAEpC,MAAMC,KAAK,GAAG;EACZC,MAAM,EAAEL,UAAU;EAClBM,SAAS,EAAER,YAAY;EACvBS,KAAK,EAAEX,SAAS;EAChBY,QAAQ,EAAEd;AACZ,CAAC;AAED,MAAMe,UAAU,GAAGA,CAAC;EAACC;AAAI,CAAC,KAAK;EAC7B,MAAMC,IAAI,GAAGpB,KAAK,CAAC,IAAI,EAAEmB,IAAI,EAAEN,KAAK,CAAC;;EAErC;EACA,IAAI,CAACO,IAAI,EAAE;IACT,oBAAOtB,KAAA,CAAAuB,aAAA;MAAKC,SAAS,EAAEX,KAAK,CAACY;IAAU,CAAE,CAAC;EAC5C;EACA,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@ -65,6 +65,7 @@ declare namespace Title {
|
|
|
65
65
|
href: PropTypes.Requireable<string>;
|
|
66
66
|
download: PropTypes.Requireable<boolean>;
|
|
67
67
|
target: PropTypes.Requireable<string>;
|
|
68
|
+
rel: PropTypes.Requireable<string>;
|
|
68
69
|
}>>;
|
|
69
70
|
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
70
71
|
hoverColor: PropTypes.Requireable<string>;
|
package/es/atom/title/index.js
CHANGED
|
@@ -85,6 +85,7 @@ const Title = props => {
|
|
|
85
85
|
}, /*#__PURE__*/React.createElement("div", {
|
|
86
86
|
className: titleStyle,
|
|
87
87
|
"data-name": dataName,
|
|
88
|
+
role: "group",
|
|
88
89
|
"aria-label": ariaLabel
|
|
89
90
|
}, title, required ? /*#__PURE__*/React.createElement("span", {
|
|
90
91
|
className: style.required
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","ButtonLink","style","getTitleStyle","type","size","titlePage","titleFormGroup","titleFormGroupLightWeight","xlStrongTitle","mediumTitleFormGroup","mediumAndLightColorTitleFormGroup","smallTitleFormGroup","smallAndLightTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","subtitleFormGroupWithoutMargin","mediumSubtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","button","required","ariaLabel","titleStyle","subtitleStyle","subtitleSection","createElement","className","dangerouslySetInnerHTML","__html","container","_extends","titleContainer","titleContent","_isEmpty","propTypes","process","env","NODE_ENV","string","oneOf","shape","bool"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'standard-light-weight':\n return style.titleFormGroupLightWeight;\n case 'xl-strong':\n return style.xlStrongTitle;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'medium-light-color':\n return style.mediumAndLightColorTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n case 'small-and-light':\n return style.smallAndLightTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'standard-without-margin':\n return style.subtitleFormGroupWithoutMargin;\n case 'medium':\n return style.mediumSubtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag,\n button,\n required,\n ariaLabel\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? (\n <div\n className={subtitleStyle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: subtitle}}\n />\n ) : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div className={style.titleContainer}>\n <div className={style.titleContent}>\n <div className={titleStyle} data-name={dataName} aria-label={ariaLabel}>\n {title}\n {required ? <span className={style.required}>*</span> : null}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n {!isEmpty(button) ? <ButtonLink {...button} /> : null}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n ariaLabel: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf([\n 'xl-strong',\n 'standard',\n 'standard-light-weight',\n 'medium',\n 'medium-light-color',\n 'small',\n 'small-and-light'\n ]),\n subtitleSize: PropTypes.oneOf([\n 'standard',\n 'standard-without-margin',\n 'medium',\n 'small',\n 'small-without-margin',\n 'extra-small'\n ]),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes),\n button: PropTypes.shape(ButtonLink.propTypes),\n required: PropTypes.bool\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,GAAG,MAAM,QAAQ;AACxB,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,aAAa,GAAGA,CAACC,IAAI,EAAEC,IAAI,KAAK;EACpC,QAAQD,IAAI;IACV,KAAK,MAAM;MACT,OAAOF,KAAK,CAACI,SAAS;IACxB,KAAK,YAAY;MACf,QAAQD,IAAI;QACV,KAAK,UAAU;UACb,OAAOH,KAAK,CAACK,cAAc;QAC7B,KAAK,uBAAuB;UAC1B,OAAOL,KAAK,CAACM,yBAAyB;QACxC,KAAK,WAAW;UACd,OAAON,KAAK,CAACO,aAAa;QAC5B,KAAK,QAAQ;UACX,OAAOP,KAAK,CAACQ,oBAAoB;QACnC,KAAK,oBAAoB;UACvB,OAAOR,KAAK,CAACS,iCAAiC;QAChD,KAAK,OAAO;UACV,OAAOT,KAAK,CAACU,mBAAmB;QAClC,KAAK,iBAAiB;UACpB,OAAOV,KAAK,CAACW,2BAA2B;MAC5C;EACJ;AACF,CAAC;AAED,MAAMC,gBAAgB,GAAGA,CAACV,IAAI,EAAEC,IAAI,KAAK;EACvC,QAAQD,IAAI;IACV,KAAK,MAAM;MACT,OAAOF,KAAK,CAACa,YAAY;IAC3B,KAAK,YAAY;MACf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AwC,aAAA;IAAKC,SAAS,EAAEpC,KAAK,CAAC0C;EAAa,gBACjC/C,KAAA,CAAAwC,aAAA;IAAKC,SAAS,EAAEJ,UAAW;IAAC,aAAWR,QAAS;IAAC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","ButtonLink","style","getTitleStyle","type","size","titlePage","titleFormGroup","titleFormGroupLightWeight","xlStrongTitle","mediumTitleFormGroup","mediumAndLightColorTitleFormGroup","smallTitleFormGroup","smallAndLightTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","subtitleFormGroupWithoutMargin","mediumSubtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","button","required","ariaLabel","titleStyle","subtitleStyle","subtitleSection","createElement","className","dangerouslySetInnerHTML","__html","container","_extends","titleContainer","titleContent","role","_isEmpty","propTypes","process","env","NODE_ENV","string","oneOf","shape","bool"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'standard-light-weight':\n return style.titleFormGroupLightWeight;\n case 'xl-strong':\n return style.xlStrongTitle;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'medium-light-color':\n return style.mediumAndLightColorTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n case 'small-and-light':\n return style.smallAndLightTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'standard-without-margin':\n return style.subtitleFormGroupWithoutMargin;\n case 'medium':\n return style.mediumSubtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag,\n button,\n required,\n ariaLabel\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? (\n <div\n className={subtitleStyle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: subtitle}}\n />\n ) : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div className={style.titleContainer}>\n <div className={style.titleContent}>\n <div className={titleStyle} data-name={dataName} role=\"group\" aria-label={ariaLabel}>\n {title}\n {required ? <span className={style.required}>*</span> : null}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n {!isEmpty(button) ? <ButtonLink {...button} /> : null}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n ariaLabel: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf([\n 'xl-strong',\n 'standard',\n 'standard-light-weight',\n 'medium',\n 'medium-light-color',\n 'small',\n 'small-and-light'\n ]),\n subtitleSize: PropTypes.oneOf([\n 'standard',\n 'standard-without-margin',\n 'medium',\n 'small',\n 'small-without-margin',\n 'extra-small'\n ]),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes),\n button: PropTypes.shape(ButtonLink.propTypes),\n required: PropTypes.bool\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS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vB,CAAC,EACLM,eACE,CAAC,EACL,CAACU,QAAA,CAAQf,MAAM,CAAC,gBAAGlC,KAAA,CAAAwC,aAAA,CAACpC,UAAU,EAAK8B,MAAS,CAAC,GAAG,IAC9C,CACF,CAAC;AAEV,CAAC;AAEDT,KAAK,CAACyB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EAChB1B,KAAK,EAAE1B,SAAS,CAACqD,MAAM;EACvB1B,QAAQ,EAAE3B,SAAS,CAACqD,MAAM;EAC1BlB,SAAS,EAAEnC,SAAS,CAACqD,MAAM;EAC3B/C,IAAI,EAAEN,SAAS,CAACsD,KAAK,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;EAC7C,WAAW,EAAEtD,SAAS,CAACqD,MAAM;EAC7BxB,SAAS,EAAE7B,SAAS,CAACsD,KAAK,CAAC,CACzB,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,QAAQ,EACR,oBAAoB,EACpB,OAAO,EACP,iBAAiB,CAClB,CAAC;EACFxB,YAAY,EAAE9B,SAAS,CAACsD,KAAK,CAAC,CAC5B,UAAU,EACV,yBAAyB,EACzB,QAAQ,EACR,OAAO,EACP,sBAAsB,EACtB,aAAa,CACd,CAAC;EACFvB,IAAI,EAAE/B,SAAS,CAACuD,KAAK,CAACtD,IAAI,CAACgD,SAAS,CAAC;EACrCjB,GAAG,EAAEhC,SAAS,CAACuD,KAAK,CAACrD,GAAG,CAAC+C,SAAS,CAAC;EACnChB,MAAM,EAAEjC,SAAS,CAACuD,KAAK,CAACpD,UAAU,CAAC8C,SAAS,CAAC;EAC7Cf,QAAQ,EAAElC,SAAS,CAACwD;AACtB,CAAC;AACD,eAAehC,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AA8EO,iGAUN;;AAED;;;;;;;;;;;;;;gBAgHC"}
|
package/es/atom/tooltip/index.js
CHANGED
|
@@ -44,6 +44,7 @@ const ToolTipWrapper = ({
|
|
|
44
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
45
45
|
className: coorpToolTipClasses,
|
|
46
46
|
"data-testid": "tooltip",
|
|
47
|
+
role: "group",
|
|
47
48
|
"aria-label": closeToolTipInformationTextAriaLabel,
|
|
48
49
|
onMouseOver: handleContentMouseOver
|
|
49
50
|
}, content);
|