@luizleon/sf.prefeiturasp.vuecomponents 0.0.19 → 0.0.21

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 (72) hide show
  1. package/package.json +14 -4
  2. package/src/common/appResult.ts +0 -22
  3. package/src/components/button/Button.d.ts +0 -42
  4. package/src/components/button/Button.vue +0 -61
  5. package/src/components/content/Content.d.ts +0 -35
  6. package/src/components/content/Content.vue +0 -41
  7. package/src/components/icon/Icon.d.ts +0 -38
  8. package/src/components/icon/Icon.vue +0 -43
  9. package/src/components/internal/HeaderAvatar.vue +0 -49
  10. package/src/components/internal/LoadingCircle.vue +0 -16
  11. package/src/components/internal/MenuIcon.vue +0 -13
  12. package/src/components/internal/ScrollToTop.vue +0 -26
  13. package/src/components/internal/ThemeToggle.ts +0 -41
  14. package/src/components/internal/ThemeToggle.vue +0 -23
  15. package/src/components/internal/cssClassBuilder.ts +0 -44
  16. package/src/components/layout/Layout.d.ts +0 -44
  17. package/src/components/layout/Layout.vue +0 -51
  18. package/src/components/navmenulink/NavMenuLink.d.ts +0 -35
  19. package/src/components/navmenulink/NavMenuLink.vue +0 -41
  20. package/src/components/tabnavigation/TabNavigation.d.ts +0 -42
  21. package/src/components/tabnavigation/TabNavigation.vue +0 -117
  22. package/src/enum/cor.ts +0 -9
  23. package/src/enum/index.ts +0 -2
  24. package/src/enum/tamanho.ts +0 -5
  25. package/src/index.ts +0 -62
  26. package/src/keycloak.d.ts +0 -671
  27. package/src/keycloak.js +0 -1731
  28. package/src/services/authService.ts +0 -68
  29. package/src/services/dialogService.ts +0 -63
  30. package/src/services/navMenuService.ts +0 -21
  31. package/src/style/componentes.scss +0 -15
  32. package/src/style/src/_animation.scss +0 -441
  33. package/src/style/src/_display.scss +0 -10
  34. package/src/style/src/_flexbox.scss +0 -85
  35. package/src/style/src/_functions.scss +0 -171
  36. package/src/style/src/_gap.scss +0 -8
  37. package/src/style/src/_grid.scss +0 -100
  38. package/src/style/src/_mixins.scss +0 -633
  39. package/src/style/src/_normalize.scss +0 -351
  40. package/src/style/src/_ripple.scss +0 -30
  41. package/src/style/src/_size.scss +0 -98
  42. package/src/style/src/_spacing.scss +0 -42
  43. package/src/style/src/_typography.scss +0 -43
  44. package/src/style/src/_variables.scss +0 -87
  45. package/src/style/src/components/_button.scss +0 -107
  46. package/src/style/src/components/_content.scss +0 -57
  47. package/src/style/src/components/_drawer.scss +0 -99
  48. package/src/style/src/components/_headerAvatar.scss +0 -22
  49. package/src/style/src/components/_icon.scss +0 -120
  50. package/src/style/src/components/_internal-icon-button.scss +0 -5
  51. package/src/style/src/components/_layout.scss +0 -183
  52. package/src/style/src/components/_loading-circle.scss +0 -24
  53. package/src/style/src/components/_navmenulink.scss +0 -31
  54. package/src/style/src/components/_scrollToTop.scss +0 -28
  55. package/src/style/src/components/_svg_icon.scss +0 -5
  56. package/src/style/src/components/_tab-navigation.scss +0 -93
  57. package/src/style/src/components/_themetoggle.scss +0 -25
  58. package/src/style/src/components/_tooltip.scss +0 -55
  59. package/src/style/src/sweetalert/_sweetalert.scss +0 -9
  60. package/src/style/src/sweetalert/scss/_animations.scss +0 -197
  61. package/src/style/src/sweetalert/scss/_body.scss +0 -45
  62. package/src/style/src/sweetalert/scss/_core.scss +0 -863
  63. package/src/style/src/sweetalert/scss/_mixins.scss +0 -16
  64. package/src/style/src/sweetalert/scss/_theming.scss +0 -8
  65. package/src/style/src/sweetalert/scss/_toasts-animations.scss +0 -83
  66. package/src/style/src/sweetalert/scss/_toasts-body.scss +0 -85
  67. package/src/style/src/sweetalert/scss/_toasts.scss +0 -203
  68. package/src/style/src/sweetalert/scss/_variables.scss +0 -265
  69. package/src/style/tema.scss +0 -169
  70. package/src/ts-helpers.d.ts +0 -57
  71. package/tsconfig.json +0 -19
  72. package/vite.config.js +0 -26
