@luizleon/sf.prefeiturasp.vuecomponents 0.0.37 → 0.0.38

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 (40) hide show
  1. package/dist/components/drawer/Drawer.d.ts +55 -0
  2. package/dist/components/internal/ThemeToggle.d.ts +11 -8
  3. package/dist/components/internal/getMaxZindex.d.ts +2 -0
  4. package/dist/lib.es.js +2030 -1907
  5. package/dist/lib.es.js.map +1 -1
  6. package/dist/lib.umd.js +16 -16
  7. package/dist/lib.umd.js.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/package.json +3 -2
  10. package/src/components/drawer/Drawer.d.ts +55 -0
  11. package/src/components/drawer/Drawer.vue +131 -0
  12. package/src/components/internal/HeaderAvatar.vue +18 -1
  13. package/src/components/internal/getMaxZindex.ts +14 -0
  14. package/src/components/layout/Layout.vue +1 -14
  15. package/src/index.ts +0 -1
  16. package/src/services/authService.ts +3 -4
  17. package/src/style/componentes.scss +1 -1
  18. package/src/style/src/_functions.scss +3 -170
  19. package/src/style/src/_mixins.scss +70 -553
  20. package/src/style/src/_variables.scss +1 -87
  21. package/src/style/src/components/_button.scss +22 -22
  22. package/src/style/src/components/_drawer.scss +29 -39
  23. package/src/style/src/components/_icon.scss +17 -20
  24. package/src/style/src/components/_layout.scss +5 -47
  25. package/src/style/src/components/_mask.scss +35 -0
  26. package/src/style/src/components/_themetoggle.scss +30 -3
  27. package/src/style/src/sweetalert/scss/_core.scss +13 -14
  28. package/src/style/src/sweetalert/scss/_variables.scss +17 -11
  29. package/src/style/src/_animation.scss +0 -441
  30. package/src/style/src/_display.scss +0 -10
  31. package/src/style/src/_flexbox.scss +0 -85
  32. package/src/style/src/_gap.scss +0 -8
  33. package/src/style/src/_grid.scss +0 -100
  34. package/src/style/src/_normalize.scss +0 -351
  35. package/src/style/src/_ripple.scss +0 -30
  36. package/src/style/src/_size.scss +0 -98
  37. package/src/style/src/_spacing.scss +0 -42
  38. package/src/style/src/_typography.scss +0 -43
  39. package/src/style/src/components/_internal-icon-button.scss +0 -5
  40. package/src/style/tema.scss +0 -171
@@ -6,6 +6,48 @@
6
6
  @import "./functions";
7
7
 
8
8
  @mixin avatar-colors($dark: false) {
9
+ $red: #f44336;
10
+ $pink: #e91e63;
11
+ $purple: #9c27b0;
12
+ $deepPurple: #673ab7;
13
+ $indigo: #3f51b5;
14
+ $blue: #2196f3;
15
+ $lightBlue: #03a9f4;
16
+ $cyan: #00bcd4;
17
+ $teal: #009688;
18
+ $green: #4caf50;
19
+ $lightGreen: #8bc34a;
20
+ $lime: #cddc39;
21
+ $yellow: #ffeb3b;
22
+ $amber: #ffc107;
23
+ $orange: #ff9800;
24
+ $deepOrange: #ff5722;
25
+ $brown: #795548;
26
+ $gray: #9e9e9e;
27
+ $blueGray: #607d8b;
28
+
29
+ $colors: (
30
+ "--red": $red,
31
+ "--pink": $pink,
32
+ "--purple": $purple,
33
+ "--deepPurple": $deepPurple,
34
+ "--indigo": $indigo,
35
+ "--blue": $blue,
36
+ "--lightBlue": $lightBlue,
37
+ "--cyan": $cyan,
38
+ "--teal": $teal,
39
+ "--green": $green,
40
+ "--lightGreen": $lightGreen,
41
+ "--lime": $lime,
42
+ "--yellow": $yellow,
43
+ "--amber": $amber,
44
+ "--orange": $orange,
45
+ "--deepOrange": $deepOrange,
46
+ "--brown": $brown,
47
+ "--gray": $gray,
48
+ "--blueGray": $blueGray,
49
+ );
50
+
9
51
  $incr: 0;
10
52
 
11
53
  @each $key, $value in $colors {
@@ -31,83 +73,43 @@
31
73
  }
32
74
  }
