@kraft.stitch/angular 0.0.4-beta.1 → 0.0.4-beta.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.
- package/fesm2022/kraft.stitch-angular.mjs +3043 -0
- package/fesm2022/kraft.stitch-angular.mjs.map +1 -0
- package/package.json +17 -16
- package/types/kraft.stitch-angular.d.ts +2395 -0
- package/.github/workflows/npm-publish.yml +0 -41
- package/ng-package.json +0 -10
- package/src/lib/Buttons/button/button.ts +0 -152
- package/src/lib/Buttons/button-group/button-group.ts +0 -129
- package/src/lib/Buttons/chips/chips.ts +0 -131
- package/src/lib/Buttons/fab/fab.ts +0 -96
- package/src/lib/Buttons/split-button/split-button.ts +0 -111
- package/src/lib/Calendars/datepicker/datepicker.ts +0 -105
- package/src/lib/Calendars/daterange/daterange.ts +0 -112
- package/src/lib/Calendars/timepicker/timepicker.ts +0 -117
- package/src/lib/Dropdowns/dropdown/dropdown.ts +0 -121
- package/src/lib/Dropdowns/listbox/listbox.ts +0 -116
- package/src/lib/Inputs/checkbox/checkbox.ts +0 -126
- package/src/lib/Inputs/colour-picker/colour-picker.ts +0 -101
- package/src/lib/Inputs/input/input.ts +0 -139
- package/src/lib/Inputs/otp-input/otp-input.ts +0 -113
- package/src/lib/Inputs/radio/radio.ts +0 -115
- package/src/lib/Inputs/rating/rating.ts +0 -104
- package/src/lib/Inputs/rolling-number/rolling-number.ts +0 -136
- package/src/lib/Inputs/slider/slider.ts +0 -121
- package/src/lib/Inputs/switch/switch.ts +0 -100
- package/src/lib/Inputs/textarea/textarea.ts +0 -129
- package/src/lib/Inputs/theme-switch/theme-switch.ts +0 -61
- package/src/lib/Inputs/uploader/uploader.ts +0 -97
- package/src/lib/Layout/avatar/avatar.ts +0 -66
- package/src/lib/Layout/card/card.ts +0 -88
- package/src/lib/Layout/code-view/code-view.ts +0 -77
- package/src/lib/Layout/dialog/dialog.ts +0 -80
- package/src/lib/Layout/not-found/not-found.ts +0 -73
- package/src/lib/Layout/sidebar/sidebar.ts +0 -97
- package/src/lib/Layout/table/table.ts +0 -81
- package/src/lib/Layout/tooltip/tooltip.ts +0 -48
- package/src/lib/Navigation/accordion/accordion.ts +0 -80
- package/src/lib/Navigation/breadcrumb/breadcrumb.ts +0 -58
- package/src/lib/Navigation/carousel/carousel.ts +0 -70
- package/src/lib/Navigation/context-menu/context-menu.ts +0 -79
- package/src/lib/Navigation/nav-bar/nav-bar.ts +0 -72
- package/src/lib/Navigation/pagination/pagination.ts +0 -82
- package/src/lib/Navigation/stepper/stepper.ts +0 -77
- package/src/lib/Navigation/tab/tab.ts +0 -71
- package/src/lib/Navigation/toolbar/toolbar.ts +0 -60
- package/src/lib/Navigation/top-nav-bar/top-nav-bar.ts +0 -71
- package/src/lib/Navigation/tree-view/tree-view.ts +0 -75
- package/src/lib/Notification/badge/badge.ts +0 -55
- package/src/lib/Notification/loader/loader.ts +0 -41
- package/src/lib/Notification/message/message.ts +0 -60
- package/src/lib/Notification/progress/progress.ts +0 -65
- package/src/lib/Notification/spinner/spinner.ts +0 -50
- package/src/lib/Notification/toast/toast.ts +0 -56
- package/src/public-api.ts +0 -68
- package/src/utils/theme-service.ts +0 -11
- package/tsconfig.json +0 -23
|
@@ -0,0 +1,2395 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { KsVariant, KsBaseSize, KsBaseVariant, KsSize, Palette, ThemeMode, KsRollingGrouping, KsRollingDirection, KsRollingDesign, KsTextTone, KsPosition, LoaderStateEnum, KsToastPosition } from '@kraft.stitch/core';
|
|
4
|
+
export { KsRollingDesign, KsRollingDirection, KsRollingGrouping, KsToast, KsToastPosition, toastStore } from '@kraft.stitch/core';
|
|
5
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
6
|
+
|
|
7
|
+
/** DOM shape of the real `<ks-button>` custom element, typed for the wrapper. */
|
|
8
|
+
type KsButtonElement = HTMLElement & {
|
|
9
|
+
icon: string;
|
|
10
|
+
name: string;
|
|
11
|
+
variant: KsVariant;
|
|
12
|
+
size: KsBaseSize;
|
|
13
|
+
isRounded: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Angular wrapper around the `<ks-button>` Stencil custom element.
|
|
18
|
+
*
|
|
19
|
+
* ## How this actually renders a button (no markup lives in this file)
|
|
20
|
+
*
|
|
21
|
+
* 1. A parent template writes `<ks-button name="Save" (ksClick)="save()">`.
|
|
22
|
+
* 2. Angular's renderer creates that host node with
|
|
23
|
+
* `document.createElement('ks-button')`. Because the side-effect import
|
|
24
|
+
* above already ran `customElements.define('ks-button', ...)`, the
|
|
25
|
+
* **browser itself** immediately upgrades that node into an instance of
|
|
26
|
+
* Stencil's compiled `KsButton` class — this is standard Custom Elements
|
|
27
|
+
* behavior, nothing Angular-specific.
|
|
28
|
+
* 3. That upgrade runs Stencil's `connectedCallback` → `render()`, which
|
|
29
|
+
* injects the real `<button>…</button>` markup as children of the host
|
|
30
|
+
* node. This happens **regardless of Angular** — it's the same thing
|
|
31
|
+
* that would happen if you dropped `<ks-button>` in a plain HTML file.
|
|
32
|
+
* 4. `KsButtonComponent` (this class) is a *second, independent* thing
|
|
33
|
+
* attached to that same host node — Angular doesn't care that the node
|
|
34
|
+
* is also a custom element instance. Its only job is translation:
|
|
35
|
+
* push signal-input values onto the element's real DOM properties, and
|
|
36
|
+
* re-emit the native `clicked` DOM event as an Angular `output()`.
|
|
37
|
+
*
|
|
38
|
+
* `template: ''` (no `<ng-content>`) is intentional: `ks-button`'s Stencil
|
|
39
|
+
* `render()` has no `<slot>`, so there is nothing to project — content
|
|
40
|
+
* written between `<ks-button>` tags wouldn't be displayed by the real
|
|
41
|
+
* component anyway. Content projection would only make sense here if the
|
|
42
|
+
* wrapped Stencil component actually declared a `<slot>`.
|
|
43
|
+
*
|
|
44
|
+
* ## Why the output is called `ksClick`, NOT `clicked`
|
|
45
|
+
*
|
|
46
|
+
* `<ks-button>` (the Stencil element) dispatches a **native** DOM
|
|
47
|
+
* `CustomEvent` literally named `clicked` on the host node. It is tempting
|
|
48
|
+
* to expose the wrapper's own output using that exact same name so the
|
|
49
|
+
* public API "mirrors" the native event — but doing so creates a **name
|
|
50
|
+
* collision** that makes the event fire twice from a parent template such
|
|
51
|
+
* as `<ks-button (clicked)="log($event)">`:
|
|
52
|
+
*
|
|
53
|
+
* For *any* event binding in a template, Ivy's `ɵɵlistener` instruction
|
|
54
|
+
* does two things whenever the bound name also happens to match a
|
|
55
|
+
* directive/component **output** on that element (`tNode.outputs[name]`):
|
|
56
|
+
* 1. It subscribes the template's handler to that output (`output.emit()`
|
|
57
|
+
* calls it).
|
|
58
|
+
* 2. It **also** attaches a genuine `addEventListener(name, …)` straight
|
|
59
|
+
* onto the host DOM node for that same literal name, independent of
|
|
60
|
+
* step 1 — Ivy can't know whether the name is "just" an output or also
|
|
61
|
+
* a real DOM event some element in the tree might dispatch, so it wires
|
|
62
|
+
* both to be safe.
|
|
63
|
+
*
|
|
64
|
+
* If the output were named `clicked`, both of those fire for the *same*
|
|
65
|
+
* underlying interaction here: (1) our own `this.ksClick.emit(...)` call
|
|
66
|
+
* below invokes the template handler once, and (2) the raw native
|
|
67
|
+
* `clicked` `CustomEvent` that `<ks-button>` dispatches on the host node
|
|
68
|
+
* is picked up by Ivy's own native listener from step 2 and invokes the
|
|
69
|
+
* *same* template handler a second time — with a different, unwrapped
|
|
70
|
+
* event object. (An earlier attempt at fixing this used
|
|
71
|
+
* `@HostListener('clicked', ['$event'])`, which hits the same
|
|
72
|
+
* `tNode.outputs['clicked']` check and instead causes *infinite emit
|
|
73
|
+
* recursion*, since the host listener itself becomes a subscriber of the
|
|
74
|
+
* output it emits on.)
|
|
75
|
+
*
|
|
76
|
+
* Naming the output `ksClick` (no relation to any real DOM event name)
|
|
77
|
+
* removes the collision entirely: a parent writes
|
|
78
|
+
* `<ks-button (ksClick)="log($event)">`, Ivy subscribes that to our
|
|
79
|
+
* output, and the phantom native `addEventListener('ksClick', …)` it also
|
|
80
|
+
* attaches never fires because no such DOM event exists. Only the manual
|
|
81
|
+
* `addEventListener('clicked', …)` below — on the *internal* native event
|
|
82
|
+
* name, never referenced in any template — observes the real click and
|
|
83
|
+
* re-emits it once through `ksClick`. (This mirrors how libraries like
|
|
84
|
+
* Ionic prefix outputs, e.g. `ionChange` instead of `change`, for exactly
|
|
85
|
+
* this reason.)
|
|
86
|
+
*/
|
|
87
|
+
declare class KsButtonComponent {
|
|
88
|
+
private readonly el;
|
|
89
|
+
/** Icon class string (e.g. Material Icon or Font Awesome class) */
|
|
90
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
91
|
+
/** Button label text */
|
|
92
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
93
|
+
/** Visual style variant */
|
|
94
|
+
readonly variant: _angular_core.InputSignal<KsVariant>;
|
|
95
|
+
/** Size */
|
|
96
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
97
|
+
/** Renders the button with fully-rounded pill corners */
|
|
98
|
+
readonly isRounded: _angular_core.InputSignal<boolean>;
|
|
99
|
+
/** Disables the button */
|
|
100
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* Emits the `MouseEvent` from the native `clicked` `CustomEvent`
|
|
103
|
+
* dispatched by `<ks-button>`. Deliberately NOT named `clicked` — see
|
|
104
|
+
* the class doc comment above for why that would fire this event twice.
|
|
105
|
+
*/
|
|
106
|
+
readonly ksClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
107
|
+
constructor(ref: ElementRef<KsButtonElement>);
|
|
108
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsButtonComponent, never>;
|
|
109
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsButtonComponent, "ks-button", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "isRounded": { "alias": "isRounded"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "ksClick": "ksClick"; }, never, never, true, never>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Mirrors `KsButtonGroupItem` exported by
|
|
114
|
+
* `core/src/components/Buttons/button-group/button-group.tsx`.
|
|
115
|
+
*
|
|
116
|
+
* Duplicated here (instead of importing it from `@kraft.stitch/core`) because that
|
|
117
|
+
* package's root barrel (`core/src/index.ts`) is still being assembled and
|
|
118
|
+
* does not yet reliably re-export every per-component type — only the
|
|
119
|
+
* shared enums in `ks-ui.types` (`KsBaseSize`, `KsBaseVariant`, `KsVariant`,
|
|
120
|
+
* imported below) are stable to depend on today. Keep this in sync with the
|
|
121
|
+
* Stencil source if its shape changes.
|
|
122
|
+
*/
|
|
123
|
+
interface KsButtonGroupItem {
|
|
124
|
+
key: string;
|
|
125
|
+
label?: string;
|
|
126
|
+
icon?: string;
|
|
127
|
+
disabled?: boolean;
|
|
128
|
+
}
|
|
129
|
+
type KsButtonGroupDisplayStyle = 'default' | 'switch';
|
|
130
|
+
/** DOM shape of the real `<ks-button-group>` custom element, typed for the wrapper. */
|
|
131
|
+
type KsButtonGroupElement = HTMLElement & {
|
|
132
|
+
buttons: KsButtonGroupItem[];
|
|
133
|
+
variant: KsBaseVariant;
|
|
134
|
+
size: KsBaseSize;
|
|
135
|
+
displayStyle: KsButtonGroupDisplayStyle;
|
|
136
|
+
multi: boolean;
|
|
137
|
+
selectable: boolean;
|
|
138
|
+
disabled: boolean;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Angular wrapper around the `<ks-button-group>` Stencil custom element.
|
|
142
|
+
*
|
|
143
|
+
* `template: ''` — the Stencil `render()` for this element has no `<slot>`,
|
|
144
|
+
* so there is nothing for this wrapper to project; every button is
|
|
145
|
+
* generated from the `buttons` input.
|
|
146
|
+
*
|
|
147
|
+
* ## Output naming
|
|
148
|
+
* The native element dispatches DOM `CustomEvent`s named `clicked` and
|
|
149
|
+
* `selectionChanged`. Both outputs below are renamed with a `ks` prefix
|
|
150
|
+
* (`ksClick`, `ksSelectionChange`) rather than reusing those exact strings.
|
|
151
|
+
* Doing so is required, not just cosmetic: for a template binding such as
|
|
152
|
+
* `<ks-button-group (clicked)="...">`, Angular's `ɵɵlistener` instruction
|
|
153
|
+
* *always* attaches a raw `addEventListener('clicked', …)` to the host
|
|
154
|
+
* element in addition to subscribing to a same-named component output —
|
|
155
|
+
* this is unconditional for element nodes (see
|
|
156
|
+
* `packages/core/src/render3/instructions/listener.ts` →
|
|
157
|
+
* `listenerInternal`), not something a custom-elements schema can opt out
|
|
158
|
+
* of. With a same-named output, the parent handler would therefore run
|
|
159
|
+
* *twice* per interaction — once via our own unwrapped `.emit()` call, once
|
|
160
|
+
* via Angular's own raw listener receiving the untouched `CustomEvent`
|
|
161
|
+
* (defeating the "no `event.detail`" requirement). Prefixing every output
|
|
162
|
+
* with `ks` guarantees the literal name never matches a real DOM event, so
|
|
163
|
+
* only our manual listener (below) ever observes it. See `button/button.ts`
|
|
164
|
+
* for the original write-up of this same issue.
|
|
165
|
+
*/
|
|
166
|
+
declare class KsButtonGroupComponent {
|
|
167
|
+
private readonly el;
|
|
168
|
+
/** The buttons to render */
|
|
169
|
+
readonly buttons: _angular_core.InputSignal<KsButtonGroupItem[]>;
|
|
170
|
+
/** Visual variant */
|
|
171
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
172
|
+
/** Size */
|
|
173
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
174
|
+
/** Display style: 'default' (filled/outlined) or 'switch' (pill toggle) */
|
|
175
|
+
readonly displayStyle: _angular_core.InputSignal<KsButtonGroupDisplayStyle>;
|
|
176
|
+
/** Allow multiple selected buttons (toggle mode) */
|
|
177
|
+
readonly multi: _angular_core.InputSignal<boolean>;
|
|
178
|
+
/** Toggle/selection mode — shows active state on click */
|
|
179
|
+
readonly selectable: _angular_core.InputSignal<boolean>;
|
|
180
|
+
/** Disables the entire group */
|
|
181
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
182
|
+
/** Emits the clicked button's `key`. From the native `clicked` event. */
|
|
183
|
+
readonly ksClick: _angular_core.OutputEmitterRef<string>;
|
|
184
|
+
/** Emits the current selection when `selectable`. From the native `selectionChanged` event. */
|
|
185
|
+
readonly ksSelectionChange: _angular_core.OutputEmitterRef<string[]>;
|
|
186
|
+
constructor(ref: ElementRef<KsButtonGroupElement>);
|
|
187
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsButtonGroupComponent, never>;
|
|
188
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsButtonGroupComponent, "ks-button-group", never, { "buttons": { "alias": "buttons"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "displayStyle": { "alias": "displayStyle"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "ksClick": "ksClick"; "ksSelectionChange": "ksSelectionChange"; }, never, never, true, never>;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Mirrors `KsChipOption` exported by
|
|
193
|
+
* `core/src/components/Buttons/chips/chips.tsx`. Duplicated locally — see
|
|
194
|
+
* the note in `button-group/button-group.ts` on why component-specific
|
|
195
|
+
* shapes aren't imported from `@kraft.stitch/core`'s root barrel yet.
|
|
196
|
+
*/
|
|
197
|
+
interface KsChipOption {
|
|
198
|
+
value: string | number;
|
|
199
|
+
label: string;
|
|
200
|
+
icon?: string;
|
|
201
|
+
disabled?: boolean;
|
|
202
|
+
}
|
|
203
|
+
type KsChipsValue = (string | number) | (string | number)[] | null;
|
|
204
|
+
/** DOM shape of the real `<ks-chips>` custom element, typed for the wrapper. */
|
|
205
|
+
type KsChipsElement = HTMLElement & {
|
|
206
|
+
options: KsChipOption[];
|
|
207
|
+
multi: boolean;
|
|
208
|
+
label: string;
|
|
209
|
+
size: KsBaseSize;
|
|
210
|
+
isRounded: boolean;
|
|
211
|
+
disabled: boolean;
|
|
212
|
+
value: KsChipsValue;
|
|
213
|
+
writeValue(val: KsChipsValue): Promise<void>;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Angular wrapper around the `<ks-chips>` Stencil custom element.
|
|
217
|
+
*
|
|
218
|
+
* ## Two-way binding
|
|
219
|
+
* The Stencil source's own doc comment says Angular forms integration
|
|
220
|
+
* (`ngModel`/`formControl`) would be "provided later by the generated
|
|
221
|
+
* output-target wrappers" — this is that wrapper. Rather than trying to
|
|
222
|
+
* reuse Angular's `[(value)]` banana-box sugar (which would require an
|
|
223
|
+
* output literally named `valueChange`, colliding with the native
|
|
224
|
+
* `valueChange` `CustomEvent` the element already dispatches — see
|
|
225
|
+
* `button/button.ts` for why that double-fires), two-way binding is
|
|
226
|
+
* implemented the idiomatic Angular way: `ControlValueAccessor`. Bind with
|
|
227
|
+
* `[(ngModel)]="fruit"` or `formControlName="fruit"` and it Just Works,
|
|
228
|
+
* because `NgModel`/`FormControlDirective` talk to `writeValue` /
|
|
229
|
+
* `registerOnChange` directly through DI — no template event-name matching
|
|
230
|
+
* involved, so there's no collision to worry about.
|
|
231
|
+
*
|
|
232
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
233
|
+
* `[value]="fruit" (ksValueChange)="fruit = $event"`.
|
|
234
|
+
*
|
|
235
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render, nothing to project.
|
|
236
|
+
*/
|
|
237
|
+
declare class KsChipsComponent implements ControlValueAccessor {
|
|
238
|
+
private readonly el;
|
|
239
|
+
private onChange;
|
|
240
|
+
private onTouched;
|
|
241
|
+
/** Full list of chip options */
|
|
242
|
+
readonly options: _angular_core.InputSignal<KsChipOption[]>;
|
|
243
|
+
/** Allow selecting multiple chips */
|
|
244
|
+
readonly multi: _angular_core.InputSignal<boolean>;
|
|
245
|
+
/** Field label */
|
|
246
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
247
|
+
/** Size */
|
|
248
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
249
|
+
/** Renders chips with fully-rounded pill corners */
|
|
250
|
+
readonly isRounded: _angular_core.InputSignal<boolean>;
|
|
251
|
+
/** Disabled state */
|
|
252
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
253
|
+
/** Initial/controlled value for plain (non-forms) usage. Prefer `[(ngModel)]` / `formControlName` when inside a form. */
|
|
254
|
+
readonly value: _angular_core.InputSignal<KsChipsValue>;
|
|
255
|
+
/** Emits the newly-selected value(s). From the native `valueChange` event. */
|
|
256
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<KsChipsValue>;
|
|
257
|
+
constructor(ref: ElementRef<KsChipsElement>);
|
|
258
|
+
/** `ControlValueAccessor` — called by `ngModel`/`formControl` to push a value in. */
|
|
259
|
+
writeValue(value: KsChipsValue): void;
|
|
260
|
+
registerOnChange(fn: (value: KsChipsValue) => void): void;
|
|
261
|
+
registerOnTouched(fn: () => void): void;
|
|
262
|
+
setDisabledState(isDisabled: boolean): void;
|
|
263
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsChipsComponent, never>;
|
|
264
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsChipsComponent, "ks-chips", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "isRounded": { "alias": "isRounded"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; }, never, never, true, never>;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Mirrors `KsFabAction` / `KsFabPosition` exported by
|
|
269
|
+
* `core/src/components/Buttons/fab/fab.tsx`. Duplicated locally — see the
|
|
270
|
+
* note in `button-group/button-group.ts` for why.
|
|
271
|
+
*/
|
|
272
|
+
interface KsFabAction {
|
|
273
|
+
key: string;
|
|
274
|
+
icon: string;
|
|
275
|
+
label?: string;
|
|
276
|
+
variant?: KsBaseVariant;
|
|
277
|
+
}
|
|
278
|
+
type KsFabPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
279
|
+
/** DOM shape of the real `<ks-fab>` custom element, typed for the wrapper. */
|
|
280
|
+
type KsFabElement = HTMLElement & {
|
|
281
|
+
icon: string;
|
|
282
|
+
label: string;
|
|
283
|
+
variant: KsBaseVariant;
|
|
284
|
+
size: KsBaseSize;
|
|
285
|
+
actions: KsFabAction[];
|
|
286
|
+
disabled: boolean;
|
|
287
|
+
position: KsFabPosition;
|
|
288
|
+
appendToParent: boolean;
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Angular wrapper around the `<ks-fab>` Stencil custom element.
|
|
292
|
+
*
|
|
293
|
+
* `ksClick` is renamed away from the native `clicked` event name for the
|
|
294
|
+
* same double-fire reason documented in `button/button.ts` and
|
|
295
|
+
* `button-group/button-group.ts`. `template: ''` — no `<slot>` in the
|
|
296
|
+
* wrapped Stencil render.
|
|
297
|
+
*/
|
|
298
|
+
declare class KsFabComponent {
|
|
299
|
+
private readonly el;
|
|
300
|
+
/** Icon for the main FAB button */
|
|
301
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
302
|
+
/** Accessible label / tooltip */
|
|
303
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
304
|
+
/** Variant */
|
|
305
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
306
|
+
/** Size */
|
|
307
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
308
|
+
/** Speed-dial actions shown on expand */
|
|
309
|
+
readonly actions: _angular_core.InputSignal<KsFabAction[]>;
|
|
310
|
+
/** Disabled */
|
|
311
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
312
|
+
/** Corner to anchor the FAB inside its nearest positioned container */
|
|
313
|
+
readonly position: _angular_core.InputSignal<KsFabPosition>;
|
|
314
|
+
/** When true (default), positions `absolute` inside the nearest positioned ancestor; when false, `fixed` to the viewport */
|
|
315
|
+
readonly appendToParent: _angular_core.InputSignal<boolean>;
|
|
316
|
+
/** Emits `'main'` for the main button, or a speed-dial action's `key`. From the native `clicked` event. */
|
|
317
|
+
readonly ksClick: _angular_core.OutputEmitterRef<string>;
|
|
318
|
+
constructor(ref: ElementRef<KsFabElement>);
|
|
319
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsFabComponent, never>;
|
|
320
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsFabComponent, "ks-fab", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "appendToParent": { "alias": "appendToParent"; "required": false; "isSignal": true; }; }, { "ksClick": "ksClick"; }, never, never, true, never>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Mirrors `KsSplitButtonItem` exported by
|
|
325
|
+
* `core/src/components/Buttons/split-button/split-button.tsx`. Duplicated
|
|
326
|
+
* locally — see the note in `button-group/button-group.ts` for why.
|
|
327
|
+
*/
|
|
328
|
+
interface KsSplitButtonItem {
|
|
329
|
+
key: string;
|
|
330
|
+
label?: string;
|
|
331
|
+
/** Icon class string (e.g. ks-icon-pencil) */
|
|
332
|
+
icon?: string;
|
|
333
|
+
disabled?: boolean;
|
|
334
|
+
/** Renders the item in the danger colour */
|
|
335
|
+
destructive?: boolean;
|
|
336
|
+
/** Renders a divider line instead of an item */
|
|
337
|
+
separator?: boolean;
|
|
338
|
+
}
|
|
339
|
+
/** DOM shape of the real `<ks-split-button>` custom element, typed for the wrapper. */
|
|
340
|
+
type KsSplitButtonElement = HTMLElement & {
|
|
341
|
+
label: string;
|
|
342
|
+
icon: string;
|
|
343
|
+
variant: KsVariant;
|
|
344
|
+
size: KsBaseSize;
|
|
345
|
+
disabled: boolean;
|
|
346
|
+
items: KsSplitButtonItem[];
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Angular wrapper around the `<ks-split-button>` Stencil custom element.
|
|
350
|
+
*
|
|
351
|
+
* Outputs are prefixed with `ks` (`ksClick`, `ksItemSelected`) instead of
|
|
352
|
+
* reusing the native event names `clicked` / `itemSelected` — see
|
|
353
|
+
* `button/button.ts` for why a same-named output would fire twice.
|
|
354
|
+
* `template: ''` — the wrapped Stencil `render()` has no `<slot>`.
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* ```html
|
|
358
|
+
* <ks-split-button
|
|
359
|
+
* label="Save"
|
|
360
|
+
* [items]="items"
|
|
361
|
+
* (ksClick)="save()"
|
|
362
|
+
* (ksItemSelected)="onSelect($event)"
|
|
363
|
+
* ></ks-split-button>
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
declare class KsSplitButtonComponent {
|
|
367
|
+
private readonly el;
|
|
368
|
+
/** Main button label */
|
|
369
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
370
|
+
/** Main button icon class */
|
|
371
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
372
|
+
/** Visual style variant */
|
|
373
|
+
readonly variant: _angular_core.InputSignal<KsVariant>;
|
|
374
|
+
/** Size */
|
|
375
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
376
|
+
/** Disables both buttons */
|
|
377
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
378
|
+
/** Menu entries */
|
|
379
|
+
readonly items: _angular_core.InputSignal<KsSplitButtonItem[]>;
|
|
380
|
+
/** Emits the `MouseEvent` when the main button is clicked. From the native `clicked` event. */
|
|
381
|
+
readonly ksClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
382
|
+
/** Emits the selected item's `key`. From the native `itemSelected` event. */
|
|
383
|
+
readonly ksItemSelected: _angular_core.OutputEmitterRef<string>;
|
|
384
|
+
constructor(ref: ElementRef<KsSplitButtonElement>);
|
|
385
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsSplitButtonComponent, never>;
|
|
386
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsSplitButtonComponent, "ks-split-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "ksClick": "ksClick"; "ksItemSelected": "ksItemSelected"; }, never, never, true, never>;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/** DOM shape of the real `<ks-datepicker>` custom element, typed for the wrapper. */
|
|
390
|
+
type KsDatepickerElement = HTMLElement & {
|
|
391
|
+
label: string;
|
|
392
|
+
placeholder: string;
|
|
393
|
+
minDate: Date | null;
|
|
394
|
+
maxDate: Date | null;
|
|
395
|
+
disabled: boolean;
|
|
396
|
+
selectedDate: Date | null;
|
|
397
|
+
writeValue(val: Date | null): Promise<void>;
|
|
398
|
+
};
|
|
399
|
+
/**
|
|
400
|
+
* Angular wrapper around the `<ks-datepicker>` Stencil custom element.
|
|
401
|
+
*
|
|
402
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
403
|
+
* `formControlName` and it works through DI (`writeValue` /
|
|
404
|
+
* `registerOnChange`), with no template event-name collision to worry
|
|
405
|
+
* about. See `chips/chips.ts` for the full rationale (same pattern, same
|
|
406
|
+
* reason the native `selectedDateChange` event can't be reused verbatim as
|
|
407
|
+
* an Angular output name).
|
|
408
|
+
*
|
|
409
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
410
|
+
* `[selectedDate]="d" (ksSelectedDateChange)="d = $event"`.
|
|
411
|
+
*
|
|
412
|
+
* `template: ''` — the projected panel content in the Stencil render is
|
|
413
|
+
* internal (calendar grid projected into the shared `<ks-overlay-field>`
|
|
414
|
+
* default slot); there is no slot exposed on `<ks-datepicker>` itself for
|
|
415
|
+
* a consumer to project into.
|
|
416
|
+
*/
|
|
417
|
+
declare class KsDatepickerComponent implements ControlValueAccessor {
|
|
418
|
+
private readonly el;
|
|
419
|
+
private onChange;
|
|
420
|
+
private onTouched;
|
|
421
|
+
/** Field label */
|
|
422
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
423
|
+
/** Placeholder text */
|
|
424
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
425
|
+
/** Min selectable date */
|
|
426
|
+
readonly minDate: _angular_core.InputSignal<Date>;
|
|
427
|
+
/** Max selectable date */
|
|
428
|
+
readonly maxDate: _angular_core.InputSignal<Date>;
|
|
429
|
+
/** Disabled state */
|
|
430
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
431
|
+
/** Initial/controlled value for plain (non-forms) usage. Prefer `[(ngModel)]` / `formControlName` when inside a form. */
|
|
432
|
+
readonly selectedDate: _angular_core.InputSignal<Date>;
|
|
433
|
+
/** Emits the newly-picked date. From the native `selectedDateChange` event. */
|
|
434
|
+
readonly ksSelectedDateChange: _angular_core.OutputEmitterRef<Date>;
|
|
435
|
+
constructor(ref: ElementRef<KsDatepickerElement>);
|
|
436
|
+
writeValue(value: Date | null): void;
|
|
437
|
+
registerOnChange(fn: (value: Date | null) => void): void;
|
|
438
|
+
registerOnTouched(fn: () => void): void;
|
|
439
|
+
setDisabledState(isDisabled: boolean): void;
|
|
440
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsDatepickerComponent, never>;
|
|
441
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsDatepickerComponent, "ks-datepicker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectedDate": { "alias": "selectedDate"; "required": false; "isSignal": true; }; }, { "ksSelectedDateChange": "ksSelectedDateChange"; }, never, never, true, never>;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Mirrors `KsDateRange` / `KsPresetRange` exported by
|
|
446
|
+
* `core/src/components/Calendars/daterange/daterange.types.ts`. Duplicated
|
|
447
|
+
* locally — see the note in `button-group/button-group.ts` for why.
|
|
448
|
+
*/
|
|
449
|
+
interface KsDateRange {
|
|
450
|
+
start: Date | null;
|
|
451
|
+
end: Date | null;
|
|
452
|
+
}
|
|
453
|
+
interface KsPresetRange {
|
|
454
|
+
label: string;
|
|
455
|
+
range: () => KsDateRange;
|
|
456
|
+
}
|
|
457
|
+
/** DOM shape of the real `<ks-daterange>` custom element, typed for the wrapper. */
|
|
458
|
+
type KsDaterangeElement = HTMLElement & {
|
|
459
|
+
label: string;
|
|
460
|
+
placeholder: string;
|
|
461
|
+
minDate: Date | null;
|
|
462
|
+
maxDate: Date | null;
|
|
463
|
+
presets: KsPresetRange[];
|
|
464
|
+
showPresets: boolean;
|
|
465
|
+
disabled: boolean;
|
|
466
|
+
range: KsDateRange;
|
|
467
|
+
writeValue(val: KsDateRange | null): Promise<void>;
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* Angular wrapper around the `<ks-daterange>` Stencil custom element.
|
|
471
|
+
*
|
|
472
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
473
|
+
* `formControlName`. See `chips/chips.ts` for the full rationale (the
|
|
474
|
+
* native `rangeChange` event can't be reused verbatim as an Angular output
|
|
475
|
+
* name without a double-fire risk).
|
|
476
|
+
*
|
|
477
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
478
|
+
* `[range]="r" (ksRangeChange)="r = $event"`.
|
|
479
|
+
*
|
|
480
|
+
* `template: ''` — no slot is exposed on `<ks-daterange>` itself.
|
|
481
|
+
*/
|
|
482
|
+
declare class KsDaterangeComponent implements ControlValueAccessor {
|
|
483
|
+
private readonly el;
|
|
484
|
+
private onChange;
|
|
485
|
+
private onTouched;
|
|
486
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
487
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
488
|
+
readonly minDate: _angular_core.InputSignal<Date>;
|
|
489
|
+
readonly maxDate: _angular_core.InputSignal<Date>;
|
|
490
|
+
readonly presets: _angular_core.InputSignal<KsPresetRange[]>;
|
|
491
|
+
readonly showPresets: _angular_core.InputSignal<boolean>;
|
|
492
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
493
|
+
/** Initial/controlled value for plain (non-forms) usage. Prefer `[(ngModel)]` / `formControlName` when inside a form. */
|
|
494
|
+
readonly range: _angular_core.InputSignal<KsDateRange>;
|
|
495
|
+
/** Emits the newly-picked range. From the native `rangeChange` event. */
|
|
496
|
+
readonly ksRangeChange: _angular_core.OutputEmitterRef<KsDateRange>;
|
|
497
|
+
constructor(ref: ElementRef<KsDaterangeElement>);
|
|
498
|
+
writeValue(value: KsDateRange | null): void;
|
|
499
|
+
registerOnChange(fn: (value: KsDateRange) => void): void;
|
|
500
|
+
registerOnTouched(fn: () => void): void;
|
|
501
|
+
setDisabledState(isDisabled: boolean): void;
|
|
502
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsDaterangeComponent, never>;
|
|
503
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsDaterangeComponent, "ks-daterange", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "presets": { "alias": "presets"; "required": false; "isSignal": true; }; "showPresets": { "alias": "showPresets"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; }, { "ksRangeChange": "ksRangeChange"; }, never, never, true, never>;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Mirrors `KsTimeValue` exported by
|
|
508
|
+
* `core/src/components/Calendars/timepicker/timepicker.tsx`. Duplicated
|
|
509
|
+
* locally — see the note in `button-group/button-group.ts` for why.
|
|
510
|
+
*/
|
|
511
|
+
interface KsTimeValue {
|
|
512
|
+
hours: number;
|
|
513
|
+
minutes: number;
|
|
514
|
+
seconds?: number;
|
|
515
|
+
period?: 'AM' | 'PM';
|
|
516
|
+
}
|
|
517
|
+
/** DOM shape of the real `<ks-timepicker>` custom element, typed for the wrapper. */
|
|
518
|
+
type KsTimepickerElement = HTMLElement & {
|
|
519
|
+
label: string;
|
|
520
|
+
placeholder: string;
|
|
521
|
+
use12Hour: boolean;
|
|
522
|
+
showSeconds: boolean;
|
|
523
|
+
disabled: boolean;
|
|
524
|
+
error: string;
|
|
525
|
+
value: KsTimeValue | null;
|
|
526
|
+
writeValue(val: KsTimeValue | null): Promise<void>;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Angular wrapper around the `<ks-timepicker>` Stencil custom element.
|
|
530
|
+
*
|
|
531
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
532
|
+
* `formControlName`. See `chips/chips.ts` for the full rationale (the
|
|
533
|
+
* native `valueChange` event can't be reused verbatim as an Angular output
|
|
534
|
+
* name without a double-fire risk).
|
|
535
|
+
*
|
|
536
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
537
|
+
* `[value]="t" (ksValueChange)="t = $event"`.
|
|
538
|
+
*
|
|
539
|
+
* `template: ''` — no slot is exposed on `<ks-timepicker>` itself.
|
|
540
|
+
*/
|
|
541
|
+
declare class KsTimepickerComponent implements ControlValueAccessor {
|
|
542
|
+
private readonly el;
|
|
543
|
+
private onChange;
|
|
544
|
+
private onTouched;
|
|
545
|
+
/** Field label */
|
|
546
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
547
|
+
/** Placeholder */
|
|
548
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
549
|
+
/** Use 12-hour clock (AM/PM) */
|
|
550
|
+
readonly use12Hour: _angular_core.InputSignal<boolean>;
|
|
551
|
+
/** Show seconds */
|
|
552
|
+
readonly showSeconds: _angular_core.InputSignal<boolean>;
|
|
553
|
+
/** Disabled */
|
|
554
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
555
|
+
/** Error message */
|
|
556
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
557
|
+
/** Initial/controlled value for plain (non-forms) usage. Prefer `[(ngModel)]` / `formControlName` when inside a form. */
|
|
558
|
+
readonly value: _angular_core.ModelSignal<KsTimeValue>;
|
|
559
|
+
/** Emits the confirmed time. From the native `valueChange` event. */
|
|
560
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<KsTimeValue>;
|
|
561
|
+
constructor(ref: ElementRef<KsTimepickerElement>);
|
|
562
|
+
writeValue(value: KsTimeValue | null): void;
|
|
563
|
+
registerOnChange(fn: (value: KsTimeValue) => void): void;
|
|
564
|
+
registerOnTouched(fn: () => void): void;
|
|
565
|
+
setDisabledState(isDisabled: boolean): void;
|
|
566
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTimepickerComponent, never>;
|
|
567
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTimepickerComponent, "ks-timepicker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "use12Hour": { "alias": "use12Hour"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "ksValueChange": "ksValueChange"; }, never, never, true, never>;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Mirrors `KsDropdownOption` exported by
|
|
572
|
+
* `core/src/components/Dropdowns/dropdown/dropdown.tsx`. Duplicated
|
|
573
|
+
* locally — see the note in `button-group/button-group.ts` for why.
|
|
574
|
+
*/
|
|
575
|
+
interface KsDropdownOption {
|
|
576
|
+
value: string | number;
|
|
577
|
+
label: string;
|
|
578
|
+
icon?: string;
|
|
579
|
+
disabled?: boolean;
|
|
580
|
+
}
|
|
581
|
+
type KsDropdownValue = (string | number)[] | string | number;
|
|
582
|
+
/** DOM shape of the real `<ks-dropdown>` custom element, typed for the wrapper. */
|
|
583
|
+
type KsDropdownElement = HTMLElement & {
|
|
584
|
+
options: KsDropdownOption[];
|
|
585
|
+
placeholder: string;
|
|
586
|
+
multi: boolean;
|
|
587
|
+
searchable: boolean;
|
|
588
|
+
label: string;
|
|
589
|
+
disabled: boolean;
|
|
590
|
+
selectedValues: (string | number)[];
|
|
591
|
+
writeValue(val: (string | number) | (string | number)[] | null): Promise<void>;
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* Angular wrapper around the `<ks-dropdown>` Stencil custom element.
|
|
595
|
+
*
|
|
596
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
597
|
+
* `formControlName`. See `chips/chips.ts` for the full rationale (the
|
|
598
|
+
* native `selectedValuesChange` event can't be reused verbatim as an
|
|
599
|
+
* Angular output name without a double-fire risk).
|
|
600
|
+
*
|
|
601
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
602
|
+
* `[selectedValues]="v" (ksSelectedValuesChange)="v = $event"`.
|
|
603
|
+
*
|
|
604
|
+
* `template: ''` — the option list / search box in the Stencil render are
|
|
605
|
+
* projected into the shared, internal `<ks-overlay-field>` slot; there is
|
|
606
|
+
* no slot exposed on `<ks-dropdown>` itself for a consumer to project into.
|
|
607
|
+
*/
|
|
608
|
+
declare class KsDropdownComponent implements ControlValueAccessor {
|
|
609
|
+
private readonly el;
|
|
610
|
+
private onChange;
|
|
611
|
+
private onTouched;
|
|
612
|
+
/** Full list of options */
|
|
613
|
+
readonly options: _angular_core.InputSignal<KsDropdownOption[]>;
|
|
614
|
+
/** Placeholder text shown when nothing is selected */
|
|
615
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
616
|
+
/** Allow selecting multiple options */
|
|
617
|
+
readonly multi: _angular_core.InputSignal<boolean>;
|
|
618
|
+
/** Show a search box inside the dropdown */
|
|
619
|
+
readonly searchable: _angular_core.InputSignal<boolean>;
|
|
620
|
+
/** Field label */
|
|
621
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
622
|
+
/** Disabled state */
|
|
623
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
624
|
+
/** Initial/controlled selected value(s) for plain (non-forms) usage. Prefer `[(ngModel)]` / `formControlName` when inside a form. */
|
|
625
|
+
readonly selectedValues: _angular_core.InputSignal<(string | number)[]>;
|
|
626
|
+
/** Emits the new selection — an array when `multi`, otherwise a single value. From the native `selectedValuesChange` event. */
|
|
627
|
+
readonly ksSelectedValuesChange: _angular_core.OutputEmitterRef<KsDropdownValue>;
|
|
628
|
+
constructor(ref: ElementRef<KsDropdownElement>);
|
|
629
|
+
writeValue(value: KsDropdownValue | null): void;
|
|
630
|
+
registerOnChange(fn: (value: KsDropdownValue) => void): void;
|
|
631
|
+
registerOnTouched(fn: () => void): void;
|
|
632
|
+
setDisabledState(isDisabled: boolean): void;
|
|
633
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsDropdownComponent, never>;
|
|
634
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsDropdownComponent, "ks-dropdown", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectedValues": { "alias": "selectedValues"; "required": false; "isSignal": true; }; }, { "ksSelectedValuesChange": "ksSelectedValuesChange"; }, never, never, true, never>;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Mirrors `KsListBoxOption` exported by
|
|
639
|
+
* `core/src/components/Dropdowns/listbox/listbox.tsx`. Duplicated locally
|
|
640
|
+
* — see the note in `button-group/button-group.ts` for why.
|
|
641
|
+
*/
|
|
642
|
+
interface KsListBoxOption {
|
|
643
|
+
value: string | number;
|
|
644
|
+
label: string;
|
|
645
|
+
icon?: string;
|
|
646
|
+
disabled?: boolean;
|
|
647
|
+
/** Optional group key — used when `groupBy` is enabled */
|
|
648
|
+
group?: string;
|
|
649
|
+
}
|
|
650
|
+
type KsListBoxValue = (string | number)[] | string | number;
|
|
651
|
+
/** DOM shape of the real `<ks-listbox>` custom element, typed for the wrapper. */
|
|
652
|
+
type KsListBoxElement = HTMLElement & {
|
|
653
|
+
options: KsListBoxOption[];
|
|
654
|
+
multi: boolean;
|
|
655
|
+
searchable: boolean;
|
|
656
|
+
disabled: boolean;
|
|
657
|
+
selected: (string | number)[];
|
|
658
|
+
groupBy: boolean;
|
|
659
|
+
writeValue(val: (string | number) | (string | number)[] | null): Promise<void>;
|
|
660
|
+
};
|
|
661
|
+
/**
|
|
662
|
+
* Angular wrapper around the `<ks-listbox>` Stencil custom element.
|
|
663
|
+
*
|
|
664
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
665
|
+
* `formControlName`. See `chips/chips.ts` for the full rationale (the
|
|
666
|
+
* native `selectedChange` event can't be reused verbatim as an Angular
|
|
667
|
+
* output name without a double-fire risk).
|
|
668
|
+
*
|
|
669
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
670
|
+
* `[selected]="v" (ksSelectedChange)="v = $event"`.
|
|
671
|
+
*
|
|
672
|
+
* `template: ''` — no slot is exposed on `<ks-listbox>` itself.
|
|
673
|
+
*/
|
|
674
|
+
declare class KsListBoxComponent implements ControlValueAccessor {
|
|
675
|
+
private readonly el;
|
|
676
|
+
private onChange;
|
|
677
|
+
private onTouched;
|
|
678
|
+
/** Options list */
|
|
679
|
+
readonly options: _angular_core.InputSignal<KsListBoxOption[]>;
|
|
680
|
+
/** Allow multi-select */
|
|
681
|
+
readonly multi: _angular_core.InputSignal<boolean>;
|
|
682
|
+
/** Show search box */
|
|
683
|
+
readonly searchable: _angular_core.InputSignal<boolean>;
|
|
684
|
+
/** Disabled */
|
|
685
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
686
|
+
/** Enable group headers using the `group` field on each option */
|
|
687
|
+
readonly groupBy: _angular_core.InputSignal<boolean>;
|
|
688
|
+
/** Initial/controlled selected value(s) for plain (non-forms) usage. Prefer `[(ngModel)]` / `formControlName` when inside a form. */
|
|
689
|
+
readonly selected: _angular_core.InputSignal<(string | number)[]>;
|
|
690
|
+
/** Emits the new selection — an array when `multi`, otherwise a single value. From the native `selectedChange` event. */
|
|
691
|
+
readonly ksSelectedChange: _angular_core.OutputEmitterRef<KsListBoxValue>;
|
|
692
|
+
constructor(ref: ElementRef<KsListBoxElement>);
|
|
693
|
+
writeValue(value: KsListBoxValue | null): void;
|
|
694
|
+
registerOnChange(fn: (value: KsListBoxValue) => void): void;
|
|
695
|
+
registerOnTouched(fn: () => void): void;
|
|
696
|
+
setDisabledState(isDisabled: boolean): void;
|
|
697
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsListBoxComponent, never>;
|
|
698
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsListBoxComponent, "ks-listbox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "ksSelectedChange": "ksSelectedChange"; }, never, never, true, never>;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Mirrors `KsCheckboxOption` exported by
|
|
703
|
+
* `core/src/components/Inputs/checkbox/checkbox.tsx`. Duplicated locally
|
|
704
|
+
* — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
705
|
+
*/
|
|
706
|
+
interface KsCheckboxOption {
|
|
707
|
+
value: string;
|
|
708
|
+
label?: string;
|
|
709
|
+
disabled?: boolean;
|
|
710
|
+
checked?: boolean;
|
|
711
|
+
}
|
|
712
|
+
/** DOM shape of the real `<ks-checkbox>` custom element, typed for the wrapper. */
|
|
713
|
+
type KsCheckboxElement = HTMLElement & {
|
|
714
|
+
label: string;
|
|
715
|
+
options: KsCheckboxOption[];
|
|
716
|
+
disabled: boolean;
|
|
717
|
+
checked: boolean;
|
|
718
|
+
selected: string[];
|
|
719
|
+
writeValue(val: unknown): Promise<void>;
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* Angular wrapper around the `<ks-checkbox>` Stencil custom element.
|
|
723
|
+
*
|
|
724
|
+
* Supports two modes, mirroring the Stencil source:
|
|
725
|
+
* - **Single** mode (no `options`): two-way bind `checked` (boolean).
|
|
726
|
+
* - **Group** mode (`options` set): two-way bind `selected` (string[]).
|
|
727
|
+
*
|
|
728
|
+
* Two-way binding for either mode is via `ControlValueAccessor` — use
|
|
729
|
+
* `[(ngModel)]`/`formControlName` and it works for whichever mode is
|
|
730
|
+
* active (see `Buttons/chips/chips.ts` for the full rationale on why CVA
|
|
731
|
+
* is used instead of reusing a native event name as an Angular output).
|
|
732
|
+
*
|
|
733
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
734
|
+
* `[checked]="c" (ksCheckedChange)="c = $event"` or
|
|
735
|
+
* `[selected]="s" (ksSelectedChange)="s = $event"`.
|
|
736
|
+
*
|
|
737
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
738
|
+
*/
|
|
739
|
+
declare class KsCheckboxComponent implements ControlValueAccessor {
|
|
740
|
+
private readonly el;
|
|
741
|
+
private onChange;
|
|
742
|
+
private onTouched;
|
|
743
|
+
/** Label shown next to the control (single mode) */
|
|
744
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
745
|
+
/** Optional set of multiple options (multi-select / group mode) */
|
|
746
|
+
readonly options: _angular_core.InputSignal<KsCheckboxOption[]>;
|
|
747
|
+
/** Disabled state */
|
|
748
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
749
|
+
/** Single mode: initial/controlled checked value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
750
|
+
readonly checked: _angular_core.InputSignal<boolean>;
|
|
751
|
+
/** Group mode: initial/controlled selected values. Prefer `[(ngModel)]` / `formControlName`. */
|
|
752
|
+
readonly selected: _angular_core.InputSignal<string[]>;
|
|
753
|
+
/** Emits whenever `checked` changes (single mode). From the native `checkedChange` event. */
|
|
754
|
+
readonly ksCheckedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
755
|
+
/** Emits whenever `selected` changes (group mode). From the native `selectedChange` event. */
|
|
756
|
+
readonly ksSelectedChange: _angular_core.OutputEmitterRef<string[]>;
|
|
757
|
+
constructor(ref: ElementRef<KsCheckboxElement>);
|
|
758
|
+
/** `ControlValueAccessor` — called by `ngModel`/`formControl` to push a value in (either mode). */
|
|
759
|
+
writeValue(value: unknown): void;
|
|
760
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
761
|
+
registerOnTouched(fn: () => void): void;
|
|
762
|
+
setDisabledState(isDisabled: boolean): void;
|
|
763
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsCheckboxComponent, never>;
|
|
764
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsCheckboxComponent, "ks-checkbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "ksCheckedChange": "ksCheckedChange"; "ksSelectedChange": "ksSelectedChange"; }, never, never, true, never>;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/** Mirrors the inline union used by `core/src/components/Inputs/colour-picker/colour-picker.tsx`. */
|
|
768
|
+
type KsColourPickerVariant = 'input' | 'swatch';
|
|
769
|
+
/** DOM shape of the real `<ks-colour-picker>` custom element, typed for the wrapper. */
|
|
770
|
+
type KsColourPickerElement = HTMLElement & {
|
|
771
|
+
label: string;
|
|
772
|
+
variant: KsColourPickerVariant;
|
|
773
|
+
swatches: string[];
|
|
774
|
+
disabled: boolean;
|
|
775
|
+
value: string;
|
|
776
|
+
writeValue(val: string): Promise<void>;
|
|
777
|
+
};
|
|
778
|
+
/**
|
|
779
|
+
* Angular wrapper around the `<ks-colour-picker>` Stencil custom element.
|
|
780
|
+
*
|
|
781
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
782
|
+
* `formControlName`. See `Buttons/chips/chips.ts` for the full rationale
|
|
783
|
+
* (the native `valueChange` event can't be reused verbatim as an Angular
|
|
784
|
+
* output name without a double-fire risk).
|
|
785
|
+
*
|
|
786
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
787
|
+
* `[value]="hex" (ksValueChange)="hex = $event"`.
|
|
788
|
+
*
|
|
789
|
+
* `template: ''` — the panel is rendered into the internal
|
|
790
|
+
* `<ks-overlay-field>`; there is no slot on `<ks-colour-picker>` itself.
|
|
791
|
+
*/
|
|
792
|
+
declare class KsColourPickerComponent implements ControlValueAccessor {
|
|
793
|
+
private readonly el;
|
|
794
|
+
private onChange;
|
|
795
|
+
private onTouched;
|
|
796
|
+
/** Field label */
|
|
797
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
798
|
+
/** Picker UI variant */
|
|
799
|
+
readonly variant: _angular_core.InputSignal<KsColourPickerVariant>;
|
|
800
|
+
/** Preset swatch colours */
|
|
801
|
+
readonly swatches: _angular_core.InputSignal<string[]>;
|
|
802
|
+
/** Disabled */
|
|
803
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
804
|
+
/** Initial/controlled hex value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
805
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
806
|
+
/** Emits the newly-picked hex colour. From the native `valueChange` event. */
|
|
807
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<string>;
|
|
808
|
+
constructor(ref: ElementRef<KsColourPickerElement>);
|
|
809
|
+
writeValue(value: string): void;
|
|
810
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
811
|
+
registerOnTouched(fn: () => void): void;
|
|
812
|
+
setDisabledState(isDisabled: boolean): void;
|
|
813
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsColourPickerComponent, never>;
|
|
814
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsColourPickerComponent, "ks-colour-picker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "swatches": { "alias": "swatches"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; }, never, never, true, never>;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/** Mirrors `KsInputType` exported by `core/src/components/Inputs/input/input.tsx`. */
|
|
818
|
+
type KsInputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url';
|
|
819
|
+
/** DOM shape of the real `<ks-input>` custom element, typed for the wrapper. */
|
|
820
|
+
type KsInputElement = HTMLElement & {
|
|
821
|
+
type: KsInputType;
|
|
822
|
+
placeholder: string;
|
|
823
|
+
label: string;
|
|
824
|
+
hint: string;
|
|
825
|
+
error: string;
|
|
826
|
+
prefixIcon: string;
|
|
827
|
+
suffixIcon: string;
|
|
828
|
+
size: KsSize;
|
|
829
|
+
value: string;
|
|
830
|
+
disabled: boolean;
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* Angular wrapper around the `<ks-input>` Stencil custom element.
|
|
834
|
+
*
|
|
835
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
836
|
+
* `formControlName`. `<ks-input>` has no `@Method() writeValue()` of its
|
|
837
|
+
* own (unlike `chips`/`dropdown`/…), so this wrapper's `writeValue` sets
|
|
838
|
+
* `el.value` directly instead of delegating to a Stencil method.
|
|
839
|
+
*
|
|
840
|
+
* The native `ksBlur` event is already prefixed `ks` by the Stencil
|
|
841
|
+
* author, so re-using that exact name here as the Angular output would
|
|
842
|
+
* still hit the double-fire collision described in `Buttons/button.ts`
|
|
843
|
+
* (Ivy's `tNode.outputs` match is purely by literal name, `ks`-prefix or
|
|
844
|
+
* not) — hence `ksBlurred` (distinct spelling) instead.
|
|
845
|
+
*
|
|
846
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
847
|
+
* `[value]="v" (ksValueChange)="v = $event"`.
|
|
848
|
+
*
|
|
849
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
850
|
+
*/
|
|
851
|
+
declare class KsInputComponent implements ControlValueAccessor {
|
|
852
|
+
private readonly el;
|
|
853
|
+
private onChange;
|
|
854
|
+
private onTouched;
|
|
855
|
+
/** HTML input type */
|
|
856
|
+
readonly type: _angular_core.InputSignal<KsInputType>;
|
|
857
|
+
/** Placeholder text */
|
|
858
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
859
|
+
/** Field label */
|
|
860
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
861
|
+
/** Helper / hint text shown below the input */
|
|
862
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
863
|
+
/** Error message — also triggers the error state */
|
|
864
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
865
|
+
/** Leading icon class (e.g. Material Symbol name) */
|
|
866
|
+
readonly prefixIcon: _angular_core.InputSignal<string>;
|
|
867
|
+
/** Trailing icon class */
|
|
868
|
+
readonly suffixIcon: _angular_core.InputSignal<string>;
|
|
869
|
+
/** Size variant */
|
|
870
|
+
readonly size: _angular_core.InputSignal<KsSize>;
|
|
871
|
+
/** Initial/controlled value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
872
|
+
readonly value: _angular_core.ModelSignal<string>;
|
|
873
|
+
/** Disabled state */
|
|
874
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
875
|
+
/** Emits the newly-typed value. From the native `valueChange` event. */
|
|
876
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<string>;
|
|
877
|
+
/** Emitted on native blur (mirrors Angular's onTouched callback). From the native `ksBlur` event. */
|
|
878
|
+
readonly ksBlurred: _angular_core.OutputEmitterRef<void>;
|
|
879
|
+
constructor(ref: ElementRef<KsInputElement>);
|
|
880
|
+
writeValue(value: string): void;
|
|
881
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
882
|
+
registerOnTouched(fn: () => void): void;
|
|
883
|
+
setDisabledState(isDisabled: boolean): void;
|
|
884
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsInputComponent, never>;
|
|
885
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsInputComponent, "ks-input", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "ksValueChange": "ksValueChange"; "ksBlurred": "ksBlurred"; }, never, never, true, never>;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/** DOM shape of the real `<ks-otp-input>` custom element, typed for the wrapper. */
|
|
889
|
+
type KsOtpInputElement = HTMLElement & {
|
|
890
|
+
length: number;
|
|
891
|
+
inputType: 'number' | 'text';
|
|
892
|
+
label: string;
|
|
893
|
+
error: string;
|
|
894
|
+
masked: boolean;
|
|
895
|
+
disabled: boolean;
|
|
896
|
+
value: string;
|
|
897
|
+
writeValue(val: string): Promise<void>;
|
|
898
|
+
};
|
|
899
|
+
/**
|
|
900
|
+
* Angular wrapper around the `<ks-otp-input>` Stencil custom element.
|
|
901
|
+
*
|
|
902
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
903
|
+
* `formControlName`. See `Buttons/chips/chips.ts` for the full rationale.
|
|
904
|
+
*
|
|
905
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
906
|
+
* `[value]="v" (ksValueChange)="v = $event"`.
|
|
907
|
+
*
|
|
908
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
909
|
+
*/
|
|
910
|
+
declare class KsOtpInputComponent implements ControlValueAccessor {
|
|
911
|
+
private readonly el;
|
|
912
|
+
private onChange;
|
|
913
|
+
private onTouched;
|
|
914
|
+
/** Number of digits */
|
|
915
|
+
readonly length: _angular_core.InputSignal<number>;
|
|
916
|
+
/** Input type: 'number' | 'text' */
|
|
917
|
+
readonly inputType: _angular_core.InputSignal<"number" | "text">;
|
|
918
|
+
/** Field label */
|
|
919
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
920
|
+
/** Error message */
|
|
921
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
922
|
+
/** Mask the input (like a password) */
|
|
923
|
+
readonly masked: _angular_core.InputSignal<boolean>;
|
|
924
|
+
/** Disabled */
|
|
925
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
926
|
+
/** Initial/controlled value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
927
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
928
|
+
/** Emits whenever `value` changes. From the native `valueChange` event. */
|
|
929
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<string>;
|
|
930
|
+
/** Emits the full OTP string when all digits are filled. From the native `completed` event. */
|
|
931
|
+
readonly ksCompleted: _angular_core.OutputEmitterRef<string>;
|
|
932
|
+
constructor(ref: ElementRef<KsOtpInputElement>);
|
|
933
|
+
writeValue(value: string): void;
|
|
934
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
935
|
+
registerOnTouched(fn: () => void): void;
|
|
936
|
+
setDisabledState(isDisabled: boolean): void;
|
|
937
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsOtpInputComponent, never>;
|
|
938
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsOtpInputComponent, "ks-otp-input", never, { "length": { "alias": "length"; "required": false; "isSignal": true; }; "inputType": { "alias": "inputType"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "masked": { "alias": "masked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; "ksCompleted": "ksCompleted"; }, never, never, true, never>;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Mirrors `KsRadioOption` exported by
|
|
943
|
+
* `core/src/components/Inputs/radio/radio.tsx`. Duplicated locally — see
|
|
944
|
+
* the note in `Buttons/button-group/button-group.ts` for why.
|
|
945
|
+
*/
|
|
946
|
+
interface KsRadioOption {
|
|
947
|
+
value: string;
|
|
948
|
+
label?: string;
|
|
949
|
+
disabled?: boolean;
|
|
950
|
+
}
|
|
951
|
+
/** DOM shape of the real `<ks-radio>` custom element, typed for the wrapper. */
|
|
952
|
+
type KsRadioElement = HTMLElement & {
|
|
953
|
+
options: KsRadioOption[];
|
|
954
|
+
label: string;
|
|
955
|
+
name: string;
|
|
956
|
+
variant: KsBaseVariant;
|
|
957
|
+
size: KsSize;
|
|
958
|
+
disabled: boolean;
|
|
959
|
+
value: string;
|
|
960
|
+
writeValue(val: string): Promise<void>;
|
|
961
|
+
};
|
|
962
|
+
/**
|
|
963
|
+
* Angular wrapper around the `<ks-radio>` Stencil custom element.
|
|
964
|
+
*
|
|
965
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
966
|
+
* `formControlName`. See `Buttons/chips/chips.ts` for the full rationale.
|
|
967
|
+
*
|
|
968
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
969
|
+
* `[value]="v" (ksValueChange)="v = $event"`.
|
|
970
|
+
*
|
|
971
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
972
|
+
*/
|
|
973
|
+
declare class KsRadioComponent implements ControlValueAccessor {
|
|
974
|
+
private readonly el;
|
|
975
|
+
private onChange;
|
|
976
|
+
private onTouched;
|
|
977
|
+
/** List of options — the component renders a radio group */
|
|
978
|
+
readonly options: _angular_core.InputSignal<KsRadioOption[]>;
|
|
979
|
+
/** Label shown above the group */
|
|
980
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
981
|
+
/** Name attribute shared across all radio inputs in the group */
|
|
982
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
983
|
+
/** Colour variant applied to the selected indicator */
|
|
984
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
985
|
+
/** Size variant — affects label text size */
|
|
986
|
+
readonly size: _angular_core.InputSignal<KsSize>;
|
|
987
|
+
/** Disabled state */
|
|
988
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
989
|
+
/** Initial/controlled selected value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
990
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
991
|
+
/** Emits the selected value on every change. From the native `valueChange` event. */
|
|
992
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<string>;
|
|
993
|
+
constructor(ref: ElementRef<KsRadioElement>);
|
|
994
|
+
writeValue(value: string): void;
|
|
995
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
996
|
+
registerOnTouched(fn: () => void): void;
|
|
997
|
+
setDisabledState(isDisabled: boolean): void;
|
|
998
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsRadioComponent, never>;
|
|
999
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsRadioComponent, "ks-radio", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; }, never, never, true, never>;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/** DOM shape of the real `<ks-rating>` custom element, typed for the wrapper. */
|
|
1003
|
+
type KsRatingElement = HTMLElement & {
|
|
1004
|
+
max: number;
|
|
1005
|
+
size: KsBaseSize;
|
|
1006
|
+
readOnly: boolean;
|
|
1007
|
+
showLabel: boolean;
|
|
1008
|
+
label: string;
|
|
1009
|
+
disabled: boolean;
|
|
1010
|
+
value: number;
|
|
1011
|
+
writeValue(val: number): Promise<void>;
|
|
1012
|
+
};
|
|
1013
|
+
/**
|
|
1014
|
+
* Angular wrapper around the `<ks-rating>` Stencil custom element.
|
|
1015
|
+
*
|
|
1016
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
1017
|
+
* `formControlName`. See `Buttons/chips/chips.ts` for the full rationale.
|
|
1018
|
+
*
|
|
1019
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
1020
|
+
* `[value]="v" (ksValueChange)="v = $event"`.
|
|
1021
|
+
*
|
|
1022
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
1023
|
+
*/
|
|
1024
|
+
declare class KsRatingComponent implements ControlValueAccessor {
|
|
1025
|
+
private readonly el;
|
|
1026
|
+
private onChange;
|
|
1027
|
+
private onTouched;
|
|
1028
|
+
/** Total number of stars */
|
|
1029
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
1030
|
+
/** Size */
|
|
1031
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
1032
|
+
/** Read-only / non-interactive */
|
|
1033
|
+
readonly readOnly: _angular_core.InputSignal<boolean>;
|
|
1034
|
+
/** Show numeric label */
|
|
1035
|
+
readonly showLabel: _angular_core.InputSignal<boolean>;
|
|
1036
|
+
/** Field label */
|
|
1037
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1038
|
+
/** Disabled */
|
|
1039
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1040
|
+
/** Initial/controlled value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
1041
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
1042
|
+
/** Emits the newly-picked rating. From the native `valueChange` event. */
|
|
1043
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<number>;
|
|
1044
|
+
constructor(ref: ElementRef<KsRatingElement>);
|
|
1045
|
+
writeValue(value: number): void;
|
|
1046
|
+
registerOnChange(fn: (value: number) => void): void;
|
|
1047
|
+
registerOnTouched(fn: () => void): void;
|
|
1048
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1049
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsRatingComponent, never>;
|
|
1050
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsRatingComponent, "ks-rating", never, { "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; }, never, never, true, never>;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/** DOM shape of the real `<ks-slider>` custom element, typed for the wrapper. */
|
|
1054
|
+
type KsSliderElement = HTMLElement & {
|
|
1055
|
+
min: number;
|
|
1056
|
+
max: number;
|
|
1057
|
+
step: number;
|
|
1058
|
+
showTooltip: boolean;
|
|
1059
|
+
showLabels: boolean;
|
|
1060
|
+
label: string;
|
|
1061
|
+
disabled: boolean;
|
|
1062
|
+
value: number;
|
|
1063
|
+
writeValue(val: number): Promise<void>;
|
|
1064
|
+
};
|
|
1065
|
+
/**
|
|
1066
|
+
* Angular wrapper around the `<ks-slider>` Stencil custom element.
|
|
1067
|
+
*
|
|
1068
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
1069
|
+
* `formControlName`. See `Buttons/chips/chips.ts` for the full rationale.
|
|
1070
|
+
* The native `ksBlur` event (already `ks`-prefixed by the Stencil author)
|
|
1071
|
+
* is re-exposed as `ksBlurred` — see `Inputs/input/input.ts` for why the
|
|
1072
|
+
* literal name can't be reused.
|
|
1073
|
+
*
|
|
1074
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
1075
|
+
* `[value]="v" (ksValueChange)="v = $event"`.
|
|
1076
|
+
*
|
|
1077
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
1078
|
+
*/
|
|
1079
|
+
declare class KsSliderComponent implements ControlValueAccessor {
|
|
1080
|
+
private readonly el;
|
|
1081
|
+
private onChange;
|
|
1082
|
+
private onTouched;
|
|
1083
|
+
/** Minimum value */
|
|
1084
|
+
readonly min: _angular_core.InputSignal<number>;
|
|
1085
|
+
/** Maximum value */
|
|
1086
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
1087
|
+
/** Step increment */
|
|
1088
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
1089
|
+
/** Show value tooltip */
|
|
1090
|
+
readonly showTooltip: _angular_core.InputSignal<boolean>;
|
|
1091
|
+
/** Show min/max labels */
|
|
1092
|
+
readonly showLabels: _angular_core.InputSignal<boolean>;
|
|
1093
|
+
/** Field label */
|
|
1094
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1095
|
+
/** Disabled state */
|
|
1096
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1097
|
+
/** Initial/controlled value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
1098
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
1099
|
+
/** Emits the newly-picked value. From the native `valueChange` event. */
|
|
1100
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<number>;
|
|
1101
|
+
/** Emitted on native blur. From the native `ksBlur` event. */
|
|
1102
|
+
readonly ksBlurred: _angular_core.OutputEmitterRef<void>;
|
|
1103
|
+
constructor(ref: ElementRef<KsSliderElement>);
|
|
1104
|
+
writeValue(value: number): void;
|
|
1105
|
+
registerOnChange(fn: (value: number) => void): void;
|
|
1106
|
+
registerOnTouched(fn: () => void): void;
|
|
1107
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1108
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsSliderComponent, never>;
|
|
1109
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsSliderComponent, "ks-slider", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "showTooltip": { "alias": "showTooltip"; "required": false; "isSignal": true; }; "showLabels": { "alias": "showLabels"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; "ksBlurred": "ksBlurred"; }, never, never, true, never>;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/** DOM shape of the real `<ks-switch>` custom element, typed for the wrapper. */
|
|
1113
|
+
type KsSwitchElement = HTMLElement & {
|
|
1114
|
+
label: string;
|
|
1115
|
+
variant: KsBaseVariant;
|
|
1116
|
+
disabled: boolean;
|
|
1117
|
+
checked: boolean;
|
|
1118
|
+
labelPosition: 'left' | 'right';
|
|
1119
|
+
formDisabled: boolean;
|
|
1120
|
+
setDisabledState(isDisabled: boolean): Promise<void>;
|
|
1121
|
+
};
|
|
1122
|
+
/**
|
|
1123
|
+
* Angular wrapper around the `<ks-switch>` Stencil custom element.
|
|
1124
|
+
*
|
|
1125
|
+
* Two-way binding is via `ControlValueAccessor` — use `[(ngModel)]` or
|
|
1126
|
+
* `formControlName`. Unlike most other form-control wrappers here,
|
|
1127
|
+
* `<ks-switch>` has no `@Method() writeValue()`, so `writeValue` below
|
|
1128
|
+
* sets `el.checked` directly; it DOES expose a real
|
|
1129
|
+
* `@Method() setDisabledState()` (mirroring CVA exactly), which
|
|
1130
|
+
* `setDisabledState` below delegates to instead of setting a plain prop.
|
|
1131
|
+
*
|
|
1132
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
1133
|
+
* `[checked]="c" (ksCheckedChange)="c = $event"`.
|
|
1134
|
+
*
|
|
1135
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
1136
|
+
*/
|
|
1137
|
+
declare class KsSwitchComponent implements ControlValueAccessor {
|
|
1138
|
+
private readonly el;
|
|
1139
|
+
private onChange;
|
|
1140
|
+
private onTouched;
|
|
1141
|
+
/** Label text */
|
|
1142
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1143
|
+
/** Colour variant */
|
|
1144
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
1145
|
+
/** Disabled */
|
|
1146
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1147
|
+
/** Initial/controlled checked value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
1148
|
+
readonly checked: _angular_core.InputSignal<boolean>;
|
|
1149
|
+
/** Label position relative to the switch track */
|
|
1150
|
+
readonly labelPosition: _angular_core.InputSignal<"left" | "right">;
|
|
1151
|
+
/** Emits whenever `checked` changes. From the native `checkedChange` event. */
|
|
1152
|
+
readonly ksCheckedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1153
|
+
constructor(ref: ElementRef<KsSwitchElement>);
|
|
1154
|
+
writeValue(value: boolean): void;
|
|
1155
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
1156
|
+
registerOnTouched(fn: () => void): void;
|
|
1157
|
+
/** Delegates to `<ks-switch>`'s own `@Method() setDisabledState()`. */
|
|
1158
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1159
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsSwitchComponent, never>;
|
|
1160
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsSwitchComponent, "ks-switch", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, { "ksCheckedChange": "ksCheckedChange"; }, never, never, true, never>;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/** DOM shape of the real `<ks-textarea>` custom element, typed for the wrapper. */
|
|
1164
|
+
type KsTextareaElement = HTMLElement & {
|
|
1165
|
+
label: string;
|
|
1166
|
+
placeholder: string;
|
|
1167
|
+
rows: number;
|
|
1168
|
+
maxLength: number;
|
|
1169
|
+
showCounter: boolean;
|
|
1170
|
+
autoResize: boolean;
|
|
1171
|
+
disabled: boolean;
|
|
1172
|
+
error: string;
|
|
1173
|
+
hint: string;
|
|
1174
|
+
value: string;
|
|
1175
|
+
};
|
|
1176
|
+
/**
|
|
1177
|
+
* Angular wrapper around the `<ks-textarea>` Stencil custom element.
|
|
1178
|
+
*
|
|
1179
|
+
* Two-way binding is via `ControlValueAccessor` (see `Inputs/input/input.ts`
|
|
1180
|
+
* for the equivalent no-`writeValue()`-method pattern this follows —
|
|
1181
|
+
* `writeValue` here sets `el.value` directly). The native `ksBlur` event
|
|
1182
|
+
* is re-exposed as `ksBlurred` for the same reason.
|
|
1183
|
+
*
|
|
1184
|
+
* For plain (non-forms) two-way use, bind explicitly instead:
|
|
1185
|
+
* `[value]="v" (ksValueChange)="v = $event"`.
|
|
1186
|
+
*
|
|
1187
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
1188
|
+
*/
|
|
1189
|
+
declare class KsTextareaComponent implements ControlValueAccessor {
|
|
1190
|
+
private readonly el;
|
|
1191
|
+
private onChange;
|
|
1192
|
+
private onTouched;
|
|
1193
|
+
/** Textarea label */
|
|
1194
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1195
|
+
/** Placeholder text */
|
|
1196
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
1197
|
+
/** Number of visible rows */
|
|
1198
|
+
readonly rows: _angular_core.InputSignal<number>;
|
|
1199
|
+
/** Maximum character count */
|
|
1200
|
+
readonly maxLength: _angular_core.InputSignal<number>;
|
|
1201
|
+
/** Show character counter */
|
|
1202
|
+
readonly showCounter: _angular_core.InputSignal<boolean>;
|
|
1203
|
+
/** Auto-resize based on content */
|
|
1204
|
+
readonly autoResize: _angular_core.InputSignal<boolean>;
|
|
1205
|
+
/** Disabled state */
|
|
1206
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1207
|
+
/** Error state */
|
|
1208
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
1209
|
+
/** Helper/error text */
|
|
1210
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
1211
|
+
/** Initial/controlled value. Prefer `[(ngModel)]` / `formControlName`. */
|
|
1212
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
1213
|
+
/** Emits the newly-typed value. From the native `valueChange` event. */
|
|
1214
|
+
readonly ksValueChange: _angular_core.OutputEmitterRef<string>;
|
|
1215
|
+
/** Emitted on native blur. From the native `ksBlur` event. */
|
|
1216
|
+
readonly ksBlurred: _angular_core.OutputEmitterRef<void>;
|
|
1217
|
+
constructor(ref: ElementRef<KsTextareaElement>);
|
|
1218
|
+
writeValue(value: string): void;
|
|
1219
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1220
|
+
registerOnTouched(fn: () => void): void;
|
|
1221
|
+
setDisabledState(isDisabled: boolean): void;
|
|
1222
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTextareaComponent, never>;
|
|
1223
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTextareaComponent, "ks-textarea", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "showCounter": { "alias": "showCounter"; "required": false; "isSignal": true; }; "autoResize": { "alias": "autoResize"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "ksValueChange": "ksValueChange"; "ksBlurred": "ksBlurred"; }, never, never, true, never>;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/** DOM shape of the real `<ks-theme-switch>` custom element, typed for the wrapper. */
|
|
1227
|
+
type KsThemeSwitchElement = HTMLElement & {
|
|
1228
|
+
includeSystem: boolean;
|
|
1229
|
+
includePalette: boolean;
|
|
1230
|
+
onlyIcon: boolean;
|
|
1231
|
+
palette: Palette;
|
|
1232
|
+
mode: ThemeMode;
|
|
1233
|
+
};
|
|
1234
|
+
/**
|
|
1235
|
+
* Angular wrapper around the `<ks-theme-switch>` Stencil custom element.
|
|
1236
|
+
*
|
|
1237
|
+
* Purely presentational — it drives the shared `themeService` singleton
|
|
1238
|
+
* (see `core/src/utils/ks-theme.util.ts`) directly and dispatches no
|
|
1239
|
+
* events of its own, so this wrapper has plain inputs only, no outputs
|
|
1240
|
+
* and no `ControlValueAccessor`.
|
|
1241
|
+
*
|
|
1242
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
1243
|
+
*/
|
|
1244
|
+
declare class KsThemeSwitchComponent {
|
|
1245
|
+
private readonly el;
|
|
1246
|
+
/** When true the mode-toggle shows three options: System | Light | Dark. */
|
|
1247
|
+
readonly includeSystem: _angular_core.InputSignal<boolean>;
|
|
1248
|
+
/** When true the colour-palette switcher is shown. */
|
|
1249
|
+
readonly includePalette: _angular_core.InputSignal<boolean>;
|
|
1250
|
+
/** When true only icons are shown in the mode-toggle switch. */
|
|
1251
|
+
readonly onlyIcon: _angular_core.InputSignal<boolean>;
|
|
1252
|
+
/** The palette that should be active on init. */
|
|
1253
|
+
readonly palette: _angular_core.InputSignal<Palette>;
|
|
1254
|
+
/** The mode that should be active on init. */
|
|
1255
|
+
readonly mode: _angular_core.InputSignal<ThemeMode>;
|
|
1256
|
+
constructor(ref: ElementRef<KsThemeSwitchElement>);
|
|
1257
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsThemeSwitchComponent, never>;
|
|
1258
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsThemeSwitchComponent, "ks-theme-switch", never, { "includeSystem": { "alias": "includeSystem"; "required": false; "isSignal": true; }; "includePalette": { "alias": "includePalette"; "required": false; "isSignal": true; }; "onlyIcon": { "alias": "onlyIcon"; "required": false; "isSignal": true; }; "palette": { "alias": "palette"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Mirrors `KsUploadedFile` exported by
|
|
1263
|
+
* `core/src/components/Inputs/uploader/uploader.tsx`. Duplicated locally
|
|
1264
|
+
* — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1265
|
+
*/
|
|
1266
|
+
interface KsUploadedFile {
|
|
1267
|
+
file: File;
|
|
1268
|
+
name: string;
|
|
1269
|
+
size: number;
|
|
1270
|
+
type: string;
|
|
1271
|
+
/** Data-URL preview (images only, when previewImages is true) */
|
|
1272
|
+
preview?: string;
|
|
1273
|
+
}
|
|
1274
|
+
/** DOM shape of the real `<ks-uploader>` custom element, typed for the wrapper. */
|
|
1275
|
+
type KsUploaderElement = HTMLElement & {
|
|
1276
|
+
accept: string;
|
|
1277
|
+
multiple: boolean;
|
|
1278
|
+
maxSize: number;
|
|
1279
|
+
previewImages: boolean;
|
|
1280
|
+
label: string;
|
|
1281
|
+
disabled: boolean;
|
|
1282
|
+
};
|
|
1283
|
+
/**
|
|
1284
|
+
* Angular wrapper around the `<ks-uploader>` Stencil custom element.
|
|
1285
|
+
*
|
|
1286
|
+
* No two-way "value" here — the Stencil source has no `writeValue()`
|
|
1287
|
+
* method and no single controlled prop, just a plain `filesChange`/
|
|
1288
|
+
* `filesRejected` event pair, so no `ControlValueAccessor` is implemented
|
|
1289
|
+
* (unlike the other `Inputs/*` wrappers).
|
|
1290
|
+
*
|
|
1291
|
+
* `template: ''` — no `<slot>` in the wrapped Stencil render.
|
|
1292
|
+
*/
|
|
1293
|
+
declare class KsUploaderComponent {
|
|
1294
|
+
private readonly el;
|
|
1295
|
+
/** Accepted MIME types / extensions, e.g. "image/*,.pdf" */
|
|
1296
|
+
readonly accept: _angular_core.InputSignal<string>;
|
|
1297
|
+
/** Allow selecting multiple files */
|
|
1298
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
1299
|
+
/** Maximum file size in bytes (0 = no limit) */
|
|
1300
|
+
readonly maxSize: _angular_core.InputSignal<number>;
|
|
1301
|
+
/** Show image thumbnails for image/* files */
|
|
1302
|
+
readonly previewImages: _angular_core.InputSignal<boolean>;
|
|
1303
|
+
/** Custom drop-zone label */
|
|
1304
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1305
|
+
/** Disabled state */
|
|
1306
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1307
|
+
/** Emits the accepted files whenever the selection changes. From the native `filesChange` event. */
|
|
1308
|
+
readonly ksFilesChange: _angular_core.OutputEmitterRef<KsUploadedFile[]>;
|
|
1309
|
+
/** Emits rejected files (wrong type / over size limit). From the native `filesRejected` event. */
|
|
1310
|
+
readonly ksFilesRejected: _angular_core.OutputEmitterRef<File[]>;
|
|
1311
|
+
constructor(ref: ElementRef<KsUploaderElement>);
|
|
1312
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsUploaderComponent, never>;
|
|
1313
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsUploaderComponent, "ks-uploader", never, { "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "previewImages": { "alias": "previewImages"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "ksFilesChange": "ksFilesChange"; "ksFilesRejected": "ksFilesRejected"; }, never, never, true, never>;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* DOM shape of the real `<ks-rolling-number>` custom element, typed for the wrapper.
|
|
1318
|
+
* `prefixText` / `suffixText` / `animated` are used on the element because
|
|
1319
|
+
* `prefix` and `animate` collide with native `Element` members.
|
|
1320
|
+
*/
|
|
1321
|
+
type KsRollingNumberElement = HTMLElement & {
|
|
1322
|
+
value: number | string | bigint;
|
|
1323
|
+
prefixText: string;
|
|
1324
|
+
suffixText: string;
|
|
1325
|
+
startValue: number | string | bigint;
|
|
1326
|
+
decimals: number | null;
|
|
1327
|
+
separator: string;
|
|
1328
|
+
decimalSeparator: string;
|
|
1329
|
+
grouping: KsRollingGrouping;
|
|
1330
|
+
duration: number;
|
|
1331
|
+
delay: number;
|
|
1332
|
+
easing: string;
|
|
1333
|
+
stagger: number | null;
|
|
1334
|
+
spins: number;
|
|
1335
|
+
direction: KsRollingDirection;
|
|
1336
|
+
design: KsRollingDesign;
|
|
1337
|
+
size: KsSize;
|
|
1338
|
+
tone: KsTextTone;
|
|
1339
|
+
animated: boolean;
|
|
1340
|
+
label: string;
|
|
1341
|
+
};
|
|
1342
|
+
/**
|
|
1343
|
+
* Angular wrapper around the `<ks-rolling-number>` Stencil custom element.
|
|
1344
|
+
* Purely presentational — no events, no `<slot>`, plain inputs only.
|
|
1345
|
+
*
|
|
1346
|
+
* @example
|
|
1347
|
+
* ```html
|
|
1348
|
+
* <ks-rolling-number [value]="total()" prefix="$" [decimals]="2" design="finance" />
|
|
1349
|
+
* ```
|
|
1350
|
+
*/
|
|
1351
|
+
declare class KsRollingNumberComponent {
|
|
1352
|
+
private readonly el;
|
|
1353
|
+
/** Target value. Use a string or bigint for numbers beyond 2^53 */
|
|
1354
|
+
readonly value: _angular_core.InputSignal<string | number | bigint>;
|
|
1355
|
+
/** Shown before the number ($, €, ₹ …) */
|
|
1356
|
+
readonly prefix: _angular_core.InputSignal<string>;
|
|
1357
|
+
/** Shown after the number (K, M, %, " users" …). Leading spaces are preserved */
|
|
1358
|
+
readonly suffix: _angular_core.InputSignal<string>;
|
|
1359
|
+
/** Value the reels roll from on first render */
|
|
1360
|
+
readonly startValue: _angular_core.InputSignal<string | number | bigint>;
|
|
1361
|
+
/** Fixed decimal places. Leave unset to infer from the value */
|
|
1362
|
+
readonly decimals: _angular_core.InputSignal<number>;
|
|
1363
|
+
/** Thousands separator. Empty string disables grouping */
|
|
1364
|
+
readonly separator: _angular_core.InputSignal<string>;
|
|
1365
|
+
/** Decimal separator */
|
|
1366
|
+
readonly decimalSeparator: _angular_core.InputSignal<string>;
|
|
1367
|
+
/** Digit grouping style (`indian` gives 12,34,567) */
|
|
1368
|
+
readonly grouping: _angular_core.InputSignal<KsRollingGrouping>;
|
|
1369
|
+
/** Total roll time in ms, including the cascade between digits */
|
|
1370
|
+
readonly duration: _angular_core.InputSignal<number>;
|
|
1371
|
+
/** Delay before rolling starts, in ms */
|
|
1372
|
+
readonly delay: _angular_core.InputSignal<number>;
|
|
1373
|
+
/** Any CSS easing. The default decelerates gently into place */
|
|
1374
|
+
readonly easing: _angular_core.InputSignal<string>;
|
|
1375
|
+
/** Gap in ms between neighbouring digits stopping. Unset = automatic */
|
|
1376
|
+
readonly stagger: _angular_core.InputSignal<number>;
|
|
1377
|
+
/** Extra full revolutions each reel makes on the first roll */
|
|
1378
|
+
readonly spins: _angular_core.InputSignal<number>;
|
|
1379
|
+
/** `auto` rolls up when the value grows and down when it shrinks */
|
|
1380
|
+
readonly direction: _angular_core.InputSignal<KsRollingDirection>;
|
|
1381
|
+
/** Visual style */
|
|
1382
|
+
readonly design: _angular_core.InputSignal<KsRollingDesign>;
|
|
1383
|
+
/** Size */
|
|
1384
|
+
readonly size: _angular_core.InputSignal<KsSize>;
|
|
1385
|
+
/** Text colour */
|
|
1386
|
+
readonly tone: _angular_core.InputSignal<KsTextTone>;
|
|
1387
|
+
/** Set false to skip animation entirely */
|
|
1388
|
+
readonly animate: _angular_core.InputSignal<boolean>;
|
|
1389
|
+
/** Accessible name. Defaults to the formatted value */
|
|
1390
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1391
|
+
constructor(ref: ElementRef<KsRollingNumberElement>);
|
|
1392
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsRollingNumberComponent, never>;
|
|
1393
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsRollingNumberComponent, "ks-rolling-number", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "startValue": { "alias": "startValue"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "decimalSeparator": { "alias": "decimalSeparator"; "required": false; "isSignal": true; }; "grouping": { "alias": "grouping"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "easing": { "alias": "easing"; "required": false; "isSignal": true; }; "stagger": { "alias": "stagger"; "required": false; "isSignal": true; }; "spins": { "alias": "spins"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "design": { "alias": "design"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "animate": { "alias": "animate"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/** DOM shape of the real `<ks-avatar>` custom element, typed for the wrapper. */
|
|
1397
|
+
type KsAvatarElement = HTMLElement & {
|
|
1398
|
+
src: string;
|
|
1399
|
+
alt: string;
|
|
1400
|
+
initials: string;
|
|
1401
|
+
icon: string;
|
|
1402
|
+
size: KsSize;
|
|
1403
|
+
variant: KsBaseVariant;
|
|
1404
|
+
square: boolean;
|
|
1405
|
+
};
|
|
1406
|
+
/**
|
|
1407
|
+
* Angular wrapper around the `<ks-avatar>` Stencil custom element.
|
|
1408
|
+
*
|
|
1409
|
+
* Purely presentational — no events, no `<slot>` in the wrapped Stencil
|
|
1410
|
+
* render, plain inputs only (same shape as `Inputs/theme-switch/theme-switch.ts`).
|
|
1411
|
+
*/
|
|
1412
|
+
declare class KsAvatarComponent {
|
|
1413
|
+
private readonly el;
|
|
1414
|
+
/** Image URL — takes priority over initials */
|
|
1415
|
+
readonly src: _angular_core.InputSignal<string>;
|
|
1416
|
+
/** Alt text for the image */
|
|
1417
|
+
readonly alt: _angular_core.InputSignal<string>;
|
|
1418
|
+
/** Initials shown when no image (e.g. "KS") */
|
|
1419
|
+
readonly initials: _angular_core.InputSignal<string>;
|
|
1420
|
+
/** Icon class shown when neither src nor initials */
|
|
1421
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
1422
|
+
/** Size */
|
|
1423
|
+
readonly size: _angular_core.InputSignal<KsSize>;
|
|
1424
|
+
/** Colour variant — used when showing initials or icon */
|
|
1425
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
1426
|
+
/** Circular (default) or rounded-square */
|
|
1427
|
+
readonly square: _angular_core.InputSignal<boolean>;
|
|
1428
|
+
constructor(ref: ElementRef<KsAvatarElement>);
|
|
1429
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsAvatarComponent, never>;
|
|
1430
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsAvatarComponent, "ks-avatar", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "square": { "alias": "square"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/** Mirrors the inline union used by `core/src/components/Layout/card/card.tsx`. */
|
|
1434
|
+
type KsCardVariant = 'default' | 'outlined' | 'elevated' | 'flat';
|
|
1435
|
+
/** DOM shape of the real `<ks-card>` custom element, typed for the wrapper. */
|
|
1436
|
+
type KsCardElement = HTMLElement & {
|
|
1437
|
+
label: string;
|
|
1438
|
+
cardTitle: string;
|
|
1439
|
+
subtitle: string;
|
|
1440
|
+
imageUrl: string;
|
|
1441
|
+
imageAlt: string;
|
|
1442
|
+
iconClass: string;
|
|
1443
|
+
variant: KsCardVariant;
|
|
1444
|
+
};
|
|
1445
|
+
/**
|
|
1446
|
+
* Angular wrapper around the `<ks-card>` Stencil custom element.
|
|
1447
|
+
*
|
|
1448
|
+
* ## Slots
|
|
1449
|
+
* Unlike the Buttons/Calendars/Dropdowns wrappers, `<ks-card>` renders
|
|
1450
|
+
* real, consumer-facing `<slot name="header" />`, `<slot />` (default) and
|
|
1451
|
+
* `<slot name="footer" />` in its scoped (non-shadow) Stencil `render()`.
|
|
1452
|
+
* `template: '<ng-content></ng-content>'` (a single unfiltered pass-through,
|
|
1453
|
+
* not per-slot `<ng-content select="...">`) projects ALL of this Angular
|
|
1454
|
+
* component's content as real light-DOM children of the `<ks-card>` host
|
|
1455
|
+
* node; Stencil's own scoped-slot relocation logic (see `shadow: false,
|
|
1456
|
+
* scoped: true` on the Stencil class) then places each child into the
|
|
1457
|
+
* right native `<slot>` based on that child's own `slot="header"` /
|
|
1458
|
+
* `slot="footer"` attribute — same as plain HTML, nothing Angular-specific
|
|
1459
|
+
* needed beyond forwarding the projected content through untouched.
|
|
1460
|
+
* Usage: `<ks-card><ks-header slot="header">…</ks-header>Body<ks-footer slot="footer">…</ks-footer></ks-card>`.
|
|
1461
|
+
*/
|
|
1462
|
+
declare class KsCardComponent {
|
|
1463
|
+
private readonly el;
|
|
1464
|
+
/** Card title */
|
|
1465
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1466
|
+
/** Card title (Angular input name was `title`; aliased to avoid clashing with the native `title` attribute/tooltip). */
|
|
1467
|
+
readonly cardTitle: _angular_core.InputSignal<string>;
|
|
1468
|
+
/** Subtitle / subheading */
|
|
1469
|
+
readonly subtitle: _angular_core.InputSignal<string>;
|
|
1470
|
+
/** URL for header image */
|
|
1471
|
+
readonly imageUrl: _angular_core.InputSignal<string>;
|
|
1472
|
+
/** Alt text for image */
|
|
1473
|
+
readonly imageAlt: _angular_core.InputSignal<string>;
|
|
1474
|
+
/** SVG icon class */
|
|
1475
|
+
readonly iconClass: _angular_core.InputSignal<string>;
|
|
1476
|
+
/** Card visual variant */
|
|
1477
|
+
readonly variant: _angular_core.InputSignal<KsCardVariant>;
|
|
1478
|
+
/** Emits when clicked (only when clickable). From the native `cardClick` event. */
|
|
1479
|
+
readonly ksCardClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
1480
|
+
constructor(ref: ElementRef<KsCardElement>);
|
|
1481
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsCardComponent, never>;
|
|
1482
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsCardComponent, "ks-card", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "cardTitle": { "alias": "cardTitle"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "imageUrl": { "alias": "imageUrl"; "required": false; "isSignal": true; }; "imageAlt": { "alias": "imageAlt"; "required": false; "isSignal": true; }; "iconClass": { "alias": "iconClass"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "ksCardClick": "ksCardClick"; }, never, ["*"], true, never>;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/** Mirrors the inline union used by `core/src/components/Layout/code-view/code-view.tsx`. */
|
|
1486
|
+
type KsCodeViewLanguage = 'html' | 'css' | 'typescript' | 'javascript' | 'json' | 'bash' | 'text';
|
|
1487
|
+
/**
|
|
1488
|
+
* Mirrors `ActionButtonsConfig` exported by
|
|
1489
|
+
* `core/src/components/Layout/code-view/code-view.tsx`. Duplicated
|
|
1490
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1491
|
+
*/
|
|
1492
|
+
interface ActionButtonsConfig {
|
|
1493
|
+
expand?: boolean;
|
|
1494
|
+
code?: boolean;
|
|
1495
|
+
}
|
|
1496
|
+
/** DOM shape of the real `<ks-code-view>` custom element, typed for the wrapper. */
|
|
1497
|
+
type KsCodeViewElement = HTMLElement & {
|
|
1498
|
+
code: string;
|
|
1499
|
+
language: KsCodeViewLanguage;
|
|
1500
|
+
label: string;
|
|
1501
|
+
maxHeight: string;
|
|
1502
|
+
showHeader: boolean;
|
|
1503
|
+
collapsed: boolean;
|
|
1504
|
+
actionButtonConfig: ActionButtonsConfig;
|
|
1505
|
+
};
|
|
1506
|
+
/**
|
|
1507
|
+
* Angular wrapper around the `<ks-code-view>` Stencil custom element.
|
|
1508
|
+
* Purely presentational — no events, no `<slot>` in the wrapped Stencil
|
|
1509
|
+
* render, plain inputs only.
|
|
1510
|
+
*/
|
|
1511
|
+
declare class KsCodeViewComponent {
|
|
1512
|
+
private readonly el;
|
|
1513
|
+
/** The source code string to display */
|
|
1514
|
+
readonly code: _angular_core.InputSignal<string>;
|
|
1515
|
+
/** Language hint shown in the header badge */
|
|
1516
|
+
readonly language: _angular_core.InputSignal<KsCodeViewLanguage>;
|
|
1517
|
+
/** Optional title shown in the header */
|
|
1518
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1519
|
+
/** Max visible height before scroll kicks in (CSS value, e.g. '20rem') */
|
|
1520
|
+
readonly maxHeight: _angular_core.InputSignal<string>;
|
|
1521
|
+
/** Show the header bar with language badge & copy button */
|
|
1522
|
+
readonly showHeader: _angular_core.InputSignal<boolean>;
|
|
1523
|
+
/** Whether the code block is currently collapsed */
|
|
1524
|
+
readonly collapsed: _angular_core.InputSignal<boolean>;
|
|
1525
|
+
/** Whether the code block is to show and hide buttons */
|
|
1526
|
+
readonly actionButtonConfig: _angular_core.InputSignal<ActionButtonsConfig>;
|
|
1527
|
+
constructor(ref: ElementRef<KsCodeViewElement>);
|
|
1528
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsCodeViewComponent, never>;
|
|
1529
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsCodeViewComponent, "ks-code-view", never, { "code": { "alias": "code"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "actionButtonConfig": { "alias": "actionButtonConfig"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
/** Mirrors the inline union used by `core/src/components/Layout/dialog/dialog.tsx`. */
|
|
1533
|
+
type KsDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
1534
|
+
/** DOM shape of the real `<ks-dialog>` custom element, typed for the wrapper. */
|
|
1535
|
+
type KsDialogElement = HTMLElement & {
|
|
1536
|
+
open: boolean;
|
|
1537
|
+
label: string;
|
|
1538
|
+
hideClose: boolean;
|
|
1539
|
+
persistent: boolean;
|
|
1540
|
+
size: KsDialogSize;
|
|
1541
|
+
target: string;
|
|
1542
|
+
};
|
|
1543
|
+
/**
|
|
1544
|
+
* Angular wrapper around the `<ks-dialog>` Stencil custom element.
|
|
1545
|
+
*
|
|
1546
|
+
* `open` is a plain input, not `ControlValueAccessor` — a dialog's open
|
|
1547
|
+
* state isn't form data. For the same reason described throughout this
|
|
1548
|
+
* repo, the output can't be named `openChange` (it would collide with the
|
|
1549
|
+
* native `openChange`-style close event — see below), so bind explicitly:
|
|
1550
|
+
* `[open]="isOpen" (ksCloseDialog)="isOpen = false"`.
|
|
1551
|
+
*
|
|
1552
|
+
* ## Slots
|
|
1553
|
+
* `<ks-dialog>` renders real, consumer-facing `<slot />` (default) and
|
|
1554
|
+
* `<slot name="footer" />`. Same single unfiltered `<ng-content>`
|
|
1555
|
+
* pass-through as `Layout/card/card.ts` — see that file's doc comment for
|
|
1556
|
+
* the full explanation of how native `slot="footer"` attributes on
|
|
1557
|
+
* projected children route into the right Stencil `<slot>`.
|
|
1558
|
+
*/
|
|
1559
|
+
declare class KsDialogComponent {
|
|
1560
|
+
private readonly el;
|
|
1561
|
+
/** Whether the dialog is open */
|
|
1562
|
+
readonly open: _angular_core.InputSignal<boolean>;
|
|
1563
|
+
/** Dialog title */
|
|
1564
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1565
|
+
/** Hide the built-in close (✕) button */
|
|
1566
|
+
readonly hideClose: _angular_core.InputSignal<boolean>;
|
|
1567
|
+
/** Prevent closing by clicking the backdrop */
|
|
1568
|
+
readonly persistent: _angular_core.InputSignal<boolean>;
|
|
1569
|
+
/** Panel size */
|
|
1570
|
+
readonly size: _angular_core.InputSignal<KsDialogSize>;
|
|
1571
|
+
/** Target element id (without #), or '' to use `<body>`. When set, the overlay covers only that element and the dialog is centred inside it. */
|
|
1572
|
+
readonly target: _angular_core.InputSignal<string>;
|
|
1573
|
+
/** Emits when the dialog requests close. From the native `closeDialog` event. */
|
|
1574
|
+
readonly ksCloseDialog: _angular_core.OutputEmitterRef<void>;
|
|
1575
|
+
constructor(ref: ElementRef<KsDialogElement>);
|
|
1576
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsDialogComponent, never>;
|
|
1577
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsDialogComponent, "ks-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; "persistent": { "alias": "persistent"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, { "ksCloseDialog": "ksCloseDialog"; }, never, ["*"], true, never>;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
/** DOM shape of the real `<ks-not-found>` custom element, typed for the wrapper. */
|
|
1581
|
+
type KsNotFoundElement = HTMLElement & {
|
|
1582
|
+
buttonLabel: string;
|
|
1583
|
+
homeHref: string;
|
|
1584
|
+
countdown: number;
|
|
1585
|
+
showActionButtons: boolean;
|
|
1586
|
+
code: string;
|
|
1587
|
+
message: string;
|
|
1588
|
+
description: string;
|
|
1589
|
+
};
|
|
1590
|
+
/**
|
|
1591
|
+
* Angular wrapper around the `<ks-not-found>` Stencil custom element.
|
|
1592
|
+
*
|
|
1593
|
+
* `<ks-not-found>` renders a real, consumer-facing default `<slot />`.
|
|
1594
|
+
* Same single unfiltered `<ng-content>` pass-through as
|
|
1595
|
+
* `Layout/card/card.ts` — see that file's doc comment for the full
|
|
1596
|
+
* explanation of how projected content routes into the Stencil `<slot>`.
|
|
1597
|
+
*/
|
|
1598
|
+
declare class KsNotFoundComponent {
|
|
1599
|
+
private readonly el;
|
|
1600
|
+
/** Label shown on the redirect button (default: "Go to Home") */
|
|
1601
|
+
readonly buttonLabel: _angular_core.InputSignal<string>;
|
|
1602
|
+
/** href the button and auto-redirect navigate to (default: "./") */
|
|
1603
|
+
readonly homeHref: _angular_core.InputSignal<string>;
|
|
1604
|
+
/** Seconds before auto-redirect fires. Set to `0` to disable the countdown. */
|
|
1605
|
+
readonly countdown: _angular_core.InputSignal<number>;
|
|
1606
|
+
readonly showActionButtons: _angular_core.InputSignal<boolean>;
|
|
1607
|
+
/** Custom heading (default: "404") */
|
|
1608
|
+
readonly code: _angular_core.InputSignal<string>;
|
|
1609
|
+
/** Custom sub-heading (default: "Page not found") */
|
|
1610
|
+
readonly message: _angular_core.InputSignal<string>;
|
|
1611
|
+
/** Custom description below the heading */
|
|
1612
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
1613
|
+
/** Emitted just before the auto-redirect navigates away. From the native `redirecting` event. */
|
|
1614
|
+
readonly ksRedirecting: _angular_core.OutputEmitterRef<void>;
|
|
1615
|
+
constructor(ref: ElementRef<KsNotFoundElement>);
|
|
1616
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsNotFoundComponent, never>;
|
|
1617
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsNotFoundComponent, "ks-not-found", never, { "buttonLabel": { "alias": "buttonLabel"; "required": false; "isSignal": true; }; "homeHref": { "alias": "homeHref"; "required": false; "isSignal": true; }; "countdown": { "alias": "countdown"; "required": false; "isSignal": true; }; "showActionButtons": { "alias": "showActionButtons"; "required": false; "isSignal": true; }; "code": { "alias": "code"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, { "ksRedirecting": "ksRedirecting"; }, never, ["*"], true, never>;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
type KsSidebarPosition = 'left' | 'right';
|
|
1621
|
+
type KsSidebarType = 'over' | 'push';
|
|
1622
|
+
/** DOM shape of the real `<ks-sidebar>` custom element, typed for the wrapper. */
|
|
1623
|
+
type KsSidebarElement = HTMLElement & {
|
|
1624
|
+
position: KsSidebarPosition;
|
|
1625
|
+
type: KsSidebarType;
|
|
1626
|
+
open: boolean;
|
|
1627
|
+
width: string;
|
|
1628
|
+
target: string;
|
|
1629
|
+
openPanel(): Promise<void>;
|
|
1630
|
+
close(): Promise<void>;
|
|
1631
|
+
toggle(): Promise<void>;
|
|
1632
|
+
};
|
|
1633
|
+
/**
|
|
1634
|
+
* Angular wrapper around the `<ks-sidebar>` Stencil custom element.
|
|
1635
|
+
*
|
|
1636
|
+
* `open` is a plain input/output pair, not `ControlValueAccessor` — panel
|
|
1637
|
+
* open state isn't form data. The native event is literally `openChange`,
|
|
1638
|
+
* so (per the double-fire rule in `Buttons/button.ts`) the Angular output
|
|
1639
|
+
* can't reuse that name; bind explicitly instead:
|
|
1640
|
+
* `[open]="isOpen" (ksOpenChange)="isOpen = $event"`.
|
|
1641
|
+
*
|
|
1642
|
+
* `<ks-sidebar>`'s own `@Method()`s (`openPanel`/`close`/`toggle`) are
|
|
1643
|
+
* exposed here as real passthrough methods — grab the component instance
|
|
1644
|
+
* with `@ViewChild(KsSidebarComponent)` and call them directly.
|
|
1645
|
+
*
|
|
1646
|
+
* ## Slots
|
|
1647
|
+
* Renders real `<slot name="header" />`, `<slot />` (default) and
|
|
1648
|
+
* `<slot name="footer" />`. Same single unfiltered `<ng-content>`
|
|
1649
|
+
* pass-through as `Layout/card/card.ts`.
|
|
1650
|
+
*/
|
|
1651
|
+
declare class KsSidebarComponent {
|
|
1652
|
+
private readonly el;
|
|
1653
|
+
/** Which side the panel appears on */
|
|
1654
|
+
readonly position: _angular_core.InputSignal<KsSidebarPosition>;
|
|
1655
|
+
/** Behaviour type */
|
|
1656
|
+
readonly type: _angular_core.InputSignal<KsSidebarType>;
|
|
1657
|
+
/** Initial/controlled open state. Bind explicitly: `[open]="isOpen" (ksOpenChange)="isOpen = $event"`. */
|
|
1658
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
1659
|
+
/** Width of the sidebar panel */
|
|
1660
|
+
readonly width: _angular_core.InputSignal<string>;
|
|
1661
|
+
/** Target element id (without #) or '' to use the page. */
|
|
1662
|
+
readonly target: _angular_core.InputSignal<string>;
|
|
1663
|
+
/** Fires whenever `open` changes. From the native `openChange` event. */
|
|
1664
|
+
readonly ksOpenChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1665
|
+
constructor(ref: ElementRef<KsSidebarElement>);
|
|
1666
|
+
/** Passthrough to `<ks-sidebar>`'s own `@Method() openPanel()`. */
|
|
1667
|
+
openPanel(): Promise<void>;
|
|
1668
|
+
/** Passthrough to `<ks-sidebar>`'s own `@Method() close()`. */
|
|
1669
|
+
close(): Promise<void>;
|
|
1670
|
+
/** Passthrough to `<ks-sidebar>`'s own `@Method() toggle()`. */
|
|
1671
|
+
toggle(): Promise<void>;
|
|
1672
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsSidebarComponent, never>;
|
|
1673
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsSidebarComponent, "ks-sidebar", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "ksOpenChange": "ksOpenChange"; }, never, ["*"], true, never>;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
/** Mirrors the inline unions used by `core/src/components/Layout/table/table.tsx`. */
|
|
1677
|
+
type KsTableVariant = 'default' | 'striped' | 'bordered' | 'compact';
|
|
1678
|
+
type KsTableSize = 'sm' | 'md' | 'lg';
|
|
1679
|
+
/** DOM shape of the real `<ks-table>` custom element, typed for the wrapper. */
|
|
1680
|
+
type KsTableElement = HTMLElement & {
|
|
1681
|
+
data: Record<string, unknown>[];
|
|
1682
|
+
columns: string[];
|
|
1683
|
+
columnLabels: Record<string, string>;
|
|
1684
|
+
variant: KsTableVariant;
|
|
1685
|
+
size: KsTableSize;
|
|
1686
|
+
caption: string;
|
|
1687
|
+
scrollable: boolean;
|
|
1688
|
+
hoverable: boolean;
|
|
1689
|
+
};
|
|
1690
|
+
/**
|
|
1691
|
+
* Angular wrapper around the `<ks-table>` Stencil custom element.
|
|
1692
|
+
* No `<slot>` in the wrapped Stencil render — data-driven only.
|
|
1693
|
+
*/
|
|
1694
|
+
declare class KsTableComponent {
|
|
1695
|
+
private readonly el;
|
|
1696
|
+
/** Array of objects to render as table rows */
|
|
1697
|
+
readonly data: _angular_core.InputSignal<Record<string, unknown>[]>;
|
|
1698
|
+
/** Optional explicit column order; defaults to keys of the first row */
|
|
1699
|
+
readonly columns: _angular_core.InputSignal<string[]>;
|
|
1700
|
+
/** Optional custom column header labels: { key: 'Display Label' } */
|
|
1701
|
+
readonly columnLabels: _angular_core.InputSignal<Record<string, string>>;
|
|
1702
|
+
/** Visual variant */
|
|
1703
|
+
readonly variant: _angular_core.InputSignal<KsTableVariant>;
|
|
1704
|
+
/** Row size */
|
|
1705
|
+
readonly size: _angular_core.InputSignal<KsTableSize>;
|
|
1706
|
+
/** Show a caption / title above the table */
|
|
1707
|
+
readonly caption: _angular_core.InputSignal<string>;
|
|
1708
|
+
/** Make the table horizontally scrollable on overflow */
|
|
1709
|
+
readonly scrollable: _angular_core.InputSignal<boolean>;
|
|
1710
|
+
/** Highlight row on hover */
|
|
1711
|
+
readonly hoverable: _angular_core.InputSignal<boolean>;
|
|
1712
|
+
/** Emits the clicked row's data. From the native `rowClick` event. */
|
|
1713
|
+
readonly ksRowClick: _angular_core.OutputEmitterRef<Record<string, unknown>>;
|
|
1714
|
+
constructor(ref: ElementRef<KsTableElement>);
|
|
1715
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTableComponent, never>;
|
|
1716
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTableComponent, "ks-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "columnLabels": { "alias": "columnLabels"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "hoverable": { "alias": "hoverable"; "required": false; "isSignal": true; }; }, { "ksRowClick": "ksRowClick"; }, never, never, true, never>;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
/** DOM shape of the real `<ks-tooltip>` custom element, typed for the wrapper. */
|
|
1720
|
+
type KsTooltipElement = HTMLElement & {
|
|
1721
|
+
text: string;
|
|
1722
|
+
position: KsPosition;
|
|
1723
|
+
visible: boolean;
|
|
1724
|
+
};
|
|
1725
|
+
/**
|
|
1726
|
+
* Angular wrapper around the `<ks-tooltip>` Stencil custom element.
|
|
1727
|
+
*
|
|
1728
|
+
* `<ks-tooltip>` renders a real, consumer-facing default `<slot />` for
|
|
1729
|
+
* the element the tooltip is attached to. Same single unfiltered
|
|
1730
|
+
* `<ng-content>` pass-through as `Layout/card/card.ts` — wrap the
|
|
1731
|
+
* trigger element as `<ks-tooltip text="Hi"><button>Hover me</button></ks-tooltip>`.
|
|
1732
|
+
*/
|
|
1733
|
+
declare class KsTooltipComponent {
|
|
1734
|
+
private readonly el;
|
|
1735
|
+
/** Tooltip text */
|
|
1736
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
1737
|
+
/** Preferred placement */
|
|
1738
|
+
readonly position: _angular_core.InputSignal<KsPosition>;
|
|
1739
|
+
/** Show tooltip on demand (true = always visible) — leave false for hover behaviour */
|
|
1740
|
+
readonly visible: _angular_core.InputSignal<boolean>;
|
|
1741
|
+
constructor(ref: ElementRef<KsTooltipElement>);
|
|
1742
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTooltipComponent, never>;
|
|
1743
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTooltipComponent, "ks-tooltip", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* Mirrors `KsAccordionItem` exported by
|
|
1748
|
+
* `core/src/components/Navigation/accordion/accordion.tsx`. Duplicated
|
|
1749
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1750
|
+
*/
|
|
1751
|
+
interface KsAccordionItem {
|
|
1752
|
+
key: string;
|
|
1753
|
+
label: string;
|
|
1754
|
+
icon?: string;
|
|
1755
|
+
disabled?: boolean;
|
|
1756
|
+
}
|
|
1757
|
+
/** DOM shape of the real `<ks-accordion>` custom element, typed for the wrapper. */
|
|
1758
|
+
type KsAccordionElement = HTMLElement & {
|
|
1759
|
+
items: KsAccordionItem[];
|
|
1760
|
+
multi: boolean;
|
|
1761
|
+
openKeys: string[];
|
|
1762
|
+
};
|
|
1763
|
+
/**
|
|
1764
|
+
* Angular wrapper around the `<ks-accordion>` Stencil custom element.
|
|
1765
|
+
*
|
|
1766
|
+
* ## Panel content — `ksPanel`, NOT a native `slot` attribute
|
|
1767
|
+
* The Stencil source maps each light-DOM child carrying a `ksPanel="key"`
|
|
1768
|
+
* attribute to a matching named `<slot>` internally (see
|
|
1769
|
+
* `core/src/utils/ks-slots.util.ts`'s `getKsPanelMap()`) — it does NOT use
|
|
1770
|
+
* the browser-native `slot="..."` attribute consumers would use for
|
|
1771
|
+
* `Layout/card/card.ts`-style components. `template: '<ng-content></ng-content>'`
|
|
1772
|
+
* still applies the same way: it's a single, unfiltered pass-through of
|
|
1773
|
+
* whatever this Angular component's own template projects, as real
|
|
1774
|
+
* light-DOM children of the `<ks-accordion>` host — the wrapper does no
|
|
1775
|
+
* filtering itself, it just needs to exist so the projected content
|
|
1776
|
+
* becomes real children for Stencil's `getKsPanelMap()` scan to find.
|
|
1777
|
+
* Usage:
|
|
1778
|
+
* `<ks-accordion [items]="items">
|
|
1779
|
+
* <div ksPanel="profile">Profile body…</div>
|
|
1780
|
+
* <div ksPanel="settings">Settings body…</div>
|
|
1781
|
+
* </ks-accordion>`
|
|
1782
|
+
*/
|
|
1783
|
+
declare class KsAccordionComponent {
|
|
1784
|
+
private readonly el;
|
|
1785
|
+
/** List of accordion panel definitions */
|
|
1786
|
+
readonly items: _angular_core.InputSignal<KsAccordionItem[]>;
|
|
1787
|
+
/** Allow multiple panels open simultaneously */
|
|
1788
|
+
readonly multi: _angular_core.InputSignal<boolean>;
|
|
1789
|
+
/** Keys that should be open by default */
|
|
1790
|
+
readonly openKeys: _angular_core.InputSignal<string[]>;
|
|
1791
|
+
/** Emits the key that was toggled. From the native `toggled` event. */
|
|
1792
|
+
readonly ksToggled: _angular_core.OutputEmitterRef<string>;
|
|
1793
|
+
constructor(ref: ElementRef<KsAccordionElement>);
|
|
1794
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsAccordionComponent, never>;
|
|
1795
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsAccordionComponent, "ks-accordion", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "openKeys": { "alias": "openKeys"; "required": false; "isSignal": true; }; }, { "ksToggled": "ksToggled"; }, never, ["*"], true, never>;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* Mirrors `KsBreadcrumbItem` exported by
|
|
1800
|
+
* `core/src/components/Navigation/breadcrumb/breadcrumb.tsx`. Duplicated
|
|
1801
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1802
|
+
*/
|
|
1803
|
+
interface KsBreadcrumbItem {
|
|
1804
|
+
label: string;
|
|
1805
|
+
/** Route path or href — omit for the active (last) item */
|
|
1806
|
+
href?: string;
|
|
1807
|
+
/** Optional icon class */
|
|
1808
|
+
icon?: string;
|
|
1809
|
+
}
|
|
1810
|
+
/** DOM shape of the real `<ks-breadcrumb>` custom element, typed for the wrapper. */
|
|
1811
|
+
type KsBreadcrumbElement = HTMLElement & {
|
|
1812
|
+
items: KsBreadcrumbItem[];
|
|
1813
|
+
separator: string;
|
|
1814
|
+
size: KsBaseSize;
|
|
1815
|
+
};
|
|
1816
|
+
/**
|
|
1817
|
+
* Angular wrapper around the `<ks-breadcrumb>` Stencil custom element.
|
|
1818
|
+
* Purely presentational — no events, no `<slot>` in the wrapped Stencil
|
|
1819
|
+
* render, plain inputs only.
|
|
1820
|
+
*/
|
|
1821
|
+
declare class KsBreadcrumbComponent {
|
|
1822
|
+
private readonly el;
|
|
1823
|
+
/** Ordered list of breadcrumb items */
|
|
1824
|
+
readonly items: _angular_core.InputSignal<KsBreadcrumbItem[]>;
|
|
1825
|
+
/** Separator character or symbol */
|
|
1826
|
+
readonly separator: _angular_core.InputSignal<string>;
|
|
1827
|
+
/** Size */
|
|
1828
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
1829
|
+
constructor(ref: ElementRef<KsBreadcrumbElement>);
|
|
1830
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsBreadcrumbComponent, never>;
|
|
1831
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsBreadcrumbComponent, "ks-breadcrumb", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
/**
|
|
1835
|
+
* Mirrors `KsCarouselSlide` exported by
|
|
1836
|
+
* `core/src/components/Navigation/carousel/carousel.tsx`. Duplicated
|
|
1837
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1838
|
+
*/
|
|
1839
|
+
interface KsCarouselSlide {
|
|
1840
|
+
key: string;
|
|
1841
|
+
imageUrl?: string;
|
|
1842
|
+
alt?: string;
|
|
1843
|
+
label?: string;
|
|
1844
|
+
caption?: string;
|
|
1845
|
+
}
|
|
1846
|
+
/** DOM shape of the real `<ks-carousel>` custom element, typed for the wrapper. */
|
|
1847
|
+
type KsCarouselElement = HTMLElement & {
|
|
1848
|
+
slides: KsCarouselSlide[];
|
|
1849
|
+
autoPlay: number;
|
|
1850
|
+
showControls: boolean;
|
|
1851
|
+
showDots: boolean;
|
|
1852
|
+
};
|
|
1853
|
+
/**
|
|
1854
|
+
* Angular wrapper around the `<ks-carousel>` Stencil custom element.
|
|
1855
|
+
* No `<slot>` in the wrapped Stencil render — data-driven only.
|
|
1856
|
+
*/
|
|
1857
|
+
declare class KsCarouselComponent {
|
|
1858
|
+
private readonly el;
|
|
1859
|
+
/** Slides to display */
|
|
1860
|
+
readonly slides: _angular_core.InputSignal<KsCarouselSlide[]>;
|
|
1861
|
+
/** Auto-play interval in ms (0 = disabled) */
|
|
1862
|
+
readonly autoPlay: _angular_core.InputSignal<number>;
|
|
1863
|
+
/** Show prev/next arrow controls */
|
|
1864
|
+
readonly showControls: _angular_core.InputSignal<boolean>;
|
|
1865
|
+
/** Show dot indicators */
|
|
1866
|
+
readonly showDots: _angular_core.InputSignal<boolean>;
|
|
1867
|
+
/** Emits the current slide index on change. From the native `slideChange` event. */
|
|
1868
|
+
readonly ksSlideChange: _angular_core.OutputEmitterRef<number>;
|
|
1869
|
+
constructor(ref: ElementRef<KsCarouselElement>);
|
|
1870
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsCarouselComponent, never>;
|
|
1871
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsCarouselComponent, "ks-carousel", never, { "slides": { "alias": "slides"; "required": false; "isSignal": true; }; "autoPlay": { "alias": "autoPlay"; "required": false; "isSignal": true; }; "showControls": { "alias": "showControls"; "required": false; "isSignal": true; }; "showDots": { "alias": "showDots"; "required": false; "isSignal": true; }; }, { "ksSlideChange": "ksSlideChange"; }, never, never, true, never>;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* Mirrors `KsContextMenuItem` / `KsContextMenuPosition` exported by
|
|
1876
|
+
* `core/src/components/Navigation/context-menu/context-menu.tsx`.
|
|
1877
|
+
* Duplicated locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1878
|
+
*/
|
|
1879
|
+
interface KsContextMenuItem {
|
|
1880
|
+
key: string;
|
|
1881
|
+
label?: string;
|
|
1882
|
+
icon?: string;
|
|
1883
|
+
divider?: boolean;
|
|
1884
|
+
disabled?: boolean;
|
|
1885
|
+
danger?: boolean;
|
|
1886
|
+
}
|
|
1887
|
+
interface KsContextMenuPosition {
|
|
1888
|
+
x: number;
|
|
1889
|
+
y: number;
|
|
1890
|
+
}
|
|
1891
|
+
/** DOM shape of the real `<ks-context-menu>` custom element, typed for the wrapper. */
|
|
1892
|
+
type KsContextMenuElement = HTMLElement & {
|
|
1893
|
+
items: KsContextMenuItem[];
|
|
1894
|
+
open(pos: KsContextMenuPosition): Promise<void>;
|
|
1895
|
+
close(): Promise<void>;
|
|
1896
|
+
};
|
|
1897
|
+
/**
|
|
1898
|
+
* Angular wrapper around the `<ks-context-menu>` Stencil custom element.
|
|
1899
|
+
*
|
|
1900
|
+
* `<ks-context-menu>`'s own `@Method()`s (`open(pos)`/`close()`) are
|
|
1901
|
+
* exposed here as real passthrough methods — grab the component instance
|
|
1902
|
+
* with `@ViewChild(KsContextMenuComponent)` and call them directly, e.g.
|
|
1903
|
+
* `onContextMenu(e: MouseEvent) { menu.open({ x: e.clientX, y: e.clientY }); }`.
|
|
1904
|
+
*
|
|
1905
|
+
* No `<slot>` in the wrapped Stencil render — data-driven only.
|
|
1906
|
+
*/
|
|
1907
|
+
declare class KsContextMenuComponent {
|
|
1908
|
+
private readonly el;
|
|
1909
|
+
/** Menu items */
|
|
1910
|
+
readonly items: _angular_core.InputSignal<KsContextMenuItem[]>;
|
|
1911
|
+
/** Emits the clicked item key. From the native `itemClicked` event. */
|
|
1912
|
+
readonly ksItemClicked: _angular_core.OutputEmitterRef<string>;
|
|
1913
|
+
constructor(ref: ElementRef<KsContextMenuElement>);
|
|
1914
|
+
/** Passthrough to `<ks-context-menu>`'s own `@Method() open(pos)`. */
|
|
1915
|
+
open(pos: KsContextMenuPosition): Promise<void>;
|
|
1916
|
+
/** Passthrough to `<ks-context-menu>`'s own `@Method() close()`. */
|
|
1917
|
+
close(): Promise<void>;
|
|
1918
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsContextMenuComponent, never>;
|
|
1919
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsContextMenuComponent, "ks-context-menu", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "ksItemClicked": "ksItemClicked"; }, never, never, true, never>;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
/**
|
|
1923
|
+
* Mirrors the types exported by
|
|
1924
|
+
* `core/src/components/Navigation/nav-bar/nav-bar.tsx`. Duplicated
|
|
1925
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
1926
|
+
*/
|
|
1927
|
+
interface KsNavBarItem {
|
|
1928
|
+
key: string;
|
|
1929
|
+
name: string;
|
|
1930
|
+
iconClass: string;
|
|
1931
|
+
/** href to navigate to */
|
|
1932
|
+
redirectLink: string;
|
|
1933
|
+
activationFragment?: string;
|
|
1934
|
+
disabled?: boolean;
|
|
1935
|
+
}
|
|
1936
|
+
type KsNavBarSection = 'top' | 'mid' | 'bottom';
|
|
1937
|
+
interface KsNavBarSectionItem extends KsNavBarItem {
|
|
1938
|
+
section: KsNavBarSection;
|
|
1939
|
+
}
|
|
1940
|
+
type KsNavBarMode = 'iconOnly' | 'hoverToExpand' | 'alwaysOpen';
|
|
1941
|
+
/** DOM shape of the real `<ks-nav-bar>` custom element, typed for the wrapper. */
|
|
1942
|
+
type KsNavBarElement = HTMLElement & {
|
|
1943
|
+
items: KsNavBarSectionItem[];
|
|
1944
|
+
mode: KsNavBarMode;
|
|
1945
|
+
iconWidth: string;
|
|
1946
|
+
expandedWidth: string;
|
|
1947
|
+
};
|
|
1948
|
+
/**
|
|
1949
|
+
* Angular wrapper around the `<ks-nav-bar>` Stencil custom element.
|
|
1950
|
+
* Renders a real, consumer-facing default `<slot />` — same single
|
|
1951
|
+
* unfiltered `<ng-content>` pass-through as `Layout/card/card.ts`.
|
|
1952
|
+
*/
|
|
1953
|
+
declare class KsNavBarComponent {
|
|
1954
|
+
private readonly el;
|
|
1955
|
+
/** All nav items with their section assignment */
|
|
1956
|
+
readonly items: _angular_core.InputSignal<KsNavBarSectionItem[]>;
|
|
1957
|
+
/** Expansion mode */
|
|
1958
|
+
readonly mode: _angular_core.InputSignal<KsNavBarMode>;
|
|
1959
|
+
/** Width of the icon-only rail */
|
|
1960
|
+
readonly iconWidth: _angular_core.InputSignal<string>;
|
|
1961
|
+
/** Width of the expanded label panel */
|
|
1962
|
+
readonly expandedWidth: _angular_core.InputSignal<string>;
|
|
1963
|
+
constructor(ref: ElementRef<KsNavBarElement>);
|
|
1964
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsNavBarComponent, never>;
|
|
1965
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsNavBarComponent, "ks-nav-bar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "iconWidth": { "alias": "iconWidth"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
/** DOM shape of the real `<ks-pagination>` custom element, typed for the wrapper. */
|
|
1969
|
+
type KsPaginationElement = HTMLElement & {
|
|
1970
|
+
total: number;
|
|
1971
|
+
pageSize: number;
|
|
1972
|
+
currentPage: number;
|
|
1973
|
+
showPageSize: boolean;
|
|
1974
|
+
pageSizeOptions: number[];
|
|
1975
|
+
showQuickJumper: boolean;
|
|
1976
|
+
maxPageButtons: number;
|
|
1977
|
+
};
|
|
1978
|
+
/**
|
|
1979
|
+
* Angular wrapper around the `<ks-pagination>` Stencil custom element.
|
|
1980
|
+
* No `<slot>` in the wrapped Stencil render — data-driven only.
|
|
1981
|
+
*/
|
|
1982
|
+
declare class KsPaginationComponent {
|
|
1983
|
+
private readonly el;
|
|
1984
|
+
/** Total number of items */
|
|
1985
|
+
readonly total: _angular_core.InputSignal<number>;
|
|
1986
|
+
/** Items per page */
|
|
1987
|
+
readonly pageSize: _angular_core.InputSignal<number>;
|
|
1988
|
+
/** Current page (1-indexed) */
|
|
1989
|
+
readonly currentPage: _angular_core.InputSignal<number>;
|
|
1990
|
+
/** Show page size selector */
|
|
1991
|
+
readonly showPageSize: _angular_core.InputSignal<boolean>;
|
|
1992
|
+
/** Available page sizes */
|
|
1993
|
+
readonly pageSizeOptions: _angular_core.InputSignal<number[]>;
|
|
1994
|
+
/** Show quick jumper */
|
|
1995
|
+
readonly showQuickJumper: _angular_core.InputSignal<boolean>;
|
|
1996
|
+
/** Maximum number of page buttons to show */
|
|
1997
|
+
readonly maxPageButtons: _angular_core.InputSignal<number>;
|
|
1998
|
+
/** Emits when page changes. From the native `pageChange` event. */
|
|
1999
|
+
readonly ksPageChange: _angular_core.OutputEmitterRef<number>;
|
|
2000
|
+
/** Emits when page size changes. From the native `pageSizeChange` event. */
|
|
2001
|
+
readonly ksPageSizeChange: _angular_core.OutputEmitterRef<number>;
|
|
2002
|
+
constructor(ref: ElementRef<KsPaginationElement>);
|
|
2003
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsPaginationComponent, never>;
|
|
2004
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsPaginationComponent, "ks-pagination", never, { "total": { "alias": "total"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "showPageSize": { "alias": "showPageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showQuickJumper": { "alias": "showQuickJumper"; "required": false; "isSignal": true; }; "maxPageButtons": { "alias": "maxPageButtons"; "required": false; "isSignal": true; }; }, { "ksPageChange": "ksPageChange"; "ksPageSizeChange": "ksPageSizeChange"; }, never, never, true, never>;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Mirrors `KsStepItem` / `KsStepperOrientation` exported by
|
|
2009
|
+
* `core/src/components/Navigation/stepper/stepper.tsx`. Duplicated
|
|
2010
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
2011
|
+
*/
|
|
2012
|
+
interface KsStepItem {
|
|
2013
|
+
key: string;
|
|
2014
|
+
label: string;
|
|
2015
|
+
description?: string;
|
|
2016
|
+
icon?: string;
|
|
2017
|
+
optional?: boolean;
|
|
2018
|
+
}
|
|
2019
|
+
type KsStepperOrientation = 'horizontal' | 'vertical';
|
|
2020
|
+
/** DOM shape of the real `<ks-stepper>` custom element, typed for the wrapper. */
|
|
2021
|
+
type KsStepperElement = HTMLElement & {
|
|
2022
|
+
steps: KsStepItem[];
|
|
2023
|
+
activeStep: number;
|
|
2024
|
+
orientation: KsStepperOrientation;
|
|
2025
|
+
clickable: boolean;
|
|
2026
|
+
completedSteps: number[];
|
|
2027
|
+
};
|
|
2028
|
+
/**
|
|
2029
|
+
* Angular wrapper around the `<ks-stepper>` Stencil custom element.
|
|
2030
|
+
* No `<slot>` in the wrapped Stencil render — data-driven only.
|
|
2031
|
+
*/
|
|
2032
|
+
declare class KsStepperComponent {
|
|
2033
|
+
private readonly el;
|
|
2034
|
+
/** Step definitions */
|
|
2035
|
+
readonly steps: _angular_core.InputSignal<KsStepItem[]>;
|
|
2036
|
+
/** Currently active step index (0-based) */
|
|
2037
|
+
readonly activeStep: _angular_core.InputSignal<number>;
|
|
2038
|
+
/** Layout orientation */
|
|
2039
|
+
readonly orientation: _angular_core.InputSignal<KsStepperOrientation>;
|
|
2040
|
+
/** Allow clicking steps to navigate */
|
|
2041
|
+
readonly clickable: _angular_core.InputSignal<boolean>;
|
|
2042
|
+
/** Marks completed steps */
|
|
2043
|
+
readonly completedSteps: _angular_core.InputSignal<number[]>;
|
|
2044
|
+
/** Emits the new step index. From the native `stepChange` event. */
|
|
2045
|
+
readonly ksStepChange: _angular_core.OutputEmitterRef<number>;
|
|
2046
|
+
constructor(ref: ElementRef<KsStepperElement>);
|
|
2047
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsStepperComponent, never>;
|
|
2048
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsStepperComponent, "ks-stepper", never, { "steps": { "alias": "steps"; "required": false; "isSignal": true; }; "activeStep": { "alias": "activeStep"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "completedSteps": { "alias": "completedSteps"; "required": false; "isSignal": true; }; }, { "ksStepChange": "ksStepChange"; }, never, never, true, never>;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
/**
|
|
2052
|
+
* Mirrors `KsTabItem` exported by
|
|
2053
|
+
* `core/src/components/Navigation/tab/tab.tsx`. Duplicated locally — see
|
|
2054
|
+
* the note in `Buttons/button-group/button-group.ts` for why.
|
|
2055
|
+
*/
|
|
2056
|
+
interface KsTabItem {
|
|
2057
|
+
key: string;
|
|
2058
|
+
label: string;
|
|
2059
|
+
icon?: string;
|
|
2060
|
+
disabled?: boolean;
|
|
2061
|
+
}
|
|
2062
|
+
/** DOM shape of the real `<ks-tab>` custom element, typed for the wrapper. */
|
|
2063
|
+
type KsTabElement = HTMLElement & {
|
|
2064
|
+
tabs: KsTabItem[];
|
|
2065
|
+
activeKey: string;
|
|
2066
|
+
tabHeaderStyle: 'default' | 'expanded' | 'card' | 'button';
|
|
2067
|
+
};
|
|
2068
|
+
/**
|
|
2069
|
+
* Angular wrapper around the `<ks-tab>` Stencil custom element.
|
|
2070
|
+
*
|
|
2071
|
+
* Same `ksPanel="key"` → named-`<slot>` strategy as
|
|
2072
|
+
* `Navigation/accordion/accordion.ts` (NOT the native `slot="..."`
|
|
2073
|
+
* attribute) — see that file's doc comment for the full explanation.
|
|
2074
|
+
* Usage:
|
|
2075
|
+
* `<ks-tab [tabs]="tabs" activeKey="tab1">
|
|
2076
|
+
* <div ksPanel="tab1">Tab 1 content</div>
|
|
2077
|
+
* <div ksPanel="tab2">Tab 2 content</div>
|
|
2078
|
+
* </ks-tab>`
|
|
2079
|
+
*/
|
|
2080
|
+
declare class KsTabComponent {
|
|
2081
|
+
private readonly el;
|
|
2082
|
+
/** List of tab definitions */
|
|
2083
|
+
readonly tabs: _angular_core.InputSignal<KsTabItem[]>;
|
|
2084
|
+
/** Key of the initially active tab */
|
|
2085
|
+
readonly activeKey: _angular_core.InputSignal<string>;
|
|
2086
|
+
readonly tabHeaderStyle: _angular_core.InputSignal<"button" | "default" | "expanded" | "card">;
|
|
2087
|
+
/** Emits the key of the newly selected tab. From the native `tabChange` event. */
|
|
2088
|
+
readonly ksTabChange: _angular_core.OutputEmitterRef<string>;
|
|
2089
|
+
constructor(ref: ElementRef<KsTabElement>);
|
|
2090
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTabComponent, never>;
|
|
2091
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTabComponent, "ks-tab", never, { "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "activeKey": { "alias": "activeKey"; "required": false; "isSignal": true; }; "tabHeaderStyle": { "alias": "tabHeaderStyle"; "required": false; "isSignal": true; }; }, { "ksTabChange": "ksTabChange"; }, never, ["*"], true, never>;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* Mirrors `KsToolbarItem` exported by
|
|
2096
|
+
* `core/src/components/Navigation/toolbar/toolbar.tsx`. Duplicated
|
|
2097
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
2098
|
+
*/
|
|
2099
|
+
interface KsToolbarItem {
|
|
2100
|
+
key: string;
|
|
2101
|
+
icon?: string;
|
|
2102
|
+
label?: string;
|
|
2103
|
+
divider?: boolean;
|
|
2104
|
+
disabled?: boolean;
|
|
2105
|
+
active?: boolean;
|
|
2106
|
+
variant?: KsVariant;
|
|
2107
|
+
}
|
|
2108
|
+
/** DOM shape of the real `<ks-toolbar>` custom element, typed for the wrapper. */
|
|
2109
|
+
type KsToolbarElement = HTMLElement & {
|
|
2110
|
+
items: KsToolbarItem[];
|
|
2111
|
+
};
|
|
2112
|
+
/**
|
|
2113
|
+
* Angular wrapper around the `<ks-toolbar>` Stencil custom element.
|
|
2114
|
+
* Renders a real, consumer-facing default `<slot />` for extra trailing
|
|
2115
|
+
* content — same single unfiltered `<ng-content>` pass-through as
|
|
2116
|
+
* `Layout/card/card.ts`.
|
|
2117
|
+
*/
|
|
2118
|
+
declare class KsToolbarComponent {
|
|
2119
|
+
private readonly el;
|
|
2120
|
+
/** Toolbar items */
|
|
2121
|
+
readonly items: _angular_core.InputSignal<KsToolbarItem[]>;
|
|
2122
|
+
/** Emits the clicked item key. From the native `itemClicked` event. */
|
|
2123
|
+
readonly ksItemClicked: _angular_core.OutputEmitterRef<string>;
|
|
2124
|
+
constructor(ref: ElementRef<KsToolbarElement>);
|
|
2125
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsToolbarComponent, never>;
|
|
2126
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsToolbarComponent, "ks-toolbar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; }, { "ksItemClicked": "ksItemClicked"; }, never, ["*"], true, never>;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* Mirrors the types exported by
|
|
2131
|
+
* `core/src/components/Navigation/top-nav-bar/top-nav-bar.tsx`.
|
|
2132
|
+
* Duplicated locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
2133
|
+
*/
|
|
2134
|
+
type KsTopNavBarVariant = 'default' | 'underline' | 'pill';
|
|
2135
|
+
interface KsTopNavBarItem {
|
|
2136
|
+
key: string;
|
|
2137
|
+
name: string;
|
|
2138
|
+
iconClass?: string;
|
|
2139
|
+
/** href to navigate to */
|
|
2140
|
+
redirectLink: string;
|
|
2141
|
+
activationFragment?: string;
|
|
2142
|
+
disabled?: boolean;
|
|
2143
|
+
}
|
|
2144
|
+
/** DOM shape of the real `<ks-top-nav-bar>` custom element, typed for the wrapper. */
|
|
2145
|
+
type KsTopNavBarElement = HTMLElement & {
|
|
2146
|
+
items: KsTopNavBarItem[];
|
|
2147
|
+
variant: KsTopNavBarVariant;
|
|
2148
|
+
showIcons: boolean;
|
|
2149
|
+
showLabels: boolean;
|
|
2150
|
+
label: string;
|
|
2151
|
+
};
|
|
2152
|
+
/**
|
|
2153
|
+
* Angular wrapper around the `<ks-top-nav-bar>` Stencil custom element.
|
|
2154
|
+
* Renders a real, consumer-facing default `<slot />` — same single
|
|
2155
|
+
* unfiltered `<ng-content>` pass-through as `Layout/card/card.ts`.
|
|
2156
|
+
*/
|
|
2157
|
+
declare class KsTopNavBarComponent {
|
|
2158
|
+
private readonly el;
|
|
2159
|
+
/** Navigation items */
|
|
2160
|
+
readonly items: _angular_core.InputSignal<KsTopNavBarItem[]>;
|
|
2161
|
+
/** Visual style of the active indicator */
|
|
2162
|
+
readonly variant: _angular_core.InputSignal<KsTopNavBarVariant>;
|
|
2163
|
+
/** Show icon alongside label */
|
|
2164
|
+
readonly showIcons: _angular_core.InputSignal<boolean>;
|
|
2165
|
+
/** Show label text */
|
|
2166
|
+
readonly showLabels: _angular_core.InputSignal<boolean>;
|
|
2167
|
+
/** Aria label for the nav element */
|
|
2168
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
2169
|
+
constructor(ref: ElementRef<KsTopNavBarElement>);
|
|
2170
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTopNavBarComponent, never>;
|
|
2171
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTopNavBarComponent, "ks-top-nav-bar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "showIcons": { "alias": "showIcons"; "required": false; "isSignal": true; }; "showLabels": { "alias": "showLabels"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
/**
|
|
2175
|
+
* Mirrors `KsTreeNode` exported by
|
|
2176
|
+
* `core/src/components/Navigation/tree-view/tree-view.tsx`. Duplicated
|
|
2177
|
+
* locally — see the note in `Buttons/button-group/button-group.ts` for why.
|
|
2178
|
+
*/
|
|
2179
|
+
interface KsTreeNode {
|
|
2180
|
+
key: string;
|
|
2181
|
+
label: string;
|
|
2182
|
+
icon?: string;
|
|
2183
|
+
disabled?: boolean;
|
|
2184
|
+
children?: KsTreeNode[];
|
|
2185
|
+
}
|
|
2186
|
+
/** DOM shape of the real `<ks-tree-view>` custom element, typed for the wrapper. */
|
|
2187
|
+
type KsTreeViewElement = HTMLElement & {
|
|
2188
|
+
nodes: KsTreeNode[];
|
|
2189
|
+
expandedKeys: string[];
|
|
2190
|
+
multi: boolean;
|
|
2191
|
+
};
|
|
2192
|
+
/**
|
|
2193
|
+
* Angular wrapper around the `<ks-tree-view>` Stencil custom element.
|
|
2194
|
+
* No `<slot>` in the wrapped Stencil render — data-driven only.
|
|
2195
|
+
*/
|
|
2196
|
+
declare class KsTreeViewComponent {
|
|
2197
|
+
private readonly el;
|
|
2198
|
+
/** Tree data */
|
|
2199
|
+
readonly nodes: _angular_core.InputSignal<KsTreeNode[]>;
|
|
2200
|
+
/** Keys of nodes that start expanded */
|
|
2201
|
+
readonly expandedKeys: _angular_core.InputSignal<string[]>;
|
|
2202
|
+
/** Allow selecting multiple nodes */
|
|
2203
|
+
readonly multi: _angular_core.InputSignal<boolean>;
|
|
2204
|
+
/** Emits key(s) when selection changes. From the native `selectionChanged` event. */
|
|
2205
|
+
readonly ksSelectionChanged: _angular_core.OutputEmitterRef<string | string[]>;
|
|
2206
|
+
/** Emits when a node is expanded/collapsed. From the native `expandChange` event. */
|
|
2207
|
+
readonly ksExpandChange: _angular_core.OutputEmitterRef<{
|
|
2208
|
+
key: string;
|
|
2209
|
+
expanded: boolean;
|
|
2210
|
+
}>;
|
|
2211
|
+
constructor(ref: ElementRef<KsTreeViewElement>);
|
|
2212
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsTreeViewComponent, never>;
|
|
2213
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsTreeViewComponent, "ks-tree-view", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "expandedKeys": { "alias": "expandedKeys"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; }, { "ksSelectionChanged": "ksSelectionChanged"; "ksExpandChange": "ksExpandChange"; }, never, never, true, never>;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
/** DOM shape of the real `<ks-badge>` custom element, typed for the wrapper. */
|
|
2217
|
+
type KsBadgeElement = HTMLElement & {
|
|
2218
|
+
label: string;
|
|
2219
|
+
variant: KsBaseVariant;
|
|
2220
|
+
size: KsBaseSize;
|
|
2221
|
+
dot: boolean;
|
|
2222
|
+
pill: boolean;
|
|
2223
|
+
};
|
|
2224
|
+
/**
|
|
2225
|
+
* Angular wrapper around the `<ks-badge>` Stencil custom element.
|
|
2226
|
+
* Purely presentational — no events, no `<slot>` in the wrapped Stencil
|
|
2227
|
+
* render, plain inputs only.
|
|
2228
|
+
*/
|
|
2229
|
+
declare class KsBadgeComponent {
|
|
2230
|
+
private readonly el;
|
|
2231
|
+
/** Display text */
|
|
2232
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
2233
|
+
/** Colour variant */
|
|
2234
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
2235
|
+
/** Size */
|
|
2236
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
2237
|
+
/** Show a dot instead of text */
|
|
2238
|
+
readonly dot: _angular_core.InputSignal<boolean>;
|
|
2239
|
+
/** Pill (fully rounded) shape */
|
|
2240
|
+
readonly pill: _angular_core.InputSignal<boolean>;
|
|
2241
|
+
constructor(ref: ElementRef<KsBadgeElement>);
|
|
2242
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsBadgeComponent, never>;
|
|
2243
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsBadgeComponent, "ks-badge", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; "pill": { "alias": "pill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
/** DOM shape of the real `<ks-loader>` custom element, typed for the wrapper. */
|
|
2247
|
+
type KsLoaderElement = HTMLElement & {
|
|
2248
|
+
state: LoaderStateEnum;
|
|
2249
|
+
};
|
|
2250
|
+
/**
|
|
2251
|
+
* Angular wrapper around the `<ks-loader>` Stencil custom element.
|
|
2252
|
+
*
|
|
2253
|
+
* Renders real, consumer-facing named slots — `loading`, `empty`,
|
|
2254
|
+
* `empty-action`, `error`, `error-action` — plus a default (unnamed)
|
|
2255
|
+
* slot for the `Success` state. Same single unfiltered
|
|
2256
|
+
* `<ng-content>` pass-through as `Layout/card/card.ts`: give each
|
|
2257
|
+
* projected child its own native `slot="loading"` / `slot="empty"` /
|
|
2258
|
+
* `slot="empty-action"` / `slot="error"` / `slot="error-action"`
|
|
2259
|
+
* attribute (or none, for the default/success slot).
|
|
2260
|
+
*/
|
|
2261
|
+
declare class KsLoaderComponent {
|
|
2262
|
+
private readonly el;
|
|
2263
|
+
/** Current state */
|
|
2264
|
+
readonly state: _angular_core.InputSignal<LoaderStateEnum>;
|
|
2265
|
+
constructor(ref: ElementRef<KsLoaderElement>);
|
|
2266
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsLoaderComponent, never>;
|
|
2267
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsLoaderComponent, "ks-loader", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/** DOM shape of the real `<ks-message>` custom element, typed for the wrapper. */
|
|
2271
|
+
type KsMessageElement = HTMLElement & {
|
|
2272
|
+
text: string;
|
|
2273
|
+
icon: string;
|
|
2274
|
+
variant: KsBaseVariant;
|
|
2275
|
+
dismissible: boolean;
|
|
2276
|
+
};
|
|
2277
|
+
/**
|
|
2278
|
+
* Angular wrapper around the `<ks-message>` Stencil custom element.
|
|
2279
|
+
*
|
|
2280
|
+
* `<ks-message>` renders a default `<slot />` only as a fallback when
|
|
2281
|
+
* `text` is empty — same single unfiltered `<ng-content>` pass-through as
|
|
2282
|
+
* `Layout/card/card.ts`; omit `text` and project content instead if
|
|
2283
|
+
* richer markup is needed.
|
|
2284
|
+
*/
|
|
2285
|
+
declare class KsMessageComponent {
|
|
2286
|
+
private readonly el;
|
|
2287
|
+
/** Main message text */
|
|
2288
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
2289
|
+
/** Optional icon class (e.g. Material Icon or Font Awesome) */
|
|
2290
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
2291
|
+
/** Colour variant */
|
|
2292
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
2293
|
+
/** Show a dismiss (×) button */
|
|
2294
|
+
readonly dismissible: _angular_core.InputSignal<boolean>;
|
|
2295
|
+
/** Emits when the message is dismissed. From the native `dismissed` event. */
|
|
2296
|
+
readonly ksDismissed: _angular_core.OutputEmitterRef<void>;
|
|
2297
|
+
constructor(ref: ElementRef<KsMessageElement>);
|
|
2298
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsMessageComponent, never>;
|
|
2299
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsMessageComponent, "ks-message", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; }, { "ksDismissed": "ksDismissed"; }, never, ["*"], true, never>;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
/** DOM shape of the real `<ks-progress>` custom element, typed for the wrapper. */
|
|
2303
|
+
type KsProgressElement = HTMLElement & {
|
|
2304
|
+
value: number;
|
|
2305
|
+
max: number;
|
|
2306
|
+
showLabel: boolean;
|
|
2307
|
+
variant: KsBaseVariant;
|
|
2308
|
+
size: KsBaseSize;
|
|
2309
|
+
indeterminate: boolean;
|
|
2310
|
+
label: string;
|
|
2311
|
+
};
|
|
2312
|
+
/**
|
|
2313
|
+
* Angular wrapper around the `<ks-progress>` Stencil custom element.
|
|
2314
|
+
* Purely presentational — no events, no `<slot>` in the wrapped Stencil
|
|
2315
|
+
* render, plain inputs only.
|
|
2316
|
+
*/
|
|
2317
|
+
declare class KsProgressComponent {
|
|
2318
|
+
private readonly el;
|
|
2319
|
+
/** Progress value (0-100) */
|
|
2320
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
2321
|
+
/** Maximum value */
|
|
2322
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
2323
|
+
/** Show percentage label */
|
|
2324
|
+
readonly showLabel: _angular_core.InputSignal<boolean>;
|
|
2325
|
+
/** Progress variant */
|
|
2326
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
2327
|
+
/** Progress size */
|
|
2328
|
+
readonly size: _angular_core.InputSignal<KsBaseSize>;
|
|
2329
|
+
/** Indeterminate/loading state */
|
|
2330
|
+
readonly indeterminate: _angular_core.InputSignal<boolean>;
|
|
2331
|
+
/** Optional label text */
|
|
2332
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
2333
|
+
constructor(ref: ElementRef<KsProgressElement>);
|
|
2334
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsProgressComponent, never>;
|
|
2335
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsProgressComponent, "ks-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
/** DOM shape of the real `<ks-spinner>` custom element, typed for the wrapper. */
|
|
2339
|
+
type KsSpinnerElement = HTMLElement & {
|
|
2340
|
+
size: KsSize;
|
|
2341
|
+
variant: KsBaseVariant;
|
|
2342
|
+
text: string;
|
|
2343
|
+
centered: boolean;
|
|
2344
|
+
};
|
|
2345
|
+
/**
|
|
2346
|
+
* Angular wrapper around the `<ks-spinner>` Stencil custom element.
|
|
2347
|
+
* Purely presentational — no events, no `<slot>` in the wrapped Stencil
|
|
2348
|
+
* render, plain inputs only.
|
|
2349
|
+
*/
|
|
2350
|
+
declare class KsSpinnerComponent {
|
|
2351
|
+
private readonly el;
|
|
2352
|
+
/** Spinner size */
|
|
2353
|
+
readonly size: _angular_core.InputSignal<KsSize>;
|
|
2354
|
+
/** Spinner variant/color */
|
|
2355
|
+
readonly variant: _angular_core.InputSignal<KsBaseVariant>;
|
|
2356
|
+
/** Optional text to display */
|
|
2357
|
+
readonly text: _angular_core.InputSignal<string>;
|
|
2358
|
+
/** Center the spinner in container */
|
|
2359
|
+
readonly centered: _angular_core.InputSignal<boolean>;
|
|
2360
|
+
constructor(ref: ElementRef<KsSpinnerElement>);
|
|
2361
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsSpinnerComponent, never>;
|
|
2362
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsSpinnerComponent, "ks-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "centered": { "alias": "centered"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
/** DOM shape of the real `<ks-toast-outlet>` custom element, typed for the wrapper. */
|
|
2366
|
+
type KsToastOutletElement = HTMLElement & {
|
|
2367
|
+
position: KsToastPosition;
|
|
2368
|
+
};
|
|
2369
|
+
/**
|
|
2370
|
+
* Angular wrapper around the `<ks-toast-outlet>` Stencil custom element.
|
|
2371
|
+
* Named `KsToastOutletComponent` (matching the literal tag, not just
|
|
2372
|
+
* `KsToastComponent`) for consistency with the React wrapper, which must
|
|
2373
|
+
* avoid colliding with the re-exported `KsToast` *data* interface above
|
|
2374
|
+
* (TypeScript disallows a value and a type export sharing one identifier
|
|
2375
|
+
* from the same module) — see `react/src/components/Notification/toast/toast.tsx`.
|
|
2376
|
+
* `<ks-toast-outlet position="top-right" />` is all a consumer needs; add
|
|
2377
|
+
* one per screen corner they want to stack toasts in.
|
|
2378
|
+
*
|
|
2379
|
+
* No `<slot>`, no events — it purely subscribes to the shared
|
|
2380
|
+
* `toastStore` singleton (re-exported above) and renders whatever's
|
|
2381
|
+
* enqueued.
|
|
2382
|
+
*/
|
|
2383
|
+
declare class KsToastOutletComponent {
|
|
2384
|
+
private readonly el;
|
|
2385
|
+
/** Where on screen to stack toasts */
|
|
2386
|
+
readonly position: _angular_core.InputSignal<KsToastPosition>;
|
|
2387
|
+
constructor(ref: ElementRef<KsToastOutletElement>);
|
|
2388
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KsToastOutletComponent, never>;
|
|
2389
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KsToastOutletComponent, "ks-toast-outlet", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
declare function provideInBuildTheme(themeName: string, startUpMode: ThemeMode): _angular_core.EnvironmentProviders;
|
|
2393
|
+
|
|
2394
|
+
export { KsAccordionComponent, KsAvatarComponent, KsBadgeComponent, KsBreadcrumbComponent, KsButtonComponent, KsButtonGroupComponent, KsCardComponent, KsCarouselComponent, KsCheckboxComponent, KsChipsComponent, KsCodeViewComponent, KsColourPickerComponent, KsContextMenuComponent, KsDatepickerComponent, KsDaterangeComponent, KsDialogComponent, KsDropdownComponent, KsFabComponent, KsInputComponent, KsListBoxComponent, KsLoaderComponent, KsMessageComponent, KsNavBarComponent, KsNotFoundComponent, KsOtpInputComponent, KsPaginationComponent, KsProgressComponent, KsRadioComponent, KsRatingComponent, KsRollingNumberComponent, KsSidebarComponent, KsSliderComponent, KsSpinnerComponent, KsSplitButtonComponent, KsStepperComponent, KsSwitchComponent, KsTabComponent, KsTableComponent, KsTextareaComponent, KsThemeSwitchComponent, KsTimepickerComponent, KsToastOutletComponent, KsToolbarComponent, KsTooltipComponent, KsTopNavBarComponent, KsTreeViewComponent, KsUploaderComponent, provideInBuildTheme };
|
|
2395
|
+
export type { ActionButtonsConfig, KsAccordionItem, KsBreadcrumbItem, KsButtonGroupDisplayStyle, KsButtonGroupItem, KsCardVariant, KsCarouselSlide, KsCheckboxOption, KsChipOption, KsChipsValue, KsCodeViewLanguage, KsColourPickerVariant, KsContextMenuItem, KsContextMenuPosition, KsDateRange, KsDialogSize, KsDropdownOption, KsDropdownValue, KsFabAction, KsFabPosition, KsInputType, KsListBoxOption, KsListBoxValue, KsNavBarItem, KsNavBarMode, KsNavBarSection, KsNavBarSectionItem, KsPresetRange, KsRadioOption, KsSidebarPosition, KsSidebarType, KsSplitButtonItem, KsStepItem, KsStepperOrientation, KsTabItem, KsTableSize, KsTableVariant, KsTimeValue, KsToolbarItem, KsTopNavBarItem, KsTopNavBarVariant, KsTreeNode, KsUploadedFile };
|