@unifiedsoftware/styles 1.0.0 → 1.0.2

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/index.scss CHANGED
@@ -1 +1,21 @@
1
1
  @use 'scss/components';
2
+
3
+ @use 'scss/animation';
4
+
5
+ /* Estilos CSS aquí */
6
+ .slider-container {
7
+ width: 300px;
8
+ height: 20px;
9
+ background-color: #ccc;
10
+ position: relative;
11
+ margin-top: 20px;
12
+ }
13
+
14
+ .slider-point {
15
+ width: 20px;
16
+ height: 20px;
17
+ background-color: #007bff;
18
+ border-radius: 50%;
19
+ position: absolute;
20
+ cursor: pointer;
21
+ }
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@unifiedsoftware/styles",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "index.scss",
7
7
  "bootstrap.scss",
8
+ "fci-styles.scss",
8
9
  "css/**/*.css",
9
10
  "scss/**/*.scss"
10
11
  ],
11
12
  "sideEffects": [
12
13
  "index.scss",
13
14
  "bootstrap.scss",
15
+ "fci-styles.scss",
14
16
  "css/**/*.css",
15
17
  "scss/**/*.scss"
16
18
  ],
@@ -0,0 +1,45 @@
1
+ @use './variables' as *;
2
+
3
+ .#{$prefix}animation-spin {
4
+ animation: #{$prefix}animation-spin 1s linear infinite;
5
+ transform-origin: center center;
6
+ }
7
+
8
+ @keyframes #{$prefix}animation-spin {
9
+ from {
10
+ transform: rotate(0deg);
11
+ }
12
+ to {
13
+ transform: rotate(360deg);
14
+ }
15
+ }
16
+
17
+ .#{$prefix}animation-pulse {
18
+ animation: #{$prefix}animation-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
19
+ }
20
+
21
+ @keyframes #{$prefix}animation-pulse {
22
+ 0%,
23
+ 100% {
24
+ opacity: 1;
25
+ }
26
+ 50% {
27
+ opacity: 0.5;
28
+ }
29
+ }
30
+
31
+ .#{$prefix}animation-bounce {
32
+ animation: #{$prefix}animation-bounce 1s infinite;
33
+ }
34
+
35
+ @keyframes #{$prefix}animation-bounce {
36
+ 0%,
37
+ 100% {
38
+ transform: translateY(-25%);
39
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
40
+ }
41
+ 50% {
42
+ transform: translateY(0);
43
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
44
+ }
45
+ }
@@ -1,4 +1,5 @@
1
1
  @use '../variables' as *;
2
+ @use '../mixins/overlay' as *;
2
3
 
3
4
  .#{$prefix}button {
4
5
  position: relative;
