@w2p-ui/kit 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,20 +4,18 @@ import { ArrowIconComponent } from '@w2p-ui/icons';
|
|
|
4
4
|
|
|
5
5
|
class W2pButton {
|
|
6
6
|
onClick = output();
|
|
7
|
-
icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
8
|
-
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
9
7
|
varinat = input('primary', ...(ngDevMode ? [{ debugName: "varinat" }] : /* istanbul ignore next */ []));
|
|
10
8
|
classes = computed(() => {
|
|
11
9
|
const mainClass = 'button';
|
|
12
10
|
return `button--${this.varinat()}`;
|
|
13
11
|
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
14
12
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: W2pButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.18", type: W2pButton, isStandalone: true, selector: "w2p-button", inputs: { varinat: { classPropertyName: "varinat", publicName: "varinat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<button [class]=\"'button ' + classes()\" (click)=\"onClick.emit()\">\n <div class=\"button__icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n <ng-content select=\"[label]\"></ng-content>\n\n <div class=\"button__action\">\n <w2p-ui-icon-arrow></w2p-ui-icon-arrow>\n </div>\n</button>\n", styles: [""], dependencies: [{ kind: "component", type: ArrowIconComponent, selector: "w2p-ui-icon-arrow" }] });
|
|
16
14
|
}
|
|
17
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: W2pButton, decorators: [{
|
|
18
16
|
type: Component,
|
|
19
|
-
args: [{ selector: 'w2p-button', imports: [ArrowIconComponent], template: "
|
|
20
|
-
}], propDecorators: { onClick: [{ type: i0.Output, args: ["onClick"] }],
|
|
17
|
+
args: [{ selector: 'w2p-button', imports: [ArrowIconComponent], template: "<button [class]=\"'button ' + classes()\" (click)=\"onClick.emit()\">\n <div class=\"button__icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n <ng-content select=\"[label]\"></ng-content>\n\n <div class=\"button__action\">\n <w2p-ui-icon-arrow></w2p-ui-icon-arrow>\n </div>\n</button>\n" }]
|
|
18
|
+
}], propDecorators: { onClick: [{ type: i0.Output, args: ["onClick"] }], varinat: [{ type: i0.Input, args: [{ isSignal: true, alias: "varinat", required: false }] }] } });
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
21
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"w2p-ui-kit-components-button.mjs","sources":["../../../projects/kit/components/button/button.ts","../../../projects/kit/components/button/button.html","../../../projects/kit/components/button/w2p-ui-kit-components-button.ts"],"sourcesContent":["import { Component, computed, input, output } from '@angular/core';\nimport { ArrowIconComponent } from '@w2p-ui/icons';\n\n@Component({\n selector: 'w2p-button',\n imports: [ArrowIconComponent],\n templateUrl: './button.html',\n styleUrls: ['./button.scss'],\n})\nexport class W2pButton {\n public readonly onClick = output<void>();\n public readonly
|
|
1
|
+
{"version":3,"file":"w2p-ui-kit-components-button.mjs","sources":["../../../projects/kit/components/button/button.ts","../../../projects/kit/components/button/button.html","../../../projects/kit/components/button/w2p-ui-kit-components-button.ts"],"sourcesContent":["import { Component, computed, input, output } from '@angular/core';\nimport { ArrowIconComponent } from '@w2p-ui/icons';\n\n@Component({\n selector: 'w2p-button',\n imports: [ArrowIconComponent],\n templateUrl: './button.html',\n styleUrls: ['./button.scss'],\n})\nexport class W2pButton {\n public readonly onClick = output<void>();\n public readonly varinat = input<'primary' | 'neutral' | 'critical'>('primary');\n\n protected readonly classes = computed((): string => {\n const mainClass = 'button';\n return `button--${this.varinat()}`;\n });\n}\n","<button [class]=\"'button ' + classes()\" (click)=\"onClick.emit()\">\n <div class=\"button__icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n\n <ng-content select=\"[label]\"></ng-content>\n\n <div class=\"button__action\">\n <w2p-ui-icon-arrow></w2p-ui-icon-arrow>\n </div>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,SAAS,CAAA;IACJ,OAAO,GAAG,MAAM,EAAQ;AACxB,IAAA,OAAO,GAAG,KAAK,CAAqC,SAAS,8EAAC;AAE3D,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAa;QACjD,MAAM,SAAS,GAAG,QAAQ;AAC1B,QAAA,OAAO,WAAW,IAAI,CAAC,OAAO,EAAE,EAAE;AACpC,IAAA,CAAC,8EAAC;wGAPS,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTtB,4TAWA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDNY,kBAAkB,EAAA,QAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,CAAA;;4FAIjB,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,kBAAkB,CAAC,EAAA,QAAA,EAAA,4TAAA,EAAA;;;AEL/B;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Component } from '@angular/core';
|
|
3
2
|
|
|
4
3
|
declare class W2pButton {
|
|
5
4
|
readonly onClick: _angular_core.OutputEmitterRef<void>;
|
|
6
|
-
readonly icon: _angular_core.InputSignal<Component>;
|
|
7
|
-
readonly label: _angular_core.InputSignal<string>;
|
|
8
5
|
readonly varinat: _angular_core.InputSignal<"primary" | "neutral" | "critical">;
|
|
9
6
|
protected readonly classes: _angular_core.Signal<string>;
|
|
10
7
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<W2pButton, never>;
|
|
11
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<W2pButton, "w2p-button", never, { "
|
|
8
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<W2pButton, "w2p-button", never, { "varinat": { "alias": "varinat"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, ["[icon]", "[label]"], true, never>;
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
export { W2pButton };
|