@zhannam85/ui-kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zhanna Myshkovskaya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,381 @@
1
+ # Angular UI Kit
2
+
3
+ A modern, reusable Angular 21 UI component library featuring Button, Dropdown, and Checkbox components. Built with standalone components and designed for easy integration into Angular applications.
4
+
5
+ ## Features
6
+
7
+ - 🎨 **Modern Design**: Clean, polished UI components with smooth animations
8
+ - 📦 **Standalone Components**: Built with Angular 21 standalone components (no NgModules required)
9
+ - 🎯 **Type-Safe**: Full TypeScript support with proper typing
10
+ - ♿ **Accessible**: Built with accessibility in mind
11
+ - 🎨 **Customizable**: Multiple variants and sizes for each component
12
+ - 📱 **Responsive**: Works seamlessly across different screen sizes
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @zhannam85/ui-kit
18
+ ```
19
+
20
+ **Note**: Replace `@zhannam85` with your npm username or organization name before publishing.
21
+
22
+ ## Components
23
+
24
+ ### Button Component
25
+
26
+ A versatile button component with multiple variants and sizes.
27
+
28
+ #### Usage
29
+
30
+ ```typescript
31
+ import { ButtonComponent } from '@zhannam85/ui-kit';
32
+ import { Component } from '@angular/core';
33
+
34
+ @Component({
35
+ selector: 'app-example',
36
+ standalone: true,
37
+ imports: [ButtonComponent],
38
+ template: `
39
+ <kit-button
40
+ label="Click Me"
41
+ variant="primary"
42
+ size="medium"
43
+ (buttonClicked)="handleClick($event)">
44
+ </kit-button>
45
+ `
46
+ })
47
+ export class ExampleComponent {
48
+ handleClick(event: MouseEvent) {
49
+ console.log('Button clicked!', event);
50
+ }
51
+ }
52
+ ```
53
+
54
+ #### Inputs
55
+
56
+ | Property | Type | Default | Description |
57
+ |----------|------|---------|-------------|
58
+ | `label` | `string` | `''` | Button text label |
59
+ | `variant` | `'primary' \| 'secondary' \| 'danger'` | `'primary'` | Button style variant |
60
+ | `disabled` | `boolean` | `false` | Disabled state |
61
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | HTML button type |
62
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size |
63
+
64
+ #### Outputs
65
+
66
+ | Event | Type | Description |
67
+ |-------|------|-------------|
68
+ | `click` | `EventEmitter<MouseEvent>` | Emitted when button is clicked |
69
+
70
+ ### Dropdown Component
71
+
72
+ A dropdown/select component with customizable options.
73
+
74
+ #### Usage
75
+
76
+ ```typescript
77
+ import { DropdownComponent, DropdownOption } from '@zhannam85/ui-kit';
78
+ import { Component } from '@angular/core';
79
+
80
+ @Component({
81
+ selector: 'app-example',
82
+ standalone: true,
83
+ imports: [DropdownComponent],
84
+ template: `
85
+ <kit-dropdown
86
+ [options]="options"
87
+ placeholder="Select an option"
88
+ [selectedValue]="selectedValue"
89
+ (selectionChange)="onSelectionChange($event)">
90
+ </kit-dropdown>
91
+ `
92
+ })
93
+ export class ExampleComponent {
94
+ options: DropdownOption[] = [
95
+ { label: 'Option 1', value: 'opt1' },
96
+ { label: 'Option 2', value: 'opt2' },
97
+ { label: 'Option 3', value: 'opt3' }
98
+ ];
99
+
100
+ selectedValue: any = null;
101
+
102
+ onSelectionChange(value: any) {
103
+ this.selectedValue = value;
104
+ console.log('Selected:', value);
105
+ }
106
+ }
107
+ ```
108
+
109
+ #### Inputs
110
+
111
+ | Property | Type | Default | Description |
112
+ |----------|------|---------|-------------|
113
+ | `options` | `DropdownOption[]` | `[]` | Array of dropdown options |
114
+ | `placeholder` | `string` | `'Select an option'` | Placeholder text |
115
+ | `selectedValue` | `any` | `null` | Currently selected value |
116
+ | `disabled` | `boolean` | `false` | Disabled state |
117
+
118
+ #### Outputs
119
+
120
+ | Event | Type | Description |
121
+ |-------|------|-------------|
122
+ | `selectionChange` | `EventEmitter<any>` | Emitted when selection changes |
123
+
124
+ #### Types
125
+
126
+ ```typescript
127
+ interface DropdownOption {
128
+ label: string;
129
+ value: any;
130
+ }
131
+ ```
132
+
133
+ ### Checkbox Component
134
+
135
+ A checkbox component with label support and indeterminate state.
136
+
137
+ #### Usage
138
+
139
+ ```typescript
140
+ import { CheckboxComponent } from '@zhannam85/ui-kit';
141
+ import { Component } from '@angular/core';
142
+
143
+ @Component({
144
+ selector: 'app-example',
145
+ standalone: true,
146
+ imports: [CheckboxComponent],
147
+ template: `
148
+ <kit-checkbox
149
+ label="Accept terms and conditions"
150
+ [checked]="isChecked"
151
+ (checkedChange)="onCheckedChange($event)">
152
+ </kit-checkbox>
153
+ `
154
+ })
155
+ export class ExampleComponent {
156
+ isChecked: boolean = false;
157
+
158
+ onCheckedChange(checked: boolean) {
159
+ this.isChecked = checked;
160
+ console.log('Checked:', checked);
161
+ }
162
+ }
163
+ ```
164
+
165
+ #### Inputs
166
+
167
+ | Property | Type | Default | Description |
168
+ |----------|------|---------|-------------|
169
+ | `label` | `string` | `''` | Checkbox label text |
170
+ | `checked` | `boolean` | `false` | Checked state |
171
+ | `disabled` | `boolean` | `false` | Disabled state |
172
+ | `indeterminate` | `boolean` | `false` | Indeterminate state (shows dash) |
173
+
174
+ #### Outputs
175
+
176
+ | Event | Type | Description |
177
+ |-------|------|-------------|
178
+ | `checkedChange` | `EventEmitter<boolean>` | Emitted when checked state changes |
179
+
180
+ ### Icon Components
181
+
182
+ Reusable SVG icon components with customizable size and color.
183
+
184
+ #### Available icons
185
+
186
+ | Component | Selector | Default size | Description |
187
+ |-----------|----------|-------------|-------------|
188
+ | `IconCopyComponent` | `kit-icon-copy` | 16 | Clipboard / copy |
189
+ | `IconCheckComponent` | `kit-icon-check` | 16 | Checkmark |
190
+ | `IconChevronDownComponent` | `kit-icon-chevron-down` | 12 | Chevron arrow |
191
+
192
+ #### Usage
193
+
194
+ ```typescript
195
+ import { IconModule } from '@zhannam85/ui-kit';
196
+ ```
197
+
198
+ ```html
199
+ <kit-icon-copy [size]="16" color="#333"></kit-icon-copy>
200
+ <kit-icon-check [size]="20"></kit-icon-check>
201
+ <kit-icon-chevron-down [size]="12"></kit-icon-chevron-down>
202
+ ```
203
+
204
+ #### Inputs (shared by all icons)
205
+
206
+ | Property | Type | Default | Description |
207
+ |----------|------|---------|-------------|
208
+ | `size` | `number` | varies per icon | Width and height in pixels |
209
+ | `color` | `string` | `'currentColor'` | Stroke/fill color (inherits text color by default) |
210
+
211
+ #### Adding a new icon
212
+
213
+ 1. Create a new file in `src/components/icon/`, e.g. `icon-arrow-right.component.ts`:
214
+
215
+ ```typescript
216
+ import { Component } from '@angular/core';
217
+ import { BaseIconComponent } from './base-icon.component';
218
+
219
+ @Component({
220
+ selector: 'kit-icon-arrow-right',
221
+ standalone: false,
222
+ template: `
223
+ <svg
224
+ [attr.width]="size"
225
+ [attr.height]="size"
226
+ viewBox="0 0 24 24"
227
+ fill="none"
228
+ [attr.stroke]="color"
229
+ stroke-width="2"
230
+ stroke-linecap="round"
231
+ stroke-linejoin="round">
232
+ <path d="M5 12h14M12 5l7 7-7 7"/>
233
+ </svg>
234
+ `,
235
+ })
236
+ export class IconArrowRightComponent extends BaseIconComponent {
237
+ override size = 16;
238
+ }
239
+ ```
240
+
241
+ 2. Register the component in `src/components/icon/icon.module.ts`:
242
+
243
+ ```typescript
244
+ import { IconArrowRightComponent } from './icon-arrow-right.component';
245
+
246
+ const ICON_COMPONENTS = [
247
+ // ...existing icons
248
+ IconArrowRightComponent,
249
+ ];
250
+ ```
251
+
252
+ 3. Export it from `src/public-api.ts`:
253
+
254
+ ```typescript
255
+ export * from './components/icon/icon-arrow-right.component';
256
+ ```
257
+
258
+ 4. Rebuild the library (`npm run build`) and use it:
259
+
260
+ ```html
261
+ <kit-icon-arrow-right [size]="20" color="blue"></kit-icon-arrow-right>
262
+ ```
263
+
264
+ ## Development
265
+
266
+ ### Prerequisites
267
+
268
+ - Node.js (v18.19.1, v20.11.1, or v22+)
269
+ - npm (v9 or higher)
270
+ - Angular CLI 21
271
+
272
+ ### Setup
273
+
274
+ 1. Clone the repository:
275
+ ```bash
276
+ git clone <repository-url>
277
+ cd ui-kit
278
+ ```
279
+
280
+ 2. Install dependencies:
281
+ ```bash
282
+ npm install
283
+ ```
284
+
285
+ 3. Build the library:
286
+ ```bash
287
+ npm run build
288
+ ```
289
+
290
+ The built library will be in the `dist/ui-kit` directory.
291
+
292
+ ### Sandbox (local preview)
293
+
294
+ Run the sandbox app to preview components in the browser:
295
+
296
+ ```bash
297
+ npm start
298
+ ```
299
+
300
+ This builds the library, clears the Angular cache, and serves the sandbox at **http://localhost:4200**. The sandbox has a left sidebar listing components (with a filter) and a main area showing each component’s showcase.
301
+
302
+ **Proxy:** API requests to `/api` are proxied to `http://localhost:3000` by default. Edit `proxy.conf.json` to change the `target` (e.g. to your backend URL).
303
+
304
+ ### Running Tests
305
+
306
+ ```bash
307
+ npm test
308
+ ```
309
+
310
+ ### Building for Production
311
+
312
+ ```bash
313
+ npm run build
314
+ ```
315
+
316
+ ## Publishing to npm
317
+
318
+ 1. Update the package name in `package.json` with your npm username/organization
319
+ 2. Build the library:
320
+ ```bash
321
+ npm run build
322
+ ```
323
+
324
+ 3. Navigate to the dist directory:
325
+ ```bash
326
+ cd dist/ui-kit
327
+ ```
328
+
329
+ 4. Publish to npm:
330
+ ```bash
331
+ npm publish
332
+ ```
333
+
334
+ For scoped packages (starting with `@`), use:
335
+ ```bash
336
+ npm publish --access public
337
+ ```
338
+
339
+ ## Using in Your Application
340
+
341
+ After installing the package:
342
+
343
+ 1. Import the components in your Angular component:
344
+ ```typescript
345
+ import { ButtonComponent, DropdownComponent, CheckboxComponent } from '@zhannam85/ui-kit';
346
+ ```
347
+
348
+ 2. Add them to your component's `imports` array (standalone components):
349
+ ```typescript
350
+ @Component({
351
+ standalone: true,
352
+ imports: [ButtonComponent, DropdownComponent, CheckboxComponent],
353
+ // ...
354
+ })
355
+ ```
356
+
357
+ 3. Use them in your template:
358
+ ```html
359
+ <kit-button label="Submit" variant="primary" (buttonClicked)="onSubmit()"></kit-button>
360
+ <kit-dropdown [options]="myOptions" (selectionChange)="onChange($event)"></kit-dropdown>
361
+ <kit-checkbox label="I agree" [checked]="agreed" (checkedChange)="onAgreeChange($event)"></kit-checkbox>
362
+ ```
363
+
364
+ ## Browser Support
365
+
366
+ - Chrome (latest)
367
+ - Firefox (latest)
368
+ - Safari (latest)
369
+ - Edge (latest)
370
+
371
+ ## License
372
+
373
+ MIT
374
+
375
+ ## Contributing
376
+
377
+ Contributions are welcome! Please feel free to submit a Pull Request.
378
+
379
+ ## Version
380
+
381
+ Current version: 0.1.0
@@ -0,0 +1,384 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component, NgModule, HostBinding, HostListener } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ class ButtonComponent {
7
+ label = '';
8
+ variant = 'primary';
9
+ disabled = false;
10
+ type = 'button';
11
+ size = 'medium';
12
+ buttonClicked = new EventEmitter();
13
+ onClick(event) {
14
+ if (!this.disabled) {
15
+ this.buttonClicked.emit(event);
16
+ }
17
+ }
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: ButtonComponent, isStandalone: false, selector: "kit-button", inputs: { label: "label", variant: "variant", disabled: "disabled", type: "type", size: "size" }, outputs: { buttonClicked: "buttonClicked" }, ngImport: i0, template: "<button\r\n [type]=\"type\"\r\n [disabled]=\"disabled\"\r\n [class]=\"'lib-button lib-button--' + variant + ' lib-button--' + size\"\r\n (click)=\"onClick($event)\">\r\n {{ label }}\r\n</button>\r\n", styles: [".lib-button{font-family:inherit;font-weight:500;border:none;border-radius:6px;cursor:pointer;transition:all .2s ease-in-out;outline:none;display:inline-flex;align-items:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-user-select:none;user-select:none}.lib-button:focus-visible{outline:2px solid #4a90e2;outline-offset:2px}.lib-button:disabled{opacity:.6;cursor:not-allowed;pointer-events:none}.lib-button--small{padding:6px 12px;font-size:14px;min-height:32px}.lib-button--medium{padding:10px 20px;font-size:16px;min-height:40px}.lib-button--large{padding:14px 28px;font-size:18px;min-height:48px}.lib-button--primary{background-color:#4a90e2;color:#fff}.lib-button--primary:hover:not(:disabled){background-color:#357abd;transform:translateY(-1px);box-shadow:0 4px 8px #4a90e24d}.lib-button--primary:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #4a90e233}.lib-button--secondary{background-color:#6c757d;color:#fff}.lib-button--secondary:hover:not(:disabled){background-color:#5a6268;transform:translateY(-1px);box-shadow:0 4px 8px #6c757d4d}.lib-button--secondary:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #6c757d33}.lib-button--danger{background-color:#dc3545;color:#fff}.lib-button--danger:hover:not(:disabled){background-color:#c82333;transform:translateY(-1px);box-shadow:0 4px 8px #dc35454d}.lib-button--danger:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #dc354533}\n"] });
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ButtonComponent, decorators: [{
22
+ type: Component,
23
+ args: [{ selector: 'kit-button', standalone: false, template: "<button\r\n [type]=\"type\"\r\n [disabled]=\"disabled\"\r\n [class]=\"'lib-button lib-button--' + variant + ' lib-button--' + size\"\r\n (click)=\"onClick($event)\">\r\n {{ label }}\r\n</button>\r\n", styles: [".lib-button{font-family:inherit;font-weight:500;border:none;border-radius:6px;cursor:pointer;transition:all .2s ease-in-out;outline:none;display:inline-flex;align-items:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-user-select:none;user-select:none}.lib-button:focus-visible{outline:2px solid #4a90e2;outline-offset:2px}.lib-button:disabled{opacity:.6;cursor:not-allowed;pointer-events:none}.lib-button--small{padding:6px 12px;font-size:14px;min-height:32px}.lib-button--medium{padding:10px 20px;font-size:16px;min-height:40px}.lib-button--large{padding:14px 28px;font-size:18px;min-height:48px}.lib-button--primary{background-color:#4a90e2;color:#fff}.lib-button--primary:hover:not(:disabled){background-color:#357abd;transform:translateY(-1px);box-shadow:0 4px 8px #4a90e24d}.lib-button--primary:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #4a90e233}.lib-button--secondary{background-color:#6c757d;color:#fff}.lib-button--secondary:hover:not(:disabled){background-color:#5a6268;transform:translateY(-1px);box-shadow:0 4px 8px #6c757d4d}.lib-button--secondary:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #6c757d33}.lib-button--danger{background-color:#dc3545;color:#fff}.lib-button--danger:hover:not(:disabled){background-color:#c82333;transform:translateY(-1px);box-shadow:0 4px 8px #dc35454d}.lib-button--danger:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 4px #dc354533}\n"] }]
24
+ }], propDecorators: { label: [{
25
+ type: Input
26
+ }], variant: [{
27
+ type: Input
28
+ }], disabled: [{
29
+ type: Input
30
+ }], type: [{
31
+ type: Input
32
+ }], size: [{
33
+ type: Input
34
+ }], buttonClicked: [{
35
+ type: Output
36
+ }] } });
37
+
38
+ class ButtonModule {
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule], exports: [ButtonComponent] });
41
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ButtonModule, imports: [CommonModule] });
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ButtonModule, decorators: [{
44
+ type: NgModule,
45
+ args: [{
46
+ declarations: [ButtonComponent],
47
+ imports: [CommonModule],
48
+ exports: [ButtonComponent],
49
+ }]
50
+ }] });
51
+
52
+ class BaseIconComponent {
53
+ size = 24;
54
+ color = 'currentColor';
55
+ get hostWidth() {
56
+ return this.size;
57
+ }
58
+ get hostHeight() {
59
+ return this.size;
60
+ }
61
+ display = 'inline-flex';
62
+ get hostColor() {
63
+ return this.color;
64
+ }
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BaseIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: BaseIconComponent, isStandalone: true, selector: "ng-component", inputs: { size: "size", color: "color" }, host: { properties: { "style.width.px": "this.hostWidth", "style.height.px": "this.hostHeight", "style.display": "this.display", "style.color": "this.hostColor" } }, ngImport: i0, template: '', isInline: true });
67
+ }
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BaseIconComponent, decorators: [{
69
+ type: Component,
70
+ args: [{ template: '' }]
71
+ }], propDecorators: { size: [{
72
+ type: Input
73
+ }], color: [{
74
+ type: Input
75
+ }], hostWidth: [{
76
+ type: HostBinding,
77
+ args: ['style.width.px']
78
+ }], hostHeight: [{
79
+ type: HostBinding,
80
+ args: ['style.height.px']
81
+ }], display: [{
82
+ type: HostBinding,
83
+ args: ['style.display']
84
+ }], hostColor: [{
85
+ type: HostBinding,
86
+ args: ['style.color']
87
+ }] } });
88
+
89
+ class IconChevronDownComponent extends BaseIconComponent {
90
+ size = 12;
91
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconChevronDownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
92
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: IconChevronDownComponent, isStandalone: false, selector: "kit-icon-chevron-down", usesInheritance: true, ngImport: i0, template: `
93
+ <svg
94
+ [attr.width]="size"
95
+ [attr.height]="size"
96
+ viewBox="0 0 12 12"
97
+ fill="none"
98
+ [attr.stroke]="color"
99
+ stroke-width="1.5"
100
+ stroke-linecap="round"
101
+ stroke-linejoin="round">
102
+ <path d="M3 4.5L6 7.5L9 4.5"/>
103
+ </svg>
104
+ `, isInline: true });
105
+ }
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconChevronDownComponent, decorators: [{
107
+ type: Component,
108
+ args: [{
109
+ selector: 'kit-icon-chevron-down',
110
+ standalone: false,
111
+ template: `
112
+ <svg
113
+ [attr.width]="size"
114
+ [attr.height]="size"
115
+ viewBox="0 0 12 12"
116
+ fill="none"
117
+ [attr.stroke]="color"
118
+ stroke-width="1.5"
119
+ stroke-linecap="round"
120
+ stroke-linejoin="round">
121
+ <path d="M3 4.5L6 7.5L9 4.5"/>
122
+ </svg>
123
+ `,
124
+ }]
125
+ }] });
126
+
127
+ /* eslint-disable @typescript-eslint/no-explicit-any */
128
+ class DropdownComponent {
129
+ _options = [];
130
+ _selectedValue = null;
131
+ set options(value) {
132
+ this._options = value ?? [];
133
+ this.updateSelectedOption();
134
+ }
135
+ get options() {
136
+ return this._options;
137
+ }
138
+ placeholder = 'Select an option';
139
+ set selectedValue(value) {
140
+ this._selectedValue = value;
141
+ this.updateSelectedOption();
142
+ }
143
+ get selectedValue() {
144
+ return this._selectedValue;
145
+ }
146
+ disabled = false;
147
+ selectionChange = new EventEmitter();
148
+ isOpen = false;
149
+ selectedOption = null;
150
+ ngOnInit() {
151
+ this.updateSelectedOption();
152
+ }
153
+ updateSelectedOption() {
154
+ if (this._selectedValue !== null && this._selectedValue !== undefined) {
155
+ this.selectedOption = this._options.find(opt => opt.value === this._selectedValue) || null;
156
+ }
157
+ else {
158
+ this.selectedOption = null;
159
+ }
160
+ }
161
+ toggleDropdown() {
162
+ if (!this.disabled) {
163
+ this.isOpen = !this.isOpen;
164
+ }
165
+ }
166
+ onTriggerKeydown(event) {
167
+ if (event.key === 'Enter' || event.key === ' ') {
168
+ event.preventDefault();
169
+ this.toggleDropdown();
170
+ }
171
+ }
172
+ onOptionKeydown(event, option) {
173
+ if (event.key === 'Enter' || event.key === ' ') {
174
+ event.preventDefault();
175
+ this.selectOption(option);
176
+ }
177
+ }
178
+ selectOption(option) {
179
+ if (!this.disabled) {
180
+ this.selectedOption = option;
181
+ this._selectedValue = option.value;
182
+ this.isOpen = false;
183
+ this.selectionChange.emit(option.value);
184
+ }
185
+ }
186
+ onClickOutside(event) {
187
+ const target = event.target;
188
+ if (!target.closest('.lib-dropdown')) {
189
+ this.isOpen = false;
190
+ }
191
+ }
192
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
193
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: DropdownComponent, isStandalone: false, selector: "kit-dropdown", inputs: { options: "options", placeholder: "placeholder", selectedValue: "selectedValue", disabled: "disabled" }, outputs: { selectionChange: "selectionChange" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, ngImport: i0, template: "<div class=\"lib-dropdown\" [class.lib-dropdown--disabled]=\"disabled\">\r\n <div\r\n class=\"lib-dropdown__trigger\"\r\n [class.lib-dropdown__trigger--open]=\"isOpen\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onTriggerKeydown($event)\">\r\n <span class=\"lib-dropdown__value\">\r\n {{ selectedOption ? selectedOption.label : placeholder }}\r\n </span>\r\n <kit-icon-chevron-down\r\n class=\"lib-dropdown__arrow\"\r\n [class.lib-dropdown__arrow--open]=\"isOpen\"\r\n [size]=\"12\">\r\n </kit-icon-chevron-down>\r\n </div>\r\n <div class=\"lib-dropdown__menu\" *ngIf=\"isOpen && !disabled\">\r\n <div\r\n *ngFor=\"let option of options\"\r\n class=\"lib-dropdown__option\"\r\n [class.lib-dropdown__option--selected]=\"selectedOption?.value === option.value\"\r\n role=\"option\"\r\n [attr.aria-selected]=\"selectedOption?.value === option.value\"\r\n tabindex=\"0\"\r\n (click)=\"selectOption(option)\"\r\n (keydown)=\"onOptionKeydown($event, option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"options.length === 0\" class=\"lib-dropdown__option lib-dropdown__option--empty\">\r\n No options available\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".lib-dropdown{position:relative;display:inline-block;width:100%;min-width:200px}.lib-dropdown--disabled{opacity:.6;pointer-events:none}.lib-dropdown__trigger{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background-color:#fff;border:2px solid #e0e0e0;border-radius:6px;cursor:pointer;transition:all .2s ease-in-out;min-height:40px;-webkit-user-select:none;user-select:none}.lib-dropdown__trigger:hover:not(.lib-dropdown__trigger--disabled){border-color:#4a90e2}.lib-dropdown__trigger:focus-within{outline:none;border-color:#4a90e2;box-shadow:0 0 0 3px #4a90e21a}.lib-dropdown__trigger--open{border-color:#4a90e2;box-shadow:0 0 0 3px #4a90e21a}.lib-dropdown__value{flex:1;text-align:left;color:#333;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lib-dropdown__arrow{flex-shrink:0;margin-left:12px;color:#666;transition:transform .2s ease-in-out}.lib-dropdown__arrow--open{transform:rotate(180deg)}.lib-dropdown__menu{position:absolute;top:calc(100% + 4px);left:0;right:0;background-color:#fff;border:2px solid #e0e0e0;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;max-height:300px;overflow-y:auto;animation:dropdownFadeIn .2s ease-out}.lib-dropdown__option{padding:12px 16px;cursor:pointer;transition:background-color .15s ease-in-out;color:#333;font-size:16px;border-bottom:1px solid #f0f0f0}.lib-dropdown__option:last-child{border-bottom:none}.lib-dropdown__option:hover{background-color:#f5f5f5}.lib-dropdown__option--selected{background-color:#e8f4fd;color:#4a90e2;font-weight:500}.lib-dropdown__option--empty{color:#999;cursor:default;font-style:italic}.lib-dropdown__option--empty:hover{background-color:#fff}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconChevronDownComponent, selector: "kit-icon-chevron-down" }] });
194
+ }
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DropdownComponent, decorators: [{
196
+ type: Component,
197
+ args: [{ selector: 'kit-dropdown', standalone: false, template: "<div class=\"lib-dropdown\" [class.lib-dropdown--disabled]=\"disabled\">\r\n <div\r\n class=\"lib-dropdown__trigger\"\r\n [class.lib-dropdown__trigger--open]=\"isOpen\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onTriggerKeydown($event)\">\r\n <span class=\"lib-dropdown__value\">\r\n {{ selectedOption ? selectedOption.label : placeholder }}\r\n </span>\r\n <kit-icon-chevron-down\r\n class=\"lib-dropdown__arrow\"\r\n [class.lib-dropdown__arrow--open]=\"isOpen\"\r\n [size]=\"12\">\r\n </kit-icon-chevron-down>\r\n </div>\r\n <div class=\"lib-dropdown__menu\" *ngIf=\"isOpen && !disabled\">\r\n <div\r\n *ngFor=\"let option of options\"\r\n class=\"lib-dropdown__option\"\r\n [class.lib-dropdown__option--selected]=\"selectedOption?.value === option.value\"\r\n role=\"option\"\r\n [attr.aria-selected]=\"selectedOption?.value === option.value\"\r\n tabindex=\"0\"\r\n (click)=\"selectOption(option)\"\r\n (keydown)=\"onOptionKeydown($event, option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"options.length === 0\" class=\"lib-dropdown__option lib-dropdown__option--empty\">\r\n No options available\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".lib-dropdown{position:relative;display:inline-block;width:100%;min-width:200px}.lib-dropdown--disabled{opacity:.6;pointer-events:none}.lib-dropdown__trigger{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background-color:#fff;border:2px solid #e0e0e0;border-radius:6px;cursor:pointer;transition:all .2s ease-in-out;min-height:40px;-webkit-user-select:none;user-select:none}.lib-dropdown__trigger:hover:not(.lib-dropdown__trigger--disabled){border-color:#4a90e2}.lib-dropdown__trigger:focus-within{outline:none;border-color:#4a90e2;box-shadow:0 0 0 3px #4a90e21a}.lib-dropdown__trigger--open{border-color:#4a90e2;box-shadow:0 0 0 3px #4a90e21a}.lib-dropdown__value{flex:1;text-align:left;color:#333;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lib-dropdown__arrow{flex-shrink:0;margin-left:12px;color:#666;transition:transform .2s ease-in-out}.lib-dropdown__arrow--open{transform:rotate(180deg)}.lib-dropdown__menu{position:absolute;top:calc(100% + 4px);left:0;right:0;background-color:#fff;border:2px solid #e0e0e0;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;max-height:300px;overflow-y:auto;animation:dropdownFadeIn .2s ease-out}.lib-dropdown__option{padding:12px 16px;cursor:pointer;transition:background-color .15s ease-in-out;color:#333;font-size:16px;border-bottom:1px solid #f0f0f0}.lib-dropdown__option:last-child{border-bottom:none}.lib-dropdown__option:hover{background-color:#f5f5f5}.lib-dropdown__option--selected{background-color:#e8f4fd;color:#4a90e2;font-weight:500}.lib-dropdown__option--empty{color:#999;cursor:default;font-style:italic}.lib-dropdown__option--empty:hover{background-color:#fff}@keyframes dropdownFadeIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}\n"] }]
198
+ }], propDecorators: { options: [{
199
+ type: Input
200
+ }], placeholder: [{
201
+ type: Input
202
+ }], selectedValue: [{
203
+ type: Input
204
+ }], disabled: [{
205
+ type: Input
206
+ }], selectionChange: [{
207
+ type: Output
208
+ }], onClickOutside: [{
209
+ type: HostListener,
210
+ args: ['document:click', ['$event']]
211
+ }] } });
212
+
213
+ class IconCopyComponent extends BaseIconComponent {
214
+ size = 16;
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconCopyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
216
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: IconCopyComponent, isStandalone: false, selector: "kit-icon-copy", usesInheritance: true, ngImport: i0, template: `
217
+ <svg
218
+ [attr.width]="size"
219
+ [attr.height]="size"
220
+ viewBox="0 0 24 24"
221
+ fill="none"
222
+ [attr.stroke]="color"
223
+ stroke-width="2"
224
+ stroke-linecap="round"
225
+ stroke-linejoin="round">
226
+ <rect x="9" y="9" width="13" height="13" rx="2"/>
227
+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
228
+ </svg>
229
+ `, isInline: true });
230
+ }
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconCopyComponent, decorators: [{
232
+ type: Component,
233
+ args: [{
234
+ selector: 'kit-icon-copy',
235
+ standalone: false,
236
+ template: `
237
+ <svg
238
+ [attr.width]="size"
239
+ [attr.height]="size"
240
+ viewBox="0 0 24 24"
241
+ fill="none"
242
+ [attr.stroke]="color"
243
+ stroke-width="2"
244
+ stroke-linecap="round"
245
+ stroke-linejoin="round">
246
+ <rect x="9" y="9" width="13" height="13" rx="2"/>
247
+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
248
+ </svg>
249
+ `,
250
+ }]
251
+ }] });
252
+
253
+ class IconCheckComponent extends BaseIconComponent {
254
+ size = 16;
255
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconCheckComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
256
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: IconCheckComponent, isStandalone: false, selector: "kit-icon-check", usesInheritance: true, ngImport: i0, template: `
257
+ <svg
258
+ [attr.width]="size"
259
+ [attr.height]="size"
260
+ viewBox="0 0 24 24"
261
+ fill="none"
262
+ [attr.stroke]="color"
263
+ stroke-width="2"
264
+ stroke-linecap="round"
265
+ stroke-linejoin="round">
266
+ <path d="M20 6L9 17l-5-5"/>
267
+ </svg>
268
+ `, isInline: true });
269
+ }
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconCheckComponent, decorators: [{
271
+ type: Component,
272
+ args: [{
273
+ selector: 'kit-icon-check',
274
+ standalone: false,
275
+ template: `
276
+ <svg
277
+ [attr.width]="size"
278
+ [attr.height]="size"
279
+ viewBox="0 0 24 24"
280
+ fill="none"
281
+ [attr.stroke]="color"
282
+ stroke-width="2"
283
+ stroke-linecap="round"
284
+ stroke-linejoin="round">
285
+ <path d="M20 6L9 17l-5-5"/>
286
+ </svg>
287
+ `,
288
+ }]
289
+ }] });
290
+
291
+ const ICON_COMPONENTS = [
292
+ IconCopyComponent,
293
+ IconCheckComponent,
294
+ IconChevronDownComponent,
295
+ ];
296
+ class IconModule {
297
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
298
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: IconModule, declarations: [IconCopyComponent,
299
+ IconCheckComponent,
300
+ IconChevronDownComponent], exports: [IconCopyComponent,
301
+ IconCheckComponent,
302
+ IconChevronDownComponent] });
303
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconModule });
304
+ }
305
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: IconModule, decorators: [{
306
+ type: NgModule,
307
+ args: [{
308
+ declarations: ICON_COMPONENTS,
309
+ exports: ICON_COMPONENTS,
310
+ }]
311
+ }] });
312
+
313
+ class DropdownModule {
314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
315
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: DropdownModule, declarations: [DropdownComponent], imports: [CommonModule, IconModule], exports: [DropdownComponent] });
316
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DropdownModule, imports: [CommonModule, IconModule] });
317
+ }
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DropdownModule, decorators: [{
319
+ type: NgModule,
320
+ args: [{
321
+ declarations: [DropdownComponent],
322
+ imports: [CommonModule, IconModule],
323
+ exports: [DropdownComponent],
324
+ }]
325
+ }] });
326
+
327
+ class CheckboxComponent {
328
+ label = '';
329
+ checked = false;
330
+ disabled = false;
331
+ indeterminate = false;
332
+ checkedChange = new EventEmitter();
333
+ /** Stable id for the input (generated once per component instance to avoid NG0100). */
334
+ checkboxId = `kit-checkbox-${Math.random().toString(36).substring(2, 11)}`;
335
+ onCheckboxChange(event) {
336
+ if (!this.disabled) {
337
+ const target = event.target;
338
+ this.checked = target.checked;
339
+ this.indeterminate = false; // Clear indeterminate state when user interacts
340
+ this.checkedChange.emit(this.checked);
341
+ }
342
+ }
343
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
344
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: CheckboxComponent, isStandalone: false, selector: "kit-checkbox", inputs: { label: "label", checked: "checked", disabled: "disabled", indeterminate: "indeterminate" }, outputs: { checkedChange: "checkedChange" }, ngImport: i0, template: "<label\r\n class=\"lib-checkbox\"\r\n [class.lib-checkbox--disabled]=\"disabled\"\r\n [attr.for]=\"checkboxId\">\r\n <input\r\n type=\"checkbox\"\r\n [id]=\"checkboxId\"\r\n class=\"lib-checkbox__input\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n (change)=\"onCheckboxChange($event)\">\r\n <span class=\"lib-checkbox__checkmark\"></span>\r\n <span class=\"lib-checkbox__label\" *ngIf=\"label\">{{ label }}</span>\r\n</label>\r\n", styles: [".lib-checkbox{display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;font-size:16px;line-height:1.5}.lib-checkbox--disabled{opacity:.6;cursor:not-allowed}.lib-checkbox__input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.lib-checkbox__input:focus-visible+.lib-checkbox__checkmark{outline:2px solid #4a90e2;outline-offset:2px}.lib-checkbox__input:checked~.lib-checkbox__checkmark{background-color:#4a90e2;border-color:#4a90e2}.lib-checkbox__input:checked~.lib-checkbox__checkmark:after{display:block}.lib-checkbox__input:indeterminate~.lib-checkbox__checkmark{background-color:#4a90e2;border-color:#4a90e2}.lib-checkbox__input:indeterminate~.lib-checkbox__checkmark:after{display:block;width:10px;height:2px;border:none;background-color:#fff;transform:translate(-50%,-50%) rotate(0);left:50%;top:50%}.lib-checkbox__input:disabled{cursor:not-allowed}.lib-checkbox__checkmark{position:relative;display:inline-block;width:20px;height:20px;min-width:20px;min-height:20px;background-color:#fff;border:2px solid #ccc;border-radius:4px;margin-right:10px;transition:all .2s ease-in-out;flex-shrink:0}.lib-checkbox__checkmark:hover{border-color:#4a90e2}.lib-checkbox__checkmark:after{content:\"\";position:absolute;display:none;left:6px;top:2px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.lib-checkbox__label{color:#333;font-weight:400}.lib-checkbox:hover:not(.lib-checkbox--disabled) .lib-checkbox__checkmark{border-color:#4a90e2}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
345
+ }
346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: CheckboxComponent, decorators: [{
347
+ type: Component,
348
+ args: [{ selector: 'kit-checkbox', standalone: false, template: "<label\r\n class=\"lib-checkbox\"\r\n [class.lib-checkbox--disabled]=\"disabled\"\r\n [attr.for]=\"checkboxId\">\r\n <input\r\n type=\"checkbox\"\r\n [id]=\"checkboxId\"\r\n class=\"lib-checkbox__input\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n (change)=\"onCheckboxChange($event)\">\r\n <span class=\"lib-checkbox__checkmark\"></span>\r\n <span class=\"lib-checkbox__label\" *ngIf=\"label\">{{ label }}</span>\r\n</label>\r\n", styles: [".lib-checkbox{display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;font-size:16px;line-height:1.5}.lib-checkbox--disabled{opacity:.6;cursor:not-allowed}.lib-checkbox__input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.lib-checkbox__input:focus-visible+.lib-checkbox__checkmark{outline:2px solid #4a90e2;outline-offset:2px}.lib-checkbox__input:checked~.lib-checkbox__checkmark{background-color:#4a90e2;border-color:#4a90e2}.lib-checkbox__input:checked~.lib-checkbox__checkmark:after{display:block}.lib-checkbox__input:indeterminate~.lib-checkbox__checkmark{background-color:#4a90e2;border-color:#4a90e2}.lib-checkbox__input:indeterminate~.lib-checkbox__checkmark:after{display:block;width:10px;height:2px;border:none;background-color:#fff;transform:translate(-50%,-50%) rotate(0);left:50%;top:50%}.lib-checkbox__input:disabled{cursor:not-allowed}.lib-checkbox__checkmark{position:relative;display:inline-block;width:20px;height:20px;min-width:20px;min-height:20px;background-color:#fff;border:2px solid #ccc;border-radius:4px;margin-right:10px;transition:all .2s ease-in-out;flex-shrink:0}.lib-checkbox__checkmark:hover{border-color:#4a90e2}.lib-checkbox__checkmark:after{content:\"\";position:absolute;display:none;left:6px;top:2px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}.lib-checkbox__label{color:#333;font-weight:400}.lib-checkbox:hover:not(.lib-checkbox--disabled) .lib-checkbox__checkmark{border-color:#4a90e2}\n"] }]
349
+ }], propDecorators: { label: [{
350
+ type: Input
351
+ }], checked: [{
352
+ type: Input
353
+ }], disabled: [{
354
+ type: Input
355
+ }], indeterminate: [{
356
+ type: Input
357
+ }], checkedChange: [{
358
+ type: Output
359
+ }] } });
360
+
361
+ class CheckboxModule {
362
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: CheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
363
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: CheckboxModule, declarations: [CheckboxComponent], imports: [CommonModule], exports: [CheckboxComponent] });
364
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: CheckboxModule, imports: [CommonModule] });
365
+ }
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: CheckboxModule, decorators: [{
367
+ type: NgModule,
368
+ args: [{
369
+ declarations: [CheckboxComponent],
370
+ imports: [CommonModule],
371
+ exports: [CheckboxComponent],
372
+ }]
373
+ }] });
374
+
375
+ /*
376
+ * Public API Surface of ui-kit
377
+ */
378
+
379
+ /**
380
+ * Generated bundle index. Do not edit.
381
+ */
382
+
383
+ export { BaseIconComponent, ButtonComponent, ButtonModule, CheckboxComponent, CheckboxModule, DropdownComponent, DropdownModule, IconCheckComponent, IconChevronDownComponent, IconCopyComponent, IconModule };
384
+ //# sourceMappingURL=zhannam85-ui-kit.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zhannam85-ui-kit.mjs","sources":["../../../src/components/button/button.component.ts","../../../src/components/button/button.component.html","../../../src/components/button/button.module.ts","../../../src/components/icon/base-icon.component.ts","../../../src/components/icon/icon-chevron-down.component.ts","../../../src/components/dropdown/dropdown.component.ts","../../../src/components/dropdown/dropdown.component.html","../../../src/components/icon/icon-copy.component.ts","../../../src/components/icon/icon-check.component.ts","../../../src/components/icon/icon.module.ts","../../../src/components/dropdown/dropdown.module.ts","../../../src/components/checkbox/checkbox.component.ts","../../../src/components/checkbox/checkbox.component.html","../../../src/components/checkbox/checkbox.module.ts","../../../src/public-api.ts","../../../src/zhannam85-ui-kit.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'kit-button',\r\n standalone: false,\r\n templateUrl: './button.component.html',\r\n styleUrls: ['./button.component.scss']\r\n})\r\nexport class ButtonComponent {\r\n @Input() public label = '';\r\n\r\n @Input() public variant: 'primary' | 'secondary' | 'danger' = 'primary';\r\n\r\n @Input() public disabled = false;\r\n\r\n @Input() public type: 'button' | 'submit' | 'reset' = 'button';\r\n\r\n @Input() public size: 'small' | 'medium' | 'large' = 'medium';\r\n\r\n @Output() public buttonClicked = new EventEmitter<MouseEvent>();\r\n\r\n public onClick(event: MouseEvent): void {\r\n if (!this.disabled) {\r\n this.buttonClicked.emit(event);\r\n }\r\n }\r\n}\r\n","<button\r\n [type]=\"type\"\r\n [disabled]=\"disabled\"\r\n [class]=\"'lib-button lib-button--' + variant + ' lib-button--' + size\"\r\n (click)=\"onClick($event)\">\r\n {{ label }}\r\n</button>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { ButtonComponent } from './button.component';\r\n\r\n@NgModule({\r\n declarations: [ButtonComponent],\r\n imports: [CommonModule],\r\n exports: [ButtonComponent],\r\n})\r\nexport class ButtonModule {}\r\n","import { Component, HostBinding, Input } from '@angular/core';\r\n\r\n@Component({ template: '' })\r\nexport abstract class BaseIconComponent {\r\n @Input() public size = 24;\r\n\r\n @Input() public color = 'currentColor';\r\n\r\n @HostBinding('style.width.px')\r\n public get hostWidth(): number {\r\n return this.size;\r\n }\r\n\r\n @HostBinding('style.height.px')\r\n public get hostHeight(): number {\r\n return this.size;\r\n }\r\n\r\n @HostBinding('style.display')\r\n public readonly display = 'inline-flex';\r\n\r\n @HostBinding('style.color')\r\n public get hostColor(): string {\r\n return this.color;\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { BaseIconComponent } from './base-icon.component';\r\n\r\n@Component({\r\n selector: 'kit-icon-chevron-down',\r\n standalone: false,\r\n template: `\r\n <svg\r\n [attr.width]=\"size\"\r\n [attr.height]=\"size\"\r\n viewBox=\"0 0 12 12\"\r\n fill=\"none\"\r\n [attr.stroke]=\"color\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\">\r\n <path d=\"M3 4.5L6 7.5L9 4.5\"/>\r\n </svg>\r\n `,\r\n})\r\nexport class IconChevronDownComponent extends BaseIconComponent {\r\n override size = 12;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { Component, EventEmitter, HostListener, Input, Output, OnInit } from '@angular/core';\r\n\r\nexport interface DropdownOption {\r\n label: string;\r\n value: any;\r\n}\r\n\r\n@Component({\r\n selector: 'kit-dropdown',\r\n standalone: false,\r\n templateUrl: './dropdown.component.html',\r\n styleUrls: ['./dropdown.component.scss']\r\n})\r\nexport class DropdownComponent implements OnInit {\r\n private _options: DropdownOption[] = [];\r\n private _selectedValue: any = null;\r\n\r\n @Input() public set options(value: DropdownOption[]) {\r\n this._options = value ?? [];\r\n this.updateSelectedOption();\r\n }\r\n\r\n public get options(): DropdownOption[] {\r\n return this._options;\r\n }\r\n\r\n @Input() public placeholder = 'Select an option';\r\n\r\n @Input() public set selectedValue(value: any) {\r\n this._selectedValue = value;\r\n this.updateSelectedOption();\r\n }\r\n\r\n public get selectedValue(): any {\r\n return this._selectedValue;\r\n }\r\n\r\n @Input() public disabled = false;\r\n\r\n @Output() public selectionChange = new EventEmitter<any>();\r\n\r\n public isOpen = false;\r\n\r\n public selectedOption: DropdownOption | null = null;\r\n\r\n public ngOnInit(): void {\r\n this.updateSelectedOption();\r\n }\r\n\r\n private updateSelectedOption(): void {\r\n if (this._selectedValue !== null && this._selectedValue !== undefined) {\r\n this.selectedOption = this._options.find(opt => opt.value === this._selectedValue) || null;\r\n } else {\r\n this.selectedOption = null;\r\n }\r\n }\r\n\r\n public toggleDropdown(): void {\r\n if (!this.disabled) {\r\n this.isOpen = !this.isOpen;\r\n }\r\n }\r\n\r\n public onTriggerKeydown(event: KeyboardEvent): void {\r\n if (event.key === 'Enter' || event.key === ' ') {\r\n event.preventDefault();\r\n this.toggleDropdown();\r\n }\r\n }\r\n\r\n public onOptionKeydown(event: KeyboardEvent, option: DropdownOption): void {\r\n if (event.key === 'Enter' || event.key === ' ') {\r\n event.preventDefault();\r\n this.selectOption(option);\r\n }\r\n }\r\n\r\n public selectOption(option: DropdownOption): void {\r\n if (!this.disabled) {\r\n this.selectedOption = option;\r\n this._selectedValue = option.value;\r\n this.isOpen = false;\r\n this.selectionChange.emit(option.value);\r\n }\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n public onClickOutside(event: Event): void {\r\n const target = event.target as HTMLElement;\r\n if (!target.closest('.lib-dropdown')) {\r\n this.isOpen = false;\r\n }\r\n }\r\n}\r\n","<div class=\"lib-dropdown\" [class.lib-dropdown--disabled]=\"disabled\">\r\n <div\r\n class=\"lib-dropdown__trigger\"\r\n [class.lib-dropdown__trigger--open]=\"isOpen\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"toggleDropdown()\"\r\n (keydown)=\"onTriggerKeydown($event)\">\r\n <span class=\"lib-dropdown__value\">\r\n {{ selectedOption ? selectedOption.label : placeholder }}\r\n </span>\r\n <kit-icon-chevron-down\r\n class=\"lib-dropdown__arrow\"\r\n [class.lib-dropdown__arrow--open]=\"isOpen\"\r\n [size]=\"12\">\r\n </kit-icon-chevron-down>\r\n </div>\r\n <div class=\"lib-dropdown__menu\" *ngIf=\"isOpen && !disabled\">\r\n <div\r\n *ngFor=\"let option of options\"\r\n class=\"lib-dropdown__option\"\r\n [class.lib-dropdown__option--selected]=\"selectedOption?.value === option.value\"\r\n role=\"option\"\r\n [attr.aria-selected]=\"selectedOption?.value === option.value\"\r\n tabindex=\"0\"\r\n (click)=\"selectOption(option)\"\r\n (keydown)=\"onOptionKeydown($event, option)\">\r\n {{ option.label }}\r\n </div>\r\n <div *ngIf=\"options.length === 0\" class=\"lib-dropdown__option lib-dropdown__option--empty\">\r\n No options available\r\n </div>\r\n </div>\r\n</div>\r\n","import { Component } from '@angular/core';\r\nimport { BaseIconComponent } from './base-icon.component';\r\n\r\n@Component({\r\n selector: 'kit-icon-copy',\r\n standalone: false,\r\n template: `\r\n <svg\r\n [attr.width]=\"size\"\r\n [attr.height]=\"size\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n [attr.stroke]=\"color\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\">\r\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"/>\r\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"/>\r\n </svg>\r\n `,\r\n})\r\nexport class IconCopyComponent extends BaseIconComponent {\r\n override size = 16;\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { BaseIconComponent } from './base-icon.component';\r\n\r\n@Component({\r\n selector: 'kit-icon-check',\r\n standalone: false,\r\n template: `\r\n <svg\r\n [attr.width]=\"size\"\r\n [attr.height]=\"size\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n [attr.stroke]=\"color\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\">\r\n <path d=\"M20 6L9 17l-5-5\"/>\r\n </svg>\r\n `,\r\n})\r\nexport class IconCheckComponent extends BaseIconComponent {\r\n override size = 16;\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\nimport { IconCopyComponent } from './icon-copy.component';\r\nimport { IconCheckComponent } from './icon-check.component';\r\nimport { IconChevronDownComponent } from './icon-chevron-down.component';\r\n\r\nconst ICON_COMPONENTS = [\r\n IconCopyComponent,\r\n IconCheckComponent,\r\n IconChevronDownComponent,\r\n];\r\n\r\n@NgModule({\r\n declarations: ICON_COMPONENTS,\r\n exports: ICON_COMPONENTS,\r\n})\r\nexport class IconModule {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { DropdownComponent } from './dropdown.component';\r\nimport { IconModule } from '../icon/icon.module';\r\n\r\n@NgModule({\r\n declarations: [DropdownComponent],\r\n imports: [CommonModule, IconModule],\r\n exports: [DropdownComponent],\r\n})\r\nexport class DropdownModule {}\r\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'kit-checkbox',\r\n standalone: false,\r\n templateUrl: './checkbox.component.html',\r\n styleUrls: ['./checkbox.component.scss']\r\n})\r\nexport class CheckboxComponent {\r\n @Input() public label = '';\r\n\r\n @Input() public checked = false;\r\n\r\n @Input() public disabled = false;\r\n\r\n @Input() public indeterminate = false;\r\n\r\n @Output() public checkedChange = new EventEmitter<boolean>();\r\n\r\n /** Stable id for the input (generated once per component instance to avoid NG0100). */\r\n public readonly checkboxId = `kit-checkbox-${Math.random().toString(36).substring(2, 11)}`;\r\n\r\n public onCheckboxChange(event: Event): void {\r\n if (!this.disabled) {\r\n const target = event.target as HTMLInputElement;\r\n this.checked = target.checked;\r\n this.indeterminate = false; // Clear indeterminate state when user interacts\r\n this.checkedChange.emit(this.checked);\r\n }\r\n }\r\n}\r\n","<label\r\n class=\"lib-checkbox\"\r\n [class.lib-checkbox--disabled]=\"disabled\"\r\n [attr.for]=\"checkboxId\">\r\n <input\r\n type=\"checkbox\"\r\n [id]=\"checkboxId\"\r\n class=\"lib-checkbox__input\"\r\n [checked]=\"checked\"\r\n [indeterminate]=\"indeterminate\"\r\n [disabled]=\"disabled\"\r\n (change)=\"onCheckboxChange($event)\">\r\n <span class=\"lib-checkbox__checkmark\"></span>\r\n <span class=\"lib-checkbox__label\" *ngIf=\"label\">{{ label }}</span>\r\n</label>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { CheckboxComponent } from './checkbox.component';\r\n\r\n@NgModule({\r\n declarations: [CheckboxComponent],\r\n imports: [CommonModule],\r\n exports: [CheckboxComponent],\r\n})\r\nexport class CheckboxModule {}\r\n","/*\r\n * Public API Surface of ui-kit\r\n */\r\n\r\nexport * from './components/button/button.component';\r\nexport * from './components/button/button.module';\r\nexport * from './components/dropdown/dropdown.component';\r\nexport * from './components/dropdown/dropdown.module';\r\nexport * from './components/checkbox/checkbox.component';\r\nexport * from './components/checkbox/checkbox.module';\r\nexport * from './components/icon/base-icon.component';\r\nexport * from './components/icon/icon-copy.component';\r\nexport * from './components/icon/icon-check.component';\r\nexport * from './components/icon/icon-chevron-down.component';\r\nexport * from './components/icon/icon.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.IconChevronDownComponent"],"mappings":";;;;;MAQa,eAAe,CAAA;IACV,KAAK,GAAG,EAAE;IAEV,OAAO,GAAuC,SAAS;IAEvD,QAAQ,GAAG,KAAK;IAEhB,IAAI,GAAkC,QAAQ;IAE9C,IAAI,GAAiC,QAAQ;AAE5C,IAAA,aAAa,GAAG,IAAI,YAAY,EAAc;AAExD,IAAA,OAAO,CAAC,KAAiB,EAAA;AAC5B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAChB,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;QAClC;IACJ;uGAjBW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,sNCR5B,6MAOA,EAAA,MAAA,EAAA,CAAA,+7CAAA,CAAA,EAAA,CAAA;;2FDCa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,cACV,KAAK,EAAA,QAAA,EAAA,6MA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AAA,EAAA,CAJR,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACtB,YAAY,aACZ,iBAAiB,CAAA,EAAA,CAAA;AAElB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHb,YAAY,CAAA,EAAA,CAAA;;2FAGb,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC/B,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@zhannam85/ui-kit",
3
+ "version": "0.1.0",
4
+ "description": "A modern Angular UI kit library with Button, Dropdown, and Checkbox components",
5
+ "keywords": [
6
+ "angular",
7
+ "ui-kit",
8
+ "components",
9
+ "button",
10
+ "dropdown",
11
+ "checkbox"
12
+ ],
13
+ "author": "",
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": ""
18
+ },
19
+ "peerDependencies": {
20
+ "@angular/common": "^21.0.0",
21
+ "@angular/core": "^21.0.0"
22
+ },
23
+ "dependencies": {
24
+ "@angular/common": "^21.0.0",
25
+ "@angular/core": "^21.0.0",
26
+ "@angular/router": "^21.0.0",
27
+ "tslib": "^2.3.0"
28
+ },
29
+ "main": "dist/ui-kit/fesm2022/ui-kit.mjs",
30
+ "module": "fesm2022/zhannam85-ui-kit.mjs",
31
+ "types": "dist/ui-kit/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "esm2022": "./dist/ui-kit/fesm2022/ui-kit.mjs",
35
+ "esm": "./dist/ui-kit/fesm2022/ui-kit.mjs",
36
+ "types": "./types/zhannam85-ui-kit.d.ts",
37
+ "default": "./fesm2022/zhannam85-ui-kit.mjs"
38
+ },
39
+ "./package.json": {
40
+ "default": "./package.json"
41
+ }
42
+ },
43
+ "sideEffects": false,
44
+ "typings": "types/zhannam85-ui-kit.d.ts"
45
+ }
@@ -0,0 +1,111 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, OnInit } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+
5
+ declare class ButtonComponent {
6
+ label: string;
7
+ variant: 'primary' | 'secondary' | 'danger';
8
+ disabled: boolean;
9
+ type: 'button' | 'submit' | 'reset';
10
+ size: 'small' | 'medium' | 'large';
11
+ buttonClicked: EventEmitter<MouseEvent>;
12
+ onClick(event: MouseEvent): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "kit-button", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "buttonClicked": "buttonClicked"; }, never, never, false, never>;
15
+ }
16
+
17
+ declare class ButtonModule {
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonModule, never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, [typeof ButtonComponent], [typeof i2.CommonModule], [typeof ButtonComponent]>;
20
+ static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
21
+ }
22
+
23
+ interface DropdownOption {
24
+ label: string;
25
+ value: any;
26
+ }
27
+ declare class DropdownComponent implements OnInit {
28
+ private _options;
29
+ private _selectedValue;
30
+ set options(value: DropdownOption[]);
31
+ get options(): DropdownOption[];
32
+ placeholder: string;
33
+ set selectedValue(value: any);
34
+ get selectedValue(): any;
35
+ disabled: boolean;
36
+ selectionChange: EventEmitter<any>;
37
+ isOpen: boolean;
38
+ selectedOption: DropdownOption | null;
39
+ ngOnInit(): void;
40
+ private updateSelectedOption;
41
+ toggleDropdown(): void;
42
+ onTriggerKeydown(event: KeyboardEvent): void;
43
+ onOptionKeydown(event: KeyboardEvent, option: DropdownOption): void;
44
+ selectOption(option: DropdownOption): void;
45
+ onClickOutside(event: Event): void;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "kit-dropdown", never, { "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selectedValue": { "alias": "selectedValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
48
+ }
49
+
50
+ declare abstract class BaseIconComponent {
51
+ size: number;
52
+ color: string;
53
+ get hostWidth(): number;
54
+ get hostHeight(): number;
55
+ readonly display = "inline-flex";
56
+ get hostColor(): string;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseIconComponent, never>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseIconComponent, "ng-component", never, { "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
59
+ }
60
+
61
+ declare class IconCopyComponent extends BaseIconComponent {
62
+ size: number;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconCopyComponent, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconCopyComponent, "kit-icon-copy", never, {}, {}, never, never, false, never>;
65
+ }
66
+
67
+ declare class IconCheckComponent extends BaseIconComponent {
68
+ size: number;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconCheckComponent, never>;
70
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconCheckComponent, "kit-icon-check", never, {}, {}, never, never, false, never>;
71
+ }
72
+
73
+ declare class IconChevronDownComponent extends BaseIconComponent {
74
+ size: number;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconChevronDownComponent, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconChevronDownComponent, "kit-icon-chevron-down", never, {}, {}, never, never, false, never>;
77
+ }
78
+
79
+ declare class IconModule {
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconModule, never>;
81
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IconModule, [typeof IconCopyComponent, typeof IconCheckComponent, typeof IconChevronDownComponent], never, [typeof IconCopyComponent, typeof IconCheckComponent, typeof IconChevronDownComponent]>;
82
+ static ɵinj: i0.ɵɵInjectorDeclaration<IconModule>;
83
+ }
84
+
85
+ declare class DropdownModule {
86
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownModule, never>;
87
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownModule, [typeof DropdownComponent], [typeof i2.CommonModule, typeof IconModule], [typeof DropdownComponent]>;
88
+ static ɵinj: i0.ɵɵInjectorDeclaration<DropdownModule>;
89
+ }
90
+
91
+ declare class CheckboxComponent {
92
+ label: string;
93
+ checked: boolean;
94
+ disabled: boolean;
95
+ indeterminate: boolean;
96
+ checkedChange: EventEmitter<boolean>;
97
+ /** Stable id for the input (generated once per component instance to avoid NG0100). */
98
+ readonly checkboxId: string;
99
+ onCheckboxChange(event: Event): void;
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>;
101
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "kit-checkbox", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, false, never>;
102
+ }
103
+
104
+ declare class CheckboxModule {
105
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxModule, never>;
106
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CheckboxModule, [typeof CheckboxComponent], [typeof i2.CommonModule], [typeof CheckboxComponent]>;
107
+ static ɵinj: i0.ɵɵInjectorDeclaration<CheckboxModule>;
108
+ }
109
+
110
+ export { BaseIconComponent, ButtonComponent, ButtonModule, CheckboxComponent, CheckboxModule, DropdownComponent, DropdownModule, IconCheckComponent, IconChevronDownComponent, IconCopyComponent, IconModule };
111
+ export type { DropdownOption };