@4byte/shared-lib 0.0.1 → 0.0.3

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 (123) hide show
  1. package/fesm2022/4byte-shared-lib.mjs +1315 -0
  2. package/fesm2022/4byte-shared-lib.mjs.map +1 -0
  3. package/package.json +15 -27
  4. package/types/4byte-shared-lib.d.ts +351 -0
  5. package/.editorconfig +0 -17
  6. package/.prettierrc +0 -12
  7. package/.vscode/extensions.json +0 -4
  8. package/.vscode/launch.json +0 -20
  9. package/.vscode/mcp.json +0 -9
  10. package/.vscode/tasks.json +0 -42
  11. package/angular.json +0 -211
  12. package/ng-package.json +0 -11
  13. package/projects/storybook-host/.storybook/main.ts +0 -20
  14. package/projects/storybook-host/.storybook/preview.ts +0 -74
  15. package/projects/storybook-host/.storybook/tsconfig.doc.json +0 -10
  16. package/projects/storybook-host/.storybook/tsconfig.json +0 -22
  17. package/projects/storybook-host/.storybook/tutorial/Installation.mdx +0 -6
  18. package/projects/storybook-host/.storybook/tutorial/Introduction.mdx +0 -18
  19. package/projects/storybook-host/.storybook/tutorial/Theming.mdx +0 -14
  20. package/projects/storybook-host/.storybook/typings.d.ts +0 -4
  21. package/projects/storybook-host/documentation.json +0 -605
  22. package/projects/storybook-host/public/favicon.ico +0 -0
  23. package/projects/storybook-host/src/app/app.config.ts +0 -8
  24. package/projects/storybook-host/src/app/app.css +0 -0
  25. package/projects/storybook-host/src/app/app.html +0 -343
  26. package/projects/storybook-host/src/app/app.ts +0 -11
  27. package/projects/storybook-host/src/index.html +0 -13
  28. package/projects/storybook-host/src/main.ts +0 -6
  29. package/projects/storybook-host/src/stories/assets/accessibility.png +0 -0
  30. package/projects/storybook-host/src/stories/assets/accessibility.svg +0 -1
  31. package/projects/storybook-host/src/stories/assets/addon-library.png +0 -0
  32. package/projects/storybook-host/src/stories/assets/assets.png +0 -0
  33. package/projects/storybook-host/src/stories/assets/avif-test-image.avif +0 -0
  34. package/projects/storybook-host/src/stories/assets/context.png +0 -0
  35. package/projects/storybook-host/src/stories/assets/discord.svg +0 -1
  36. package/projects/storybook-host/src/stories/assets/docs.png +0 -0
  37. package/projects/storybook-host/src/stories/assets/figma-plugin.png +0 -0
  38. package/projects/storybook-host/src/stories/assets/github.svg +0 -1
  39. package/projects/storybook-host/src/stories/assets/share.png +0 -0
  40. package/projects/storybook-host/src/stories/assets/styling.png +0 -0
  41. package/projects/storybook-host/src/stories/assets/testing.png +0 -0
  42. package/projects/storybook-host/src/stories/assets/theming.png +0 -0
  43. package/projects/storybook-host/src/stories/assets/tutorials.svg +0 -1
  44. package/projects/storybook-host/src/stories/assets/youtube.svg +0 -1
  45. package/projects/storybook-host/src/stories/button.component.ts +0 -50
  46. package/projects/storybook-host/src/stories/button.css +0 -30
  47. package/projects/storybook-host/src/stories/button.stories.ts +0 -49
  48. package/projects/storybook-host/src/stories/header.component.ts +0 -78
  49. package/projects/storybook-host/src/stories/header.css +0 -32
  50. package/projects/storybook-host/src/stories/header.stories.ts +0 -33
  51. package/projects/storybook-host/src/stories/page.component.ts +0 -84
  52. package/projects/storybook-host/src/stories/page.css +0 -68
  53. package/projects/storybook-host/src/stories/page.stories.ts +0 -32
  54. package/projects/storybook-host/src/stories/user.ts +0 -3
  55. package/projects/storybook-host/src/styles.css +0 -1
  56. package/projects/storybook-host/tsconfig.app.json +0 -15
  57. package/projects/storybook-host/tsconfig.spec.json +0 -15
  58. package/src/lib/components/byte-button/byte-button-group/byte-button-group.css +0 -27
  59. package/src/lib/components/byte-button/byte-button-group/byte-button-group.html +0 -6
  60. package/src/lib/components/byte-button/byte-button-group/byte-button-group.spec.ts +0 -22
  61. package/src/lib/components/byte-button/byte-button-group/byte-button-group.ts +0 -35
  62. package/src/lib/components/byte-button/byte-button.css +0 -0
  63. package/src/lib/components/byte-button/byte-button.directive.ts +0 -17
  64. package/src/lib/components/byte-button/byte-button.html +0 -29
  65. package/src/lib/components/byte-button/byte-button.module.ts +0 -19
  66. package/src/lib/components/byte-button/byte-button.stories.ts +0 -449
  67. package/src/lib/components/byte-button/byte-button.ts +0 -129
  68. package/src/lib/components/byte-dialog/byte-dialog.css +0 -0
  69. package/src/lib/components/byte-dialog/byte-dialog.directive.ts +0 -21
  70. package/src/lib/components/byte-dialog/byte-dialog.html +0 -47
  71. package/src/lib/components/byte-dialog/byte-dialog.module.ts +0 -21
  72. package/src/lib/components/byte-dialog/byte-dialog.spec.ts +0 -22
  73. package/src/lib/components/byte-dialog/byte-dialog.ts +0 -121
  74. package/src/lib/components/byte-dialog/byte.dialog.stories.ts +0 -215
  75. package/src/lib/components/byte-input/byte-input.css +0 -29
  76. package/src/lib/components/byte-input/byte-input.html +0 -58
  77. package/src/lib/components/byte-input/byte-input.spec.ts +0 -22
  78. package/src/lib/components/byte-input/byte-input.stories.ts +0 -60
  79. package/src/lib/components/byte-input/byte-input.ts +0 -97
  80. package/src/lib/components/byte-select/byte-select.css +0 -16
  81. package/src/lib/components/byte-select/byte-select.directive.ts +0 -61
  82. package/src/lib/components/byte-select/byte-select.html +0 -101
  83. package/src/lib/components/byte-select/byte-select.module.ts +0 -26
  84. package/src/lib/components/byte-select/byte-select.spec.ts +0 -22
  85. package/src/lib/components/byte-select/byte-select.stories.ts +0 -194
  86. package/src/lib/components/byte-select/byte-select.ts +0 -168
  87. package/src/lib/components/byte-select/index.ts +0 -3
  88. package/src/lib/components/byte-sidebar/byte-sidebar.css +0 -0
  89. package/src/lib/components/byte-sidebar/byte-sidebar.directive.ts +0 -11
  90. package/src/lib/components/byte-sidebar/byte-sidebar.html +0 -31
  91. package/src/lib/components/byte-sidebar/byte-sidebar.module.ts +0 -16
  92. package/src/lib/components/byte-sidebar/byte-sidebar.spec.ts +0 -22
  93. package/src/lib/components/byte-sidebar/byte-sidebar.stories.ts +0 -190
  94. package/src/lib/components/byte-sidebar/byte-sidebar.ts +0 -108
  95. package/src/lib/components/byte-table/byte-table.css +0 -0
  96. package/src/lib/components/byte-table/byte-table.directive.ts +0 -49
  97. package/src/lib/components/byte-table/byte-table.html +0 -102
  98. package/src/lib/components/byte-table/byte-table.module.ts +0 -33
  99. package/src/lib/components/byte-table/byte-table.spec.ts +0 -22
  100. package/src/lib/components/byte-table/byte-table.stories.ts +0 -296
  101. package/src/lib/components/byte-table/byte-table.ts +0 -162
  102. package/src/lib/components/calendar/calendar.css +0 -16
  103. package/src/lib/components/calendar/calendar.html +0 -15
  104. package/src/lib/components/calendar/calendar.spec.ts +0 -22
  105. package/src/lib/components/calendar/calendar.stories.ts +0 -153
  106. package/src/lib/components/calendar/calendar.ts +0 -89
  107. package/src/lib/components/select/select.css +0 -16
  108. package/src/lib/components/select/select.html +0 -14
  109. package/src/lib/components/select/select.spec.ts +0 -22
  110. package/src/lib/components/select/select.ts +0 -73
  111. package/src/lib/config/empresa-ui.token.ts +0 -5
  112. package/src/lib/providers/empresa-ui-config.ts +0 -8
  113. package/src/lib/providers/provide-empresa-ui.ts +0 -42
  114. package/src/lib/themes/CRM-Theme.ts +0 -34
  115. package/src/lib/themes/aura.ts +0 -3
  116. package/src/lib/themes/index.ts +0 -2
  117. package/src/lib/themes/registry.ts +0 -9
  118. package/src/lib/utils/inject-prime-icons.ts +0 -12
  119. package/src/public-api.ts +0 -30
  120. package/tsconfig.json +0 -45
  121. package/tsconfig.lib.json +0 -11
  122. package/tsconfig.lib.prod.json +0 -9
  123. package/tsconfig.spec.json +0 -8
