ng-luna 0.0.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # ng-luna
2
2
 
3
- An Angular component library inspired by Windows XP aesthetics, built with XP.css and IBM Plex fonts.
3
+ An Angular component library inspired by Windows XP aesthetics, built with IBM Plex fonts.
4
4
 
5
5
  ## Overview
6
6
 
7
- ng-luna provides a collection of Angular components styled to match the classic Windows XP design language. The library uses [XP.css](https://botoxparty.github.io/XP.css/) for styling and [IBM Plex](https://www.ibm.com/plex/) fonts for typography.
7
+ ng-luna provides a collection of Angular components styled to match the classic Windows XP design language. The library uses custom styling inspired by Windows XP and [IBM Plex](https://www.ibm.com/plex/) fonts for typography.
8
+
9
+ All components are **standalone** and implement Angular's reactive forms API where applicable, making them compatible with `FormControl`, `FormGroup`, and `ngModel`. Components are built on **Angular CDK** for enhanced accessibility, keyboard navigation, drag-and-drop, and cross-platform support.
8
10
 
9
11
  ## Installation
10
12
 
@@ -18,41 +20,86 @@ This library requires the following peer dependencies:
18
20
 
19
21
  - `@angular/common`: 19.2.15
20
22
  - `@angular/core`: 19.2.15
23
+ - `@angular/forms`: 19.2.15
21
24
 
22
25
  ## Usage
23
26
 
24
- ### Import the Module
27
+ ### Import Components
25
28
 
26
- Import the components you need in your Angular application:
29
+ Import the components you need in your Angular application. All components are standalone:
27
30
 
28
31
  ```typescript
29
32
  import { ButtonComponent } from 'ng-luna';
33
+
34
+ @Component({
35
+ imports: [ ButtonComponent ],
36
+ // ...
37
+ })
30
38
  ```
31
39
 
32
- ### Button Component
40
+ ### Using Bundled Fonts
33
41
 
34
- The `luna-button` component provides a Windows XP-styled button:
42
+ The IBM Plex fonts are **automatically bundled and loaded** when you use any ng-luna component. No additional setup or configuration is required.
35
43
 
36
- ```html
37
- <luna-button (click)="handleClick()">Click Me</luna-button>
44
+ **Fonts are automatically available:**
45
+ - Font files are bundled with the library
46
+ - ✅ Fonts load automatically when you use any component
47
+ - ✅ No imports or configuration needed
48
+ - ✅ Works out of the box
49
+
50
+ **Using fonts in your own styles:**
51
+
52
+ Since the fonts are already loaded, you can use them directly in your CSS/SCSS:
53
+
54
+ ```scss
55
+ .my-custom-class {
56
+ font-family: 'IBM Plex Sans', sans-serif;
57
+ }
58
+
59
+ .code-snippet {
60
+ font-family: 'IBM Plex Mono', monospace;
61
+ }
62
+
63
+ .heading {
64
+ font-family: 'IBM Plex Serif', serif;
65
+ }
38
66
  ```
39
67
 
68
+ **Available font families:**
69
+ - `'IBM Plex Sans', sans-serif` - Default sans-serif font used by components
70
+ - `'IBM Plex Mono', monospace` - Monospace font
71
+ - `'IBM Plex Serif', serif` - Serif font
72
+
73
+ ## Components
74
+
75
+ All components extend the `LunaControl` base class, which provides the following common inputs available on every component:
76
+
77
+ - `id?: string` - Element ID
78
+ - `name?: string` - Name attribute
79
+ - `disabled: boolean` - Whether the control is disabled (default: `false`)
80
+ - `tabindex?: number` - Tab index for keyboard navigation
81
+ - `autofocus: boolean` - Whether the control should be autofocused (default: `false`)
82
+
83
+ These inputs are inherited from the base class and available on all components unless otherwise noted in the component-specific documentation below.
84
+
85
+ ### Button Component
86
+
87
+ The `luna-button` component provides a Windows XP-styled button.
88
+
89
+ **Selector:** `luna-button`
90
+
40
91
  #### Inputs
41
92
 
42
- - `autofocus: boolean` - Whether the button should be autofocused (default: `false`)
43
93
  - `command?: string` - Command to invoke when the button is clicked
44
94
  - `commandfor?: string` - Element ID that the command is for
45
- - `disabled: boolean` - Whether the button is disabled (default: `false`)
46
95
  - `form?: string` - Form element ID to associate with
47
96
  - `formaction?: string` - URL to submit the form to (for submit buttons)
48
97
  - `formenctype?: FormEnctype` - Form encoding type: `'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'`
49
98
  - `formmethod?: FormMethod` - HTTP method for form submission: `'get' | 'post'`
50
99
  - `formnovalidate: boolean` - Whether to bypass form validation (default: `false`)
51
100
  - `formtarget?: FormTarget` - Where to display form response: `'_self' | '_blank' | '_parent' | '_top'`
52
- - `name?: string` - Name attribute for the button
53
101
  - `popovertarget?: string` - ID of popover element to control
54
102
  - `popovertargetaction?: PopoverTargetAction` - Popover action: `'show' | 'hide' | 'toggle'`
55
- - `tabindex?: number` - Tab index for keyboard navigation
56
103
  - `type: ButtonType` - Button type: `'button' | 'submit' | 'reset'` (default: `'button'`)
57
104
  - `value?: string` - Value attribute for the button
58
105
 
@@ -71,6 +118,356 @@ The `luna-button` component provides a Windows XP-styled button:
71
118
  </luna-button>
72
119
  ```
73
120
 
121
+ ### Checkbox Component
122
+
123
+ The `luna-checkbox` component provides a Windows XP-styled checkbox that implements `ControlValueAccessor` for reactive forms support.
124
+
125
+ **Selector:** `luna-checkbox`
126
+
127
+ #### Inputs
128
+
129
+ - `label?: string` - Label text for the checkbox
130
+ - `value?: string` - Value attribute for the checkbox
131
+
132
+ #### Outputs
133
+
134
+ - `change: EventEmitter<boolean>` - Emitted when the checkbox state changes
135
+
136
+ #### Example
137
+
138
+ ```html
139
+ <luna-checkbox
140
+ [(ngModel)]="isChecked"
141
+ label="Accept terms and conditions"
142
+ (change)="onCheckboxChange($event)">
143
+ </luna-checkbox>
144
+ ```
145
+
146
+ ### Fieldset Component
147
+
148
+ The `luna-fieldset` component provides a Windows XP-styled fieldset for grouping form controls.
149
+
150
+ **Selector:** `luna-fieldset`
151
+
152
+ #### Inputs
153
+
154
+ - `legend?: string` - Legend text for the fieldset
155
+
156
+ #### Example
157
+
158
+ ```html
159
+ <luna-fieldset legend="User Information">
160
+ <!-- Form controls here -->
161
+ </luna-fieldset>
162
+ ```
163
+
164
+ ### Input Component
165
+
166
+ The `luna-input` component provides a Windows XP-styled text input that implements `ControlValueAccessor` for reactive forms support.
167
+
168
+ **Selector:** `luna-input`
169
+
170
+ #### Inputs
171
+
172
+ - `placeholder?: string` - Placeholder text
173
+ - `type: InputType` - Input type: `'text' | 'password' | 'email'` (default: `'text'`)
174
+ - `readonly: boolean` - Whether the input is readonly (default: `false`)
175
+
176
+ #### Outputs
177
+
178
+ - `change: EventEmitter<string>` - Emitted when the input value changes
179
+ - `blur: EventEmitter<FocusEvent>` - Emitted when the input loses focus
180
+
181
+ #### Example
182
+
183
+ ```html
184
+ <luna-input
185
+ [(ngModel)]="username"
186
+ type="text"
187
+ placeholder="Enter username"
188
+ (change)="onInputChange($event)">
189
+ </luna-input>
190
+ ```
191
+
192
+ ### Progress Component
193
+
194
+ The `luna-progress` component provides a Windows XP-styled progress bar.
195
+
196
+ **Selector:** `luna-progress`
197
+
198
+ #### Inputs
199
+
200
+ - `value?: number` - Current progress value
201
+ - `max: number` - Maximum value (default: `100`)
202
+
203
+ #### Example
204
+
205
+ ```html
206
+ <luna-progress
207
+ [value]="progressValue"
208
+ [max]="100">
209
+ </luna-progress>
210
+ ```
211
+
212
+ ### Radio Component
213
+
214
+ The `luna-radio` component provides a Windows XP-styled radio button that implements `ControlValueAccessor` for reactive forms support.
215
+
216
+ **Selector:** `luna-radio`
217
+
218
+ #### Inputs
219
+
220
+ - `label?: string` - Label text for the radio button
221
+ - `value?: string` - Value attribute for the radio button
222
+
223
+ **Note:** The `name` attribute is required for grouping radio buttons together.
224
+
225
+ #### Outputs
226
+
227
+ - `change: EventEmitter<string>` - Emitted when the radio button is selected
228
+
229
+ #### Example
230
+
231
+ ```html
232
+ <luna-radio
233
+ name="option"
234
+ value="option1"
235
+ label="Option 1"
236
+ [(ngModel)]="selectedOption">
237
+ </luna-radio>
238
+ <luna-radio
239
+ name="option"
240
+ value="option2"
241
+ label="Option 2"
242
+ [(ngModel)]="selectedOption">
243
+ </luna-radio>
244
+ ```
245
+
246
+ ### Select Component
247
+
248
+ The `luna-select` component provides a Windows XP-styled select dropdown that implements `ControlValueAccessor` for reactive forms support.
249
+
250
+ **Selector:** `luna-select`
251
+
252
+ #### Inputs
253
+
254
+ No additional inputs beyond the common base inputs.
255
+
256
+ #### Outputs
257
+
258
+ - `change: EventEmitter<string>` - Emitted when the selection changes
259
+
260
+ #### Example
261
+
262
+ ```html
263
+ <luna-select
264
+ [(ngModel)]="selectedValue"
265
+ (change)="onSelectChange($event)">
266
+ <option value="option1">Option 1</option>
267
+ <option value="option2">Option 2</option>
268
+ </luna-select>
269
+ ```
270
+
271
+ ### Slider Component
272
+
273
+ The `luna-slider` component provides a Windows XP-styled range slider that implements `ControlValueAccessor` for reactive forms support.
274
+
275
+ **Selector:** `luna-slider`
276
+
277
+ #### Inputs
278
+
279
+ - `min: number` - Minimum value (default: `0`)
280
+ - `max: number` - Maximum value (default: `100`)
281
+ - `step: number` - Step value (default: `1`)
282
+ - `vertical: boolean` - Whether the slider is vertical (default: `false`)
283
+ - `boxIndicator: boolean` - Whether to show a box indicator (default: `false`)
284
+
285
+ #### Outputs
286
+
287
+ - `change: EventEmitter<number>` - Emitted when the slider value changes
288
+
289
+ #### Example
290
+
291
+ ```html
292
+ <luna-slider
293
+ [(ngModel)]="sliderValue"
294
+ [min]="0"
295
+ [max]="100"
296
+ [step]="1"
297
+ (change)="onSliderChange($event)">
298
+ </luna-slider>
299
+ ```
300
+
301
+ ### Tabs Component
302
+
303
+ The `luna-tabs` component provides a Windows XP-styled tab interface with keyboard navigation support.
304
+
305
+ **Selector:** `luna-tabs`
306
+
307
+ #### Inputs
308
+
309
+ - `tabs: Tab[]` - Array of tab objects with `id`, `label`, and optional `content`
310
+ - `activeTabId?: string` - ID of the currently active tab
311
+
312
+ #### Outputs
313
+
314
+ - `tabChange: EventEmitter<string>` - Emitted when a tab is selected
315
+
316
+ #### Keyboard Navigation
317
+
318
+ - **Arrow Left/Right** - Navigate between tabs
319
+ - **Tab** - Move focus to tab panel content
320
+
321
+ #### Example
322
+
323
+ ```html
324
+ <luna-tabs
325
+ [tabs]="tabs"
326
+ [activeTabId]="activeTabId"
327
+ (tabChange)="onTabChange($event)">
328
+ </luna-tabs>
329
+ ```
330
+
331
+ ```typescript
332
+ tabs: Tab[] = [
333
+ { id: 'tab1', label: 'Tab 1', content: 'Content 1' },
334
+ { id: 'tab2', label: 'Tab 2', content: 'Content 2' }
335
+ ];
336
+ ```
337
+
338
+ ### Textarea Component
339
+
340
+ The `luna-textarea` component provides a Windows XP-styled textarea that implements `ControlValueAccessor` for reactive forms support.
341
+
342
+ **Selector:** `luna-textarea`
343
+
344
+ #### Inputs
345
+
346
+ - `placeholder?: string` - Placeholder text
347
+ - `rows?: number` - Number of visible rows
348
+ - `cols?: number` - Number of visible columns
349
+ - `readonly: boolean` - Whether the textarea is readonly (default: `false`)
350
+
351
+ #### Outputs
352
+
353
+ - `change: EventEmitter<string>` - Emitted when the textarea value changes
354
+ - `blur: EventEmitter<FocusEvent>` - Emitted when the textarea loses focus
355
+
356
+ #### Example
357
+
358
+ ```html
359
+ <luna-textarea
360
+ [(ngModel)]="message"
361
+ [rows]="5"
362
+ [cols]="40"
363
+ placeholder="Enter your message"
364
+ (change)="onTextareaChange($event)">
365
+ </luna-textarea>
366
+ ```
367
+
368
+ ### Window Component
369
+
370
+ The `luna-window` component provides a Windows XP-styled draggable window with title bar and controls.
371
+
372
+ **Selector:** `luna-window`
373
+
374
+ #### Inputs
375
+
376
+ - `title?: string` - Window title text
377
+ - `showMinimize: boolean` - Whether to show the minimize button (default: `true`)
378
+ - `showMaximize: boolean` - Whether to show the maximize button (default: `true`)
379
+ - `showHelp: boolean` - Whether to show the help button (default: `false`)
380
+ - `showClose: boolean` - Whether to show the close button (default: `true`)
381
+ - `isMaximized: boolean` - Whether the window is currently maximized (default: `false`)
382
+ - `boundaryElement?: string` - CSS selector for element that constrains window dragging
383
+ - `scrollable: boolean` - Whether the window body should be scrollable (default: `false`)
384
+
385
+ #### Outputs
386
+
387
+ - `minimize: EventEmitter<void>` - Emitted when the minimize button is clicked
388
+ - `maximize: EventEmitter<void>` - Emitted when the maximize button is clicked
389
+ - `restore: EventEmitter<void>` - Emitted when the restore button is clicked
390
+ - `help: EventEmitter<void>` - Emitted when the help button is clicked
391
+ - `close: EventEmitter<void>` - Emitted when the close button is clicked
392
+
393
+ #### Dragging
394
+
395
+ The window can be dragged by its title bar. Dragging is automatically disabled when the window is maximized.
396
+
397
+ #### Example
398
+
399
+ ```html
400
+ <luna-window
401
+ title="My Application"
402
+ [showHelp]="true"
403
+ boundaryElement=".container"
404
+ [scrollable]="true"
405
+ (minimize)="onMinimize()"
406
+ (maximize)="onMaximize()"
407
+ (close)="onClose()">
408
+ <div class="window-body">
409
+ Window content goes here
410
+ </div>
411
+ </luna-window>
412
+ ```
413
+
414
+ ## Accessibility & CDK Features
415
+
416
+ All components leverage **Angular CDK** for enhanced functionality:
417
+
418
+ - **Focus Management** - All form components track focus states for better accessibility
419
+ - **Keyboard Navigation** - Tabs support arrow key navigation with focus management
420
+ - **Screen Reader Support** - Components announce state changes via `LiveAnnouncer`
421
+ - **Drag & Drop** - Window component supports draggable functionality with boundary constraints
422
+ - **Scrolling** - Window body supports scrollable content areas
423
+ - **Platform Detection** - Components adapt behavior based on platform/browser
424
+ - **RTL Support** - Input and button components support right-to-left layouts
425
+ - **Type Coercion** - Number inputs use type-safe coercion utilities
426
+
427
+ Screen reader announcements are non-intrusive and only audible to assistive technology users.
428
+
429
+ ## Reactive Forms Support
430
+
431
+ Components that implement `ControlValueAccessor` (checkbox, input, radio, select, slider, textarea) can be used with Angular's reactive forms:
432
+
433
+ ```typescript
434
+ import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms';
435
+
436
+ export class MyComponent
437
+ {
438
+ form: FormGroup;
439
+
440
+ constructor(private fb: FormBuilder)
441
+ {
442
+ this.form = this.fb.group({
443
+ username: [''],
444
+ email: [''],
445
+ agreeToTerms: [false]
446
+ });
447
+ }
448
+ }
449
+ ```
450
+
451
+ ```html
452
+ <form [formGroup]="form">
453
+ <luna-input
454
+ formControlName="username"
455
+ placeholder="Username">
456
+ </luna-input>
457
+
458
+ <luna-input
459
+ formControlName="email"
460
+ type="email"
461
+ placeholder="Email">
462
+ </luna-input>
463
+
464
+ <luna-checkbox
465
+ formControlName="agreeToTerms"
466
+ label="I agree to the terms">
467
+ </luna-checkbox>
468
+ </form>
469
+ ```
470
+
74
471
  ## Development
75
472
 
76
473
  ### Building the Library
@@ -86,9 +483,22 @@ ng-luna/
86
483
  ├── src/
87
484
  │ ├── controls/ # Component library controls
88
485
  │ │ ├── button/ # Button component
486
+ │ │ ├── checkbox/ # Checkbox component
487
+ │ │ ├── fieldset/ # Fieldset component
488
+ │ │ ├── input/ # Input component
489
+ │ │ ├── progress/ # Progress component
490
+ │ │ ├── radio/ # Radio component
491
+ │ │ ├── select/ # Select component
492
+ │ │ ├── slider/ # Slider component
493
+ │ │ ├── tabs/ # Tabs component
494
+ │ │ ├── textarea/ # Textarea component
495
+ │ │ ├── window/ # Window component
89
496
  │ │ └── index.ts # Controls barrel export
90
497
  │ ├── theme/ # Theme files (fonts, styles)
91
- │ │ └── _fonts.scss # IBM Plex font imports
498
+ │ │ ├── _fonts.scss # IBM Plex font imports
499
+ │ │ ├── _palette.scss # Color palette
500
+ │ │ ├── _graphics.scss # SVG graphics
501
+ │ │ └── _global.scss # Global styles
92
502
  │ └── public-api.ts # Public API surface
93
503
  ├── ng-package.json # ng-packagr configuration
94
504
  ├── package.json # Package dependencies
@@ -97,8 +507,7 @@ ng-luna/
97
507
 
98
508
  ## Dependencies
99
509
 
100
- - **XP.css** (v0.2.6) - Windows XP styling framework
101
- - **@ibm/plex** (v6.4.1) - IBM Plex font families
510
+ - **@ibm/plex** (v6.4.1) - IBM Plex font families (fonts are bundled with the library)
102
511
  - **@angular/cdk** (v19.2.17) - Angular Component Dev Kit
103
512
 
104
513
  ## Publishing
@@ -155,4 +564,3 @@ npm publish ./dist
155
564
  MIT License - see [LICENSE](LICENSE) file for details.
156
565
 
157
566
  Copyright (c) 2025 Adam R Moss
158
-
@@ -1,29 +1,36 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, ElementRef, OnDestroy, AfterViewInit } from '@angular/core';
2
+ import { Dir } from '@angular/cdk/bidi';
3
+ import { FocusMonitor } from '@angular/cdk/a11y';
4
+ import { Platform } from '@angular/cdk/platform';
5
+ import { LunaControl } from '../luna-control';
2
6
  import * as i0 from "@angular/core";
3
7
  export type ButtonType = 'button' | 'submit' | 'reset';
4
8
  export type FormEnctype = 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
5
9
  export type FormMethod = 'get' | 'post';
6
10
  export type FormTarget = '_self' | '_blank' | '_parent' | '_top';
7
11
  export type PopoverTargetAction = 'show' | 'hide' | 'toggle';
8
- export declare class ButtonComponent {
9
- autofocus: boolean;
12
+ export declare class ButtonComponent extends LunaControl implements AfterViewInit, OnDestroy {
13
+ private elementRef;
14
+ private focusMonitor;
15
+ platform: Platform;
16
+ dir: Dir;
10
17
  command?: string;
11
18
  commandfor?: string;
12
- disabled: boolean;
13
19
  form?: string;
14
20
  formaction?: string;
15
21
  formenctype?: FormEnctype;
16
22
  formmethod?: FormMethod;
17
23
  formnovalidate: boolean;
18
24
  formtarget?: FormTarget;
19
- name?: string;
20
25
  popovertarget?: string;
21
26
  popovertargetaction?: PopoverTargetAction;
22
- tabindex?: number;
23
27
  type: ButtonType;
24
28
  value?: string;
25
29
  click: EventEmitter<MouseEvent>;
30
+ constructor(elementRef: ElementRef<HTMLElement>, focusMonitor: FocusMonitor, platform: Platform, dir: Dir);
31
+ ngAfterViewInit(): void;
32
+ ngOnDestroy(): void;
26
33
  onClick(event: MouseEvent): void;
27
34
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "luna-button", never, { "autofocus": { "alias": "autofocus"; "required": false; }; "command": { "alias": "command"; "required": false; }; "commandfor": { "alias": "commandfor"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "form": { "alias": "form"; "required": false; }; "formaction": { "alias": "formaction"; "required": false; }; "formenctype": { "alias": "formenctype"; "required": false; }; "formmethod": { "alias": "formmethod"; "required": false; }; "formnovalidate": { "alias": "formnovalidate"; "required": false; }; "formtarget": { "alias": "formtarget"; "required": false; }; "name": { "alias": "name"; "required": false; }; "popovertarget": { "alias": "popovertarget"; "required": false; }; "popovertargetaction": { "alias": "popovertargetaction"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "click": "click"; }, never, ["*"], true, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "luna-button", never, { "command": { "alias": "command"; "required": false; }; "commandfor": { "alias": "commandfor"; "required": false; }; "form": { "alias": "form"; "required": false; }; "formaction": { "alias": "formaction"; "required": false; }; "formenctype": { "alias": "formenctype"; "required": false; }; "formmethod": { "alias": "formmethod"; "required": false; }; "formnovalidate": { "alias": "formnovalidate"; "required": false; }; "formtarget": { "alias": "formtarget"; "required": false; }; "popovertarget": { "alias": "popovertarget"; "required": false; }; "popovertargetaction": { "alias": "popovertargetaction"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "click": "click"; }, never, ["*"], true, never>;
29
36
  }
@@ -1,20 +1,28 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, ElementRef, OnDestroy, AfterViewInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y';
4
+ import { Platform } from '@angular/cdk/platform';
5
+ import { LunaControl } from '../luna-control';
3
6
  import * as i0 from "@angular/core";
4
- export declare class CheckboxComponent implements ControlValueAccessor {
5
- disabled: boolean;
7
+ export declare class CheckboxComponent extends LunaControl implements ControlValueAccessor, AfterViewInit, OnDestroy {
8
+ private elementRef;
9
+ private focusMonitor;
10
+ private liveAnnouncer;
11
+ platform: Platform;
6
12
  label?: string;
7
- name?: string;
8
13
  value?: string;
9
14
  change: EventEmitter<boolean>;
10
15
  checked: boolean;
11
16
  private onChange;
12
17
  private onTouched;
18
+ constructor(elementRef: ElementRef<HTMLElement>, focusMonitor: FocusMonitor, liveAnnouncer: LiveAnnouncer, platform: Platform);
19
+ ngAfterViewInit(): void;
20
+ ngOnDestroy(): void;
13
21
  onCheckboxChange(event: Event): void;
14
22
  writeValue(value: boolean): void;
15
23
  registerOnChange(fn: (value: boolean) => void): void;
16
24
  registerOnTouched(fn: () => void): void;
17
25
  setDisabledState(isDisabled: boolean): void;
18
26
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "luna-checkbox", never, { "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, never, ["*"], true, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "luna-checkbox", never, { "label": { "alias": "label"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, never, ["*"], true, never>;
20
28
  }
@@ -1,5 +1,6 @@
1
+ import { LunaControl } from '../luna-control';
1
2
  import * as i0 from "@angular/core";
2
- export declare class FieldsetComponent {
3
+ export declare class FieldsetComponent extends LunaControl {
3
4
  legend?: string;
4
5
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetComponent, never>;
5
6
  static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "luna-fieldset", never, { "legend": { "alias": "legend"; "required": false; }; }, {}, never, ["*"], true, never>;
@@ -1,18 +1,31 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, ElementRef, OnDestroy, AfterViewInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y';
4
+ import { Platform } from '@angular/cdk/platform';
5
+ import { Dir } from '@angular/cdk/bidi';
6
+ import { Clipboard } from '@angular/cdk/clipboard';
7
+ import { LunaControl } from '../luna-control';
3
8
  import * as i0 from "@angular/core";
4
9
  export type InputType = 'text' | 'password' | 'email';
5
- export declare class InputComponent implements ControlValueAccessor {
6
- disabled: boolean;
7
- name?: string;
10
+ export declare class InputComponent extends LunaControl implements ControlValueAccessor, AfterViewInit, OnDestroy {
11
+ private elementRef;
12
+ private focusMonitor;
13
+ private liveAnnouncer;
14
+ platform: Platform;
15
+ dir: Dir;
16
+ private clipboard;
8
17
  placeholder?: string;
9
- type: InputType;
10
18
  readonly: boolean;
19
+ type: InputType;
11
20
  change: EventEmitter<string>;
12
21
  blur: EventEmitter<FocusEvent>;
13
22
  value: string;
14
23
  private onChange;
15
24
  private onTouched;
25
+ inputElement?: ElementRef<HTMLInputElement>;
26
+ constructor(elementRef: ElementRef<HTMLElement>, focusMonitor: FocusMonitor, liveAnnouncer: LiveAnnouncer, platform: Platform, dir: Dir, clipboard: Clipboard);
27
+ ngAfterViewInit(): void;
28
+ ngOnDestroy(): void;
16
29
  onInputChange(event: Event): void;
17
30
  onInputBlur(event: FocusEvent): void;
18
31
  writeValue(value: string): void;
@@ -20,5 +33,5 @@ export declare class InputComponent implements ControlValueAccessor {
20
33
  registerOnTouched(fn: () => void): void;
21
34
  setDisabledState(isDisabled: boolean): void;
22
35
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "luna-input", never, { "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "change": "change"; "blur": "blur"; }, never, never, true, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "luna-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "change": "change"; "blur": "blur"; }, never, never, true, never>;
24
37
  }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare abstract class LunaControl {
3
+ id?: string;
4
+ name?: string;
5
+ disabled: boolean;
6
+ tabindex?: number;
7
+ autofocus: boolean;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<LunaControl, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LunaControl, never, never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
@@ -1,7 +1,19 @@
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { NumberInput } from '@angular/cdk/coercion';
3
+ import { LiveAnnouncer } from '@angular/cdk/a11y';
4
+ import { LunaControl } from '../luna-control';
1
5
  import * as i0 from "@angular/core";
2
- export declare class ProgressComponent {
3
- value?: number;
4
- max: number;
6
+ export declare class ProgressComponent extends LunaControl implements OnChanges {
7
+ private liveAnnouncer;
8
+ set max(value: NumberInput);
9
+ get max(): number;
10
+ set value(value: NumberInput | undefined);
11
+ get value(): number | undefined;
12
+ private _max;
13
+ private _value?;
14
+ private _previousValue?;
15
+ constructor(liveAnnouncer: LiveAnnouncer);
16
+ ngOnChanges(changes: SimpleChanges): void;
5
17
  static ɵfac: i0.ɵɵFactoryDeclaration<ProgressComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<ProgressComponent, "luna-progress", never, { "value": { "alias": "value"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, {}, never, never, true, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProgressComponent, "luna-progress", never, { "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>;
7
19
  }