@dnd-mapp/shared-ui 1.0.0 → 1.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/README.md +41 -73
- package/assets/images/404.png +0 -0
- package/assets/images/apple-touch-icon.png +0 -0
- package/assets/images/favicon-16.png +0 -0
- package/assets/images/favicon-32.png +0 -0
- package/assets/images/favicon-512.png +0 -0
- package/assets/images/favicon.ico +0 -0
- package/assets/styles/main.css +6 -0
- package/fesm2022/dnd-mapp-shared-ui.mjs +371 -13
- package/fesm2022/dnd-mapp-shared-ui.mjs.map +1 -1
- package/package.json +22 -16
- package/src/lib/button/README.md +65 -51
- package/src/lib/dropdown/README.md +127 -0
- package/src/lib/forms/input/README.md +105 -0
- package/src/lib/nav/active-marker/README.md +102 -0
- package/src/lib/nav/app-top-bar/README.md +113 -0
- package/src/lib/nav/navbar/README.md +98 -0
- package/src/lib/nav/navbar-brand/README.md +77 -0
- package/src/lib/nav/navbar-link/README.md +65 -0
- package/src/lib/nav/navbar-menu/README.md +125 -0
- package/src/lib/vertical-rule/README.md +97 -0
- package/types/dnd-mapp-shared-ui.d.ts +139 -8
package/README.md
CHANGED
|
@@ -4,116 +4,84 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
The official Angular component library for the **D&D Mapp** platform. This library provides a unified design language and
|
|
7
|
+
The official Angular component library for the **D&D Mapp** platform. This library provides a unified design language and high-performance, accessible UI components built specifically for tabletop gaming applications.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **Angular 21 Native**: Built with the latest signals-based patterns and standalone components.
|
|
12
|
-
- **Tailwind CSS v4**: CSS-first configuration for high-performance styling.
|
|
13
|
-
- **Accessible**: Built with A11y best practices to ensure all players can use the tools.
|
|
14
|
-
- **Design Driven**: Single source of truth for the D&D Mapp brand.
|
|
9
|
+
🏰 **[Explore the Live Storybook](https://dnd-mapp.github.io/shared-ui/)**
|
|
15
10
|
|
|
16
11
|
---
|
|
17
12
|
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
A collection of high-performance, accessible components. Click on a component name to view its specific documentation, API, and usage examples.
|
|
13
|
+
## ✨ Key Features
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
> **[!TIP]** ✅ Ready for Production | 🚧 In Development | 🧪 Experimental
|
|
15
|
+
- **Modern Architecture**: Built with **Angular 21** using signals and standalone components.
|
|
16
|
+
- **Next-Gen Styling**: Powered by **Tailwind CSS v4** with a CSS-first configuration.
|
|
17
|
+
- **Layout Integrity**: Specialized components like `Active Marker` prevent Layout Shifts (CLS) during state toggles.
|
|
18
|
+
- **Accessible & Consistent**: A11y-focused components that serve as the single source of truth for the D&D Mapp brand.
|
|
27
19
|
|
|
28
20
|
---
|
|
29
21
|
|
|
30
|
-
## 🚀
|
|
22
|
+
## 🚀 Getting Started
|
|
23
|
+
|
|
24
|
+
### 1. Installation
|
|
31
25
|
|
|
32
|
-
Install the package via
|
|
26
|
+
Install the package via your preferred package manager:
|
|
33
27
|
|
|
34
28
|
```bash
|
|
35
29
|
pnpm add @dnd-mapp/shared-ui
|
|
36
30
|
```
|
|
37
31
|
|
|
38
|
-
###
|
|
32
|
+
### 2. Global Styles
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
Import the library's Tailwind-based styles into your application's global CSS file (e.g., `styles.css`):
|
|
41
35
|
|
|
42
36
|
```css
|
|
43
|
-
@import "@dnd-mapp/shared-ui/styles.css";
|
|
37
|
+
@import "@dnd-mapp/shared-ui/assets/styles/main.css";
|
|
44
38
|
```
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Since this library uses **Tailwind CSS v4**, ensure your application is configured to process Tailwind imports. If you are using the Angular CLI with Tailwind support, no additional configuration is typically required beyond the import.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## 📖 Usage
|
|
40
|
+
> [!NOTE]
|
|
41
|
+
> Ensure your build pipeline is configured to process Tailwind CSS v4 imports.
|
|
53
42
|
|
|
54
|
-
|
|
43
|
+
### 3. Usage
|
|
55
44
|
|
|
56
|
-
|
|
45
|
+
All components are **Standalone**. Import them directly into your component's `imports` array:
|
|
57
46
|
|
|
58
47
|
```typescript
|
|
59
|
-
import {
|
|
60
|
-
import { ButtonComponent } from '@dnd-mapp/shared-ui';
|
|
48
|
+
import { Component } from '@angular/core';
|
|
49
|
+
import { ButtonComponent } from '@dnd-mapp/shared-ui';
|
|
61
50
|
|
|
62
51
|
@Component({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<section>
|
|
66
|
-
<h1>Encounter Initiative</h1>
|
|
67
|
-
<button dma-button (click)="onRoll()">Roll for Initiative</button>
|
|
68
|
-
</section>
|
|
69
|
-
`,
|
|
70
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
52
|
+
selector: 'app-root',
|
|
53
|
+
template: `<button type="button" dma-button="primary">Roll Initiative</button>`,
|
|
71
54
|
imports: [ButtonComponent],
|
|
72
55
|
})
|
|
73
|
-
export class RootComponent {
|
|
74
|
-
protected onRoll() {
|
|
75
|
-
console.log('Natural 20!');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
56
|
+
export class RootComponent {}
|
|
78
57
|
```
|
|
79
58
|
|
|
80
59
|
---
|
|
81
60
|
|
|
82
|
-
##
|
|
83
|
-
|
|
84
|
-
If you are contributing to the library or want to explore the components in isolation:
|
|
85
|
-
|
|
86
|
-
1. **Clone the repo**:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
git clone https://github.com/dnd-mapp/shared-ui.git
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
2. **Setup environment**:
|
|
93
|
-
|
|
94
|
-
This project uses [mise-en-place](https://mise.jdx.dev/) to manage Node.js and pnpm versions.
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
mise install
|
|
98
|
-
pnpm install
|
|
99
|
-
```
|
|
61
|
+
## 🧱 Component Library
|
|
100
62
|
|
|
101
|
-
|
|
63
|
+
For detailed API definitions and interactive examples, visit our **[Storybook](https://dnd-mapp.github.io/shared-ui/)** or view the documentation for the specific components below:
|
|
102
64
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
65
|
+
| Component | Status | Description |
|
|
66
|
+
|----------------------------------------------------------|--------|--------------------------------------------------------------|
|
|
67
|
+
| **[Active Marker](src/lib/nav/active-marker/README.md)** | ✅ | Prevents CLS by reserving space for bold text states. |
|
|
68
|
+
| **[App Top Bar](src/lib/nav/app-top-bar/README.md)** | ✅ | Layout-oriented header with `start` and `end` sections. |
|
|
69
|
+
| **[Button](src/lib/button/README.md)** | ✅ | Actions with support for base and primary variants. |
|
|
70
|
+
| **[Dropdown](src/lib/dropdown/README.md)** | ✅ | Directive-based overlay system using Angular CDK. |
|
|
71
|
+
| **[Navbar](src/lib/nav/navbar/README.md)** | ✅ | Semantic `<nav>` container with standardized flex spacing. |
|
|
72
|
+
| **[Navbar Brand](src/lib/nav/navbar-brand/README.md)** | ✅ | A standardized header element for logo and brand identity. |
|
|
73
|
+
| **[Navbar Link](src/lib/nav/navbar-link/README.md)** | ✅ | Navigation link with automatic active state and layout lock. |
|
|
74
|
+
| **[Navbar Menu](src/lib/nav/navbar-menu/README.md)** | ✅ | Specialized dropdown trigger for navigation bars. |
|
|
75
|
+
| **[Vertical Rule](src/lib/vertical-rule/README.md)** | ✅ | A layout-stretching divider for content separation. |
|
|
106
76
|
|
|
107
|
-
|
|
77
|
+
> **Legend:**
|
|
78
|
+
> ✅ Production Ready | 🚧 In Development | 🧪 Experimental
|
|
108
79
|
|
|
109
80
|
---
|
|
110
81
|
|
|
111
|
-
##
|
|
82
|
+
## 🛠 Development
|
|
112
83
|
|
|
113
|
-
|
|
114
|
-
- `pnpm test`: Runs unit tests via Karma.
|
|
115
|
-
- `pnpm lint`: Validates TypeScript and Angular logic.
|
|
116
|
-
- `pnpm stylelint`: Validates CSS/Tailwind compliance.
|
|
84
|
+
If you are contributing or wish to run the documentation locally, please refer to the [Main Repository README](https://github.com/dnd-mapp/shared-ui/blob/main/README.md) for environment setup and contribution guidelines.
|
|
117
85
|
|
|
118
86
|
---
|
|
119
87
|
|
|
@@ -121,4 +89,4 @@ If you are contributing to the library or want to explore the components in isol
|
|
|
121
89
|
|
|
122
90
|
Copyright © 2026 NoNamer777. All rights reserved.
|
|
123
91
|
|
|
124
|
-
|
|
92
|
+
Proprietary software. Unauthorized copying or distribution is strictly prohibited. See the [LICENSE](https://github.com/dnd-mapp/shared-ui?tab=License-1-ov-file) for full terms.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component } from '@angular/core';
|
|
2
|
+
import { input, computed, Component, inject, ElementRef, ViewContainerRef, DestroyRef, booleanAttribute, output, Directive, ChangeDetectionStrategy, model } from '@angular/core';
|
|
3
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { Subject, debounceTime, filter, from } from 'rxjs';
|
|
7
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
+
import { RouterLink, Router, isActive } from '@angular/router';
|
|
3
9
|
|
|
4
10
|
const ButtonColors = {
|
|
5
11
|
PRIMARY: 'primary',
|
|
6
12
|
BASE: 'base',
|
|
13
|
+
DANGER: 'danger',
|
|
7
14
|
};
|
|
8
15
|
const DEFAULT_BUTTON_COLOR = ButtonColors.BASE;
|
|
9
16
|
function buttonColorAttribute(value) {
|
|
@@ -14,29 +21,380 @@ class ButtonComponent {
|
|
|
14
21
|
color = input(DEFAULT_BUTTON_COLOR, { ...(ngDevMode ? { debugName: "color" } : {}), transform: buttonColorAttribute, alias: 'dma-button' });
|
|
15
22
|
isBase = computed(() => this.color() === ButtonColors.BASE, ...(ngDevMode ? [{ debugName: "isBase" }] : []));
|
|
16
23
|
isPrimary = computed(() => this.color() === ButtonColors.PRIMARY, ...(ngDevMode ? [{ debugName: "isPrimary" }] : []));
|
|
17
|
-
|
|
18
|
-
static
|
|
24
|
+
isDanger = computed(() => this.color() === ButtonColors.DANGER, ...(ngDevMode ? [{ debugName: "isDanger" }] : []));
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ButtonComponent, isStandalone: true, selector: "button[dma-button]", inputs: { color: { classPropertyName: "color", publicName: "dma-button", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.text-neutral-900": "isBase()", "class.bg-neutral-100": "isBase()", "class.hover:bg-neutral-200": "isBase()", "class.active:bg-neutral-300": "isBase()", "class.text-neutral-100": "isPrimary()", "class.bg-blue-400": "isPrimary()", "class.hover:bg-blue-500": "isPrimary()", "class.active:bg-blue-600": "isPrimary()", "class.text-red-600": "isDanger()", "class.hover:bg-red-50": "isDanger()", "class.active:bg-red-100": "isDanger()" }, classAttribute: "font-semibold cursor-pointer py-2 px-4 rounded-md" }, ngImport: i0, template: "<div class=\"flex gap-2 items-center justify-center\">\n <ng-content select=\"dma-leading-icon\" />\n <ng-content />\n</div>\n" });
|
|
19
27
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
21
29
|
type: Component,
|
|
22
|
-
args: [{
|
|
23
|
-
|
|
24
|
-
selector: 'button[dma-button]',
|
|
25
|
-
template: `<ng-content />`,
|
|
26
|
-
host: {
|
|
27
|
-
'[class]': `'font-semibold cursor-pointer py-2 px-4 rounded-md'`,
|
|
30
|
+
args: [{ selector: 'button[dma-button]', host: {
|
|
31
|
+
'class': 'font-semibold cursor-pointer py-2 px-4 rounded-md',
|
|
28
32
|
'[class.text-neutral-900]': 'isBase()',
|
|
29
|
-
'[class.text-neutral-100]': 'isPrimary()',
|
|
30
33
|
'[class.bg-neutral-100]': 'isBase()',
|
|
31
34
|
'[class.hover:bg-neutral-200]': 'isBase()',
|
|
32
35
|
'[class.active:bg-neutral-300]': 'isBase()',
|
|
36
|
+
'[class.text-neutral-100]': 'isPrimary()',
|
|
33
37
|
'[class.bg-blue-400]': 'isPrimary()',
|
|
34
38
|
'[class.hover:bg-blue-500]': 'isPrimary()',
|
|
35
39
|
'[class.active:bg-blue-600]': 'isPrimary()',
|
|
40
|
+
'[class.text-red-600]': 'isDanger()',
|
|
41
|
+
'[class.hover:bg-red-50]': 'isDanger()',
|
|
42
|
+
'[class.active:bg-red-100]': 'isDanger()',
|
|
43
|
+
}, imports: [], template: "<div class=\"flex gap-2 items-center justify-center\">\n <ng-content select=\"dma-leading-icon\" />\n <ng-content />\n</div>\n" }]
|
|
44
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "dma-button", required: false }] }] } });
|
|
45
|
+
|
|
46
|
+
const DEFAULT_DROPDOWN_POSITIONS = [
|
|
47
|
+
{
|
|
48
|
+
originX: 'start',
|
|
49
|
+
originY: 'bottom',
|
|
50
|
+
overlayX: 'start',
|
|
51
|
+
overlayY: 'top',
|
|
52
|
+
offsetY: 4,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
originX: 'start',
|
|
56
|
+
originY: 'top',
|
|
57
|
+
overlayX: 'end',
|
|
58
|
+
overlayY: 'bottom',
|
|
59
|
+
offsetY: -4,
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
class DropdownAnchorDirective {
|
|
64
|
+
overlay = inject(Overlay);
|
|
65
|
+
elementRef = inject(ElementRef);
|
|
66
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
67
|
+
destroyRef = inject(DestroyRef);
|
|
68
|
+
dropdownContainerTemplateRef = input.required({ ...(ngDevMode ? { debugName: "dropdownContainerTemplateRef" } : {}), alias: 'dmaDropdownAnchor' });
|
|
69
|
+
positions = input(DEFAULT_DROPDOWN_POSITIONS, ...(ngDevMode ? [{ debugName: "positions" }] : []));
|
|
70
|
+
toggleOnHover = input(false, { ...(ngDevMode ? { debugName: "toggleOnHover" } : {}), transform: booleanAttribute });
|
|
71
|
+
dropdownToggle = output();
|
|
72
|
+
hideScheduler = new Subject();
|
|
73
|
+
overlayRef = null;
|
|
74
|
+
constructor() {
|
|
75
|
+
this.hideScheduler
|
|
76
|
+
.asObservable()
|
|
77
|
+
.pipe(debounceTime(100), filter(Boolean), takeUntilDestroyed())
|
|
78
|
+
.subscribe({
|
|
79
|
+
next: () => {
|
|
80
|
+
if (!this.toggleOnHover())
|
|
81
|
+
return;
|
|
82
|
+
this.hide();
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
show() {
|
|
87
|
+
this.hideScheduler.next(false);
|
|
88
|
+
if (this.overlayRef)
|
|
89
|
+
return;
|
|
90
|
+
const positionStrategy = this.overlay
|
|
91
|
+
.position()
|
|
92
|
+
.flexibleConnectedTo(this.elementRef)
|
|
93
|
+
.withPositions(this.positions());
|
|
94
|
+
this.overlayRef = this.overlay.create({
|
|
95
|
+
positionStrategy: positionStrategy,
|
|
96
|
+
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
97
|
+
disposeOnNavigation: true,
|
|
98
|
+
width: getComputedStyle(this.elementRef.nativeElement).width,
|
|
99
|
+
});
|
|
100
|
+
this.overlayRef.attach(new TemplatePortal(this.dropdownContainerTemplateRef(), this.viewContainerRef));
|
|
101
|
+
this.overlayRef
|
|
102
|
+
.detachments()
|
|
103
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
104
|
+
.subscribe({
|
|
105
|
+
next: () => this.hide(),
|
|
106
|
+
});
|
|
107
|
+
this.dropdownToggle.emit(true);
|
|
108
|
+
}
|
|
109
|
+
scheduleHide(shouldHide) {
|
|
110
|
+
this.hideScheduler.next(shouldHide);
|
|
111
|
+
}
|
|
112
|
+
onClick() {
|
|
113
|
+
if (this.toggleOnHover())
|
|
114
|
+
return;
|
|
115
|
+
this.toggle();
|
|
116
|
+
}
|
|
117
|
+
onMouseenter() {
|
|
118
|
+
if (!this.toggleOnHover())
|
|
119
|
+
return;
|
|
120
|
+
this.show();
|
|
121
|
+
}
|
|
122
|
+
onMouseleave() {
|
|
123
|
+
if (!this.toggleOnHover())
|
|
124
|
+
return;
|
|
125
|
+
this.hideScheduler.next(true);
|
|
126
|
+
}
|
|
127
|
+
toggle() {
|
|
128
|
+
if (this.overlayRef)
|
|
129
|
+
this.hide();
|
|
130
|
+
else
|
|
131
|
+
this.show();
|
|
132
|
+
}
|
|
133
|
+
hide() {
|
|
134
|
+
if (this.overlayRef === null)
|
|
135
|
+
return;
|
|
136
|
+
this.overlayRef.dispose();
|
|
137
|
+
this.overlayRef = null;
|
|
138
|
+
this.dropdownToggle.emit(false);
|
|
139
|
+
}
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DropdownAnchorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
141
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: DropdownAnchorDirective, isStandalone: true, selector: "[dmaDropdownAnchor]", inputs: { dropdownContainerTemplateRef: { classPropertyName: "dropdownContainerTemplateRef", publicName: "dmaDropdownAnchor", isSignal: true, isRequired: true, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null }, toggleOnHover: { classPropertyName: "toggleOnHover", publicName: "toggleOnHover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropdownToggle: "dropdownToggle" }, host: { listeners: { "click": "onClick()", "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" } }, exportAs: ["dmaDropdownAnchor"], ngImport: i0 });
|
|
142
|
+
}
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DropdownAnchorDirective, decorators: [{
|
|
144
|
+
type: Directive,
|
|
145
|
+
args: [{
|
|
146
|
+
selector: '[dmaDropdownAnchor]',
|
|
147
|
+
exportAs: 'dmaDropdownAnchor',
|
|
148
|
+
host: {
|
|
149
|
+
'(click)': 'onClick()',
|
|
150
|
+
'(mouseenter)': 'onMouseenter()',
|
|
151
|
+
'(mouseleave)': 'onMouseleave()',
|
|
152
|
+
},
|
|
153
|
+
}]
|
|
154
|
+
}], ctorParameters: () => [], propDecorators: { dropdownContainerTemplateRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "dmaDropdownAnchor", required: true }] }], positions: [{ type: i0.Input, args: [{ isSignal: true, alias: "positions", required: false }] }], toggleOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleOnHover", required: false }] }], dropdownToggle: [{ type: i0.Output, args: ["dropdownToggle"] }] } });
|
|
155
|
+
|
|
156
|
+
class DropdownContainerComponent {
|
|
157
|
+
hover = output();
|
|
158
|
+
onMouseenter() {
|
|
159
|
+
this.hover.emit(true);
|
|
160
|
+
}
|
|
161
|
+
onMouseleave() {
|
|
162
|
+
this.hover.emit(false);
|
|
163
|
+
}
|
|
164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DropdownContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
165
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: DropdownContainerComponent, isStandalone: true, selector: "dma-dropdown-container", outputs: { hover: "hover" }, host: { listeners: { "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" }, classAttribute: "block w-full shadow-md border border-neutral-200 rounded-md bg-neutral-50 p-1" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
166
|
+
}
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DropdownContainerComponent, decorators: [{
|
|
168
|
+
type: Component,
|
|
169
|
+
args: [{
|
|
170
|
+
selector: 'dma-dropdown-container',
|
|
171
|
+
template: `<ng-content />`,
|
|
172
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
173
|
+
host: {
|
|
174
|
+
'class': 'block w-full shadow-md border border-neutral-200 rounded-md bg-neutral-50 p-1',
|
|
175
|
+
'(mouseenter)': 'onMouseenter()',
|
|
176
|
+
'(mouseleave)': 'onMouseleave()',
|
|
177
|
+
},
|
|
178
|
+
}]
|
|
179
|
+
}], propDecorators: { hover: [{ type: i0.Output, args: ["hover"] }] } });
|
|
180
|
+
|
|
181
|
+
function provideValueAccessor(component) {
|
|
182
|
+
return {
|
|
183
|
+
provide: NG_VALUE_ACCESSOR,
|
|
184
|
+
useExisting: component,
|
|
185
|
+
multi: true,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
class InputComponent {
|
|
190
|
+
inputId = input.required(...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
191
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
192
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
193
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
194
|
+
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
195
|
+
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
196
|
+
inputSubject = new Subject();
|
|
197
|
+
ngOnTouched;
|
|
198
|
+
ngOnChange;
|
|
199
|
+
constructor() {
|
|
200
|
+
this.inputSubject
|
|
201
|
+
.asObservable()
|
|
202
|
+
.pipe(debounceTime(500), takeUntilDestroyed())
|
|
203
|
+
.subscribe({
|
|
204
|
+
next: (value) => this.onChange(value),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
writeValue(value) {
|
|
208
|
+
this.value.set(value);
|
|
209
|
+
}
|
|
210
|
+
registerOnChange(fn) {
|
|
211
|
+
this.ngOnChange = fn;
|
|
212
|
+
}
|
|
213
|
+
registerOnTouched(fn) {
|
|
214
|
+
this.ngOnTouched = fn;
|
|
215
|
+
}
|
|
216
|
+
setDisabledState(isDisabled) {
|
|
217
|
+
this.disabled.set(isDisabled);
|
|
218
|
+
}
|
|
219
|
+
onInput(value) {
|
|
220
|
+
this.inputSubject.next(value);
|
|
221
|
+
}
|
|
222
|
+
onFocus() {
|
|
223
|
+
if (!this.ngOnTouched)
|
|
224
|
+
return;
|
|
225
|
+
this.ngOnTouched();
|
|
226
|
+
}
|
|
227
|
+
onChange(value) {
|
|
228
|
+
this.value.set(value);
|
|
229
|
+
if (this.ngOnChange) {
|
|
230
|
+
this.ngOnChange(value);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
234
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: InputComponent, isStandalone: true, selector: "dma-input", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange" }, host: { classAttribute: "group" }, providers: [provideValueAccessor(InputComponent)], ngImport: i0, template: "<label class=\"inline-block text-sm text-neutral-900 font-semibold mb-2\" [for]=\"inputId()\">{{ label() }}</label>\n<input\n class=\"block w-full disabled:opacity-35 border text-neutral-900 group-[.ng-invalid.ng-touched]:text-red-500 border-neutral-300 not-disabled:not-group-[.ng-invalid.ng-touched]:not-group-[.ng-valid.ng-touched]:hover:border-neutral-500 disabled:bg-neutral-300 group-[.ng-invalid.ng-touched]:border-red-500 group-[.ng-valid.ng-touched]:border-green-500 rounded-xl py-2 px-4 not-group-[.ng-invalid.ng-touched]:not-group-[.ng-valid.ng-touched]:focus:outline-blue-400 read-only:outline-0 group-[.ng-invalid.ng-touched]:outline-red-500 group-[.ng-valid.ng-touched]:outline-green-500 disabled:cursor-default read-only:cursor-default\"\n type=\"text\"\n #input\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput(input.value)\"\n/>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: InputComponent, decorators: [{
|
|
237
|
+
type: Component,
|
|
238
|
+
args: [{ selector: 'dma-input', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
239
|
+
class: 'group',
|
|
240
|
+
}, imports: [], providers: [provideValueAccessor(InputComponent)], template: "<label class=\"inline-block text-sm text-neutral-900 font-semibold mb-2\" [for]=\"inputId()\">{{ label() }}</label>\n<input\n class=\"block w-full disabled:opacity-35 border text-neutral-900 group-[.ng-invalid.ng-touched]:text-red-500 border-neutral-300 not-disabled:not-group-[.ng-invalid.ng-touched]:not-group-[.ng-valid.ng-touched]:hover:border-neutral-500 disabled:bg-neutral-300 group-[.ng-invalid.ng-touched]:border-red-500 group-[.ng-valid.ng-touched]:border-green-500 rounded-xl py-2 px-4 not-group-[.ng-invalid.ng-touched]:not-group-[.ng-valid.ng-touched]:focus:outline-blue-400 read-only:outline-0 group-[.ng-invalid.ng-touched]:outline-red-500 group-[.ng-valid.ng-touched]:outline-green-500 disabled:cursor-default read-only:cursor-default\"\n type=\"text\"\n #input\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput(input.value)\"\n/>\n" }]
|
|
241
|
+
}], ctorParameters: () => [], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }] } });
|
|
242
|
+
|
|
243
|
+
class CircleUserIcon {
|
|
244
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CircleUserIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
245
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: CircleUserIcon, isStandalone: true, selector: "dma-icon[dma-circle-user-icon]", ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\">\n <!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.-->\n <path\n d=\"M463 448.2C440.9 409.8 399.4 384 352 384L288 384C240.6 384 199.1 409.8 177 448.2C212.2 487.4 263.2 512 320 512C376.8 512 427.8 487.3 463 448.2zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 336C359.8 336 392 303.8 392 264C392 224.2 359.8 192 320 192C280.2 192 248 224.2 248 264C248 303.8 280.2 336 320 336z\"\n />\n</svg>\n", styles: [":host{display:inline-flex;place-items:center;width:1.5rem;height:1.5rem;flex:0 0}:host svg{display:block;height:100%;fill:currentcolor}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
246
|
+
}
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CircleUserIcon, decorators: [{
|
|
248
|
+
type: Component,
|
|
249
|
+
args: [{ selector: 'dma-icon[dma-circle-user-icon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\">\n <!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.-->\n <path\n d=\"M463 448.2C440.9 409.8 399.4 384 352 384L288 384C240.6 384 199.1 409.8 177 448.2C212.2 487.4 263.2 512 320 512C376.8 512 427.8 487.3 463 448.2zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320zM320 336C359.8 336 392 303.8 392 264C392 224.2 359.8 192 320 192C280.2 192 248 224.2 248 264C248 303.8 280.2 336 320 336z\"\n />\n</svg>\n", styles: [":host{display:inline-flex;place-items:center;width:1.5rem;height:1.5rem;flex:0 0}:host svg{display:block;height:100%;fill:currentcolor}\n"] }]
|
|
250
|
+
}] });
|
|
251
|
+
|
|
252
|
+
class ActiveMarkerComponent {
|
|
253
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
254
|
+
active = input(false, { ...(ngDevMode ? { debugName: "active" } : {}), transform: booleanAttribute });
|
|
255
|
+
inactive = computed(() => !this.active(), ...(ngDevMode ? [{ debugName: "inactive" }] : []));
|
|
256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ActiveMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
257
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ActiveMarkerComponent, isStandalone: true, selector: "dma-active-marker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.text-neutral-600": "inactive()", "class.font-normal": "inactive()", "class.font-semibold": "active()" }, classAttribute: "block" }, ngImport: i0, template: "<!--\n Using an invisible element with the label set to the active state so that\n the element already takes all the space it needs and doesn't shift other elements around when it becomes active\n-->\n<div class=\"grid grid-cols-1 grid-rows-1 place-items-center\">\n <span class=\"font-bold invisible col-1 row-1\">{{ label() }}</span>\n <span class=\"col-1 row-1\">{{ label() }}</span>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
258
|
+
}
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ActiveMarkerComponent, decorators: [{
|
|
260
|
+
type: Component,
|
|
261
|
+
args: [{ selector: 'dma-active-marker', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
262
|
+
'class': 'block',
|
|
263
|
+
'[class.text-neutral-600]': 'inactive()',
|
|
264
|
+
'[class.font-normal]': 'inactive()',
|
|
265
|
+
'[class.font-semibold]': 'active()',
|
|
266
|
+
}, imports: [], template: "<!--\n Using an invisible element with the label set to the active state so that\n the element already takes all the space it needs and doesn't shift other elements around when it becomes active\n-->\n<div class=\"grid grid-cols-1 grid-rows-1 place-items-center\">\n <span class=\"font-bold invisible col-1 row-1\">{{ label() }}</span>\n <span class=\"col-1 row-1\">{{ label() }}</span>\n</div>\n" }]
|
|
267
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
268
|
+
|
|
269
|
+
const SectionPositions = {
|
|
270
|
+
START: 'start',
|
|
271
|
+
END: 'end',
|
|
272
|
+
};
|
|
273
|
+
const DEFAULT_SECTION_POSITION = SectionPositions.START;
|
|
274
|
+
function sectionPositionAttribute(value) {
|
|
275
|
+
return Object.values(SectionPositions).find((position) => position === value) ?? DEFAULT_SECTION_POSITION;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
class AppTopBarSectionComponent {
|
|
279
|
+
position = input(SectionPositions.START, { ...(ngDevMode ? { debugName: "position" } : {}), transform: sectionPositionAttribute });
|
|
280
|
+
positionedAtStart = computed(() => this.position() === SectionPositions.START, ...(ngDevMode ? [{ debugName: "positionedAtStart" }] : []));
|
|
281
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AppTopBarSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
282
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: AppTopBarSectionComponent, isStandalone: true, selector: "dma-app-top-bar-section", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.grow-1": "positionedAtStart()" }, classAttribute: "flex items-center gap-3" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
283
|
+
}
|
|
284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AppTopBarSectionComponent, decorators: [{
|
|
285
|
+
type: Component,
|
|
286
|
+
args: [{
|
|
287
|
+
selector: 'dma-app-top-bar-section',
|
|
288
|
+
template: `<ng-content />`,
|
|
289
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
290
|
+
host: {
|
|
291
|
+
'class': 'flex items-center gap-3',
|
|
292
|
+
'[class.grow-1]': 'positionedAtStart()',
|
|
36
293
|
},
|
|
37
294
|
imports: [],
|
|
38
295
|
}]
|
|
39
|
-
}], propDecorators: {
|
|
296
|
+
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
297
|
+
|
|
298
|
+
class AppTopBarComponent {
|
|
299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AppTopBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
300
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: AppTopBarComponent, isStandalone: true, selector: "dma-app-top-bar", host: { classAttribute: "px-3 py-2 flex justify-between items-center border-b border-b-neutral-200 bg-neutral-100" }, ngImport: i0, template: `<ng-content select="dma-app-top-bar-section" />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AppTopBarComponent, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{
|
|
305
|
+
selector: 'dma-app-top-bar',
|
|
306
|
+
template: `<ng-content select="dma-app-top-bar-section" />`,
|
|
307
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
308
|
+
host: {
|
|
309
|
+
class: 'px-3 py-2 flex justify-between items-center border-b border-b-neutral-200 bg-neutral-100',
|
|
310
|
+
},
|
|
311
|
+
imports: [],
|
|
312
|
+
}]
|
|
313
|
+
}] });
|
|
314
|
+
|
|
315
|
+
class NavbarBrandComponent {
|
|
316
|
+
imgSrc = input.required(...(ngDevMode ? [{ debugName: "imgSrc" }] : []));
|
|
317
|
+
brandName = input.required(...(ngDevMode ? [{ debugName: "brandName" }] : []));
|
|
318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarBrandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
319
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: NavbarBrandComponent, isStandalone: true, selector: "dma-navbar-brand", inputs: { imgSrc: { classPropertyName: "imgSrc", publicName: "imgSrc", isSignal: true, isRequired: true, transformFunction: null }, brandName: { classPropertyName: "brandName", publicName: "brandName", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<a class=\"flex items-center gap-2\" routerLink=\"/\">\n <img [src]=\"imgSrc()\" alt=\"Brand logo\" width=\"32\" height=\"32\" />\n <span class=\"font-semibold text-2xl\">{{ brandName() }}</span>\n</a>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
320
|
+
}
|
|
321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarBrandComponent, decorators: [{
|
|
322
|
+
type: Component,
|
|
323
|
+
args: [{ selector: 'dma-navbar-brand', changeDetection: ChangeDetectionStrategy.OnPush, imports: [RouterLink], template: "<a class=\"flex items-center gap-2\" routerLink=\"/\">\n <img [src]=\"imgSrc()\" alt=\"Brand logo\" width=\"32\" height=\"32\" />\n <span class=\"font-semibold text-2xl\">{{ brandName() }}</span>\n</a>\n" }]
|
|
324
|
+
}], propDecorators: { imgSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imgSrc", required: true }] }], brandName: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandName", required: true }] }] } });
|
|
325
|
+
|
|
326
|
+
class NavbarLinkComponent {
|
|
327
|
+
router = inject(Router);
|
|
328
|
+
destroyRef = inject(DestroyRef);
|
|
329
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
330
|
+
route = input.required(...(ngDevMode ? [{ debugName: "route" }] : []));
|
|
331
|
+
isActive;
|
|
332
|
+
ngOnInit() {
|
|
333
|
+
this.isActive = isActive(this.route(), this.router, {
|
|
334
|
+
paths: 'subset',
|
|
335
|
+
queryParams: 'subset',
|
|
336
|
+
fragment: 'ignored',
|
|
337
|
+
matrixParams: 'ignored',
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
onClick() {
|
|
341
|
+
from(this.router.navigateByUrl(this.route())).pipe(takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
342
|
+
}
|
|
343
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
344
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: NavbarLinkComponent, isStandalone: true, selector: "dma-navbar-link", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick()" }, classAttribute: "block rounded-md p-2 hover:bg-neutral-200 hover:text-neutral-900 active:bg-neutral-300 cursor-pointer" }, ngImport: i0, template: "<a [routerLink]=\"route()\">\n <dma-active-marker [label]=\"label()\" [active]=\"isActive()\" />\n</a>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ActiveMarkerComponent, selector: "dma-active-marker", inputs: ["label", "active"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
345
|
+
}
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarLinkComponent, decorators: [{
|
|
347
|
+
type: Component,
|
|
348
|
+
args: [{ selector: 'dma-navbar-link', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
349
|
+
'class': 'block rounded-md p-2 hover:bg-neutral-200 hover:text-neutral-900 active:bg-neutral-300 cursor-pointer',
|
|
350
|
+
'(click)': 'onClick()',
|
|
351
|
+
}, imports: [RouterLink, ActiveMarkerComponent], template: "<a [routerLink]=\"route()\">\n <dma-active-marker [label]=\"label()\" [active]=\"isActive()\" />\n</a>\n" }]
|
|
352
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: true }] }] } });
|
|
353
|
+
|
|
354
|
+
class NavbarMenuComponent {
|
|
355
|
+
toggleOnHover = input(false, { ...(ngDevMode ? { debugName: "toggleOnHover" } : {}), transform: booleanAttribute });
|
|
356
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
357
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: NavbarMenuComponent, isStandalone: true, selector: "dma-navbar-menu", inputs: { toggleOnHover: { classPropertyName: "toggleOnHover", publicName: "toggleOnHover", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\n type=\"button\"\n dma-button\n #anchor=\"dmaDropdownAnchor\"\n [toggleOnHover]=\"toggleOnHover()\"\n [dmaDropdownAnchor]=\"dropdownContainer\"\n>\n <ng-content select=\"dropdown-trigger\" />\n</button>\n\n<ng-template #dropdownContainer>\n <dma-dropdown-container (hover)=\"anchor.scheduleHide(!$event)\">\n <ng-content select=\"dropdown-menu\" />\n </dma-dropdown-container>\n</ng-template>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[dma-button]", inputs: ["dma-button"] }, { kind: "directive", type: DropdownAnchorDirective, selector: "[dmaDropdownAnchor]", inputs: ["dmaDropdownAnchor", "positions", "toggleOnHover"], outputs: ["dropdownToggle"], exportAs: ["dmaDropdownAnchor"] }, { kind: "component", type: DropdownContainerComponent, selector: "dma-dropdown-container", outputs: ["hover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
358
|
+
}
|
|
359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarMenuComponent, decorators: [{
|
|
360
|
+
type: Component,
|
|
361
|
+
args: [{ selector: 'dma-navbar-menu', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ButtonComponent, DropdownAnchorDirective, DropdownContainerComponent, ActiveMarkerComponent], template: "<button\n type=\"button\"\n dma-button\n #anchor=\"dmaDropdownAnchor\"\n [toggleOnHover]=\"toggleOnHover()\"\n [dmaDropdownAnchor]=\"dropdownContainer\"\n>\n <ng-content select=\"dropdown-trigger\" />\n</button>\n\n<ng-template #dropdownContainer>\n <dma-dropdown-container (hover)=\"anchor.scheduleHide(!$event)\">\n <ng-content select=\"dropdown-menu\" />\n </dma-dropdown-container>\n</ng-template>\n" }]
|
|
362
|
+
}], propDecorators: { toggleOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleOnHover", required: false }] }] } });
|
|
363
|
+
|
|
364
|
+
class NavbarComponent {
|
|
365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
366
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: NavbarComponent, isStandalone: true, selector: "nav[dma-navbar]", host: { classAttribute: "flex items-center gap-4" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
367
|
+
}
|
|
368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NavbarComponent, decorators: [{
|
|
369
|
+
type: Component,
|
|
370
|
+
args: [{
|
|
371
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
372
|
+
selector: 'nav[dma-navbar]',
|
|
373
|
+
template: `<ng-content />`,
|
|
374
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
375
|
+
host: {
|
|
376
|
+
class: 'flex items-center gap-4',
|
|
377
|
+
},
|
|
378
|
+
imports: [],
|
|
379
|
+
}]
|
|
380
|
+
}] });
|
|
381
|
+
|
|
382
|
+
class VerticalRuleComponent {
|
|
383
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: VerticalRuleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
384
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: VerticalRuleComponent, isStandalone: true, selector: "dma-vr", host: { classAttribute: "inline-block h-[stretch] border-s border-s-neutral-500" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
385
|
+
}
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: VerticalRuleComponent, decorators: [{
|
|
387
|
+
type: Component,
|
|
388
|
+
args: [{
|
|
389
|
+
selector: 'dma-vr',
|
|
390
|
+
template: '',
|
|
391
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
392
|
+
host: {
|
|
393
|
+
class: 'inline-block h-[stretch] border-s border-s-neutral-500',
|
|
394
|
+
},
|
|
395
|
+
imports: [],
|
|
396
|
+
}]
|
|
397
|
+
}] });
|
|
40
398
|
|
|
41
399
|
/**
|
|
42
400
|
* Public API Surface of @dnd-mapp/shared-ui
|
|
@@ -46,5 +404,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
|
|
|
46
404
|
* Generated bundle index. Do not edit.
|
|
47
405
|
*/
|
|
48
406
|
|
|
49
|
-
export { ButtonColors, ButtonComponent, DEFAULT_BUTTON_COLOR, buttonColorAttribute };
|
|
407
|
+
export { ActiveMarkerComponent, AppTopBarComponent, AppTopBarSectionComponent, ButtonColors, ButtonComponent, CircleUserIcon, DEFAULT_BUTTON_COLOR, DEFAULT_DROPDOWN_POSITIONS, DEFAULT_SECTION_POSITION, DropdownAnchorDirective, DropdownContainerComponent, InputComponent, NavbarBrandComponent, NavbarComponent, NavbarLinkComponent, NavbarMenuComponent, SectionPositions, VerticalRuleComponent, buttonColorAttribute, sectionPositionAttribute };
|
|
50
408
|
//# sourceMappingURL=dnd-mapp-shared-ui.mjs.map
|