groovinads-ui 1.0.2 → 1.0.5

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 (59) hide show
  1. package/.storybook/preview-head.html +3 -0
  2. package/dist/index.es.js +1 -0
  3. package/dist/index.js +1 -0
  4. package/package.json +1 -1
  5. package/src/components/Button/Button.jsx +22 -37
  6. package/src/scss/abstracts/_borders-radius.scss +0 -6
  7. package/src/scss/abstracts/_colors.scss +0 -33
  8. package/src/scss/abstracts/_fonts.scss +0 -8
  9. package/src/scss/abstracts/_helpers.scss +0 -7
  10. package/src/scss/abstracts/_media-queries.scss +0 -6
  11. package/src/scss/abstracts/_mixins.scss +0 -143
  12. package/src/scss/abstracts/_spinner-duration.scss +0 -1
  13. package/src/scss/abstracts/_variables.scss +0 -2
  14. package/src/scss/animations/_alertToUp.scss +0 -10
  15. package/src/scss/animations/_aurora.scss +0 -17
  16. package/src/scss/animations/_colors.scss +0 -15
  17. package/src/scss/animations/_dash.scss +0 -13
  18. package/src/scss/animations/_fadeCopyFromLeft.scss +0 -10
  19. package/src/scss/animations/_goAndBack.scss +0 -8
  20. package/src/scss/animations/_inputUp.scss +0 -10
  21. package/src/scss/animations/_shake.scss +0 -22
  22. package/src/scss/animations/_showIn.scss +0 -8
  23. package/src/scss/animations/_showMenu.scss +0 -12
  24. package/src/scss/animations/_statusLine.scss +0 -9
  25. package/src/scss/animations/_toDown.scss +0 -8
  26. package/src/scss/animations/_toastFromLeft.scss +0 -10
  27. package/src/scss/animations/_toastFromRight.scss +0 -10
  28. package/src/scss/base/_base.scss +0 -14
  29. package/src/scss/base/_typography.scss +0 -188
  30. package/src/scss/components/_alerts.scss +0 -115
  31. package/src/scss/components/_breadcrumb.scss +0 -30
  32. package/src/scss/components/_buttons.scss +0 -808
  33. package/src/scss/components/_checks.scss +0 -105
  34. package/src/scss/components/_dropdown-deck.scss +0 -115
  35. package/src/scss/components/_dropdowns.scss +0 -131
  36. package/src/scss/components/_img-404.scss +0 -6
  37. package/src/scss/components/_inputs.scss +0 -279
  38. package/src/scss/components/_login-source.scss +0 -19
  39. package/src/scss/components/_modals.scss +0 -89
  40. package/src/scss/components/_nav-tabs.scss +0 -38
  41. package/src/scss/components/_pills.scss +0 -88
  42. package/src/scss/components/_radio.scss +0 -102
  43. package/src/scss/components/_shadows.scss +0 -18
  44. package/src/scss/components/_spinner.scss +0 -20
  45. package/src/scss/components/_status-icon.scss +0 -61
  46. package/src/scss/components/_switch.scss +0 -77
  47. package/src/scss/components/_tabulator.scss +0 -386
  48. package/src/scss/components/_textareas.scss +0 -22
  49. package/src/scss/components/_toast.scss +0 -129
  50. package/src/scss/custom/_campaign-id.scss +0 -56
  51. package/src/scss/custom/_img-not-found.scss +0 -7
  52. package/src/scss/custom/_modal-edit.scss +0 -10
  53. package/src/scss/index.scss +0 -9
  54. package/src/scss/layout/_aurora.scss +0 -39
  55. package/src/scss/layout/_authentication.scss +0 -65
  56. package/src/scss/layout/_footer.scss +0 -21
  57. package/src/scss/layout/_main.scss +0 -41
  58. package/src/scss/layout/_navbar.scss +0 -64
  59. package/src/scss/views/_skeleton.scss +0 -266
