@luizleon/sf.prefeiturasp.vuecomponents 0.0.4 → 0.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.
@@ -1,21 +1,35 @@
1
- import { SfContentProps } from "./Content";
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<SfContentProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SfContentProps>>>, {}, {}>, {
3
- header?(_: {}): any;
4
- default?(_: {}): any;
5
- footer?(_: {}): any;
6
- }>;
7
- export default _default;
8
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
- type __VLS_TypePropsToRuntimeProps<T> = {
10
- [K in keyof T]-?: {} extends Pick<T, K> ? {
11
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
- } : {
13
- type: import('vue').PropType<T[K]>;
14
- required: true;
15
- };
16
- };
17
- type __VLS_WithTemplateSlots<T, S> = T & {
18
- new (): {
19
- $slots: S;
20
- };
21
- };
1
+ import { VNode } from "vue";
2
+ import { StyleValue } from "vue";
3
+ import {
4
+ ClassComponent,
5
+ GlobalComponentConstructor,
6
+ } from "../../ts-helpers";
7
+
8
+ export interface SfContentProps {
9
+ class?: any;
10
+ style?: StyleValue;
11
+ disableBodyPadding?: boolean;
12
+ disableHeaderPadding?: boolean;
13
+ disableFooterPadding?: boolean;
14
+ }
15
+
16
+ export interface SfContentSlots {
17
+ header: () => VNode[];
18
+ footer: () => VNode[];
19
+ }
20
+
21
+ export declare type SfContentEmits = {};
22
+
23
+ declare class SfContent extends ClassComponent<
24
+ SfContentProps,
25
+ SfContentSlots,
26
+ SfContentEmits
27
+ > {}
28
+
29
+ declare module "@vue/runtime-core" {
30
+ interface GlobalComponents {
31
+ SfContent: GlobalComponentConstructor<SfContent>;
32
+ }
33
+ }
34
+
35
+ export default SfContent;
@@ -1,39 +1,38 @@
1
- import { Cor, Tamanho } from "../../enum";
2
- import { SfIconProps } from "./Icon";
3
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SfIconProps>, {
4
- visible: boolean;
5
- class: string;
6
- style: string;
7
- tamanho: Tamanho;
8
- dotColor: Cor;
9
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SfIconProps>, {
10
- visible: boolean;
11
- class: string;
12
- style: string;
13
- tamanho: Tamanho;
14
- dotColor: Cor;
15
- }>>>, {
16
- style: import("vue").StyleValue;
17
- visible: boolean;
18
- class: any;
19
- tamanho: Tamanho;
20
- dotColor: Cor;
21
- }, {}>;
22
- export default _default;
23
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
- type __VLS_TypePropsToRuntimeProps<T> = {
25
- [K in keyof T]-?: {} extends Pick<T, K> ? {
26
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
27
- } : {
28
- type: import('vue').PropType<T[K]>;
29
- required: true;
30
- };
31
- };
32
- type __VLS_WithDefaults<P, D> = {
33
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
34
- default: D[K];
35
- }> : P[K];
36
- };
37
- type __VLS_Prettify<T> = {
38
- [K in keyof T]: T[K];
39
- } & {};
1
+ import { Cor, Tamanho } from "../../enum";
2
+ import {
3
+ ClassComponent,
4
+ GlobalComponentConstructor,
5
+ } from "../../ts-helpers";
6
+ import { StyleValue, ButtonHTMLAttributes } from "vue";
7
+
8
+ export interface SfIconProps {
9
+ icone?: string;
10
+ visible?: boolean;
11
+ class?: any;
12
+ style?: StyleValue;
13
+ disabled?: boolean;
14
+ loading?: boolean;
15
+ button?: boolean;
16
+ tamanho?: Tamanho;
17
+ dot?: boolean;
18
+ dotColor?: Cor;
19
+ buttonProps?: ButtonHTMLAttributes;
20
+ }
21
+
22
+ export interface SfIconSlots {}
23
+
24
+ export declare type SfIconEmits = {};
25
+
26
+ declare class SfIcon extends ClassComponent<
27
+ SfIconProps,
28
+ SfIconSlots,
29
+ SfIconEmits
30
+ > {}
31
+
32
+ declare module "@vue/runtime-core" {
33
+ interface GlobalComponents {
34
+ SfIcon: GlobalComponentConstructor<SfIcon>;
35
+ }
36
+ }
37
+
38
+ export default SfIcon;
@@ -1,2 +1,7 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
- export default _default;
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {
2
+ visible: import("vue").Ref<boolean>;
3
+ id: string;
4
+ parent: HTMLElement | null;
5
+ ButtonClick: () => void;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
7
+ export default _sfc_main;
@@ -1,2 +1,11 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
- export default _default;
1
+ declare const _sfc_main: import("vue").DefineComponent<{}, {
2
+ readonly ThemeToggleBase: {
3
+ readonly storedTheme: "light" | "dark" | null;
4
+ readonly IsDark: boolean;
5
+ Toggle(): void;
6
+ EnableDarkMode(): void;
7
+ EnableLightMode(): void;
8
+ SetInitialTheme(): void;
9
+ };
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
11
+ export default _sfc_main;
@@ -1,12 +1,44 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
2
- title?(_: {}): any;
3
- action?(_: {}): any;
4
- menu?(_: {}): any;
5
- content?(_: {}): any;
6
- }>;
7
- export default _default;
8
- type __VLS_WithTemplateSlots<T, S> = T & {
9
- new (): {
10
- $slots: S;
11
- };
12
- };
1
+ import { VNode } from "vue";
2
+ import {
3
+ ClassComponent,
4
+ GlobalComponentConstructor,
5
+ } from "../ts-helpers";
6
+
7
+ export interface SfLayoutProps {}
8
+
9
+ export interface SfLayoutSlots {
10
+ /**
11
+ * Título ao lado do botão do menu
12
+ */
13
+ title: () => VNode[];
14
+ /**
15
+ * Conteúdo para ficar no menu
16
+ */
17
+ menu: () => VNode[];
18
+ /**
19
+ * Visível no footer da aplicação.
20
+ */
21
+ "app-version": () => VNode[];
22
+ /**
23
+ * Conteúdo principal
24
+ */
25
+ content: () => VNode[];
26
+ }
27
+
28
+ export declare type SfLayoutEmits = {
29
+ mounted: () => void;
30
+ };
31
+
32
+ declare class SfLayout extends ClassComponent<
33
+ SfLayoutProps,
34
+ SfLayoutSlots,
35
+ SfLayoutEmits
36
+ > {}
37
+
38
+ declare module "@vue/runtime-core" {
39
+ interface GlobalComponents {
40
+ SfLayout: GlobalComponentConstructor<SfLayout>;
41
+ }
42
+ }
43
+
44
+ export default SfLayout;
@@ -1,12 +1,34 @@
1
- import { SfNavMenuLinkProps } from "./NavMenuLink";
2
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<SfNavMenuLinkProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SfNavMenuLinkProps>>>, {}, {}>;
3
- export default _default;
4
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
- type __VLS_TypePropsToRuntimeProps<T> = {
6
- [K in keyof T]-?: {} extends Pick<T, K> ? {
7
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
8
- } : {
9
- type: import('vue').PropType<T[K]>;
10
- required: true;
11
- };
12
- };
1
+ import {
2
+ ClassComponent,
3
+ GlobalComponentConstructor,
4
+ } from "../../ts-helpers";
5
+
6
+ export interface SfNavMenuLinkProps {
7
+ href: string;
8
+ text: string;
9
+ icon?: string;
10
+ }
11
+
12
+ export interface SfNavMenuLinkSlots {}
13
+
14
+ export declare type SfNavMenuLinkEmits = {};
15
+
16
+ declare class SfNavMenuLink extends ClassComponent<
17
+ SfNavMenuLinkProps,
18
+ SfNavMenuLinkSlots,
19
+ SfNavMenuLinkEmits
20
+ > {}
21
+
22
+ declare module "@vue/runtime-core" {
23
+ interface GlobalComponents {
24
+ SfNavMenuLink: GlobalComponentConstructor<SfNavMenuLink>;
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Componente para navegação no menu.
30
+ *
31
+ * Dependência: router-link.
32
+ * @see [https://router.vuejs.org/api/#router-link-s-v-slot](https://router.vuejs.org/api/#router-link-s-v-slot)
33
+ */
34
+ export default SfNavMenuLink;
@@ -1,26 +1,37 @@
1
- import { SfTabNavigationProps } from "./TabNavigation";
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<SfTabNavigationProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SfTabNavigationProps>>>, {}, {}>, {
3
- item?(_: {
4
- item: {
5
- text: string;
6
- route: string;
7
- };
8
- navigate: any;
9
- isActive: any;
10
- }): any;
11
- }>;
12
- export default _default;
13
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
- type __VLS_TypePropsToRuntimeProps<T> = {
15
- [K in keyof T]-?: {} extends Pick<T, K> ? {
16
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
- } : {
18
- type: import('vue').PropType<T[K]>;
19
- required: true;
20
- };
21
- };
22
- type __VLS_WithTemplateSlots<T, S> = T & {
23
- new (): {
24
- $slots: S;
25
- };
26
- };
1
+ import {
2
+ ClassComponent,
3
+ GlobalComponentConstructor,
4
+ } from "../../ts-helpers";
5
+
6
+ export interface SfTabNavigationProps {
7
+ tabs: { text: string; route: string }[];
8
+ }
9
+
10
+ export interface SfTabNavigationSlots {
11
+ item: (scope: {
12
+ navigate: () => void;
13
+ isActive: boolean;
14
+ }) => VNode[];
15
+ }
16
+
17
+ export declare type SfTabNavigationEmits = {};
18
+
19
+ declare class SfTabNavigation extends ClassComponent<
20
+ SfTabNavigationProps,
21
+ SfTabNavigationSlots,
22
+ SfTabNavigationEmits
23
+ > {}
24
+
25
+ declare module "@vue/runtime-core" {
26
+ interface GlobalComponents {
27
+ SfTabNavigation: GlobalComponentConstructor<SfTabNavigation>;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Componente para navegação em abas
33
+ *
34
+ * Dependência: router-link.
35
+ * @see [https://router.vuejs.org/api/#router-link-s-v-slot](https://router.vuejs.org/api/#router-link-s-v-slot)
36
+ */
37
+ export default SfTabNavigation;
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luizleon/sf.prefeiturasp.vuecomponents",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Pacote de componentes Vue para projetos em SF.",
5
5
  "main": "dist/lib.umd.js",
6
6
  "module": "dist/lib.es.js",
@@ -21,8 +21,8 @@
21
21
  "sass": "1.69.5",
22
22
  "typescript": "5.2.2",
23
23
  "vite": "4.5.0",
24
- "vite-plugin-dts": "3.6.3",
25
- "vite-plugin-vue-type-imports": "0.2.5",
24
+ "vite-plugin-dts": "1.6.4",
25
+ "vite-plugin-vue-type-imports": "0.2.3",
26
26
  "vue-tsc": "1.8.22"
27
27
  },
28
28
  "peerDependencies": {
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
- export default _default;