@luizleon/sf.prefeiturasp.vuecomponents 0.0.20 → 0.0.22

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 +4 -14
  2. package/src/common/appResult.ts +22 -0
  3. package/src/components/button/Button.d.ts +42 -0
  4. package/src/components/button/Button.vue +61 -0
  5. package/src/components/content/Content.d.ts +35 -0
  6. package/src/components/content/Content.vue +41 -0
  7. package/src/components/icon/Icon.d.ts +38 -0
  8. package/src/components/icon/Icon.vue +43 -0
  9. package/src/components/internal/HeaderAvatar.vue +49 -0
  10. package/src/components/internal/LoadingCircle.vue +16 -0
  11. package/src/components/internal/MenuIcon.vue +13 -0
  12. package/src/components/internal/ScrollToTop.vue +26 -0
  13. package/src/components/internal/ThemeToggle.ts +41 -0
  14. package/src/components/internal/ThemeToggle.vue +23 -0
  15. package/src/components/internal/cssClassBuilder.ts +44 -0
  16. package/src/components/layout/Layout.d.ts +44 -0
  17. package/src/components/layout/Layout.vue +51 -0
  18. package/src/components/navmenulink/NavMenuLink.d.ts +35 -0
  19. package/src/components/navmenulink/NavMenuLink.vue +41 -0
  20. package/src/components/tabnavigation/TabNavigation.d.ts +42 -0
  21. package/src/components/tabnavigation/TabNavigation.vue +117 -0
  22. package/src/enum/cor.ts +9 -0
  23. package/src/enum/index.ts +2 -0
  24. package/src/enum/tamanho.ts +5 -0
  25. package/src/index.ts +62 -0
  26. package/src/keycloak.d.ts +671 -0
  27. package/src/keycloak.js +1731 -0
  28. package/src/services/authService.ts +68 -0
  29. package/src/services/dialogService.ts +63 -0
  30. package/src/services/navMenuService.ts +21 -0
  31. package/src/style/componentes.scss +15 -0
  32. package/src/style/src/_animation.scss +441 -0
  33. package/src/style/src/_display.scss +10 -0
  34. package/src/style/src/_flexbox.scss +85 -0
  35. package/src/style/src/_functions.scss +171 -0
  36. package/src/style/src/_gap.scss +8 -0
  37. package/src/style/src/_grid.scss +100 -0
  38. package/src/style/src/_mixins.scss +633 -0
  39. package/src/style/src/_normalize.scss +351 -0
  40. package/src/style/src/_ripple.scss +30 -0
  41. package/src/style/src/_size.scss +98 -0
  42. package/src/style/src/_spacing.scss +42 -0
  43. package/src/style/src/_typography.scss +43 -0
  44. package/src/style/src/_variables.scss +87 -0
  45. package/src/style/src/components/_button.scss +107 -0
  46. package/src/style/src/components/_content.scss +57 -0
  47. package/src/style/src/components/_drawer.scss +99 -0
  48. package/src/style/src/components/_headerAvatar.scss +22 -0
  49. package/src/style/src/components/_icon.scss +120 -0
  50. package/src/style/src/components/_internal-icon-button.scss +5 -0
  51. package/src/style/src/components/_layout.scss +183 -0
  52. package/src/style/src/components/_loading-circle.scss +24 -0
  53. package/src/style/src/components/_navmenulink.scss +31 -0
  54. package/src/style/src/components/_scrollToTop.scss +28 -0
  55. package/src/style/src/components/_svg_icon.scss +5 -0
  56. package/src/style/src/components/_tab-navigation.scss +93 -0
  57. package/src/style/src/components/_themetoggle.scss +25 -0
  58. package/src/style/src/components/_tooltip.scss +55 -0
  59. package/src/style/src/sweetalert/_sweetalert.scss +9 -0
  60. package/src/style/src/sweetalert/scss/_animations.scss +197 -0
  61. package/src/style/src/sweetalert/scss/_body.scss +45 -0
  62. package/src/style/src/sweetalert/scss/_core.scss +863 -0
  63. package/src/style/src/sweetalert/scss/_mixins.scss +16 -0
  64. package/src/style/src/sweetalert/scss/_theming.scss +8 -0
  65. package/src/style/src/sweetalert/scss/_toasts-animations.scss +83 -0
  66. package/src/style/src/sweetalert/scss/_toasts-body.scss +85 -0
  67. package/src/style/src/sweetalert/scss/_toasts.scss +203 -0
  68. package/src/style/src/sweetalert/scss/_variables.scss +265 -0
  69. package/src/style/tema.scss +169 -0
  70. package/src/ts-helpers.d.ts +57 -0
  71. package/tsconfig.json +20 -0
  72. package/vite.config.js +26 -0
