@coorpacademy/components 11.33.7 → 11.33.8-alpha.1
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 +13 -2
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +2 -2
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/style.css +2 -2
- package/es/atom/button-link/types.d.ts +28 -4
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +14 -5
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/button-link-icon/style.css +2 -2
- package/es/atom/button-menu/index.d.ts +18 -0
- package/es/atom/button-menu/index.d.ts.map +1 -1
- package/es/atom/button-menu/index.js +19 -3
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/style.css +19 -6
- package/es/atom/button-menu/types.d.ts +39 -0
- package/es/atom/button-menu/types.d.ts.map +1 -1
- package/es/atom/button-menu/types.js +7 -2
- package/es/atom/button-menu/types.js.map +1 -1
- package/es/atom/tag/style.css +10 -6
- package/es/molecule/bullet-point-menu-button/index.d.ts +17 -0
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/style.css +19 -16
- package/es/molecule/bullet-point-menu-button/types.d.ts +17 -0
- package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +69 -7
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/index.d.ts +47 -2
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +47 -2
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/filters/index.js +2 -2
- package/es/molecule/filters/index.js.map +1 -1
- package/es/molecule/filters/style.css +7 -7
- package/es/organism/header-with-actions/index.d.ts +95 -0
- package/es/organism/header-with-actions/index.d.ts.map +1 -0
- package/es/organism/header-with-actions/index.js +48 -0
- package/es/organism/header-with-actions/index.js.map +1 -0
- package/es/organism/header-with-actions/style.css +55 -0
- package/es/organism/header-with-actions/types.d.ts +120 -0
- package/es/organism/header-with-actions/types.d.ts.map +1 -0
- package/es/organism/header-with-actions/types.js +27 -0
- package/es/organism/header-with-actions/types.js.map +1 -0
- package/es/organism/list-items/index.d.ts +60 -4
- package/es/organism/setup-header/index.d.ts +52 -8
- package/es/organism/wizard-contents/index.d.ts +73 -6
- package/es/template/app-player/loading/index.d.ts +69 -7
- package/es/template/app-player/player/index.d.ts +138 -14
- package/es/template/app-player/player/slides/index.d.ts +69 -7
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +69 -7
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +69 -7
- package/es/template/app-review/index.d.ts +69 -7
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +69 -7
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +69 -7
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +52 -8
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +52 -8
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +254 -25
- package/es/template/back-office/dashboard-preview/index.d.ts +52 -8
- package/es/template/back-office/layout/index.d.ts +52 -8
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +138 -14
- package/es/template/common/search-page/index.d.ts +69 -7
- package/es/template/external-course/index.d.ts +69 -7
- package/es/variables/colors.css +5 -1
- package/es/variables/colors.d.ts +1 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +1 -0
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +13 -2
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +2 -2
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/style.css +2 -2
- package/lib/atom/button-link/types.d.ts +28 -4
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +15 -6
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/button-link-icon/style.css +2 -2
- package/lib/atom/button-menu/index.d.ts +18 -0
- package/lib/atom/button-menu/index.d.ts.map +1 -1
- package/lib/atom/button-menu/index.js +19 -3
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/style.css +19 -6
- package/lib/atom/button-menu/types.d.ts +39 -0
- package/lib/atom/button-menu/types.d.ts.map +1 -1
- package/lib/atom/button-menu/types.js +7 -2
- package/lib/atom/button-menu/types.js.map +1 -1
- package/lib/atom/tag/style.css +10 -6
- package/lib/molecule/bullet-point-menu-button/index.d.ts +17 -0
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/style.css +19 -16
- package/lib/molecule/bullet-point-menu-button/types.d.ts +17 -0
- package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +69 -7
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/index.d.ts +47 -2
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +47 -2
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +2 -2
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/molecule/filters/style.css +7 -7
- package/lib/organism/header-with-actions/index.d.ts +95 -0
- package/lib/organism/header-with-actions/index.d.ts.map +1 -0
- package/lib/organism/header-with-actions/index.js +53 -0
- package/lib/organism/header-with-actions/index.js.map +1 -0
- package/lib/organism/header-with-actions/style.css +55 -0
- package/lib/organism/header-with-actions/types.d.ts +120 -0
- package/lib/organism/header-with-actions/types.d.ts.map +1 -0
- package/lib/organism/header-with-actions/types.js +32 -0
- package/lib/organism/header-with-actions/types.js.map +1 -0
- package/lib/organism/list-items/index.d.ts +60 -4
- package/lib/organism/setup-header/index.d.ts +52 -8
- package/lib/organism/wizard-contents/index.d.ts +73 -6
- package/lib/template/app-player/loading/index.d.ts +69 -7
- package/lib/template/app-player/player/index.d.ts +138 -14
- package/lib/template/app-player/player/slides/index.d.ts +69 -7
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +69 -7
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +69 -7
- package/lib/template/app-review/index.d.ts +69 -7
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +69 -7
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +69 -7
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +52 -8
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +52 -8
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +254 -25
- package/lib/template/back-office/dashboard-preview/index.d.ts +52 -8
- package/lib/template/back-office/layout/index.d.ts +52 -8
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +138 -14
- package/lib/template/common/search-page/index.d.ts +69 -7
- package/lib/template/external-course/index.d.ts +69 -7
- package/lib/variables/colors.css +5 -1
- package/lib/variables/colors.d.ts +1 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +1 -0
- package/lib/variables/colors.js.map +1 -1
- package/package.json +2 -2
- package/LICENSE +0 -201
|
@@ -57,7 +57,9 @@ declare namespace ExternalCourse {
|
|
|
57
57
|
'aria-label': PropTypes.Requireable<string>;
|
|
58
58
|
largeButton: PropTypes.Requireable<boolean>;
|
|
59
59
|
type: PropTypes.Requireable<string>;
|
|
60
|
-
customStyle: PropTypes.Requireable<
|
|
60
|
+
customStyle: PropTypes.Requireable<{
|
|
61
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
62
|
+
}>;
|
|
61
63
|
}>>;
|
|
62
64
|
secondButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
63
65
|
label: PropTypes.Requireable<string>;
|
|
@@ -65,7 +67,9 @@ declare namespace ExternalCourse {
|
|
|
65
67
|
type: PropTypes.Requireable<string>;
|
|
66
68
|
'aria-label': PropTypes.Requireable<string>;
|
|
67
69
|
largeButton: PropTypes.Requireable<boolean>;
|
|
68
|
-
customStyle: PropTypes.Requireable<
|
|
70
|
+
customStyle: PropTypes.Requireable<{
|
|
71
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
72
|
+
}>;
|
|
69
73
|
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
70
74
|
position: PropTypes.Requireable<string>;
|
|
71
75
|
type: PropTypes.Requireable<string>;
|
|
@@ -77,7 +81,9 @@ declare namespace ExternalCourse {
|
|
|
77
81
|
type: PropTypes.Requireable<string>;
|
|
78
82
|
'aria-label': PropTypes.Requireable<string>;
|
|
79
83
|
largeButton: PropTypes.Requireable<boolean>;
|
|
80
|
-
customStyle: PropTypes.Requireable<
|
|
84
|
+
customStyle: PropTypes.Requireable<{
|
|
85
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
86
|
+
}>;
|
|
81
87
|
}>>;
|
|
82
88
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
89
|
icon: PropTypes.Requireable<string>;
|
|
@@ -124,8 +130,17 @@ declare namespace ExternalCourse {
|
|
|
124
130
|
'data-name': PropTypes.Requireable<string>;
|
|
125
131
|
'data-testid': PropTypes.Requireable<string>;
|
|
126
132
|
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
127
|
-
position: PropTypes.
|
|
133
|
+
position: PropTypes.Validator<string>;
|
|
128
134
|
type: PropTypes.Requireable<string>;
|
|
135
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
136
|
+
name: PropTypes.Validator<string>;
|
|
137
|
+
color: PropTypes.Requireable<string>;
|
|
138
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
139
|
+
size: PropTypes.Requireable<number>;
|
|
140
|
+
customStyle: PropTypes.Requireable<{
|
|
141
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
142
|
+
}>;
|
|
143
|
+
}>>;
|
|
129
144
|
}>>;
|
|
130
145
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
146
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -137,7 +152,9 @@ declare namespace ExternalCourse {
|
|
|
137
152
|
hoverColor: PropTypes.Requireable<string>;
|
|
138
153
|
disabled: PropTypes.Requireable<boolean>;
|
|
139
154
|
className: PropTypes.Requireable<string>;
|
|
140
|
-
customStyle: PropTypes.Requireable<
|
|
155
|
+
customStyle: PropTypes.Requireable<{
|
|
156
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
157
|
+
}>;
|
|
141
158
|
}>>;
|
|
142
159
|
selectMultiple: PropTypes.Requireable<PropTypes.InferProps<{
|
|
143
160
|
title: PropTypes.Requireable<string>;
|
|
@@ -255,6 +272,23 @@ declare namespace ExternalCourse {
|
|
|
255
272
|
label: PropTypes.Validator<string>;
|
|
256
273
|
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
257
274
|
type: PropTypes.Requireable<string>;
|
|
275
|
+
buttonLinkType: PropTypes.Requireable<string>;
|
|
276
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
277
|
+
position: PropTypes.Validator<string>;
|
|
278
|
+
type: PropTypes.Requireable<string>;
|
|
279
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
280
|
+
name: PropTypes.Validator<string>;
|
|
281
|
+
color: PropTypes.Requireable<string>;
|
|
282
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
283
|
+
size: PropTypes.Requireable<number>;
|
|
284
|
+
customStyle: PropTypes.Requireable<{
|
|
285
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
286
|
+
}>;
|
|
287
|
+
}>>;
|
|
288
|
+
}>>;
|
|
289
|
+
customStyle: PropTypes.Requireable<{
|
|
290
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
291
|
+
}>;
|
|
258
292
|
}> | null | undefined)[]>;
|
|
259
293
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
260
294
|
menuButtonClassName: PropTypes.Requireable<string>;
|
|
@@ -277,8 +311,17 @@ declare namespace ExternalCourse {
|
|
|
277
311
|
'data-name': PropTypes.Requireable<string>;
|
|
278
312
|
'data-testid': PropTypes.Requireable<string>;
|
|
279
313
|
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
280
|
-
position: PropTypes.
|
|
314
|
+
position: PropTypes.Validator<string>;
|
|
281
315
|
type: PropTypes.Requireable<string>;
|
|
316
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
317
|
+
name: PropTypes.Validator<string>;
|
|
318
|
+
color: PropTypes.Requireable<string>;
|
|
319
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
320
|
+
size: PropTypes.Requireable<number>;
|
|
321
|
+
customStyle: PropTypes.Requireable<{
|
|
322
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
323
|
+
}>;
|
|
324
|
+
}>>;
|
|
282
325
|
}>>;
|
|
283
326
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
284
327
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -290,7 +333,9 @@ declare namespace ExternalCourse {
|
|
|
290
333
|
hoverColor: PropTypes.Requireable<string>;
|
|
291
334
|
disabled: PropTypes.Requireable<boolean>;
|
|
292
335
|
className: PropTypes.Requireable<string>;
|
|
293
|
-
customStyle: PropTypes.Requireable<
|
|
336
|
+
customStyle: PropTypes.Requireable<{
|
|
337
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
338
|
+
}>;
|
|
294
339
|
}> | PropTypes.InferProps<{
|
|
295
340
|
componentType: PropTypes.Requireable<string>;
|
|
296
341
|
disabled: PropTypes.Requireable<boolean>;
|
|
@@ -302,6 +347,23 @@ declare namespace ExternalCourse {
|
|
|
302
347
|
label: PropTypes.Validator<string>;
|
|
303
348
|
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
304
349
|
type: PropTypes.Requireable<string>;
|
|
350
|
+
buttonLinkType: PropTypes.Requireable<string>;
|
|
351
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
352
|
+
position: PropTypes.Validator<string>;
|
|
353
|
+
type: PropTypes.Requireable<string>;
|
|
354
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
355
|
+
name: PropTypes.Validator<string>;
|
|
356
|
+
color: PropTypes.Requireable<string>;
|
|
357
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
358
|
+
size: PropTypes.Requireable<number>;
|
|
359
|
+
customStyle: PropTypes.Requireable<{
|
|
360
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
361
|
+
}>;
|
|
362
|
+
}>>;
|
|
363
|
+
}>>;
|
|
364
|
+
customStyle: PropTypes.Requireable<{
|
|
365
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
366
|
+
}>;
|
|
305
367
|
}> | null | undefined)[]>;
|
|
306
368
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
307
369
|
menuButtonClassName: PropTypes.Requireable<string>;
|
package/es/variables/colors.css
CHANGED
|
@@ -48,21 +48,25 @@
|
|
|
48
48
|
@value cm_grey_900: #111117;
|
|
49
49
|
@value cm_positive_100: #35CC7F;
|
|
50
50
|
@value cm_positive_200: #05944F;
|
|
51
|
+
@value cm_positive_300: #04713D;
|
|
52
|
+
@value cm_negative_50: #ffe5e6;
|
|
51
53
|
@value cm_negative_100: #ed3436;
|
|
52
54
|
@value cm_negative_200: #b81400;
|
|
53
|
-
@value
|
|
55
|
+
@value cm_negative_300: #991100;
|
|
54
56
|
@value cm_green_50: #e8fcf8;
|
|
55
57
|
@value cm_green_200: #16ac8c;
|
|
56
58
|
@value cm_green_secondary_100: #D6F5E1;
|
|
57
59
|
@value cm_green_secondary_200: #38CC6C;
|
|
58
60
|
@value cm_orange_200: #FF7043;
|
|
59
61
|
@value cm_orange_700: #FF4105;
|
|
62
|
+
@value cm_orange_800: #A32700;
|
|
60
63
|
@value cm_pink_50: #ffefeb;
|
|
61
64
|
@value cm_purple_200: #7340FF;
|
|
62
65
|
@value cm_yellow_scorm: #FFB800;
|
|
63
66
|
@value cm_yellow_secondary_200: #ffde03;
|
|
64
67
|
@value cm_yellow_100: #ffc043;
|
|
65
68
|
@value cm_yellow_200: #DB9200;
|
|
69
|
+
@value cm_yellow_300: #B87A00;
|
|
66
70
|
@value cm_yellow_400: #bd7e00;
|
|
67
71
|
@value cm_red_200: #FF4040;
|
|
68
72
|
@value cm_negative_red_200: #ED3436;
|
package/es/variables/colors.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/variables/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAcT,CAAC;AAEX,oBAAY,MAAM,GAAG,OAAO,MAAM,CAAC"}
|
package/es/variables/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","names":["COLORS","gray","negative","cm_negative_200","positive","cm_positive_200","white","cm_grey_400","cm_grey_800","cm_primary_blue","cm_grey_500","cm_yellow_400","brand"],"sources":["../../src/variables/colors.ts"],"sourcesContent":["export const COLORS = {\n gray: '#EAEAEB',\n negative: '#ed3436',\n cm_negative_200: '#B81400',\n positive: '#35CC7F',\n cm_positive_200: '#05944F',\n white: '#ffffff',\n cm_grey_400: '#9999A8',\n cm_grey_800: '#171721',\n cm_primary_blue: '#0061FF',\n cm_grey_500: '#515161',\n cm_yellow_400: '#bd7e00',\n brand: '#00B0FF'\n} as const;\n\nexport type Colors = typeof COLORS;\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,eAAe,EAAE,SAAS;EAC1BC,QAAQ,EAAE,SAAS;EACnBC,eAAe,EAAE,SAAS;EAC1BC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,WAAW,EAAE,SAAS;EACtBC,eAAe,EAAE,SAAS;EAC1BC,WAAW,EAAE,SAAS;EACtBC,aAAa,EAAE,SAAS;EACxBC,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"colors.js","names":["COLORS","gray","negative","cm_negative_200","positive","cm_positive_200","white","cm_grey_400","cm_grey_800","cm_primary_blue","cm_grey_500","cm_grey_700","cm_yellow_400","brand"],"sources":["../../src/variables/colors.ts"],"sourcesContent":["export const COLORS = {\n gray: '#EAEAEB',\n negative: '#ed3436',\n cm_negative_200: '#B81400',\n positive: '#35CC7F',\n cm_positive_200: '#05944F',\n white: '#ffffff',\n cm_grey_400: '#9999A8',\n cm_grey_800: '#171721',\n cm_primary_blue: '#0061FF',\n cm_grey_500: '#515161',\n cm_grey_700: '#1D1D2B',\n cm_yellow_400: '#bd7e00',\n brand: '#00B0FF'\n} as const;\n\nexport type Colors = typeof COLORS;\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,eAAe,EAAE,SAAS;EAC1BC,QAAQ,EAAE,SAAS;EACnBC,eAAe,EAAE,SAAS;EAC1BC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,WAAW,EAAE,SAAS;EACtBC,eAAe,EAAE,SAAS;EAC1BC,WAAW,EAAE,SAAS;EACtBC,WAAW,EAAE,SAAS;EACtBC,aAAa,EAAE,SAAS;EACxBC,KAAK,EAAE;AACT,CAAU","ignoreList":[]}
|
|
@@ -13,8 +13,17 @@ declare const ButtonLink: {
|
|
|
13
13
|
'data-name': import("prop-types").Requireable<string>;
|
|
14
14
|
'data-testid': import("prop-types").Requireable<string>;
|
|
15
15
|
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
16
|
-
position: import("prop-types").
|
|
16
|
+
position: import("prop-types").Validator<string>;
|
|
17
17
|
type: import("prop-types").Requireable<string>;
|
|
18
|
+
faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
19
|
+
name: import("prop-types").Validator<string>;
|
|
20
|
+
color: import("prop-types").Requireable<string>;
|
|
21
|
+
backgroundColor: import("prop-types").Requireable<string>;
|
|
22
|
+
size: import("prop-types").Requireable<number>;
|
|
23
|
+
customStyle: import("prop-types").Requireable<{
|
|
24
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
}>>;
|
|
18
27
|
}>>;
|
|
19
28
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
20
29
|
link: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
@@ -26,7 +35,9 @@ declare const ButtonLink: {
|
|
|
26
35
|
hoverColor: import("prop-types").Requireable<string>;
|
|
27
36
|
disabled: import("prop-types").Requireable<boolean>;
|
|
28
37
|
className: import("prop-types").Requireable<string>;
|
|
29
|
-
customStyle: import("prop-types").Requireable<
|
|
38
|
+
customStyle: import("prop-types").Requireable<{
|
|
39
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
40
|
+
}>;
|
|
30
41
|
};
|
|
31
42
|
};
|
|
32
43
|
export default ButtonLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -6,7 +6,7 @@ var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
|
6
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _link = _interopRequireDefault(require("../link"));
|
|
9
|
-
var _icon =
|
|
9
|
+
var _icon = _interopRequireWildcard(require("../icon"));
|
|
10
10
|
var _buttonIcons = require("../../util/button-icons");
|
|
11
11
|
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
12
12
|
var _types = _interopRequireDefault(require("./types"));
|
|
@@ -34,7 +34,7 @@ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverCol
|
|
|
34
34
|
}
|
|
35
35
|
const iconComponent = faIcon ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
36
36
|
iconName: faIcon.name,
|
|
37
|
-
iconColor: hovered && hoverColor ? hoverColor : faIcon.color,
|
|
37
|
+
iconColor: hovered && hoverColor ? hoverColor : faIcon.color ?? _icon.DEFAULT_ICON_COLOR,
|
|
38
38
|
// eslint-disable-next-line no-nested-ternary
|
|
39
39
|
backgroundColor: !faIcon?.backgroundColor ? 'transparent' : hovered && hoverBackgroundColor ? hoverBackgroundColor : faIcon.backgroundColor,
|
|
40
40
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_link","_icon","_buttonIcons","_tooltip","_types","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","ICONS","createElement","className","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop2","onKeyDown","useTitle","styleButton","classnames","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","useMemo","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","propTypes","process","env","NODE_ENV","_default","exports"],"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 ToolTip from '../tooltip';\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\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: hovered && hoverColor ? hoverColor : faIcon.color,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? 'transparent'\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\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 tooltipText,\n tooltipPlacement = 'left',\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 !label && style.iconButton,\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(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\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 hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\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 {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;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AElB+C,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_link","_icon","_buttonIcons","_tooltip","_types","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","ICONS","createElement","className","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","DEFAULT_ICON_COLOR","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop2","onKeyDown","useTitle","styleButton","classnames","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","useMemo","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","propTypes","process","env","NODE_ENV","_default","exports"],"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, {DEFAULT_ICON_COLOR} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\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\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: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? 'transparent'\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\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 tooltipText,\n tooltipPlacement = 'left',\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 !label && style.iconButton,\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(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\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 hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\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 {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAA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-
border-radius:
|
|
15
|
+
border-radius: 8px;
|
|
16
16
|
font-family: Gilroy;
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
font-weight: bold;
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
font-size: 12px;
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
line-height: 16px;
|
|
112
|
-
}
|
|
112
|
+
}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ICONS } from '../../util/button-icons';
|
|
4
|
+
export declare const iconPropTypes: {
|
|
5
|
+
position: PropTypes.Validator<string>;
|
|
6
|
+
type: PropTypes.Requireable<string>;
|
|
7
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
8
|
+
name: PropTypes.Validator<string>;
|
|
9
|
+
color: PropTypes.Requireable<string>;
|
|
10
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
11
|
+
size: PropTypes.Requireable<number>;
|
|
12
|
+
customStyle: PropTypes.Requireable<{
|
|
13
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
}>>;
|
|
16
|
+
};
|
|
4
17
|
declare const propTypes: {
|
|
5
18
|
type: PropTypes.Requireable<string>;
|
|
6
19
|
usage: PropTypes.Requireable<string>;
|
|
@@ -12,8 +25,17 @@ declare const propTypes: {
|
|
|
12
25
|
'data-name': PropTypes.Requireable<string>;
|
|
13
26
|
'data-testid': PropTypes.Requireable<string>;
|
|
14
27
|
icon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
|
-
position: PropTypes.
|
|
28
|
+
position: PropTypes.Validator<string>;
|
|
16
29
|
type: PropTypes.Requireable<string>;
|
|
30
|
+
faIcon: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
|
+
name: PropTypes.Validator<string>;
|
|
32
|
+
color: PropTypes.Requireable<string>;
|
|
33
|
+
backgroundColor: PropTypes.Requireable<string>;
|
|
34
|
+
size: PropTypes.Requireable<number>;
|
|
35
|
+
customStyle: PropTypes.Requireable<{
|
|
36
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
}>>;
|
|
17
39
|
}>>;
|
|
18
40
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
41
|
link: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -25,9 +47,11 @@ declare const propTypes: {
|
|
|
25
47
|
hoverColor: PropTypes.Requireable<string>;
|
|
26
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
27
49
|
className: PropTypes.Requireable<string>;
|
|
28
|
-
customStyle: PropTypes.Requireable<
|
|
50
|
+
customStyle: PropTypes.Requireable<{
|
|
51
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
52
|
+
}>;
|
|
29
53
|
};
|
|
30
|
-
export declare type
|
|
54
|
+
export declare type FaIconType = {
|
|
31
55
|
name: string;
|
|
32
56
|
color?: string;
|
|
33
57
|
backgroundColor?: string;
|
|
@@ -37,7 +61,7 @@ export declare type FaIcontype = {
|
|
|
37
61
|
export declare type IconType = {
|
|
38
62
|
position: 'right' | 'left';
|
|
39
63
|
type?: keyof typeof ICONS;
|
|
40
|
-
faIcon?:
|
|
64
|
+
faIcon?: FaIconType;
|
|
41
65
|
};
|
|
42
66
|
export declare type ButtonLinkProps = {
|
|
43
67
|
type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YA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,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"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
4
|
+
exports.iconPropTypes = exports.default = void 0;
|
|
5
5
|
var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
|
|
6
6
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
7
|
var _buttonIcons = require("../../util/button-icons");
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const faIconPropTypes = {
|
|
10
|
+
name: _propTypes.default.string.isRequired,
|
|
11
|
+
color: _propTypes.default.string,
|
|
12
|
+
backgroundColor: _propTypes.default.string,
|
|
13
|
+
size: _propTypes.default.number,
|
|
14
|
+
customStyle: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
|
|
15
|
+
};
|
|
16
|
+
const iconPropTypes = exports.iconPropTypes = {
|
|
17
|
+
position: _propTypes.default.oneOf(['right', 'left']).isRequired,
|
|
18
|
+
type: _propTypes.default.oneOf((0, _keys2.default)(_buttonIcons.ICONS)),
|
|
19
|
+
faIcon: _propTypes.default.shape(faIconPropTypes)
|
|
20
|
+
};
|
|
9
21
|
const propTypes = {
|
|
10
22
|
type: _propTypes.default.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
|
|
11
23
|
usage: _propTypes.default.oneOf(['button', 'submit', 'reset']),
|
|
@@ -16,10 +28,7 @@ const propTypes = {
|
|
|
16
28
|
tooltipPlacement: _propTypes.default.oneOf(['left', 'right', 'top', 'bottom']),
|
|
17
29
|
'data-name': _propTypes.default.string,
|
|
18
30
|
'data-testid': _propTypes.default.string,
|
|
19
|
-
icon: _propTypes.default.shape(
|
|
20
|
-
position: _propTypes.default.oneOf(['right', 'left']),
|
|
21
|
-
type: _propTypes.default.oneOf((0, _keys2.default)(_buttonIcons.ICONS))
|
|
22
|
-
}),
|
|
31
|
+
icon: _propTypes.default.shape(iconPropTypes),
|
|
23
32
|
onClick: _propTypes.default.func,
|
|
24
33
|
link: _propTypes.default.shape({
|
|
25
34
|
href: _propTypes.default.string,
|
|
@@ -30,7 +39,7 @@ const propTypes = {
|
|
|
30
39
|
hoverColor: _propTypes.default.string,
|
|
31
40
|
disabled: _propTypes.default.bool,
|
|
32
41
|
className: _propTypes.default.string,
|
|
33
|
-
customStyle: _propTypes.default.
|
|
42
|
+
customStyle: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
|
|
34
43
|
};
|
|
35
44
|
var _default = exports.default = propTypes;
|
|
36
45
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonIcons","e","__esModule","default","
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_buttonIcons","e","__esModule","default","faIconPropTypes","name","PropTypes","string","isRequired","color","backgroundColor","size","number","customStyle","objectOf","oneOfType","iconPropTypes","exports","position","oneOf","type","_keys2","ICONS","faIcon","shape","propTypes","usage","label","content","node","tooltipText","tooltipPlacement","icon","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","_default"],"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 faIconPropTypes = {\n name: PropTypes.string.isRequired,\n color: PropTypes.string,\n backgroundColor: PropTypes.string,\n size: PropTypes.number,\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport const iconPropTypes = {\n position: PropTypes.oneOf(['right', 'left']).isRequired,\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.shape(iconPropTypes),\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.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport type FaIconType = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: Record<string, unknown>;\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?: React.ReactNode;\n 'aria-label'?: string;\n tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\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,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAA8C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C,MAAMG,eAAe,GAAG;EACtBC,IAAI,EAAEC,kBAAS,CAACC,MAAM,CAACC,UAAU;EACjCC,KAAK,EAAEH,kBAAS,CAACC,MAAM;EACvBG,eAAe,EAAEJ,kBAAS,CAACC,MAAM;EACjCI,IAAI,EAAEL,kBAAS,CAACM,MAAM;EACtBC,WAAW,EAAEP,kBAAS,CAACQ,QAAQ,CAACR,kBAAS,CAACS,SAAS,CAAC,CAACT,kBAAS,CAACC,MAAM,EAAED,kBAAS,CAACM,MAAM,CAAC,CAAC;AAC3F,CAAC;AAEM,MAAMI,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,QAAQ,EAAEZ,kBAAS,CAACa,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAACX,UAAU;EACvDY,IAAI,EAAEd,kBAAS,CAACa,KAAK,CAAC,IAAAE,MAAA,CAAAlB,OAAA,EAAKmB,kBAAK,CAAC,CAAC;EAClCC,MAAM,EAAEjB,kBAAS,CAACkB,KAAK,CAACpB,eAAe;AACzC,CAAC;AAED,MAAMqB,SAAS,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,CAAC,CAAC;AAC3F,CAAC;AAAC,IAAAgC,QAAA,GAAA3B,OAAA,CAAAd,OAAA,GA4CasB,SAAS","ignoreList":[]}
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
composes: button;
|
|
47
47
|
width: 44px;
|
|
48
48
|
height: 44px;
|
|
49
|
-
border-radius:
|
|
49
|
+
border-radius: 12px;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.responsive {
|
|
53
53
|
composes: button;
|
|
54
54
|
width: 44px;
|
|
55
55
|
height: 44px;
|
|
56
|
-
border-radius:
|
|
56
|
+
border-radius: 12px;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.responsive .icon {
|
|
@@ -9,8 +9,26 @@ declare const ButtonMenu: {
|
|
|
9
9
|
label: import("prop-types").Validator<string>;
|
|
10
10
|
onClick: import("prop-types").Validator<(...args: any[]) => any>;
|
|
11
11
|
type: import("prop-types").Requireable<string>;
|
|
12
|
+
buttonLinkType: import("prop-types").Requireable<string>;
|
|
13
|
+
icon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
14
|
+
position: import("prop-types").Validator<string>;
|
|
15
|
+
type: import("prop-types").Requireable<string>;
|
|
16
|
+
faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
17
|
+
name: import("prop-types").Validator<string>;
|
|
18
|
+
color: import("prop-types").Requireable<string>;
|
|
19
|
+
backgroundColor: import("prop-types").Requireable<string>;
|
|
20
|
+
size: import("prop-types").Requireable<number>;
|
|
21
|
+
customStyle: import("prop-types").Requireable<{
|
|
22
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
}>>;
|
|
25
|
+
}>>;
|
|
26
|
+
customStyle: import("prop-types").Requireable<{
|
|
27
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
28
|
+
}>;
|
|
12
29
|
}> | null | undefined)[]>;
|
|
13
30
|
'data-name': import("prop-types").Requireable<string>;
|
|
31
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
14
32
|
};
|
|
15
33
|
};
|
|
16
34
|
export default ButtonMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAqDjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -5,6 +5,7 @@ exports.default = void 0;
|
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _map = _interopRequireDefault(require("lodash/fp/map"));
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _buttonLink = _interopRequireDefault(require("../button-link"));
|
|
8
9
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
9
10
|
var _types = _interopRequireWildcard(require("./types"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -17,11 +18,25 @@ const Button = props => {
|
|
|
17
18
|
disabled,
|
|
18
19
|
label,
|
|
19
20
|
onClick,
|
|
20
|
-
type = 'default'
|
|
21
|
+
type = 'default',
|
|
22
|
+
buttonLinkType,
|
|
23
|
+
icon,
|
|
24
|
+
customStyle = {}
|
|
21
25
|
} = props;
|
|
22
26
|
const styleButton = (0, _classnames.default)(_style.default.button, type === 'default' && _style.default.defaultStyle, type === 'defaultLeft' && _style.default.defaultLeft, type === 'dangerous' && _style.default.dangerous, type === 'dangerousLeft' && _style.default.dangerousLeft, disabled && _style.default.disabled);
|
|
23
27
|
const handleOnClick = (0, _react.useCallback)(() => onClick(), [onClick]);
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
28
|
+
return icon ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
29
|
+
label: label,
|
|
30
|
+
type: buttonLinkType,
|
|
31
|
+
disabled: disabled,
|
|
32
|
+
onClick: handleOnClick,
|
|
33
|
+
"data-name": dataName,
|
|
34
|
+
className: styleButton,
|
|
35
|
+
customStyle: {
|
|
36
|
+
...customStyle
|
|
37
|
+
},
|
|
38
|
+
icon: icon
|
|
39
|
+
}) : /*#__PURE__*/_react.default.createElement("button", {
|
|
25
40
|
type: "button",
|
|
26
41
|
"aria-label": label,
|
|
27
42
|
title: label,
|
|
@@ -52,7 +67,8 @@ const ButtonMenu = props => {
|
|
|
52
67
|
cap: false
|
|
53
68
|
})(buildButton, buttons), [buttons, buildButton]);
|
|
54
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
-
"data-name": dataName
|
|
70
|
+
"data-name": dataName,
|
|
71
|
+
className: _style.default.buttonMenuContainer
|
|
56
72
|
}, buttonList);
|
|
57
73
|
};
|
|
58
74
|
ButtonMenu.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
|