@@ -1,89 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- forwardRef,
5
- Input
6
- } from '@angular/core';
7
-
8
- import {
9
- ControlValueAccessor,
10
- FormsModule,
11
- NG_VALUE_ACCESSOR
12
- } from '@angular/forms';
13
-
14
- import { DatePickerModule } from 'primeng/datepicker';
15
-
16
- @Component({
17
- selector: 'byte-calendar',
18
- standalone: true,
19
- imports: [
20
- FormsModule,
21
- DatePickerModule
22
- ],
23
- templateUrl: './calendar.html',
24
- styleUrl: './calendar.css',
25
- changeDetection: ChangeDetectionStrategy.OnPush,
26
-
27
- providers: [
28
- {
29
- provide: NG_VALUE_ACCESSOR,
30
- useExisting: forwardRef(() => Calendar),
31
- multi: true
32
- }
33
- ]
34
- })
35
- export class Calendar implements ControlValueAccessor {
36
-
37
- @Input() dateFormat = 'dd/mm/yy';
38
-
39
- @Input() placeholder = 'dd/mm/yyyy';
40
-
41
- @Input() showIcon = true;
42
-
43
- @Input() disabled = false;
44
-
45
- @Input() minDate?: Date;
46
-
47
- @Input() maxDate?: Date;
48
-
49
- @Input() readonlyInput = false;
50
-
51
- @Input() showClear = false;
52
-
53
- @Input() inputId = '';
54
-
55
- @Input() name = '';
56
-
57
- value: Date | null = null;
58
-
59
- private onChange: (value: Date | null) => void = () => {};
60
-
61
- private onTouched: () => void = () => {};
62
-
63
- writeValue(value: Date | null): void {
64
- this.value = value;
65
- }
66
-
67
- registerOnChange(
68
- fn: (value: Date | null) => void
69
- ): void {
70
- this.onChange = fn;
71
- }
72
-
73
- registerOnTouched(
74
- fn: () => void
75
- ): void {
76
- this.onTouched = fn;
77
- }
78
-
79
- setDisabledState(isDisabled: boolean): void {
80
- this.disabled = isDisabled;
81
- }
82
-
83
- onValueChange(value: Date | null): void {
84
- this.value = value;
85
-
86
- this.onChange(value);
87
- this.onTouched();
88
- }
89
- }
@@ -1,16 +0,0 @@
1
- :host {
2
- display: block;
3
- width: 100%;
4
- }
5
-
6
- :host ::ng-deep .p-inputtext,
7
- :host ::ng-deep .p-inputnumber,
8
- :host ::ng-deep .p-textarea,
9
- :host ::ng-deep .p-datepicker,
10
- :host ::ng-deep .p-select {
11
- width: 100%;
12
- }
13
-
14
- :host ::ng-deep .p-inputnumber-input {
15
- width: 100%;
16
- }
@@ -1,14 +0,0 @@
1
- <p-select
2
- [options]="options"
3
- [optionLabel]="optionLabel"
4
- [optionValue]="optionValue"
5
- [placeholder]="placeholder"
6
- [disabled]="disabled"
7
- [inputId]="inputId"
8
- [name]="name"
9
- [ngModel]="value"
10
-
11
- [filter]="filter" [filterBy]="filterBy"
12
-
13
- (ngModelChange)="onValueChange($event)"
14
- />
@@ -1,22 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { Select } from './select';
4
-
5
- describe('Select', () => {
6
- let component: Select;
7
- let fixture: ComponentFixture<Select>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [Select],
12
- }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(Select);
15
- component = fixture.componentInstance;
16
- await fixture.whenStable();
17
- });
18
-
19
- it('should create', () => {
20
- expect(component).toBeTruthy();
21
- });
22
- });
@@ -1,73 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- forwardRef,
5
- Input
6
- } from '@angular/core';
7
-
8
- import {
9
- ControlValueAccessor,
10
- FormsModule,
11
- NG_VALUE_ACCESSOR
12
- } from '@angular/forms';
13
-
14
- import { SelectModule } from 'primeng/select';
15
-
16
- @Component({
17
- selector: 'shared-select',
18
- imports: [
19
- FormsModule,
20
- SelectModule
21
- ],
22
- templateUrl: './select.html',
23
- styleUrl: './select.css',
24
- changeDetection: ChangeDetectionStrategy.OnPush,
25
-
26
- providers: [
27
- {
28
- provide: NG_VALUE_ACCESSOR,
29
- useExisting: forwardRef(() => Select),
30
- multi: true
31
- }
32
- ]
33
- })
34
- export class Select {
35
- @Input() options: any[] = [];
36
- @Input() optionLabel = '';
37
- @Input() optionValue = '';
38
- @Input() placeholder = 'Seleccione';
39
- @Input() disabled = false;
40
- @Input() inputId = '';
41
- @Input() name = '';
42
-
43
- // Nuevos inputs
44
- @Input() filter = false;
45
- @Input() filterBy = '';
46
-
47
- value: any = null;
48
-
49
- private onChange: (value: any) => void = () => {};
50
- private onTouched: () => void = () => {};
51
-
52
- writeValue(value: any): void {
53
- this.value = value;
54
- }
55
-
56
- registerOnChange(fn: (value: any) => void): void {
57
- this.onChange = fn;
58
- }
59
-
60
- registerOnTouched(fn: () => void): void {
61
- this.onTouched = fn;
62
- }
63
-
64
- setDisabledState(isDisabled: boolean): void {
65
- this.disabled = isDisabled;
66
- }
67
-
68
- onValueChange(value: any): void {
69
- this.value = value;
70
- this.onChange(value);
71
- this.onTouched();
72
- }
73
- }
@@ -1,5 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { EmpresaUIConfig } from '../providers/empresa-ui-config';
3
-
4
- export const EMPRESA_UI_CONFIG =
5
- new InjectionToken<EmpresaUIConfig>('EMPRESA_UI_CONFIG');
@@ -1,8 +0,0 @@
1
- export type EmpresaUITheme =
2
- 'aura'
3
- | 'crm';
4
-
5
-
6
- export interface EmpresaUIConfig {
7
- theme?: EmpresaUITheme;
8
- }
@@ -1,42 +0,0 @@
1
- import {
2
- makeEnvironmentProviders,
3
- provideEnvironmentInitializer
4
- } from '@angular/core';
5
-
6
- import { providePrimeNG } from 'primeng/config';
7
-
8
- import { EMPRESA_UI_CONFIG } from '../config/empresa-ui.token';
9
- import { EmpresaUIConfig } from './empresa-ui-config';
10
-
11
- import { EMPRESA_THEMES } from '../themes/registry';
12
- import { injectPrimeIconsStylesheet } from '../utils/inject-prime-icons';
13
-
14
-
15
- export function provideEmpresaUI(
16
- config: EmpresaUIConfig = {}
17
- ) {
18
- const theme =
19
- EMPRESA_THEMES[config.theme ?? 'crm'];
20
-
21
-
22
- return makeEnvironmentProviders([
23
-
24
- providePrimeNG({
25
- theme: {
26
- preset: theme,
27
- options: {
28
- darkModeSelector: false
29
- }
30
- }
31
- }),
32
-
33
- {
34
- provide: EMPRESA_UI_CONFIG,
35
- useValue: config
36
- },
37
-
38
- provideEnvironmentInitializer(() => injectPrimeIconsStylesheet()),
39
-
40
- ]);
41
-
42
- }
@@ -1,34 +0,0 @@
1
- import { definePreset } from '@primeuix/themes';
2
- import Aura from '@primeuix/themes/aura';
3
-
4
- export const CRMTheme = definePreset(Aura, {
5
- semantic: {
6
- primary: {
7
- 50: '#EEF4FF',
8
- 100: '#DCE8FF',
9
- 200: '#B9D1FF',
10
- 300: '#8FB4FF',
11
- 400: '#5F91F5',
12
- 500: '#2F6FE4',
13
- 600: '#1F58C4',
14
- 700: '#18489D',
15
- 800: '#123574',
16
- 900: '#0A2453',
17
- 950: '#00011F'
18
- }
19
-
20
- /* secondary: {
21
- 50: '#F8FAFC',
22
- 100: '#F1F5F9',
23
- 200: '#E2E8F0',
24
- 300: '#CBD5E1',
25
- 400: '#94A3B8',
26
- 500: '#64748B',
27
- 600: '#475569',
28
- 700: '#334155',
29
- 800: '#1E293B',
30
- 900: '#0F172A',
31
- 950: '#020617'
32
- } */
33
- }
34
- });
@@ -1,3 +0,0 @@
1
- import Aura from '@primeuix/themes/aura';
2
-
3
- export const AuraTheme = Aura;
@@ -1,2 +0,0 @@
1
- export * from './aura';
2
- export * from './CRM-Theme';
@@ -1,9 +0,0 @@
1
- import {
2
- AuraTheme,
3
- CRMTheme,
4
- } from './';
5
-
6
- export const EMPRESA_THEMES = {
7
- aura: AuraTheme,
8
- crm: CRMTheme,
9
- };
@@ -1,12 +0,0 @@
1
- const PRIME_ICONS_LINK_ID = 'empresa-ui-prime-icons';
2
- const PRIME_ICONS_VERSION = '7.0.0';
3
-
4
- export function injectPrimeIconsStylesheet(): void {
5
- if (document.getElementById(PRIME_ICONS_LINK_ID)) return;
6
-
7
- const link = document.createElement('link');
8
- link.id = PRIME_ICONS_LINK_ID;
9
- link.rel = 'stylesheet';
10
- link.href = `https://cdn.jsdelivr.net/npm/primeicons@${PRIME_ICONS_VERSION}/primeicons.css`;
11
- document.head.appendChild(link);
12
- }
package/src/public-api.ts DELETED
@@ -1,30 +0,0 @@
1
- /*
2
- * Public API Surface of shared-ui
3
- */
4
-
5
- //export * from './lib/shared-ui';
6
- export * from './lib/providers/provide-empresa-ui';
7
- export * from './lib/providers/empresa-ui-config';
8
-
9
- //COMPONENTES
10
- export * from './lib/components/calendar/calendar';
11
- export * from './lib/components/byte-select';
12
- export * from './lib/components/byte-input/byte-input';
13
-
14
-
15
- export * from './lib/components/byte-button/byte-button';
16
- export * from './lib/components/byte-button/byte-button-group/byte-button-group';
17
- export * from './lib/components/byte-button/byte-button.directive';
18
- export * from './lib/components/byte-button/byte-button.module';
19
-
20
- export * from './lib/components/byte-table/byte-table';
21
- export * from './lib/components/byte-table/byte-table.directive';
22
- export * from './lib/components/byte-table/byte-table.module';
23
-
24
- export * from './lib/components/byte-sidebar/byte-sidebar';
25
- export * from './lib/components/byte-sidebar/byte-sidebar.directive';
26
- export * from './lib/components/byte-sidebar/byte-sidebar.module';
27
-
28
- export * from './lib/components/byte-dialog/byte-dialog';
29
- export * from './lib/components/byte-dialog/byte-dialog.directive';
30
- export * from './lib/components/byte-dialog/byte-dialog.module';
package/tsconfig.json DELETED
@@ -1,45 +0,0 @@
1
- /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
- /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
- {
4
- "compileOnSave": false,
5
- "compilerOptions": {
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true,
11
- "skipLibCheck": true,
12
- "isolatedModules": true,
13
- "experimentalDecorators": true,
14
- "paths": {
15
- "shared-ui": ["./dist/shared-ui"]
16
- },
17
- "importHelpers": true,
18
- "target": "ES2022",
19
- "module": "preserve"
20
- },
21
- "angularCompilerOptions": {
22
- "enableI18nLegacyMessageIdFormat": false,
23
- "strictInjectionParameters": true,
24
- "strictInputAccessModifiers": true,
25
- "strictTemplates": true
26
- },
27
- "files": [],
28
- "references": [
29
- {
30
- "path": "./projects/shared-ui/tsconfig.lib.json"
31
- },
32
- {
33
- "path": "./projects/shared-ui/tsconfig.spec.json"
34
- },
35
- {
36
- "path": "./projects/demo/tsconfig.app.json"
37
- },
38
- {
39
- "path": "./projects/demo/tsconfig.spec.json"
40
- },
41
- {
42
- "path": "./projects/storybook-host/tsconfig.app.json"
43
- }
44
- ]
45
- }
package/tsconfig.lib.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./out-tsc/lib",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "types": []
8
- },
9
- "include": ["src/**/*.ts"],
10
- "exclude": ["**/*.spec.ts"]
11
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib.json",
3
- "compilerOptions": {
4
- "declarationMap": false
5
- },
6
- "angularCompilerOptions": {
7
- "compilationMode": "partial"
8
- }
9
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./out-tsc/spec",
5
- "types": ["vitest/globals"]
6
- },
7
- "include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
8
- }