groovinads-ui 1.0.0

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.
Files changed (66) hide show
  1. package/.babelrc +3 -0
  2. package/.storybook/main.js +19 -0
  3. package/.storybook/preview.js +13 -0
  4. package/.yarn/install-state.gz +0 -0
  5. package/.yarn/releases/yarn-4.1.1.cjs +893 -0
  6. package/.yarnrc.yml +3 -0
  7. package/package.json +40 -0
  8. package/src/components/Button/Button.jsx +104 -0
  9. package/src/components/Button/index.jsx +3 -0
  10. package/src/index.jsx +3 -0
  11. package/src/scss/abstracts/_borders-radius.scss +6 -0
  12. package/src/scss/abstracts/_colors.scss +33 -0
  13. package/src/scss/abstracts/_fonts.scss +8 -0
  14. package/src/scss/abstracts/_helpers.scss +7 -0
  15. package/src/scss/abstracts/_media-queries.scss +6 -0
  16. package/src/scss/abstracts/_mixins.scss +143 -0
  17. package/src/scss/abstracts/_spinner-duration.scss +1 -0
  18. package/src/scss/abstracts/_variables.scss +2 -0
  19. package/src/scss/animations/_alertToUp.scss +10 -0
  20. package/src/scss/animations/_aurora.scss +17 -0
  21. package/src/scss/animations/_colors.scss +15 -0
  22. package/src/scss/animations/_dash.scss +13 -0
  23. package/src/scss/animations/_fadeCopyFromLeft.scss +10 -0
  24. package/src/scss/animations/_goAndBack.scss +8 -0
  25. package/src/scss/animations/_inputUp.scss +10 -0
  26. package/src/scss/animations/_shake.scss +22 -0
  27. package/src/scss/animations/_showIn.scss +8 -0
  28. package/src/scss/animations/_showMenu.scss +12 -0
  29. package/src/scss/animations/_statusLine.scss +9 -0
  30. package/src/scss/animations/_toDown.scss +8 -0
  31. package/src/scss/animations/_toastFromLeft.scss +10 -0
  32. package/src/scss/animations/_toastFromRight.scss +10 -0
  33. package/src/scss/base/_base.scss +14 -0
  34. package/src/scss/base/_typography.scss +188 -0
  35. package/src/scss/components/_alerts.scss +115 -0
  36. package/src/scss/components/_breadcrumb.scss +30 -0
  37. package/src/scss/components/_buttons.scss +808 -0
  38. package/src/scss/components/_checks.scss +105 -0
  39. package/src/scss/components/_dropdown-deck.scss +115 -0
  40. package/src/scss/components/_dropdowns.scss +131 -0
  41. package/src/scss/components/_img-404.scss +6 -0
  42. package/src/scss/components/_inputs.scss +279 -0
  43. package/src/scss/components/_login-source.scss +19 -0
  44. package/src/scss/components/_modals.scss +89 -0
  45. package/src/scss/components/_nav-tabs.scss +38 -0
  46. package/src/scss/components/_pills.scss +88 -0
  47. package/src/scss/components/_radio.scss +102 -0
  48. package/src/scss/components/_shadows.scss +18 -0
  49. package/src/scss/components/_spinner.scss +20 -0
  50. package/src/scss/components/_status-icon.scss +61 -0
  51. package/src/scss/components/_switch.scss +77 -0
  52. package/src/scss/components/_tabulator.scss +386 -0
  53. package/src/scss/components/_textareas.scss +22 -0
  54. package/src/scss/components/_toast.scss +129 -0
  55. package/src/scss/custom/_campaign-id.scss +56 -0
  56. package/src/scss/custom/_img-not-found.scss +7 -0
  57. package/src/scss/custom/_modal-edit.scss +10 -0
  58. package/src/scss/index.jsx +0 -0
  59. package/src/scss/index.scss +9 -0
  60. package/src/scss/layout/_aurora.scss +39 -0
  61. package/src/scss/layout/_authentication.scss +65 -0
  62. package/src/scss/layout/_footer.scss +21 -0
  63. package/src/scss/layout/_main.scss +41 -0
  64. package/src/scss/layout/_navbar.scss +64 -0
  65. package/src/scss/views/_skeleton.scss +266 -0
  66. package/src/stories/Button.stories.jsx +11 -0
