@cuby-ui/core 0.0.3 → 0.0.4
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/components/button/button.module.d.ts +1 -1
- package/components/button/button.options.d.ts +1 -1
- package/components/index.d.ts +2 -2
- package/esm2020/components/button/button.module.mjs +2 -2
- package/esm2020/components/button/button.options.mjs +1 -1
- package/esm2020/components/index.mjs +3 -3
- package/esm2020/cuby-ui-core.mjs +5 -0
- package/esm2020/index.mjs +3 -3
- package/fesm2015/cuby-ui-core.mjs +201 -0
- package/fesm2015/cuby-ui-core.mjs.map +1 -0
- package/fesm2020/cuby-ui-core.mjs +199 -0
- package/fesm2020/cuby-ui-core.mjs.map +1 -0
- package/index.d.ts +2 -2
- package/package.json +13 -13
- package/esm2020/cui-core.mjs +0 -5
- package/esm2020/f-core.mjs +0 -5
- package/fesm2015/cui-core.mjs +0 -7
- package/fesm2015/cui-core.mjs.map +0 -1
- package/fesm2015/f-core.mjs +0 -7
- package/fesm2015/f-core.mjs.map +0 -1
- package/fesm2020/cui-core.mjs +0 -7
- package/fesm2020/cui-core.mjs.map +0 -1
- package/fesm2020/f-core.mjs +0 -7
- package/fesm2020/f-core.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./button.component";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "
|
|
4
|
+
import * as i3 from "../svg/svg.module";
|
|
5
5
|
export declare class CuiButtonModule {
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiButtonModule, never>;
|
|
7
7
|
static ɵmod: i0.ɵɵNgModuleDeclaration<CuiButtonModule, [typeof i1.CuiButtonComponent], [typeof i2.CommonModule, typeof i3.CuiSvgModule], [typeof i1.CuiButtonComponent]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { CuiAppearanceDestructive, CuiAppearanceGhost, CuiAppearanceLink, CuiAppearanceOutlined, CuiAppearanceOutlinedGray, CuiAppearancePrimary, CuiAppearanceSecondary, CuiSizeMd, CuiSizeSm, CuiSizeXs, CuiSizeXxs } from '
|
|
2
|
+
import { CuiAppearanceDestructive, CuiAppearanceGhost, CuiAppearanceLink, CuiAppearanceOutlined, CuiAppearanceOutlinedGray, CuiAppearancePrimary, CuiAppearanceSecondary, CuiSizeMd, CuiSizeSm, CuiSizeXs, CuiSizeXxs } from '../../types';
|
|
3
3
|
export interface CuiButtonOptions {
|
|
4
4
|
readonly appearance: CuiAppearancePrimary | CuiAppearanceSecondary | CuiAppearanceOutlined | CuiAppearanceOutlinedGray | CuiAppearanceGhost | CuiAppearanceDestructive | CuiAppearanceLink;
|
|
5
5
|
readonly size: CuiSizeXxs | CuiSizeXs | CuiSizeSm | CuiSizeMd;
|
package/components/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './svg';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { CuiSvgModule } from '
|
|
3
|
+
import { CuiSvgModule } from '../svg';
|
|
4
4
|
import { CuiButtonComponent } from './button.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class CuiButtonModule {
|
|
@@ -21,4 +21,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
21
21
|
exports: [CuiButtonComponent]
|
|
22
22
|
}]
|
|
23
23
|
}] });
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLC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0czogW1xyXG4gICAgQ29tbW9uTW9kdWxlLFxyXG4gICAgQ3VpU3ZnTW9kdWxlXHJcbiAgXSxcclxuICBkZWNsYXJhdGlvbnM6IFtDdWlCdXR0b25Db21wb25lbnRdLFxyXG4gIGV4cG9ydHM6IFtDdWlCdXR0b25Db21wb25lbnRdXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBDdWlCdXR0b25Nb2R1bGUge1xyXG59XHJcbiJdfQ==
|
|
@@ -6,4 +6,4 @@ export const CUI_BUTTON_DEFAULT_OPTIONS = {
|
|
|
6
6
|
export const CUI_BUTTON_OPTIONS = new InjectionToken('', {
|
|
7
7
|
factory: () => CUI_BUTTON_DEFAULT_OPTIONS
|
|
8
8
|
});
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLm9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvYnV0dG9uL2J1dHRvbi5vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFnQy9DLE1BQU0sQ0FBQyxNQUFNLDBCQUEwQixHQUFxQjtJQUMxRCxVQUFVLEVBQUUsU0FBUztJQUNyQixJQUFJLEVBQUUsSUFBSTtDQUNYLENBQUM7QUFFRixNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyxJQUFJLGNBQWMsQ0FBQyxFQUFFLEVBQUU7SUFDdkQsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLDBCQUEwQjtDQUMxQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gJ0Bhbmd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5JyxcclxuICBzaXplOiAnc20nXHJcbn07XHJcblxyXG5leHBvcnQgY29uc3QgQ1VJX0JVVFRPTl9PUFRJT05TID0gbmV3IEluamVjdGlvblRva2VuKCcnLCB7XHJcbiAgZmFjdG9yeTogKCkgPT4gQ1VJX0JVVFRPTl9ERUZBVUxUX09QVElPTlNcclxufSk7Il19
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './svg';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2NvbXBvbmVudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2J1dHRvbic7XHJcbmV4cG9ydCAqIGZyb20gJy4vc3ZnJzsiXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VieS11aS1jb3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvY29yZS9jdWJ5LXVpLWNvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
package/esm2020/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './types';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb21wb25lbnRzJztcclxuZXhwb3J0ICogZnJvbSAnLi90eXBlcyc7Il19
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, Input, Inject, HostBinding, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/platform-browser';
|
|
6
|
+
|
|
7
|
+
const CUI_BUTTON_DEFAULT_OPTIONS = {
|
|
8
|
+
appearance: 'primary',
|
|
9
|
+
size: 'sm'
|
|
10
|
+
};
|
|
11
|
+
const CUI_BUTTON_OPTIONS = new InjectionToken('', {
|
|
12
|
+
factory: () => CUI_BUTTON_DEFAULT_OPTIONS
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
class CuiSvgComponent {
|
|
16
|
+
set icon(icon) {
|
|
17
|
+
this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(icon);
|
|
18
|
+
}
|
|
19
|
+
;
|
|
20
|
+
set strokeWidth(strokeWidth) {
|
|
21
|
+
this._strokeWidth = strokeWidth;
|
|
22
|
+
this.updateStrokeWidth();
|
|
23
|
+
}
|
|
24
|
+
constructor(domSanitizer, elementRef) {
|
|
25
|
+
this.domSanitizer = domSanitizer;
|
|
26
|
+
this.elementRef = elementRef;
|
|
27
|
+
this.STROKE_WIDTH_ATTRIBUTE = 'stroke-width';
|
|
28
|
+
}
|
|
29
|
+
ngAfterViewInit() {
|
|
30
|
+
this.updateStrokeWidth();
|
|
31
|
+
}
|
|
32
|
+
updateStrokeWidth() {
|
|
33
|
+
if (this._strokeWidth === undefined) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.elementRef.nativeElement.querySelectorAll(`[${this.STROKE_WIDTH_ATTRIBUTE}]`)
|
|
37
|
+
.forEach(element => {
|
|
38
|
+
element.setAttribute(this.STROKE_WIDTH_ATTRIBUTE, this._strokeWidth.toString());
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
CuiSvgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
CuiSvgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: { width: "width", height: "height", icon: "icon", strokeWidth: "strokeWidth" }, ngImport: i0, template: "<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{ selector: 'cui-svg[icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}\n"] }]
|
|
47
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], height: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], icon: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], strokeWidth: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}] } });
|
|
56
|
+
|
|
57
|
+
class CuiButtonComponent {
|
|
58
|
+
get size() {
|
|
59
|
+
return this._size;
|
|
60
|
+
}
|
|
61
|
+
set size(size) {
|
|
62
|
+
this._size = size;
|
|
63
|
+
if (size === 'xxs') {
|
|
64
|
+
this.svgOptions = {
|
|
65
|
+
width: 16,
|
|
66
|
+
height: 16,
|
|
67
|
+
strokeWidth: 1.5
|
|
68
|
+
};
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.svgOptions = {
|
|
72
|
+
width: 20,
|
|
73
|
+
height: 20,
|
|
74
|
+
strokeWidth: 1.5
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
get isDisabled() {
|
|
78
|
+
return this.disabled || this.isLoaderShown;
|
|
79
|
+
}
|
|
80
|
+
constructor(changeDetectorRef, cuiButtonOptions) {
|
|
81
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
82
|
+
this.cuiButtonOptions = cuiButtonOptions;
|
|
83
|
+
this.CUI_ICON_LOADING = `
|
|
84
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
85
|
+
<animateTransform
|
|
86
|
+
attributeName="transform"
|
|
87
|
+
type="rotate"
|
|
88
|
+
from="0"
|
|
89
|
+
to="360"
|
|
90
|
+
dur="2"
|
|
91
|
+
repeatCount="indefinite">
|
|
92
|
+
</animateTransform>
|
|
93
|
+
<path opacity="0.5" d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z" fill="white" fill-opacity="0.5"/>
|
|
94
|
+
<path d="M20 12H22C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7362 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2V4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12Z" fill="white"/>
|
|
95
|
+
</svg>
|
|
96
|
+
`;
|
|
97
|
+
this._size = this.cuiButtonOptions.size;
|
|
98
|
+
this.svgOptions = {
|
|
99
|
+
width: 20,
|
|
100
|
+
height: 20,
|
|
101
|
+
strokeWidth: 1.5
|
|
102
|
+
};
|
|
103
|
+
this.appearance = this.cuiButtonOptions.appearance;
|
|
104
|
+
this.disabled = false;
|
|
105
|
+
this.isLoaderShown = false;
|
|
106
|
+
this.containsOnlyIcon = false;
|
|
107
|
+
}
|
|
108
|
+
ngAfterViewInit() {
|
|
109
|
+
this.initContainsOnlyIcon();
|
|
110
|
+
}
|
|
111
|
+
initContainsOnlyIcon() {
|
|
112
|
+
Promise.resolve().then(() => {
|
|
113
|
+
this.containsOnlyIcon = this.content.nativeElement.childNodes.length === 0;
|
|
114
|
+
this.changeDetectorRef.detectChanges();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
CuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CUI_BUTTON_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
+
CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: { appearance: "appearance", disabled: "disabled", isLoaderShown: "isLoaderShown", icon: "icon", iconRight: "iconRight", size: "size" }, host: { properties: { "attr.data-appearance": "this.appearance", "class._disabled": "this.disabled", "class._loading": "this.isLoaderShown", "attr.data-size": "this.size", "class._only-icon": "this.containsOnlyIcon", "disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n <span #content *ngIf=\"!containsOnlyIcon\">\r\n <ng-content></ng-content>\r\n </span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n [icon]=\"CUI_ICON_LOADING\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\n", styles: ["@font-face{font-family:Inter;font-style:normal;font-weight:500;src:url(../fonts/Inter-Medium.ttf) format(\"truetype\")}:root{--cui-main-font: Inter, sans-serif;--cui-gray-0: #FFFFFF;--cui-gray-10: #F9FAFB;--cui-gray-50: #F5F6F8;--cui-gray-100: #E9EBEE;--cui-gray-200: #E2E4E9;--cui-gray-500: #6B7280;--cui-gray-900: #111827;--cui-cyan-800: #297F7E;--cui-cyan-900: #1A6B6A;--cui-red-800: #D92D20;--cui-red-900: #B41308;--cui-blue-600: #1570EF;--cui-blue-900: #00429D;--cui-base-0: var(--cui-gray-0);--cui-base-10: var(--cui-gray-10);--cui-base-50: var(--cui-gray-50);--cui-base-100: var(--cui-gray-100);--cui-base-200: var(--cui-gray-200);--cui-base-500: var(--cui-gray-500);--cui-base-900: var(--cui-gray-900);--cui-primary-800: var(--cui-cyan-800);--cui-primary-900: var(--cui-cyan-900);--cui-error-800: var(--cui-red-800);--cui-error-900: var(--cui-red-900);--cui-info-600: var(--cui-blue-600);--cui-info-900: var(--cui-blue-900)}:host{font-size:14px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;border:0;border-radius:8px;outline:0;cursor:pointer;appearance:none;background:inherit;font-family:var(--cui-main-font);text-decoration:none}:host:disabled{cursor:not-allowed}:host[data-appearance=primary]{background:var(--cui-primary-800);color:var(--cui-base-0)}:host[data-appearance=primary]:hover{background:var(--cui-primary-900)}:host[data-appearance=primary]:disabled{background:var(--cui-primary-800)}:host[data-appearance=primary] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=secondary] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--cui-base-900)}:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=outlined-gray] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=ghost]{color:var(--cui-base-900)}:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=ghost] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=destructive]{background:var(--cui-error-800);color:var(--cui-base-0)}:host[data-appearance=destructive]:hover{background:var(--cui-error-900)}:host[data-appearance=destructive]:disabled{background:var(--cui-error-800)}:host[data-appearance=destructive] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info-600)}:host[data-appearance=link]:hover{color:var(--cui-info-900)}:host[data-appearance=link]:hover .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link]:disabled{color:var(--cui-info-600)}:host[data-appearance=link]:disabled .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link] .c-icon ::ng-deep path{stroke:var(--cui-info-600)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 8px}:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}:host[data-size=xxs]._only-icon{width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]._only-icon{width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]._only-icon{width:36px}:host[data-size=md]{height:40px;padding:0 18px}:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 17px}:host[data-size=md]._only-icon{width:40px}:host._disabled{opacity:.5}:host._loading :hover{background:unset}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "icon", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, decorators: [{
|
|
121
|
+
type: Component,
|
|
122
|
+
args: [{ selector: 'button[cuiButton], a[cuiButton]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n <span #content *ngIf=\"!containsOnlyIcon\">\r\n <ng-content></ng-content>\r\n </span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n [icon]=\"CUI_ICON_LOADING\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\n", styles: ["@font-face{font-family:Inter;font-style:normal;font-weight:500;src:url(../fonts/Inter-Medium.ttf) format(\"truetype\")}:root{--cui-main-font: Inter, sans-serif;--cui-gray-0: #FFFFFF;--cui-gray-10: #F9FAFB;--cui-gray-50: #F5F6F8;--cui-gray-100: #E9EBEE;--cui-gray-200: #E2E4E9;--cui-gray-500: #6B7280;--cui-gray-900: #111827;--cui-cyan-800: #297F7E;--cui-cyan-900: #1A6B6A;--cui-red-800: #D92D20;--cui-red-900: #B41308;--cui-blue-600: #1570EF;--cui-blue-900: #00429D;--cui-base-0: var(--cui-gray-0);--cui-base-10: var(--cui-gray-10);--cui-base-50: var(--cui-gray-50);--cui-base-100: var(--cui-gray-100);--cui-base-200: var(--cui-gray-200);--cui-base-500: var(--cui-gray-500);--cui-base-900: var(--cui-gray-900);--cui-primary-800: var(--cui-cyan-800);--cui-primary-900: var(--cui-cyan-900);--cui-error-800: var(--cui-red-800);--cui-error-900: var(--cui-red-900);--cui-info-600: var(--cui-blue-600);--cui-info-900: var(--cui-blue-900)}:host{font-size:14px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;border:0;border-radius:8px;outline:0;cursor:pointer;appearance:none;background:inherit;font-family:var(--cui-main-font);text-decoration:none}:host:disabled{cursor:not-allowed}:host[data-appearance=primary]{background:var(--cui-primary-800);color:var(--cui-base-0)}:host[data-appearance=primary]:hover{background:var(--cui-primary-900)}:host[data-appearance=primary]:disabled{background:var(--cui-primary-800)}:host[data-appearance=primary] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=secondary] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--cui-base-900)}:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=outlined-gray] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=ghost]{color:var(--cui-base-900)}:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=ghost] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=destructive]{background:var(--cui-error-800);color:var(--cui-base-0)}:host[data-appearance=destructive]:hover{background:var(--cui-error-900)}:host[data-appearance=destructive]:disabled{background:var(--cui-error-800)}:host[data-appearance=destructive] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info-600)}:host[data-appearance=link]:hover{color:var(--cui-info-900)}:host[data-appearance=link]:hover .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link]:disabled{color:var(--cui-info-600)}:host[data-appearance=link]:disabled .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link] .c-icon ::ng-deep path{stroke:var(--cui-info-600)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 8px}:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}:host[data-size=xxs]._only-icon{width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]._only-icon{width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]._only-icon{width:36px}:host[data-size=md]{height:40px;padding:0 18px}:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 17px}:host[data-size=md]._only-icon{width:40px}:host._disabled{opacity:.5}:host._loading :hover{background:unset}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
123
|
+
}], ctorParameters: function () {
|
|
124
|
+
return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
125
|
+
type: Inject,
|
|
126
|
+
args: [CUI_BUTTON_OPTIONS]
|
|
127
|
+
}] }];
|
|
128
|
+
}, propDecorators: { appearance: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}, {
|
|
131
|
+
type: HostBinding,
|
|
132
|
+
args: ['attr.data-appearance']
|
|
133
|
+
}], disabled: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}, {
|
|
136
|
+
type: HostBinding,
|
|
137
|
+
args: ['class._disabled']
|
|
138
|
+
}], isLoaderShown: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}, {
|
|
141
|
+
type: HostBinding,
|
|
142
|
+
args: ['class._loading']
|
|
143
|
+
}], icon: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], iconRight: [{
|
|
146
|
+
type: Input
|
|
147
|
+
}], size: [{
|
|
148
|
+
type: Input
|
|
149
|
+
}, {
|
|
150
|
+
type: HostBinding,
|
|
151
|
+
args: ['attr.data-size']
|
|
152
|
+
}], containsOnlyIcon: [{
|
|
153
|
+
type: HostBinding,
|
|
154
|
+
args: ['class._only-icon']
|
|
155
|
+
}], isDisabled: [{
|
|
156
|
+
type: HostBinding,
|
|
157
|
+
args: ['disabled']
|
|
158
|
+
}], content: [{
|
|
159
|
+
type: ViewChild,
|
|
160
|
+
args: ['content']
|
|
161
|
+
}] } });
|
|
162
|
+
|
|
163
|
+
class CuiSvgModule {
|
|
164
|
+
}
|
|
165
|
+
CuiSvgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
166
|
+
CuiSvgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, declarations: [CuiSvgComponent], imports: [CommonModule], exports: [CuiSvgComponent] });
|
|
167
|
+
CuiSvgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, imports: [CommonModule] });
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, decorators: [{
|
|
169
|
+
type: NgModule,
|
|
170
|
+
args: [{
|
|
171
|
+
imports: [CommonModule],
|
|
172
|
+
declarations: [CuiSvgComponent],
|
|
173
|
+
exports: [CuiSvgComponent]
|
|
174
|
+
}]
|
|
175
|
+
}] });
|
|
176
|
+
|
|
177
|
+
class CuiButtonModule {
|
|
178
|
+
}
|
|
179
|
+
CuiButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
180
|
+
CuiButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, declarations: [CuiButtonComponent], imports: [CommonModule,
|
|
181
|
+
CuiSvgModule], exports: [CuiButtonComponent] });
|
|
182
|
+
CuiButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, imports: [CommonModule,
|
|
183
|
+
CuiSvgModule] });
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, decorators: [{
|
|
185
|
+
type: NgModule,
|
|
186
|
+
args: [{
|
|
187
|
+
imports: [
|
|
188
|
+
CommonModule,
|
|
189
|
+
CuiSvgModule
|
|
190
|
+
],
|
|
191
|
+
declarations: [CuiButtonComponent],
|
|
192
|
+
exports: [CuiButtonComponent]
|
|
193
|
+
}]
|
|
194
|
+
}] });
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Generated bundle index. Do not edit.
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
export { CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CuiButtonComponent, CuiButtonModule, CuiSvgComponent, CuiSvgModule };
|
|
201
|
+
//# sourceMappingURL=cuby-ui-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cuby-ui-core.mjs","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/svg/svg.component.ts","../../../projects/core/components/svg/svg.template.html","../../../projects/core/components/button/button.component.ts","../../../projects/core/components/button/button.template.html","../../../projects/core/components/svg/svg.module.ts","../../../projects/core/components/button/button.module.ts","../../../projects/core/cuby-ui-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nimport {\r\n CuiAppearanceDestructive,\r\n CuiAppearanceGhost,\r\n CuiAppearanceLink,\r\n CuiAppearanceOutlined,\r\n CuiAppearanceOutlinedGray,\r\n CuiAppearancePrimary,\r\n CuiAppearanceSecondary,\r\n CuiSizeMd,\r\n CuiSizeSm,\r\n CuiSizeXs,\r\n CuiSizeXxs\r\n} from '../../types';\r\n\r\nexport interface CuiButtonOptions {\r\n readonly appearance:\r\n | CuiAppearancePrimary\r\n | CuiAppearanceSecondary\r\n | CuiAppearanceOutlined\r\n | CuiAppearanceOutlinedGray\r\n | CuiAppearanceGhost\r\n | CuiAppearanceDestructive\r\n | CuiAppearanceLink\r\n readonly size:\r\n | CuiSizeXxs\r\n | CuiSizeXs\r\n | CuiSizeSm\r\n | CuiSizeMd;\r\n}\r\n\r\nexport const CUI_BUTTON_DEFAULT_OPTIONS: CuiButtonOptions = {\r\n appearance: 'primary',\r\n size: 'sm'\r\n};\r\n\r\nexport const CUI_BUTTON_OPTIONS = new InjectionToken('', {\r\n factory: () => CUI_BUTTON_DEFAULT_OPTIONS\r\n});","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Component({\n selector: 'cui-svg[icon]',\n templateUrl: './svg.template.html',\n styleUrls: ['./svg.style.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CuiSvgComponent implements AfterViewInit {\n STROKE_WIDTH_ATTRIBUTE = 'stroke-width';\n\n safeSvgContent!: SafeHtml;\n _strokeWidth?: number;\n\n @Input()\n width?: number;\n\n @Input()\n height?: number\n\n @Input()\n set icon(icon: string) {\n this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(icon);\n };\n\n @Input()\n set strokeWidth(strokeWidth: number | undefined) {\n this._strokeWidth = strokeWidth;\n\n this.updateStrokeWidth();\n }\n\n constructor(private readonly domSanitizer: DomSanitizer,\n private readonly elementRef: ElementRef<HTMLElement>) {\n }\n\n ngAfterViewInit(): void {\n this.updateStrokeWidth();\n }\n\n private updateStrokeWidth(): void {\n if (this._strokeWidth === undefined) {\n return;\n }\n\n this.elementRef.nativeElement.querySelectorAll(`[${this.STROKE_WIDTH_ATTRIBUTE}]`)\n .forEach(element => {\n element.setAttribute(this.STROKE_WIDTH_ATTRIBUTE, this._strokeWidth!.toString())\n });\n }\n}\n","<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n></span>","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n ViewChild\n} from '@angular/core';\n\nimport { CUI_BUTTON_OPTIONS, CuiButtonOptions } from './button.options';\n\n@Component({\n selector: 'button[cuiButton], a[cuiButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CuiButtonComponent implements AfterViewInit, CuiButtonOptions {\n CUI_ICON_LOADING = `\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0\"\n to=\"360\"\n dur=\"2\"\n repeatCount=\"indefinite\">\n </animateTransform>\n <path opacity=\"0.5\" d=\"M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z\" fill=\"white\" fill-opacity=\"0.5\"/>\n <path d=\"M20 12H22C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7362 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2V4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12Z\" fill=\"white\"/>\n </svg>\n `;\n\n _size = this.cuiButtonOptions.size;\n svgOptions = {\n width: 20,\n height: 20,\n strokeWidth: 1.5\n };\n\n @Input()\n @HostBinding('attr.data-appearance')\n appearance = this.cuiButtonOptions.appearance;\n\n @Input()\n @HostBinding('class._disabled')\n disabled = false;\n\n @Input()\n @HostBinding('class._loading')\n isLoaderShown = false;\n\n @Input()\n icon?: string;\n\n @Input()\n iconRight?: string;\n\n @Input()\n @HostBinding('attr.data-size')\n get size(): CuiButtonOptions['size'] {\n return this._size;\n }\n\n set size(size: CuiButtonOptions['size']) {\n this._size = size;\n\n if (size === 'xxs') {\n this.svgOptions = {\n width: 16,\n height: 16,\n strokeWidth: 1.5\n };\n\n return;\n }\n\n this.svgOptions = {\n width: 20,\n height: 20,\n strokeWidth: 1.5\n };\n }\n\n @HostBinding('class._only-icon')\n containsOnlyIcon = false;\n\n @HostBinding('disabled')\n get isDisabled(): boolean {\n return this.disabled || this.isLoaderShown;\n }\n\n @ViewChild('content')\n content!: ElementRef<HTMLSpanElement>;\n\n constructor(private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(CUI_BUTTON_OPTIONS) private readonly cuiButtonOptions: CuiButtonOptions) {\n }\n\n ngAfterViewInit(): void {\n this.initContainsOnlyIcon();\n }\n\n private initContainsOnlyIcon(): void {\n Promise.resolve().then(() => {\n this.containsOnlyIcon = this.content.nativeElement.childNodes.length === 0;\n\n this.changeDetectorRef.detectChanges();\n });\n }\n}\n","<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n <span #content *ngIf=\"!containsOnlyIcon\">\r\n <ng-content></ng-content>\r\n </span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n [icon]=\"CUI_ICON_LOADING\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { CuiSvgComponent } from './svg.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [CuiSvgComponent],\n exports: [CuiSvgComponent]\n})\nexport class CuiSvgModule {\n}\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { CuiSvgModule } from '../svg';\r\n\r\nimport { CuiButtonComponent } from './button.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CuiSvgModule\r\n ],\r\n declarations: [CuiButtonComponent],\r\n exports: [CuiButtonComponent]\r\n})\r\nexport class CuiButtonModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.CuiSvgComponent"],"mappings":";;;;;;AAgCa,MAAA,0BAA0B,GAAqB;AAC1D,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,IAAI,EAAE,IAAI;EACV;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE;AACvD,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC1C,CAAA;;MCxBY,eAAe,CAAA;IAY1B,IACI,IAAI,CAAC,IAAY,EAAA;QACnB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;KACvE;;IAED,IACI,WAAW,CAAC,WAA+B,EAAA;AAC7C,QAAA,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,WAA6B,CAAA,YAA0B,EAC1B,UAAmC,EAAA;AADnC,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;AAC1B,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;AAxBhE,QAAA,IAAsB,CAAA,sBAAA,GAAG,cAAc,CAAC;KAyBvC;IAED,eAAe,GAAA;QACb,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAEO,iBAAiB,GAAA;AACvB,QAAA,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,OAAO;AACR,SAAA;AAED,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,sBAAsB,CAAA,CAAA,CAAG,CAAC;aAC/E,OAAO,CAAC,OAAO,IAAG;AACjB,YA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;;MCMY,eAAe,CAAA;;6GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAf,eAAe,EAAA,YAAA,EAAA,CAHX,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAH/B,YAAY;QACZ,YAAY,aAGJ,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEjB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YANxB,YAAY;QACZ,YAAY,CAAA,EAAA,CAAA,CAAA;4FAKH,eAAe,EAAA,UAAA,EAAA,CAAA;kBAR3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;AACb,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, Input, Inject, HostBinding, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/platform-browser';
|
|
6
|
+
|
|
7
|
+
const CUI_BUTTON_DEFAULT_OPTIONS = {
|
|
8
|
+
appearance: 'primary',
|
|
9
|
+
size: 'sm'
|
|
10
|
+
};
|
|
11
|
+
const CUI_BUTTON_OPTIONS = new InjectionToken('', {
|
|
12
|
+
factory: () => CUI_BUTTON_DEFAULT_OPTIONS
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
class CuiSvgComponent {
|
|
16
|
+
set icon(icon) {
|
|
17
|
+
this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(icon);
|
|
18
|
+
}
|
|
19
|
+
;
|
|
20
|
+
set strokeWidth(strokeWidth) {
|
|
21
|
+
this._strokeWidth = strokeWidth;
|
|
22
|
+
this.updateStrokeWidth();
|
|
23
|
+
}
|
|
24
|
+
constructor(domSanitizer, elementRef) {
|
|
25
|
+
this.domSanitizer = domSanitizer;
|
|
26
|
+
this.elementRef = elementRef;
|
|
27
|
+
this.STROKE_WIDTH_ATTRIBUTE = 'stroke-width';
|
|
28
|
+
}
|
|
29
|
+
ngAfterViewInit() {
|
|
30
|
+
this.updateStrokeWidth();
|
|
31
|
+
}
|
|
32
|
+
updateStrokeWidth() {
|
|
33
|
+
if (this._strokeWidth === undefined) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.elementRef.nativeElement.querySelectorAll(`[${this.STROKE_WIDTH_ATTRIBUTE}]`)
|
|
37
|
+
.forEach(element => {
|
|
38
|
+
element.setAttribute(this.STROKE_WIDTH_ATTRIBUTE, this._strokeWidth.toString());
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
CuiSvgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
CuiSvgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: { width: "width", height: "height", icon: "icon", strokeWidth: "strokeWidth" }, ngImport: i0, template: "<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgComponent, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{ selector: 'cui-svg[icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n></span>", styles: [":host{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;vertical-align:middle;line-height:0}:host ::ng-deep svg{width:100%;height:100%}\n"] }]
|
|
47
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i0.ElementRef }]; }, propDecorators: { width: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], height: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], icon: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], strokeWidth: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}] } });
|
|
56
|
+
|
|
57
|
+
class CuiButtonComponent {
|
|
58
|
+
get size() {
|
|
59
|
+
return this._size;
|
|
60
|
+
}
|
|
61
|
+
set size(size) {
|
|
62
|
+
this._size = size;
|
|
63
|
+
if (size === 'xxs') {
|
|
64
|
+
this.svgOptions = {
|
|
65
|
+
width: 16,
|
|
66
|
+
height: 16,
|
|
67
|
+
strokeWidth: 1.5
|
|
68
|
+
};
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.svgOptions = {
|
|
72
|
+
width: 20,
|
|
73
|
+
height: 20,
|
|
74
|
+
strokeWidth: 1.5
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
get isDisabled() {
|
|
78
|
+
return this.disabled || this.isLoaderShown;
|
|
79
|
+
}
|
|
80
|
+
constructor(changeDetectorRef, cuiButtonOptions) {
|
|
81
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
82
|
+
this.cuiButtonOptions = cuiButtonOptions;
|
|
83
|
+
this.CUI_ICON_LOADING = `
|
|
84
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
85
|
+
<animateTransform
|
|
86
|
+
attributeName="transform"
|
|
87
|
+
type="rotate"
|
|
88
|
+
from="0"
|
|
89
|
+
to="360"
|
|
90
|
+
dur="2"
|
|
91
|
+
repeatCount="indefinite">
|
|
92
|
+
</animateTransform>
|
|
93
|
+
<path opacity="0.5" d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z" fill="white" fill-opacity="0.5"/>
|
|
94
|
+
<path d="M20 12H22C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7362 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2V4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12Z" fill="white"/>
|
|
95
|
+
</svg>
|
|
96
|
+
`;
|
|
97
|
+
this._size = this.cuiButtonOptions.size;
|
|
98
|
+
this.svgOptions = {
|
|
99
|
+
width: 20,
|
|
100
|
+
height: 20,
|
|
101
|
+
strokeWidth: 1.5
|
|
102
|
+
};
|
|
103
|
+
this.appearance = this.cuiButtonOptions.appearance;
|
|
104
|
+
this.disabled = false;
|
|
105
|
+
this.isLoaderShown = false;
|
|
106
|
+
this.containsOnlyIcon = false;
|
|
107
|
+
}
|
|
108
|
+
ngAfterViewInit() {
|
|
109
|
+
this.initContainsOnlyIcon();
|
|
110
|
+
}
|
|
111
|
+
initContainsOnlyIcon() {
|
|
112
|
+
Promise.resolve().then(() => {
|
|
113
|
+
this.containsOnlyIcon = this.content.nativeElement.childNodes.length === 0;
|
|
114
|
+
this.changeDetectorRef.detectChanges();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
CuiButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CUI_BUTTON_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
+
CuiButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: { appearance: "appearance", disabled: "disabled", isLoaderShown: "isLoaderShown", icon: "icon", iconRight: "iconRight", size: "size" }, host: { properties: { "attr.data-appearance": "this.appearance", "class._disabled": "this.disabled", "class._loading": "this.isLoaderShown", "attr.data-size": "this.size", "class._only-icon": "this.containsOnlyIcon", "disabled": "this.isDisabled" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n <span #content *ngIf=\"!containsOnlyIcon\">\r\n <ng-content></ng-content>\r\n </span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n [icon]=\"CUI_ICON_LOADING\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\n", styles: ["@font-face{font-family:Inter;font-style:normal;font-weight:500;src:url(../fonts/Inter-Medium.ttf) format(\"truetype\")}:root{--cui-main-font: Inter, sans-serif;--cui-gray-0: #FFFFFF;--cui-gray-10: #F9FAFB;--cui-gray-50: #F5F6F8;--cui-gray-100: #E9EBEE;--cui-gray-200: #E2E4E9;--cui-gray-500: #6B7280;--cui-gray-900: #111827;--cui-cyan-800: #297F7E;--cui-cyan-900: #1A6B6A;--cui-red-800: #D92D20;--cui-red-900: #B41308;--cui-blue-600: #1570EF;--cui-blue-900: #00429D;--cui-base-0: var(--cui-gray-0);--cui-base-10: var(--cui-gray-10);--cui-base-50: var(--cui-gray-50);--cui-base-100: var(--cui-gray-100);--cui-base-200: var(--cui-gray-200);--cui-base-500: var(--cui-gray-500);--cui-base-900: var(--cui-gray-900);--cui-primary-800: var(--cui-cyan-800);--cui-primary-900: var(--cui-cyan-900);--cui-error-800: var(--cui-red-800);--cui-error-900: var(--cui-red-900);--cui-info-600: var(--cui-blue-600);--cui-info-900: var(--cui-blue-900)}:host{font-size:14px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;border:0;border-radius:8px;outline:0;cursor:pointer;appearance:none;background:inherit;font-family:var(--cui-main-font);text-decoration:none}:host:disabled{cursor:not-allowed}:host[data-appearance=primary]{background:var(--cui-primary-800);color:var(--cui-base-0)}:host[data-appearance=primary]:hover{background:var(--cui-primary-900)}:host[data-appearance=primary]:disabled{background:var(--cui-primary-800)}:host[data-appearance=primary] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=secondary] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--cui-base-900)}:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=outlined-gray] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=ghost]{color:var(--cui-base-900)}:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=ghost] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=destructive]{background:var(--cui-error-800);color:var(--cui-base-0)}:host[data-appearance=destructive]:hover{background:var(--cui-error-900)}:host[data-appearance=destructive]:disabled{background:var(--cui-error-800)}:host[data-appearance=destructive] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info-600)}:host[data-appearance=link]:hover{color:var(--cui-info-900)}:host[data-appearance=link]:hover .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link]:disabled{color:var(--cui-info-600)}:host[data-appearance=link]:disabled .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link] .c-icon ::ng-deep path{stroke:var(--cui-info-600)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 8px}:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}:host[data-size=xxs]._only-icon{width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]._only-icon{width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]._only-icon{width:36px}:host[data-size=md]{height:40px;padding:0 18px}:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 17px}:host[data-size=md]._only-icon{width:40px}:host._disabled{opacity:.5}:host._loading :hover{background:unset}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "icon", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonComponent, decorators: [{
|
|
121
|
+
type: Component,
|
|
122
|
+
args: [{ selector: 'button[cuiButton], a[cuiButton]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n <span #content *ngIf=\"!containsOnlyIcon\">\r\n <ng-content></ng-content>\r\n </span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n [icon]=\"CUI_ICON_LOADING\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\n", styles: ["@font-face{font-family:Inter;font-style:normal;font-weight:500;src:url(../fonts/Inter-Medium.ttf) format(\"truetype\")}:root{--cui-main-font: Inter, sans-serif;--cui-gray-0: #FFFFFF;--cui-gray-10: #F9FAFB;--cui-gray-50: #F5F6F8;--cui-gray-100: #E9EBEE;--cui-gray-200: #E2E4E9;--cui-gray-500: #6B7280;--cui-gray-900: #111827;--cui-cyan-800: #297F7E;--cui-cyan-900: #1A6B6A;--cui-red-800: #D92D20;--cui-red-900: #B41308;--cui-blue-600: #1570EF;--cui-blue-900: #00429D;--cui-base-0: var(--cui-gray-0);--cui-base-10: var(--cui-gray-10);--cui-base-50: var(--cui-gray-50);--cui-base-100: var(--cui-gray-100);--cui-base-200: var(--cui-gray-200);--cui-base-500: var(--cui-gray-500);--cui-base-900: var(--cui-gray-900);--cui-primary-800: var(--cui-cyan-800);--cui-primary-900: var(--cui-cyan-900);--cui-error-800: var(--cui-red-800);--cui-error-900: var(--cui-red-900);--cui-info-600: var(--cui-blue-600);--cui-info-900: var(--cui-blue-900)}:host{font-size:14px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;border:0;border-radius:8px;outline:0;cursor:pointer;appearance:none;background:inherit;font-family:var(--cui-main-font);text-decoration:none}:host:disabled{cursor:not-allowed}:host[data-appearance=primary]{background:var(--cui-primary-800);color:var(--cui-base-0)}:host[data-appearance=primary]:hover{background:var(--cui-primary-900)}:host[data-appearance=primary]:disabled{background:var(--cui-primary-800)}:host[data-appearance=primary] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=secondary]{background:var(--cui-base-100);color:var(--cui-base-900)}:host[data-appearance=secondary]:hover{background:var(--cui-base-200)}:host[data-appearance=secondary]:disabled{background:var(--cui-base-100)}:host[data-appearance=secondary] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined]{border:1px solid var(--cui-base-200);background:var(--cui-base-0);color:var(--cui-base-900)}:host[data-appearance=outlined]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined]:disabled{background:var(--cui-base-0)}:host[data-appearance=outlined] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=outlined-gray]{border:1px solid var(--cui-base-200);background:var(--cui-base-10);color:var(--cui-base-900)}:host[data-appearance=outlined-gray]:hover{background:var(--cui-base-50)}:host[data-appearance=outlined-gray]:disabled{background:var(--cui-base-10)}:host[data-appearance=outlined-gray] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=ghost]{color:var(--cui-base-900)}:host[data-appearance=ghost]:hover{background:var(--cui-base-50)}:host[data-appearance=ghost]:disabled{background:inherit}:host[data-appearance=ghost] .c-icon ::ng-deep path{stroke:var(--cui-base-500)}:host[data-appearance=destructive]{background:var(--cui-error-800);color:var(--cui-base-0)}:host[data-appearance=destructive]:hover{background:var(--cui-error-900)}:host[data-appearance=destructive]:disabled{background:var(--cui-error-800)}:host[data-appearance=destructive] .c-icon ::ng-deep path{stroke:var(--cui-base-0)}:host[data-appearance=link]{height:24px!important;padding:0 4px!important;color:var(--cui-info-600)}:host[data-appearance=link]:hover{color:var(--cui-info-900)}:host[data-appearance=link]:hover .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link]:disabled{color:var(--cui-info-600)}:host[data-appearance=link]:disabled .c-icon ::ng-deep path{stroke:var(--cui-info-900)}:host[data-appearance=link] .c-icon ::ng-deep path{stroke:var(--cui-info-600)}:host[data-size=xxs]{font-size:12px;line-height:14px;height:28px;padding:0 8px}:host[data-size=xxs][data-appearance=outlined],:host[data-size=xxs][data-appearance=outlined-gray]{padding:0 7px}:host[data-size=xxs]._only-icon{width:28px}:host[data-size=xxs] .c-wrapper{gap:6px}:host[data-size=xs]{font-size:13px;line-height:16px;height:32px;padding:0 12px}:host[data-size=xs][data-appearance=outlined],:host[data-size=xs][data-appearance=outlined-gray]{padding:0 11px}:host[data-size=xs]._only-icon{width:32px}:host[data-size=sm]{height:36px;padding:0 14px}:host[data-size=sm][data-appearance=outlined],:host[data-size=sm][data-appearance=outlined-gray]{padding:0 13px}:host[data-size=sm]._only-icon{width:36px}:host[data-size=md]{height:40px;padding:0 18px}:host[data-size=md][data-appearance=outlined],:host[data-size=md][data-appearance=outlined-gray]{padding:0 17px}:host[data-size=md]._only-icon{width:40px}:host._disabled{opacity:.5}:host._loading :hover{background:unset}.c-wrapper{display:flex;justify-content:center;align-items:center;gap:8px;height:100%}.c-wrapper_invisible{opacity:0}.c-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
123
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
124
|
+
type: Inject,
|
|
125
|
+
args: [CUI_BUTTON_OPTIONS]
|
|
126
|
+
}] }]; }, propDecorators: { appearance: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}, {
|
|
129
|
+
type: HostBinding,
|
|
130
|
+
args: ['attr.data-appearance']
|
|
131
|
+
}], disabled: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}, {
|
|
134
|
+
type: HostBinding,
|
|
135
|
+
args: ['class._disabled']
|
|
136
|
+
}], isLoaderShown: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}, {
|
|
139
|
+
type: HostBinding,
|
|
140
|
+
args: ['class._loading']
|
|
141
|
+
}], icon: [{
|
|
142
|
+
type: Input
|
|
143
|
+
}], iconRight: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], size: [{
|
|
146
|
+
type: Input
|
|
147
|
+
}, {
|
|
148
|
+
type: HostBinding,
|
|
149
|
+
args: ['attr.data-size']
|
|
150
|
+
}], containsOnlyIcon: [{
|
|
151
|
+
type: HostBinding,
|
|
152
|
+
args: ['class._only-icon']
|
|
153
|
+
}], isDisabled: [{
|
|
154
|
+
type: HostBinding,
|
|
155
|
+
args: ['disabled']
|
|
156
|
+
}], content: [{
|
|
157
|
+
type: ViewChild,
|
|
158
|
+
args: ['content']
|
|
159
|
+
}] } });
|
|
160
|
+
|
|
161
|
+
class CuiSvgModule {
|
|
162
|
+
}
|
|
163
|
+
CuiSvgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
164
|
+
CuiSvgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, declarations: [CuiSvgComponent], imports: [CommonModule], exports: [CuiSvgComponent] });
|
|
165
|
+
CuiSvgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, imports: [CommonModule] });
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiSvgModule, decorators: [{
|
|
167
|
+
type: NgModule,
|
|
168
|
+
args: [{
|
|
169
|
+
imports: [CommonModule],
|
|
170
|
+
declarations: [CuiSvgComponent],
|
|
171
|
+
exports: [CuiSvgComponent]
|
|
172
|
+
}]
|
|
173
|
+
}] });
|
|
174
|
+
|
|
175
|
+
class CuiButtonModule {
|
|
176
|
+
}
|
|
177
|
+
CuiButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
178
|
+
CuiButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, declarations: [CuiButtonComponent], imports: [CommonModule,
|
|
179
|
+
CuiSvgModule], exports: [CuiButtonComponent] });
|
|
180
|
+
CuiButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, imports: [CommonModule,
|
|
181
|
+
CuiSvgModule] });
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiButtonModule, decorators: [{
|
|
183
|
+
type: NgModule,
|
|
184
|
+
args: [{
|
|
185
|
+
imports: [
|
|
186
|
+
CommonModule,
|
|
187
|
+
CuiSvgModule
|
|
188
|
+
],
|
|
189
|
+
declarations: [CuiButtonComponent],
|
|
190
|
+
exports: [CuiButtonComponent]
|
|
191
|
+
}]
|
|
192
|
+
}] });
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Generated bundle index. Do not edit.
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
export { CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CuiButtonComponent, CuiButtonModule, CuiSvgComponent, CuiSvgModule };
|
|
199
|
+
//# sourceMappingURL=cuby-ui-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cuby-ui-core.mjs","sources":["../../../projects/core/components/button/button.options.ts","../../../projects/core/components/svg/svg.component.ts","../../../projects/core/components/svg/svg.template.html","../../../projects/core/components/button/button.component.ts","../../../projects/core/components/button/button.template.html","../../../projects/core/components/svg/svg.module.ts","../../../projects/core/components/button/button.module.ts","../../../projects/core/cuby-ui-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nimport {\r\n CuiAppearanceDestructive,\r\n CuiAppearanceGhost,\r\n CuiAppearanceLink,\r\n CuiAppearanceOutlined,\r\n CuiAppearanceOutlinedGray,\r\n CuiAppearancePrimary,\r\n CuiAppearanceSecondary,\r\n CuiSizeMd,\r\n CuiSizeSm,\r\n CuiSizeXs,\r\n CuiSizeXxs\r\n} from '../../types';\r\n\r\nexport interface CuiButtonOptions {\r\n readonly appearance:\r\n | CuiAppearancePrimary\r\n | CuiAppearanceSecondary\r\n | CuiAppearanceOutlined\r\n | CuiAppearanceOutlinedGray\r\n | CuiAppearanceGhost\r\n | CuiAppearanceDestructive\r\n | CuiAppearanceLink\r\n readonly size:\r\n | CuiSizeXxs\r\n | CuiSizeXs\r\n | CuiSizeSm\r\n | CuiSizeMd;\r\n}\r\n\r\nexport const CUI_BUTTON_DEFAULT_OPTIONS: CuiButtonOptions = {\r\n appearance: 'primary',\r\n size: 'sm'\r\n};\r\n\r\nexport const CUI_BUTTON_OPTIONS = new InjectionToken('', {\r\n factory: () => CUI_BUTTON_DEFAULT_OPTIONS\r\n});","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Component({\n selector: 'cui-svg[icon]',\n templateUrl: './svg.template.html',\n styleUrls: ['./svg.style.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CuiSvgComponent implements AfterViewInit {\n STROKE_WIDTH_ATTRIBUTE = 'stroke-width';\n\n safeSvgContent!: SafeHtml;\n _strokeWidth?: number;\n\n @Input()\n width?: number;\n\n @Input()\n height?: number\n\n @Input()\n set icon(icon: string) {\n this.safeSvgContent = this.domSanitizer.bypassSecurityTrustHtml(icon);\n };\n\n @Input()\n set strokeWidth(strokeWidth: number | undefined) {\n this._strokeWidth = strokeWidth;\n\n this.updateStrokeWidth();\n }\n\n constructor(private readonly domSanitizer: DomSanitizer,\n private readonly elementRef: ElementRef<HTMLElement>) {\n }\n\n ngAfterViewInit(): void {\n this.updateStrokeWidth();\n }\n\n private updateStrokeWidth(): void {\n if (this._strokeWidth === undefined) {\n return;\n }\n\n this.elementRef.nativeElement.querySelectorAll(`[${this.STROKE_WIDTH_ATTRIBUTE}]`)\n .forEach(element => {\n element.setAttribute(this.STROKE_WIDTH_ATTRIBUTE, this._strokeWidth!.toString())\n });\n }\n}\n","<span\r\n [innerHTML]=\"safeSvgContent\"\r\n [style.width.px]=\"width\"\r\n [style.height.px]=\"height\"\r\n></span>","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n ViewChild\n} from '@angular/core';\n\nimport { CUI_BUTTON_OPTIONS, CuiButtonOptions } from './button.options';\n\n@Component({\n selector: 'button[cuiButton], a[cuiButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CuiButtonComponent implements AfterViewInit, CuiButtonOptions {\n CUI_ICON_LOADING = `\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <animateTransform\n attributeName=\"transform\"\n type=\"rotate\"\n from=\"0\"\n to=\"360\"\n dur=\"2\"\n repeatCount=\"indefinite\">\n </animateTransform>\n <path opacity=\"0.5\" d=\"M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z\" fill=\"white\" fill-opacity=\"0.5\"/>\n <path d=\"M20 12H22C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7362 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2V4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12Z\" fill=\"white\"/>\n </svg>\n `;\n\n _size = this.cuiButtonOptions.size;\n svgOptions = {\n width: 20,\n height: 20,\n strokeWidth: 1.5\n };\n\n @Input()\n @HostBinding('attr.data-appearance')\n appearance = this.cuiButtonOptions.appearance;\n\n @Input()\n @HostBinding('class._disabled')\n disabled = false;\n\n @Input()\n @HostBinding('class._loading')\n isLoaderShown = false;\n\n @Input()\n icon?: string;\n\n @Input()\n iconRight?: string;\n\n @Input()\n @HostBinding('attr.data-size')\n get size(): CuiButtonOptions['size'] {\n return this._size;\n }\n\n set size(size: CuiButtonOptions['size']) {\n this._size = size;\n\n if (size === 'xxs') {\n this.svgOptions = {\n width: 16,\n height: 16,\n strokeWidth: 1.5\n };\n\n return;\n }\n\n this.svgOptions = {\n width: 20,\n height: 20,\n strokeWidth: 1.5\n };\n }\n\n @HostBinding('class._only-icon')\n containsOnlyIcon = false;\n\n @HostBinding('disabled')\n get isDisabled(): boolean {\n return this.disabled || this.isLoaderShown;\n }\n\n @ViewChild('content')\n content!: ElementRef<HTMLSpanElement>;\n\n constructor(private readonly changeDetectorRef: ChangeDetectorRef,\n @Inject(CUI_BUTTON_OPTIONS) private readonly cuiButtonOptions: CuiButtonOptions) {\n }\n\n ngAfterViewInit(): void {\n this.initContainsOnlyIcon();\n }\n\n private initContainsOnlyIcon(): void {\n Promise.resolve().then(() => {\n this.containsOnlyIcon = this.content.nativeElement.childNodes.length === 0;\n\n this.changeDetectorRef.detectChanges();\n });\n }\n}\n","<span\r\n class=\"c-wrapper\"\r\n [class.c-wrapper_invisible]=\"isLoaderShown\"\r\n>\r\n <cui-svg\r\n *ngIf=\"icon\"\r\n [icon]=\"icon\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n <span #content *ngIf=\"!containsOnlyIcon\">\r\n <ng-content></ng-content>\r\n </span>\r\n <cui-svg\r\n *ngIf=\"iconRight\"\r\n [icon]=\"iconRight\"\r\n [width]=\"svgOptions.width\"\r\n [height]=\"svgOptions.height\"\r\n [strokeWidth]=\"svgOptions.strokeWidth\"\r\n class=\"c-icon\"\r\n ></cui-svg>\r\n</span>\r\n<cui-svg\r\n *ngIf=\"isLoaderShown\"\r\n [icon]=\"CUI_ICON_LOADING\"\r\n class=\"c-loader\"\r\n></cui-svg>\r\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { CuiSvgComponent } from './svg.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [CuiSvgComponent],\n exports: [CuiSvgComponent]\n})\nexport class CuiSvgModule {\n}\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { CuiSvgModule } from '../svg';\r\n\r\nimport { CuiButtonComponent } from './button.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CuiSvgModule\r\n ],\r\n declarations: [CuiButtonComponent],\r\n exports: [CuiButtonComponent]\r\n})\r\nexport class CuiButtonModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.CuiSvgComponent"],"mappings":";;;;;;AAgCa,MAAA,0BAA0B,GAAqB;AAC1D,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,IAAI,EAAE,IAAI;EACV;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAAC,EAAE,EAAE;AACvD,IAAA,OAAO,EAAE,MAAM,0BAA0B;AAC1C,CAAA;;MCxBY,eAAe,CAAA;IAY1B,IACI,IAAI,CAAC,IAAY,EAAA;QACnB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;KACvE;;IAED,IACI,WAAW,CAAC,WAA+B,EAAA;AAC7C,QAAA,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAEhC,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAED,WAA6B,CAAA,YAA0B,EAC1B,UAAmC,EAAA;QADnC,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;QAC1B,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAxBhE,IAAsB,CAAA,sBAAA,GAAG,cAAc,CAAC;KAyBvC;IAED,eAAe,GAAA;QACb,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC1B;IAEO,iBAAiB,GAAA;AACvB,QAAA,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE;YACnC,OAAO;AACR,SAAA;AAED,QAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,sBAAsB,CAAA,CAAA,CAAG,CAAC;aAC/E,O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e,CAAC;AAC3B,iBAAA,CAAA;;;MCMY,eAAe,CAAA;;6GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAf,eAAe,EAAA,YAAA,EAAA,CAHX,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAH/B,YAAY;AACZ,QAAA,YAAY,aAGJ,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEjB,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YANxB,YAAY;QACZ,YAAY,CAAA,EAAA,CAAA,CAAA;4FAKH,eAAe,EAAA,UAAA,EAAA,CAAA;kBAR3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;AACb,qBAAA;oBACD,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './types';
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuby-ui/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": ">=15.
|
|
6
|
-
"@angular/core": ">=15.
|
|
5
|
+
"@angular/common": ">=15.2.0",
|
|
6
|
+
"@angular/core": ">=15.2.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": false,
|
|
12
|
-
"module": "fesm2015/
|
|
13
|
-
"es2020": "fesm2020/
|
|
14
|
-
"esm2020": "esm2020/
|
|
15
|
-
"fesm2020": "fesm2020/
|
|
16
|
-
"fesm2015": "fesm2015/
|
|
12
|
+
"module": "fesm2015/cuby-ui-core.mjs",
|
|
13
|
+
"es2020": "fesm2020/cuby-ui-core.mjs",
|
|
14
|
+
"esm2020": "esm2020/cuby-ui-core.mjs",
|
|
15
|
+
"fesm2020": "fesm2020/cuby-ui-core.mjs",
|
|
16
|
+
"fesm2015": "fesm2015/cuby-ui-core.mjs",
|
|
17
17
|
"typings": "index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
"./package.json": {
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./index.d.ts",
|
|
24
|
-
"esm2020": "./esm2020/
|
|
25
|
-
"es2020": "./fesm2020/
|
|
26
|
-
"es2015": "./fesm2015/
|
|
27
|
-
"node": "./fesm2015/
|
|
28
|
-
"default": "./fesm2020/
|
|
24
|
+
"esm2020": "./esm2020/cuby-ui-core.mjs",
|
|
25
|
+
"es2020": "./fesm2020/cuby-ui-core.mjs",
|
|
26
|
+
"es2015": "./fesm2015/cuby-ui-core.mjs",
|
|
27
|
+
"node": "./fesm2015/cuby-ui-core.mjs",
|
|
28
|
+
"default": "./fesm2020/cuby-ui-core.mjs"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
package/esm2020/cui-core.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VpLWNvcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9jb3JlL2N1aS1jb3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
package/esm2020/f-core.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZi1jb3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvY29yZS9mLWNvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
package/fesm2015/cui-core.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cui-core.mjs","sources":["../../../projects/core/cui-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG"}
|
package/fesm2015/f-core.mjs
DELETED
package/fesm2015/f-core.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"f-core.mjs","sources":["../../../projects/core/f-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG"}
|
package/fesm2020/cui-core.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cui-core.mjs","sources":["../../../projects/core/cui-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG"}
|
package/fesm2020/f-core.mjs
DELETED
package/fesm2020/f-core.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"f-core.mjs","sources":["../../../projects/core/f-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;AAEG"}
|