@joralvmel/cosmos-angular 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/dist/components/badge.component.d.ts +20 -0
- package/dist/components/badge.component.js +46 -0
- package/dist/components/badge.component.js.map +1 -0
- package/dist/components/button.component.js +3 -3
- package/dist/components/calendar.component.d.ts +28 -0
- package/dist/components/calendar.component.js +65 -0
- package/dist/components/calendar.component.js.map +1 -0
- package/dist/components/checkbox.component.d.ts +52 -0
- package/dist/components/checkbox.component.js +152 -0
- package/dist/components/checkbox.component.js.map +1 -0
- package/dist/components/dialog.component.d.ts +44 -0
- package/dist/components/dialog.component.js +106 -0
- package/dist/components/dialog.component.js.map +1 -0
- package/dist/components/icon-button.component.d.ts +26 -0
- package/dist/components/icon-button.component.js +83 -0
- package/dist/components/icon-button.component.js.map +1 -0
- package/dist/components/icon.component.d.ts +6 -8
- package/dist/components/icon.component.js +12 -22
- package/dist/components/icon.component.js.map +1 -1
- package/dist/components/listbox.component.d.ts +41 -0
- package/dist/components/listbox.component.js +100 -0
- package/dist/components/listbox.component.js.map +1 -0
- package/dist/components/pagination.component.d.ts +36 -0
- package/dist/components/pagination.component.js +129 -0
- package/dist/components/pagination.component.js.map +1 -0
- package/dist/components/popover.component.d.ts +43 -0
- package/dist/components/popover.component.js +101 -0
- package/dist/components/popover.component.js.map +1 -0
- package/dist/components/radio-group.component.d.ts +49 -0
- package/dist/components/radio-group.component.js +146 -0
- package/dist/components/radio-group.component.js.map +1 -0
- package/dist/components/select.component.d.ts +49 -0
- package/dist/components/select.component.js +147 -0
- package/dist/components/select.component.js.map +1 -0
- package/dist/components/switch.component.d.ts +47 -0
- package/dist/components/switch.component.js +135 -0
- package/dist/components/switch.component.js.map +1 -0
- package/dist/components/text-field.component.d.ts +73 -0
- package/dist/components/text-field.component.js +239 -0
- package/dist/components/text-field.component.js.map +1 -0
- package/dist/components/textarea.component.d.ts +54 -0
- package/dist/components/textarea.component.js +168 -0
- package/dist/components/textarea.component.js.map +1 -0
- package/dist/index.d.ts +28 -2
- package/dist/index.js +43 -1
- package/dist/index.js.map +1 -1
- package/llms.md +520 -7
- package/package.json +10 -10
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, inject, Output, } from '@angular/core';
|
|
2
|
+
import '@joralvmel/cosmos-elements/icon-button';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Angular proxy; outputs forward the original DOM CustomEvents. */
|
|
5
|
+
export class CosmIconButtonComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.element = inject(ElementRef).nativeElement;
|
|
8
|
+
this.press = new EventEmitter();
|
|
9
|
+
this.pressedChange = new EventEmitter();
|
|
10
|
+
}
|
|
11
|
+
set label(value) {
|
|
12
|
+
this.element.label = value;
|
|
13
|
+
}
|
|
14
|
+
set mode(value) {
|
|
15
|
+
if (value !== undefined)
|
|
16
|
+
this.element.mode = value;
|
|
17
|
+
}
|
|
18
|
+
set variant(value) {
|
|
19
|
+
if (value !== undefined)
|
|
20
|
+
this.element.variant = value;
|
|
21
|
+
}
|
|
22
|
+
set tone(value) {
|
|
23
|
+
if (value !== undefined)
|
|
24
|
+
this.element.tone = value;
|
|
25
|
+
}
|
|
26
|
+
set size(value) {
|
|
27
|
+
if (value !== undefined)
|
|
28
|
+
this.element.size = value;
|
|
29
|
+
}
|
|
30
|
+
set type(value) {
|
|
31
|
+
if (value !== undefined)
|
|
32
|
+
this.element.type = value;
|
|
33
|
+
}
|
|
34
|
+
set disabled(value) {
|
|
35
|
+
this.element.disabled = value;
|
|
36
|
+
}
|
|
37
|
+
set defaultPressed(value) {
|
|
38
|
+
this.element.defaultPressed = value;
|
|
39
|
+
}
|
|
40
|
+
set pressed(value) {
|
|
41
|
+
this.element.pressed = value === undefined ? undefined : booleanAttribute(value);
|
|
42
|
+
}
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.3.0", type: CosmIconButtonComponent, isStandalone: true, selector: "cosm-icon-button", inputs: { label: "label", mode: "mode", variant: "variant", tone: "tone", size: "size", type: "type", disabled: ["disabled", "disabled", booleanAttribute], defaultPressed: ["defaultPressed", "defaultPressed", booleanAttribute], pressed: "pressed" }, outputs: { press: "press", pressedChange: "pressedChange" }, host: { listeners: { "cosm-press": "press.emit($event)", "cosm-pressed-change": "pressedChange.emit($event)" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmIconButtonComponent, decorators: [{
|
|
47
|
+
type: Component,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: 'cosm-icon-button',
|
|
50
|
+
template: '<ng-content />',
|
|
51
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
52
|
+
host: {
|
|
53
|
+
'(cosm-press)': 'press.emit($event)',
|
|
54
|
+
'(cosm-pressed-change)': 'pressedChange.emit($event)',
|
|
55
|
+
},
|
|
56
|
+
}]
|
|
57
|
+
}], propDecorators: { label: [{
|
|
58
|
+
type: Input,
|
|
59
|
+
args: [{ required: true }]
|
|
60
|
+
}], mode: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], variant: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], tone: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], size: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], type: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], disabled: [{
|
|
71
|
+
type: Input,
|
|
72
|
+
args: [{ transform: booleanAttribute }]
|
|
73
|
+
}], defaultPressed: [{
|
|
74
|
+
type: Input,
|
|
75
|
+
args: [{ transform: booleanAttribute }]
|
|
76
|
+
}], pressed: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], press: [{
|
|
79
|
+
type: Output
|
|
80
|
+
}], pressedChange: [{
|
|
81
|
+
type: Output
|
|
82
|
+
}] } });
|
|
83
|
+
//# sourceMappingURL=icon-button.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button.component.js","sourceRoot":"","sources":["../../src/components/icon-button.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AAQvB,OAAO,wCAAwC,CAAC;;AAIhD,oEAAoE;AAUpE,MAAM,OAAO,uBAAuB;IATpC;QAUW,YAAO,GAAmB,MAAM,CAA6B,UAAU,CAAC,CAAC,aAAa,CAAC;QA8B7E,UAAK,GAAG,IAAI,YAAY,EAAsC,CAAC;QAC/D,kBAAa,GAAG,IAAI,YAAY,EAA8C,CAAC;KACnG;IA9BC,IAA+B,KAAK,CAAC,KAAa;QAChD,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7B,CAAC;IACD,IAAa,IAAI,CAAC,KAAoB;QACpC,IAAI,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IACrD,CAAC;IACD,IAAa,OAAO,CAAC,KAAuB;QAC1C,IAAI,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IACxD,CAAC;IACD,IAAa,IAAI,CAAC,KAAoB;QACpC,IAAI,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IACrD,CAAC;IACD,IA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@@
|
|
|
1
|
-
import type { CosmIcon, CosmIconSize } from '@joralvmel/cosmos-elements/icon';
|
|
1
|
+
import type { CosmIcon, CosmIconSize, CosmIconVariant } from '@joralvmel/cosmos-elements/icon';
|
|
2
2
|
import type { IconDefinition } from '@joralvmel/cosmos-icons';
|
|
3
3
|
import '@joralvmel/cosmos-elements/icon';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -6,19 +6,17 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
* Angular proxy of `<cosm-icon>`.
|
|
7
7
|
*
|
|
8
8
|
* ```html
|
|
9
|
-
* <cosm-icon [icon]="house" size="md"
|
|
9
|
+
* <cosm-icon [icon]="house" size="md" label="Home" />
|
|
10
|
+
* <cosm-icon [icon]="heart" variant="filled" />
|
|
10
11
|
* ```
|
|
11
12
|
*/
|
|
12
13
|
export declare class CosmIconComponent {
|
|
13
14
|
readonly element: CosmIcon;
|
|
14
15
|
set icon(value: IconDefinition);
|
|
15
16
|
set size(value: CosmIconSize);
|
|
16
|
-
set
|
|
17
|
-
set
|
|
18
|
-
set strokeWidth(value: number);
|
|
17
|
+
set variant(value: CosmIconVariant);
|
|
18
|
+
set color(value: string);
|
|
19
19
|
set label(value: string | undefined);
|
|
20
|
-
set decorative(value: boolean);
|
|
21
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<CosmIconComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CosmIconComponent, "cosm-icon", never, { "icon": { "alias": "icon"; "required": true; }; "size": { "alias": "size"; "required": false; }; "
|
|
23
|
-
static ngAcceptInputType_decorative: unknown;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CosmIconComponent, "cosm-icon", never, { "icon": { "alias": "icon"; "required": true; }; "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "color": { "alias": "color"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
24
22
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, Input, inject } from '@angular/core';
|
|
2
2
|
import '@joralvmel/cosmos-elements/icon';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Angular proxy of `<cosm-icon>`.
|
|
6
6
|
*
|
|
7
7
|
* ```html
|
|
8
|
-
* <cosm-icon [icon]="house" size="md"
|
|
8
|
+
* <cosm-icon [icon]="house" size="md" label="Home" />
|
|
9
|
+
* <cosm-icon [icon]="heart" variant="filled" />
|
|
9
10
|
* ```
|
|
10
11
|
*/
|
|
11
12
|
export class CosmIconComponent {
|
|
@@ -18,25 +19,19 @@ export class CosmIconComponent {
|
|
|
18
19
|
set size(value) {
|
|
19
20
|
this.element.size = value;
|
|
20
21
|
}
|
|
21
|
-
set
|
|
22
|
-
this.element.
|
|
22
|
+
set variant(value) {
|
|
23
|
+
this.element.variant = value;
|
|
23
24
|
}
|
|
24
|
-
set
|
|
25
|
-
this.element.
|
|
26
|
-
}
|
|
27
|
-
set strokeWidth(value) {
|
|
28
|
-
this.element.strokeWidth = value;
|
|
25
|
+
set color(value) {
|
|
26
|
+
this.element.color = value;
|
|
29
27
|
}
|
|
30
28
|
set label(value) {
|
|
31
29
|
this.element.label = value;
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.5", ngImport: i0, type: CosmIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.2.5", type: CosmIconComponent, isStandalone: true, selector: "cosm-icon", inputs: { icon: "icon", size: "size", stroke: "stroke", fill: "fill", strokeWidth: "strokeWidth", label: "label", decorative: ["decorative", "decorative", booleanAttribute] }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.3.0", type: CosmIconComponent, isStandalone: true, selector: "cosm-icon", inputs: { icon: "icon", size: "size", variant: "variant", color: "color", label: "label" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38
33
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmIconComponent, decorators: [{
|
|
40
35
|
type: Component,
|
|
41
36
|
args: [{
|
|
42
37
|
selector: 'cosm-icon',
|
|
@@ -48,16 +43,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.5", ngImpor
|
|
|
48
43
|
args: [{ required: true }]
|
|
49
44
|
}], size: [{
|
|
50
45
|
type: Input
|
|
51
|
-
}],
|
|
46
|
+
}], variant: [{
|
|
52
47
|
type: Input
|
|
53
|
-
}],
|
|
54
|
-
type: Input
|
|
55
|
-
}], strokeWidth: [{
|
|
48
|
+
}], color: [{
|
|
56
49
|
type: Input
|
|
57
50
|
}], label: [{
|
|
58
51
|
type: Input
|
|
59
|
-
}], decorative: [{
|
|
60
|
-
type: Input,
|
|
61
|
-
args: [{ transform: booleanAttribute }]
|
|
62
52
|
}] } });
|
|
63
53
|
//# sourceMappingURL=icon.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component.js","sourceRoot":"","sources":["../../src/components/icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"icon.component.js","sourceRoot":"","sources":["../../src/components/icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG9F,OAAO,iCAAiC,CAAC;;AAEzC;;;;;;;GAOG;AAMH,MAAM,OAAO,iBAAiB;IAL9B;QAMW,YAAO,GAAa,MAAM,CAAuB,UAAU,CAAC,CAAC,aAAa,CAAC;KAqBrF;IAnBC,IAA+B,IAAI,CAAC,KAAqB;QACvD,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAa,IAAI,CAAC,KAAmB;QACnC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAa,OAAO,CAAC,KAAsB;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAa,KAAK,CAAC,KAAa;QAC9B,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,IAAa,KAAK,CAAC,KAAyB;QAC1C,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7B,CAAC;8GArBU,iBAAiB;kGAAjB,iBAAiB,iKAHlB,gBAAgB;;2FAGf,iBAAiB;kBAL7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,QAAQ,EAAE,gBAAgB;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;sBAIE,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAIxB,KAAK;;sBAIL,KAAK;;sBAIL,KAAK;;sBAIL,KAAK"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { ContractProps, ListboxItem, ListboxSelectionChangeDetail } from '@joralvmel/cosmos-core';
|
|
3
|
+
import type { CosmListbox } from '@joralvmel/cosmos-elements/listbox';
|
|
4
|
+
import type { IconDefinition } from '@joralvmel/cosmos-icons';
|
|
5
|
+
import '@joralvmel/cosmos-elements/listbox';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
type Props = ContractProps<typeof import('@joralvmel/cosmos-core').listboxContract, 'angular', {
|
|
8
|
+
ListboxItems: readonly ListboxItem<IconDefinition>[];
|
|
9
|
+
ListboxValues: readonly string[];
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Angular proxy of `<cosm-listbox>`. Selection behavior remains in Lit; the output re-emits the
|
|
13
|
+
* original DOM `CustomEvent`. A bound `selectedValues` input, including an empty array, is controlled.
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <cosm-listbox label="Choose fruit" [items]="items" (selectionChange)="onSelectionChange($event)" />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class CosmListboxComponent {
|
|
20
|
+
/** The underlying custom element. */
|
|
21
|
+
readonly element: CosmListbox;
|
|
22
|
+
set label(value: Props['label']);
|
|
23
|
+
set labelHidden(value: boolean);
|
|
24
|
+
set items(value: Props['items']);
|
|
25
|
+
set selectionMode(value: Props['selectionMode']);
|
|
26
|
+
/** A bound input is controlled even when its value is `[]`. */
|
|
27
|
+
set selectedValues(value: Props['selectedValues']);
|
|
28
|
+
set defaultSelectedValues(value: Props['defaultSelectedValues']);
|
|
29
|
+
set variant(value: Props['variant']);
|
|
30
|
+
set size(value: Props['size']);
|
|
31
|
+
set disabled(value: boolean);
|
|
32
|
+
set readOnly(value: boolean);
|
|
33
|
+
set locale(value: Props['locale']);
|
|
34
|
+
readonly selectionChange: EventEmitter<CustomEvent<ListboxSelectionChangeDetail>>;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CosmListboxComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CosmListboxComponent, "cosm-listbox", never, { "label": { "alias": "label"; "required": true; }; "labelHidden": { "alias": "labelHidden"; "required": false; }; "items": { "alias": "items"; "required": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedValues": { "alias": "selectedValues"; "required": false; }; "defaultSelectedValues": { "alias": "defaultSelectedValues"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["*"], true, never>;
|
|
37
|
+
static ngAcceptInputType_labelHidden: unknown;
|
|
38
|
+
static ngAcceptInputType_disabled: unknown;
|
|
39
|
+
static ngAcceptInputType_readOnly: unknown;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, inject, Output, } from '@angular/core';
|
|
2
|
+
import '@joralvmel/cosmos-elements/listbox';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Angular proxy of `<cosm-listbox>`. Selection behavior remains in Lit; the output re-emits the
|
|
6
|
+
* original DOM `CustomEvent`. A bound `selectedValues` input, including an empty array, is controlled.
|
|
7
|
+
*
|
|
8
|
+
* ```html
|
|
9
|
+
* <cosm-listbox label="Choose fruit" [items]="items" (selectionChange)="onSelectionChange($event)" />
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export class CosmListboxComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
/** The underlying custom element. */
|
|
15
|
+
this.element = inject(ElementRef).nativeElement;
|
|
16
|
+
this.selectionChange = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
set label(value) {
|
|
19
|
+
this.element.label = value;
|
|
20
|
+
}
|
|
21
|
+
set labelHidden(value) {
|
|
22
|
+
this.element.labelHidden = value;
|
|
23
|
+
}
|
|
24
|
+
set items(value) {
|
|
25
|
+
this.element.items = value;
|
|
26
|
+
}
|
|
27
|
+
set selectionMode(value) {
|
|
28
|
+
if (value !== undefined)
|
|
29
|
+
this.element.selectionMode = value;
|
|
30
|
+
}
|
|
31
|
+
/** A bound input is controlled even when its value is `[]`. */
|
|
32
|
+
set selectedValues(value) {
|
|
33
|
+
this.element.selectedValues = value;
|
|
34
|
+
this.element.selectedValuesControlled = true;
|
|
35
|
+
}
|
|
36
|
+
set defaultSelectedValues(value) {
|
|
37
|
+
if (value !== undefined)
|
|
38
|
+
this.element.defaultSelectedValues = value;
|
|
39
|
+
}
|
|
40
|
+
set variant(value) {
|
|
41
|
+
if (value !== undefined)
|
|
42
|
+
this.element.variant = value;
|
|
43
|
+
}
|
|
44
|
+
set size(value) {
|
|
45
|
+
if (value !== undefined)
|
|
46
|
+
this.element.size = value;
|
|
47
|
+
}
|
|
48
|
+
set disabled(value) {
|
|
49
|
+
this.element.disabled = value;
|
|
50
|
+
}
|
|
51
|
+
set readOnly(value) {
|
|
52
|
+
this.element.readOnly = value;
|
|
53
|
+
}
|
|
54
|
+
set locale(value) {
|
|
55
|
+
this.element.locale = value;
|
|
56
|
+
}
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmListboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.3.0", type: CosmListboxComponent, isStandalone: true, selector: "cosm-listbox", inputs: { label: "label", labelHidden: ["labelHidden", "labelHidden", booleanAttribute], items: "items", selectionMode: "selectionMode", selectedValues: "selectedValues", defaultSelectedValues: "defaultSelectedValues", variant: "variant", size: "size", disabled: ["disabled", "disabled", booleanAttribute], readOnly: ["readOnly", "readOnly", booleanAttribute], locale: "locale" }, outputs: { selectionChange: "selectionChange" }, host: { listeners: { "cosm-selection-change": "selectionChange.emit($event)" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
59
|
+
}
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmListboxComponent, decorators: [{
|
|
61
|
+
type: Component,
|
|
62
|
+
args: [{
|
|
63
|
+
selector: 'cosm-listbox',
|
|
64
|
+
template: '<ng-content />',
|
|
65
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
66
|
+
host: {
|
|
67
|
+
'(cosm-selection-change)': 'selectionChange.emit($event)',
|
|
68
|
+
},
|
|
69
|
+
}]
|
|
70
|
+
}], propDecorators: { label: [{
|
|
71
|
+
type: Input,
|
|
72
|
+
args: [{ required: true }]
|
|
73
|
+
}], labelHidden: [{
|
|
74
|
+
type: Input,
|
|
75
|
+
args: [{ transform: booleanAttribute }]
|
|
76
|
+
}], items: [{
|
|
77
|
+
type: Input,
|
|
78
|
+
args: [{ required: true }]
|
|
79
|
+
}], selectionMode: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], selectedValues: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], defaultSelectedValues: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], variant: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], size: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}], disabled: [{
|
|
90
|
+
type: Input,
|
|
91
|
+
args: [{ transform: booleanAttribute }]
|
|
92
|
+
}], readOnly: [{
|
|
93
|
+
type: Input,
|
|
94
|
+
args: [{ transform: booleanAttribute }]
|
|
95
|
+
}], locale: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], selectionChange: [{
|
|
98
|
+
type: Output
|
|
99
|
+
}] } });
|
|
100
|
+
//# sourceMappingURL=listbox.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listbox.component.js","sourceRoot":"","sources":["../../src/components/listbox.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAC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AAS;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IACrD,CAAC;IACD,IAA4C,QAAQ,CAAC,KAAc;QACjE,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;IAChC,CAAC;IACD,IAA4C,QAAQ,CAAC,KAAc;QACjE,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;IAChC,CAAC;IACD,IAAa,MAAM,CAAC,KAAsB;QACxC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;IAC9B,CAAC;8GAtCU,oBAAoB;kGAApB,oBAAoB,sHAOX,gBAAgB,0MAuBhB,gBAAgB,sCAGhB,gBAAgB,kLAvC1B,gBAAgB;;2FAMf,oBAAoB;kBARhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,cAAc;oBACxB,QAAQ,EAAE,gBAAgB;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,IAAI,EAAE;wBACJ,yBAAyB,EAAE,8BAA8B;qBAC1D;iBACF;;sBAKE,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAGxB,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAGrC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAGxB,KAAK;;sBAIL,KAAK;;sBAIL,KAAK;;sBAGL,KAAK;;sBAGL,KAAK;;sBAGL,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAGrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAGrC,KAAK;;sBAIL,MAAM"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { ContractProps, PaginationChangeDetail, paginationContract } from '@joralvmel/cosmos-core';
|
|
3
|
+
import type { CosmPagination } from '@joralvmel/cosmos-elements/pagination';
|
|
4
|
+
import '@joralvmel/cosmos-elements/pagination';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
type Props = ContractProps<typeof paginationContract, 'angular'>;
|
|
7
|
+
/**
|
|
8
|
+
* Pagination proxy: `<cosm-pagination label="Results" [totalPages]="10" (pageChange)="navigate($event.detail.page)" />`.
|
|
9
|
+
*/
|
|
10
|
+
export declare class CosmPaginationComponent {
|
|
11
|
+
readonly element: CosmPagination;
|
|
12
|
+
set totalPages(value: number);
|
|
13
|
+
set page(value: Props['page']);
|
|
14
|
+
set defaultPage(value: number);
|
|
15
|
+
set label(value: string);
|
|
16
|
+
set previousLabel(value: string);
|
|
17
|
+
set nextLabel(value: string);
|
|
18
|
+
set firstLabel(value: string);
|
|
19
|
+
set lastLabel(value: string);
|
|
20
|
+
set pageLabel(value: string);
|
|
21
|
+
set summaryLabel(value: string);
|
|
22
|
+
set locale(value: Props['locale']);
|
|
23
|
+
set direction(value: NonNullable<Props['direction']>);
|
|
24
|
+
set presentation(value: NonNullable<Props['presentation']>);
|
|
25
|
+
set variant(value: NonNullable<Props['variant']>);
|
|
26
|
+
set size(value: NonNullable<Props['size']>);
|
|
27
|
+
set showFirstLast(value: boolean);
|
|
28
|
+
set disabled(value: boolean);
|
|
29
|
+
readonly pageChange: EventEmitter<CustomEvent<PaginationChangeDetail>>;
|
|
30
|
+
handleChange(event: Event): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CosmPaginationComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CosmPaginationComponent, "cosm-pagination", never, { "totalPages": { "alias": "totalPages"; "required": true; }; "page": { "alias": "page"; "required": false; }; "defaultPage": { "alias": "defaultPage"; "required": false; }; "label": { "alias": "label"; "required": true; }; "previousLabel": { "alias": "previousLabel"; "required": false; }; "nextLabel": { "alias": "nextLabel"; "required": false; }; "firstLabel": { "alias": "firstLabel"; "required": false; }; "lastLabel": { "alias": "lastLabel"; "required": false; }; "pageLabel": { "alias": "pageLabel"; "required": false; }; "summaryLabel": { "alias": "summaryLabel"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "presentation": { "alias": "presentation"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showFirstLast": { "alias": "showFirstLast"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "pageChange": "pageChange"; }, never, ["*"], true, never>;
|
|
33
|
+
static ngAcceptInputType_showFirstLast: unknown;
|
|
34
|
+
static ngAcceptInputType_disabled: unknown;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, inject, Output, } from '@angular/core';
|
|
2
|
+
import '@joralvmel/cosmos-elements/pagination';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Pagination proxy: `<cosm-pagination label="Results" [totalPages]="10" (pageChange)="navigate($event.detail.page)" />`.
|
|
6
|
+
*/
|
|
7
|
+
export class CosmPaginationComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.element = inject(ElementRef).nativeElement;
|
|
10
|
+
this.pageChange = new EventEmitter();
|
|
11
|
+
}
|
|
12
|
+
set totalPages(value) {
|
|
13
|
+
this.element.totalPages = value;
|
|
14
|
+
}
|
|
15
|
+
set page(value) {
|
|
16
|
+
this.element.page = value;
|
|
17
|
+
}
|
|
18
|
+
set defaultPage(value) {
|
|
19
|
+
this.element.defaultPage = value;
|
|
20
|
+
}
|
|
21
|
+
set label(value) {
|
|
22
|
+
this.element.label = value;
|
|
23
|
+
}
|
|
24
|
+
set previousLabel(value) {
|
|
25
|
+
this.element.previousLabel = value;
|
|
26
|
+
}
|
|
27
|
+
set nextLabel(value) {
|
|
28
|
+
this.element.nextLabel = value;
|
|
29
|
+
}
|
|
30
|
+
set firstLabel(value) {
|
|
31
|
+
this.element.firstLabel = value;
|
|
32
|
+
}
|
|
33
|
+
set lastLabel(value) {
|
|
34
|
+
this.element.lastLabel = value;
|
|
35
|
+
}
|
|
36
|
+
set pageLabel(value) {
|
|
37
|
+
this.element.pageLabel = value;
|
|
38
|
+
}
|
|
39
|
+
set summaryLabel(value) {
|
|
40
|
+
this.element.summaryLabel = value;
|
|
41
|
+
}
|
|
42
|
+
set locale(value) {
|
|
43
|
+
this.element.locale = value;
|
|
44
|
+
}
|
|
45
|
+
set direction(value) {
|
|
46
|
+
this.element.direction = value;
|
|
47
|
+
}
|
|
48
|
+
set presentation(value) {
|
|
49
|
+
this.element.presentation = value;
|
|
50
|
+
}
|
|
51
|
+
set variant(value) {
|
|
52
|
+
this.element.variant = value;
|
|
53
|
+
}
|
|
54
|
+
set size(value) {
|
|
55
|
+
this.element.size = value;
|
|
56
|
+
}
|
|
57
|
+
set showFirstLast(value) {
|
|
58
|
+
this.element.showFirstLast = value;
|
|
59
|
+
}
|
|
60
|
+
set disabled(value) {
|
|
61
|
+
this.element.disabled = value;
|
|
62
|
+
}
|
|
63
|
+
handleChange(event) {
|
|
64
|
+
if (!(event instanceof CustomEvent))
|
|
65
|
+
throw new TypeError('Expected a pagination CustomEvent.');
|
|
66
|
+
const detail = event.detail;
|
|
67
|
+
if (typeof detail !== 'object' ||
|
|
68
|
+
detail === null ||
|
|
69
|
+
!('page' in detail) ||
|
|
70
|
+
typeof detail.page !== 'number' ||
|
|
71
|
+
!Number.isSafeInteger(detail.page) ||
|
|
72
|
+
detail.page < 1) {
|
|
73
|
+
throw new TypeError('Expected a pagination change with a positive integer page.');
|
|
74
|
+
}
|
|
75
|
+
this.pageChange.emit(event);
|
|
76
|
+
}
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.3.0", type: CosmPaginationComponent, isStandalone: true, selector: "cosm-pagination", inputs: { totalPages: "totalPages", page: "page", defaultPage: "defaultPage", label: "label", previousLabel: "previousLabel", nextLabel: "nextLabel", firstLabel: "firstLabel", lastLabel: "lastLabel", pageLabel: "pageLabel", summaryLabel: "summaryLabel", locale: "locale", direction: "direction", presentation: "presentation", variant: "variant", size: "size", showFirstLast: ["showFirstLast", "showFirstLast", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { pageChange: "pageChange" }, host: { listeners: { "cosm-change": "handleChange($event)" } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
79
|
+
}
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: CosmPaginationComponent, decorators: [{
|
|
81
|
+
type: Component,
|
|
82
|
+
args: [{
|
|
83
|
+
selector: 'cosm-pagination',
|
|
84
|
+
template: '<ng-content />',
|
|
85
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
86
|
+
host: { '(cosm-change)': 'handleChange($event)' },
|
|
87
|
+
}]
|
|
88
|
+
}], propDecorators: { totalPages: [{
|
|
89
|
+
type: Input,
|
|
90
|
+
args: [{ required: true }]
|
|
91
|
+
}], page: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}], defaultPage: [{
|
|
94
|
+
type: Input
|
|
95
|
+
}], label: [{
|
|
96
|
+
type: Input,
|
|
97
|
+
args: [{ required: true }]
|
|
98
|
+
}], previousLabel: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], nextLabel: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], firstLabel: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], lastLabel: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], pageLabel: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], summaryLabel: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], locale: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], direction: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], presentation: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}], variant: [{
|
|
117
|
+
type: Input
|
|
118
|
+
}], size: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], showFirstLast: [{
|
|
121
|
+
type: Input,
|
|
122
|
+
args: [{ transform: booleanAttribute }]
|
|
123
|
+
}], disabled: [{
|
|
124
|
+
type: Input,
|
|
125
|
+
args: [{ transform: booleanAttribute }]
|
|
126
|
+
}], pageChange: [{
|
|
127
|
+
type: Output
|
|
128
|
+
}] } });
|
|
129
|
+
//# sourceMappingURL=pagination.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.component.js","sourceRoot":"","sources":["../../src/components/pagination.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AAOvB,OAAO,uCAAuC,CAAC;;AAI/C;;GAEG;AAOH,MAAM,OAAO,uBAAuB;IANpC;QAOW,YAAO,GAAmB,MAAM,CAA6B,UAAU,CAAC,CAAC,aAAa,CAAC;QAsD7E,eAAU,GAAG,IAAI,YAAY,EAAuC,CAAC;KAiBzF;IArEC,IAA+B,UAAU,CAAC,KAAa;QACrD,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC;IAClC,CAAC;IACD,IAAa,IAAI,CAAC,KAAoB;QACpC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IAC5B,CAAC;IACD,IAAa,WAAW,CAAC,KAAa;QACpC,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC;IACnC,CAAC;IACD,IAA+B,KAAK,CAAC,KAAa;QAChD,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;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KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAIrC,MAAM"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { ContractProps, PopoverOpenChangeDetail, popoverContract } from '@joralvmel/cosmos-core';
|
|
3
|
+
import type { CosmPopover } from '@joralvmel/cosmos-elements/popover';
|
|
4
|
+
import '@joralvmel/cosmos-elements/popover';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
type Props = ContractProps<typeof popoverContract, 'angular'>;
|
|
7
|
+
/**
|
|
8
|
+
* Angular proxy of `<cosm-popover>`. Inputs are forwarded to the element and `(openChange)`
|
|
9
|
+
* re-emits the original cancelable DOM `CustomEvent`.
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <cosm-popover [open]="isOpen" (openChange)="onOpenChange($event)">
|
|
13
|
+
* <button slot="trigger">Show details</button>
|
|
14
|
+
* <p>Consumer-owned content and semantics.</p>
|
|
15
|
+
* </cosm-popover>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class CosmPopoverComponent {
|
|
19
|
+
/** The underlying custom element and imperative `requestClose()` handle. */
|
|
20
|
+
readonly element: CosmPopover;
|
|
21
|
+
set open(value: boolean | undefined);
|
|
22
|
+
set defaultOpen(value: boolean);
|
|
23
|
+
set triggerMode(value: Props['triggerMode']);
|
|
24
|
+
set closable(value: boolean);
|
|
25
|
+
set closeLabel(value: string);
|
|
26
|
+
set arrow(value: boolean);
|
|
27
|
+
set closeOnEscape(value: boolean);
|
|
28
|
+
set closeOnOutsidePress(value: boolean);
|
|
29
|
+
set side(value: Props['side']);
|
|
30
|
+
set align(value: Props['align']);
|
|
31
|
+
readonly openChange: EventEmitter<CustomEvent<PopoverOpenChangeDetail>>;
|
|
32
|
+
/** Proposes an action close only while the panel is open. */
|
|
33
|
+
requestClose(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CosmPopoverComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CosmPopoverComponent, "cosm-popover", never, { "open": { "alias": "open"; "required": false; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; }; "triggerMode": { "alias": "triggerMode"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "arrow": { "alias": "arrow"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "closeOnOutsidePress": { "alias": "closeOnOutsidePress"; "required": false; }; "side": { "alias": "side"; "required": false; }; "align": { "alias": "align"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
36
|
+
static ngAcceptInputType_open: unknown;
|
|
37
|
+
static ngAcceptInputType_defaultOpen: unknown;
|
|
38
|
+
static ngAcceptInputType_closable: unknown;
|
|
39
|
+
static ngAcceptInputType_arrow: unknown;
|
|
40
|
+
static ngAcceptInputType_closeOnEscape: unknown;
|
|
41
|
+
static ngAcceptInputType_closeOnOutsidePress: unknown;
|
|
42
|
+
}
|
|
43
|
+
export {};
|