@@ -0,0 +1,105 @@
1
+ // Use
2
+ @use '../abstracts/helpers' as h;
3
+
4
+ .form-check {
5
+ display: flex;
6
+ flex-direction: row;
7
+ align-items: center;
8
+ padding: 0;
9
+ margin: 0;
10
+ min-height: unset;
11
+
12
+ label {
13
+ &.checkbox {
14
+ font-size: 0.875rem;
15
+ cursor: pointer;
16
+ margin: 0;
17
+ position: relative;
18
+ width: 100%;
19
+ display: flex;
20
+ align-items: center;
21
+ gap: 0.5rem;
22
+
23
+ input {
24
+ width: 100%;
25
+ height: 100%;
26
+ opacity: 0;
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ margin: 0;
31
+ float: none;
32
+ cursor: pointer;
33
+ z-index: 2;
34
+
35
+ &:checked {
36
+ & + .outer {
37
+ background-color: h.$ga-brand-midtone;
38
+ border-color: h.$ga-brand-midtone;
39
+
40
+ .inner {
41
+ &::before {
42
+ width: 0.375rem;
43
+ }
44
+ &::after {
45
+ width: 0.625rem;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ .outer {
53
+ width: 1.125rem;
54
+ height: 1.125rem;
55
+ display: block;
56
+ margin: 0;
57
+ border: 2px solid h.$grey-dark;
58
+ background-color: h.$white;
59
+ border-radius: h.$border-radius-xs;
60
+ position: relative;
61
+ @include h.transition(background-color border-color, 0.15s, ease-in);
62
+ }
63
+
64
+ .inner {
65
+ width: 1rem;
66
+ height: 1rem;
67
+ position: relative;
68
+ margin: 0;
69
+ padding: 0;
70
+ overflow: hidden;
71
+ display: block;
72
+
73
+ &::before,
74
+ &::after {
75
+ content: '';
76
+ width: 0px;
77
+ height: 0.1875rem;
78
+ position: absolute;
79
+ background-color: h.$white;
80
+ margin: 0;
81
+ padding: 0;
82
+ transform-origin: bottom left;
83
+ @include h.transition(all, 0.15s, ease-in);
84
+ }
85
+
86
+ &::before {
87
+ top: 0.3125rem;
88
+ left: 0.0625rem;
89
+ transform: rotate(42deg);
90
+ }
91
+ &::after {
92
+ top: 0.5625rem;
93
+ left: 0.375rem;
94
+ transform: rotate(-48deg);
95
+ transition-delay: 0.1s;
96
+ }
97
+ }
98
+ }
99
+
100
+ span {
101
+ color: h.$grey-dark;
102
+ @include h.font-family(h.$font-family-secondary, 0.875rem, h.$grey-dark, 400);
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,115 @@
1
+ // Use
2
+ @use '../abstracts/helpers' as h;
3
+
4
+
5
+ // Toggle button
6
+ .dropdown-toggle {
7
+
8
+ // Icono Deck
9
+ #deckApps {
10
+ g {
11
+ @include h.transition(
12
+ transform,
13
+ 0.15s,
14
+ cubic-bezier(0.22, 0.68, 0, 1.71)
15
+ );
16
+ transform-origin: 50% 50%;
17
+ transition-delay: 0.1s;
18
+
19
+ rect {
20
+ fill: h.$ga-brand-midtone;
21
+ transform-origin: 50% 50%;
22
+ @include h.transition(fill transform width height, 0.15s, ease-in);
23
+ }
24
+ }
25
+ }
26
+
27
+ &.show {
28
+ #deckApps {
29
+ g {
30
+ transform: rotate(45deg);
31
+
32
+ rect {
33
+ width: 3.2px;
34
+ height: 3.2px;
35
+
36
+ &:nth-child(1) {
37
+ transform: translateX(5.7px);
38
+ }
39
+
40
+ &:nth-child(2) {
41
+ width: 12.8px;
42
+ }
43
+
44
+ &:nth-child(3) {
45
+ transform: translateY(-5.7px);
46
+ }
47
+
48
+ &:nth-child(4) {
49
+ height: 12.8px;
50
+ }
51
+
52
+ &:nth-child(7) {
53
+ transform: translateY(5.7px);
54
+ }
55
+
56
+ &:nth-child(9) {
57
+ transform: translateX(-5.7px);
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ .dropdown {
66
+ // Dropdown menu
67
+ .dropdown-menu {
68
+ overflow-y: scroll;
69
+ scrollbar-width: thin;
70
+
71
+ .dropdown-item {
72
+ display: flex;
73
+ justify-content: space-between;
74
+ flex-direction: row;
75
+
76
+ .link-app {
77
+ display: flex;
78
+ flex-direction: row;
79
+ align-items: center;
80
+ gap: 1rem;
81
+ margin-right: 1rem;
82
+
83
+ // Icono de la aplicación
84
+ .icon-app {
85
+ width: 2rem;
86
+ height: 2rem;
87
+ border-radius: h.$border-radius-sm;
88
+ background-color: h.$secondary-blue-light;
89
+ display: flex;
90
+ justify-content: center;
91
+ align-items: center;
92
+ @include h.transition(background-color, 0.15s, ease-in-out);
93
+
94
+ i {
95
+ color: h.$white;
96
+ }
97
+ }
98
+ }
99
+
100
+ // Icono de favoritos
101
+ .deck-fav {
102
+ color: h.$grey-light;
103
+ font-size: 1rem;
104
+ border: 0;
105
+ background-color: transparent;
106
+ transform-origin: center;
107
+ @include h.transition(color, 0.15s, ease-in-out);
108
+
109
+ .fa-solid {
110
+ color: h.$warning;
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,131 @@
1
+ // Use
2
+ @use '../abstracts/helpers' as h;
3
+
4
+ @forward '../animations/showMenu';
5
+
6
+ .dropdown,
7
+ .dropup {
8
+ @include h.font-family(h.$font-family-secondary, 1rem, h.$grey-dark, 400);
9
+
10
+ // Toggle
11
+ .dropdown-toggle {
12
+ &::after {
13
+ display: none;
14
+ }
15
+
16
+ .caret {
17
+ @include h.transition(transform, 0.15s, ease-in-out);
18
+ }
19
+
20
+ &.show {
21
+ .caret {
22
+ transform: rotate(180deg);
23
+ }
24
+ }
25
+ }
26
+
27
+ // Menu
28
+ .dropdown-menu {
29
+ @include h.shadow(2, h.$ga-brand-dark, y);
30
+ overflow-y: auto;
31
+ border: none;
32
+ border-radius: h.$border-radius-sm;
33
+ animation: showMenu 300ms ease-in-out both;
34
+
35
+ // Header
36
+ .dropdown-header {
37
+ color: h.$grey-dark;
38
+ font-size: 0.75rem;
39
+ }
40
+
41
+ // Item
42
+ .dropdown-item {
43
+ color: h.$secondary-dark;
44
+ @include h.transition(color background-color, 0.15s, ease-in-out);
45
+ display: flex;
46
+ flex-direction: row;
47
+ align-items: center;
48
+ cursor: pointer;
49
+ width: 100%;
50
+ @include h.simpleEllipsisText;
51
+ padding: 0.5rem 1rem;
52
+ position: relative;
53
+ line-height: 1.2;
54
+ justify-content: flex-start;
55
+
56
+ &:hover {
57
+ background-color: lighten(h.$ga-brand-midtone, 50%);
58
+
59
+ .icon-app {
60
+ background-color: h.$ga-brand-midtone;
61
+ }
62
+ }
63
+
64
+ &.active,
65
+ &:active {
66
+ background-color: h.$ga-brand-light;
67
+ color: h.$white;
68
+
69
+ .icon-app {
70
+ background-color: h.$white;
71
+
72
+ .icon {
73
+ color: h.$ga-brand-light;
74
+
75
+ path {
76
+ fill: h.$ga-brand-light;
77
+ }
78
+ }
79
+
80
+ i {
81
+ color: h.$ga-brand-light;
82
+ }
83
+ }
84
+ > i {
85
+ color: h.$white;
86
+ }
87
+
88
+ > a {
89
+ color: h.$white;
90
+
91
+ i {
92
+ color: h.$white;
93
+ }
94
+ }
95
+ }
96
+
97
+ &:has(.btn, input) {
98
+ overflow: visible;
99
+
100
+ &:hover,
101
+ &:active {
102
+ background-color: h.$white;
103
+ }
104
+ }
105
+
106
+ a {
107
+ display: flex;
108
+ flex-direction: row;
109
+ justify-content: flex-start;
110
+ gap: 1rem;
111
+ color: h.$secondary-dark;
112
+
113
+ i {
114
+ color: h.$ga-brand-midtone;
115
+ }
116
+ }
117
+ }
118
+
119
+ .dropdown-checks {
120
+ list-style: none;
121
+ padding: 0;
122
+ display: flex;
123
+ gap: 0.5rem;
124
+ flex-direction: column;
125
+ max-height: 14vh;
126
+ overflow: scroll;
127
+ width: 100%;
128
+ margin: 0;
129
+ }
130
+ }
131
+ }
@@ -0,0 +1,6 @@
1
+ .img-404 {
2
+ max-width: 402px;
3
+ width: 100%;
4
+ height: auto;
5
+ margin-bottom: 2rem;
6
+ }
@@ -0,0 +1,279 @@
1
+ // Use
2
+ @use '../abstracts/helpers' as h;
3
+
4
+ // Forward
5
+ @forward '../animations/inputUp';
6
+
7
+ $label: scale(1) translateY(0) translateX(0) 1em 0.75em;
8
+ $label-xs: scale(1) translateY(0) translateX(0) 0.75em 0.75em;
9
+ $label-lg: scale(1) translateY(0) translateX(0) 1em 0.75em;
10
+ $label-focus: scale(0.85) translateY(-0.6em) translateX(0) 0 0.75em;
11
+ $label-focus-input: scale(0.85) translateY(-0.6em) translateX(0) 0 0.75em;
12
+
13
+ // Floating label
14
+ .form-floating {
15
+ position: unset;
16
+
17
+ & > .form-control {
18
+ font-size: 1rem;
19
+ border-color: h.$grey-dark;
20
+ color: h.$grey-dark;
21
+ border-radius: h.$border-radius-sm;
22
+ height: 3em;
23
+ min-height: unset;
24
+ padding: 1em 0.75em;
25
+ line-height: 1.2;
26
+ @include h.transition(box-shadow color, 0.1s, ease-out);
27
+
28
+ // Focus
29
+ &:focus,
30
+ &.focus {
31
+ border-color: h.$secondary-violet;
32
+ box-shadow: 0 0 0 2px h.$secondary-violet;
33
+ padding-top: 0.625em;
34
+ color: h.$ga-brand-dark;
35
+
36
+ & ~ label {
37
+ color: h.$secondary-violet;
38
+ @include h.setLabelTo($label-focus);
39
+ }
40
+
41
+ &:not(:placeholder-shown) ~ label {
42
+ color: h.$secondary-violet;
43
+ @include h.setLabelTo($label-focus);
44
+ }
45
+ }
46
+
47
+ &:not(:placeholder-shown) {
48
+ padding-top: 0.625em;
49
+
50
+ & ~ label {
51
+ color: h.$grey-dark;
52
+ @include h.setLabelTo($label-focus);
53
+ }
54
+ }
55
+
56
+ &:disabled,
57
+ :disabled {
58
+ background-color: h.$white;
59
+ color: rgba(h.$grey-dark, 0.5);
60
+ pointer-events: none;
61
+ }
62
+
63
+ & ~ label {
64
+ background-color: transparent;
65
+ width: auto;
66
+ max-width: 100%;
67
+ height: auto;
68
+ line-height: 1;
69
+ text-shadow: h.commonTextShadow(h.$white);
70
+ @include h.transition(opacity transform color padding, 0.2s, cubic-bezier(0, 0, 0.2, 1));
71
+ @include h.font-family(h.$font-family-secondary, 1em, h.$grey-dark, 400);
72
+ @include h.setLabelTo($label);
73
+ }
74
+
75
+ // Sizes
76
+ &.form-control-xs {
77
+ font-size: 0.875rem;
78
+ line-height: 1em;
79
+ padding: 0.75em 1.375em;
80
+ height: 2.375rem;
81
+ border-radius: h.$border-radius-xs;
82
+
83
+ & ~ label {
84
+ font-size: 0.875rem;
85
+ @include h.setLabelTo($label-xs);
86
+ }
87
+
88
+ &:focus,
89
+ &.focus,
90
+ &:not(:placeholder-shown) {
91
+ & ~ label {
92
+ @include h.setLabelTo($label-focus);
93
+ }
94
+ }
95
+ }
96
+
97
+ &.form-control-lg {
98
+ font-size: 1.25rem;
99
+ line-height: 1em;
100
+ height: 3.75rem;
101
+ border-radius: h.$border-radius-md;
102
+
103
+ & ~ label {
104
+ font-size: 1.25rem;
105
+ @include h.setLabelTo($label-lg);
106
+ }
107
+
108
+ &:focus,
109
+ &.focus,
110
+ &:not(:placeholder-shown) {
111
+ & ~ label {
112
+ @include h.setLabelTo($label-focus);
113
+ }
114
+ }
115
+ }
116
+ }
117
+
118
+ }
119
+
120
+ // Input group
121
+ .input-group {
122
+ border-radius: h.$border-radius-sm;
123
+ @include h.transition(box-shadow color, 0.1s, ease-out);
124
+
125
+ .input-group-text {
126
+ font-size: 0.875rem;
127
+ padding: 1em 0.75em;
128
+ height: 3rem;
129
+ background-color: h.$white;
130
+ border-color: h.$grey-dark;
131
+ color: h.$grey-dark;
132
+ border-radius: h.$border-radius-sm;
133
+
134
+ i {
135
+ font-size: 1rem;
136
+ }
137
+
138
+ // If it's preffixed
139
+ & + .form-floating {
140
+ .form-control {
141
+ border-left: none;
142
+ }
143
+ }
144
+
145
+ // If it's preffiexed & has icon
146
+ & + .input-group-text {
147
+ border-left: none;
148
+ }
149
+ }
150
+
151
+ .form-floating {
152
+
153
+ // If it's suffixed
154
+ &:not(:last-child) {
155
+ > .form-control {
156
+ border-right: none;
157
+ }
158
+ }
159
+
160
+ & > .form-control {
161
+ // Focus
162
+ &:focus,
163
+ &.focus {
164
+ box-shadow: none;
165
+
166
+ & ~ label {
167
+ @include h.setLabelTo($label-focus-input);
168
+ }
169
+ }
170
+ }
171
+
172
+ // If it's suffixed & icon label final position
173
+ &:has(.form-control:focus, .form-control.focus, .form-control:not(:placeholder-shown)) {
174
+ position: unset;
175
+ }
176
+ }
177
+
178
+ // Focus
179
+ &:has(.form-control:focus, .form-control.focus, .form-control:active) {
180
+ box-shadow: 0 0 0 2px h.$secondary-violet;
181
+
182
+ .input-group-text {
183
+ color: h.$secondary-violet;
184
+ }
185
+ }
186
+
187
+ &:has(.form-control-xs) {
188
+ .input-group-text {
189
+ font-size: 0.75rem;
190
+ height: 2.375rem;
191
+ }
192
+ }
193
+
194
+ &:has(.form-control-lg) {
195
+ .input-group-text {
196
+ height: 3.75rem;
197
+ }
198
+ }
199
+ }
200
+
201
+ // Error
202
+ .not-validated {
203
+
204
+ .form-control {
205
+ border-color: h.$error;
206
+ padding-right: calc(1.5em + 0.75rem);
207
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
208
+ background-repeat: no-repeat;
209
+ background-position: right calc(0.375em + 0.1875rem) center;
210
+ background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
211
+ background-color: lighten(h.$error, 40%);
212
+ border-top-right-radius: 0;
213
+
214
+ &:focus,
215
+ &.focus {
216
+ border-color: h.$error;
217
+ box-shadow: 0 0 0 0.25rem rgba(h.$error, 0.25);
218
+
219
+ & ~ label {
220
+ color: h.$error;
221
+ }
222
+
223
+ &:not(:placeholder-shown) {
224
+ & ~ label {
225
+ color: h.$error;
226
+ }
227
+ }
228
+ }
229
+
230
+ & ~ label {
231
+ color: h.$error;
232
+ }
233
+
234
+ &:not(:placeholder-shown) {
235
+ & ~ label {
236
+ color: h.$error;
237
+ }
238
+ }
239
+
240
+ }
241
+
242
+ &.input-group {
243
+ border-top-right-radius: 0;
244
+
245
+ .form-control,
246
+ .input-group-text {
247
+ border-top-right-radius: 0;
248
+ }
249
+
250
+ .input-group-text {
251
+ background-color: lighten(h.$error, 40%);
252
+ color: h.$error;
253
+ border-color: h.$error;
254
+ }
255
+
256
+ &:has(.form-control:focus, .form-control.focus) {
257
+ border-color: h.$error;
258
+ box-shadow: 0 0 0 0.25rem rgba(h.$error, 0.25);
259
+
260
+ .input-group-text {
261
+ color: h.$error;
262
+ }
263
+ }
264
+ }
265
+
266
+ &::after {
267
+ content: attr(data-error);
268
+ position: absolute;
269
+ bottom: 100%;
270
+ right: 0;
271
+ padding: 0.125rem 0.5rem;
272
+ font-size: 0.618rem;
273
+ line-height: 1;
274
+ color: h.$white;
275
+ background-color: h.$error;
276
+ border-radius: h.$border-radius-xs h.$border-radius-xs 0 0;
277
+ animation: inputUp .2s ease-out both;
278
+ }
279
+ }
@@ -0,0 +1,19 @@
1
+ // Logo class name
2
+ $logo-types: google, microsoft, linkedin;
3
+
4
+ // Logo size
5
+ $logo-size: 24px;
6
+
7
+ .login-source {
8
+ width: $logo-size;
9
+ height: 24px;
10
+ background-image: url('../../../public/imgs/logos-login.svg');
11
+ background-size: #{(length($logo-types) + 1)* $logo-size} $logo-size;
12
+
13
+ // Loop through the logo types
14
+ @for $i from 1 through length($logo-types) {
15
+ &.#{nth($logo-types, $i)} {
16
+ background-position: -($logo-size * $i) 0;
17
+ }
18
+ }
19
+ }