@timestampgroup/timestamp-labs-ui-library 0.0.40
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.
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# UiLibrary
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build ui-library
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/ui-library
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, EventEmitter, Output, Input, forwardRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
+
|
|
8
|
+
class UiLibrary {
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UiLibrary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: UiLibrary, isStandalone: true, selector: "lib-ui-library", ngImport: i0, template: `
|
|
11
|
+
<p>
|
|
12
|
+
ui-library works!
|
|
13
|
+
</p>
|
|
14
|
+
`, isInline: true, styles: [""] });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UiLibrary, decorators: [{
|
|
17
|
+
type: Component,
|
|
18
|
+
args: [{ selector: 'lib-ui-library', imports: [], template: `
|
|
19
|
+
<p>
|
|
20
|
+
ui-library works!
|
|
21
|
+
</p>
|
|
22
|
+
` }]
|
|
23
|
+
}] });
|
|
24
|
+
|
|
25
|
+
class Button {
|
|
26
|
+
label = 'Click me!';
|
|
27
|
+
type = 'primary';
|
|
28
|
+
icon = '';
|
|
29
|
+
iconPos = 'left';
|
|
30
|
+
disabled = false;
|
|
31
|
+
clickEvent = new EventEmitter();
|
|
32
|
+
onClick() {
|
|
33
|
+
if (!this.disabled) {
|
|
34
|
+
this.clickEvent.emit();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Button, isStandalone: true, selector: "core-button", inputs: { label: "label", type: "type", icon: "icon", iconPos: "iconPos", disabled: "disabled" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<button\r\n [disabled]=\"disabled\"\r\n (click)=\"onClick()\"\r\n class=\"core-button {{ type }}\"\r\n [ngClass]=\"{ 'width-40px': !label && icon }\"\r\n>\r\n <div class=\"flex gap-2 align-items-center justify-content-center\">\r\n @if (icon) {\r\n <i class=\"pi {{ icon }} flex-order-{{ iconPos === 'right' ? 1 : 0 }}\"></i>\r\n } @if (label) {\r\n <span>{{ label }}</span>\r\n }\r\n </div>\r\n</button>\r\n", styles: [".core-button{padding:10px 16px;height:40px;min-width:140px;border:1px solid var(--button-bg, #ef7719);border-radius:0;background-color:var(--button-bg, #ef7719);color:var(--button-font-color, white);font-size:var(--button-font-size, 16px);cursor:pointer}.core-button:hover{border:1px solid var(--button-bg, #c66316);background-color:var(--button-bg-hover, #c66316)}.core-button.secondary{background-color:transparent;border:1px solid var(--button-bg, #ef7719);color:var(--button-bg, #ef7719)}.core-button.secondary:hover{background-color:var(--secondary-button-bg-hover, #fbd7ba)}.core-button.tertiary{background-color:transparent;border:1px solid transparent;color:var(--button-bg, #ef7719)}.core-button.tertiary:hover{background-color:var(--secondary-button-bg-hover, #fbd7ba)}.core-button.destructive{background-color:var(--destructive-button-bg, #cf3232);border:1px solid var(--destructive-button-bg, #cf3232)}.core-button.destructive:hover{background-color:var(--destructive-button-bg-hover, #a72727)}.core-button.subheader{background-color:#000;color:#fff;border:none;position:relative;padding:0 16px;font-size:16px;font-weight:700;height:55px}.core-button.subheader span{white-space:nowrap}.core-button.subheader:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:9px;background-color:transparent}.core-button.subheader:hover:after,.core-button.subheader:enabled:active:after{animation:color_change .4s forwards}.core-button.subheader-active{background-color:#000;color:#fff;border:none;position:relative;padding:0 16px;font-size:16px;font-weight:700;height:55px}.core-button.subheader-active span{white-space:nowrap}.core-button.subheader-active:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:9px;background-color:#ef7719}.core-button.subheader-active:hover:after,.core-button.subheader-active:enabled:active:after{background-color:#ef7719}.core-button:disabled{background-color:var(--button-bg-disabled, #f6ba8b);border:1px solid var(--button-bg-disabled, #f6ba8b);cursor:not-allowed}.core-button:disabled.secondary{background-color:transparent;border:1px solid var(--button-bg-disabled, #f6ba8b);color:var(--button-bg-disabled, #f6ba8b)}.core-button:disabled.tertiary{background-color:transparent;border:1px solid transparent;color:var(--button-bg-disabled, #f6ba8b)}.core-button:disabled.destructive{background-color:var(--destructive-button-bg-disabled, #de7070);border:1px solid var(--destructive-button-bg-disabled, #de7070)}.width-40px{width:40px}@keyframes color_change{to{background-color:#ef7719}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Button, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'core-button', imports: [CommonModule], standalone: true, template: "<button\r\n [disabled]=\"disabled\"\r\n (click)=\"onClick()\"\r\n class=\"core-button {{ type }}\"\r\n [ngClass]=\"{ 'width-40px': !label && icon }\"\r\n>\r\n <div class=\"flex gap-2 align-items-center justify-content-center\">\r\n @if (icon) {\r\n <i class=\"pi {{ icon }} flex-order-{{ iconPos === 'right' ? 1 : 0 }}\"></i>\r\n } @if (label) {\r\n <span>{{ label }}</span>\r\n }\r\n </div>\r\n</button>\r\n", styles: [".core-button{padding:10px 16px;height:40px;min-width:140px;border:1px solid var(--button-bg, #ef7719);border-radius:0;background-color:var(--button-bg, #ef7719);color:var(--button-font-color, white);font-size:var(--button-font-size, 16px);cursor:pointer}.core-button:hover{border:1px solid var(--button-bg, #c66316);background-color:var(--button-bg-hover, #c66316)}.core-button.secondary{background-color:transparent;border:1px solid var(--button-bg, #ef7719);color:var(--button-bg, #ef7719)}.core-button.secondary:hover{background-color:var(--secondary-button-bg-hover, #fbd7ba)}.core-button.tertiary{background-color:transparent;border:1px solid transparent;color:var(--button-bg, #ef7719)}.core-button.tertiary:hover{background-color:var(--secondary-button-bg-hover, #fbd7ba)}.core-button.destructive{background-color:var(--destructive-button-bg, #cf3232);border:1px solid var(--destructive-button-bg, #cf3232)}.core-button.destructive:hover{background-color:var(--destructive-button-bg-hover, #a72727)}.core-button.subheader{background-color:#000;color:#fff;border:none;position:relative;padding:0 16px;font-size:16px;font-weight:700;height:55px}.core-button.subheader span{white-space:nowrap}.core-button.subheader:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:9px;background-color:transparent}.core-button.subheader:hover:after,.core-button.subheader:enabled:active:after{animation:color_change .4s forwards}.core-button.subheader-active{background-color:#000;color:#fff;border:none;position:relative;padding:0 16px;font-size:16px;font-weight:700;height:55px}.core-button.subheader-active span{white-space:nowrap}.core-button.subheader-active:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:9px;background-color:#ef7719}.core-button.subheader-active:hover:after,.core-button.subheader-active:enabled:active:after{background-color:#ef7719}.core-button:disabled{background-color:var(--button-bg-disabled, #f6ba8b);border:1px solid var(--button-bg-disabled, #f6ba8b);cursor:not-allowed}.core-button:disabled.secondary{background-color:transparent;border:1px solid var(--button-bg-disabled, #f6ba8b);color:var(--button-bg-disabled, #f6ba8b)}.core-button:disabled.tertiary{background-color:transparent;border:1px solid transparent;color:var(--button-bg-disabled, #f6ba8b)}.core-button:disabled.destructive{background-color:var(--destructive-button-bg-disabled, #de7070);border:1px solid var(--destructive-button-bg-disabled, #de7070)}.width-40px{width:40px}@keyframes color_change{to{background-color:#ef7719}}\n"] }]
|
|
43
|
+
}], propDecorators: { label: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}], type: [{
|
|
46
|
+
type: Input
|
|
47
|
+
}], icon: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], iconPos: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], disabled: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], clickEvent: [{
|
|
54
|
+
type: Output
|
|
55
|
+
}] } });
|
|
56
|
+
|
|
57
|
+
class InputText {
|
|
58
|
+
label = '';
|
|
59
|
+
placeholder = '';
|
|
60
|
+
type = 'default';
|
|
61
|
+
inputType = 'text';
|
|
62
|
+
value = '';
|
|
63
|
+
isPasswordVisible = false;
|
|
64
|
+
handleInput(event) {
|
|
65
|
+
const input = event.target;
|
|
66
|
+
this.value = input.value;
|
|
67
|
+
this.onChange(this.value);
|
|
68
|
+
}
|
|
69
|
+
onChange = () => { };
|
|
70
|
+
onTouched = () => { };
|
|
71
|
+
writeValue(value) {
|
|
72
|
+
this.value = value;
|
|
73
|
+
}
|
|
74
|
+
registerOnChange(fn) {
|
|
75
|
+
this.onChange = fn;
|
|
76
|
+
}
|
|
77
|
+
registerOnTouched(fn) {
|
|
78
|
+
this.onTouched = fn;
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputText, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: InputText, isStandalone: true, selector: "core-input-text", inputs: { label: "label", placeholder: "placeholder", type: "type", inputType: "inputType", value: "value" }, providers: [
|
|
82
|
+
{
|
|
83
|
+
provide: NG_VALUE_ACCESSOR,
|
|
84
|
+
useExisting: forwardRef(() => InputText),
|
|
85
|
+
multi: true,
|
|
86
|
+
},
|
|
87
|
+
], ngImport: i0, template: "<div class=\"core-input-text-container\">\r\n <label class=\"core-input-text-label {{ type }}\">{{ label }}</label>\r\n <input\r\n [type]=\"isPasswordVisible ? 'text' : inputType\"\r\n class=\"core-input-text-field {{ type }}\"\r\n placeholder=\"{{ placeholder }}\"\r\n [ngModel]=\"value\"\r\n [readOnly]=\"type === 'read-only'\"\r\n [disabled]=\"type === 'disabled'\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"onTouched()\"\r\n />\r\n @if(inputType === 'password'){\r\n <button type=\"button\" class=\"toggle-password\" (click)=\"isPasswordVisible = !isPasswordVisible\">\r\n <i class=\"pi\" [ngClass]=\"isPasswordVisible ? 'pi-eye-slash' : 'pi-eye'\"></i>\r\n </button>\r\n }\r\n</div>\r\n", styles: [".core-input-text-container{flex-direction:column;width:100%;display:flex;position:relative}.core-input-text-container .core-input-text-label{color:#000;position:absolute;top:-.7rem;margin:0 0 0 10px;padding:0 3px;background:var(--input-text-bg, #ffffff);width:fit-content}.core-input-text-container .core-input-text-label.disabled{color:#b3b3b3}.core-input-text-container .core-input-text-field{padding:11px 10px;border:1px solid var(--input-text-border-color, #000);border-radius:0;background:transparent}.core-input-text-container .core-input-text-field.error{border:1px solid #cf3232;color:#cf3232}.core-input-text-container .core-input-text-field.read-only{border:1px solid #666666;color:#666}.core-input-text-container .core-input-text-field.disabled{border:1px solid #b3b3b3;color:#b3b3b3}.core-input-text-container .core-input-text-field::placeholder{font-style:italic}.core-input-text-container .core-input-text-field:focus{outline:none;border:1px solid #0d82bd}.core-input-text-container .toggle-password{position:absolute;display:flex;right:1rem;top:50%;transform:translateY(-50%);background:var(--input-text-bg, transparent);border:none;cursor:pointer;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputText, decorators: [{
|
|
90
|
+
type: Component,
|
|
91
|
+
args: [{ selector: 'core-input-text', imports: [CommonModule, FormsModule], providers: [
|
|
92
|
+
{
|
|
93
|
+
provide: NG_VALUE_ACCESSOR,
|
|
94
|
+
useExisting: forwardRef(() => InputText),
|
|
95
|
+
multi: true,
|
|
96
|
+
},
|
|
97
|
+
], template: "<div class=\"core-input-text-container\">\r\n <label class=\"core-input-text-label {{ type }}\">{{ label }}</label>\r\n <input\r\n [type]=\"isPasswordVisible ? 'text' : inputType\"\r\n class=\"core-input-text-field {{ type }}\"\r\n placeholder=\"{{ placeholder }}\"\r\n [ngModel]=\"value\"\r\n [readOnly]=\"type === 'read-only'\"\r\n [disabled]=\"type === 'disabled'\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"onTouched()\"\r\n />\r\n @if(inputType === 'password'){\r\n <button type=\"button\" class=\"toggle-password\" (click)=\"isPasswordVisible = !isPasswordVisible\">\r\n <i class=\"pi\" [ngClass]=\"isPasswordVisible ? 'pi-eye-slash' : 'pi-eye'\"></i>\r\n </button>\r\n }\r\n</div>\r\n", styles: [".core-input-text-container{flex-direction:column;width:100%;display:flex;position:relative}.core-input-text-container .core-input-text-label{color:#000;position:absolute;top:-.7rem;margin:0 0 0 10px;padding:0 3px;background:var(--input-text-bg, #ffffff);width:fit-content}.core-input-text-container .core-input-text-label.disabled{color:#b3b3b3}.core-input-text-container .core-input-text-field{padding:11px 10px;border:1px solid var(--input-text-border-color, #000);border-radius:0;background:transparent}.core-input-text-container .core-input-text-field.error{border:1px solid #cf3232;color:#cf3232}.core-input-text-container .core-input-text-field.read-only{border:1px solid #666666;color:#666}.core-input-text-container .core-input-text-field.disabled{border:1px solid #b3b3b3;color:#b3b3b3}.core-input-text-container .core-input-text-field::placeholder{font-style:italic}.core-input-text-container .core-input-text-field:focus{outline:none;border:1px solid #0d82bd}.core-input-text-container .toggle-password{position:absolute;display:flex;right:1rem;top:50%;transform:translateY(-50%);background:var(--input-text-bg, transparent);border:none;cursor:pointer;padding:0}\n"] }]
|
|
98
|
+
}], propDecorators: { label: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], placeholder: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], type: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], inputType: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], value: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}] } });
|
|
109
|
+
|
|
110
|
+
class ToggleSwitch {
|
|
111
|
+
label = 'Toggle me!';
|
|
112
|
+
disabled = false;
|
|
113
|
+
checked = false;
|
|
114
|
+
onChange = () => { };
|
|
115
|
+
onTouched = () => { };
|
|
116
|
+
writeValue(value) {
|
|
117
|
+
this.checked = value;
|
|
118
|
+
}
|
|
119
|
+
registerOnChange(fn) {
|
|
120
|
+
this.onChange = fn;
|
|
121
|
+
}
|
|
122
|
+
registerOnTouched(fn) {
|
|
123
|
+
this.onTouched = fn;
|
|
124
|
+
}
|
|
125
|
+
setDisabledState(isDisabled) {
|
|
126
|
+
this.disabled = isDisabled;
|
|
127
|
+
}
|
|
128
|
+
toggle() {
|
|
129
|
+
if (this.disabled)
|
|
130
|
+
return;
|
|
131
|
+
this.checked = !this.checked;
|
|
132
|
+
this.onChange(this.checked);
|
|
133
|
+
this.onTouched();
|
|
134
|
+
}
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ToggleSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ToggleSwitch, isStandalone: true, selector: "core-toggle-switch", inputs: { label: "label", disabled: "disabled", checked: "checked" }, providers: [
|
|
137
|
+
{
|
|
138
|
+
provide: NG_VALUE_ACCESSOR,
|
|
139
|
+
useExisting: forwardRef(() => ToggleSwitch),
|
|
140
|
+
multi: true,
|
|
141
|
+
},
|
|
142
|
+
], ngImport: i0, template: "<div class=\"flex gap-2 align-items-center\" [ngClass]=\"{ disabled: disabled }\">\r\n <div class=\"core-toggle-container\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"core-toggle\"\r\n id=\"checkbox\"\r\n [(ngModel)]=\"checked\"\r\n (click)=\"toggle()\"\r\n />\r\n <label class=\"switch\" for=\"checkbox\">\r\n <span class=\"slider\"></span>\r\n </label>\r\n </div>\r\n @if (label) {\r\n <span [ngClass]=\"{ 'checked-label': checked }\">{{ label }}</span>\r\n }\r\n</div>\r\n", styles: [".core-toggle-container{width:28px;height:16px;position:relative}.core-toggle-container .core-toggle{opacity:0;width:0;height:0;position:absolute}.core-toggle-container .switch{width:100%;height:100%;display:block;background-color:#666;border-radius:16px;cursor:pointer;transition:all .2s ease-out}.core-toggle-container .slider{width:12px;height:12px;position:absolute;left:calc(50% - 12px);top:calc(50% - 6px);border-radius:50%;background:#fff;box-shadow:0 3px 8px #00000026,0 3px 1px #0000000f;transition:all .2s ease-out;cursor:pointer}.core-toggle-container .core-toggle:checked+.switch{background-color:#ef7719}.core-toggle-container .core-toggle:checked+.switch .slider{left:calc(50% + 0px);top:calc(50% - 6px)}.disabled{color:#b3b3b3;pointer-events:none}.disabled .core-toggle-container .switch{background-color:#b3b3b3}.disabled .core-toggle-container .core-toggle:checked+.switch{background-color:#b3b3b3}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
143
|
+
}
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ToggleSwitch, decorators: [{
|
|
145
|
+
type: Component,
|
|
146
|
+
args: [{ selector: 'core-toggle-switch', imports: [CommonModule, FormsModule], providers: [
|
|
147
|
+
{
|
|
148
|
+
provide: NG_VALUE_ACCESSOR,
|
|
149
|
+
useExisting: forwardRef(() => ToggleSwitch),
|
|
150
|
+
multi: true,
|
|
151
|
+
},
|
|
152
|
+
], template: "<div class=\"flex gap-2 align-items-center\" [ngClass]=\"{ disabled: disabled }\">\r\n <div class=\"core-toggle-container\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"core-toggle\"\r\n id=\"checkbox\"\r\n [(ngModel)]=\"checked\"\r\n (click)=\"toggle()\"\r\n />\r\n <label class=\"switch\" for=\"checkbox\">\r\n <span class=\"slider\"></span>\r\n </label>\r\n </div>\r\n @if (label) {\r\n <span [ngClass]=\"{ 'checked-label': checked }\">{{ label }}</span>\r\n }\r\n</div>\r\n", styles: [".core-toggle-container{width:28px;height:16px;position:relative}.core-toggle-container .core-toggle{opacity:0;width:0;height:0;position:absolute}.core-toggle-container .switch{width:100%;height:100%;display:block;background-color:#666;border-radius:16px;cursor:pointer;transition:all .2s ease-out}.core-toggle-container .slider{width:12px;height:12px;position:absolute;left:calc(50% - 12px);top:calc(50% - 6px);border-radius:50%;background:#fff;box-shadow:0 3px 8px #00000026,0 3px 1px #0000000f;transition:all .2s ease-out;cursor:pointer}.core-toggle-container .core-toggle:checked+.switch{background-color:#ef7719}.core-toggle-container .core-toggle:checked+.switch .slider{left:calc(50% + 0px);top:calc(50% - 6px)}.disabled{color:#b3b3b3;pointer-events:none}.disabled .core-toggle-container .switch{background-color:#b3b3b3}.disabled .core-toggle-container .core-toggle:checked+.switch{background-color:#b3b3b3}\n"] }]
|
|
153
|
+
}], propDecorators: { label: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}], disabled: [{
|
|
156
|
+
type: Input
|
|
157
|
+
}], checked: [{
|
|
158
|
+
type: Input
|
|
159
|
+
}] } });
|
|
160
|
+
|
|
161
|
+
/*
|
|
162
|
+
* Public API Surface of ui-library
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Generated bundle index. Do not edit.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
export { Button, InputText, ToggleSwitch, UiLibrary };
|
|
170
|
+
//# sourceMappingURL=timestampgroup-timestamp-labs-ui-library.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestampgroup-timestamp-labs-ui-library.mjs","sources":["../../../projects/ui-library/src/lib/ui-library.ts","../../../projects/ui-library/src/lib/core/components/button/button.ts","../../../projects/ui-library/src/lib/core/components/button/button.html","../../../projects/ui-library/src/lib/core/components/input-text/input-text.ts","../../../projects/ui-library/src/lib/core/components/input-text/input-text.html","../../../projects/ui-library/src/lib/core/components/toggle-switch/toggle-switch.ts","../../../projects/ui-library/src/lib/core/components/toggle-switch/toggle-switch.html","../../../projects/ui-library/src/public-api.ts","../../../projects/ui-library/src/timestampgroup-timestamp-labs-ui-library.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-ui-library',\r\n imports: [],\r\n template: `\r\n <p>\r\n ui-library works!\r\n </p>\r\n `,\r\n styles: ``,\r\n})\r\nexport class UiLibrary {\r\n\r\n}\r\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'core-button',\r\n imports: [CommonModule],\r\n standalone: true,\r\n templateUrl: './button.html',\r\n styleUrl: './button.scss',\r\n})\r\nexport class Button {\r\n @Input() label: string = 'Click me!';\r\n @Input() type:\r\n | 'primary'\r\n | 'secondary'\r\n | 'tertiary'\r\n | 'destructive'\r\n | 'subheader'\r\n | 'subheader-active' = 'primary';\r\n @Input() icon: string = '';\r\n @Input() iconPos: 'right' | 'left' | '' = 'left';\r\n @Input() disabled: boolean = false;\r\n @Output() clickEvent = new EventEmitter<void>();\r\n\r\n onClick() {\r\n if (!this.disabled) {\r\n this.clickEvent.emit();\r\n }\r\n }\r\n}\r\n","<button\r\n [disabled]=\"disabled\"\r\n (click)=\"onClick()\"\r\n class=\"core-button {{ type }}\"\r\n [ngClass]=\"{ 'width-40px': !label && icon }\"\r\n>\r\n <div class=\"flex gap-2 align-items-center justify-content-center\">\r\n @if (icon) {\r\n <i class=\"pi {{ icon }} flex-order-{{ iconPos === 'right' ? 1 : 0 }}\"></i>\r\n } @if (label) {\r\n <span>{{ label }}</span>\r\n }\r\n </div>\r\n</button>\r\n","import { CommonModule } from '@angular/common';\nimport { Component, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'core-input-text',\n imports: [CommonModule, FormsModule],\n templateUrl: './input-text.html',\n styleUrl: './input-text.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputText),\n multi: true,\n },\n ],\n})\nexport class InputText implements ControlValueAccessor {\n @Input() label: string = '';\n @Input() placeholder: string = '';\n @Input() type: 'default' | 'error' | 'read-only' | 'disabled' = 'default';\n @Input() inputType: 'text' | 'password' = 'text';\n @Input() value: string = '';\n\n isPasswordVisible: boolean = false;\n\n handleInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n\n this.onChange(this.value);\n }\n\n private onChange: (value: string) => void = () => {};\n onTouched = () => {};\n\n writeValue(value: any): void {\n this.value = value;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n}\n","<div class=\"core-input-text-container\">\r\n <label class=\"core-input-text-label {{ type }}\">{{ label }}</label>\r\n <input\r\n [type]=\"isPasswordVisible ? 'text' : inputType\"\r\n class=\"core-input-text-field {{ type }}\"\r\n placeholder=\"{{ placeholder }}\"\r\n [ngModel]=\"value\"\r\n [readOnly]=\"type === 'read-only'\"\r\n [disabled]=\"type === 'disabled'\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"onTouched()\"\r\n />\r\n @if(inputType === 'password'){\r\n <button type=\"button\" class=\"toggle-password\" (click)=\"isPasswordVisible = !isPasswordVisible\">\r\n <i class=\"pi\" [ngClass]=\"isPasswordVisible ? 'pi-eye-slash' : 'pi-eye'\"></i>\r\n </button>\r\n }\r\n</div>\r\n","import { CommonModule } from '@angular/common';\nimport { Component, forwardRef, Input } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'core-toggle-switch',\n imports: [CommonModule, FormsModule],\n templateUrl: './toggle-switch.html',\n styleUrl: './toggle-switch.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleSwitch),\n multi: true,\n },\n ],\n})\nexport class ToggleSwitch {\n @Input() label: string = 'Toggle me!';\n @Input() disabled: boolean = false;\n @Input() checked: boolean = false;\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n writeValue(value: boolean): void {\n this.checked = value;\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n toggle() {\n if (this.disabled) return;\n this.checked = !this.checked;\n this.onChange(this.checked);\n this.onTouched();\n }\n}\n","<div class=\"flex gap-2 align-items-center\" [ngClass]=\"{ disabled: disabled }\">\r\n <div class=\"core-toggle-container\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"core-toggle\"\r\n id=\"checkbox\"\r\n [(ngModel)]=\"checked\"\r\n (click)=\"toggle()\"\r\n />\r\n <label class=\"switch\" for=\"checkbox\">\r\n <span class=\"slider\"></span>\r\n </label>\r\n </div>\r\n @if (label) {\r\n <span [ngClass]=\"{ 'checked-label': checked }\">{{ label }}</span>\r\n }\r\n</div>\r\n","/*\r\n * Public API Surface of ui-library\r\n */\r\n\r\nexport * from './lib/ui-library';\r\nexport * from './lib/core/components/button/button';\r\nexport * from './lib/core/components/input-text/input-text';\r\nexport * from './lib/core/components/toggle-switch/toggle-switch';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAYa,SAAS,CAAA;uGAAT,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPV,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,SAAS,EAAA,UAAA,EAAA,CAAA;kBAVrB,SAAS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rB,CAAC,YAAY,EAAE,WAAW,CAAC,EAAA,SAAA,EAGzB;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC;AAC3C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,ihBAAA,EAAA,MAAA,EAAA,CAAA,s5BAAA,CAAA,EAAA;;sBAGA;;sBACA;;sBACA;;;AEpBH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@timestampgroup/timestamp-labs-ui-library",
|
|
3
|
+
"version": "0.0.40",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"@angular/core": "^21.0.6",
|
|
9
|
+
"@angular/common": "^21.0.6",
|
|
10
|
+
"@angular/forms": "^21.0.6",
|
|
11
|
+
"@angular/router": "^21.0.6",
|
|
12
|
+
"primeng": "^21.0.2",
|
|
13
|
+
"primeicons": "^7.0.0",
|
|
14
|
+
"primeflex": "^4.0.0",
|
|
15
|
+
"rxjs": "~7.8.0",
|
|
16
|
+
"chart.js": "^4.5.1"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"tslib": "^2.3.0"
|
|
20
|
+
},
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"module": "fesm2022/timestampgroup-timestamp-labs-ui-library.mjs",
|
|
23
|
+
"typings": "types/timestampgroup-timestamp-labs-ui-library.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
"./package.json": {
|
|
26
|
+
"default": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./types/timestampgroup-timestamp-labs-ui-library.d.ts",
|
|
30
|
+
"default": "./fesm2022/timestampgroup-timestamp-labs-ui-library.mjs"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
declare class UiLibrary {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiLibrary, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiLibrary, "lib-ui-library", never, {}, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class Button {
|
|
11
|
+
label: string;
|
|
12
|
+
type: 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'subheader' | 'subheader-active';
|
|
13
|
+
icon: string;
|
|
14
|
+
iconPos: 'right' | 'left' | '';
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
clickEvent: EventEmitter<void>;
|
|
17
|
+
onClick(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Button, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Button, "core-button", never, { "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconPos": { "alias": "iconPos"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, true, never>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class InputText implements ControlValueAccessor {
|
|
23
|
+
label: string;
|
|
24
|
+
placeholder: string;
|
|
25
|
+
type: 'default' | 'error' | 'read-only' | 'disabled';
|
|
26
|
+
inputType: 'text' | 'password';
|
|
27
|
+
value: string;
|
|
28
|
+
isPasswordVisible: boolean;
|
|
29
|
+
handleInput(event: Event): void;
|
|
30
|
+
private onChange;
|
|
31
|
+
onTouched: () => void;
|
|
32
|
+
writeValue(value: any): void;
|
|
33
|
+
registerOnChange(fn: any): void;
|
|
34
|
+
registerOnTouched(fn: any): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputText, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputText, "core-input-text", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "inputType": { "alias": "inputType"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class ToggleSwitch {
|
|
40
|
+
label: string;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
checked: boolean;
|
|
43
|
+
private onChange;
|
|
44
|
+
private onTouched;
|
|
45
|
+
writeValue(value: boolean): void;
|
|
46
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
47
|
+
registerOnTouched(fn: () => void): void;
|
|
48
|
+
setDisabledState(isDisabled: boolean): void;
|
|
49
|
+
toggle(): void;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleSwitch, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleSwitch, "core-toggle-switch", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; }, {}, never, never, true, never>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { Button, InputText, ToggleSwitch, UiLibrary };
|