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