@@ -0,0 +1,169 @@
1
+ @use "sass:color";
2
+ @import "./src/mixins";
3
+ @import "./src/functions";
4
+ @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,300,0,200&display=block");
5
+ @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap");
6
+ @import "./src/normalize";
7
+
8
+ :root {
9
+ --window-height: 100%;
10
+ --font-family: "Roboto", "Helvetica", "Arial", sans-serif;
11
+ --font-size: 1rem;
12
+ --font-weight: 400;
13
+ --line-height: 1.15;
14
+ --header-height: 60px;
15
+ --main-height: calc(var(--window-height) - var(--header-height));
16
+ }
17
+
18
+ html,
19
+ body {
20
+ background-color: var(--bg-color);
21
+ color: var(--text-color);
22
+ font-family: var(--font-family);
23
+ font-size: var(--font-size);
24
+ font-weight: var(--font-weight);
25
+ line-height: var(--line-height);
26
+ }
27
+
28
+ html {
29
+ user-select: none;
30
+ @include colors($colors);
31
+
32
+ &.light {
33
+ color-scheme: light;
34
+ --preloader-color: #334d5c;
35
+ --preloader-background: rgb(241, 241, 241);
36
+ @include colors(themeColors(), false);
37
+ @include colors-hsl(themeColors());
38
+ }
39
+
40
+ &.dark {
41
+ color-scheme: dark;
42
+ --preloader-color: rgb(0, 65, 95);
43
+ --preloader-background: #030d1b;
44
+ @include colors(themeColors(true), false);
45
+ @include colors-hsl(themeColors(true));
46
+ }
47
+ }
48
+
49
+ body {
50
+ margin: 0;
51
+ padding: 0;
52
+ overflow: hidden;
53
+ height: var(--window-height);
54
+ > div#app {
55
+ height: var(--window-height);
56
+ overflow: hidden;
57
+ }
58
+ }
59
+
60
+ * {
61
+ box-sizing: border-box;
62
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
63
+ -webkit-tap-highlight-color: transparent;
64
+ &.sf-component-disabled,
65
+ &.sf-component-disabled * {
66
+ cursor: default !important;
67
+ pointer-events: none !important;
68
+ user-select: none !important;
69
+ color: var(--disabled-color) !important;
70
+ }
71
+ &:disabled,
72
+ &:disabled *,
73
+ &.sf-component-freeze,
74
+ &.sf-component-freeze *,
75
+ &.sf-component-loading,
76
+ &.sf-component-loading * {
77
+ cursor: default !important;
78
+ pointer-events: none !important;
79
+ user-select: none !important;
80
+ }
81
+ &:focus-visible {
82
+ outline: 2px solid var(--surface-1300-color);
83
+ outline-offset: 1px;
84
+ }
85
+ }
86
+
87
+ a {
88
+ text-decoration: none;
89
+ color: var(--primary-color);
90
+ &:hover {
91
+ text-decoration: underline;
92
+ }
93
+ }
94
+
95
+ input {
96
+ color: var(--text-color);
97
+ }
98
+
99
+ input:-webkit-autofill,
100
+ input:-webkit-autofill:focus {
101
+ transition: background-color 600000s 0s !important;
102
+ color: var(--text-color) !important;
103
+ }
104
+
105
+ input:disabled:-webkit-autofill {
106
+ opacity: 0.5 !important;
107
+ }
108
+
109
+ .hidden--visually {
110
+ border: 0;
111
+ clip: rect(1px 1px 1px 1px);
112
+ clip: rect(1px, 1px, 1px, 1px);
113
+ height: 1px;
114
+ margin: -1px;
115
+ overflow: hidden;
116
+ padding: 0;
117
+ position: absolute;
118
+ width: 1px;
119
+ input,
120
+ select {
121
+ transform: scale(0);
122
+ }
123
+ }
124
+
125
+ ::-webkit-scrollbar,
126
+ ::-webkit-scrollbar-corner {
127
+ background-color: var(--surface-200-color) !important;
128
+ }
129
+
130
+ ::-webkit-scrollbar-corner {
131
+ background-color: var(--surface-400-color) !important;
132
+ }
133
+
134
+ ::-webkit-scrollbar-thumb {
135
+ background: var(--surface-900-color) !important;
136
+ border: 4px solid var(--surface-200-color) !important;
137
+ border-radius: 6px !important;
138
+ }
139
+
140
+ .material-symbols-outlined {
141
+ font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 200, "opsz" 48;
142
+ }
143
+
144
+ /*
145
+ * Utilidades
146
+ */
147
+ .sf-select-none {
148
+ user-select: none;
149
+ }
150
+ .sf-select-text {
151
+ user-select: text;
152
+ }
153
+ .sf-select-all {
154
+ user-select: all;
155
+ }
156
+ .sf-select-auto {
157
+ user-select: auto;
158
+ }
159
+
160
+ @include theme-colors;
161
+ @import "./src/ripple";
162
+ @import "./src/display";
163
+ @import "./src/spacing";
164
+ @import "./src/size";
165
+ @import "./src/flexbox";
166
+ @import "./src/gap";
167
+ @import "./src/animation";
168
+ @import "./src/grid";
169
+ @import "./src/typography";
@@ -0,0 +1,57 @@
1
+ import {
2
+ ComponentCustomProps,
3
+ VNodeProps,
4
+ EmitsOptions,
5
+ AllowedComponentProps,
6
+ ObjectEmitsOptions,
7
+ } from "vue";
8
+
9
+ declare type PublicProps = VNodeProps &
10
+ AllowedComponentProps &
11
+ ComponentCustomProps;
12
+
13
+ declare type UnionToIntersection<U> = (
14
+ U extends any ? (k: U) => void : never
15
+ ) extends (k: infer I) => void
16
+ ? I
17
+ : never;
18
+
19
+ declare type EmitFn<
20
+ Options = ObjectEmitsOptions,
21
+ Event extends keyof Options = keyof Options
22
+ > = Options extends Array<infer V>
23
+ ? (event: V, ...args: any[]) => void
24
+ : {} extends Options
25
+ ? (event: string, ...args: any[]) => void
26
+ : UnionToIntersection<
27
+ {
28
+ [key in Event]: Options[key] extends (
29
+ ...args: infer Args
30
+ ) => any
31
+ ? (event: key, ...args: Args) => void
32
+ : (event: key, ...args: any[]) => void;
33
+ }[Event]
34
+ >;
35
+
36
+ export class ClassComponent<
37
+ Props,
38
+ Slots,
39
+ Emits extends EmitsOptions = {}
40
+ > {
41
+ $props: Props & PublicProps;
42
+ $slots: Slots;
43
+ $emit: EmitFn<Emits>;
44
+ }
45
+
46
+ export type GlobalComponentConstructor<T> = {
47
+ new (): T;
48
+ };
49
+
50
+ /**
51
+ * Custom types
52
+ */
53
+ export declare type Booleanish = boolean | "true" | "false";
54
+
55
+ export declare type Numberish = number | string;
56
+
57
+ export declare type Nullable<T = void> = T | null;
package/tsconfig.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["ESNext", "DOM"],
4
+ "module": "ESNext",
5
+ "target": "ESNext",
6
+ "moduleResolution": "node",
7
+ "outDir": "lib",
8
+ "declaration": true,
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "noUnusedLocals": true,
14
+ "useDefineForClassFields": true,
15
+ "resolveJsonModule": true,
16
+ "jsx": "preserve"
17
+ },
18
+ "include": ["src"],
19
+ "exclude": ["src/App.vue"]
20
+ }
package/vite.config.js ADDED
@@ -0,0 +1,26 @@
1
+ import { defineConfig } from "vite";
2
+ import vue from "@vitejs/plugin-vue";
3
+ import vueTypeImports from "vite-plugin-vue-type-imports";
4
+ import dts from "vite-plugin-dts";
5
+ import path from "path";
6
+
7
+ // https://vitejs.dev/config/
8
+ export default defineConfig({
9
+ build: {
10
+ lib: {
11
+ entry: path.resolve(__dirname, "src/index.ts"),
12
+ name: "Lib",
13
+ fileName: (format) => `lib.${format}.js`,
14
+ },
15
+ rollupOptions: {
16
+ external: ["vue"],
17
+ output: {
18
+ globals: {
19
+ vue: "Vue",
20
+ },
21
+ },
22
+ },
23
+ sourcemap: true,
24
+ },
25
+ plugins: [vue(), vueTypeImports(), dts({ cleanVueFileName: true })],
26
+ });