@lamenna/lxp-angular 0.0.1 → 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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Button options tests - Angular package
3
+ *
4
+ * These tests validate that the Angular package can consume the
5
+ * shared button configuration. They purposefully avoid importing
6
+ * Angular runtime/testing utilities so they work in a plain Jest
7
+ * environment without extra Angular Jest presets.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=button-options.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-options.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/button-options.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Button options tests - Angular package
3
+ *
4
+ * These tests validate that the Angular package can consume the
5
+ * shared button configuration. They purposefully avoid importing
6
+ * Angular runtime/testing utilities so they work in a plain Jest
7
+ * environment without extra Angular Jest presets.
8
+ */
9
+ import { buttonConfig } from "@lamenna/lxp-shared-components";
10
+ describe("Button options (Angular)", () => {
11
+ it("should expose primary and secondary variants", () => {
12
+ expect(buttonConfig.variants.primary).toBeDefined();
13
+ expect(buttonConfig.variants.secondary).toBeDefined();
14
+ });
15
+ it("should expose standard sizes", () => {
16
+ expect(buttonConfig.sizes.sm).toBeDefined();
17
+ expect(buttonConfig.sizes.md).toBeDefined();
18
+ expect(buttonConfig.sizes.lg).toBeDefined();
19
+ });
20
+ it("should have common button styles configured", () => {
21
+ expect(buttonConfig.common.borderRadius).toBeDefined();
22
+ expect(buttonConfig.common.cursor).toBe("pointer");
23
+ });
24
+ });
25
+ //# sourceMappingURL=button-options.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-options.test.js","sourceRoot":"","sources":["../../src/__tests__/button-options.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QACvD,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,109 @@
1
+ import { EventEmitter } from "@angular/core";
2
+ import { AngularButtonProps, ButtonVariant, ButtonSize } from "@lamenna/lxp-shared-components";
3
+ export declare class ButtonComponent implements AngularButtonProps {
4
+ content?: string;
5
+ variant: ButtonVariant;
6
+ size: ButtonSize;
7
+ disabled: boolean;
8
+ className?: string;
9
+ id?: string;
10
+ ariaLabel?: string;
11
+ testID?: string;
12
+ label?: string;
13
+ onClick: EventEmitter<MouseEvent>;
14
+ get hostStyles(): {
15
+ opacity: string;
16
+ pointerEvents: string;
17
+ padding: `${string} ${string}`;
18
+ fontSize: "12px";
19
+ height: "28px";
20
+ backgroundColor: string;
21
+ color: "white";
22
+ borderColor: "transparent";
23
+ borderRadius: string;
24
+ border: "none";
25
+ fontWeight: 500;
26
+ cursor: "pointer";
27
+ transition: "opacity 0.2s";
28
+ activeOpacity: 0.7;
29
+ } | {
30
+ opacity: string;
31
+ pointerEvents: string;
32
+ padding: `${string} ${string}`;
33
+ fontSize: "14px";
34
+ height: "36px";
35
+ backgroundColor: string;
36
+ color: "white";
37
+ borderColor: "transparent";
38
+ borderRadius: string;
39
+ border: "none";
40
+ fontWeight: 500;
41
+ cursor: "pointer";
42
+ transition: "opacity 0.2s";
43
+ activeOpacity: 0.7;
44
+ } | {
45
+ opacity: string;
46
+ pointerEvents: string;
47
+ padding: `${string} ${string}`;
48
+ fontSize: "16px";
49
+ height: "44px";
50
+ backgroundColor: string;
51
+ color: "white";
52
+ borderColor: "transparent";
53
+ borderRadius: string;
54
+ border: "none";
55
+ fontWeight: 500;
56
+ cursor: "pointer";
57
+ transition: "opacity 0.2s";
58
+ activeOpacity: 0.7;
59
+ } | {
60
+ opacity: string;
61
+ pointerEvents: string;
62
+ padding: `${string} ${string}`;
63
+ fontSize: "12px";
64
+ height: "28px";
65
+ backgroundColor: string;
66
+ color: "white";
67
+ borderColor: "transparent";
68
+ borderRadius: string;
69
+ border: "none";
70
+ fontWeight: 500;
71
+ cursor: "pointer";
72
+ transition: "opacity 0.2s";
73
+ activeOpacity: 0.7;
74
+ } | {
75
+ opacity: string;
76
+ pointerEvents: string;
77
+ padding: `${string} ${string}`;
78
+ fontSize: "14px";
79
+ height: "36px";
80
+ backgroundColor: string;
81
+ color: "white";
82
+ borderColor: "transparent";
83
+ borderRadius: string;
84
+ border: "none";
85
+ fontWeight: 500;
86
+ cursor: "pointer";
87
+ transition: "opacity 0.2s";
88
+ activeOpacity: 0.7;
89
+ } | {
90
+ opacity: string;
91
+ pointerEvents: string;
92
+ padding: `${string} ${string}`;
93
+ fontSize: "16px";
94
+ height: "44px";
95
+ backgroundColor: string;
96
+ color: "white";
97
+ borderColor: "transparent";
98
+ borderRadius: string;
99
+ border: "none";
100
+ fontWeight: 500;
101
+ cursor: "pointer";
102
+ transition: "opacity 0.2s";
103
+ activeOpacity: 0.7;
104
+ };
105
+ get buttonClasses(): {
106
+ [x: string]: boolean;
107
+ };
108
+ }
109
+ //# sourceMappingURL=button.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,UAAU,EAEX,MAAM,gCAAgC,CAAC;AAExC,qBAgBa,eAAgB,YAAW,kBAAkB;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,aAAa,CAAa;IACnC,IAAI,EAAE,UAAU,CAAQ;IACxB,QAAQ,EAAE,OAAO,CAAS;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEd,OAAO,2BAAkC;IAEnD,IAA0B,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUnC;IAED,IAAI,aAAa;;MAIhB;CACF"}
@@ -0,0 +1,207 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
8
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
+ var _, done = false;
14
+ for (var i = decorators.length - 1; i >= 0; i--) {
15
+ var context = {};
16
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
+ if (kind === "accessor") {
21
+ if (result === void 0) continue;
22
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
+ if (_ = accept(result.get)) descriptor.get = _;
24
+ if (_ = accept(result.set)) descriptor.set = _;
25
+ if (_ = accept(result.init)) initializers.unshift(_);
26
+ }
27
+ else if (_ = accept(result)) {
28
+ if (kind === "field") initializers.unshift(_);
29
+ else descriptor[key] = _;
30
+ }
31
+ }
32
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
+ done = true;
34
+ };
35
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
36
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
37
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
38
+ };
39
+ import { Component, Input, Output, EventEmitter, HostBinding, } from "@angular/core";
40
+ import { buttonConfig, } from "@lamenna/lxp-shared-components";
41
+ let ButtonComponent = (() => {
42
+ let _classDecorators = [Component({
43
+ selector: "lxp-button",
44
+ template: `
45
+ <button
46
+ [attr.id]="id"
47
+ [attr.data-testid]="testID"
48
+ [attr.aria-label]="ariaLabel"
49
+ [disabled]="disabled"
50
+ (click)="onClick.emit($event)"
51
+ [ngClass]="buttonClasses"
52
+ >
53
+ {{ content }}
54
+ </button>
55
+ `,
56
+ standalone: true,
57
+ })];
58
+ let _classDescriptor;
59
+ let _classExtraInitializers = [];
60
+ let _classThis;
61
+ let _instanceExtraInitializers = [];
62
+ let _content_decorators;
63
+ let _content_initializers = [];
64
+ let _content_extraInitializers = [];
65
+ let _variant_decorators;
66
+ let _variant_initializers = [];
67
+ let _variant_extraInitializers = [];
68
+ let _size_decorators;
69
+ let _size_initializers = [];
70
+ let _size_extraInitializers = [];
71
+ let _disabled_decorators;
72
+ let _disabled_initializers = [];
73
+ let _disabled_extraInitializers = [];
74
+ let _className_decorators;
75
+ let _className_initializers = [];
76
+ let _className_extraInitializers = [];
77
+ let _id_decorators;
78
+ let _id_initializers = [];
79
+ let _id_extraInitializers = [];
80
+ let _ariaLabel_decorators;
81
+ let _ariaLabel_initializers = [];
82
+ let _ariaLabel_extraInitializers = [];
83
+ let _testID_decorators;
84
+ let _testID_initializers = [];
85
+ let _testID_extraInitializers = [];
86
+ let _label_decorators;
87
+ let _label_initializers = [];
88
+ let _label_extraInitializers = [];
89
+ let _onClick_decorators;
90
+ let _onClick_initializers = [];
91
+ let _onClick_extraInitializers = [];
92
+ let _get_hostStyles_decorators;
93
+ var ButtonComponent = _classThis = class {
94
+ get hostStyles() {
95
+ const variantConfig = buttonConfig.variants[this.variant];
96
+ const sizeConfig = buttonConfig.sizes[this.size];
97
+ return {
98
+ ...buttonConfig.common,
99
+ ...variantConfig,
100
+ ...sizeConfig,
101
+ opacity: this.disabled ? "0.6" : "1",
102
+ pointerEvents: this.disabled ? "none" : "auto",
103
+ };
104
+ }
105
+ get buttonClasses() {
106
+ return {
107
+ [this.className || ""]: !!this.className,
108
+ };
109
+ }
110
+ constructor() {
111
+ Object.defineProperty(this, "content", {
112
+ enumerable: true,
113
+ configurable: true,
114
+ writable: true,
115
+ value: (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _content_initializers, void 0))
116
+ });
117
+ Object.defineProperty(this, "variant", {
118
+ enumerable: true,
119
+ configurable: true,
120
+ writable: true,
121
+ value: (__runInitializers(this, _content_extraInitializers), __runInitializers(this, _variant_initializers, "primary"))
122
+ });
123
+ Object.defineProperty(this, "size", {
124
+ enumerable: true,
125
+ configurable: true,
126
+ writable: true,
127
+ value: (__runInitializers(this, _variant_extraInitializers), __runInitializers(this, _size_initializers, "md"))
128
+ });
129
+ Object.defineProperty(this, "disabled", {
130
+ enumerable: true,
131
+ configurable: true,
132
+ writable: true,
133
+ value: (__runInitializers(this, _size_extraInitializers), __runInitializers(this, _disabled_initializers, false))
134
+ });
135
+ Object.defineProperty(this, "className", {
136
+ enumerable: true,
137
+ configurable: true,
138
+ writable: true,
139
+ value: (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _className_initializers, void 0))
140
+ });
141
+ Object.defineProperty(this, "id", {
142
+ enumerable: true,
143
+ configurable: true,
144
+ writable: true,
145
+ value: (__runInitializers(this, _className_extraInitializers), __runInitializers(this, _id_initializers, void 0))
146
+ });
147
+ Object.defineProperty(this, "ariaLabel", {
148
+ enumerable: true,
149
+ configurable: true,
150
+ writable: true,
151
+ value: (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _ariaLabel_initializers, void 0))
152
+ });
153
+ Object.defineProperty(this, "testID", {
154
+ enumerable: true,
155
+ configurable: true,
156
+ writable: true,
157
+ value: (__runInitializers(this, _ariaLabel_extraInitializers), __runInitializers(this, _testID_initializers, void 0))
158
+ });
159
+ Object.defineProperty(this, "label", {
160
+ enumerable: true,
161
+ configurable: true,
162
+ writable: true,
163
+ value: (__runInitializers(this, _testID_extraInitializers), __runInitializers(this, _label_initializers, void 0))
164
+ });
165
+ Object.defineProperty(this, "onClick", {
166
+ enumerable: true,
167
+ configurable: true,
168
+ writable: true,
169
+ value: (__runInitializers(this, _label_extraInitializers), __runInitializers(this, _onClick_initializers, new EventEmitter()))
170
+ });
171
+ __runInitializers(this, _onClick_extraInitializers);
172
+ }
173
+ };
174
+ __setFunctionName(_classThis, "ButtonComponent");
175
+ (() => {
176
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
177
+ _content_decorators = [Input()];
178
+ _variant_decorators = [Input()];
179
+ _size_decorators = [Input()];
180
+ _disabled_decorators = [Input()];
181
+ _className_decorators = [Input()];
182
+ _id_decorators = [Input()];
183
+ _ariaLabel_decorators = [Input()];
184
+ _testID_decorators = [Input()];
185
+ _label_decorators = [Input()];
186
+ _onClick_decorators = [Output()];
187
+ _get_hostStyles_decorators = [HostBinding("style")];
188
+ __esDecorate(_classThis, null, _get_hostStyles_decorators, { kind: "getter", name: "hostStyles", static: false, private: false, access: { has: obj => "hostStyles" in obj, get: obj => obj.hostStyles }, metadata: _metadata }, null, _instanceExtraInitializers);
189
+ __esDecorate(null, null, _content_decorators, { kind: "field", name: "content", static: false, private: false, access: { has: obj => "content" in obj, get: obj => obj.content, set: (obj, value) => { obj.content = value; } }, metadata: _metadata }, _content_initializers, _content_extraInitializers);
190
+ __esDecorate(null, null, _variant_decorators, { kind: "field", name: "variant", static: false, private: false, access: { has: obj => "variant" in obj, get: obj => obj.variant, set: (obj, value) => { obj.variant = value; } }, metadata: _metadata }, _variant_initializers, _variant_extraInitializers);
191
+ __esDecorate(null, null, _size_decorators, { kind: "field", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size, set: (obj, value) => { obj.size = value; } }, metadata: _metadata }, _size_initializers, _size_extraInitializers);
192
+ __esDecorate(null, null, _disabled_decorators, { kind: "field", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
193
+ __esDecorate(null, null, _className_decorators, { kind: "field", name: "className", static: false, private: false, access: { has: obj => "className" in obj, get: obj => obj.className, set: (obj, value) => { obj.className = value; } }, metadata: _metadata }, _className_initializers, _className_extraInitializers);
194
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
195
+ __esDecorate(null, null, _ariaLabel_decorators, { kind: "field", name: "ariaLabel", static: false, private: false, access: { has: obj => "ariaLabel" in obj, get: obj => obj.ariaLabel, set: (obj, value) => { obj.ariaLabel = value; } }, metadata: _metadata }, _ariaLabel_initializers, _ariaLabel_extraInitializers);
196
+ __esDecorate(null, null, _testID_decorators, { kind: "field", name: "testID", static: false, private: false, access: { has: obj => "testID" in obj, get: obj => obj.testID, set: (obj, value) => { obj.testID = value; } }, metadata: _metadata }, _testID_initializers, _testID_extraInitializers);
197
+ __esDecorate(null, null, _label_decorators, { kind: "field", name: "label", static: false, private: false, access: { has: obj => "label" in obj, get: obj => obj.label, set: (obj, value) => { obj.label = value; } }, metadata: _metadata }, _label_initializers, _label_extraInitializers);
198
+ __esDecorate(null, null, _onClick_decorators, { kind: "field", name: "onClick", static: false, private: false, access: { has: obj => "onClick" in obj, get: obj => obj.onClick, set: (obj, value) => { obj.onClick = value; } }, metadata: _metadata }, _onClick_initializers, _onClick_extraInitializers);
199
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
200
+ ButtonComponent = _classThis = _classDescriptor.value;
201
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
202
+ __runInitializers(_classThis, _classExtraInitializers);
203
+ })();
204
+ return ButtonComponent = _classThis;
205
+ })();
206
+ export { ButtonComponent };
207
+ //# sourceMappingURL=button.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,YAAY,GACb,MAAM,gCAAgC,CAAC;IAkB3B,eAAe;4BAhB3B,SAAS,CAAC;YACT,QAAQ,EAAE,YAAY;YACtB,QAAQ,EAAE;;;;;;;;;;;GAWT;YACD,UAAU,EAAE,IAAI;SACjB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAcsB,IAAI,UAAU;YAClC,MAAM,aAAa,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC1D,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjD,OAAO;gBACL,GAAG,YAAY,CAAC,MAAM;gBACtB,GAAG,aAAa;gBAChB,GAAG,UAAU;gBACb,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG;gBACpC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;aAC/C,CAAC;QACJ,CAAC;QAED,IAAI,aAAa;YACf,OAAO;gBACL,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS;aACzC,CAAC;QACJ,CAAC;;YA5BQ;;;;wBADE,mDAAe;eACA;YACjB;;;;4HAAyB,SAAS;eAAC;YACnC;;;;yHAAmB,IAAI;eAAC;YACxB;;;;0HAAoB,KAAK;eAAC;YAC1B;;;;;eAAmB;YACnB;;;;;eAAY;YACZ;;;;;eAAmB;YACnB;;;;;eAAgB;YAChB;;;;;eAAe;YAEd;;;;0HAAU,IAAI,YAAY,EAAc;eAAC;;;;;;;+BAVlD,KAAK,EAAE;+BACP,KAAK,EAAE;4BACP,KAAK,EAAE;gCACP,KAAK,EAAE;iCACP,KAAK,EAAE;0BACP,KAAK,EAAE;iCACP,KAAK,EAAE;8BACP,KAAK,EAAE;6BACP,KAAK,EAAE;+BAEP,MAAM,EAAE;sCAER,WAAW,CAAC,OAAO,CAAC;QAAC,2LAAI,UAAU,6DAUnC;QAtBQ,uKAAA,OAAO,6BAAP,OAAO,yFAAU;QACjB,uKAAA,OAAO,6BAAP,OAAO,yFAA4B;QACnC,8JAAA,IAAI,6BAAJ,IAAI,mFAAoB;QACxB,0KAAA,QAAQ,6BAAR,QAAQ,2FAAkB;QAC1B,6KAAA,SAAS,6BAAT,SAAS,6FAAU;QACnB,wJAAA,EAAE,6BAAF,EAAE,+EAAU;QACZ,6KAAA,SAAS,6BAAT,SAAS,6FAAU;QACnB,oKAAA,MAAM,6BAAN,MAAM,uFAAU;QAChB,iKAAA,KAAK,6BAAL,KAAK,qFAAU;QAEd,uKAAA,OAAO,6BAAP,OAAO,yFAAkC;QAXrD,6KA8BC;;;QA9BY,uDAAe;;;;SAAf,eAAe"}
@@ -0,0 +1,2 @@
1
+ export { ButtonComponent } from "./button.component";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +1,2 @@
1
1
  export { ButtonComponent } from "./button.component";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./components/button";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./components/button";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,24 +1,32 @@