@@ -1,41 +0,0 @@
1
- <script setup lang="ts">
2
- import { SfNavMenuLinkProps } from "./NavMenuLink";
3
- import { UseNavMenuService } from "../../services/navMenuService";
4
- import Icon from "../icon/Icon.vue";
5
-
6
- const props: SfNavMenuLinkProps = defineProps<SfNavMenuLinkProps>();
7
-
8
- const navService = UseNavMenuService();
9
-
10
- function OnClick(ev: Event, navigate: any) {
11
- ev.preventDefault();
12
- const target = ev.target as HTMLElement;
13
- const nav = target.closest(".sf-layout-nav-content");
14
- navigate();
15
- if (nav && nav.clientWidth + 10 > document.body.clientWidth) {
16
- navService.Close();
17
- }
18
- }
19
- </script>
20
-
21
- <template>
22
- <router-link
23
- :to="props.href"
24
- custom
25
- v-slot="{ href, navigate, isExactActive, isActive }"
26
- >
27
- <a
28
- class="sf-navmenulink"
29
- :href="href"
30
- :data-active="props.exact ? isExactActive : isActive"
31
- @click="OnClick($event, navigate)"
32
- >
33
- <Icon
34
- v-if="props.icon"
35
- :icone="props.icon"
36
- :button-props="{ tabindex: -1 }"
37
- />
38
- <span class="sf-navmenulink-text">{{ props.text }}</span>
39
- </a>
40
- </router-link>
41
- </template>
@@ -1,42 +0,0 @@
1
- import {
2
- ClassComponent,
3
- GlobalComponentConstructor,
4
- } from "../../ts-helpers";
5
-
6
- export interface SfTabNavigationTab {
7
- text: string;
8
- route: string;
9
- }
10
-
11
- export interface SfTabNavigationProps {
12
- tabs: SfTabNavigationTab[];
13
- }
14
-
15
- export interface SfTabNavigationSlots {
16
- item: (scope: {
17
- navigate: () => void;
18
- isActive: boolean;
19
- }) => VNode[];
20
- }
21
-
22
- export declare type SfTabNavigationEmits = {};
23
-
24
- declare class SfTabNavigation extends ClassComponent<
25
- SfTabNavigationProps,
26
- SfTabNavigationSlots,
27
- SfTabNavigationEmits
28
- > {}
29
-
30
- declare module "@vue/runtime-core" {
31
- interface GlobalComponents {
32
- SfTabNavigation: GlobalComponentConstructor<SfTabNavigation>;
33
- }
34
- }
35
-
36
- /**
37
- * Componente para navegação em abas
38
- *
39
- * Dependência: router-link.
40
- * @see [https://router.vuejs.org/api/#router-link-s-v-slot](https://router.vuejs.org/api/#router-link-s-v-slot)
41
- */
42
- export default SfTabNavigation;
@@ -1,117 +0,0 @@
1
- <script setup lang="ts">
2
- import { onMounted, onBeforeUnmount, ref } from "vue";
3
- import { SfTabNavigationProps } from "./TabNavigation";
4
-
5
- const props: SfTabNavigationProps =
6
- defineProps<SfTabNavigationProps>();
7
-
8
- const trackerContainer = ref<HTMLInputElement | null>(null);
9
- const trackerContainerObserver = new ResizeObserver((_) => {
10
- AjustarIcones();
11
- });
12
-
13
- const isLeftArrowActive = ref(false);
14
- const isRightArrowActive = ref(false);
15
-
16
- function Scroll(left: boolean = false) {
17
- const amount = trackerContainer.value!.clientWidth;
18
- trackerContainer.value!.scrollLeft += left ? -amount : amount;
19
- }
20
-
21
- function AjustarIcones() {
22
- const maxScrollValue =
23
- trackerContainer.value!.scrollWidth -
24
- trackerContainer.value!.clientWidth;
25
-
26
- isLeftArrowActive.value! = trackerContainer.value!.scrollLeft > 10;
27
-
28
- isRightArrowActive.value! =
29
- trackerContainer.value!.scrollLeft < maxScrollValue - 10;
30
- }
31
-
32
- onMounted(() => {
33
- trackerContainer.value!.addEventListener("scroll", AjustarIcones);
34
- trackerContainerObserver.observe(trackerContainer.value!);
35
- });
36
-
37
- onBeforeUnmount(() => {
38
- try {
39
- trackerContainer.value?.removeEventListener(
40
- "scroll",
41
- AjustarIcones
42
- );
43
- trackerContainerObserver.unobserve(trackerContainer.value!);
44
- trackerContainerObserver.disconnect();
45
- } catch {}
46
- });
47
- </script>
48
-
49
- <template>
50
- <div class="sf-tab-navigation">
51
- <div
52
- :class="['left-arrow', { active: isLeftArrowActive }]"
53
- @click="Scroll(true)"
54
- >
55
- <svg
56
- xmlns="http://www.w3.org/2000/svg"
57
- fill="none"
58
- viewBox="0 0 24 24"
59
- stroke-width="1.5"
60
- stroke="currentColor"
61
- class="w-6 h-6"
62
- >
63
- <path
64
- stroke-linecap="round"
65
- stroke-linejoin="round"
66
- d="M15.75 19.5L8.25 12l7.5-7.5"
67
- />
68
- </svg>
69
- </div>
70
-
71
- <ul ref="trackerContainer">
72
- <RouterLink
73
- v-for="tab in props.tabs"
74
- :to="tab.route"
75
- :custom="true"
76
- v-slot="{ navigate, isActive }"
77
- >
78
- <li :data-active="isActive">
79
- <slot
80
- name="item"
81
- :item="tab"
82
- :navigate="navigate"
83
- :is-active="isActive"
84
- >
85
- <a
86
- :href="tab.route"
87
- :class="{ active: isActive }"
88
- @click="navigate"
89
- >
90
- {{ tab.text }}
91
- </a>
92
- </slot>
93
- </li>
94
- </RouterLink>
95
- </ul>
96
-
97
- <div
98
- :class="['right-arrow', { active: isRightArrowActive }]"
99
- @click="Scroll()"
100
- >
101
- <svg
102
- xmlns="http://www.w3.org/2000/svg"
103
- fill="none"
104
- viewBox="0 0 24 24"
105
- stroke-width="1.5"
106
- stroke="currentColor"
107
- class="w-6 h-6"
108
- >
109
- <path
110
- stroke-linecap="round"
111
- stroke-linejoin="round"
112
- d="M8.25 4.5l7.5 7.5-7.5 7.5"
113
- />
114
- </svg>
115
- </div>
116
- </div>
117
- </template>
package/src/enum/cor.ts DELETED
@@ -1,9 +0,0 @@
1
- export enum Cor {
2
- Primary = "primary",
3
- Secondary = "secondary",
4
- Info = "info",
5
- Success = "success",
6
- Help = "help",
7
- Warn = "warn",
8
- Error = "error",
9
- }
package/src/enum/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export { Cor } from "./cor";
2
- export { Tamanho } from "./tamanho";
@@ -1,5 +0,0 @@
1
- export enum Tamanho {
2
- Pequeno = "sm",
3
- Medio = "md",
4
- Grande = "lg",
5
- }
package/src/index.ts DELETED
@@ -1,62 +0,0 @@
1
- import SfLayout from "./components/layout/Layout.vue";
2
- import SfIcon from "./components/icon/Icon.vue";
3
- import SfNavMenuLink from "./components/navmenulink/NavMenuLink.vue";
4
- import SfContent from "./components/content/Content.vue";
5
- import SfTabNavigation from "./components/tabnavigation/TabNavigation.vue";
6
- import SfButton from "./components/button/Button.vue";
7
-
8
- import { UseNavMenuService } from "./services/navMenuService";
9
- import { UseDialogService } from "./services/dialogService";
10
- import { AuthService } from "./services/authService";
11
- import { AppResult } from "./common/appResult";
12
-
13
- import { Cor, Tamanho } from "./enum";
14
-
15
- import { nextTick } from "vue";
16
-
17
- import "./style/tema.scss";
18
- import "./style/componentes.scss";
19
-
20
- export {
21
- SfLayout,
22
- SfIcon,
23
- SfNavMenuLink,
24
- SfContent,
25
- SfTabNavigation,
26
- SfButton,
27
- AuthService,
28
- AppResult,
29
- UseNavMenuService,
30
- UseDialogService,
31
- Cor,
32
- Tamanho,
33
- };
34
- /**
35
- * https://stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser
36
- */
37
- (() => {
38
- function Ajusta() {
39
- nextTick(() => {
40
- setTimeout(() => {
41
- const root = document.querySelector(":root");
42
- root &&
43
- // @ts-ignore
44
- root.style.setProperty(
45
- "--window-height",
46
- `${window.visualViewport?.height ?? window.innerHeight}px`
47
- );
48
- }, 1);
49
- });
50
- }
51
- Ajusta();
52
- window.addEventListener("resize", Ajusta);
53
- })();
54
-
55
- import { ThemeToggleBase } from "./components/internal/ThemeToggle";
56
-
57
- /**
58
- * Tema inicial
59
- */
60
- (() => {
61
- ThemeToggleBase.SetInitialTheme();
62
- })();