@coorpacademy/components 11.32.24-alpha.0 → 11.32.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/index.js +4 -2
- package/es/atom/button-link/index.js.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 +1 -0
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/circular-progress-bar/index.d.ts.map +1 -1
- package/es/atom/circular-progress-bar/index.js +2 -9
- package/es/atom/circular-progress-bar/index.js.map +1 -1
- package/es/atom/input-doublestep/index.d.ts +1 -0
- package/es/atom/input-doublestep/index.d.ts.map +1 -1
- package/es/atom/input-doublestep/index.js +38 -13
- package/es/atom/input-doublestep/index.js.map +1 -1
- package/es/atom/input-doublestep/style.css +7 -67
- package/es/atom/select/index.js +1 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/molecule/base-modal/index.d.ts +1 -0
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +8 -6
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/brand-create-form/index.d.ts.map +1 -1
- package/es/molecule/brand-create-form/index.js +9 -4
- package/es/molecule/brand-create-form/index.js.map +1 -1
- package/es/molecule/brand-download-box/index.d.ts.map +1 -1
- package/es/molecule/brand-download-box/index.js +11 -6
- package/es/molecule/brand-download-box/index.js.map +1 -1
- package/es/molecule/brand-download-box/style.css +6 -5
- package/es/molecule/brand-form-group/index.d.ts.map +1 -1
- package/es/molecule/brand-form-group/index.js +12 -1
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +1 -1
- package/es/molecule/cm-popin/types.d.ts +3 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/discipline-associated-skills/index.js +1 -1
- package/es/molecule/discipline-associated-skills/index.js.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +1 -0
- 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/learning-priority-modal/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-modal/index.js +8 -15
- package/es/molecule/learning-priority-modal/index.js.map +1 -1
- package/es/molecule/learning-priority-modal/style.css +0 -1
- package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-setup-item/index.js +1 -1
- package/es/molecule/learning-priority-setup-item/index.js.map +1 -1
- package/es/molecule/setup-section/index.d.ts.map +1 -1
- package/es/molecule/setup-section/index.js +3 -1
- package/es/molecule/setup-section/index.js.map +1 -1
- package/es/molecule/setup-section/style.css +2 -2
- package/es/molecule/skill-picker-modal/index.js +1 -1
- package/es/molecule/skill-picker-modal/index.js.map +1 -1
- package/es/organism/brand-form/index.d.ts.map +1 -1
- package/es/organism/brand-form/index.js +24 -15
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/brand-learning-priorities/index.d.ts +1 -21
- package/es/organism/brand-learning-priorities/index.d.ts.map +1 -1
- package/es/organism/brand-learning-priorities/index.js +1 -14
- package/es/organism/brand-learning-priorities/index.js.map +1 -1
- package/es/organism/brand-learning-priorities/style.css +2 -0
- package/es/organism/list-item/index.d.ts +3 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +7 -5
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-items/index.d.ts +3 -0
- package/es/organism/setup-header/index.d.ts +4 -0
- package/es/organism/wizard-contents/index.d.ts +3 -0
- package/es/template/app-player/loading/index.d.ts +3 -0
- package/es/template/app-player/player/index.d.ts +6 -0
- package/es/template/app-player/player/slides/index.d.ts +3 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +3 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +3 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +3 -0
- package/es/template/app-review/prop-types.d.ts.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 +14 -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/common/dashboard/index.d.ts +6 -0
- package/es/template/common/search-page/index.d.ts +3 -0
- package/es/template/external-course/index.d.ts +3 -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/index.js +4 -2
- package/lib/atom/button-link/index.js.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 +1 -0
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/circular-progress-bar/index.d.ts.map +1 -1
- package/lib/atom/circular-progress-bar/index.js +1 -8
- package/lib/atom/circular-progress-bar/index.js.map +1 -1
- package/lib/atom/input-doublestep/index.d.ts +1 -0
- package/lib/atom/input-doublestep/index.d.ts.map +1 -1
- package/lib/atom/input-doublestep/index.js +39 -13
- package/lib/atom/input-doublestep/index.js.map +1 -1
- package/lib/atom/input-doublestep/style.css +7 -67
- package/lib/atom/select/index.js +1 -1
- package/lib/atom/select/index.js.map +1 -1
- package/lib/molecule/base-modal/index.d.ts +1 -0
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +8 -6
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/brand-create-form/index.d.ts.map +1 -1
- package/lib/molecule/brand-create-form/index.js +9 -4
- package/lib/molecule/brand-create-form/index.js.map +1 -1
- package/lib/molecule/brand-download-box/index.d.ts.map +1 -1
- package/lib/molecule/brand-download-box/index.js +11 -6
- package/lib/molecule/brand-download-box/index.js.map +1 -1
- package/lib/molecule/brand-download-box/style.css +6 -5
- package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
- package/lib/molecule/brand-form-group/index.js +12 -1
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +1 -1
- package/lib/molecule/cm-popin/types.d.ts +3 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/discipline-associated-skills/index.js +1 -1
- package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +1 -0
- 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/learning-priority-modal/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-modal/index.js +9 -14
- package/lib/molecule/learning-priority-modal/index.js.map +1 -1
- package/lib/molecule/learning-priority-modal/style.css +0 -1
- package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-setup-item/index.js +1 -1
- package/lib/molecule/learning-priority-setup-item/index.js.map +1 -1
- package/lib/molecule/setup-section/index.d.ts.map +1 -1
- package/lib/molecule/setup-section/index.js +4 -1
- package/lib/molecule/setup-section/index.js.map +1 -1
- package/lib/molecule/setup-section/style.css +2 -2
- package/lib/molecule/skill-picker-modal/index.js +1 -1
- package/lib/molecule/skill-picker-modal/index.js.map +1 -1
- package/lib/organism/brand-form/index.d.ts.map +1 -1
- package/lib/organism/brand-form/index.js +24 -15
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +1 -21
- package/lib/organism/brand-learning-priorities/index.d.ts.map +1 -1
- package/lib/organism/brand-learning-priorities/index.js +3 -15
- package/lib/organism/brand-learning-priorities/index.js.map +1 -1
- package/lib/organism/brand-learning-priorities/style.css +2 -0
- package/lib/organism/list-item/index.d.ts +3 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +7 -5
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +3 -0
- package/lib/organism/setup-header/index.d.ts +4 -0
- package/lib/organism/wizard-contents/index.d.ts +3 -0
- package/lib/template/app-player/loading/index.d.ts +3 -0
- package/lib/template/app-player/player/index.d.ts +6 -0
- package/lib/template/app-player/player/slides/index.d.ts +3 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +3 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +3 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +3 -0
- package/lib/template/app-review/prop-types.d.ts.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 +14 -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/common/dashboard/index.d.ts +6 -0
- package/lib/template/common/search-page/index.d.ts +3 -0
- package/lib/template/external-course/index.d.ts +3 -0
- package/package.json +2 -2
|
@@ -21,6 +21,7 @@ declare namespace BrandUpdate {
|
|
|
21
21
|
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
22
|
seeMyPlatform: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
23
|
type: PropTypes.Requireable<string>;
|
|
24
|
+
usage: PropTypes.Requireable<string>;
|
|
24
25
|
label: PropTypes.Requireable<string>;
|
|
25
26
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
27
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -44,6 +45,7 @@ declare namespace BrandUpdate {
|
|
|
44
45
|
}>>;
|
|
45
46
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
46
47
|
type: PropTypes.Requireable<string>;
|
|
48
|
+
usage: PropTypes.Requireable<string>;
|
|
47
49
|
label: PropTypes.Requireable<string>;
|
|
48
50
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
49
51
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -67,6 +69,7 @@ declare namespace BrandUpdate {
|
|
|
67
69
|
}>>;
|
|
68
70
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
69
71
|
type: PropTypes.Requireable<string>;
|
|
72
|
+
usage: PropTypes.Requireable<string>;
|
|
70
73
|
label: PropTypes.Requireable<string>;
|
|
71
74
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
72
75
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -90,6 +93,7 @@ declare namespace BrandUpdate {
|
|
|
90
93
|
}>>;
|
|
91
94
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
92
95
|
type: PropTypes.Requireable<string>;
|
|
96
|
+
usage: PropTypes.Requireable<string>;
|
|
93
97
|
label: PropTypes.Requireable<string>;
|
|
94
98
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
95
99
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -319,6 +323,7 @@ declare namespace BrandUpdate {
|
|
|
319
323
|
'aria-label': PropTypes.Requireable<string>;
|
|
320
324
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
321
325
|
type: PropTypes.Requireable<string>;
|
|
326
|
+
usage: PropTypes.Requireable<string>;
|
|
322
327
|
label: PropTypes.Requireable<string>;
|
|
323
328
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
324
329
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -363,6 +368,7 @@ declare namespace BrandUpdate {
|
|
|
363
368
|
title: PropTypes.Validator<string>;
|
|
364
369
|
subtitle: PropTypes.Requireable<string>;
|
|
365
370
|
selected: PropTypes.Requireable<boolean>;
|
|
371
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
366
372
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
367
373
|
label: PropTypes.Requireable<string>;
|
|
368
374
|
type: PropTypes.Requireable<string>;
|
|
@@ -457,6 +463,7 @@ declare namespace BrandUpdate {
|
|
|
457
463
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
458
464
|
componentType: PropTypes.Requireable<string>;
|
|
459
465
|
type: PropTypes.Requireable<string>;
|
|
466
|
+
usage: PropTypes.Requireable<string>;
|
|
460
467
|
label: PropTypes.Requireable<string>;
|
|
461
468
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
462
469
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -567,6 +574,7 @@ declare namespace BrandUpdate {
|
|
|
567
574
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
568
575
|
componentType: PropTypes.Requireable<string>;
|
|
569
576
|
type: PropTypes.Requireable<string>;
|
|
577
|
+
usage: PropTypes.Requireable<string>;
|
|
570
578
|
label: PropTypes.Requireable<string>;
|
|
571
579
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
572
580
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -629,6 +637,7 @@ declare namespace BrandUpdate {
|
|
|
629
637
|
}>>;
|
|
630
638
|
firstButtonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
631
639
|
type: PropTypes.Requireable<string>;
|
|
640
|
+
usage: PropTypes.Requireable<string>;
|
|
632
641
|
label: PropTypes.Requireable<string>;
|
|
633
642
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
634
643
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -652,6 +661,7 @@ declare namespace BrandUpdate {
|
|
|
652
661
|
}>>;
|
|
653
662
|
secondButtonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
654
663
|
type: PropTypes.Requireable<string>;
|
|
664
|
+
usage: PropTypes.Requireable<string>;
|
|
655
665
|
label: PropTypes.Requireable<string>;
|
|
656
666
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
657
667
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -794,6 +804,7 @@ declare namespace BrandUpdate {
|
|
|
794
804
|
title: PropTypes.Validator<string>;
|
|
795
805
|
subtitle: PropTypes.Requireable<string>;
|
|
796
806
|
selected: PropTypes.Requireable<boolean>;
|
|
807
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
797
808
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
798
809
|
label: PropTypes.Requireable<string>;
|
|
799
810
|
type: PropTypes.Requireable<string>;
|
|
@@ -965,6 +976,7 @@ declare namespace BrandUpdate {
|
|
|
965
976
|
'aria-label': PropTypes.Requireable<string>;
|
|
966
977
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
967
978
|
type: PropTypes.Requireable<string>;
|
|
979
|
+
usage: PropTypes.Requireable<string>;
|
|
968
980
|
label: PropTypes.Requireable<string>;
|
|
969
981
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
970
982
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1009,6 +1021,7 @@ declare namespace BrandUpdate {
|
|
|
1009
1021
|
title: PropTypes.Validator<string>;
|
|
1010
1022
|
subtitle: PropTypes.Requireable<string>;
|
|
1011
1023
|
selected: PropTypes.Requireable<boolean>;
|
|
1024
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
1012
1025
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
1013
1026
|
label: PropTypes.Requireable<string>;
|
|
1014
1027
|
type: PropTypes.Requireable<string>;
|
|
@@ -1103,6 +1116,7 @@ declare namespace BrandUpdate {
|
|
|
1103
1116
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
1104
1117
|
componentType: PropTypes.Requireable<string>;
|
|
1105
1118
|
type: PropTypes.Requireable<string>;
|
|
1119
|
+
usage: PropTypes.Requireable<string>;
|
|
1106
1120
|
label: PropTypes.Requireable<string>;
|
|
1107
1121
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
1108
1122
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -5,6 +5,7 @@ declare const _default: {
|
|
|
5
5
|
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
6
|
seeMyPlatform: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
7
|
type: PropTypes.Requireable<string>;
|
|
8
|
+
usage: PropTypes.Requireable<string>;
|
|
8
9
|
label: PropTypes.Requireable<string>;
|
|
9
10
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
11
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -28,6 +29,7 @@ declare const _default: {
|
|
|
28
29
|
}>>;
|
|
29
30
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
30
31
|
type: PropTypes.Requireable<string>;
|
|
32
|
+
usage: PropTypes.Requireable<string>;
|
|
31
33
|
label: PropTypes.Requireable<string>;
|
|
32
34
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
33
35
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -51,6 +53,7 @@ declare const _default: {
|
|
|
51
53
|
}>>;
|
|
52
54
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
53
55
|
type: PropTypes.Requireable<string>;
|
|
56
|
+
usage: PropTypes.Requireable<string>;
|
|
54
57
|
label: PropTypes.Requireable<string>;
|
|
55
58
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
59
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -74,6 +77,7 @@ declare const _default: {
|
|
|
74
77
|
}>>;
|
|
75
78
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
76
79
|
type: PropTypes.Requireable<string>;
|
|
80
|
+
usage: PropTypes.Requireable<string>;
|
|
77
81
|
label: PropTypes.Requireable<string>;
|
|
78
82
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
79
83
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -6,6 +6,7 @@ declare function createLayout(Template: any): {
|
|
|
6
6
|
items: PropTypes.Requireable<PropTypes.InferProps<{
|
|
7
7
|
seeMyPlatform: PropTypes.Requireable<PropTypes.InferProps<{
|
|
8
8
|
type: PropTypes.Requireable<string>;
|
|
9
|
+
usage: PropTypes.Requireable<string>;
|
|
9
10
|
label: PropTypes.Requireable<string>;
|
|
10
11
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
11
12
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -29,6 +30,7 @@ declare function createLayout(Template: any): {
|
|
|
29
30
|
}>>;
|
|
30
31
|
logOut: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
32
|
type: PropTypes.Requireable<string>;
|
|
33
|
+
usage: PropTypes.Requireable<string>;
|
|
32
34
|
label: PropTypes.Requireable<string>;
|
|
33
35
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
34
36
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -52,6 +54,7 @@ declare function createLayout(Template: any): {
|
|
|
52
54
|
}>>;
|
|
53
55
|
globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
54
56
|
type: PropTypes.Requireable<string>;
|
|
57
|
+
usage: PropTypes.Requireable<string>;
|
|
55
58
|
label: PropTypes.Requireable<string>;
|
|
56
59
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
57
60
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -75,6 +78,7 @@ declare function createLayout(Template: any): {
|
|
|
75
78
|
}>>;
|
|
76
79
|
platformList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
77
80
|
type: PropTypes.Requireable<string>;
|
|
81
|
+
usage: PropTypes.Requireable<string>;
|
|
78
82
|
label: PropTypes.Requireable<string>;
|
|
79
83
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
80
84
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/layout/index.js"],"names":[],"mappings":";AAMA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/layout/index.js"],"names":[],"mappings":";AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBC"}
|
|
@@ -96,6 +96,7 @@ declare namespace Dashboard {
|
|
|
96
96
|
'aria-label': PropTypes.Requireable<string>;
|
|
97
97
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
98
98
|
type: PropTypes.Requireable<string>;
|
|
99
|
+
usage: PropTypes.Requireable<string>;
|
|
99
100
|
label: PropTypes.Requireable<string>;
|
|
100
101
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
101
102
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -140,6 +141,7 @@ declare namespace Dashboard {
|
|
|
140
141
|
title: PropTypes.Validator<string>;
|
|
141
142
|
subtitle: PropTypes.Requireable<string>;
|
|
142
143
|
selected: PropTypes.Requireable<boolean>;
|
|
144
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
143
145
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
144
146
|
label: PropTypes.Requireable<string>;
|
|
145
147
|
type: PropTypes.Requireable<string>;
|
|
@@ -234,6 +236,7 @@ declare namespace Dashboard {
|
|
|
234
236
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
235
237
|
componentType: PropTypes.Requireable<string>;
|
|
236
238
|
type: PropTypes.Requireable<string>;
|
|
239
|
+
usage: PropTypes.Requireable<string>;
|
|
237
240
|
label: PropTypes.Requireable<string>;
|
|
238
241
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
239
242
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -389,6 +392,7 @@ declare namespace Dashboard {
|
|
|
389
392
|
'aria-label': PropTypes.Requireable<string>;
|
|
390
393
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
391
394
|
type: PropTypes.Requireable<string>;
|
|
395
|
+
usage: PropTypes.Requireable<string>;
|
|
392
396
|
label: PropTypes.Requireable<string>;
|
|
393
397
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
394
398
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -433,6 +437,7 @@ declare namespace Dashboard {
|
|
|
433
437
|
title: PropTypes.Validator<string>;
|
|
434
438
|
subtitle: PropTypes.Requireable<string>;
|
|
435
439
|
selected: PropTypes.Requireable<boolean>;
|
|
440
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
436
441
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
437
442
|
label: PropTypes.Requireable<string>;
|
|
438
443
|
type: PropTypes.Requireable<string>;
|
|
@@ -527,6 +532,7 @@ declare namespace Dashboard {
|
|
|
527
532
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
528
533
|
componentType: PropTypes.Requireable<string>;
|
|
529
534
|
type: PropTypes.Requireable<string>;
|
|
535
|
+
usage: PropTypes.Requireable<string>;
|
|
530
536
|
label: PropTypes.Requireable<string>;
|
|
531
537
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
532
538
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -277,6 +277,7 @@ declare namespace SearchPage {
|
|
|
277
277
|
'aria-label': PropTypes.Requireable<string>;
|
|
278
278
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
279
279
|
type: PropTypes.Requireable<string>;
|
|
280
|
+
usage: PropTypes.Requireable<string>;
|
|
280
281
|
label: PropTypes.Requireable<string>;
|
|
281
282
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
282
283
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -321,6 +322,7 @@ declare namespace SearchPage {
|
|
|
321
322
|
title: PropTypes.Validator<string>;
|
|
322
323
|
subtitle: PropTypes.Requireable<string>;
|
|
323
324
|
selected: PropTypes.Requireable<boolean>;
|
|
325
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
324
326
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
325
327
|
label: PropTypes.Requireable<string>;
|
|
326
328
|
type: PropTypes.Requireable<string>;
|
|
@@ -415,6 +417,7 @@ declare namespace SearchPage {
|
|
|
415
417
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
416
418
|
componentType: PropTypes.Requireable<string>;
|
|
417
419
|
type: PropTypes.Requireable<string>;
|
|
420
|
+
usage: PropTypes.Requireable<string>;
|
|
418
421
|
label: PropTypes.Requireable<string>;
|
|
419
422
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
420
423
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -110,6 +110,7 @@ declare namespace ExternalCourse {
|
|
|
110
110
|
'aria-label': PropTypes.Requireable<string>;
|
|
111
111
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
112
112
|
type: PropTypes.Requireable<string>;
|
|
113
|
+
usage: PropTypes.Requireable<string>;
|
|
113
114
|
label: PropTypes.Requireable<string>;
|
|
114
115
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
115
116
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -154,6 +155,7 @@ declare namespace ExternalCourse {
|
|
|
154
155
|
title: PropTypes.Validator<string>;
|
|
155
156
|
subtitle: PropTypes.Requireable<string>;
|
|
156
157
|
selected: PropTypes.Requireable<boolean>;
|
|
158
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
157
159
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
158
160
|
label: PropTypes.Requireable<string>;
|
|
159
161
|
type: PropTypes.Requireable<string>;
|
|
@@ -248,6 +250,7 @@ declare namespace ExternalCourse {
|
|
|
248
250
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
249
251
|
componentType: PropTypes.Requireable<string>;
|
|
250
252
|
type: PropTypes.Requireable<string>;
|
|
253
|
+
usage: PropTypes.Requireable<string>;
|
|
251
254
|
label: PropTypes.Requireable<string>;
|
|
252
255
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
253
256
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -4,6 +4,7 @@ declare const ButtonLink: {
|
|
|
4
4
|
(props: ButtonLinkProps): JSX.Element;
|
|
5
5
|
propTypes: {
|
|
6
6
|
type: import("prop-types").Requireable<string>;
|
|
7
|
+
usage: import("prop-types").Requireable<string>;
|
|
7
8
|
label: import("prop-types").Requireable<string>;
|
|
8
9
|
content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
9
10
|
'aria-label': import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AA+C7D,QAAA,MAAM,UAAU;YAAW,eAAe
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AA+C7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CA8FzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -69,6 +69,7 @@ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverCol
|
|
|
69
69
|
const ButtonLink = props => {
|
|
70
70
|
const {
|
|
71
71
|
type,
|
|
72
|
+
usage = 'button',
|
|
72
73
|
label,
|
|
73
74
|
content,
|
|
74
75
|
hoverBackgroundColor,
|
|
@@ -87,7 +88,7 @@ const ButtonLink = props => {
|
|
|
87
88
|
} = props;
|
|
88
89
|
const styleButton = (0, _classnames.default)(className, _style.default.button, type === 'primary' && _style.default.primary, type === 'secondary' && _style.default.secondary, type === 'tertiary' && _style.default.tertiary, type === 'text' && _style.default.text, type === 'dangerous' && _style.default.dangerous, link && _style.default.link, disabled && _style.default.disabled);
|
|
89
90
|
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
90
|
-
const handleOnClick = (0, _react.useCallback)(
|
|
91
|
+
const handleOnClick = (0, _react.useCallback)(event => onClick(event), [onClick]);
|
|
91
92
|
const handleOnKeyDown = (0, _react.useCallback)(event => onKeyDown(event), [onKeyDown]);
|
|
92
93
|
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
93
94
|
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
@@ -114,7 +115,8 @@ const ButtonLink = props => {
|
|
|
114
115
|
return /*#__PURE__*/_react.default.createElement("button", _extends({}, useTitle && {
|
|
115
116
|
title: ariaLabel || label
|
|
116
117
|
}, {
|
|
117
|
-
|
|
118
|
+
// eslint-disable-next-line react/button-has-type
|
|
119
|
+
type: usage,
|
|
118
120
|
"aria-label": ariaLabel || label,
|
|
119
121
|
"data-name": dataName,
|
|
120
122
|
"data-testid": dataTestId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","ICONS","isApplyHover","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","
|
|
1
|
+
{"version":3,"file":"index.js","names":["getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","ICONS","isApplyHover","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","_customStyle","useMemo","title","propTypes"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (\n icon?: IconType,\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n const isApplyHover = hovered && hoverBackgroundColor && hoverColor;\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: isApplyHover ? hoverColor : faIcon.color,\n backgroundColor: isApplyHover ? hoverBackgroundColor : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n }\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n usage = 'button',\n label,\n content,\n hoverBackgroundColor,\n hoverColor,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {getButtonContent(icon, content ?? label)}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n // eslint-disable-next-line react/button-has-type\n type={usage}\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={_customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n tabIndex={0}\n disabled={disabled}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CACvBC,IADuB,EAEvBC,OAFuB,EAGvBC,OAHuB,EAIvBC,oBAJuB,EAKvBC,UALuB,KAMpB;EACH,MAAM;IAACC,IAAD;IAAOC,MAAP;IAAeC;EAAf,IAA2BP,IAAI,IAAI;IAACK,IAAI,EAAE,EAAP;IAAWE,QAAQ,EAAE;EAArB,CAAzC;EACA,MAAMC,IAAI,GAAGH,IAAI,IAAII,kBAAA,CAAMJ,IAAN,CAArB;EACA,MAAMK,YAAY,GAAGR,OAAO,IAAIC,oBAAX,IAAmCC,UAAxD;;EAEA,IAAI,CAACI,IAAD,IAAS,CAACF,MAAd,EAAsB;IACpB,oBACE;MAAK,SAAS,EAAEK,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAME;IAAvB,GAA+BZ,OAA/B,CADF,CADF;EAKD;;EAED,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EOK,QAAQ,IAAI;MACfmB,KAAK,EAAEzB,SAAS,IAAIhB;IADL,CAFnB;MAKE,KAAK,EAAEqB,WALT;MAME,SAAS,EAAEE,WANb;MAOE,aAAWT,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIhB;IAT3B,IAWGd,gBAAgB,CAACC,IAAD,EAAOC,OAAO,IAAIY,KAAlB,CAXnB,CADF;EAeD;;EAED,oBACE,oDACOsB,QAAQ,IAAI;IACfmB,KAAK,EAAEzB,SAAS,IAAIhB;EADL,CADnB;IAIE;IACA,IAAI,EAAEY,KALR;IAME,cAAYI,SAAS,IAAIhB,KAN3B;IAOE,aAAWc,QAPb;IAQE,eAAaC,UARf;IASE,KAAK,EAAEwB,YATT;IAUE,SAAS,EAAEhB,WAVb;IAWE,OAAO,EAAEU,aAXX;IAYE,SAAS,EAAEG,eAZb;IAaE,WAAW,EAAEC,eAbf;IAcE,YAAY,EAAEC,gBAdhB;IAeE,QAAQ,EAAE,CAfZ;IAgBE,QAAQ,EAAEzB;EAhBZ,IAkBG3B,gBAAgB,CAACC,IAAD,EAAOC,OAAO,IAAIY,KAAlB,EAAyBX,OAAzB,EAAkCC,oBAAlC,EAAwDC,UAAxD,CAlBnB,CADF;AAsBD,CA9FD;;AAgGAmB,UAAU,CAACgC,SAAX,2CAAuBA,cAAvB;eAEehC,U"}
|
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { ICONS } from '../../util/button-icons';
|
|
4
4
|
declare const propTypes: {
|
|
5
5
|
type: PropTypes.Requireable<string>;
|
|
6
|
+
usage: PropTypes.Requireable<string>;
|
|
6
7
|
label: PropTypes.Requireable<string>;
|
|
7
8
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
9
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -37,6 +38,7 @@ export declare type IconType = {
|
|
|
37
38
|
};
|
|
38
39
|
export declare type ButtonLinkProps = {
|
|
39
40
|
type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';
|
|
41
|
+
usage?: 'button' | 'submit' | 'reset';
|
|
40
42
|
label?: string;
|
|
41
43
|
content?: React.ReactNode;
|
|
42
44
|
'aria-label'?: 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;AAE9C,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;AAE9C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;CAuBd,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;CACf,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;AACF,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACnE,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -13,6 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
|
|
14
14
|
const propTypes = {
|
|
15
15
|
type: _propTypes.default.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
|
|
16
|
+
usage: _propTypes.default.oneOf(['button', 'submit', 'reset']),
|
|
16
17
|
label: _propTypes.default.string,
|
|
17
18
|
content: _propTypes.default.node,
|
|
18
19
|
'aria-label': _propTypes.default.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["propTypes","type","PropTypes","oneOf","label","string","content","node","icon","shape","position","ICONS","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\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.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: 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?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,IAAI,EAAEC,kBAAA,CAAUC,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEF,kBAAA,
|
|
1
|
+
{"version":3,"file":"types.js","names":["propTypes","type","PropTypes","oneOf","usage","label","string","content","node","icon","shape","position","ICONS","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\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 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\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.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: 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?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: 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AAW,EAAEtB,kBAAA,CAAUQ,KAAV,CAAgB,EAAhB;AAtBG,CAAlB;eA+DeV,S"}
|
|
@@ -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;;;;;;;;;CAgD/B,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
|
|
@@ -54,14 +54,7 @@ const CircularProgressBar = ({
|
|
|
54
54
|
length: length_
|
|
55
55
|
};
|
|
56
56
|
}, [size, strokeWidth]);
|
|
57
|
-
|
|
58
|
-
(0, _react.useEffect)(() => {
|
|
59
|
-
if (!animationTriggered.current) {
|
|
60
|
-
setOffset(Math.ceil(length * ((100 - progression) / 100)));
|
|
61
|
-
animationTriggered.current = true;
|
|
62
|
-
}
|
|
63
|
-
}, [length, progression]);
|
|
64
|
-
console.log('in progress bar ---->');
|
|
57
|
+
(0, _react.useEffect)(() => setOffset(Math.ceil(length * ((100 - progression) / 100))), [length, progression]);
|
|
65
58
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
66
59
|
className: _style.default.container,
|
|
67
60
|
"aria-label": ariaLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ProgressionGradient","CircularProgressBar","label","progression","size","strokeWidth","ariaLabel","dataName","offset","setOffset","useState","center","radius","length","useMemo","center_","radius_","length_","Math","ceil","PI","
|
|
1
|
+
{"version":3,"file":"index.js","names":["ProgressionGradient","CircularProgressBar","label","progression","size","strokeWidth","ariaLabel","dataName","offset","setOffset","useState","center","radius","length","useMemo","center_","radius_","length_","Math","ceil","PI","useEffect","style","container","svg","mainCircle","progressionCircle","infos","propTypes","CircularProgressBarPropTypes"],"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 className={style.container} aria-label={ariaLabel} data-name={dataName}>\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;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG,mBAC1B,wDACE;EACE,EAAE,EAAC,6BADL;EAEE,EAAE,EAAC,IAFL;EAGE,EAAE,EAAC,GAHL;EAIE,EAAE,EAAC,IAJL;EAKE,EAAE,EAAC,KALL;EAME,aAAa,EAAC;AANhB,gBAQE;EAAM,SAAS,EAAC;AAAhB,EARF,eASE;EAAM,MAAM,EAAC,GAAb;EAAiB,SAAS,EAAC;AAA3B,EATF,CADF,CADF;;AAgBA,MAAMC,mBAAmB,GAAG,CAAC;EAC3BC,KAD2B;EAE3BC,WAF2B;EAG3BC,IAH2B;EAI3BC,WAJ2B;EAK3B,cAAcC,SALa;EAM3B,aAAaC;AANc,CAAD,KAOS;EACnC,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAwB,IAAxB,CAA5B;EAEA,MAAM;IAACC,MAAD;IAASC,MAAT;IAAiBC;EAAjB,IAA2B,IAAAC,cAAA,EAAQ,MAAM;IAC7C,MAAMC,OAAO,GAAGX,IAAI,GAAG,CAAvB;IACA,MAAMY,OAAO,GAAGD,OAAO,GAAGV,WAA1B;IACA,MAAMY,OAAO,GAAGC,IAAI,CAACC,IAAL,CAAU,IAAID,IAAI,CAACE,EAAT,GAAcJ,OAAxB,CAAhB;IAEA,OAAO;MAACL,MAAM,EAAEI,OAAT;MAAkBH,MAAM,EAAEI,OAA1B;MAAmCH,MAAM,EAAEI;IAA3C,CAAP;EACD,CANgC,EAM9B,CAACb,IAAD,EAAOC,WAAP,CAN8B,CAAjC;EAQA,IAAAgB,gBAAA,EACE,MAAMZ,SAAS,CAACS,IAAI,CAACC,IAAL,CAAUN,MAAM,IAAI,C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
@@ -6,6 +6,7 @@ declare class InputDoublestep extends React.Component<any, any, any> {
|
|
|
6
6
|
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
7
|
onOpenConfirmation: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
8
|
onCloseConfirmation: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
icon: PropTypes.Requireable<string>;
|
|
9
10
|
};
|
|
10
11
|
constructor(props: any, context: any);
|
|
11
12
|
state: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-doublestep/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-doublestep/index.js"],"names":[],"mappings":";AAwGA;IACE;;;;;;;MAOE;IAEF,sCAOC;IALC;;MAEC;IAKH,qBAQC;IAED,2BAKC;IAED,sBAuCC;CACF"}
|
|
@@ -15,6 +15,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _loader = _interopRequireDefault(require("../loader"));
|
|
17
17
|
|
|
18
|
+
var _buttonLink = _interopRequireDefault(require("../button-link"));
|
|
19
|
+
|
|
18
20
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -33,6 +35,7 @@ const ConfirmationInput = ({
|
|
|
33
35
|
return onChange(e.target.value);
|
|
34
36
|
}, [onChange]);
|
|
35
37
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("input", {
|
|
38
|
+
"data-testid": "input",
|
|
36
39
|
onInput: handleOnChange,
|
|
37
40
|
placeholder: placeholder,
|
|
38
41
|
className: _style.default.input,
|
|
@@ -65,13 +68,22 @@ const ConfirmationForm = props => {
|
|
|
65
68
|
placeholder: placeholder
|
|
66
69
|
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
67
70
|
className: _style.default.confirmEmptySpace
|
|
68
|
-
}), /*#__PURE__*/_react.default.createElement("
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
71
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
+
className: _style.default.confirmationCTAWrapper
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
74
|
+
label: cancelValue,
|
|
75
|
+
"data-testid": "cancel-confirmation-button",
|
|
76
|
+
onClick: onHandleClose
|
|
77
|
+
}), /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
78
|
+
label: confirmValue,
|
|
79
|
+
disabled: confirmDisabled,
|
|
80
|
+
"data-testid": "confirm-delete-button",
|
|
81
|
+
onClick: onConfirm,
|
|
82
|
+
customStyle: {
|
|
83
|
+
backgroundColor: 'orange',
|
|
84
|
+
color: 'white'
|
|
85
|
+
}
|
|
86
|
+
})));
|
|
75
87
|
|
|
76
88
|
return isPending ? /*#__PURE__*/_react.default.createElement("div", {
|
|
77
89
|
className: _style.default.confirmForm
|
|
@@ -142,15 +154,28 @@ class InputDoublestep extends _react.default.Component {
|
|
|
142
154
|
render() {
|
|
143
155
|
const {
|
|
144
156
|
toggleValue,
|
|
145
|
-
disabled
|
|
157
|
+
disabled,
|
|
158
|
+
icon
|
|
146
159
|
} = this.props;
|
|
147
160
|
const {
|
|
148
161
|
open
|
|
149
162
|
} = this.state;
|
|
150
|
-
const formView = !open ? /*#__PURE__*/_react.default.createElement(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
163
|
+
const formView = !open ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, icon ? {
|
|
164
|
+
icon: {
|
|
165
|
+
position: 'left',
|
|
166
|
+
faIcon: {
|
|
167
|
+
name: icon,
|
|
168
|
+
color: '#ffffff',
|
|
169
|
+
size: 16
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
} : {}, {
|
|
173
|
+
type: "dangerous",
|
|
174
|
+
label: toggleValue,
|
|
175
|
+
disabled: disabled,
|
|
176
|
+
"data-testid": "input-toggle-button",
|
|
177
|
+
onClick: this.handleToggle
|
|
178
|
+
})) : /*#__PURE__*/_react.default.createElement(Confirmation, _extends({}, this.props, {
|
|
154
179
|
onHandleClose: this.handleToggle,
|
|
155
180
|
onConfirm: this.handleOnClick
|
|
156
181
|
}));
|
|
@@ -168,7 +193,8 @@ InputDoublestep.propTypes = process.env.NODE_ENV !== "production" ? _extends({
|
|
|
168
193
|
toggleValue: _propTypes.default.string.isRequired,
|
|
169
194
|
onClick: _propTypes.default.func.isRequired,
|
|
170
195
|
onOpenConfirmation: _propTypes.default.func,
|
|
171
|
-
onCloseConfirmation: _propTypes.default.func
|
|
196
|
+
onCloseConfirmation: _propTypes.default.func,
|
|
197
|
+
icon: _propTypes.default.string
|
|
172
198
|
}, inputDoubleProps) : {};
|
|
173
199
|
var _default = InputDoublestep;
|
|
174
200
|
exports.default = _default;
|