ng-luna 0.2.4 → 0.3.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/README.md +32 -8
- package/controls/index.d.ts +1 -0
- package/controls/tabs/tab.component.d.ts +8 -0
- package/controls/tabs/tabs.component.d.ts +7 -9
- package/fesm2022/ng-luna.mjs +57 -25
- package/fesm2022/ng-luna.mjs.map +1 -1
- package/package.json +1 -2
- package/theme/_fonts.scss +440 -11
package/README.md
CHANGED
|
@@ -39,17 +39,39 @@ import { ButtonComponent } from 'ng-luna';
|
|
|
39
39
|
|
|
40
40
|
### Using Bundled Fonts
|
|
41
41
|
|
|
42
|
-
The IBM Plex fonts are
|
|
42
|
+
The IBM Plex fonts are bundled with ng-luna and need to be copied to your application's assets folder.
|
|
43
43
|
|
|
44
|
-
|
|
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
|
|
44
|
+
#### Setup
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
Add the following to your `angular.json` in the `assets` array of your project's build configuration:
|
|
51
47
|
|
|
52
|
-
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"projects": {
|
|
51
|
+
"your-app-name": {
|
|
52
|
+
"architect": {
|
|
53
|
+
"build": {
|
|
54
|
+
"options": {
|
|
55
|
+
"assets": [
|
|
56
|
+
{
|
|
57
|
+
"glob": "**/*",
|
|
58
|
+
"input": "node_modules/ng-luna/assets/fonts",
|
|
59
|
+
"output": "/assets/fonts"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This copies the font files from the ng-luna package to your application's `/assets/fonts/` directory during build.
|
|
71
|
+
|
|
72
|
+
#### Using Fonts in Your Styles
|
|
73
|
+
|
|
74
|
+
Once configured, you can use the fonts directly in your CSS/SCSS:
|
|
53
75
|
|
|
54
76
|
```scss
|
|
55
77
|
.my-custom-class {
|
|
@@ -70,6 +92,8 @@ Since the fonts are already loaded, you can use them directly in your CSS/SCSS:
|
|
|
70
92
|
- `'IBM Plex Mono', monospace` - Monospace font
|
|
71
93
|
- `'IBM Plex Serif', serif` - Serif font
|
|
72
94
|
|
|
95
|
+
**Note:** The ng-luna components will automatically use these fonts once they are available in your assets folder.
|
|
96
|
+
|
|
73
97
|
## Components
|
|
74
98
|
|
|
75
99
|
All components extend the `LunaControl` base class, which provides the following common inputs available on every component:
|
package/controls/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './progress/progress.component';
|
|
|
6
6
|
export * from './radio/radio.component';
|
|
7
7
|
export * from './select/select.component';
|
|
8
8
|
export * from './slider/slider.component';
|
|
9
|
+
export * from './tabs/tab.component';
|
|
9
10
|
export * from './tabs/tabs.component';
|
|
10
11
|
export * from './textarea/textarea.component';
|
|
11
12
|
export * from './window/window.component';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TabComponent {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
active: boolean;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TabComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "luna-tab", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
8
|
+
}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import { EventEmitter, QueryList, ElementRef, AfterViewInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, QueryList, ElementRef, AfterViewInit, AfterContentInit } from '@angular/core';
|
|
2
2
|
import { Platform } from '@angular/cdk/platform';
|
|
3
3
|
import { LunaControl } from '../luna-control';
|
|
4
|
+
import { TabComponent } from './tab.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export
|
|
6
|
-
id: string;
|
|
7
|
-
label: string;
|
|
8
|
-
content?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class TabsComponent extends LunaControl implements AfterViewInit {
|
|
6
|
+
export declare class TabsComponent extends LunaControl implements AfterViewInit, AfterContentInit {
|
|
11
7
|
platform: Platform;
|
|
12
8
|
activeTabId?: string;
|
|
13
|
-
tabs: Tab[];
|
|
14
9
|
tabChange: EventEmitter<string>;
|
|
10
|
+
tabs: QueryList<TabComponent>;
|
|
15
11
|
tabButtons: QueryList<ElementRef<HTMLButtonElement>>;
|
|
16
12
|
private keyManager?;
|
|
17
13
|
constructor(platform: Platform);
|
|
14
|
+
ngAfterContentInit(): void;
|
|
18
15
|
ngAfterViewInit(): void;
|
|
19
16
|
selectTab(tabId: string): void;
|
|
20
17
|
isActive(tabId: string): boolean;
|
|
18
|
+
private updateActiveTab;
|
|
21
19
|
onKeyDown(event: KeyboardEvent): void;
|
|
22
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "luna-tabs", never, { "activeTabId": { "alias": "activeTabId"; "required": false; };
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "luna-tabs", never, { "activeTabId": { "alias": "activeTabId"; "required": false; }; }, { "tabChange": "tabChange"; }, ["tabs"], ["*"], true, never>;
|
|
24
22
|
}
|