@@ -0,0 +1,3 @@
1
+ <link rel="stylesheet" href="http://ui.groovinads.com/styles.min.css">
2
+ <!-- Fontawesome kit -->
3
+ <script src="https://kit.fontawesome.com/79f14073fb.js" crossorigin="anonymous"></script>
@@ -0,0 +1 @@
1
+ import e from"react";const n=({variant:n,size:a,onClick:t,children:i,icon:l,iconPosition:s,className:r,style:o,processing:c})=>{let d=`btn ${r}`;"default"!==n&&(d+=` btn-${n}`),"md"!==a&&(d+=` btn-${a}`),"default"!==o&&(d+=` btn-${o}`),c&&(d+=" btn-processing");const m=c?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),i&&e.createElement("span",null,i,"…")):l?"end"===s?e.createElement(e.Fragment,null,i&&e.createElement("span",null,i),e.createElement("i",{className:`fa-solid ${l}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${l}`,"aria-hidden":"true"}),i&&e.createElement("span",null,i)):i&&e.createElement("span",null,i);return e.createElement("button",{className:d,onClick:t},m)};n.propTypes={variant:(void 0)(["primary","secondary","terciary","outline"]),size:(void 0)(["xs","md","lg"]),onClick:void 0,children:void 0,icon:void 0,iconPosition:(void 0)(["start","end"]),className:void 0,style:(void 0)(["default","success","danger","warning","link"]),processing:void 0},n.defaultProps={variant:"primary",size:"md",onClick:null,icon:null,iconPosition:"start",className:"",style:"default",processing:!1};export{n as Button};
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react");const n=({variant:n,size:t,onClick:a,children:i,icon:l,iconPosition:s,className:r,style:c,processing:o})=>{let d=`btn ${r}`;"default"!==n&&(d+=` btn-${n}`),"md"!==t&&(d+=` btn-${t}`),"default"!==c&&(d+=` btn-${c}`),o&&(d+=" btn-processing");const m=o?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),i&&e.createElement("span",null,i,"…")):l?"end"===s?e.createElement(e.Fragment,null,i&&e.createElement("span",null,i),e.createElement("i",{className:`fa-solid ${l}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${l}`,"aria-hidden":"true"}),i&&e.createElement("span",null,i)):i&&e.createElement("span",null,i);return e.createElement("button",{className:d,onClick:a},m)};n.propTypes={variant:(void 0)(["primary","secondary","terciary","outline"]),size:(void 0)(["xs","md","lg"]),onClick:void 0,children:void 0,icon:void 0,iconPosition:(void 0)(["start","end"]),className:void 0,style:(void 0)(["default","success","danger","warning","link"]),processing:void 0},n.defaultProps={variant:"primary",size:"md",onClick:null,icon:null,iconPosition:"start",className:"",style:"default",processing:!1},exports.Button=n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groovinads-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "repository": "git@bitbucket.org:groovinads/react-components.git",
@@ -1,20 +1,5 @@
1
- /* import React from 'react';
2
-
3
- //STYLES
4
- //import 'https://brands.groovinads.com/css/scss/components/_buttons.scss';
5
-
6
- const Button = ({ children, ...props }) => {
7
- return <button {...props}>{children}</button>;
8
- }
9
-
10
- export default Button;
11
- */
12
-
13
1
  import React from 'react';
14
- // import PropTypes from 'prop-types';
15
-
16
- // STYLES
17
- import '../../scss/components/_buttons.scss';
2
+ import * as PropTypes from 'prop-types';
18
3
 