1
1
  {
2
2
  "name": "@lamenna/lxp-angular",
3
- "version": "0.0.1",
3
+ "version": "0.0.4",
4
4
  "description": "Angular components for LXP",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
5
10
  "publishConfig": {
6
11
  "access": "public"
7
12
  },
8
13
  "peerDependencies": {
9
- "@angular/common": "^17.0.0",
10
- "@angular/core": "^17.0.0"
14
+ "@angular/common": "^21.0.0",
15
+ "@angular/core": "^21.0.0"
11
16
  },
12
17
  "dependencies": {
13
- "@lamenna/lxp-tokens": "0.0.1",
14
- "@lamenna/lxp-shared-components": "0.0.1"
18
+ "@lamenna/lxp-tokens": "0.0.2",
19
+ "@lamenna/lxp-shared-components": "0.0.2"
20
+ },
21
+ "devDependencies": {
22
+ "typescript": "^5.3.3"
15
23
  },
16
24
  "scripts": {
17
- "build": "echo 'Angular build will be configured later'",
18
- "dev": "echo 'Angular dev mode'",
19
- "test": "jest",
20
- "test:watch": "jest --watch",
21
- "test:coverage": "jest --coverage",
25
+ "build": "tsc",
26
+ "dev": "tsc --watch",
27
+ "test": "jest --passWithNoTests",
28
+ "test:watch": "jest --watch --passWithNoTests",
29
+ "test:coverage": "jest --coverage --passWithNoTests",
22
30
  "clean": "rm -rf dist"
23
31
  }
24
32
  }