@@ -11,27 +12,14 @@
11
12
  border-radius: var(--#{$prefix}button-border-radius);
12
13
  cursor: pointer;
13
14
  color: var(--#{$prefix}button-color);
14
- background: var(--#{$prefix}button-background);
15
+ background-color: var(--#{$prefix}button-background);
16
+ display: flex;
17
+ align-items: center;
18
+ gap: var(--#{$prefix}button-gap);
15
19
  user-select: none;
16
20
  -webkit-tap-highlight-color: transparent;
17
21
 
18
- &__elevation {
19
- position: absolute;
20
- inset: 0px;
21
- z-index: 0;
22
- border: var(--#{$prefix}button-border-width) solid var(--#{$prefix}button-border-color);
23
- border-radius: inherit;
24
- background: currentColor;
25
- opacity: var(--#{$prefix}button-elevation-opacity);
26
- }
27
-
28
- &:hover &__elevation {
29
- opacity: var(--#{$prefix}_hover-button-elevation-opacity);
30
- }
31
-
32
- &:active &__elevation {
33
- opacity: var(--#{$prefix}_active-button-elevation-opacity);
34
- }
22
+ @include overlay();
35
23
 
36
24
  &__outline {
37
25
  position: absolute;
@@ -39,5 +27,14 @@
39
27
  z-index: 0;
40
28
  border: var(--#{$prefix}button-outline-border-width) solid var(--#{$prefix}button-outline-border-color);
41
29
  border-radius: inherit;
30
+ pointer-events: none;
31
+ }
32
+
33
+ &__prefix,
34
+ &__suffix,
35
+ &__content {
36
+ position: relative;
37
+ display: flex;
38
+ align-items: center;
42
39
  }
43
40
  }
@@ -0,0 +1,6 @@
1
+ @use '../variables' as *;
2
+
3
+ .#{$prefix}collapse {
4
+ overflow: hidden;
5
+ transition: all 0.15s ease-in-out;
6
+ }
@@ -0,0 +1,11 @@
1
+ @use '../variables' as *;
2
+
3
+ .#{$prefix}icon {
4
+ width: 1em;
5
+ height: 1em;
6
+ font-size: var(--#{$prefix}icon-font-size);
7
+ color: var(--#{$prefix}icon-color);
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ }
@@ -1,3 +1,8 @@
1
+ @use 'collapse';
2
+ @use 'icon';
3
+
1
4
  @use 'button';
5
+
6
+ @use 'menu';
2
7
  @use 'divider';
3
8
  @use 'tabs';
@@ -0,0 +1,124 @@
1
+ @use '../variables' as *;
2
+ @use '../mixins/overlay' as *;
3
+
4
+ .#{$prefix}menu {
5
+ margin: 0;
6
+ padding: 0;
7
+ color: var(--#{$prefix}menu-color);
8
+ background-color: var(--#{$prefix}menu-background);
9
+
10
+ &-item {
11
+ position: relative;
12
+ height: var(--#{$prefix}menu-item-height);
13
+ padding: var(--#{$prefix}menu-item-padding-y) var(--#{$prefix}menu-item-padding-x);
14
+ font-size: var(--#{$prefix}menu-item-font-size);
15
+ font-weight: var(--#{$prefix}menu-item-font-weight);
16
+ text-decoration: none;
17
+ cursor: pointer;
18
+ display: flex;
19
+ align-items: center;
20
+ color: var(--#{$prefix}menu-item-color);
21
+ background-color: var(--#{$prefix}menu-item-background);
22
+ user-select: none;
23
+ -webkit-tap-highlight-color: transparent;
24
+ gap: var(--#{$prefix}menu-item-gap);
25
+
26
+ &:hover {
27
+ text-decoration: none;
28
+ }
29
+
30
+ @include overlay();
31
+
32
+ &--disabled {
33
+ //opacity: 0.6;
34
+ pointer-events: none;
35
+ }
36
+
37
+ &--selected &__icon {
38
+ --#{$prefix}menu-item-icon-color: var(--#{$prefix}_active-menu-item-icon-color);
39
+ }
40
+
41
+ &__icon {
42
+ flex-shrink: 0;
43
+ z-index: 1;
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+ }
48
+
49
+ &__icon .#{$prefix}icon {
50
+ --#{$prefix}icon-font-size: var(--#{$prefix}menu-item-icon-font-size);
51
+ --#{$prefix}icon-color: var(--#{$prefix}menu-item-icon-color);
52
+ }
53
+
54
+ &__content {
55
+ flex-grow: 1;
56
+ z-index: 1;
57
+ display: grid;
58
+ overflow: hidden;
59
+ }
60
+
61
+ &__title {
62
+ overflow: hidden;
63
+ display: -webkit-box;
64
+ -webkit-box-orient: vertical;
65
+ -webkit-line-clamp: 1;
66
+ }
67
+ }
68
+
69
+ &-group {
70
+ position: relative;
71
+ height: var(--#{$prefix}menu-group-height);
72
+ padding: var(--#{$prefix}menu-group-padding-y) var(--#{$prefix}menu-group-padding-x);
73
+ font-size: var(--#{$prefix}menu-group-font-size);
74
+ font-weight: var(--#{$prefix}menu-group-font-weight);
75
+ text-decoration: none;
76
+ border-bottom: var(--#{$prefix}menu-group-border-width) solid var(--#{$prefix}menu-group-border-color);
77
+ display: flex;
78
+ align-items: center;
79
+ color: var(--#{$prefix}menu-group-color);
80
+ background-color: var(--#{$prefix}menu-group-background);
81
+ gap: var(--#{$prefix}menu-group-gap);
82
+
83
+ &:hover {
84
+ text-decoration: none;
85
+ }
86
+
87
+ @include overlay();
88
+
89
+ &__icon {
90
+ flex-shrink: 0;
91
+ z-index: 1;
92
+ display: flex;
93
+ justify-content: center;
94
+ align-items: center;
95
+ }
96
+
97
+ &--selected &__icon {
98
+ --#{$prefix}menu-group-icon-color: var(--#{$prefix}_active-menu-item-icon-color);
99
+ }
100
+
101
+ &__icon .#{$prefix}icon {
102
+ --#{$prefix}icon-font-size: var(--#{$prefix}menu-group-icon-font-size);
103
+ --#{$prefix}icon-color: var(--#{$prefix}menu-group-icon-color);
104
+ }
105
+
106
+ &__content {
107
+ flex-grow: 1;
108
+ z-index: 1;
109
+ display: grid;
110
+ overflow: hidden;
111
+ }
112
+
113
+ &__title {
114
+ overflow: hidden;
115
+ display: -webkit-box;
116
+ -webkit-box-orient: vertical;
117
+ -webkit-line-clamp: 1;
118
+ }
119
+ }
120
+
121
+ &-submenu & {
122
+ --#{$prefix}menu-background: var(--#{$prefix}submenu-background);
123
+ }
124
+ }
@@ -0,0 +1,50 @@
1
+ @use '../variables' as *;
2
+
3
+ .#{$prefix}slider {
4
+ position: relative;
5
+ margin: 1rem;
6
+ width: 100%;
7
+ height: 20px;
8
+ display: flex;
9
+ align-items: center;
10
+
11
+ &__track {
12
+ width: 100%;
13
+ height: 5px;
14
+ background-color: blue;
15
+ }
16
+
17
+ &__range {
18
+ width: 50%;
19
+ height: 5px;
20
+ background-color: red;
21
+ }
22
+
23
+ &__thumb {
24
+ position: absolute;
25
+ width: 20px;
26
+ height: 20px;
27
+ border-radius: 9999px;
28
+ background-color: pink;
29
+ }
30
+
31
+ &__marks {
32
+ width: 100%;
33
+ display: flex;
34
+ align-items: center;
35
+ }
36
+
37
+ &__mark {
38
+ position: absolute;
39
+ width: 10px;
40
+ height: 10px;
41
+ border-radius: 9999px;
42
+ background-color: peru;
43
+ }
44
+
45
+ &__mark-label {
46
+ position: absolute;
47
+ top: 1.5rem;
48
+ text-align: center;
49
+ }
50
+ }
@@ -1,4 +1,5 @@
1
1
  @use '../variables' as *;
2
+ @use '../mixins/overlay' as *;
2
3
 
3
4
  .#{$prefix}tabs {
4
5
  width: 100%;
@@ -8,16 +9,19 @@
8
9
 
9
10
  .#{$prefix}tab {
10
11
  position: relative;
11
- width: 100%;
12
12
  padding: 0px 16px;
13
- font-size: 14px;
14
- font-weight: 500;
13
+ font-size: var(--#{$prefix}tab-font-size);
14
+ font-weight: var(--#{$prefix}tab-font-weight);
15
15
  vertical-align: middle;
16
16
  z-index: 1;
17
17
  color: var(--#{$prefix}tab-color);
18
18
  display: inline-flex;
19
19
  justify-content: center;
20
20
  align-items: center;
21
+ user-select: none;
22
+ -webkit-tap-highlight-color: transparent;
23
+
24
+ @include overlay();
21
25
 
22
26
  &__content {
23
27
  position: relative;
@@ -31,8 +35,8 @@
31
35
 
32
36
  &__indicator {
33
37
  position: absolute;
34
- height: 3px;
35
- border-radius: 3px 3px 0px 0px;
38
+ height: var(--#{$prefix}tab-indicator-height);
39
+ border-radius: 0;
36
40
  inset: auto 0px 0px;
37
41
  opacity: 0;
38
42
  z-index: -1;
@@ -41,7 +45,7 @@
41
45
  }
42
46
 
43
47
  &--selected {
44
- color: var(--#{$prefix}_active-tab-color);
48
+ // color: var(--#{$prefix}_active-tab-color);
45
49
  }
46
50
 
47
51
  &--selected &__indicator {
@@ -0,0 +1,52 @@
1
+ @use '../variables' as *;
2
+
3
+ @mixin overlay {
4
+ position: relative;
5
+
6
+ & .#{$prefix}overlay {
7
+ position: absolute;
8
+ inset: 0px;
9
+ border-radius: inherit;
10
+ overflow: hidden;
11
+ color: inherit;
12
+
13
+ &__surface {
14
+ position: absolute;
15
+ inset: 0px;
16
+ color: var(--#{$prefix}overlay-color);
17
+ opacity: var(--#{$prefix}overlay-opacity);
18
+ background-color: currentColor;
19
+ z-index: 0;
20
+ }
21
+
22
+ &::before {
23
+ content: '';
24
+ position: absolute;
25
+ inset: 0px;
26
+ opacity: 0;
27
+ background-color: currentColor;
28
+ transition:
29
+ opacity 15ms linear,
30
+ background-color 15ms linear;
31
+ }
32
+
33
+ &::after {
34
+ content: '';
35
+ position: absolute;
36
+ inset: 0px;
37
+ opacity: 0;
38
+ color: var(--#{$prefix}_active-overlay-color);
39
+ background-color: currentColor;
40
+ transition: opacity 30ms linear;
41
+ }
42
+ }
43
+
44
+ &:hover .#{$prefix}overlay::before {
45
+ color: var(--#{$prefix}_hover-overlay-color);
46
+ opacity: var(--#{$prefix}_hover-overlay-opacity);
47
+ }
48
+
49
+ &:active .#{$prefix}overlay::after {
50
+ opacity: var(--#{$prefix}_active-overlay-opacity);
51
+ }
52
+ }
@@ -4,38 +4,40 @@
4
4
  --#{$prefix}button-font-weight: 500;
5
5
  --#{$prefix}button-border-radius: 4px;
6
6
 
7
- &--contained {
7
+ /* Overlay */
8
+ --#{$prefix}_hover-overlay-color: inherit;
9
+ --#{$prefix}_hover-overlay-opacity: 0.08;
10
+ --#{$prefix}_active-overlay-color: inherit;
11
+ --#{$prefix}_active-overlay-opacity: 0.12;
12
+
13
+ &--filled {
8
14
  --#{$prefix}button-border-width: 1px;
9
15
  --#{$prefix}button-border-color: transparent;
10
16
  --#{$prefix}button-color: var(--#{$prefix}white-color);
11
-
12
- --#{$prefix}button-elevation-opacity: 0;
13
- --#{$prefix}_hover-button-elevation-opacity: 0.08;
14
- --#{$prefix}_active-button-elevation-opacity: 0.12;
15
17
  }
16
18
 
17
- &--contained#{&}--primary {
19
+ &--filled#{&}--primary {
18
20
  --#{$prefix}button-background: var(--#{$prefix}primary-color);
19
21
  }
20
22
 
21
- &--contained#{&}--secondary {
23
+ &--filled#{&}--secondary {
22
24
  --#{$prefix}button-color: var(--#{$prefix}black-color);
23
25
  --#{$prefix}button-background: var(--#{$prefix}secondary-color);
24
26
  }
25
27
 
26
- &--contained#{&}--success {
28
+ &--filled#{&}--success {
27
29
  --#{$prefix}button-background: var(--#{$prefix}success-color);
28
30
  }
29
31
 
30
- &--contained#{&}--info {
32
+ &--filled#{&}--info {
31
33
  --#{$prefix}button-background: var(--#{$prefix}info-color);
32
34
  }
33
35
 
34
- &--contained#{&}--warning {
36
+ &--filled#{&}--warning {
35
37
  --#{$prefix}button-background: var(--#{$prefix}warning-color);
36
38
  }
37
39
 
38
- &--contained#{&}--danger {
40
+ &--filled#{&}--danger {
39
41
  --#{$prefix}button-background: var(--#{$prefix}danger-color);
40
42
  }
41
43
 
@@ -113,6 +115,9 @@
113
115
  --#{$prefix}button-padding-y: 0;
114
116
  --#{$prefix}button-padding-x: 0.75rem;
115
117
  --#{$prefix}button-font-size: 14px;
118
+ --#{$prefix}button-gap: 0.375rem;
119
+
120
+ --#{$prefix}icon-font-size: 1.125rem;
116
121
  }
117
122
 
118
123
  &--md {
@@ -120,12 +125,18 @@
120
125
  --#{$prefix}button-padding-y: 0;
121
126
  --#{$prefix}button-padding-x: 1rem;
122
127
  --#{$prefix}button-font-size: 14px;
128
+ --#{$prefix}button-gap: 0.5rem;
129
+
130
+ --#{$prefix}icon-font-size: 1.25rem;
123
131
  }
124
132
 
125
133
  &--lg {
126
134
  --#{$prefix}button-height: 40px;
127
135
  --#{$prefix}button-padding-y: 0;
128
136
  --#{$prefix}button-padding-x: 1.25rem;
129
- --#{$prefix}button-font-size: 16px;
137
+ --#{$prefix}button-font-size: 1rem;
138
+ --#{$prefix}button-gap: 0.5rem;
139
+
140
+ --#{$prefix}icon-font-size: 1.5rem;
130
141
  }
131
142
  }
@@ -0,0 +1,6 @@
1
+ @use '../../../variables' as *;
2
+
3
+ .#{$prefix}icon {
4
+ --#{$prefix}icon-font-size: 1.5rem;
5
+ --#{$prefix}icon-color: inherit;
6
+ }
@@ -1,2 +1,4 @@
1
+ @use 'icon';
1
2
  @use 'button';
3
+ @use 'menu';
2
4
  @use 'tabs';
@@ -0,0 +1,58 @@
1
+ @use '../../../variables' as *;
2
+
3
+ .#{$prefix}menu {
4
+ --#{$prefix}menu-color: #343a40;
5
+ --#{$prefix}menu-background: #fff;
6
+
7
+ &-item {
8
+ --#{$prefix}menu-item-height: 40px;
9
+ --#{$prefix}menu-item-padding-y: 0;
10
+ --#{$prefix}menu-item-padding-x: 1rem;
11
+ --#{$prefix}menu-item-padding-level: 2rem;
12
+ --#{$prefix}menu-item-font-size: 12px;
13
+ --#{$prefix}menu-item-font-weight: 500;
14
+ --#{$prefix}menu-item-gap: 1rem;
15
+
16
+ --#{$prefix}menu-item-icon-font-size: 16px;
17
+ --#{$prefix}menu-item-icon-color: var(--#{$prefix}primary-color);
18
+
19
+ /* Overlay */
20
+ --#{$prefix}overlay-color: inherit;
21
+ --#{$prefix}overlay-opacity: 0;
22
+ --#{$prefix}_hover-overlay-color: inherit;
23
+ --#{$prefix}_hover-overlay-opacity: 0.08;
24
+ --#{$prefix}_active-overlay-opacity: 0;
25
+
26
+ &--selected {
27
+ --#{$prefix}menu-item-color: var(--#{$prefix}primary-color);
28
+
29
+ --#{$prefix}overlay-color: var(--#{$prefix}primary-color);
30
+ --#{$prefix}overlay-opacity: 0.08;
31
+ --#{$prefix}_hover-overlay-opacity: 0;
32
+ --#{$prefix}_active-overlay-opacity: 0;
33
+ }
34
+ }
35
+
36
+ &-group {
37
+ --#{$prefix}menu-group-height: 40px;
38
+ --#{$prefix}menu-group-padding-y: 0;
39
+ --#{$prefix}menu-group-padding-x: 1rem;
40
+ --#{$prefix}menu-group-padding-level: 2rem;
41
+ --#{$prefix}menu-group-font-size: 12px;
42
+ --#{$prefix}menu-group-font-weight: 700;
43
+ --#{$prefix}menu-group-gap: 1rem;
44
+ --#{$prefix}menu-group-border-width: 1px;
45
+ --#{$prefix}menu-group-border-color: #dee2e6;
46
+ }
47
+
48
+ &-submenu {
49
+ --#{$prefix}_active-submenu-item-color: var(--#{$prefix}primary-color);
50
+ --#{$prefix}_active-submenu-item-background: transparent;
51
+ }
52
+
53
+ &-submenu > &-item--selected {
54
+ --#{$prefix}overlay-opacity: 0;
55
+ --#{$prefix}_hover-overlay-opacity: 0;
56
+ --#{$prefix}_active-overlay-opacity: 0;
57
+ }
58
+ }
@@ -2,7 +2,21 @@
2
2
 
3
3
  .#{$prefix}tab {
4
4
  --#{$prefix}tab-color: var(--#{$prefix}black-color);
5
- --#{$prefix}_active-tab-color: var(--#{$prefix}primary-color);
5
+ --#{$prefix}tab-font-size: 12px;
6
+ --#{$prefix}tab-font-weight: 500;
6
7
 
7
8
  --#{$prefix}tab-indicator-color: var(--#{$prefix}primary-color);
9
+ --#{$prefix}tab-indicator-height: 2px;
10
+
11
+ /* Overlay */
12
+ --#{$prefix}_hover-overlay-color: inherit;
13
+ --#{$prefix}_hover-overlay-opacity: 0.08;
14
+ --#{$prefix}_active-overlay-color: inherit;
15
+ --#{$prefix}_active-overlay-opacity: 0.12;
16
+
17
+ &--selected {
18
+ --#{$prefix}tab-color: var(--#{$prefix}primary-color);
19
+ --#{$prefix}_hover-overlay-color: inherit;
20
+ --#{$prefix}_active-overlay-color: inherit;
21
+ }
8
22
  }