19
4
  const Button = ({
20
5
  variant,
@@ -78,27 +63,27 @@ const Button = ({
78
63
  );
79
64
  };
80
65
 
81
- // Button.propTypes = {
82
- // variant: PropTypes.oneOf(['primary', 'secondary', 'terciary', 'outline']),
83
- // size: PropTypes.oneOf(['xs', 'md', 'lg']),
84
- // onClick: PropTypes.func,
85
- // children: PropTypes.node,
86
- // icon: PropTypes.node,
87
- // iconPosition: PropTypes.oneOf(['start', 'end']),
88
- // className: PropTypes.string,
89
- // style: PropTypes.oneOf(['default', 'success', 'danger', 'warning', 'link']),
90
- // processing: PropTypes.bool,
91
- // };
66
+ Button.propTypes = {
67
+ variant: PropTypes.oneOf(['primary', 'secondary', 'terciary', 'outline']),
68
+ size: PropTypes.oneOf(['xs', 'md', 'lg']),
69
+ onClick: PropTypes.func,
70
+ children: PropTypes.node,
71
+ icon: PropTypes.node,
72
+ iconPosition: PropTypes.oneOf(['start', 'end']),
73
+ className: PropTypes.string,
74
+ style: PropTypes.oneOf(['default', 'success', 'danger', 'warning', 'link']),
75
+ processing: PropTypes.bool,
76
+ };
92
77
 
93
- // Button.defaultProps = {
94
- // variant: 'primary',
95
- // size: 'md',
96
- // onClick: null,
97
- // icon: null,
98
- // iconPosition: 'start',
99
- // className: '',
100
- // style: 'default',
101
- // processing: false,
102
- // };
78
+ Button.defaultProps = {
79
+ variant: 'primary',
80
+ size: 'md',
81
+ onClick: null,
82
+ icon: null,
83
+ iconPosition: 'start',
84
+ className: '',
85
+ style: 'default',
86
+ processing: false,
87
+ };
103
88
 
104
89
  export default Button;
@@ -1,6 +0,0 @@
1
- // Borders radius
2
- $border-radius-xs: 0.1875rem;
3
- $border-radius-sm: 0.375rem;
4
- $border-radius-md: 0.5rem;
5
- $border-radius-lg: 0.75rem;
6
- $border-radius-xl: 1rem;
@@ -1,33 +0,0 @@
1
- // Groovinads colors
2
- $ga-brand-dark: #00004b;
3
- $ga-brand-midtone: #3930b1;
4
- $ga-brand-light: #24b8ce;
5
-
6
- // Neutrals
7
- $grey-dark: #767676;
8
- $grey-light: #efefef;
9
- $white: #ffffff;
10
- $black: #000000;
11
-
12
- // Secondary colors
13
- $secondary-blue-light: #2d85e5;
14
- $secondary-blue: #12355b;
15
- $secondary-violet-light: #9191db;
16
- $secondary-violet: #746ec8;
17
- $secondary-dark: #091a12;
18
-
19
- // Messaging
20
- $error: #e63137;
21
- $warning: #f3a905;
22
- $safeWarning: #aa5509;
23
- $warning-bg: #FEEDC6;
24
- $success: #5bbb84;
25
- $safeSuccess: #31754e;
26
- $success-bg: #D6EEE0;
27
-
28
- // Brands
29
- $linkedin-brand: #1877f2;
30
- $facebook-brand: #0077B5;
31
- $microsoft-font: #5e5e5e;
32
- $microsoft-border: #8c8c8c;
33
- $google-brand: #70757a;
@@ -1,8 +0,0 @@
1
- // Fonts family
2
- $font-family-primary: 'Baloo 2';
3
- $font-family-secondary: 'Roboto';
4
- $font-family-code: 'Roboto Mono';
5
- $font-family-icon: 'Font Awesome 6 Pro';
6
-
7
- // Font size
8
- $font-size: 16px;
@@ -1,7 +0,0 @@
1
- @forward 'variables';
2
- @forward 'fonts';
3
- @forward 'borders-radius';
4
- @forward 'media-queries';
5
- @forward 'colors';
6
- @forward 'mixins';
7
- @forward 'spinner-duration';
@@ -1,6 +0,0 @@
1
- // Media Queries
2
- $xxl: '(min-width: 1400px)';
3
- $xl: '(min-width: 1200px)';
4
- $lg: '(min-width: 992px)';
5
- $md: '(min-width: 768px)';
6
- $sm: '(min-width: 576px)';
@@ -1,143 +0,0 @@
1
- @use 'fonts' as f;
2
- @use 'borders-radius' as br;
3
-
4
- @mixin font-family($font_family, $font_size, $font_color, $font_weight) {
5
- @if $font_family == f.$font-family-primary {
6
- font-family: f.$font-family-primary, sans-serif;
7
- }
8
-
9
- @if $font_family == f.$font-family-secondary {
10
- font-family: f.$font-family-secondary, sans-serif;
11
- }
12
-
13
- @if $font_family == f.$font-family-code {
14
- font-family: f.$font-family-code, monospace;
15
- }
16
-
17
- font: {
18
- size: $font_size;
19
- weight: $font_weight;
20
- }
21
- color: $font_color;
22
- }
23
-
24
- @mixin transition($properties, $duration, $easing) {
25
- $value: ();
26
- @each $property in $properties {
27
- @if length($value) > 0 {
28
- $value: append($value, unquote(',') #{$property} $duration $easing);
29
- } @else {
30
- $value: append($value, #{$property} $duration $easing);
31
- }
32
- }
33
- transition: $value;
34
- }
35
-
36
- @mixin respond-to($media) {
37
- @media #{$media} {
38
- @content;
39
- }
40
- }
41
-
42
- @mixin shadow($depth, $color, $direction) {
43
- @if $depth == 1 {
44
- @if $direction != x {
45
- box-shadow: 0px 1px 1px rgba($color, 0.25),
46
- 0px 1px 3px 1px rgba($color, 0.2);
47
- } @else {
48
- box-shadow: 1px 0px 1px rgba($color, 0.25),
49
- 1px 0px 3px 1px rgba($color, 0.2);
50
- }
51
- }
52
-
53
- @if $depth == 2 {
54
- @if $direction != x {
55
- box-shadow: 0 10px 20px rgba($color, 0.19), 0px 6px 6px rgba($color, 0.23);
56
- } @else {
57
- box-shadow: 10px 0px 20px rgba($color, 0.19),
58
- 6px 0px 6px rgba($color, 0.23);
59
- }
60
- }
61
-
62
- @if $depth == 3 {
63
- @if $direction != x {
64
- box-shadow: 0px 14px 28px rgba($color, 0.25),
65
- 0px 10px 10px rgba($color, 0.22);
66
- } @else {
67
- box-shadow: 14px 0px 28px rgba($color, 0.25),
68
- 10px 0px 10px rgba($color, 0.22);
69
- }
70
- }
71
-
72
- @if $depth == 4 {
73
- @if $direction != x {
74
- box-shadow: 0px 19px 38px rgba($color, 0.3),
75
- 0px 15px 12px rgba($color, 0.22);
76
- } @else {
77
- box-shadow: 19px 0px 38px rgba($color, 0.3),
78
- 15px 0px 12px rgba($color, 0.22);
79
- }
80
- }
81
- }
82
-
83
- @mixin scrollbars(
84
- $size,
85
- $foreground-color,
86
- $background-color: mix($foreground-color, white, 50%)
87
- ) {
88
- // For Google Chrome
89
- &::-webkit-scrollbar {
90
- width: $size;
91
- height: $size;
92
- }
93
-
94
- &::-webkit-scrollbar-thumb {
95
- background: $foreground-color;
96
- border-radius: br.$border-radius-sm;
97
- @include transition(background-color, 0.15s, ease-in-out);
98
-
99
- &:hover {
100
- background-color: mix($foreground-color, black, 75%);
101
- }
102
- }
103
-
104
- &::-webkit-scrollbar-track {
105
- background: $background-color;
106
- padding: 10px;
107
- }
108
-
109
- // For Internet Explorer
110
- & {
111
- scrollbar-face-color: $foreground-color;
112
- scrollbar-track-color: $background-color;
113
- }
114
- }
115
-
116
- @mixin multipleEllipsisText($lineCount, $maxHeight, $lineHeight) {
117
- max-height: $maxHeight;
118
- -webkit-line-clamp: $lineCount;
119
- -moz-line-clamp: $lineCount;
120
- -ms-line-clamp: $lineCount;
121
- line-clamp: $lineCount;
122
- text-overflow: ellipsis;
123
- overflow: hidden;
124
- line-height: $lineHeight;
125
- display: -webkit-box;
126
- -webkit-box-orient: vertical;
127
- word-break: break-word;
128
- }
129
-
130
- @mixin simpleEllipsisText {
131
- overflow: hidden;
132
- white-space: nowrap;
133
- text-overflow: ellipsis;
134
- }
135
-
136
- @mixin setLabelTo($properties) {
137
- transform: nth($properties, 1) nth($properties, 2) nth($properties, 3);
138
- padding: nth($properties, 4) nth($properties, 5);
139
- }
140
-
141
- @function commonTextShadow($color) {
142
- @return 2px 2px 1px $color, 2px -2px 1px $color, -2px 2px 1px $color, -2px -2px 1px $color, 2px 0px 1px $color, 0px 2px 1px $color, -2px 0px 1px $color, 0px -2px 1px $color;
143
- }
@@ -1 +0,0 @@
1
- $spinner-duration: 0.75s;
@@ -1,2 +0,0 @@
1
- // App logo
2
- $logo-width: 114px;
@@ -1,10 +0,0 @@
1
- @keyframes alertToUp {
2
- 0% {
3
- transform: translate3d(0,-100%,0);
4
- visibility: visible;
5
- }
6
-
7
- to {
8
- transform: translateZ(0);
9
- }
10
- }
@@ -1,17 +0,0 @@
1
- @keyframes aurora {
2
- 0% {
3
- background-position: left top;
4
- }
5
- 25% {
6
- background-position: right top;
7
- }
8
- 50% {
9
- background-position: right bottom;
10
- }
11
- 75% {
12
- background-position: left bottom;
13
- }
14
- 100% {
15
- background-position: left top;
16
- }
17
- }
@@ -1,15 +0,0 @@
1
- //Use
2
- @use '../abstracts/helpers' as h;
3
-
4
- @keyframes colors {
5
- 0%,
6
- 100% {
7
- stroke: h.$secondary-blue-light;
8
- }
9
- 25% {
10
- stroke: h.$ga-brand-light;
11
- }
12
- 75% {
13
- stroke: h.$ga-brand-midtone;
14
- }
15
- }
@@ -1,13 +0,0 @@
1
- @keyframes dash {
2
- 0% {
3
- stroke-dashoffset: 187;
4
- }
5
- 50% {
6
- stroke-dashoffset: 46.75;
7
- transform: rotate(135deg);
8
- }
9
- 100% {
10
- stroke-dashoffset: 187;
11
- transform: rotate(450deg);
12
- }
13
- }
@@ -1,10 +0,0 @@
1
- @keyframes fadeCopyFromLeft {
2
- 0% {
3
- opacity: 0;
4
- transform: translateX(0) translateY(-50%);
5
- }
6
- 100% {
7
- opacity: 1;
8
- transform: translateX(0) translateY(20%);
9
- }
10
- }
@@ -1,8 +0,0 @@
1
- @keyframes goAndBack {
2
- 0% {
3
- transform: translateX(-100%);
4
- }
5
- 100% {
6
- transform: translate(100%);
7
- }
8
- }
@@ -1,10 +0,0 @@
1
- @keyframes inputUp {
2
- 0% {
3
- opacity: 0;
4
- transform: translateY(30%);
5
- }
6
- 100% {
7
- opacity: 1;
8
- transform: translateY(0);
9
- }
10
- }
@@ -1,22 +0,0 @@
1
- @keyframes shakeIt {
2
- 10%,
3
- 90% {
4
- transform: translate3d(-2px, 0, 0);
5
- }
6
-
7
- 20%,
8
- 80% {
9
- transform: translate3d(4px, 0, 0);
10
- }
11
-
12
- 30%,
13
- 50%,
14
- 70% {
15
- transform: translate3d(-6px, 0, 0);
16
- }
17
-
18
- 40%,
19
- 60% {
20
- transform: translate3d(6px, 0, 0);
21
- }
22
- }
@@ -1,8 +0,0 @@
1
- @keyframes showIn {
2
- 0% {
3
- opacity: 0;
4
- }
5
- 100% {
6
- opacity: 1;
7
- }
8
- }
@@ -1,12 +0,0 @@
1
- // Animations
2
- @keyframes showMenu {
3
- 0% {
4
- opacity: 0;
5
- max-height: 0;
6
- }
7
-
8
- 100% {
9
- max-height: 50vh;
10
- opacity: 1;
11
- }
12
- }
@@ -1,9 +0,0 @@
1
- @keyframes statusLine {
2
- 72.5% {
3
- opacity: 0;
4
- }
5
-
6
- to {
7
- stroke-dashoffset: 0;
8
- }
9
- }
@@ -1,8 +0,0 @@
1
- @keyframes toDown {
2
- 0% {
3
- transform: translateY(-100%);
4
- }
5
- 100% {
6
- transform: translateY(0%);
7
- }
8
- }
@@ -1,10 +0,0 @@
1
- @keyframes toastFromLeft {
2
- 0% {
3
- transform: translate3d(-100%, 0, 0) scale(0);
4
- opacity: .5;
5
- }
6
- 100% {
7
- transform: translate3d(0, 0, 0) scale(1);
8
- opacity: 1;
9
- }
10
- }
@@ -1,10 +0,0 @@
1
- @keyframes toastFromRight {
2
- 0% {
3
- transform: translate3d(100%, 0, 0) scale(0);
4
- opacity: .5;
5
- }
6
- 100% {
7
- transform: translate3d(0, 0, 0) scale(1);
8
- opacity: 1;
9
- }
10
- }
@@ -1,14 +0,0 @@
1
- // Use
2
- @use '../abstracts/helpers' as h;
3
-
4
- body {
5
- background-color: h.$grey-light;
6
- @include h.scrollbars(0.5rem, transparent, transparent);
7
-
8
- &.modal-open {
9
- overflow: auto !important;
10
- &[style] {
11
- padding-right: 0px !important;
12
- }
13
- }
14
- }