@idds/vue 1.0.52

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 (119) hide show
  1. package/README.md +313 -0
  2. package/dist/components/Accordion.vue.d.ts +85 -0
  3. package/dist/components/Accordion.vue.d.ts.map +1 -0
  4. package/dist/components/AccordionCard.vue.d.ts +66 -0
  5. package/dist/components/AccordionCard.vue.d.ts.map +1 -0
  6. package/dist/components/AccordionGroup.vue.d.ts +64 -0
  7. package/dist/components/AccordionGroup.vue.d.ts.map +1 -0
  8. package/dist/components/ActionDropdown.vue.d.ts +58 -0
  9. package/dist/components/ActionDropdown.vue.d.ts.map +1 -0
  10. package/dist/components/Alert.vue.d.ts +80 -0
  11. package/dist/components/Alert.vue.d.ts.map +1 -0
  12. package/dist/components/Avatar.vue.d.ts +70 -0
  13. package/dist/components/Avatar.vue.d.ts.map +1 -0
  14. package/dist/components/Badge.vue.d.ts +104 -0
  15. package/dist/components/Badge.vue.d.ts.map +1 -0
  16. package/dist/components/BottomSheet.vue.d.ts +48 -0
  17. package/dist/components/BottomSheet.vue.d.ts.map +1 -0
  18. package/dist/components/Breadcrumb.vue.d.ts +62 -0
  19. package/dist/components/Breadcrumb.vue.d.ts.map +1 -0
  20. package/dist/components/Button.vue.d.ts +102 -0
  21. package/dist/components/Button.vue.d.ts.map +1 -0
  22. package/dist/components/ButtonGroup.vue.d.ts +66 -0
  23. package/dist/components/ButtonGroup.vue.d.ts.map +1 -0
  24. package/dist/components/Card.vue.d.ts +115 -0
  25. package/dist/components/Card.vue.d.ts.map +1 -0
  26. package/dist/components/Checkbox.vue.d.ts +73 -0
  27. package/dist/components/Checkbox.vue.d.ts.map +1 -0
  28. package/dist/components/Chip.vue.d.ts +76 -0
  29. package/dist/components/Chip.vue.d.ts.map +1 -0
  30. package/dist/components/Collapse.vue.d.ts +60 -0
  31. package/dist/components/Collapse.vue.d.ts.map +1 -0
  32. package/dist/components/DatePicker.vue.d.ts +109 -0
  33. package/dist/components/DatePicker.vue.d.ts.map +1 -0
  34. package/dist/components/Divider.vue.d.ts +43 -0
  35. package/dist/components/Divider.vue.d.ts.map +1 -0
  36. package/dist/components/Drawer.vue.d.ts +91 -0
  37. package/dist/components/Drawer.vue.d.ts.map +1 -0
  38. package/dist/components/Dropdown.vue.d.ts +72 -0
  39. package/dist/components/Dropdown.vue.d.ts.map +1 -0
  40. package/dist/components/FieldInputTable.vue.d.ts +52 -0
  41. package/dist/components/FieldInputTable.vue.d.ts.map +1 -0
  42. package/dist/components/FileUpload.vue.d.ts +131 -0
  43. package/dist/components/FileUpload.vue.d.ts.map +1 -0
  44. package/dist/components/InputSearch.vue.d.ts +76 -0
  45. package/dist/components/InputSearch.vue.d.ts.map +1 -0
  46. package/dist/components/LinearProgressIndicator.vue.d.ts +47 -0
  47. package/dist/components/LinearProgressIndicator.vue.d.ts.map +1 -0
  48. package/dist/components/Modal.vue.d.ts +87 -0
  49. package/dist/components/Modal.vue.d.ts.map +1 -0
  50. package/dist/components/MonthPicker.vue.d.ts +69 -0
  51. package/dist/components/MonthPicker.vue.d.ts.map +1 -0
  52. package/dist/components/MultipleChoiceGrid.vue.d.ts +61 -0
  53. package/dist/components/MultipleChoiceGrid.vue.d.ts.map +1 -0
  54. package/dist/components/Pagination.vue.d.ts +99 -0
  55. package/dist/components/Pagination.vue.d.ts.map +1 -0
  56. package/dist/components/PasswordInput.vue.d.ts +68 -0
  57. package/dist/components/PasswordInput.vue.d.ts.map +1 -0
  58. package/dist/components/PhoneInput.vue.d.ts +89 -0
  59. package/dist/components/PhoneInput.vue.d.ts.map +1 -0
  60. package/dist/components/ProgressBar.vue.d.ts +75 -0
  61. package/dist/components/ProgressBar.vue.d.ts.map +1 -0
  62. package/dist/components/RadioInput.vue.d.ts +65 -0
  63. package/dist/components/RadioInput.vue.d.ts.map +1 -0
  64. package/dist/components/SelectDropdown.vue.d.ts +127 -0
  65. package/dist/components/SelectDropdown.vue.d.ts.map +1 -0
  66. package/dist/components/Skeleton.vue.d.ts +46 -0
  67. package/dist/components/Skeleton.vue.d.ts.map +1 -0
  68. package/dist/components/Spinner.vue.d.ts +58 -0
  69. package/dist/components/Spinner.vue.d.ts.map +1 -0
  70. package/dist/components/Stepper.vue.d.ts +49 -0
  71. package/dist/components/Stepper.vue.d.ts.map +1 -0
  72. package/dist/components/TabHorizontal.vue.d.ts +84 -0
  73. package/dist/components/TabHorizontal.vue.d.ts.map +1 -0
  74. package/dist/components/TabVertical.vue.d.ts +84 -0
  75. package/dist/components/TabVertical.vue.d.ts.map +1 -0
  76. package/dist/components/Table.vue.d.ts +160 -0
  77. package/dist/components/Table.vue.d.ts.map +1 -0
  78. package/dist/components/TableProgressBar.vue.d.ts +54 -0
  79. package/dist/components/TableProgressBar.vue.d.ts.map +1 -0
  80. package/dist/components/TextArea.vue.d.ts +121 -0
  81. package/dist/components/TextArea.vue.d.ts.map +1 -0
  82. package/dist/components/TextField.vue.d.ts +129 -0
  83. package/dist/components/TextField.vue.d.ts.map +1 -0
  84. package/dist/components/ThemeToggle.vue.d.ts +38 -0
  85. package/dist/components/ThemeToggle.vue.d.ts.map +1 -0
  86. package/dist/components/TimePicker.vue.d.ts +132 -0
  87. package/dist/components/TimePicker.vue.d.ts.map +1 -0
  88. package/dist/components/Toast.vue.d.ts +52 -0
  89. package/dist/components/Toast.vue.d.ts.map +1 -0
  90. package/dist/components/ToastProvider.vue.d.ts +12 -0
  91. package/dist/components/ToastProvider.vue.d.ts.map +1 -0
  92. package/dist/components/Toggle.vue.d.ts +71 -0
  93. package/dist/components/Toggle.vue.d.ts.map +1 -0
  94. package/dist/components/Tooltip.vue.d.ts +118 -0
  95. package/dist/components/Tooltip.vue.d.ts.map +1 -0
  96. package/dist/components/YearPicker.vue.d.ts +81 -0
  97. package/dist/components/YearPicker.vue.d.ts.map +1 -0
  98. package/dist/components/types.d.ts +5 -0
  99. package/dist/components/types.d.ts.map +1 -0
  100. package/dist/composables/useToast.d.ts +9 -0
  101. package/dist/composables/useToast.d.ts.map +1 -0
  102. package/dist/index.cjs.js +27 -0
  103. package/dist/index.cjs.js.map +1 -0
  104. package/dist/index.css +1 -0
  105. package/dist/index.d.ts +6239 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.es.js +10403 -0
  108. package/dist/index.es.js.map +1 -0
  109. package/dist/index.umd.js +27 -0
  110. package/dist/index.umd.js.map +1 -0
  111. package/dist/main.d.ts +2 -0
  112. package/dist/main.d.ts.map +1 -0
  113. package/dist/themes/index.d.ts +41 -0
  114. package/dist/themes/index.d.ts.map +1 -0
  115. package/dist/utils/fileValidation.d.ts +57 -0
  116. package/dist/utils/fileValidation.d.ts.map +1 -0
  117. package/dist/utils/security.d.ts +61 -0
  118. package/dist/utils/security.d.ts.map +1 -0
  119. package/package.json +64 -0
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC"}
@@ -0,0 +1,41 @@
1
+ export type BrandName = 'inagov' | 'inaku' | 'bgn' | 'bkn' | 'lan' | 'pan-rb' | 'default';
2
+ export interface CustomTheme {
3
+ name: string;
4
+ colors: Record<string, string>;
5
+ }
6
+ /**
7
+ * Set brand theme by name
8
+ * @param brandName - Name of the brand theme
9
+ */
10
+ export declare function setBrandTheme(brandName: BrandName): void;
11
+ /**
12
+ * Set custom theme
13
+ * @param customTheme - Custom theme object
14
+ */
15
+ export declare function setCustomTheme(customTheme: CustomTheme): void;
16
+ /**
17
+ * Get current active theme
18
+ */
19
+ export declare function getCurrentTheme(): {
20
+ name: string;
21
+ colors?: Record<string, string>;
22
+ };
23
+ /**
24
+ * Get available brand names
25
+ */
26
+ export declare function getAvailableBrands(): BrandName[];
27
+ /**
28
+ * Initialize theme system
29
+ * @param brandName - Initial brand name (optional)
30
+ */
31
+ export declare function initializeTheme(brandName?: BrandName): void;
32
+ /**
33
+ * Reset to default theme
34
+ */
35
+ export declare function resetTheme(): void;
36
+ /**
37
+ * Validate if brand exists
38
+ * @param brandName - Brand name to validate
39
+ */
40
+ export declare function isValidBrand(brandName: string): brandName is BrandName;
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAiCD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAQxD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAG7D;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAEA;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,EAAE,CAEhD;AA8DD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAQ3D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,IAAI,SAAS,CAEtE"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * File validation utilities for security
3
+ * Validates mimeType, file size, and file extensions
4
+ */
5
+ export declare const ALLOWED_MIME_TYPES: Record<string, string[]>;
6
+ export declare const DANGEROUS_MIME_TYPES: string[];
7
+ export interface FileValidationResult {
8
+ isValid: boolean;
9
+ error?: string;
10
+ file: File;
11
+ }
12
+ /**
13
+ * Validate file MIME type against allowed types
14
+ */
15
+ export declare function validateMimeType(file: File, allowedTypes?: string): {
16
+ isValid: boolean;
17
+ error?: string;
18
+ };
19
+ /**
20
+ * Validate file extension matches MIME type (additional security check)
21
+ */
22
+ export declare function validateFileExtension(file: File): {
23
+ isValid: boolean;
24
+ error?: string;
25
+ };
26
+ /**
27
+ * Validate file size
28
+ */
29
+ export declare function validateFileSize(file: File, maxSize: number): {
30
+ isValid: boolean;
31
+ error?: string;
32
+ };
33
+ /**
34
+ * Comprehensive file validation
35
+ */
36
+ export declare function validateFile(file: File, options?: {
37
+ allowedTypes?: string;
38
+ maxSize?: number;
39
+ validateExtension?: boolean;
40
+ }): FileValidationResult;
41
+ /**
42
+ * Format file size to human readable format
43
+ */
44
+ export declare function formatFileSize(bytes: number): string;
45
+ /**
46
+ * Validate file magic number (file signature) against expected MIME type
47
+ * This is a critical security check recommended by OWASP
48
+ *
49
+ * @param file - File object to validate
50
+ * @param expectedMimeType - Expected MIME type
51
+ * @returns Promise with validation result
52
+ */
53
+ export declare function validateMagicNumber(file: File, expectedMimeType: string): Promise<{
54
+ isValid: boolean;
55
+ error?: string;
56
+ }>;
57
+ //# sourceMappingURL=fileValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileValidation.d.ts","sourceRoot":"","sources":["../../src/utils/fileValidation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA4BvD,CAAC;AAGF,eAAO,MAAM,oBAAoB,UAahC,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,YAAY,CAAC,EAAE,MAAM,GACpB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAqDtC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAsBtF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAUtC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,GAAE;IACP,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACxB,GACL,oBAAoB,CAyCtB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQpD;AAuDD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqD/C"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Security utilities for preventing XSS attacks
3
+ */
4
+ /**
5
+ * Encode HTML entities to prevent XSS
6
+ */
7
+ export declare function encodeHtmlEntities(input: string): string;
8
+ /**
9
+ * Decode HTML entities (use with caution)
10
+ */
11
+ export declare function decodeHtmlEntities(input: string): string;
12
+ /**
13
+ * Check if input contains dangerous patterns
14
+ */
15
+ export declare function containsDangerousPatterns(input: string): boolean;
16
+ /**
17
+ * Sanitize input by removing dangerous content
18
+ */
19
+ export declare function sanitizeInput(input: string, options?: {
20
+ allowHtml?: boolean;
21
+ maxLength?: number;
22
+ stripScripts?: boolean;
23
+ stripEvents?: boolean;
24
+ }): string;
25
+ /**
26
+ * Validate input for security threats
27
+ */
28
+ export declare function validateInput(input: string): {
29
+ isValid: boolean;
30
+ threats: string[];
31
+ sanitized: string;
32
+ };
33
+ /**
34
+ * Security configuration for input components
35
+ */
36
+ export interface SecurityConfig {
37
+ /** Enable XSS protection */
38
+ enableXssProtection?: boolean;
39
+ /** Maximum allowed input length */
40
+ maxLength?: number;
41
+ /** Allow HTML content (use with extreme caution) */
42
+ allowHtml?: boolean;
43
+ /** Strip script tags */
44
+ stripScripts?: boolean;
45
+ /** Strip event handlers */
46
+ stripEvents?: boolean;
47
+ /** Log security violations */
48
+ logViolations?: boolean;
49
+ /** Callback for security violations */
50
+ onSecurityViolation?: (threats: string[], input: string) => void;
51
+ }
52
+ /**
53
+ * Default security configuration
54
+ */
55
+ export declare const DEFAULT_SECURITY_CONFIG: SecurityConfig;
56
+ /**
57
+ * Sanitize file name for safe display
58
+ * Removes dangerous characters that could lead to XSS
59
+ */
60
+ export declare function sanitizeFileName(fileName: string): string;
61
+ //# sourceMappingURL=security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/utils/security.ts"],"names":[],"mappings":"AAAA;;GAEG;AA6FH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAkBhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CAClB,GACL,MAAM,CA6DR;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CA6BA;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uCAAuC;IACvC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClE;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAgBrC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAmBzD"}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@idds/vue",
3
+ "version": "1.0.52",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "Vue 3 UI component library for INA Digital Design System",
8
+ "type": "module",
9
+ "main": "./dist/index.cjs.js",
10
+ "module": "./dist/index.es.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.es.js",
15
+ "require": "./dist/index.cjs.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./index.css": "./dist/index.css"
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "scripts": {
24
+ "dev": "vite",
25
+ "build": "vite build",
26
+ "build:strict": "vue-tsc && vite build",
27
+ "preview": "vite preview",
28
+ "type-check": "vue-tsc --noEmit --skipLibCheck",
29
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .eslintignore",
30
+ "lint:check": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .eslintignore"
31
+ },
32
+ "keywords": [
33
+ "vue",
34
+ "vue3",
35
+ "ui",
36
+ "components",
37
+ "design-system",
38
+ "ina-digital"
39
+ ],
40
+ "author": "INA Digital",
41
+ "license": "MIT",
42
+ "peerDependencies": {
43
+ "vue": "^3.4.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^20.11.0",
47
+ "@typescript-eslint/eslint-plugin": "^6.19.0",
48
+ "@typescript-eslint/parser": "^6.19.0",
49
+ "@vitejs/plugin-vue": "^5.0.3",
50
+ "@vue/eslint-config-typescript": "^12.0.0",
51
+ "eslint": "^8.56.0",
52
+ "eslint-plugin-vue": "^9.20.1",
53
+ "terser": "^5.44.0",
54
+ "typescript": "^5.3.3",
55
+ "vite": "^5.1.0",
56
+ "vite-plugin-dts": "^3.7.3",
57
+ "vue-tsc": "^2.0.6"
58
+ },
59
+ "dependencies": {
60
+ "@idds/styles": "^1.0.26",
61
+ "@tabler/icons-vue": "^3.0.0",
62
+ "clsx": "^2.1.1"
63
+ }
64
+ }