tikal-ui-components 0.7.0 → 0.8.2

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.
@@ -8,6 +8,8 @@ import { InputTextModule } from 'primeng/inputtext';
8
8
  import { form, required, maxLength, disabled, FormRoot, FormField } from '@angular/forms/signals';
9
9
  import * as i1$2 from 'primeng/skeleton';
10
10
  import { SkeletonModule } from 'primeng/skeleton';
11
+ import * as i1$3 from 'primeng/chip';
12
+ import { ChipModule } from 'primeng/chip';
11
13
 
12
14
  class EnumMapPipe {
13
15
  transform(value, enumMap, defaultValue) {
@@ -54,13 +56,16 @@ class ButtonComponent {
54
56
  ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
55
57
  /** @ignore */
56
58
  clicked = output();
59
+ /** What form should the button belong to? */
60
+ form = input(/* @ts-ignore */
61
+ ...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
57
62
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ButtonComponent, isStandalone: true, selector: "tikal-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, colour: { classPropertyName: "colour", publicName: "colour", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n pButton\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "component", type: PIcon, selector: "svg[pIcon]", inputs: ["pIcon"] }, { kind: "component", type: Spinner, selector: "svg[data-p-icon=\"spinner\"]" }, { kind: "pipe", type: EnumMapPipe, name: "enumMap" }] });
63
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ButtonComponent, isStandalone: true, selector: "tikal-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, colour: { classPropertyName: "colour", publicName: "colour", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n pButton\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "component", type: PIcon, selector: "svg[pIcon]", inputs: ["pIcon"] }, { kind: "component", type: Spinner, selector: "svg[data-p-icon=\"spinner\"]" }, { kind: "pipe", type: EnumMapPipe, name: "enumMap" }] });
59
64
  }
