dhre-component-lib 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/components/Avatar/Avatar.test.tsx +5 -4
- package/src/components/Avatar/Avatar.tsx +8 -6
- package/src/components/Badge/Badge.module.scss +14 -0
- package/src/components/Badge/Badge.test.tsx +8 -12
- package/src/components/Badge/Badge.tsx +5 -5
- package/src/components/BreadCrumb/BreadCrumb.tsx +16 -7
- package/src/components/BreadCrumb/Breadcrumb.module.scss +20 -0
- package/src/components/Button/Button.module.scss +66 -0
- package/src/components/Button/Button.test.tsx +4 -17
- package/src/components/Button/Button.tsx +11 -4
- package/src/components/Checkbox/Checkbox.test.tsx +7 -3
- package/src/components/CircularProgress/CircularProgress.module.scss +19 -0
- package/src/components/CircularProgress/CircularProgress.test.tsx +0 -8
- package/src/components/CircularProgress/CircularProgress.tsx +2 -2
- package/src/components/Modal/{Modal.css → Modal.module.scss} +1 -1
- package/src/components/Modal/Modal.test.tsx +9 -5
- package/src/components/Modal/Modal.tsx +17 -6
- package/src/components/Notification/Notification.tsx +1 -1
- package/src/components/OtpInput/OtpInput.module.scss +49 -0
- package/src/components/OtpInput/OtpInput.test.tsx +53 -0
- package/src/components/OtpInput/OtpInput.tsx +137 -0
- package/src/components/OtpInput/index.ts +1 -0
- package/src/components/PdfView/PdfView.module.scss +69 -0
- package/src/components/PdfView/PdfView.test.tsx +20 -11
- package/src/components/PdfView/PdfView.tsx +20 -9
- package/src/components/RadioButton/RadioButton.test.tsx +0 -11
- package/src/components/Tag/Tag.css +12 -13
- package/src/components/Tag/Tag.test.tsx +7 -3
- package/src/components/Tag/Tag.tsx +8 -14
- package/src/components/Tooltip/Tooltip.module.scss +37 -0
- package/src/components/Tooltip/Tooltip.test.tsx +35 -40
- package/src/components/Tooltip/Tooltip.tsx +9 -5
- package/src/components/index.ts +1 -0
- package/src/theme/Typography/typography.scss +117 -0
- package/src/theme/colors/colors.scss +22 -0
- package/src/theme/colors.ts +3 -0
- package/src/components/Badge/Badge.css +0 -15
- package/src/components/BreadCrumb/Breadcrumb.css +0 -21
- package/src/components/Button/Button.css +0 -92
- package/src/components/CircularProgress/CircularProgress.css +0 -19
- package/src/components/PdfView/PdfView.css +0 -70
- package/src/components/Tooltip/Tooltip.css +0 -38
- /package/src/components/Notification/{Notification.css → Notification.module.scss} +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
$bold-weight: 700;
|
|
2
|
+
$semi-bold-weight: 400;
|
|
3
|
+
$medium-weight: 300;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
$font-sizes: (
|
|
7
|
+
'H1': 40px,
|
|
8
|
+
'H2': 36px,
|
|
9
|
+
'H3': 32px,
|
|
10
|
+
'H4': 26px,
|
|
11
|
+
'H5': 24px,
|
|
12
|
+
'H6': 22px,
|
|
13
|
+
'H7': 20px,
|
|
14
|
+
'H8': 18px,
|
|
15
|
+
'B1':20px,
|
|
16
|
+
'B2':18px,
|
|
17
|
+
'B3':16px,
|
|
18
|
+
'B4':14px,
|
|
19
|
+
'L1':14px,
|
|
20
|
+
'L2':12px,
|
|
21
|
+
'L3':10px,
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
$line-heights: (
|
|
25
|
+
'H1': 56px,
|
|
26
|
+
'H2': 50.4px,
|
|
27
|
+
'H3': 44.8px,
|
|
28
|
+
'H4': 36.4px,
|
|
29
|
+
'H5': 33.6px,
|
|
30
|
+
'H6': 30.8px,
|
|
31
|
+
'H7': 28px,
|
|
32
|
+
'H8': 25.2px,
|
|
33
|
+
'B1': 28px,
|
|
34
|
+
'B2': 25.2px,
|
|
35
|
+
'B3': 22.4px,
|
|
36
|
+
'B4': 22.4px,
|
|
37
|
+
'L1': 19.6px,
|
|
38
|
+
'L2': 16.8px,
|
|
39
|
+
'L3': 14px,
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
@mixin font-style($type, $weight, $font-size-key) {
|
|
43
|
+
$font-size: map-get($font-sizes, $font-size-key);
|
|
44
|
+
$line-height: map-get($line-heights, $font-size-key);
|
|
45
|
+
|
|
46
|
+
font-weight: $weight;
|
|
47
|
+
font-size: $font-size;
|
|
48
|
+
line-height: $line-height;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// H1 Styles
|
|
52
|
+
.H1_BOLD { @include font-style('heading', $bold-weight, 'H1'); }
|
|
53
|
+
.H1_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H1'); }
|
|
54
|
+
.H1_MEDIUM { @include font-style('heading', $medium-weight, 'H1'); }
|
|
55
|
+
|
|
56
|
+
// H2 Styles
|
|
57
|
+
.H2_BOLD { @include font-style('heading', $bold-weight, 'H2'); }
|
|
58
|
+
.H2_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H2'); }
|
|
59
|
+
.H2_MEDIUM { @include font-style('heading', $medium-weight, 'H2'); }
|
|
60
|
+
|
|
61
|
+
// H3 Styles
|
|
62
|
+
.H3_BOLD { @include font-style('heading', $bold-weight, 'H3'); }
|
|
63
|
+
.H3_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H3'); }
|
|
64
|
+
.H3_MEDIUM { @include font-style('heading', $medium-weight, 'H3'); }
|
|
65
|
+
|
|
66
|
+
// H4 Styles
|
|
67
|
+
.H4_BOLD { @include font-style('heading', $bold-weight, 'H4'); }
|
|
68
|
+
.H4_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H4'); }
|
|
69
|
+
.H4_MEDIUM { @include font-style('heading', $medium-weight, 'H4'); }
|
|
70
|
+
|
|
71
|
+
// H5 Styles
|
|
72
|
+
.H5_BOLD { @include font-style('heading', $bold-weight, 'H5'); }
|
|
73
|
+
.H5_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H5'); }
|
|
74
|
+
.H5_MEDIUM { @include font-style('heading', $medium-weight, 'H5'); }
|
|
75
|
+
|
|
76
|
+
// H6 Styles
|
|
77
|
+
.H6_BOLD { @include font-style('heading', $bold-weight, 'H6'); }
|
|
78
|
+
.H6_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H6'); }
|
|
79
|
+
.H6_MEDIUM { @include font-style('heading', $medium-weight, 'H6'); }
|
|
80
|
+
|
|
81
|
+
// H7 Styles
|
|
82
|
+
.H7_BOLD { @include font-style('heading', $bold-weight, 'H7'); }
|
|
83
|
+
.H7_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H7'); }
|
|
84
|
+
.H7_MEDIUM { @include font-style('heading', $medium-weight, 'H7'); }
|
|
85
|
+
|
|
86
|
+
// H8 Styles
|
|
87
|
+
.H8_BOLD { @include font-style('heading', $bold-weight, 'H8'); }
|
|
88
|
+
.H8_SEMI_BOLD { @include font-style('heading', $semi-bold-weight, 'H8'); }
|
|
89
|
+
.H8_MEDIUM { @include font-style('heading', $medium-weight, 'H8'); }
|
|
90
|
+
|
|
91
|
+
// B1 Styles
|
|
92
|
+
.B1_BOLD { @include font-style('body', $bold-weight, 'B1'); }
|
|
93
|
+
.B1_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'B1'); }
|
|
94
|
+
|
|
95
|
+
// B2 Styles
|
|
96
|
+
.B2_BOLD { @include font-style('body', $bold-weight, 'B2'); }
|
|
97
|
+
.B2_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'B2'); }
|
|
98
|
+
|
|
99
|
+
// B3 Styles
|
|
100
|
+
.B3_BOLD { @include font-style('body', $bold-weight, 'B3'); }
|
|
101
|
+
.B3_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'B3'); }
|
|
102
|
+
|
|
103
|
+
// B4 Styles
|
|
104
|
+
.B4_BOLD { @include font-style('body', $bold-weight, 'B4'); }
|
|
105
|
+
.B4_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'B4'); }
|
|
106
|
+
|
|
107
|
+
// L1 Styles
|
|
108
|
+
.L1_BOLD { @include font-style('body', $bold-weight, 'L1'); }
|
|
109
|
+
.L1_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'L1'); }
|
|
110
|
+
|
|
111
|
+
// L2 Styles
|
|
112
|
+
.L2_BOLD { @include font-style('body', $bold-weight, 'L2'); }
|
|
113
|
+
.L2_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'L2'); }
|
|
114
|
+
|
|
115
|
+
// L3 Styles
|
|
116
|
+
.L3_BOLD { @include font-style('body', $bold-weight, 'L3'); }
|
|
117
|
+
.L3_SEMI_BOLD { @include font-style('body', $semi-bold-weight, 'L3'); }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
$surface-primary: #FFFFFF;
|
|
2
|
+
$surface-secondary: #F5F5F5;
|
|
3
|
+
$surface-static: #FFFFFF;
|
|
4
|
+
$surface-brand-static: #D92D27;
|
|
5
|
+
$surface-brand-transparent-static: #D92D3E33;
|
|
6
|
+
$surface-disabled: #E1E1E1;
|
|
7
|
+
$surface-inverted-transparent: #68686833;
|
|
8
|
+
|
|
9
|
+
$content-primary: #000000;
|
|
10
|
+
$content-secondary: #686868;
|
|
11
|
+
$content-disabled: #A7A7A7;
|
|
12
|
+
$content-inverted: #FFFFFF;
|
|
13
|
+
$content-static: #FFFFFF;
|
|
14
|
+
$content-secondary-static: #CECECE;
|
|
15
|
+
|
|
16
|
+
$border-primary: #686868;
|
|
17
|
+
$border-secondary: #A7A7A7;
|
|
18
|
+
$border-disabled: #CECECE;
|
|
19
|
+
$border-inverted: #000000;
|
|
20
|
+
$border-brand-static: #D92D27;
|
|
21
|
+
$border-static: #FFFFFF;
|
|
22
|
+
$border-brand-danger: #EB0542;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.custom-badge-class {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
padding: 6px 12px;
|
|
4
|
-
background-color: red;
|
|
5
|
-
color: white;
|
|
6
|
-
border-radius: 12px;
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
text-align: center;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.custom-badge-class:hover {
|
|
13
|
-
background-color: darkred;
|
|
14
|
-
}
|
|
15
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.custom-breadcrumb-class {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
font-size: 16px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.custom-breadcrumb-item {
|
|
8
|
-
color: blue;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
margin-right: 8px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.custom-breadcrumb-item:hover {
|
|
14
|
-
text-decoration: underline;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.breadcrumb-separator {
|
|
18
|
-
margin: 0 8px;
|
|
19
|
-
color: grey;
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/* Base button styling */
|
|
2
|
-
.button {
|
|
3
|
-
padding: 8px 16px;
|
|
4
|
-
font-size: 14px;
|
|
5
|
-
border-radius: 4px;
|
|
6
|
-
border: none;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
transition: background-color 0.3s ease;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* Variants */
|
|
12
|
-
.button.text {
|
|
13
|
-
background-color: transparent;
|
|
14
|
-
color: inherit;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.button.outlined {
|
|
18
|
-
background-color: transparent;
|
|
19
|
-
border: 2px solid currentColor;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.button.contained {
|
|
23
|
-
background-color: currentColor;
|
|
24
|
-
color: #fff;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Colors */
|
|
28
|
-
.button.primary {
|
|
29
|
-
color: #1976d2;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.button.secondary {
|
|
33
|
-
color: #9c27b0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.button.success {
|
|
37
|
-
color: #4caf50;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.button.error {
|
|
41
|
-
color: #f44336;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.button.warning {
|
|
45
|
-
color: #ff9800;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.button.info {
|
|
49
|
-
color: #2196f3;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* Sizes */
|
|
53
|
-
.button.small {
|
|
54
|
-
padding: 4px 8px;
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.button.medium {
|
|
59
|
-
padding: 8px 16px;
|
|
60
|
-
font-size: 14px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.button.large {
|
|
64
|
-
padding: 12px 24px;
|
|
65
|
-
font-size: 16px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Hover effects for contained buttons */
|
|
69
|
-
.button.contained.primary:hover {
|
|
70
|
-
background-color: #1565c0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.button.contained.secondary:hover {
|
|
74
|
-
background-color: #7b1fa2;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.button.contained.success:hover {
|
|
78
|
-
background-color: #388e3c;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.button.contained.error:hover {
|
|
82
|
-
background-color: #d32f2f;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.button.contained.warning:hover {
|
|
86
|
-
background-color: #f57c00;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.button.contained.info:hover {
|
|
90
|
-
background-color: #1976d2;
|
|
91
|
-
}
|
|
92
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.spinner {
|
|
2
|
-
border-style: solid;
|
|
3
|
-
border-radius: 50%;
|
|
4
|
-
border-color: transparent;
|
|
5
|
-
border-top-color: currentColor;
|
|
6
|
-
animation: spin 1s linear infinite;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.spinner.primary { color: #007bff; }
|
|
10
|
-
.spinner.secondary { color: #6c757d; }
|
|
11
|
-
.spinner.error { color: #dc3545; }
|
|
12
|
-
.spinner.success { color: #28a745; }
|
|
13
|
-
.spinner.info { color: #17a2b8; }
|
|
14
|
-
.spinner.warning { color: #ffc107; }
|
|
15
|
-
|
|
16
|
-
@keyframes spin {
|
|
17
|
-
0% { transform: rotate(0deg); }
|
|
18
|
-
100% { transform: rotate(360deg); }
|
|
19
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.spinner {
|
|
9
|
-
border: 2px solid transparent;
|
|
10
|
-
border-radius: 50%;
|
|
11
|
-
border-top: 2px solid currentColor;
|
|
12
|
-
animation: spin 1s linear infinite;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.spinner-inner {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
border-radius: 50%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.error-text {
|
|
22
|
-
color: red;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.button {
|
|
26
|
-
padding: 8px 16px;
|
|
27
|
-
border: none;
|
|
28
|
-
border-radius: 4px;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
font-size: 16px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.button-text {
|
|
34
|
-
background: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.button-outlined {
|
|
38
|
-
border: 1px solid currentColor;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.button-contained {
|
|
42
|
-
background-color: currentColor;
|
|
43
|
-
color: white;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.button-primary {
|
|
47
|
-
color: blue;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.button-secondary {
|
|
51
|
-
color: gray;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.button-small {
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.button-medium {
|
|
59
|
-
font-size: 16px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.button-large {
|
|
63
|
-
font-size: 20px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@keyframes spin {
|
|
67
|
-
0% { transform: rotate(0deg); }
|
|
68
|
-
100% { transform: rotate(360deg); }
|
|
69
|
-
}
|
|
70
|
-
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.tooltip-wrapper {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
position: relative;
|
|
4
|
-
margin-right: 20px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.custom-tooltip-class {
|
|
8
|
-
position: absolute;
|
|
9
|
-
bottom: 125%; /* Position above the element */
|
|
10
|
-
left: 50%;
|
|
11
|
-
transform: translateX(-50%);
|
|
12
|
-
background-color: #333;
|
|
13
|
-
color: #fff;
|
|
14
|
-
padding: 5px 10px;
|
|
15
|
-
border-radius: 4px;
|
|
16
|
-
font-size: 14px;
|
|
17
|
-
white-space: nowrap;
|
|
18
|
-
visibility: visible;
|
|
19
|
-
opacity: 1;
|
|
20
|
-
transition: opacity 0.2s ease-in-out;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.tooltip-wrapper .custom-tooltip-class::after {
|
|
24
|
-
content: "";
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 100%;
|
|
27
|
-
left: 50%;
|
|
28
|
-
transform: translateX(-50%);
|
|
29
|
-
border-width: 5px;
|
|
30
|
-
border-style: solid;
|
|
31
|
-
border-color: #333 transparent transparent transparent;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.hover-text {
|
|
35
|
-
color: blue;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
}
|
|
38
|
-
|
|
File without changes
|