@joanroucoux/cairn-ui 0.8.2 → 0.9.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/CHANGELOG.md +99 -0
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +57 -53
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs +155 -47
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs +220 -110
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-async.mjs +392 -216
- package/fesm2022/joanroucoux-cairn-ui-async.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +145 -68
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +87 -47
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs +83 -43
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-button.mjs +184 -104
- package/fesm2022/joanroucoux-cairn-ui-button.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-card.mjs +232 -137
- package/fesm2022/joanroucoux-cairn-ui-card.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +298 -102
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-control.mjs +4 -17
- package/fesm2022/joanroucoux-cairn-ui-control.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs +150 -83
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +508 -471
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs +255 -157
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-drawer.mjs +303 -0
- package/fesm2022/joanroucoux-cairn-ui-drawer.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs +76 -35
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +40 -31
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs +188 -79
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-field.mjs +309 -173
- package/fesm2022/joanroucoux-cairn-ui-field.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +165 -87
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-group-header.mjs +269 -0
- package/fesm2022/joanroucoux-cairn-ui-group-header.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-input.mjs +205 -85
- package/fesm2022/joanroucoux-cairn-ui-input.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +838 -512
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs +401 -225
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs +143 -57
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs +367 -399
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +73 -44
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-result-group.mjs +191 -0
- package/fesm2022/joanroucoux-cairn-ui-result-group.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-row.mjs +376 -146
- package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +183 -81
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs +233 -0
- package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs.map +1 -0
- package/fesm2022/joanroucoux-cairn-ui-select.mjs +121 -67
- package/fesm2022/joanroucoux-cairn-ui-select.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +129 -51
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +80 -39
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs +85 -55
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs +48 -35
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +113 -69
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-table.mjs +1036 -310
- package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs +240 -127
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui.mjs +0 -4
- package/package.json +17 -1
- package/styles/motion.css +1 -13
- package/styles/tokens.css +35 -64
- package/types/joanroucoux-cairn-ui-action-bar.d.ts +9 -14
- package/types/joanroucoux-cairn-ui-alert.d.ts +29 -15
- package/types/joanroucoux-cairn-ui-amount.d.ts +64 -32
- package/types/joanroucoux-cairn-ui-async.d.ts +85 -38
- package/types/joanroucoux-cairn-ui-avatar.d.ts +34 -22
- package/types/joanroucoux-cairn-ui-back-link.d.ts +20 -15
- package/types/joanroucoux-cairn-ui-badge.d.ts +22 -14
- package/types/joanroucoux-cairn-ui-button.d.ts +36 -18
- package/types/joanroucoux-cairn-ui-card.d.ts +48 -23
- package/types/joanroucoux-cairn-ui-choice-chips.d.ts +91 -35
- package/types/joanroucoux-cairn-ui-control.d.ts +9 -18
- package/types/joanroucoux-cairn-ui-delta.d.ts +46 -24
- package/types/joanroucoux-cairn-ui-dialog.d.ts +124 -57
- package/types/joanroucoux-cairn-ui-donut.d.ts +83 -46
- package/types/joanroucoux-cairn-ui-drawer.d.ts +73 -0
- package/types/joanroucoux-cairn-ui-empty.d.ts +20 -13
- package/types/joanroucoux-cairn-ui-external-link.d.ts +6 -10
- package/types/joanroucoux-cairn-ui-fact.d.ts +49 -25
- package/types/joanroucoux-cairn-ui-field.d.ts +72 -49
- package/types/joanroucoux-cairn-ui-filter-chips.d.ts +35 -20
- package/types/joanroucoux-cairn-ui-group-header.d.ts +58 -0
- package/types/joanroucoux-cairn-ui-input.d.ts +59 -37
- package/types/joanroucoux-cairn-ui-line-chart.d.ts +199 -89
- package/types/joanroucoux-cairn-ui-menu.d.ts +81 -44
- package/types/joanroucoux-cairn-ui-meter.d.ts +44 -22
- package/types/joanroucoux-cairn-ui-motion.d.ts +61 -75
- package/types/joanroucoux-cairn-ui-nav-item.d.ts +15 -13
- package/types/joanroucoux-cairn-ui-result-group.d.ts +52 -0
- package/types/joanroucoux-cairn-ui-row.d.ts +79 -37
- package/types/joanroucoux-cairn-ui-segmented.d.ts +51 -27
- package/types/joanroucoux-cairn-ui-select-pill.d.ts +52 -0
- package/types/joanroucoux-cairn-ui-select.d.ts +28 -18
- package/types/joanroucoux-cairn-ui-skeleton.d.ts +35 -18
- package/types/joanroucoux-cairn-ui-stale-link.d.ts +23 -16
- package/types/joanroucoux-cairn-ui-stat.d.ts +26 -21
- package/types/joanroucoux-cairn-ui-switch.d.ts +7 -11
- package/types/joanroucoux-cairn-ui-tab-bar.d.ts +20 -17
- package/types/joanroucoux-cairn-ui-table.d.ts +251 -89
- package/types/joanroucoux-cairn-ui-toast.d.ts +46 -36
- package/types/joanroucoux-cairn-ui.d.ts +1 -2
- package/fesm2022/joanroucoux-cairn-ui.mjs.map +0 -1
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as _angular_core from '@angular/core';
|
|
3
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
4
2
|
/**
|
|
5
|
-
* Marks an element, typically an 18px svg icon, as the leading content of a `ui-field
|
|
6
|
-
*
|
|
7
|
-
* from assistive technologies.
|
|
3
|
+
* Marks an element, typically an 18px svg icon, as the leading content of a `ui-field`, inside the
|
|
4
|
+
* control's left edge. Decorative, so hidden from assistive technologies.
|
|
8
5
|
*
|
|
9
6
|
* @example
|
|
10
7
|
* <ui-field label="Search" labelHidden>
|
|
@@ -12,33 +9,29 @@ import * as _angular_core from '@angular/core';
|
|
|
12
9
|
* <input uiInput type="search" />
|
|
13
10
|
* </ui-field>
|
|
14
11
|
*/
|
|
15
|
-
declare class UiFieldLeading {
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
export declare class UiFieldLeading {
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiFieldLeading, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiFieldLeading, "[uiFieldLeading]", never, {}, {}, never, never, true, never>;
|
|
18
15
|
}
|
|
19
16
|
/**
|
|
20
|
-
* Marks an element, typically an icon button, as the trailing action of a `ui-field
|
|
21
|
-
* control's right edge
|
|
17
|
+
* Marks an element, typically an icon button, as the trailing action of a `ui-field`, on the
|
|
18
|
+
* control's right edge. A toggle should carry `aria-pressed`. The slot shares the right edge with
|
|
19
|
+
* `unit`: set one or the other, not both.
|
|
22
20
|
*
|
|
23
21
|
* @example
|
|
24
22
|
* <ui-field label="Password">
|
|
25
23
|
* <input uiInput type="password" size="xl" />
|
|
26
24
|
* <button uiFieldTrailing type="button" aria-label="Show the password" [attr.aria-pressed]="shown()">...</button>
|
|
27
25
|
* </ui-field>
|
|
28
|
-
*
|
|
29
|
-
* A toggle such as this one should carry `aria-pressed`. The slot shares the right edge with `unit`:
|
|
30
|
-
* set one or the other, not both.
|
|
31
26
|
*/
|
|
32
|
-
declare class UiFieldTrailing {
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
export declare class UiFieldTrailing {
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiFieldTrailing, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiFieldTrailing, "[uiFieldTrailing]", never, {}, {}, never, never, true, never>;
|
|
35
30
|
}
|
|
36
31
|
/**
|
|
37
|
-
* Label, control, hint and error as one unit. The control
|
|
38
|
-
* the
|
|
39
|
-
*
|
|
40
|
-
* The message comes from the caller's `error`, or, where none is set, from the projected control's
|
|
41
|
-
* own validation state once it is touched.
|
|
32
|
+
* Label, control, hint and error as one unit. The projected native control is found and wired with
|
|
33
|
+
* the ARIA attributes. The message comes from `error`, which wins, or else from the control's own
|
|
34
|
+
* validation state once touched.
|
|
42
35
|
*
|
|
43
36
|
* @example
|
|
44
37
|
* <ui-field label="Quantity" hint="Leave empty if unknown">
|
|
@@ -55,30 +48,60 @@ declare class UiFieldTrailing {
|
|
|
55
48
|
* <input uiInput type="search" placeholder="Instrument or account" />
|
|
56
49
|
* </ui-field>
|
|
57
50
|
*/
|
|
58
|
-
declare class UiField {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
51
|
+
export declare class UiField {
|
|
52
|
+
#private;
|
|
53
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
54
|
+
readonly labelHidden: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
55
|
+
readonly hint: import("@angular/core").InputSignal<string | undefined>;
|
|
56
|
+
readonly error: import("@angular/core").InputSignal<string | undefined>;
|
|
57
|
+
readonly unit: import("@angular/core").InputSignal<string | undefined>;
|
|
58
|
+
readonly optional: import("@angular/core").InputSignal<string | undefined>;
|
|
59
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
60
|
+
protected readonly hintId: string;
|
|
61
|
+
protected readonly errorId: string;
|
|
62
|
+
protected readonly control: import("@angular/core").Signal<import("@joanroucoux/cairn-ui/control").UiControl | undefined>;
|
|
63
|
+
protected readonly leading: import("@angular/core").Signal<UiFieldLeading | undefined>;
|
|
64
|
+
protected readonly trailing: import("@angular/core").Signal<UiFieldTrailing | undefined>;
|
|
65
|
+
protected readonly rowClasses: import("@angular/core").Signal<string>;
|
|
66
|
+
protected readonly labelClasses: import("@angular/core").Signal<"sr-only" | "text-label leading-[17px] font-medium text-(--muted-foreground)">;
|
|
67
|
+
protected readonly message: import("@angular/core").Signal<string | undefined>;
|
|
68
|
+
constructor();
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiField, never>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiField, "ui-field", never, {
|
|
71
|
+
"label": {
|
|
72
|
+
"alias": "label";
|
|
73
|
+
"required": true;
|
|
74
|
+
"isSignal": true;
|
|
75
|
+
};
|
|
76
|
+
"labelHidden": {
|
|
77
|
+
"alias": "labelHidden";
|
|
78
|
+
"required": false;
|
|
79
|
+
"isSignal": true;
|
|
80
|
+
};
|
|
81
|
+
"hint": {
|
|
82
|
+
"alias": "hint";
|
|
83
|
+
"required": false;
|
|
84
|
+
"isSignal": true;
|
|
85
|
+
};
|
|
86
|
+
"error": {
|
|
87
|
+
"alias": "error";
|
|
88
|
+
"required": false;
|
|
89
|
+
"isSignal": true;
|
|
90
|
+
};
|
|
91
|
+
"unit": {
|
|
92
|
+
"alias": "unit";
|
|
93
|
+
"required": false;
|
|
94
|
+
"isSignal": true;
|
|
95
|
+
};
|
|
96
|
+
"optional": {
|
|
97
|
+
"alias": "optional";
|
|
98
|
+
"required": false;
|
|
99
|
+
"isSignal": true;
|
|
100
|
+
};
|
|
101
|
+
"invalid": {
|
|
102
|
+
"alias": "invalid";
|
|
103
|
+
"required": false;
|
|
104
|
+
"isSignal": true;
|
|
105
|
+
};
|
|
106
|
+
}, {}, ["control", "leading", "trailing"], ["[uiFieldLeading]", "*", "[uiFieldTrailing]"], true, never>;
|
|
107
|
+
}
|
|
@@ -1,28 +1,43 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
3
2
|
type FilterChipOption = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
count?: number | string | null;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
9
|
-
* A row of single-choice filter pills, each with an optional count, that narrows a list in place
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* A row of single-choice filter pills, each with an optional count, that narrows a list in place.
|
|
9
|
+
* On touch it scrolls on one line; with a fine pointer it wraps. An element marked `uiChipsLeading` is
|
|
10
|
+
* projected first, outside the chips' group, followed by a vertical rule.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* <ui-filter-chips ariaLabel="Filter by class" [options]="classes()" [(value)]="selectedClass" />
|
|
15
14
|
*/
|
|
16
|
-
declare class UiFilterChips {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
export declare class UiFilterChips {
|
|
16
|
+
readonly options: import("@angular/core").InputSignal<FilterChipOption[]>;
|
|
17
|
+
readonly value: import("@angular/core").ModelSignal<string>;
|
|
18
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
19
|
+
protected readonly chipClasses = "flex-none flex h-11 items-center rounded-pill border-0 bg-transparent p-0 font-[inherit] cursor-pointer transition-transform duration-(--duration-press) ease-out active:scale-(--press-scale) focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) pointer-fine:h-8 pointer-fine:focus-visible:outline-offset-2";
|
|
20
|
+
protected pillClasses(optionValue: string): string;
|
|
21
|
+
protected countClasses(optionValue: string): string;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiFilterChips, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiFilterChips, "ui-filter-chips", never, {
|
|
24
|
+
"options": {
|
|
25
|
+
"alias": "options";
|
|
26
|
+
"required": true;
|
|
27
|
+
"isSignal": true;
|
|
28
|
+
};
|
|
29
|
+
"value": {
|
|
30
|
+
"alias": "value";
|
|
31
|
+
"required": true;
|
|
32
|
+
"isSignal": true;
|
|
33
|
+
};
|
|
34
|
+
"ariaLabel": {
|
|
35
|
+
"alias": "ariaLabel";
|
|
36
|
+
"required": true;
|
|
37
|
+
"isSignal": true;
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
"value": "valueChange";
|
|
41
|
+
}, never, ["[uiChipsLeading]"], true, never>;
|
|
25
42
|
}
|
|
26
|
-
|
|
27
|
-
export { UiFilterChips };
|
|
28
|
-
export type { FilterChipOption };
|
|
43
|
+
export type { FilterChipOption };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Header of a card on a phone: the name, its meta underneath, the projected total on the right.
|
|
4
|
+
*
|
|
5
|
+
* With `collapsible` the header is a button inside the heading, with a chevron that turns when the
|
|
6
|
+
* group is folded and a press scale. `expanded` is a model: the page keeps the fold memory and hides
|
|
7
|
+
* the card body itself. `toggleDisabled` keeps the button focusable and announced, but a click
|
|
8
|
+
* changes nothing (a filter holds the group open). `controls` is the id of the body it folds.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <ui-group-header name="Northwind PEA" meta="PEA · 3 lignes" collapsible [(expanded)]="open">
|
|
12
|
+
* <ui-amount [value]="total" />
|
|
13
|
+
* </ui-group-header>
|
|
14
|
+
*/
|
|
15
|
+
export declare class UiGroupHeader {
|
|
16
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
17
|
+
readonly meta: import("@angular/core").InputSignal<string | undefined>;
|
|
18
|
+
readonly collapsible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
19
|
+
readonly expanded: import("@angular/core").ModelSignal<boolean>;
|
|
20
|
+
readonly toggleDisabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
21
|
+
readonly controls: import("@angular/core").InputSignal<string | undefined>;
|
|
22
|
+
protected toggle(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiGroupHeader, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UiGroupHeader, "ui-group-header", never, {
|
|
25
|
+
"name": {
|
|
26
|
+
"alias": "name";
|
|
27
|
+
"required": true;
|
|
28
|
+
"isSignal": true;
|
|
29
|
+
};
|
|
30
|
+
"meta": {
|
|
31
|
+
"alias": "meta";
|
|
32
|
+
"required": false;
|
|
33
|
+
"isSignal": true;
|
|
34
|
+
};
|
|
35
|
+
"collapsible": {
|
|
36
|
+
"alias": "collapsible";
|
|
37
|
+
"required": false;
|
|
38
|
+
"isSignal": true;
|
|
39
|
+
};
|
|
40
|
+
"expanded": {
|
|
41
|
+
"alias": "expanded";
|
|
42
|
+
"required": false;
|
|
43
|
+
"isSignal": true;
|
|
44
|
+
};
|
|
45
|
+
"toggleDisabled": {
|
|
46
|
+
"alias": "toggleDisabled";
|
|
47
|
+
"required": false;
|
|
48
|
+
"isSignal": true;
|
|
49
|
+
};
|
|
50
|
+
"controls": {
|
|
51
|
+
"alias": "controls";
|
|
52
|
+
"required": false;
|
|
53
|
+
"isSignal": true;
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
"expanded": "expandedChange";
|
|
57
|
+
}, never, ["*"], true, never>;
|
|
58
|
+
}
|
|
@@ -1,51 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const CONTROL_SIZES: readonly ["sm", "md", "lg", "xl"];
|
|
1
|
+
import { UiControl, UiControlError } from "@joanroucoux/cairn-ui/control";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** Available control sizes. */
|
|
4
|
+
export declare const CONTROL_SIZES: readonly ["sm", "md", "lg", "xl"];
|
|
6
5
|
type ControlSize = (typeof CONTROL_SIZES)[number];
|
|
7
|
-
declare const CONTROL_BASE_CLASSES = "w-full rounded-control px-3 text-body text-(--foreground) shadow-[inset_0_0_0_1px_var(--border)] placeholder:text-(--muted-foreground) focus-visible:shadow-[inset_0_0_0_2px_var(--ring)] aria-invalid:shadow-[inset_0_0_0_2px_var(--negative)] disabled:cursor-not-allowed disabled:opacity-50";
|
|
8
|
-
declare const CONTROL_SURFACES: readonly ["background", "card"];
|
|
6
|
+
export declare const CONTROL_BASE_CLASSES = "w-full rounded-control px-3 text-body text-(--foreground) shadow-[inset_0_0_0_1px_var(--border)] placeholder:text-(--muted-foreground) focus-visible:shadow-[inset_0_0_0_2px_var(--ring)] aria-invalid:shadow-[inset_0_0_0_2px_var(--negative)] disabled:cursor-not-allowed disabled:opacity-50";
|
|
7
|
+
export declare const CONTROL_SURFACES: readonly ["background", "card"];
|
|
9
8
|
type ControlSurface = (typeof CONTROL_SURFACES)[number];
|
|
10
|
-
declare const CONTROL_SURFACE_CLASSES: Record<ControlSurface, string>;
|
|
11
|
-
declare const CONTROL_SIZE_CLASSES: Record<ControlSize, string>;
|
|
9
|
+
export declare const CONTROL_SURFACE_CLASSES: Record<ControlSurface, string>;
|
|
10
|
+
export declare const CONTROL_SIZE_CLASSES: Record<ControlSize, string>;
|
|
12
11
|
/**
|
|
13
|
-
* Styled native text input.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
|
|
18
|
-
* it can show the message without any binding here.
|
|
12
|
+
* Styled native text input. The host stays a plain `<input>`, so every forms flavor and native
|
|
13
|
+
* attribute keeps working. Declares the `errors` and `touched` inputs Angular's `[formField]` fills,
|
|
14
|
+
* so a surrounding `ui-field` can show the message.
|
|
19
15
|
*
|
|
20
16
|
* @example
|
|
21
17
|
* <input uiInput type="email" placeholder="you@example.com" />
|
|
22
18
|
*/
|
|
23
|
-
declare class UiInput implements UiControl {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
export declare class UiInput implements UiControl {
|
|
20
|
+
readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xl">;
|
|
21
|
+
readonly surface: import("@angular/core").InputSignal<"background" | "card">;
|
|
22
|
+
readonly errors: import("@angular/core").InputSignal<readonly UiControlError[]>;
|
|
23
|
+
readonly touched: import("@angular/core").InputSignal<boolean>;
|
|
24
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiInput, never>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiInput, "input[uiInput]", never, {
|
|
27
|
+
"size": {
|
|
28
|
+
"alias": "size";
|
|
29
|
+
"required": false;
|
|
30
|
+
"isSignal": true;
|
|
31
|
+
};
|
|
32
|
+
"surface": {
|
|
33
|
+
"alias": "surface";
|
|
34
|
+
"required": false;
|
|
35
|
+
"isSignal": true;
|
|
36
|
+
};
|
|
37
|
+
"errors": {
|
|
38
|
+
"alias": "errors";
|
|
39
|
+
"required": false;
|
|
40
|
+
"isSignal": true;
|
|
41
|
+
};
|
|
42
|
+
"touched": {
|
|
43
|
+
"alias": "touched";
|
|
44
|
+
"required": false;
|
|
45
|
+
"isSignal": true;
|
|
46
|
+
};
|
|
47
|
+
}, {}, never, never, true, never>;
|
|
31
48
|
}
|
|
32
49
|
/**
|
|
33
|
-
* Styled native textarea.
|
|
34
|
-
*
|
|
35
|
-
* at a fixed height.
|
|
36
|
-
*
|
|
37
|
-
* Declares the `errors` and `touched` inputs Angular's `[formField]` fills, so a `ui-field` around
|
|
38
|
-
* it can show the message without any binding here.
|
|
50
|
+
* Styled native textarea. It takes no size: it grows from a minimum height. Declares the `errors`
|
|
51
|
+
* and `touched` inputs Angular's `[formField]` fills, so a surrounding `ui-field` can show the message.
|
|
39
52
|
*
|
|
40
53
|
* @example
|
|
41
54
|
* <textarea uiTextarea maxlength="280"></textarea>
|
|
42
55
|
*/
|
|
43
|
-
declare class UiTextarea implements UiControl {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
export declare class UiTextarea implements UiControl {
|
|
57
|
+
readonly errors: import("@angular/core").InputSignal<readonly UiControlError[]>;
|
|
58
|
+
readonly touched: import("@angular/core").InputSignal<boolean>;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTextarea, never>;
|
|
60
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTextarea, "textarea[uiTextarea]", never, {
|
|
61
|
+
"errors": {
|
|
62
|
+
"alias": "errors";
|
|
63
|
+
"required": false;
|
|
64
|
+
"isSignal": true;
|
|
65
|
+
};
|
|
66
|
+
"touched": {
|
|
67
|
+
"alias": "touched";
|
|
68
|
+
"required": false;
|
|
69
|
+
"isSignal": true;
|
|
70
|
+
};
|
|
71
|
+
}, {}, never, never, true, never>;
|
|
48
72
|
}
|
|
49
|
-
|
|
50
|
-
export { CONTROL_BASE_CLASSES, CONTROL_SIZES, CONTROL_SIZE_CLASSES, CONTROL_SURFACES, CONTROL_SURFACE_CLASSES, UiInput, UiTextarea };
|
|
51
|
-
export type { ControlSize, ControlSurface };
|
|
73
|
+
export type { ControlSize, ControlSurface };
|