botech-library 0.0.61 → 0.0.63

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,10 +1,10 @@
1
- import React from 'react';
2
- type ButtonProps = {
3
- variant?: 'primary' | 'secondary' | 'danger';
4
- onClick?: () => void;
5
- children: React.ReactNode;
6
- className?: string;
7
- };
8
- declare const Button: ({ variant, onClick, children, className }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
9
- export default Button;
1
+ import React from 'react';
2
+ type ButtonProps = {
3
+ variant?: 'primary' | 'secondary' | 'danger';
4
+ onClick?: () => void;
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ };
8
+ declare const Button: ({ variant, onClick, children, className }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default Button;
10
10
  //# sourceMappingURL=Button.d.ts.map
@@ -1,2 +1,2 @@
1
- export { default } from './Button';
1
+ export { default } from './Button';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,18 +1,18 @@
1
- import React from 'react';
2
- export interface HeaderProps {
3
- title: string;
4
- description: string;
5
- logoUrl?: string;
6
- logoAlt?: string;
7
- systemName?: string;
8
- systemSubtitle?: string;
9
- onMenuToggle: () => void;
10
- showPageInfo?: boolean;
11
- className?: string;
12
- logoClassName?: string;
13
- titleClassName?: string;
14
- descriptionClassName?: string;
15
- }
16
- declare const Header: React.FC<HeaderProps>;
17
- export default Header;
1
+ import React from 'react';
2
+ export interface HeaderProps {
3
+ title: string;
4
+ description: string;
5
+ logoUrl?: string;
6
+ logoAlt?: string;
7
+ systemName?: string;
8
+ systemSubtitle?: string;
9
+ onMenuToggle: () => void;
10
+ showPageInfo?: boolean;
11
+ className?: string;
12
+ logoClassName?: string;
13
+ titleClassName?: string;
14
+ descriptionClassName?: string;
15
+ }
16
+ declare const Header: React.FC<HeaderProps>;
17
+ export default Header;
18
18
  //# sourceMappingURL=Header.d.ts.map
@@ -1,3 +1,3 @@
1
- export { default as Header } from './Header';
2
- export type { HeaderProps } from './types';
1
+ export { default as Header } from './Header';
2
+ export type { HeaderProps } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,15 @@
1
- export interface HeaderProps {
2
- title: string;
3
- description: string;
4
- logoUrl?: string;
5
- logoAlt?: string;
6
- systemName?: string;
7
- systemSubtitle?: string;
8
- onMenuToggle: () => void;
9
- showPageInfo?: boolean;
10
- className?: string;
11
- logoClassName?: string;
12
- titleClassName?: string;
13
- descriptionClassName?: string;
14
- }
1
+ export interface HeaderProps {
2
+ title: string;
3
+ description: string;
4
+ logoUrl?: string;
5
+ logoAlt?: string;
6
+ systemName?: string;
7
+ systemSubtitle?: string;
8
+ onMenuToggle: () => void;
9
+ showPageInfo?: boolean;
10
+ className?: string;
11
+ logoClassName?: string;
12
+ titleClassName?: string;
13
+ descriptionClassName?: string;
14
+ }
15
15
  //# sourceMappingURL=types.d.ts.map
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import type { SidebarProps } from './types';
3
- declare const Sidebar: React.FC<SidebarProps>;
4
- export default Sidebar;
1
+ import React from 'react';
2
+ import type { SidebarProps } from './types';
3
+ declare const Sidebar: React.FC<SidebarProps>;
4
+ export default Sidebar;
5
5
  //# sourceMappingURL=Sidebar.d.ts.map
@@ -1,3 +1,3 @@
1
- export { default as Sidebar } from './Sidebar';
2
- export type { SidebarProps, MenuItem, MenuFolder, MenuItemWithFolders } from './types';
1
+ export { default as Sidebar } from './Sidebar';
2
+ export type { SidebarProps, MenuItem, MenuFolder, MenuItemWithFolders } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,56 +1,56 @@
1
- import { ReactNode } from 'react';
2
- export interface MenuItem {
3
- id: string;
4
- label: string;
5
- icon: React.ComponentType<{
6
- className?: string;
7
- }>;
8
- path: string;
9
- description?: string;
10
- color?: string;
11
- gradient?: string;
12
- badge?: string;
13
- badgeColor?: string;
14
- }
15
- export interface MenuFolder {
16
- id: string;
17
- label: string;
18
- icon: React.ComponentType<{
19
- className?: string;
20
- }>;
21
- children: MenuItem[];
22
- color?: string;
23
- gradient?: string;
24
- }
25
- export type MenuItemWithFolders = {
26
- type: 'item';
27
- data: MenuItem;
28
- } | {
29
- type: 'folder';
30
- data: MenuFolder;
31
- };
32
- export interface SidebarProps {
33
- isOpen: boolean;
34
- onClose: () => void;
35
- onToggle: () => void;
36
- menuItems: MenuItemWithFolders[];
37
- logoUrl?: string;
38
- logoAlt?: string;
39
- systemName?: string;
40
- className?: string;
41
- overlayClassName?: string;
42
- desktopMenuClassName?: string;
43
- showBottomMenu?: boolean;
44
- bottomMenuItems?: {
45
- id: string;
46
- label: string;
47
- icon: React.ComponentType<{
48
- className?: string;
49
- }>;
50
- action: () => void;
51
- }[];
52
- activePath?: string;
53
- onNavigate?: (path: string) => void;
54
- children?: ReactNode;
55
- }
1
+ import { ReactNode } from 'react';
2
+ export interface MenuItem {
3
+ id: string;
4
+ label: string;
5
+ icon: React.ComponentType<{
6
+ className?: string;
7
+ }>;
8
+ path: string;
9
+ description?: string;
10
+ color?: string;
11
+ gradient?: string;
12
+ badge?: string;
13
+ badgeColor?: string;
14
+ }
15
+ export interface MenuFolder {
16
+ id: string;
17
+ label: string;
18
+ icon: React.ComponentType<{
19
+ className?: string;
20
+ }>;
21
+ children: MenuItem[];
22
+ color?: string;
23
+ gradient?: string;
24
+ }
25
+ export type MenuItemWithFolders = {
26
+ type: 'item';
27
+ data: MenuItem;
28
+ } | {
29
+ type: 'folder';
30
+ data: MenuFolder;
31
+ };
32
+ export interface SidebarProps {
33
+ isOpen: boolean;
34
+ onClose: () => void;
35
+ onToggle: () => void;
36
+ menuItems: MenuItemWithFolders[];
37
+ logoUrl?: string;
38
+ logoAlt?: string;
39
+ systemName?: string;
40
+ className?: string;
41
+ overlayClassName?: string;
42
+ desktopMenuClassName?: string;
43
+ showBottomMenu?: boolean;
44
+ bottomMenuItems?: {
45
+ id: string;
46
+ label: string;
47
+ icon: React.ComponentType<{
48
+ className?: string;
49
+ }>;
50
+ action: () => void;
51
+ }[];
52
+ activePath?: string;
53
+ onNavigate?: (path: string) => void;
54
+ children?: ReactNode;
55
+ }
56
56
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=generateTableColumns.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateTableColumns.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/generateTableColumns.test.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Button.test.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './services/studentService';
3
+ export * from './utils/generateTableColumns';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAG7B,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAG7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"studentService.d.ts","sourceRoot":"","sources":["../../../src/services/studentService.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,GAAI,YAAY,IAAI,GAAG,IAAI,KAAG,MAiB1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAC9B,mBAAmB,IAAI,GAAG,IAAI,EAC9B,aAAa,MAAM,KACpB,OAAO,CAAC,IAAI,CAiBd,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC5B,MAAM,IAAI,EACV,mBAAmB,IAAI,GAAG,IAAI,EAC9B,aAAa,MAAM,KACpB,OAAO,CAAC,GAAG,CAoBb,CAAC"}
1
+ {"version":3,"file":"studentService.d.ts","sourceRoot":"","sources":["../../../src/services/studentService.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,GAAI,YAAY,IAAI,GAAG,IAAI,KAAG,MAiB1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAC9B,mBAAmB,IAAI,GAAG,IAAI,EAC9B,aAAa,MAAM,KACpB,OAAO,CAAC,IAAI,CAOd,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC5B,MAAM,IAAI,EACV,mBAAmB,IAAI,GAAG,IAAI,EAC9B,aAAa,MAAM,KACpB,OAAO,CAAC,GAAG,CAoBb,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { TableColumn } from '../types/table.types';
2
+ /**
3
+ * Genera columnas para una tabla genérica a partir de un objeto de muestra y un array de exclusión.
4
+ * @param sampleObject Un objeto de muestra del tipo de datos (por ejemplo, un empleado, estudiante, etc).
5
+ * @param excludedProps Array de strings con las propiedades a excluir de la tabla.
6
+ * @returns Un array de columnas para la tabla genérica.
7
+ */
8
+ export declare function generateTableColumns<T extends Record<string, any>>(sampleObject: T, excludedProps: string[]): TableColumn<T>[];
9
+ //# sourceMappingURL=generateTableColumns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateTableColumns.d.ts","sourceRoot":"","sources":["../../../src/utils/generateTableColumns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9D,YAAY,EAAE,CAAC,EACf,aAAa,EAAE,MAAM,EAAE,GACxB,WAAW,CAAC,CAAC,CAAC,EAAE,CAQlB"}
package/package.json CHANGED
@@ -1,57 +1,57 @@
1
- {
2
- "name": "botech-library",
3
- "version": "0.0.61",
4
- "type": "module",
5
- "main": "dist/cjs/index.js",
6
- "module": "dist/esm/index.js",
7
- "types": "dist/types/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "build": "rollup -c && npm run types",
13
- "types": "tsc --project tsconfig.types.json",
14
- "prepublish": "npm run build",
15
- "test": "jest",
16
- "test:watch": "jest --watch",
17
- "test:coverage": "jest --coverage"
18
- },
19
- "peerDependencies": {
20
- "axios": ">=1.6.0",
21
- "react": ">=16.8.0",
22
- "react-dom": ">=16.8.0",
23
- "sweetalert2": ">=11.0.0"
24
- },
25
- "devDependencies": {
26
- "@rollup/plugin-commonjs": "^24.1.0",
27
- "@rollup/plugin-node-resolve": "^15.1.0",
28
- "@rollup/plugin-terser": "^0.4.3",
29
- "@rollup/plugin-typescript": "^11.1.2",
30
- "@testing-library/jest-dom": "^6.6.3",
31
- "@testing-library/react": "^16.3.0",
32
- "@testing-library/user-event": "^14.6.1",
33
- "@types/jest": "^30.0.0",
34
- "@types/react": "^18.2.21",
35
- "@types/react-dom": "^18.2.7",
36
- "autoprefixer": "^10.4.16",
37
- "axios": "^1.6.0",
38
- "cssnano": "^7.0.4",
39
- "identity-obj-proxy": "^3.0.0",
40
- "jest": "^30.0.4",
41
- "jest-environment-jsdom": "^30.0.4",
42
- "postcss": "^8.4.31",
43
- "react": "^18.2.0",
44
- "react-dom": "^18.2.0",
45
- "rollup": "^3.29.4",
46
- "rollup-plugin-postcss": "^4.0.2",
47
- "tailwindcss": "^4.0.0",
48
- "ts-jest": "^29.4.0",
49
- "tslib": "^2.6.2",
50
- "typescript": "^5.2.2"
51
- },
52
- "dependencies": {
53
- "framer-motion": "^12.18.1",
54
- "react-icons": "^5.5.0",
55
- "sweetalert2": ">=11.0.0"
56
- }
57
- }
1
+ {
2
+ "name": "botech-library",
3
+ "version": "0.0.63",
4
+ "type": "module",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "rollup -c && npm run types",
13
+ "types": "tsc --project tsconfig.types.json",
14
+ "prepublish": "npm run build",
15
+ "test": "jest",
16
+ "test:watch": "jest --watch",
17
+ "test:coverage": "jest --coverage"
18
+ },
19
+ "peerDependencies": {
20
+ "axios": ">=1.6.0",
21
+ "react": ">=16.8.0",
22
+ "react-dom": ">=16.8.0",
23
+ "sweetalert2": ">=11.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@rollup/plugin-commonjs": "^24.1.0",
27
+ "@rollup/plugin-node-resolve": "^15.1.0",
28
+ "@rollup/plugin-terser": "^0.4.3",
29
+ "@rollup/plugin-typescript": "^11.1.2",
30
+ "@testing-library/jest-dom": "^6.6.3",
31
+ "@testing-library/react": "^16.3.0",
32
+ "@testing-library/user-event": "^14.6.1",
33
+ "@types/jest": "^30.0.0",
34
+ "@types/react": "^18.2.21",
35
+ "@types/react-dom": "^18.2.7",
36
+ "autoprefixer": "^10.4.16",
37
+ "axios": "^1.6.0",
38
+ "cssnano": "^7.0.4",
39
+ "identity-obj-proxy": "^3.0.0",
40
+ "jest": "^30.0.4",
41
+ "jest-environment-jsdom": "^30.0.4",
42
+ "postcss": "^8.4.31",
43
+ "react": "^18.2.0",
44
+ "react-dom": "^18.2.0",
45
+ "rollup": "^3.29.4",
46
+ "rollup-plugin-postcss": "^4.0.2",
47
+ "tailwindcss": "^4.0.0",
48
+ "ts-jest": "^29.4.0",
49
+ "tslib": "^2.6.2",
50
+ "typescript": "^5.2.2"
51
+ },
52
+ "dependencies": {
53
+ "framer-motion": "^12.18.1",
54
+ "react-icons": "^5.5.0",
55
+ "sweetalert2": ">=11.0.0"
56
+ }
57
+ }