@sysvale/citizen-components 0.1.0

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.
Binary file
@@ -0,0 +1,33 @@
1
+ import type { DefineComponent, Plugin } from 'vue';
2
+
3
+ // Configuration types
4
+ export interface CitizenComponentsConfig {
5
+ apiBaseUrl?: string;
6
+ endpoints?: {
7
+ searchCitizens?: string;
8
+ };
9
+ }
10
+
11
+ // Re-export types
12
+ export type { Citizen, Nullable } from './services/citizen/citizen.types';
13
+ export type { CitizenModelType } from './types';
14
+
15
+ // Import types for the component definition
16
+ import type { Citizen } from './services/citizen/citizen.types';
17
+ import type { CitizenModelType } from './types';
18
+
19
+ // Define component types
20
+ export interface CitizenSelectProps {
21
+ showButton: boolean;
22
+ fluid?: boolean;
23
+ variant?: string;
24
+ optionsField?: keyof Citizen;
25
+ modelValue?: CitizenModelType;
26
+ }
27
+
28
+ // Export component
29
+ export declare const CitizenSelect: DefineComponent<CitizenSelectProps>;
30
+
31
+ // Export plugin
32
+ export declare const CitizenComponentsPlugin: Plugin;
33
+ export default CitizenComponentsPlugin;
@@ -0,0 +1,29 @@
1
+ export type Nullable<T> = T | null;
2
+ export interface Citizen {
3
+ id: string;
4
+ cpf: string;
5
+ cns: string;
6
+ name: string;
7
+ gender: string;
8
+ cpf_responsible: Nullable<string>;
9
+ mother_name: string;
10
+ birth_date: string;
11
+ phone: Nullable<string>;
12
+ cellphone: Nullable<string>;
13
+ email: Nullable<string>;
14
+ address: {
15
+ cep: Nullable<string>;
16
+ street: Nullable<string>;
17
+ number: Nullable<string>;
18
+ complement: Nullable<string>;
19
+ neighborhood: Nullable<string>;
20
+ city: Nullable<string>;
21
+ uf: Nullable<string>;
22
+ };
23
+ race: string;
24
+ co_cidadao: number;
25
+ is_dead: boolean;
26
+ pregnant?: boolean | null;
27
+ identification_document?: Nullable<string>;
28
+ issuing_agency?: Nullable<string>;
29
+ }
@@ -0,0 +1,3 @@
1
+ export type { Citizen, Nullable, } from './services/citizen/citizen.types';
2
+ import type { Citizen } from './services/citizen/citizen.types';
3
+ export type CitizenModelType = Citizen | Partial<Citizen> | string | null;
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@sysvale/citizen-components",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "main": "./dist/citizen-components.cjs.js",
9
+ "module": "./dist/citizen-components.es.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/citizen-components.es.js",
15
+ "require": "./dist/citizen-components.cjs.js"
16
+ },
17
+ "./style.css": "./dist/citizen-components.css"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "npm run build-only && npm run build-types",
25
+ "preview": "vite preview",
26
+ "test": "vitest",
27
+ "build-only": "vite build",
28
+ "build-types": "tsc src/types.ts src/services/citizen/citizen.types.ts --declaration --emitDeclarationOnly --outDir dist/ && node scripts/generate-index-types.js",
29
+ "type-check": "vue-tsc --build",
30
+ "lint": "eslint . --ext .ts,.tsx,.js,.vue",
31
+ "prettier:check": "prettier . --check",
32
+ "format": "prettier --write .",
33
+ "docs:dev": "vitepress dev docs",
34
+ "docs:build": "vitepress build docs",
35
+ "docs:preview": "vitepress preview docs"
36
+ },
37
+ "dependencies": {
38
+ "@vueuse/core": "^13.9.0",
39
+ "lodash": "^4.17.21"
40
+ },
41
+ "peerDependencies": {
42
+ "@sysvale/cuida": "^3.147.0",
43
+ "vue": "^3.5.13"
44
+ },
45
+ "devDependencies": {
46
+ "@faker-js/faker": "^10.0.0",
47
+ "@sysvale/cuida": "^3.147.0",
48
+ "@tsconfig/node22": "^22.0.1",
49
+ "@types/jsdom": "^21.1.7",
50
+ "@types/lodash": "^4.17.13",
51
+ "@types/node": "^22.14.0",
52
+ "@vitejs/plugin-vue": "^5.2.3",
53
+ "@vitest/coverage-v8": "^3.1.1",
54
+ "@vitest/eslint-plugin": "^1.1.39",
55
+ "@vue/eslint-config-prettier": "^10.2.0",
56
+ "@vue/eslint-config-typescript": "^14.5.0",
57
+ "@vue/test-utils": "^2.4.6",
58
+ "@vue/tsconfig": "^0.8.1",
59
+ "axios": "^1.7.4",
60
+ "eslint": "^9.22.0",
61
+ "eslint-plugin-vue": "~10.0.0",
62
+ "jiti": "^2.4.2",
63
+ "jsdom": "^26.0.0",
64
+ "npm-run-all2": "^7.0.2",
65
+ "prettier": "3.5.3",
66
+ "sass-embedded": "^1.93.2",
67
+ "typescript": "~5.8.0",
68
+ "vite": "^6.2.4",
69
+ "vite-plugin-dts": "^4.5.4",
70
+ "vite-plugin-vue-devtools": "^7.7.2",
71
+ "vitepress": "^1.6.4",
72
+ "vitest": "^3.1.1",
73
+ "vue": "^3.5.13",
74
+ "vue-tsc": "^2.2.8"
75
+ }
76
+ }