33
75
 
34
- @mixin colors-hsl($colors) {
35
- @each $key, $value in $colors {
36
- $h: hue($value);
37
- $s: saturation($value);
38
- $l: lightness($value);
39
- #{$key}-color-h: $h;
40
- #{$key}-color-s: $s;
41
- #{$key}-color-l: $l;
42
- }
43
- }
44
-
45
- @mixin colors($colors, $buildShades: true) {
46
- @each $colorName, $colorValue in $colors {
47
- @if ($buildShades) {
48
- @each $shade, $color in makeColorPalette($colorValue) {
49
- $var: $colorName + "-color" + $shade;
50
- #{$var}: $color;
51
- }
52
- } @else {
53
- $var: $colorName + "-color";
54
- #{$var}: $colorValue;
55
- }
56
- }
57
- }
58
-
59
76
  @mixin button-colors($dark: false) {
60
- $cores: themeColors($dark);
61
- @each $colorKey, $colorValue in $cores {
62
- $colorName: str-replace($colorKey, "--");
63
- $color: #fff;
64
- @if ($dark) {
65
- $color: #000;
66
- }
67
- &[data-color="#{$colorName}"] {
77
+ @each $color in theme-colors() {
78
+ &[data-color="#{$color}"] {
79
+ color: var(--bg-color);
68
80
  @media (pointer: fine) {
69
81
  &:focus-visible {
70
- outline: 2px solid color.scale($colorValue, $alpha: -50%);
82
+ outline: 2px solid var(--#{$color}-hover-color);
71
83
  outline-offset: 1px;
72
84
  border-color: var(--bg-color);
73
85
  }
74
86
  }
75
87
  &:active {
76
88
  transition: 0s;
77
- background-color: color.scale($colorValue, $alpha: -70%);
78
- }
79
- &.sf-button-filled {
80
- color: $color;
81
- background-color: $colorValue;
82
89
  &:active {
83
90
  @if ($dark) {
84
- background-color: color.scale($colorValue, $alpha: -30%);
91
+ filter: brightness(0.9);
85
92
  } @else {
86
- background-color: color.scale(
87
- $colorValue,
88
- $lightness: -30%
89
- );
93
+ filter: brightness(1.1);
90
94
  }
91
95
  }
92
96
  }
93
- &.sf-button-outlined,
94
- &.sf-button-text {
95
- @if ($dark == false and $colorName == "warn") {
96
- color: color.scale($colorValue, $lightness: -40%);
97
- border-color: color.scale($colorValue, $lightness: -40%);
98
- } @else {
99
- color: $colorValue;
100
- border-color: $colorValue;
101
- }
97
+ &.#{$prefix}button-filled {
98
+ background-color: var(--#{$color}-color);
99
+ }
100
+ &.#{$prefix}button-outlined,
101
+ &.#{$prefix}button-text {
102
102
  background-color: transparent;
103
+ color: var(--#{$color}-color);
104
+ border-color: var(--#{$color}-color);
103
105
  @media (pointer: fine) {
104
106
  &:hover,
105
107
  &:focus-visible {
106
- background-color: color.scale($colorValue, $alpha: -80%);
108
+ background-color: var(--#{$color}-hover-color);
107
109
  }
108
110
  }
109
111
  }
110
- &.sf-button-text {
112
+ &.#{$prefix}button-text {
111
113
  border-color: transparent !important;
112
114
  }
113
115
  }
@@ -115,519 +117,34 @@
115
117
  }
116
118
 
117
119
  @mixin dot-colors() {
118
- @each $colorKey, $colorValue in themeColors() {
119
- @if list.index($theme-colors-list, $colorKey) != null {
120
- $colorName: str-replace($colorKey, "--");
121
- &[data-color="#{$colorName}"] {
122
- background-color: var(#{$colorKey}-color);
123
- }
120
+ @each $color in theme-colors() {
121
+ &[data-color="#{$color}"] {
122
+ color: var(--#{$color}-color);
124
123
  }
125
124
  }
126
125
  }
127
126
 
128
127
  @mixin input-colors() {
129
- @each $colorKey, $colorValue in themeColors() {
130
- @if list.index($theme-colors-list, $colorKey) != null {
131
- $colorName: str-replace($colorKey, "--");
132
- &[data-color="#{$colorName}"] {
133
- color: var(#{$colorKey}-color);
134
- }
128
+ @each $color in theme-colors() {
129
+ &[data-color="#{$color}"] {
130
+ background-color: var(--#{$color}-color);
135
131
  }
136
132
  }
137
133
  }
138
134
 
139
135
  @mixin toast-colors() {
140
- @each $colorKey, $colorValue in themeColors() {
141
- @if list.index($theme-colors-list, $colorKey) != null {
142
- $colorName: str-replace($colorKey, "--");
143
- &.toast-#{$colorName} {
144
- --animate-bg-color: var(#{$colorKey}-color);
145
- }
146
- }
147
- }
148
- }
149
-
150
- @mixin theme-colors {
151
- @each $colorKey, $colorValue in themeColors() {
152
- $colorName: str-replace($colorKey, "--");
153
- $A: list.index($theme-colors-list, $colorKey) != null;
154
- $B: list.index($theme-colors-hover-list, $colorKey) != null;
155
- $C: str-replace($colorName, "surface") != $colorName;
156
- @if $A or $B {
157
- .sf-#{$colorName}-color {
158
- color: var(#{$colorKey}-color);
159
- }
160
- .sf-#{$colorName}-bgcolor {
161
- background-color: var(#{$colorKey}-color);
162
- }
163
- }
164
- @if $C {
165
- .sf-#{$colorName}-bgcolor {
166
- background-color: var(#{$colorKey}-color);
167
- }
136
+ @each $color in theme-colors() {
137
+ &.toast-#{$color} {
138
+ --animate-bg-color: var(--#{$color}-color);
168
139
  }
169
140
  }
170
141
  }
171
142
 
172
- @mixin sf-internal-icon-button {
173
- isolation: isolate;
174
- display: flex;
175
- align-items: center;
176
- background: none;
177
- border: none;
178
- padding: 8px;
179
- position: relative;
180
- border-radius: 50%;
181
- @media (pointer: fine) {
182
- &:hover {
183
- cursor: pointer;
184
- background-color: $icon-hover-color;
185
- }
143
+ @mixin icon-button-hover-colors() {
144
+ @each $color in theme-colors() {
145
+ &:hover,
186
146
  &:focus-visible {
187
- outline-offset: 0px;
188
- }
189
- }
190
-
191
- svg {
192
- height: 24px;
193
- width: 24px;
194
- fill: var(--text-color);
195
- }
196
- }
197
-
198
- /*
199
- Primeflex mixins
200
- */
201
- @mixin style-class($prop, $map, $responsive: false, $states: false) {
202
- @each $key, $val in $map {
203
- .#{$prefix}#{$key} {
204
- #{$prop}: #{$val} !important;
205
- }
206
- }
207
-
208
- @if ($states) {
209
- @each $key, $val in $map {
210
- .focus#{$separator} {
211
- &#{$prefix}#{$key}:focus {
212
- #{$prop}: #{$val} !important;
213
- }
214
- }
215
-
216
- .hover#{$separator} {
217
- &#{$prefix}#{$key}:hover {
218
- #{$prop}: #{$val} !important;
219
- }
220
- }
221
-
222
- .active#{$separator} {
223
- &#{$prefix}#{$key}:active {
224
- #{$prop}: #{$val} !important;
225
- }
226
- }
227
- }
228
- }
229
-
230
- @if ($responsive) {
231
- @each $key, $val in $breakpoints {
232
- @media screen and (min-width: #{$val}) {
233
- .#{$key + $separator} {
234
- @each $key, $val in $map {
235
- &#{$prefix}#{$key} {
236
- #{$prop}: #{$val} !important;
237
- }
238
- }
239
-
240
- @if ($states) {
241
- @each $key, $val in $map {
242
- &focus#{$separator} {
243
- &#{$prefix}#{$key}:focus {
244
- #{$prop}: #{$val} !important;
245
- }
246
- }
247
-
248
- &hover#{$separator} {
249
- &#{$prefix}#{$key}:hover {
250
- #{$prop}: #{$val} !important;
251
- }
252
- }
253
-
254
- &active#{$separator} {
255
- &#{$prefix}#{$key}:active {
256
- #{$prop}: #{$val} !important;
257
- }
258
- }
259
- }
260
- }
261
- }
262
- }
263
- }
264
- }
265
- }
266
-
267
- @mixin color-class($name, $prop, $colors, $shades) {
268
- @each $color in $colors {
269
- .#{$prefix}#{$name}#{$color} {
270
- @each $shade in $shades {
271
- &-#{$shade} {
272
- #{$prop}: var(--#{$color}-#{$shade}) !important;
273
- }
274
- }
275
- }
276
-
277
- .focus#{$separator} {
278
- &#{$prefix}#{$name}#{$color} {
279
- @each $shade in $shades {
280
- &-#{$shade}:focus {
281
- #{$prop}: var(--#{$color}-#{$shade}) !important;
282
- }
283
- }
284
- }
285
- }
286
-
287
- .hover#{$separator} {
288
- &#{$prefix}#{$name}#{$color} {
289
- @each $shade in $shades {
290
- &-#{$shade}:hover {
291
- #{$prop}: var(--#{$color}-#{$shade}) !important;
292
- }
293
- }
294
- }
295
- }
296
-
297
- .active#{$separator} {
298
- &#{$prefix}#{$name}#{$color} {
299
- @each $shade in $shades {
300
- &-#{$shade}:active {
301
- #{$prop}: var(--#{$color}-#{$shade}) !important;
302
- }
303
- }
304
- }
305
- }
306
- }
307
- }
308
-
309
- @mixin surface-class($name, $prop, $shades) {
310
- @each $shade in $shades {
311
- .#{$prefix}#{$name}-#{$shade} {
312
- #{$prop}: var(--surface-#{$shade}) !important;
313
- }
314
- }
315
-
316
- @each $shade in $shades {
317
- .focus#{$separator} {
318
- &#{$prefix}#{$name}-#{$shade}:focus {
319
- #{$prop}: var(--surface-#{$shade}) !important;
320
- }
321
- }
322
-
323
- .hover#{$separator} {
324
- &#{$prefix}#{$name}-#{$shade}:hover {
325
- #{$prop}: var(--surface-#{$shade}) !important;
326
- }
327
- }
328
-
329
- .active#{$separator} {
330
- &#{$prefix}#{$name}-#{$shade}:active {
331
- #{$prop}: var(--surface-#{$shade}) !important;
332
- }
333
- }
334
- }
335
- }
336
-
337
- @mixin border-class($name, $directions, $scales) {
338
- @each $dir, $prop in $directions {
339
- @for $i from 0 through length($scales) - 1 {
340
- $borderValue: if($i == 0, "none", $i);
341
- $className: #{$name}-#{$dir}-#{$borderValue};
342
- @if ($dir == "") {
343
- $className: #{$name}-#{$borderValue};
344
- }
345
-
346
- .#{$prefix}#{$className} {
347
- @each $propName in $prop {
348
- #{$propName}-width: nth($scales, $i + 1) !important;
349
- #{$propName}-style: if($i == 0, none, solid);
350
- }
351
- }
352
- }
353
- }
354
-
355
- @each $key, $val in $breakpoints {
356
- @media screen and (min-width: #{$val}) {
357
- .#{$key + $separator} {
358
- @each $dir, $prop in $directions {
359
- @for $i from 0 through length($scales) - 1 {
360
- $borderValue: if($i == 0, "none", $i);
361
- $className: #{$name}-#{$dir}-#{$borderValue};
362
- @if ($dir == "") {
363
- $className: #{$name}-#{$borderValue};
364
- }
365
-
366
- &#{$prefix}#{$className} {
367
- @each $propName in $prop {
368
- #{$propName}-width: nth($scales, $i + 1) !important;
369
- #{$propName}-style: if($i == 0, none, solid);
370
- }
371
- }
372
- }
373
- }
374
- }
375
- }
376
- }
377
- }
378
-
379
- @mixin border-radius-class($map, $directions) {
380
- @each $key, $val in $map {
381
- $prefixName: $key;
382
- $suffixName: "";
383
- $index: str-index($key, "border-round");
384
-
385
- @if $index != null {
386
- $prefixName: "border-round";
387
- $suffixName: str-slice(
388
- $key,
389
- str-length("border-round") + 1,
390
- str-length($key)
391
- );
392
- }
393
-
394
- @each $dir, $prop in $directions {
395
- .#{$prefix}#{$prefixName}-#{$dir}#{$suffixName} {
396
- @each $propName in $prop {
397
- #{$propName}: #{$val} !important;
398
- }
399
- }
400
- }
401
- }
402
-
403
- @each $key, $val in $breakpoints {
404
- @media screen and (min-width: #{$val}) {
405
- .#{$key + $separator} {
406
- @each $key, $val in $map {
407
- $prefixName: $key;
408
- $suffixName: "";
409
- $index: str-index($key, "border-round");
410
-
411
- @if $index != null {
412
- $prefixName: "border-round";
413
- $suffixName: str-slice(
414
- $key,
415
- str-length("border-round") + 1,
416
- str-length($key)
417
- );
418
- }
419
-
420
- @each $dir, $prop in $directions {
421
- &#{$prefix}#{$prefixName}-#{$dir}#{$suffixName} {
422
- @each $propName in $prop {
423
- #{$propName}: #{$val} !important;
424
- }
425
- }
426
- }
427
- }
428
- }
429
- }
430
- }
431
- }
432
-
433
- @mixin rgba-color-class($name, $prop, $colors, $shades) {
434
- @each $colorName, $colorValue in $colors {
435
- .#{$prefix}#{$name}#{$colorName}-alpha {
436
- @each $shade in $shades {
437
- &-#{$shade} {
438
- #{$prop}: #{"rgba(#{$colorValue},#{math.div($shade, 100)})"} !important;
439
- }
440
- }
441
- }
442
-
443
- .hover#{$separator} {
444
- &#{$prefix}#{$name}#{$colorName}-alpha {
445
- @each $shade in $shades {
446
- &-#{$shade}:hover {
447
- #{$prop}: #{"rgba(#{$colorValue},#{math.div($shade, 100)})"} !important;
448
- }
449
- }
450
- }
451
- }
452
-
453
- .focus#{$separator} {
454
- &#{$prefix}#{$name}#{$colorName}-alpha {
455
- @each $shade in $shades {
456
- &-#{$shade}:focus {
457
- #{$prop}: #{"rgba(#{$colorValue},#{math.div($shade, 100)})"} !important;
458
- }
459
- }
460
- }
461
- }
462
-
463
- .active#{$separator} {
464
- &#{$prefix}#{$name}#{$colorName}-alpha {
465
- @each $shade in $shades {
466
- &-#{$shade}:active {
467
- #{$prop}: #{"rgba(#{$colorValue},#{math.div($shade, 100)})"} !important;
468
- }
469
- }
470
- }
471
- }
472
- }
473
- }
474
-
475
- @mixin spacing-class(
476
- $inPrefix,
477
- $map,
478
- $scales,
479
- $responsive: true,
480
- $auto: false,
481
- $negative: false
482
- ) {
483
- $inPrefix: $prefix + $inPrefix;
484
-
485
- @each $name, $prop in $map {
486
- @for $i from 0 through length($scales) - 1 {
487
- .#{$inPrefix}#{$name}-#{$i} {
488
- @each $propName in $prop {
489
- #{$propName}: $spacer * nth($scales, $i + 1) !important;
490
- }
491
- }
492
- }
493
-
494
- @if ($negative) {
495
- @for $i from 1 through length($scales) - 1 {
496
- .-#{$inPrefix}#{$name}-#{$i} {
497
- @each $propName in $prop {
498
- #{$propName}: -1 *
499
- $spacer *
500
- nth($scales, $i + 1) !important;
501
- }
502
- }
503
- }
504
- }
505
-
506
- @if ($auto) {
507
- .#{$inPrefix}#{$name}-auto {
508
- @each $propName in $prop {
509
- #{$propName}: auto !important;
510
- }
511
- }
512
- }
513
- }
514
-
515
- @if ($responsive) {
516
- @each $key, $val in $breakpoints {
517
- @media screen and (min-width: #{$val}) {
518
- @each $name, $prop in $map {
519
- @for $i from 0 through length($scales) - 1 {
520
- .#{$key + $separator}#{$inPrefix}#{$name}-#{$i} {
521
- @each $propName in $prop {
522
- #{$propName}: $spacer *
523
- nth($scales, $i + 1) !important;
524
- }
525
- }
526
- }
527
-
528
- @if ($negative) {
529
- @for $i from 1 through length($scales) - 1 {
530
- .#{$key + $separator}-#{$inPrefix}#{$name}-#{$i} {
531
- @each $propName in $prop {
532
- #{$propName}: -1 *
533
- $spacer *
534
- nth($scales, $i + 1) !important;
535
- }
536
- }
537
- }
538
- }
539
-
540
- @if ($auto) {
541
- .#{$key + $separator}#{$inPrefix}#{$name}-auto {
542
- @each $propName in $prop {
543
- #{$propName}: auto !important;
544
- }
545
- }
546
- }
547
- }
548
- }
549
- }
550
- }
551
- }
552
-
553
- @mixin generate-class($map, $responsive: false, $states: false) {
554
- @each $name, $propMap in $map {
555
- .#{$prefix}#{$name} {
556
- @each $prop, $val in $propMap {
557
- #{$prop}: #{$val} !important;
558
- }
559
- }
560
- }
561
-
562
- @if ($states) {
563
- @each $name, $propMap in $map {
564
- .focus#{$separator} {
565
- &#{$prefix}#{$name}:focus {
566
- @each $prop, $val in $propMap {
567
- #{$prop}: #{$val} !important;
568
- }
569
- }
570
- }
571
-
572
- .hover#{$separator} {
573
- &#{$prefix}#{$name}:hover {
574
- @each $prop, $val in $propMap {
575
- #{$prop}: #{$val} !important;
576
- }
577
- }
578
- }
579
-
580
- .active#{$separator} {
581
- &#{$prefix}#{$name}:active {
582
- @each $prop, $val in $propMap {
583
- #{$prop}: #{$val} !important;
584
- }
585
- }
586
- }
587
- }
588
- }
589
-
590
- @if ($responsive) {
591
- @each $key, $val in $breakpoints {
592
- @media screen and (min-width: #{$val}) {
593
- .#{$key + $separator} {
594
- @each $name, $propMap in $map {
595
- &#{$prefix}#{$name} {
596
- @each $prop, $val in $propMap {
597
- #{$prop}: #{$val} !important;
598
- }
599
- }
600
- }
601
-
602
- @if ($states) {
603
- @each $name, $propMap in $map {
604
- &focus#{$separator} {
605
- &#{$prefix}#{$name}:focus {
606
- @each $prop, $val in $propMap {
607
- #{$prop}: #{$val} !important;
608
- }
609
- }
610
- }
611
-
612
- &hover#{$separator} {
613
- &#{$prefix}#{$name}:hover {
614
- @each $prop, $val in $propMap {
615
- #{$prop}: #{$val} !important;
616
- }
617
- }
618
- }
619
-
620
- &active#{$separator} {
621
- &#{$prefix}#{$name}:active {
622
- @each $prop, $val in $propMap {
623
- #{$prop}: #{$val} !important;
624
- }
625
- }
626
- }
627
- }
628
- }
629
- }
630
- }
147
+ background-color: var(--#{$color}-hover-color);
631
148
  }
632
149
  }
633
150
  }