@awc-ui/angular 0.0.0-snapshot.20260820120614.cae27aa
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 +21 -0
- package/README.md +41 -0
- package/awc-ui.module.d.ts +67 -0
- package/directives/angular-component-lib/utils.d.ts +9 -0
- package/directives/boolean-value-accessor.d.ts +9 -0
- package/directives/index.d.ts +2 -0
- package/directives/number-value-accessor.d.ts +9 -0
- package/directives/proxies.d.ts +2005 -0
- package/directives/radio-value-accessor.d.ts +8 -0
- package/directives/select-value-accessor.d.ts +8 -0
- package/directives/switch-value-accessor.d.ts +21 -0
- package/directives/text-value-accessor.d.ts +8 -0
- package/directives/value-accessor.d.ts +18 -0
- package/esm2022/awc-ui-angular.mjs +5 -0
- package/esm2022/awc-ui.module.mjs +101 -0
- package/esm2022/directives/angular-component-lib/utils.mjs +59 -0
- package/esm2022/directives/boolean-value-accessor.mjs +38 -0
- package/esm2022/directives/index.mjs +85 -0
- package/esm2022/directives/number-value-accessor.mjs +40 -0
- package/esm2022/directives/proxies.mjs +2132 -0
- package/esm2022/directives/radio-value-accessor.mjs +35 -0
- package/esm2022/directives/select-value-accessor.mjs +35 -0
- package/esm2022/directives/switch-value-accessor.mjs +50 -0
- package/esm2022/directives/text-value-accessor.mjs +35 -0
- package/esm2022/directives/value-accessor.mjs +40 -0
- package/esm2022/index.mjs +15 -0
- package/fesm2022/awc-ui-angular.mjs +2537 -0
- package/fesm2022/awc-ui-angular.mjs.map +1 -0
- package/index.d.ts +11 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AWC UI
|
|
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,41 @@
|
|
|
1
|
+
# @awc-ui/angular
|
|
2
|
+
|
|
3
|
+
Angular bindings for [AWC UI](https://www.npmjs.com/package/@awc-ui/core) — Material Design 3 web components, with directives that bridge Angular templates (including `ngModel` / reactive forms) to the underlying custom elements.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @awc-ui/angular @awc-ui/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Angular 17+.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// NgModule apps
|
|
17
|
+
import { AwcUiModule } from '@awc-ui/angular';
|
|
18
|
+
|
|
19
|
+
@NgModule({
|
|
20
|
+
imports: [AwcUiModule],
|
|
21
|
+
})
|
|
22
|
+
export class AppModule {}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
// Standalone apps
|
|
27
|
+
import { importProvidersFrom } from '@angular/core';
|
|
28
|
+
import { AwcUiModule, provideAwcUi } from '@awc-ui/angular';
|
|
29
|
+
|
|
30
|
+
bootstrapApplication(AppComponent, {
|
|
31
|
+
providers: [provideAwcUi(), importProvidersFrom(AwcUiModule)],
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<md-button variant="filled">Click me</md-button>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Documentation
|
|
40
|
+
|
|
41
|
+
Component docs, theming, and per-component manuals ship with [`@awc-ui/core`](https://www.npmjs.com/package/@awc-ui/core).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { TextValueAccessor } from './directives/text-value-accessor';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./directives/proxies";
|
|
5
|
+
import * as i2 from "./directives/text-value-accessor";
|
|
6
|
+
import * as i3 from "./directives/select-value-accessor";
|
|
7
|
+
import * as i4 from "./directives/boolean-value-accessor";
|
|
8
|
+
import * as i5 from "./directives/radio-value-accessor";
|
|
9
|
+
import * as i6 from "./directives/number-value-accessor";
|
|
10
|
+
import * as i7 from "./directives/switch-value-accessor";
|
|
11
|
+
import * as i8 from "@angular/common";
|
|
12
|
+
/**
|
|
13
|
+
* ControlValueAccessor directives, so `[(ngModel)]` and `formControlName` bind
|
|
14
|
+
* to AWC UI inputs. Declared here rather than in `DIRECTIVES` because that
|
|
15
|
+
* array is GENERATED by the Stencil output target on every build and would
|
|
16
|
+
* discard anything added to it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const VALUE_ACCESSORS: (typeof TextValueAccessor)[];
|
|
19
|
+
/**
|
|
20
|
+
* Registers the AWC UI custom elements (the Stencil lazy loader) during
|
|
21
|
+
* application bootstrap. Add it to your root providers instead of calling
|
|
22
|
+
* `defineCustomElements()` manually:
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // NgModule app
|
|
26
|
+
* @NgModule({
|
|
27
|
+
* imports: [AwcUiModule],
|
|
28
|
+
* providers: [provideAwcUi()],
|
|
29
|
+
* })
|
|
30
|
+
* export class AppModule {}
|
|
31
|
+
*
|
|
32
|
+
* // Standalone app
|
|
33
|
+
* bootstrapApplication(AppComponent, {
|
|
34
|
+
* providers: [provideAwcUi(), importProvidersFrom(AwcUiModule)],
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* SSR-safe: it is a no-op when `window` is not available.
|
|
38
|
+
*/
|
|
39
|
+
export declare function provideAwcUi(): Provider;
|
|
40
|
+
/**
|
|
41
|
+
* AwcUiModule
|
|
42
|
+
*
|
|
43
|
+
* Import this module in your Angular application to use all AWC UI
|
|
44
|
+
* component proxies (typed inputs, outputs and methods).
|
|
45
|
+
*
|
|
46
|
+
* The underlying custom elements must be registered once. Either add
|
|
47
|
+
* `provideAwcUi()` to your root providers (recommended, see above), or
|
|
48
|
+
* call `defineCustomElements()` from `@awc-ui/core/loader` in `main.ts`:
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // main.ts
|
|
52
|
+
* import { defineCustomElements } from '@awc-ui/core/loader';
|
|
53
|
+
* defineCustomElements(window);
|
|
54
|
+
*
|
|
55
|
+
* // app.module.ts (or standalone component)
|
|
56
|
+
* import { AwcUiModule } from '@awc-ui/angular';
|
|
57
|
+
*
|
|
58
|
+
* @NgModule({
|
|
59
|
+
* imports: [AwcUiModule, ...],
|
|
60
|
+
* })
|
|
61
|
+
* export class AppModule {}
|
|
62
|
+
*/
|
|
63
|
+
export declare class AwcUiModule {
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AwcUiModule, never>;
|
|
65
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AwcUiModule, [typeof i1.MdAccordion, typeof i1.MdAccordionItem, typeof i1.MdAppBar, typeof i1.MdAreaChart, typeof i1.MdAutocomplete, typeof i1.MdAvatar, typeof i1.MdBadge, typeof i1.MdBarChart, typeof i1.MdBottomSheet, typeof i1.MdBreadcrumbItem, typeof i1.MdBreadcrumbs, typeof i1.MdButton, typeof i1.MdButtonGroup, typeof i1.MdCard, typeof i1.MdCheckbox, typeof i1.MdChip, typeof i1.MdColorPicker, typeof i1.MdDatePicker, typeof i1.MdDialog, typeof i1.MdDivider, typeof i1.MdFab, typeof i1.MdFabMenu, typeof i1.MdFabMenuItem, typeof i1.MdIconButton, typeof i1.MdLineChart, typeof i1.MdList, typeof i1.MdListItem, typeof i1.MdLoadingIndicator, typeof i1.MdMenu, typeof i1.MdMenuItem, typeof i1.MdMenuItemGroup, typeof i1.MdMeter, typeof i1.MdMultiSelect, typeof i1.MdNavigationBar, typeof i1.MdNavigationRail, typeof i1.MdNavigationRailTab, typeof i1.MdNavigationTab, typeof i1.MdNumberField, typeof i1.MdOrganizationChart, typeof i1.MdOtpField, typeof i1.MdPieChart, typeof i1.MdProgressIndicator, typeof i1.MdRadio, typeof i1.MdRating, typeof i1.MdRipple, typeof i1.MdSearch, typeof i1.MdSegmentedButton, typeof i1.MdSegmentedButtonSet, typeof i1.MdSelect, typeof i1.MdSelectOption, typeof i1.MdSideSheet, typeof i1.MdSkeleton, typeof i1.MdSlider, typeof i1.MdSnackbar, typeof i1.MdSparkline, typeof i1.MdSplitButton, typeof i1.MdStatusDot, typeof i1.MdStep, typeof i1.MdStepper, typeof i1.MdSubMenuItem, typeof i1.MdSwitch, typeof i1.MdTab, typeof i1.MdTabPanel, typeof i1.MdTabPanels, typeof i1.MdTable, typeof i1.MdTableBody, typeof i1.MdTableCell, typeof i1.MdTableContainer, typeof i1.MdTableExpandToggle, typeof i1.MdTableFoot, typeof i1.MdTableHead, typeof i1.MdTablePagination, typeof i1.MdTableRow, typeof i1.MdTableSortLabel, typeof i1.MdTableToolbar, typeof i1.MdTabs, typeof i1.MdTextField, typeof i1.MdTimePicker, typeof i1.MdToolbar, typeof i1.MdTooltip, typeof i1.MdTransferList, typeof i2.TextValueAccessor, typeof i3.SelectValueAccessor, typeof i4.BooleanValueAccessor, typeof i5.RadioValueAccessor, typeof i6.NumericValueAccessor, typeof i7.SwitchValueAccessor], [typeof i8.CommonModule], [typeof i1.MdAccordion, typeof i1.MdAccordionItem, typeof i1.MdAppBar, typeof i1.MdAreaChart, typeof i1.MdAutocomplete, typeof i1.MdAvatar, typeof i1.MdBadge, typeof i1.MdBarChart, typeof i1.MdBottomSheet, typeof i1.MdBreadcrumbItem, typeof i1.MdBreadcrumbs, typeof i1.MdButton, typeof i1.MdButtonGroup, typeof i1.MdCard, typeof i1.MdCheckbox, typeof i1.MdChip, typeof i1.MdColorPicker, typeof i1.MdDatePicker, typeof i1.MdDialog, typeof i1.MdDivider, typeof i1.MdFab, typeof i1.MdFabMenu, typeof i1.MdFabMenuItem, typeof i1.MdIconButton, typeof i1.MdLineChart, typeof i1.MdList, typeof i1.MdListItem, typeof i1.MdLoadingIndicator, typeof i1.MdMenu, typeof i1.MdMenuItem, typeof i1.MdMenuItemGroup, typeof i1.MdMeter, typeof i1.MdMultiSelect, typeof i1.MdNavigationBar, typeof i1.MdNavigationRail, typeof i1.MdNavigationRailTab, typeof i1.MdNavigationTab, typeof i1.MdNumberField, typeof i1.MdOrganizationChart, typeof i1.MdOtpField, typeof i1.MdPieChart, typeof i1.MdProgressIndicator, typeof i1.MdRadio, typeof i1.MdRating, typeof i1.MdRipple, typeof i1.MdSearch, typeof i1.MdSegmentedButton, typeof i1.MdSegmentedButtonSet, typeof i1.MdSelect, typeof i1.MdSelectOption, typeof i1.MdSideSheet, typeof i1.MdSkeleton, typeof i1.MdSlider, typeof i1.MdSnackbar, typeof i1.MdSparkline, typeof i1.MdSplitButton, typeof i1.MdStatusDot, typeof i1.MdStep, typeof i1.MdStepper, typeof i1.MdSubMenuItem, typeof i1.MdSwitch, typeof i1.MdTab, typeof i1.MdTabPanel, typeof i1.MdTabPanels, typeof i1.MdTable, typeof i1.MdTableBody, typeof i1.MdTableCell, typeof i1.MdTableContainer, typeof i1.MdTableExpandToggle, typeof i1.MdTableFoot, typeof i1.MdTableHead, typeof i1.MdTablePagination, typeof i1.MdTableRow, typeof i1.MdTableSortLabel, typeof i1.MdTableToolbar, typeof i1.MdTabs, typeof i1.MdTextField, typeof i1.MdTimePicker, typeof i1.MdToolbar, typeof i1.MdTooltip, typeof i1.MdTransferList, typeof i2.TextValueAccessor, typeof i3.SelectValueAccessor, typeof i4.BooleanValueAccessor, typeof i5.RadioValueAccessor, typeof i6.NumericValueAccessor, typeof i7.SwitchValueAccessor]>;
|
|
66
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AwcUiModule>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const proxyInputs: (Cmp: any, inputs: string[]) => void;
|
|
2
|
+
export declare const proxyMethods: (Cmp: any, methods: string[]) => void;
|
|
3
|
+
export declare const proxyOutputs: (instance: any, el: any, events: string[]) => void;
|
|
4
|
+
export declare const defineCustomElement: (tagName: string, customElement: any) => void;
|
|
5
|
+
export declare function ProxyCmp(opts: {
|
|
6
|
+
defineCustomElementFn?: () => void;
|
|
7
|
+
inputs?: any;
|
|
8
|
+
methods?: any;
|
|
9
|
+
}): (cls: any) => any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ValueAccessor } from './value-accessor';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class BooleanValueAccessor extends ValueAccessor {
|
|
5
|
+
constructor(el: ElementRef);
|
|
6
|
+
writeValue(value: any): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanValueAccessor, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BooleanValueAccessor, "md-checkbox", never, {}, {}, never, never, false, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as d from './proxies';
|
|
2
|
+
export declare const DIRECTIVES: (typeof d.MdAccordion | typeof d.MdAccordionItem | typeof d.MdAppBar | typeof d.MdAreaChart | typeof d.MdAutocomplete | typeof d.MdAvatar | typeof d.MdBadge | typeof d.MdBarChart | typeof d.MdBottomSheet | typeof d.MdBreadcrumbItem | typeof d.MdBreadcrumbs | typeof d.MdButton | typeof d.MdButtonGroup | typeof d.MdCard | typeof d.MdCheckbox | typeof d.MdChip | typeof d.MdColorPicker | typeof d.MdDatePicker | typeof d.MdDialog | typeof d.MdDivider | typeof d.MdFab | typeof d.MdFabMenu | typeof d.MdFabMenuItem | typeof d.MdIconButton | typeof d.MdLineChart | typeof d.MdList | typeof d.MdListItem | typeof d.MdLoadingIndicator | typeof d.MdMenu | typeof d.MdMenuItem | typeof d.MdMenuItemGroup | typeof d.MdMeter | typeof d.MdMultiSelect | typeof d.MdNavigationBar | typeof d.MdNavigationRail | typeof d.MdNavigationRailTab | typeof d.MdNavigationTab | typeof d.MdNumberField | typeof d.MdOrganizationChart | typeof d.MdOtpField | typeof d.MdPieChart | typeof d.MdProgressIndicator | typeof d.MdRadio | typeof d.MdRating | typeof d.MdRipple | typeof d.MdSearch | typeof d.MdSegmentedButton | typeof d.MdSegmentedButtonSet | typeof d.MdSelect | typeof d.MdSelectOption | typeof d.MdSideSheet | typeof d.MdSkeleton | typeof d.MdSlider | typeof d.MdSnackbar | typeof d.MdSparkline | typeof d.MdSplitButton | typeof d.MdStatusDot | typeof d.MdStep | typeof d.MdStepper | typeof d.MdSubMenuItem | typeof d.MdSwitch | typeof d.MdTab | typeof d.MdTabPanel | typeof d.MdTabPanels | typeof d.MdTable | typeof d.MdTableBody | typeof d.MdTableCell | typeof d.MdTableContainer | typeof d.MdTableExpandToggle | typeof d.MdTableFoot | typeof d.MdTableHead | typeof d.MdTablePagination | typeof d.MdTableRow | typeof d.MdTableSortLabel | typeof d.MdTableToolbar | typeof d.MdTabs | typeof d.MdTextField | typeof d.MdTimePicker | typeof d.MdToolbar | typeof d.MdTooltip | typeof d.MdTransferList)[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ValueAccessor } from './value-accessor';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NumericValueAccessor extends ValueAccessor {
|
|
5
|
+
constructor(el: ElementRef);
|
|
6
|
+
registerOnChange(fn: (_: number | null) => void): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NumericValueAccessor, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NumericValueAccessor, "md-rating, md-slider, md-number-field", never, {}, {}, never, never, false, never>;
|
|
9
|
+
}
|