@@ -1,5 +0,0 @@
1
-
2
- > @lamenna/lxp-angular@0.0.1 build /home/runner/work/lxp/lxp/packages/angular
3
- > echo 'Angular build will be configured later'
4
-
5
- Angular build will be configured later
package/jest.config.js DELETED
@@ -1,22 +0,0 @@
1
- /**
2
- * Jest Configuration for @lamenna/lxp-angular
3
- */
4
-
5
- module.exports = {
6
- displayName: '@lamenna/lxp-angular',
7
- testEnvironment: 'jsdom',
8
- preset: 'ts-jest',
9
- rootDir: '.',
10
- testMatch: ['<rootDir>/src/**/__tests__/**/*.test.ts', '<rootDir>/src/**/*.test.ts'],
11
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
12
- setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
13
- collectCoverageFrom: [
14
- 'src/**/*.{ts,tsx}',
15
- '!src/**/*.d.ts',
16
- '!src/index.ts',
17
- ],
18
- coveragePathIgnorePatterns: [
19
- '/node_modules/',
20
- '/dist/',
21
- ],
22
- };
package/jest.setup.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Jest Setup for Angular Testing
3
- */
4
-
5
- // Angular testing setup can go here
@@ -1,61 +0,0 @@
1
- import {
2
- Component,
3
- Input,
4
- Output,
5
- EventEmitter,
6
- HostBinding,
7
- } from "@angular/core";
8
- import {
9
- AngularButtonProps,
10
- ButtonVariant,
11
- ButtonSize,
12
- buttonConfig,
13
- } from "@lamenna/lxp-shared-components";
14
-
15
- @Component({
16
- selector: "lxp-button",
17
- template: `
18
- <button
19
- [attr.id]="id"
20
- [attr.data-testid]="testID"
21
- [attr.aria-label]="ariaLabel"
22
- [disabled]="disabled"
23
- (click)="onClick.emit($event)"
24
- [ngClass]="buttonClasses"
25
- >
26
- {{ content }}
27
- </button>
28
- `,
29
- standalone: true,
30
- })
31
- export class ButtonComponent implements AngularButtonProps {
32
- @Input() content?: string;
33
- @Input() variant: ButtonVariant = "primary";
34
- @Input() size: ButtonSize = "md";
35
- @Input() disabled: boolean = false;
36
- @Input() className?: string;
37
- @Input() id?: string;
38
- @Input() ariaLabel?: string;
39
- @Input() testID?: string;
40
- @Input() label?: string;
41
-
42
- @Output() onClick = new EventEmitter<MouseEvent>();
43
-
44
- @HostBinding("style") get hostStyles() {
45
- const variantConfig = buttonConfig.variants[this.variant];
46
- const sizeConfig = buttonConfig.sizes[this.size];
47
- return {
48
- ...buttonConfig.common,
49
- ...variantConfig,
50
- ...sizeConfig,
51
- opacity: this.disabled ? "0.6" : "1",
52
- pointerEvents: this.disabled ? "none" : "auto",
53
- };
54
- }
55
-
56
- get buttonClasses() {
57
- return {
58
- [this.className || ""]: !!this.className,
59
- };
60
- }
61
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./button/button.component";