60
65
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ButtonComponent, decorators: [{
61
66
  type: Component,
62
- args: [{ selector: 'tikal-button', imports: [ButtonModule, PIcon, EnumMapPipe, Spinner], template: "<button\n pButton\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n" }]
63
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "colour", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], outline: [{ type: i0.Input, args: [{ isSignal: true, alias: "outline", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
67
+ args: [{ selector: 'tikal-button', imports: [ButtonModule, PIcon, EnumMapPipe, Spinner], template: "<button\n pButton\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n" }]
68
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "colour", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], outline: [{ type: i0.Input, args: [{ isSignal: true, alias: "outline", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }] } });
64
69
 
65
70
  class InputComponent {
66
71
  /** What value should the input have */
@@ -87,13 +92,16 @@ class InputComponent {
87
92
  /** What placeholder should the input display? */
88
93
  placeholder = input(/* @ts-ignore */
89
94
  ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
95
+ /** Should the input take the full widht? */
96
+ expand = input(false, /* @ts-ignore */
97
+ ...(ngDevMode ? [{ debugName: "expand" }] : /* istanbul ignore next */ []));
90
98
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
91
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: InputComponent, isStandalone: true, selector: "tikal-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1$1.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }] });
99
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: InputComponent, isStandalone: true, selector: "tikal-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n", styles: [".full-length{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1$1.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }] });
92
100
  }
93
101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputComponent, decorators: [{
94
102
  type: Component,
95
- args: [{ selector: 'tikal-input', imports: [InputTextModule], template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n" }]
96
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
103
+ args: [{ selector: 'tikal-input', imports: [InputTextModule], template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n", styles: [".full-length{width:100%}\n"] }]
104
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], expand: [{ type: i0.Input, args: [{ isSignal: true, alias: "expand", required: false }] }] } });
97
105
 
98
106
  class ChatFormComponent {
99
107
  /** @ignore */
@@ -126,7 +134,7 @@ class ChatFormComponent {
126
134
  },
127
135
  });
128
136
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChatFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: ChatFormComponent, isStandalone: true, selector: "tikal-chat-form", inputs: { onSubmission: { classPropertyName: "onSubmission", publicName: "onSubmission", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n", styles: ["form{display:flex;gap:.5rem}\n"], dependencies: [{ kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: InputComponent, selector: "tikal-input", inputs: ["value", "disabled", "invalid", "required", "touched", "maxLength", "label", "placeholder"], outputs: ["valueChange"] }, { kind: "component", type: ButtonComponent, selector: "tikal-button", inputs: ["icon", "colour", "size", "label", "isLoading", "outline", "type", "text"], outputs: ["clicked"] }] });
137
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: ChatFormComponent, isStandalone: true, selector: "tikal-chat-form", inputs: { onSubmission: { classPropertyName: "onSubmission", publicName: "onSubmission", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n", styles: ["form{display:flex;gap:.5rem}\n"], dependencies: [{ kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: InputComponent, selector: "tikal-input", inputs: ["value", "disabled", "invalid", "required", "touched", "maxLength", "label", "placeholder", "expand"], outputs: ["valueChange"] }, { kind: "component", type: ButtonComponent, selector: "tikal-button", inputs: ["icon", "colour", "size", "label", "isLoading", "outline", "type", "text", "form"], outputs: ["clicked"] }] });
130
138
  }
131
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChatFormComponent, decorators: [{
132
140
  type: Component,
@@ -157,6 +165,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
157
165
  args: [{ selector: 'tikal-player-count', imports: [], template: "<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n", styles: [":host{display:flex;flex-direction:row;gap:.5rem}p{margin:0}.bar{align-self:center;height:.45rem;width:4rem;border-radius:9999px;background-color:var(--p-surface-300)}.bar-fill{height:100%;border-radius:9999px;background-color:var(--p-green-600)}.full{background-color:var(--p-red-600)}\n"] }]
158
166
  }], propDecorators: { currentPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPlayers", required: true }] }], maxPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPlayers", required: true }] }] } });
159
167
 
168
+ class ChipComponent {
169
+ /** What icon should the chip display? */
170
+ icon = input('', /* @ts-ignore */
171
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
172
+ /** What text should the chip display? */
173
+ label = input.required(/* @ts-ignore */
174
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
175
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
176
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ChipComponent, isStandalone: true, selector: "tikal-chip", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p-chip [label]=\"label()\">\n @if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n</p-chip>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ChipModule }, { kind: "component", type: i1$3.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: PIcon, selector: "svg[pIcon]", inputs: ["pIcon"] }] });
177
+ }
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChipComponent, decorators: [{
179
+ type: Component,
180
+ args: [{ selector: 'tikal-chip', imports: [ChipModule, PIcon], template: "<p-chip [label]=\"label()\">\n @if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n</p-chip>\n" }]
181
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
182
+
160
183
  /*
161
184
  * Public API Surface of tikal-ui-components
162
185
  */
@@ -166,5 +189,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
166
189
  * Generated bundle index. Do not edit.
167
190
  */
168
191
 
169
- export { ButtonComponent, ChatFormComponent, InputComponent, PlayerCountComponent, SkeletonComponent };
192
+ export { ButtonComponent, ChatFormComponent, ChipComponent, InputComponent, PlayerCountComponent, SkeletonComponent };
170
193
  //# sourceMappingURL=tikal-ui-components.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tikal-ui-components.mjs","sources":["../../../projects/tikal-ui-components/src/pipes/enum-map.ts","../../../projects/tikal-ui-components/src/lib/components/button/button.ts","../../../projects/tikal-ui-components/src/lib/components/button/button.html","../../../projects/tikal-ui-components/src/lib/components/input/input.ts","../../../projects/tikal-ui-components/src/lib/components/input/input.html","../../../projects/tikal-ui-components/src/lib/components/chat-form/chat-form.ts","../../../projects/tikal-ui-components/src/lib/components/chat-form/chat-form.html","../../../projects/tikal-ui-components/src/lib/components/skeleton/skeleton.ts","../../../projects/tikal-ui-components/src/lib/components/skeleton/skeleton.html","../../../projects/tikal-ui-components/src/lib/components/player-count/player-count.ts","../../../projects/tikal-ui-components/src/lib/components/player-count/player-count.html","../../../projects/tikal-ui-components/src/public-api.ts","../../../projects/tikal-ui-components/src/tikal-ui-components.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'enumMap',\n})\nexport class EnumMapPipe<T> implements PipeTransform {\n transform(value: unknown, enumMap: object, defaultValue?: T): T {\n return enumMap[value as keyof typeof enumMap] ?? defaultValue ?? value;\n }\n}\n","import { Component, input, output } from '@angular/core';\nimport { PIcon, Spinner } from '@primeicons/angular';\nimport { ButtonModule } from 'primeng/button';\nimport { EnumMapPipe } from '../../../pipes/enum-map';\n\nexport type ButtonColour = 'primary' | 'secondary';\n\nexport type ButtonSize = 'small' | 'normal' | 'large';\n\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\n@Component({\n selector: 'tikal-button',\n imports: [ButtonModule, PIcon, EnumMapPipe, Spinner],\n templateUrl: './button.html',\n styleUrl: './button.scss',\n})\nexport class ButtonComponent {\n /** What icon should the button display? */\n readonly icon = input<string>('');\n\n /** What colour should the button be? */\n readonly colour = input<ButtonColour>('primary');\n\n /** What size should the button be? */\n readonly size = input<ButtonSize>('normal');\n\n /** @ignore */\n readonly sizeMap = {\n normal: undefined,\n };\n\n /** What text should the button display? */\n readonly label = input<string>();\n\n /** Is the action related to the button currently running? */\n readonly isLoading = input<boolean>(false);\n\n /** Should the button have an outline? */\n readonly outline = input<boolean>(false);\n\n /** What type should the button be? */\n readonly type = input<ButtonType>('button');\n\n /** Should the button only appear as text? */\n readonly text = input<boolean>(false);\n\n /** @ignore */\n readonly clicked = output<void>();\n}\n","<button\n pButton\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n","import { Component, model, input } from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@Component({\n selector: 'tikal-input',\n imports: [InputTextModule],\n templateUrl: './input.html',\n styleUrl: './input.scss',\n})\nexport class InputComponent implements FormValueControl<string> {\n /** What value should the input have */\n readonly value = model('');\n\n /** Should the input be disabled */\n readonly disabled = input<boolean>(false);\n\n /** Is the content of the input invalid? */\n readonly invalid = input<boolean>(false);\n\n /** Is the input required? */\n readonly required = input<boolean>(false);\n\n /** Was the input touched */\n readonly touched = input<boolean>(false);\n\n /** What is the max input length? */\n readonly maxLength = input<number>();\n\n /** What is the label of the input element? */\n readonly label = input<string>();\n\n /** What placeholder should the input display? */\n readonly placeholder = input<string>();\n}\n","<input\n pInputText\n [ariaLabel]=\"label()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n","import { Component, input, signal } from '@angular/core';\nimport { disabled, form, required, FormRoot, FormField, maxLength } from '@angular/forms/signals';\nimport { InputComponent } from '../input/input';\nimport { ButtonComponent } from '../button/button';\n\ntype ChatFormData = {\n message: string;\n};\n\n@Component({\n selector: 'tikal-chat-form',\n imports: [FormRoot, FormField, InputComponent, ButtonComponent],\n templateUrl: './chat-form.html',\n styleUrl: './chat-form.scss',\n})\nexport class ChatFormComponent {\n /** @ignore */\n private readonly chatFormData = signal<ChatFormData>({ message: '' });\n\n /** What should happen when the form is submitted? */\n readonly onSubmission = input.required<(message: string) => Promise<void>>();\n\n /** What placeholder should be displayed on the input? */\n readonly placeholder = input<string>();\n\n /** What is the max input length? */\n readonly maxLength = input<number>(50);\n\n /** What is the label of the input element? */\n readonly label = input<string>();\n\n /** @ignore */\n readonly chatForm = form(\n this.chatFormData,\n (schemaPath) => {\n required(schemaPath.message);\n maxLength(schemaPath.message, () => this.maxLength());\n disabled(schemaPath, { when: () => this.chatForm().submitting() });\n },\n {\n submission: {\n action: async (field) => {\n const message = field().value().message;\n\n await this.onSubmission()(message);\n\n field.message().reset('');\n },\n },\n },\n );\n}\n","<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n","import { Component } from '@angular/core';\nimport { SkeletonModule } from 'primeng/skeleton';\n\n@Component({\n selector: 'tikal-skeleton',\n imports: [SkeletonModule],\n templateUrl: './skeleton.html',\n styleUrl: './skeleton.scss',\n})\nexport class SkeletonComponent {}\n","<p-skeleton />\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'tikal-player-count',\n imports: [],\n templateUrl: './player-count.html',\n styleUrl: './player-count.scss',\n})\nexport class PlayerCountComponent {\n /** How many players are currently in the lobby? */\n readonly currentPlayers = input.required<number>();\n\n /** How many players fit in the lobby? */\n readonly maxPlayers = input.required<number>();\n}\n","<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n","/*\n * Public API Surface of tikal-ui-components\n */\n\n// Button\nexport * from './lib/components/button/button';\n\n// Input\nexport * from './lib/components/input/input';\n\n// Chat form\nexport * from './lib/components/chat-form/chat-form';\n\n// Skeleton\nexport * from './lib/components/skeleton/skeleton';\n\n// Player count\nexport * from './lib/components/player-count/player-count';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;MAKa,WAAW,CAAA;AACtB,IAAA,SAAS,CAAC,KAAc,EAAE,OAAe,EAAE,YAAgB,EAAA;QACzD,OAAO,OAAO,CAAC,KAA6B,CAAC,IAAI,YAAY,IAAI,KAAK;IACxE;uGAHW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,IAAI;AA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iSAAA,CAAA,EAAA,CAAA;;2FDAa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,WACrB,EAAE,EAAA,QAAA,EAAA,wPAAA,EAAA,MAAA,EAAA,CAAA,iSAAA,CAAA,EAAA;;;AEJb;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"tikal-ui-components.mjs","sources":["../../../projects/tikal-ui-components/src/pipes/enum-map.ts","../../../projects/tikal-ui-components/src/lib/components/button/button.ts","../../../projects/tikal-ui-components/src/lib/components/button/button.html","../../../projects/tikal-ui-components/src/lib/components/input/input.ts","../../../projects/tikal-ui-components/src/lib/components/input/input.html","../../../projects/tikal-ui-components/src/lib/components/chat-form/chat-form.ts","../../../projects/tikal-ui-components/src/lib/components/chat-form/chat-form.html","../../../projects/tikal-ui-components/src/lib/components/skeleton/skeleton.ts","../../../projects/tikal-ui-components/src/lib/components/skeleton/skeleton.html","../../../projects/tikal-ui-components/src/lib/components/player-count/player-count.ts","../../../projects/tikal-ui-components/src/lib/components/player-count/player-count.html","../../../projects/tikal-ui-components/src/lib/components/chip/chip.ts","../../../projects/tikal-ui-components/src/lib/components/chip/chip.html","../../../projects/tikal-ui-components/src/public-api.ts","../../../projects/tikal-ui-components/src/tikal-ui-components.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'enumMap',\n})\nexport class EnumMapPipe<T> implements PipeTransform {\n transform(value: unknown, enumMap: object, defaultValue?: T): T {\n return enumMap[value as keyof typeof enumMap] ?? defaultValue ?? value;\n }\n}\n","import { Component, input, output } from '@angular/core';\nimport { PIcon, Spinner } from '@primeicons/angular';\nimport { ButtonModule } from 'primeng/button';\nimport { EnumMapPipe } from '../../../pipes/enum-map';\n\nexport type ButtonColour = 'primary' | 'secondary';\n\nexport type ButtonSize = 'small' | 'normal' | 'large';\n\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\n@Component({\n selector: 'tikal-button',\n imports: [ButtonModule, PIcon, EnumMapPipe, Spinner],\n templateUrl: './button.html',\n styleUrl: './button.scss',\n})\nexport class ButtonComponent {\n /** What icon should the button display? */\n readonly icon = input<string>('');\n\n /** What colour should the button be? */\n readonly colour = input<ButtonColour>('primary');\n\n /** What size should the button be? */\n readonly size = input<ButtonSize>('normal');\n\n /** @ignore */\n readonly sizeMap = {\n normal: undefined,\n };\n\n /** What text should the button display? */\n readonly label = input<string>();\n\n /** Is the action related to the button currently running? */\n readonly isLoading = input<boolean>(false);\n\n /** Should the button have an outline? */\n readonly outline = input<boolean>(false);\n\n /** What type should the button be? */\n readonly type = input<ButtonType>('button');\n\n /** Should the button only appear as text? */\n readonly text = input<boolean>(false);\n\n /** @ignore */\n readonly clicked = output<void>();\n\n /** What form should the button belong to? */\n readonly form = input<string>();\n}\n","<button\n pButton\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n","import { Component, model, input } from '@angular/core';\nimport { FormValueControl } from '@angular/forms/signals';\nimport { InputTextModule } from 'primeng/inputtext';\n\n@Component({\n selector: 'tikal-input',\n imports: [InputTextModule],\n templateUrl: './input.html',\n styleUrl: './input.scss',\n})\nexport class InputComponent implements FormValueControl<string> {\n /** What value should the input have */\n readonly value = model('');\n\n /** Should the input be disabled */\n readonly disabled = input<boolean>(false);\n\n /** Is the content of the input invalid? */\n readonly invalid = input<boolean>(false);\n\n /** Is the input required? */\n readonly required = input<boolean>(false);\n\n /** Was the input touched */\n readonly touched = input<boolean>(false);\n\n /** What is the max input length? */\n readonly maxLength = input<number>();\n\n /** What is the label of the input element? */\n readonly label = input<string>();\n\n /** What placeholder should the input display? */\n readonly placeholder = input<string>();\n\n /** Should the input take the full widht? */\n readonly expand = input<boolean>(false);\n}\n","<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n","import { Component, input, signal } from '@angular/core';\nimport { disabled, form, required, FormRoot, FormField, maxLength } from '@angular/forms/signals';\nimport { InputComponent } from '../input/input';\nimport { ButtonComponent } from '../button/button';\n\ntype ChatFormData = {\n message: string;\n};\n\n@Component({\n selector: 'tikal-chat-form',\n imports: [FormRoot, FormField, InputComponent, ButtonComponent],\n templateUrl: './chat-form.html',\n styleUrl: './chat-form.scss',\n})\nexport class ChatFormComponent {\n /** @ignore */\n private readonly chatFormData = signal<ChatFormData>({ message: '' });\n\n /** What should happen when the form is submitted? */\n readonly onSubmission = input.required<(message: string) => Promise<void>>();\n\n /** What placeholder should be displayed on the input? */\n readonly placeholder = input<string>();\n\n /** What is the max input length? */\n readonly maxLength = input<number>(50);\n\n /** What is the label of the input element? */\n readonly label = input<string>();\n\n /** @ignore */\n readonly chatForm = form(\n this.chatFormData,\n (schemaPath) => {\n required(schemaPath.message);\n maxLength(schemaPath.message, () => this.maxLength());\n disabled(schemaPath, { when: () => this.chatForm().submitting() });\n },\n {\n submission: {\n action: async (field) => {\n const message = field().value().message;\n\n await this.onSubmission()(message);\n\n field.message().reset('');\n },\n },\n },\n );\n}\n","<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n","import { Component } from '@angular/core';\nimport { SkeletonModule } from 'primeng/skeleton';\n\n@Component({\n selector: 'tikal-skeleton',\n imports: [SkeletonModule],\n templateUrl: './skeleton.html',\n styleUrl: './skeleton.scss',\n})\nexport class SkeletonComponent {}\n","<p-skeleton />\n","import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'tikal-player-count',\n imports: [],\n templateUrl: './player-count.html',\n styleUrl: './player-count.scss',\n})\nexport class PlayerCountComponent {\n /** How many players are currently in the lobby? */\n readonly currentPlayers = input.required<number>();\n\n /** How many players fit in the lobby? */\n readonly maxPlayers = input.required<number>();\n}\n","<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n","import { Component, input } from '@angular/core';\nimport { ChipModule } from 'primeng/chip';\nimport { PIcon } from '@primeicons/angular';\n\n@Component({\n selector: 'tikal-chip',\n imports: [ChipModule, PIcon],\n templateUrl: './chip.html',\n styleUrl: './chip.scss',\n})\nexport class ChipComponent {\n /** What icon should the chip display? */\n readonly icon = input<string>('');\n\n /** What text should the chip display? */\n readonly label = input.required<string>();\n}\n","<p-chip [label]=\"label()\">\n @if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n</p-chip>\n","/*\n * Public API Surface of tikal-ui-components\n */\n\n// Button\nexport * from './lib/components/button/button';\n\n// Input\nexport * from './lib/components/input/input';\n\n// Chat form\nexport * from './lib/components/chat-form/chat-form';\n\n// Skeleton\nexport * from './lib/components/skeleton/skeleton';\n\n// Player count\nexport * from './lib/components/player-count/player-count';\n\n// Chip\nexport * from './lib/components/chip/chip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;MAKa,WAAW,CAAA;AACtB,IAAA,SAAS,CAAC,KAAc,EAAE,OAAe,EAAE,YAAgB,EAAA;QACzD,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A,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECV1B,sGAKA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDCY,UAAU,iOAAE,KAAK,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIhB,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,OAAA,EACb,CAAC,UAAU,EAAE,KAAK,CAAC,EAAA,QAAA,EAAA,sGAAA,EAAA;;;AEN9B;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tikal-ui-components",
3
- "version": "0.7.0",
3
+ "version": "0.8.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Tikal-online/tikal-game.git"
@@ -28,8 +28,10 @@ declare class ButtonComponent {
28
28
  readonly text: _angular_core.InputSignal<boolean>;
29
29
  /** @ignore */
30
30
  readonly clicked: _angular_core.OutputEmitterRef<void>;
31
+ /** What form should the button belong to? */
32
+ readonly form: _angular_core.InputSignal<string | undefined>;
31
33
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
32
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "tikal-button", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "colour": { "alias": "colour"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
34
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "tikal-button", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "colour": { "alias": "colour"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
33
35
  }
34
36
 
35
37
  declare class InputComponent implements FormValueControl<string> {
@@ -49,8 +51,10 @@ declare class InputComponent implements FormValueControl<string> {
49
51
  readonly label: _angular_core.InputSignal<string | undefined>;
50
52
  /** What placeholder should the input display? */
51
53
  readonly placeholder: _angular_core.InputSignal<string | undefined>;
54
+ /** Should the input take the full widht? */
55
+ readonly expand: _angular_core.InputSignal<boolean>;
52
56
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputComponent, never>;
53
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputComponent, "tikal-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
57
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputComponent, "tikal-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "expand": { "alias": "expand"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
54
58
  }
55
59
 
56
60
  type ChatFormData = {
@@ -87,5 +91,14 @@ declare class PlayerCountComponent {
87
91
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PlayerCountComponent, "tikal-player-count", never, { "currentPlayers": { "alias": "currentPlayers"; "required": true; "isSignal": true; }; "maxPlayers": { "alias": "maxPlayers"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
88
92
  }
89
93
 
90
- export { ButtonComponent, ChatFormComponent, InputComponent, PlayerCountComponent, SkeletonComponent };
94
+ declare class ChipComponent {
95
+ /** What icon should the chip display? */
96
+ readonly icon: _angular_core.InputSignal<string>;
97
+ /** What text should the chip display? */
98
+ readonly label: _angular_core.InputSignal<string>;
99
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChipComponent, never>;
100
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChipComponent, "tikal-chip", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
101
+ }
102
+
103
+ export { ButtonComponent, ChatFormComponent, ChipComponent, InputComponent, PlayerCountComponent, SkeletonComponent };
91
104
  export type { ButtonColour, ButtonSize, ButtonType };