@ng-brutalism/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/fesm2022/ng-brutalism-ui.mjs +1336 -0
- package/fesm2022/ng-brutalism-ui.mjs.map +1 -0
- package/package.json +81 -0
- package/schematics/collection.json +10 -0
- package/schematics/index.d.ts +1 -0
- package/schematics/index.js +7 -0
- package/schematics/index.js.map +1 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +233 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +15 -0
- package/schematics/package.json +3 -0
- package/styles.css +162 -0
- package/theme.css +70 -0
- package/types/ng-brutalism-ui.d.ts +387 -0
|
@@ -0,0 +1,1336 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, makeEnvironmentProviders, provideAppInitializer, inject, DOCUMENT, PLATFORM_ID, input, computed, Directive, booleanAttribute, ChangeDetectionStrategy, Component, model, contentChildren, viewChild, DestroyRef, signal, afterNextRender, ElementRef } from '@angular/core';
|
|
5
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Merges class names with Tailwind conflict resolution.
|
|
9
|
+
* Publicly exported for consumers extending library components.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* nbClass('px-2 px-4') // -> 'px-4'
|
|
13
|
+
* nbClass('flex', condition && 'w-full') // -> 'flex w-full' or 'flex'
|
|
14
|
+
*/
|
|
15
|
+
function nbClass(...inputs) {
|
|
16
|
+
return twMerge(clsx(...inputs));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const NB_THEME_CONFIG = new InjectionToken('NB_THEME_CONFIG');
|
|
20
|
+
|
|
21
|
+
function applyThemeVars(doc, config) {
|
|
22
|
+
const root = doc.documentElement;
|
|
23
|
+
const map = {
|
|
24
|
+
primary: '--nb-primary',
|
|
25
|
+
secondary: '--nb-secondary',
|
|
26
|
+
accent: '--nb-accent',
|
|
27
|
+
danger: '--nb-danger',
|
|
28
|
+
success: '--nb-success',
|
|
29
|
+
warning: '--nb-warning',
|
|
30
|
+
radius: '--nb-radius',
|
|
31
|
+
borderWidth: '--nb-border-width',
|
|
32
|
+
shadowOffsetX: '--nb-shadow-offset-x',
|
|
33
|
+
shadowOffsetY: '--nb-shadow-offset-y',
|
|
34
|
+
fontSans: '--nb-font-sans',
|
|
35
|
+
fontMono: '--nb-font-mono',
|
|
36
|
+
};
|
|
37
|
+
for (const [key, cssVar] of Object.entries(map)) {
|
|
38
|
+
const value = config[key];
|
|
39
|
+
if (value !== undefined) {
|
|
40
|
+
root.style.setProperty(cssVar, value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function provideNgBrutalism(config = {}) {
|
|
45
|
+
return makeEnvironmentProviders([
|
|
46
|
+
{
|
|
47
|
+
provide: NB_THEME_CONFIG,
|
|
48
|
+
useValue: config.theme ?? {},
|
|
49
|
+
},
|
|
50
|
+
provideAppInitializer(() => {
|
|
51
|
+
const initializerFn = (() => {
|
|
52
|
+
const doc = inject(DOCUMENT);
|
|
53
|
+
const platformId = inject(PLATFORM_ID);
|
|
54
|
+
const themeConfig = inject(NB_THEME_CONFIG);
|
|
55
|
+
return () => {
|
|
56
|
+
if (isPlatformBrowser(platformId)) {
|
|
57
|
+
applyThemeVars(doc, themeConfig);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
return initializerFn();
|
|
62
|
+
}),
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
class NbCheckbox {
|
|
67
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
68
|
+
classes = computed(() => nbClass('[--nb-checkbox-bg:var(--nb-main)]', '[--nb-checkbox-fg:#fff]', '[--nb-checkbox-border:var(--nb-border)]', '[--nb-checkbox-radius:0]', 'peer grid shrink-0 cursor-pointer appearance-none place-content-center', 'rounded-(--nb-checkbox-radius) outline-2 outline-(--nb-checkbox-border) ring-offset-white', 'checked:bg-(--nb-checkbox-bg) checked:text-(--nb-checkbox-fg)', 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-(--nb-checkbox-border) focus-visible:ring-offset-2', 'disabled:opacity-50 disabled:cursor-not-allowed', this.sizeClass()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
69
|
+
sizeClass() {
|
|
70
|
+
const map = {
|
|
71
|
+
default: 'size-4',
|
|
72
|
+
sm: 'size-3.5',
|
|
73
|
+
lg: 'size-5',
|
|
74
|
+
};
|
|
75
|
+
return map[this.size()];
|
|
76
|
+
}
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
78
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbCheckbox, isStandalone: true, selector: "input[nbCheckbox]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-size": "size()" } }, ngImport: i0 });
|
|
79
|
+
}
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCheckbox, decorators: [{
|
|
81
|
+
type: Directive,
|
|
82
|
+
args: [{
|
|
83
|
+
selector: 'input[nbCheckbox]',
|
|
84
|
+
host: {
|
|
85
|
+
'[class]': 'classes()',
|
|
86
|
+
'[attr.data-size]': 'size()',
|
|
87
|
+
},
|
|
88
|
+
}]
|
|
89
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
90
|
+
|
|
91
|
+
const NB_ACCORDION = new InjectionToken('NB_ACCORDION');
|
|
92
|
+
|
|
93
|
+
let nextAccordionItemId = 0;
|
|
94
|
+
class NbAccordionItem {
|
|
95
|
+
id = nextAccordionItemId++;
|
|
96
|
+
value = input(`neo-accordion-item-${this.id}`, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
97
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
98
|
+
accordion = inject(NB_ACCORDION);
|
|
99
|
+
triggerId = `neo-accordion-trigger-${this.id}`;
|
|
100
|
+
contentId = `neo-accordion-content-${this.id}`;
|
|
101
|
+
open = computed(() => this.accordion.isItemOpen(this.value()), ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
102
|
+
classes = computed(() => nbClass('[--nb-accordion-item-bg:var(--nb-surface)]', '[--nb-accordion-item-fg:var(--nb-surface-foreground)]', '[--nb-accordion-item-border:var(--nb-border)]', '[--nb-accordion-item-radius:var(--nb-radius)]', '[--nb-accordion-item-shadow:var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]', 'overflow-hidden rounded-(--nb-accordion-item-radius)', 'border-2 border-(--nb-accordion-item-border)', 'bg-(--nb-accordion-item-bg) text-(--nb-accordion-item-fg)', 'shadow-[var(--nb-accordion-item-shadow)]', this.disabled() && 'opacity-50'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
103
|
+
toggle() {
|
|
104
|
+
if (!this.disabled()) {
|
|
105
|
+
this.accordion.toggleItem(this.value());
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: NbAccordionItem, isStandalone: true, selector: "nb-accordion-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null", "attr.data-orientation": "\"vertical\"" }, classAttribute: "block" }, ngImport: i0, template: `
|
|
110
|
+
<div [class]="classes()">
|
|
111
|
+
<ng-content />
|
|
112
|
+
</div>
|
|
113
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
114
|
+
}
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordionItem, decorators: [{
|
|
116
|
+
type: Component,
|
|
117
|
+
args: [{
|
|
118
|
+
selector: 'nb-accordion-item',
|
|
119
|
+
template: `
|
|
120
|
+
<div [class]="classes()">
|
|
121
|
+
<ng-content />
|
|
122
|
+
</div>
|
|
123
|
+
`,
|
|
124
|
+
host: {
|
|
125
|
+
class: 'block',
|
|
126
|
+
'[attr.data-state]': 'open() ? "open" : "closed"',
|
|
127
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
128
|
+
'[attr.data-orientation]': '"vertical"',
|
|
129
|
+
},
|
|
130
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
131
|
+
}]
|
|
132
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
133
|
+
|
|
134
|
+
class NbAccordion {
|
|
135
|
+
type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
136
|
+
collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
137
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
138
|
+
items = contentChildren(NbAccordionItem, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
139
|
+
isItemOpen(value) {
|
|
140
|
+
const currentValue = this.value();
|
|
141
|
+
return Array.isArray(currentValue)
|
|
142
|
+
? currentValue.includes(value)
|
|
143
|
+
: currentValue === value;
|
|
144
|
+
}
|
|
145
|
+
toggleItem(value) {
|
|
146
|
+
if (this.type() === 'multiple') {
|
|
147
|
+
this.toggleMultipleItem(value);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (this.isItemOpen(value)) {
|
|
151
|
+
if (this.collapsible()) {
|
|
152
|
+
this.value.set(null);
|
|
153
|
+
}
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.value.set(value);
|
|
157
|
+
}
|
|
158
|
+
toggleMultipleItem(value) {
|
|
159
|
+
const currentValue = this.value();
|
|
160
|
+
const values = Array.isArray(currentValue)
|
|
161
|
+
? currentValue
|
|
162
|
+
: currentValue
|
|
163
|
+
? [currentValue]
|
|
164
|
+
: [];
|
|
165
|
+
this.value.set(values.includes(value)
|
|
166
|
+
? values.filter((itemValue) => itemValue !== value)
|
|
167
|
+
: [...values, value]);
|
|
168
|
+
}
|
|
169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordion, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NbAccordion, isStandalone: true, selector: "nb-accordion", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-orientation": "\"vertical\"", "attr.data-type": "type()" }, classAttribute: "block w-full" }, providers: [{ provide: NB_ACCORDION, useExisting: NbAccordion }], queries: [{ propertyName: "items", predicate: NbAccordionItem, isSignal: true }], ngImport: i0, template: `
|
|
171
|
+
<div class="flex w-full flex-col gap-3">
|
|
172
|
+
<ng-content />
|
|
173
|
+
</div>
|
|
174
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
175
|
+
}
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordion, decorators: [{
|
|
177
|
+
type: Component,
|
|
178
|
+
args: [{
|
|
179
|
+
selector: 'nb-accordion',
|
|
180
|
+
template: `
|
|
181
|
+
<div class="flex w-full flex-col gap-3">
|
|
182
|
+
<ng-content />
|
|
183
|
+
</div>
|
|
184
|
+
`,
|
|
185
|
+
host: {
|
|
186
|
+
class: 'block w-full',
|
|
187
|
+
'[attr.data-orientation]': '"vertical"',
|
|
188
|
+
'[attr.data-type]': 'type()',
|
|
189
|
+
},
|
|
190
|
+
providers: [{ provide: NB_ACCORDION, useExisting: NbAccordion }],
|
|
191
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
192
|
+
}]
|
|
193
|
+
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NbAccordionItem), { isSignal: true }] }] } });
|
|
194
|
+
|
|
195
|
+
class NbAccordionContent {
|
|
196
|
+
item = inject(NbAccordionItem);
|
|
197
|
+
classes = computed(() => nbClass('[--nb-accordion-content-bg:var(--nb-surface)]', '[--nb-accordion-content-fg:var(--nb-surface-foreground)]', 'grid overflow-hidden bg-(--nb-accordion-content-bg) text-sm font-medium', 'text-(--nb-accordion-content-fg)', 'transition-[grid-template-rows] duration-200 ease-out', this.item.open() ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordionContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbAccordionContent, isStandalone: true, selector: "nb-accordion-content", host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
200
|
+
<div
|
|
201
|
+
[id]="item.contentId"
|
|
202
|
+
[class]="classes()"
|
|
203
|
+
role="region"
|
|
204
|
+
[attr.aria-labelledby]="item.triggerId"
|
|
205
|
+
[attr.data-slot]="'accordion-content'"
|
|
206
|
+
[attr.data-state]="item.open() ? 'open' : 'closed'"
|
|
207
|
+
[attr.data-orientation]="'vertical'"
|
|
208
|
+
[attr.aria-hidden]="!item.open()"
|
|
209
|
+
>
|
|
210
|
+
<div class="min-h-0 overflow-hidden">
|
|
211
|
+
<div class="p-4">
|
|
212
|
+
<ng-content />
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
217
|
+
}
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordionContent, decorators: [{
|
|
219
|
+
type: Component,
|
|
220
|
+
args: [{
|
|
221
|
+
selector: 'nb-accordion-content',
|
|
222
|
+
template: `
|
|
223
|
+
<div
|
|
224
|
+
[id]="item.contentId"
|
|
225
|
+
[class]="classes()"
|
|
226
|
+
role="region"
|
|
227
|
+
[attr.aria-labelledby]="item.triggerId"
|
|
228
|
+
[attr.data-slot]="'accordion-content'"
|
|
229
|
+
[attr.data-state]="item.open() ? 'open' : 'closed'"
|
|
230
|
+
[attr.data-orientation]="'vertical'"
|
|
231
|
+
[attr.aria-hidden]="!item.open()"
|
|
232
|
+
>
|
|
233
|
+
<div class="min-h-0 overflow-hidden">
|
|
234
|
+
<div class="p-4">
|
|
235
|
+
<ng-content />
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
`,
|
|
240
|
+
host: {
|
|
241
|
+
class: 'block',
|
|
242
|
+
},
|
|
243
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
244
|
+
}]
|
|
245
|
+
}] });
|
|
246
|
+
|
|
247
|
+
class NbAccordionTrigger {
|
|
248
|
+
item = inject(NbAccordionItem);
|
|
249
|
+
triggerClasses = computed(() => nbClass('[--nb-accordion-trigger-bg:var(--nb-main)]', '[--nb-accordion-trigger-fg:var(--nb-main-foreground)]', 'flex min-h-14 flex-1 items-center justify-between gap-4', 'w-full bg-(--nb-accordion-trigger-bg) p-4 text-left text-base font-bold', 'text-(--nb-accordion-trigger-fg) transition-all duration-200', 'focus-visible:outline-none focus-visible:ring-2', 'focus-visible:ring-(--nb-accordion-item-border) focus-visible:ring-offset-2', 'disabled:pointer-events-none disabled:opacity-50', this.item.open() && 'border-b-2 border-(--nb-accordion-item-border)'), ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
|
|
250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordionTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
251
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbAccordionTrigger, isStandalone: true, selector: "nb-accordion-trigger", ngImport: i0, template: `
|
|
252
|
+
<h3 class="flex">
|
|
253
|
+
<button
|
|
254
|
+
type="button"
|
|
255
|
+
[id]="item.triggerId"
|
|
256
|
+
[attr.aria-expanded]="item.open()"
|
|
257
|
+
[attr.aria-controls]="item.contentId"
|
|
258
|
+
[attr.data-state]="item.open() ? 'open' : 'closed'"
|
|
259
|
+
[disabled]="item.disabled()"
|
|
260
|
+
[class]="triggerClasses()"
|
|
261
|
+
(click)="item.toggle()"
|
|
262
|
+
>
|
|
263
|
+
<ng-content />
|
|
264
|
+
<svg
|
|
265
|
+
class="size-6 shrink-0 fill-none stroke-current stroke-[3] stroke-linecap-round stroke-linejoin-round"
|
|
266
|
+
viewBox="0 0 24 24"
|
|
267
|
+
aria-hidden="true"
|
|
268
|
+
>
|
|
269
|
+
<path [attr.d]="item.open() ? 'm18 15-6-6-6 6' : 'm6 9 6 6 6-6'" />
|
|
270
|
+
</svg>
|
|
271
|
+
</button>
|
|
272
|
+
</h3>
|
|
273
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
274
|
+
}
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAccordionTrigger, decorators: [{
|
|
276
|
+
type: Component,
|
|
277
|
+
args: [{
|
|
278
|
+
selector: 'nb-accordion-trigger',
|
|
279
|
+
template: `
|
|
280
|
+
<h3 class="flex">
|
|
281
|
+
<button
|
|
282
|
+
type="button"
|
|
283
|
+
[id]="item.triggerId"
|
|
284
|
+
[attr.aria-expanded]="item.open()"
|
|
285
|
+
[attr.aria-controls]="item.contentId"
|
|
286
|
+
[attr.data-state]="item.open() ? 'open' : 'closed'"
|
|
287
|
+
[disabled]="item.disabled()"
|
|
288
|
+
[class]="triggerClasses()"
|
|
289
|
+
(click)="item.toggle()"
|
|
290
|
+
>
|
|
291
|
+
<ng-content />
|
|
292
|
+
<svg
|
|
293
|
+
class="size-6 shrink-0 fill-none stroke-current stroke-[3] stroke-linecap-round stroke-linejoin-round"
|
|
294
|
+
viewBox="0 0 24 24"
|
|
295
|
+
aria-hidden="true"
|
|
296
|
+
>
|
|
297
|
+
<path [attr.d]="item.open() ? 'm18 15-6-6-6 6' : 'm6 9 6 6 6-6'" />
|
|
298
|
+
</svg>
|
|
299
|
+
</button>
|
|
300
|
+
</h3>
|
|
301
|
+
`,
|
|
302
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
303
|
+
}]
|
|
304
|
+
}] });
|
|
305
|
+
|
|
306
|
+
class NbButton {
|
|
307
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
308
|
+
shadow = input('default', ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
309
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
310
|
+
fullWidth = input(false, ...(ngDevMode ? [{ debugName: "fullWidth" }] : /* istanbul ignore next */ []));
|
|
311
|
+
classes = computed(() => nbClass('inline-flex items-center justify-center whitespace-nowrap select-none', 'gap-2', 'font-bold', '[--nb-button-bg:var(--nb-main)]', '[--nb-button-fg:var(--nb-main-foreground)]', '[--nb-button-border:var(--nb-border)]', '[--nb-button-radius:var(--nb-radius)]', '[--nb-button-shadow:var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]', 'bg-(--nb-button-bg) text-(--nb-button-fg)', 'rounded-(--nb-button-radius)', 'border-2 border-(--nb-button-border)', 'shadow-[var(--nb-button-shadow)]', 'transition-all duration-150 ease-out', '[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--nb-border) focus-visible:ring-offset-2', 'disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none', 'aria-disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:pointer-events-none', this.variantClass(), this.shadowClass(), this.sizeClass(), this.fullWidth() && 'w-full'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
312
|
+
variantClass() {
|
|
313
|
+
const variant = this.variant();
|
|
314
|
+
const map = {
|
|
315
|
+
default: '',
|
|
316
|
+
neutral: '[--nb-button-bg:var(--nb-background)] [--nb-button-fg:var(--nb-foreground)]',
|
|
317
|
+
primary: '[--nb-button-bg:var(--nb-primary)] [--nb-button-fg:var(--nb-primary-foreground)]',
|
|
318
|
+
secondary: '[--nb-button-bg:var(--nb-secondary)] [--nb-button-fg:var(--nb-secondary-foreground)]',
|
|
319
|
+
accent: '[--nb-button-bg:var(--nb-accent)] [--nb-button-fg:var(--nb-accent-foreground)]',
|
|
320
|
+
danger: '[--nb-button-bg:var(--nb-danger)] [--nb-button-fg:var(--nb-danger-foreground)]',
|
|
321
|
+
success: '[--nb-button-bg:var(--nb-success)] [--nb-button-fg:var(--nb-success-foreground)]',
|
|
322
|
+
warning: '[--nb-button-bg:var(--nb-warning)] [--nb-button-fg:var(--nb-warning-foreground)]',
|
|
323
|
+
};
|
|
324
|
+
return map[variant];
|
|
325
|
+
}
|
|
326
|
+
shadowClass() {
|
|
327
|
+
const map = {
|
|
328
|
+
default: 'hover:translate-x-(--nb-shadow-offset-x) hover:translate-y-(--nb-shadow-offset-y) hover:shadow-none',
|
|
329
|
+
none: '[--nb-button-shadow:none]',
|
|
330
|
+
reverse: '[--nb-button-shadow:none] hover:-translate-x-(--nb-reverse-shadow-offset-x) hover:-translate-y-(--nb-reverse-shadow-offset-y) hover:shadow-[var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]',
|
|
331
|
+
};
|
|
332
|
+
return map[this.shadow()];
|
|
333
|
+
}
|
|
334
|
+
sizeClass() {
|
|
335
|
+
const map = {
|
|
336
|
+
default: 'h-10 px-4 py-2 text-sm',
|
|
337
|
+
sm: 'h-9 px-3 text-sm',
|
|
338
|
+
lg: 'h-11 px-8 text-sm',
|
|
339
|
+
icon: 'size-10',
|
|
340
|
+
};
|
|
341
|
+
return map[this.size()];
|
|
342
|
+
}
|
|
343
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
344
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbButton, isStandalone: true, selector: "button[nbButton], a[nbButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-variant": "variant()", "attr.data-shadow": "shadow()", "attr.data-size": "size()", "attr.data-full-width": "fullWidth() ? \"\" : null" } }, ngImport: i0 });
|
|
345
|
+
}
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbButton, decorators: [{
|
|
347
|
+
type: Directive,
|
|
348
|
+
args: [{
|
|
349
|
+
selector: 'button[nbButton], a[nbButton]',
|
|
350
|
+
host: {
|
|
351
|
+
'[class]': 'classes()',
|
|
352
|
+
'[attr.data-variant]': 'variant()',
|
|
353
|
+
'[attr.data-shadow]': 'shadow()',
|
|
354
|
+
'[attr.data-size]': 'size()',
|
|
355
|
+
'[attr.data-full-width]': 'fullWidth() ? "" : null',
|
|
356
|
+
},
|
|
357
|
+
}]
|
|
358
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] } });
|
|
359
|
+
|
|
360
|
+
class NbCard {
|
|
361
|
+
classes = nbClass('[--nb-card-bg:var(--nb-background)]', '[--nb-card-fg:var(--nb-foreground)]', '[--nb-card-border:var(--nb-border)]', '[--nb-card-radius:18px]', '[--nb-card-shadow:var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]', 'flex flex-col gap-6 py-6', 'rounded-(--nb-card-radius) border-2 border-(--nb-card-border)', 'bg-(--nb-card-bg) text-(--nb-card-fg)', 'shadow-[var(--nb-card-shadow)] font-medium');
|
|
362
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
363
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbCard, isStandalone: true, selector: "nb-card", host: { properties: { "class": "classes", "attr.data-slot": "\"card\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
364
|
+
}
|
|
365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCard, decorators: [{
|
|
366
|
+
type: Component,
|
|
367
|
+
args: [{
|
|
368
|
+
selector: 'nb-card',
|
|
369
|
+
template: `<ng-content />`,
|
|
370
|
+
host: {
|
|
371
|
+
'[class]': 'classes',
|
|
372
|
+
'[attr.data-slot]': '"card"',
|
|
373
|
+
},
|
|
374
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
375
|
+
}]
|
|
376
|
+
}] });
|
|
377
|
+
class NbCardHeader {
|
|
378
|
+
classes = nbClass('grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6', '[.border-b]:pb-6');
|
|
379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
380
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbCardHeader, isStandalone: true, selector: "nb-card-header", host: { properties: { "class": "classes", "attr.data-slot": "\"card-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
381
|
+
}
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardHeader, decorators: [{
|
|
383
|
+
type: Component,
|
|
384
|
+
args: [{
|
|
385
|
+
selector: 'nb-card-header',
|
|
386
|
+
template: `<ng-content />`,
|
|
387
|
+
host: {
|
|
388
|
+
'[class]': 'classes',
|
|
389
|
+
'[attr.data-slot]': '"card-header"',
|
|
390
|
+
},
|
|
391
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
392
|
+
}]
|
|
393
|
+
}] });
|
|
394
|
+
class NbCardTitle {
|
|
395
|
+
classes = nbClass('font-bold leading-none');
|
|
396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardTitle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
397
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbCardTitle, isStandalone: true, selector: "nb-card-title", host: { properties: { "class": "classes", "attr.data-slot": "\"card-title\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
398
|
+
}
|
|
399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardTitle, decorators: [{
|
|
400
|
+
type: Component,
|
|
401
|
+
args: [{
|
|
402
|
+
selector: 'nb-card-title',
|
|
403
|
+
template: `<ng-content />`,
|
|
404
|
+
host: {
|
|
405
|
+
'[class]': 'classes',
|
|
406
|
+
'[attr.data-slot]': '"card-title"',
|
|
407
|
+
},
|
|
408
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
409
|
+
}]
|
|
410
|
+
}] });
|
|
411
|
+
class NbCardDescription {
|
|
412
|
+
classes = nbClass('text-sm font-medium');
|
|
413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
414
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbCardDescription, isStandalone: true, selector: "nb-card-description", host: { properties: { "class": "classes", "attr.data-slot": "\"card-description\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
415
|
+
}
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardDescription, decorators: [{
|
|
417
|
+
type: Component,
|
|
418
|
+
args: [{
|
|
419
|
+
selector: 'nb-card-description',
|
|
420
|
+
template: `<ng-content />`,
|
|
421
|
+
host: {
|
|
422
|
+
'[class]': 'classes',
|
|
423
|
+
'[attr.data-slot]': '"card-description"',
|
|
424
|
+
},
|
|
425
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
426
|
+
}]
|
|
427
|
+
}] });
|
|
428
|
+
class NbCardActions {
|
|
429
|
+
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
430
|
+
classes = computed(() => nbClass('flex flex-wrap items-center gap-3 px-6', '[[data-slot=card-footer]_&]:px-0', this.align() === 'end' ? 'justify-end' : 'justify-start'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
432
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: NbCardActions, isStandalone: true, selector: "nb-card-actions", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"card-actions\"", "attr.data-align": "align()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
433
|
+
}
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardActions, decorators: [{
|
|
435
|
+
type: Component,
|
|
436
|
+
args: [{
|
|
437
|
+
selector: 'nb-card-actions',
|
|
438
|
+
template: `<ng-content />`,
|
|
439
|
+
host: {
|
|
440
|
+
'[class]': 'classes()',
|
|
441
|
+
'[attr.data-slot]': '"card-actions"',
|
|
442
|
+
'[attr.data-align]': 'align()',
|
|
443
|
+
},
|
|
444
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
445
|
+
}]
|
|
446
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
|
|
447
|
+
class NbCardContent {
|
|
448
|
+
classes = nbClass('px-6');
|
|
449
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
450
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbCardContent, isStandalone: true, selector: "nb-card-content", host: { properties: { "class": "classes", "attr.data-slot": "\"card-content\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
451
|
+
}
|
|
452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardContent, decorators: [{
|
|
453
|
+
type: Component,
|
|
454
|
+
args: [{
|
|
455
|
+
selector: 'nb-card-content',
|
|
456
|
+
template: `<ng-content />`,
|
|
457
|
+
host: {
|
|
458
|
+
'[class]': 'classes',
|
|
459
|
+
'[attr.data-slot]': '"card-content"',
|
|
460
|
+
},
|
|
461
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
462
|
+
}]
|
|
463
|
+
}] });
|
|
464
|
+
class NbCardFooter {
|
|
465
|
+
classes = nbClass('flex items-center px-6', 'has-[[data-slot=card-actions]]:flex-wrap', 'has-[[data-slot=card-actions]]:justify-between', 'has-[[data-slot=card-actions]]:gap-4', '[.border-t]:pt-6');
|
|
466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbCardFooter, isStandalone: true, selector: "nb-card-footer", host: { properties: { "class": "classes", "attr.data-slot": "\"card-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
468
|
+
}
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbCardFooter, decorators: [{
|
|
470
|
+
type: Component,
|
|
471
|
+
args: [{
|
|
472
|
+
selector: 'nb-card-footer',
|
|
473
|
+
template: `<ng-content />`,
|
|
474
|
+
host: {
|
|
475
|
+
'[class]': 'classes',
|
|
476
|
+
'[attr.data-slot]': '"card-footer"',
|
|
477
|
+
},
|
|
478
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
479
|
+
}]
|
|
480
|
+
}] });
|
|
481
|
+
|
|
482
|
+
class NbImageCard {
|
|
483
|
+
image = input.required(...(ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []));
|
|
484
|
+
alt = input.required(...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
485
|
+
classes = nbClass('[--nb-image-card-bg:var(--nb-background)]', '[--nb-image-card-fg:var(--nb-foreground)]', '[--nb-image-card-border:var(--nb-border)]', '[--nb-image-card-radius:var(--nb-radius)]', '[--nb-image-card-shadow:var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]', 'flex flex-col overflow-hidden', 'rounded-(--nb-image-card-radius) border-2 border-(--nb-image-card-border)', 'bg-(--nb-image-card-bg) text-(--nb-image-card-fg)', 'shadow-[var(--nb-image-card-shadow)] font-medium');
|
|
486
|
+
imageClasses = nbClass('block w-full h-auto');
|
|
487
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbImageCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
488
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: NbImageCard, isStandalone: true, selector: "nb-image-card", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "classes", "attr.data-slot": "\"image-card\"" } }, ngImport: i0, template: `
|
|
489
|
+
<img
|
|
490
|
+
[src]="image()"
|
|
491
|
+
[alt]="alt()"
|
|
492
|
+
[class]="imageClasses"
|
|
493
|
+
loading="lazy"
|
|
494
|
+
decoding="async"
|
|
495
|
+
/>
|
|
496
|
+
<ng-content select="nb-image-card-caption" />
|
|
497
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
498
|
+
}
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbImageCard, decorators: [{
|
|
500
|
+
type: Component,
|
|
501
|
+
args: [{
|
|
502
|
+
selector: 'nb-image-card',
|
|
503
|
+
template: `
|
|
504
|
+
<img
|
|
505
|
+
[src]="image()"
|
|
506
|
+
[alt]="alt()"
|
|
507
|
+
[class]="imageClasses"
|
|
508
|
+
loading="lazy"
|
|
509
|
+
decoding="async"
|
|
510
|
+
/>
|
|
511
|
+
<ng-content select="nb-image-card-caption" />
|
|
512
|
+
`,
|
|
513
|
+
host: {
|
|
514
|
+
'[class]': 'classes',
|
|
515
|
+
'[attr.data-slot]': '"image-card"',
|
|
516
|
+
},
|
|
517
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
518
|
+
}]
|
|
519
|
+
}], propDecorators: { image: [{ type: i0.Input, args: [{ isSignal: true, alias: "image", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: true }] }] } });
|
|
520
|
+
class NbImageCardCaption {
|
|
521
|
+
classes = nbClass('border-t-2 border-(--nb-image-card-border)', 'px-6 py-4 text-center font-bold text-base');
|
|
522
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbImageCardCaption, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
523
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbImageCardCaption, isStandalone: true, selector: "nb-image-card-caption", host: { properties: { "class": "classes", "attr.data-slot": "\"image-card-caption\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
524
|
+
}
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbImageCardCaption, decorators: [{
|
|
526
|
+
type: Component,
|
|
527
|
+
args: [{
|
|
528
|
+
selector: 'nb-image-card-caption',
|
|
529
|
+
template: `<ng-content />`,
|
|
530
|
+
host: {
|
|
531
|
+
'[class]': 'classes',
|
|
532
|
+
'[attr.data-slot]': '"image-card-caption"',
|
|
533
|
+
},
|
|
534
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
535
|
+
}]
|
|
536
|
+
}] });
|
|
537
|
+
|
|
538
|
+
class NbMarquee {
|
|
539
|
+
duration = input('5s', ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
540
|
+
reverse = input(false, { ...(ngDevMode ? { debugName: "reverse" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
541
|
+
pauseOnHover = input(true, { ...(ngDevMode ? { debugName: "pauseOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
542
|
+
wrapper = viewChild.required('wrapper');
|
|
543
|
+
strip1 = viewChild.required('strip1');
|
|
544
|
+
strip2 = viewChild.required('strip2');
|
|
545
|
+
destroyRef = inject(DestroyRef);
|
|
546
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
547
|
+
widthScale = signal(1, ...(ngDevMode ? [{ debugName: "widthScale" }] : /* istanbul ignore next */ []));
|
|
548
|
+
wrapperClass = computed(() => nbClass('nb-marquee-wrapper relative flex w-full overflow-hidden', 'border-t-2 border-b-2 border-(--nb-border)', 'bg-white text-black font-base', this.pauseOnHover() && 'nb-pause-on-hover'), ...(ngDevMode ? [{ debugName: "wrapperClass" }] : /* istanbul ignore next */ []));
|
|
549
|
+
wrapperStyle = computed(() => ({
|
|
550
|
+
'--nb-marquee-duration': this.scaledDuration(),
|
|
551
|
+
}), ...(ngDevMode ? [{ debugName: "wrapperStyle" }] : /* istanbul ignore next */ []));
|
|
552
|
+
scaledDuration = computed(() => {
|
|
553
|
+
const duration = this.duration();
|
|
554
|
+
const durationMs = this.durationToMs(duration);
|
|
555
|
+
if (durationMs === null) {
|
|
556
|
+
return duration;
|
|
557
|
+
}
|
|
558
|
+
return `${durationMs * this.widthScale()}ms`;
|
|
559
|
+
}, ...(ngDevMode ? [{ debugName: "scaledDuration" }] : /* istanbul ignore next */ []));
|
|
560
|
+
strip1Class = computed(() => nbClass('nb-marquee-strip-1 whitespace-nowrap py-4', this.reverse() && 'nb-marquee-reverse'), ...(ngDevMode ? [{ debugName: "strip1Class" }] : /* istanbul ignore next */ []));
|
|
561
|
+
strip2Class = computed(() => nbClass('nb-marquee-strip-2 absolute top-0 left-0 whitespace-nowrap py-4', this.reverse() && 'nb-marquee-reverse'), ...(ngDevMode ? [{ debugName: "strip2Class" }] : /* istanbul ignore next */ []));
|
|
562
|
+
constructor() {
|
|
563
|
+
if (!this.isBrowser) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
afterNextRender(() => {
|
|
567
|
+
this.syncSecondStrip();
|
|
568
|
+
this.updateAnimationScale();
|
|
569
|
+
const mutationObserver = new MutationObserver(() => {
|
|
570
|
+
this.syncSecondStrip();
|
|
571
|
+
this.updateAnimationScale();
|
|
572
|
+
});
|
|
573
|
+
mutationObserver.observe(this.strip1().nativeElement, {
|
|
574
|
+
attributes: true,
|
|
575
|
+
childList: true,
|
|
576
|
+
characterData: true,
|
|
577
|
+
subtree: true,
|
|
578
|
+
});
|
|
579
|
+
const resizeObserver = new ResizeObserver(() => this.updateAnimationScale());
|
|
580
|
+
resizeObserver.observe(this.wrapper().nativeElement);
|
|
581
|
+
resizeObserver.observe(this.strip1().nativeElement);
|
|
582
|
+
this.destroyRef.onDestroy(() => {
|
|
583
|
+
mutationObserver.disconnect();
|
|
584
|
+
resizeObserver.disconnect();
|
|
585
|
+
});
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
syncSecondStrip() {
|
|
589
|
+
const source = this.strip1().nativeElement;
|
|
590
|
+
const cloneTarget = this.strip2().nativeElement;
|
|
591
|
+
const clones = Array.from(source.childNodes, (node) => node.cloneNode(true));
|
|
592
|
+
cloneTarget.replaceChildren(...clones);
|
|
593
|
+
}
|
|
594
|
+
updateAnimationScale() {
|
|
595
|
+
const wrapperWidth = this.wrapper().nativeElement.clientWidth;
|
|
596
|
+
const contentWidth = this.strip1().nativeElement.scrollWidth;
|
|
597
|
+
if (wrapperWidth <= 0 || contentWidth <= 0) {
|
|
598
|
+
this.widthScale.set(1);
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
this.widthScale.set(Math.max(1, contentWidth / wrapperWidth));
|
|
602
|
+
}
|
|
603
|
+
durationToMs(duration) {
|
|
604
|
+
const match = duration.trim().match(/^(\d*\.?\d+)(ms|s)$/);
|
|
605
|
+
if (!match) {
|
|
606
|
+
return null;
|
|
607
|
+
}
|
|
608
|
+
const value = Number(match[1]);
|
|
609
|
+
return match[2] === 's' ? value * 1000 : value;
|
|
610
|
+
}
|
|
611
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbMarquee, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
612
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NbMarquee, isStandalone: true, selector: "nb-marquee", inputs: { duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, pauseOnHover: { classPropertyName: "pauseOnHover", publicName: "pauseOnHover", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }, { propertyName: "strip1", first: true, predicate: ["strip1"], descendants: true, isSignal: true }, { propertyName: "strip2", first: true, predicate: ["strip2"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
613
|
+
<div #wrapper [class]="wrapperClass()" [style]="wrapperStyle()">
|
|
614
|
+
<div #strip1 [class]="strip1Class()">
|
|
615
|
+
<ng-content />
|
|
616
|
+
</div>
|
|
617
|
+
<div #strip2 [class]="strip2Class()" aria-hidden="true"></div>
|
|
618
|
+
</div>
|
|
619
|
+
`, isInline: true, styles: ["@keyframes nb-marquee-1{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes nb-marquee-2{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes nb-marquee-reverse-1{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes nb-marquee-reverse-2{0%{transform:translate(-100%)}to{transform:translate(0)}}.nb-marquee-strip-1{animation-name:nb-marquee-1;animation-duration:var(--nb-marquee-duration, 5s);animation-timing-function:linear;animation-iteration-count:infinite}.nb-marquee-strip-1.nb-marquee-reverse{animation-name:nb-marquee-reverse-1}.nb-marquee-strip-2{animation-name:nb-marquee-2;animation-duration:var(--nb-marquee-duration, 5s);animation-timing-function:linear;animation-iteration-count:infinite}.nb-marquee-strip-2.nb-marquee-reverse{animation-name:nb-marquee-reverse-2}.nb-marquee-strip-1,.nb-marquee-strip-2{display:flex;width:max-content;min-width:100%;align-items:center;flex-shrink:0}.nb-marquee-wrapper.nb-pause-on-hover:hover .nb-marquee-strip-1,.nb-marquee-wrapper.nb-pause-on-hover:hover .nb-marquee-strip-2{animation-play-state:paused}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
620
|
+
}
|
|
621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbMarquee, decorators: [{
|
|
622
|
+
type: Component,
|
|
623
|
+
args: [{ selector: 'nb-marquee', host: {
|
|
624
|
+
class: 'block',
|
|
625
|
+
}, template: `
|
|
626
|
+
<div #wrapper [class]="wrapperClass()" [style]="wrapperStyle()">
|
|
627
|
+
<div #strip1 [class]="strip1Class()">
|
|
628
|
+
<ng-content />
|
|
629
|
+
</div>
|
|
630
|
+
<div #strip2 [class]="strip2Class()" aria-hidden="true"></div>
|
|
631
|
+
</div>
|
|
632
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@keyframes nb-marquee-1{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes nb-marquee-2{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes nb-marquee-reverse-1{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes nb-marquee-reverse-2{0%{transform:translate(-100%)}to{transform:translate(0)}}.nb-marquee-strip-1{animation-name:nb-marquee-1;animation-duration:var(--nb-marquee-duration, 5s);animation-timing-function:linear;animation-iteration-count:infinite}.nb-marquee-strip-1.nb-marquee-reverse{animation-name:nb-marquee-reverse-1}.nb-marquee-strip-2{animation-name:nb-marquee-2;animation-duration:var(--nb-marquee-duration, 5s);animation-timing-function:linear;animation-iteration-count:infinite}.nb-marquee-strip-2.nb-marquee-reverse{animation-name:nb-marquee-reverse-2}.nb-marquee-strip-1,.nb-marquee-strip-2{display:flex;width:max-content;min-width:100%;align-items:center;flex-shrink:0}.nb-marquee-wrapper.nb-pause-on-hover:hover .nb-marquee-strip-1,.nb-marquee-wrapper.nb-pause-on-hover:hover .nb-marquee-strip-2{animation-play-state:paused}\n"] }]
|
|
633
|
+
}], ctorParameters: () => [], propDecorators: { duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], reverse: [{ type: i0.Input, args: [{ isSignal: true, alias: "reverse", required: false }] }], pauseOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "pauseOnHover", required: false }] }], wrapper: [{ type: i0.ViewChild, args: ['wrapper', { isSignal: true }] }], strip1: [{ type: i0.ViewChild, args: ['strip1', { isSignal: true }] }], strip2: [{ type: i0.ViewChild, args: ['strip2', { isSignal: true }] }] } });
|
|
634
|
+
|
|
635
|
+
class NbMarqueeItem {
|
|
636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbMarqueeItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
637
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbMarqueeItem, isStandalone: true, selector: "nb-marquee-item", host: { classAttribute: "mx-4 inline-flex shrink-0 items-center text-4xl whitespace-nowrap" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
638
|
+
}
|
|
639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbMarqueeItem, decorators: [{
|
|
640
|
+
type: Component,
|
|
641
|
+
args: [{
|
|
642
|
+
selector: 'nb-marquee-item',
|
|
643
|
+
host: {
|
|
644
|
+
class: 'mx-4 inline-flex shrink-0 items-center text-4xl whitespace-nowrap',
|
|
645
|
+
},
|
|
646
|
+
template: `<ng-content />`,
|
|
647
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
648
|
+
}]
|
|
649
|
+
}] });
|
|
650
|
+
|
|
651
|
+
const NB_INPUT_GROUP = new InjectionToken('NB_INPUT_GROUP');
|
|
652
|
+
const NB_INPUT_PREFIX = new InjectionToken('NB_INPUT_PREFIX');
|
|
653
|
+
const NB_INPUT_SUFFIX = new InjectionToken('NB_INPUT_SUFFIX');
|
|
654
|
+
|
|
655
|
+
class NbInput {
|
|
656
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
657
|
+
group = inject(NB_INPUT_GROUP, { optional: true });
|
|
658
|
+
classes = computed(() => {
|
|
659
|
+
const inGroup = this.group !== null;
|
|
660
|
+
return nbClass('[--nb-input-bg:var(--nb-field-bg)]', '[--nb-input-fg:var(--nb-foreground)]', '[--nb-input-border:var(--nb-border)]', '[--nb-input-radius:var(--nb-radius)]', '[--nb-input-shadow:var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]', 'flex border-2 border-(--nb-input-border)', 'bg-(--nb-input-bg) text-(--nb-input-fg)', 'font-medium', 'placeholder:text-gray-400', 'file:h-full file:py-0 file:my-0 file:mr-3 file:px-3', 'file:cursor-pointer file:text-sm file:font-bold', 'file:bg-(--nb-main) file:text-(--nb-main-foreground)', 'file:border-0 file:border-r-2 file:border-(--nb-input-border)', 'disabled:opacity-50 disabled:cursor-not-allowed', inGroup
|
|
661
|
+
? [
|
|
662
|
+
'flex-1 min-w-0',
|
|
663
|
+
'bg-transparent',
|
|
664
|
+
'border-0',
|
|
665
|
+
'focus-visible:outline-none',
|
|
666
|
+
]
|
|
667
|
+
: [
|
|
668
|
+
'rounded-(--nb-input-radius)',
|
|
669
|
+
'shadow-[var(--nb-input-shadow)]',
|
|
670
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--nb-input-border)',
|
|
671
|
+
'focus-visible:ring-offset-2 focus-visible:shadow-none',
|
|
672
|
+
]);
|
|
673
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
675
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbInput, isStandalone: true, selector: "input[nbInput]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-size": "size()" } }, ngImport: i0 });
|
|
676
|
+
}
|
|
677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInput, decorators: [{
|
|
678
|
+
type: Directive,
|
|
679
|
+
args: [{
|
|
680
|
+
selector: 'input[nbInput]',
|
|
681
|
+
host: {
|
|
682
|
+
'[class]': 'classes()',
|
|
683
|
+
'[attr.data-size]': 'size()',
|
|
684
|
+
},
|
|
685
|
+
}]
|
|
686
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
687
|
+
|
|
688
|
+
class NbLabel {
|
|
689
|
+
classes = nbClass('font-bold leading-none', 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50');
|
|
690
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
691
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NbLabel, isStandalone: true, selector: "label[nbLabel]", host: { properties: { "class": "classes" } }, ngImport: i0 });
|
|
692
|
+
}
|
|
693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbLabel, decorators: [{
|
|
694
|
+
type: Directive,
|
|
695
|
+
args: [{
|
|
696
|
+
selector: 'label[nbLabel]',
|
|
697
|
+
host: {
|
|
698
|
+
'[class]': 'classes',
|
|
699
|
+
},
|
|
700
|
+
}]
|
|
701
|
+
}] });
|
|
702
|
+
|
|
703
|
+
class NbTitle {
|
|
704
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
705
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NbTitle, isStandalone: true, selector: "[nbTitle]", host: { properties: { "attr.data-nb-title": "\"\"" } }, ngImport: i0 });
|
|
706
|
+
}
|
|
707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbTitle, decorators: [{
|
|
708
|
+
type: Directive,
|
|
709
|
+
args: [{
|
|
710
|
+
selector: '[nbTitle]',
|
|
711
|
+
host: {
|
|
712
|
+
'[attr.data-nb-title]': '""',
|
|
713
|
+
},
|
|
714
|
+
}]
|
|
715
|
+
}] });
|
|
716
|
+
|
|
717
|
+
class NbTextarea {
|
|
718
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
719
|
+
group = inject(NB_INPUT_GROUP, { optional: true });
|
|
720
|
+
classes = computed(() => {
|
|
721
|
+
const inGroup = this.group !== null;
|
|
722
|
+
return nbClass('[--nb-textarea-bg:var(--nb-input-bg,var(--nb-field-bg))]', '[--nb-textarea-fg:var(--nb-foreground)]', '[--nb-textarea-border:var(--nb-border)]', '[--nb-textarea-radius:var(--nb-radius)]', '[--nb-textarea-shadow:var(--nb-shadow-offset-x)_var(--nb-shadow-offset-y)_0_var(--nb-shadow)]', 'flex border-2 border-(--nb-textarea-border)', 'bg-(--nb-textarea-bg) text-(--nb-textarea-fg)', 'font-medium', 'placeholder:text-gray-400', 'disabled:opacity-50 disabled:cursor-not-allowed', 'resize-none', inGroup
|
|
723
|
+
? [
|
|
724
|
+
'flex-1 min-w-0',
|
|
725
|
+
'bg-transparent',
|
|
726
|
+
'border-0',
|
|
727
|
+
'focus-visible:outline-none',
|
|
728
|
+
]
|
|
729
|
+
: [
|
|
730
|
+
'rounded-(--nb-textarea-radius)',
|
|
731
|
+
'shadow-[var(--nb-textarea-shadow)]',
|
|
732
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--nb-textarea-border)',
|
|
733
|
+
'focus-visible:ring-offset-2 focus-visible:shadow-none',
|
|
734
|
+
]);
|
|
735
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
736
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbTextarea, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
737
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbTextarea, isStandalone: true, selector: "textarea[nbTextarea]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-size": "size()" } }, ngImport: i0 });
|
|
738
|
+
}
|
|
739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbTextarea, decorators: [{
|
|
740
|
+
type: Directive,
|
|
741
|
+
args: [{
|
|
742
|
+
selector: 'textarea[nbTextarea]',
|
|
743
|
+
host: {
|
|
744
|
+
'[class]': 'classes()',
|
|
745
|
+
'[attr.data-size]': 'size()',
|
|
746
|
+
},
|
|
747
|
+
}]
|
|
748
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
749
|
+
|
|
750
|
+
class NbInputGroup {
|
|
751
|
+
prefixes = contentChildren(NB_INPUT_PREFIX, ...(ngDevMode ? [{ debugName: "prefixes" }] : /* istanbul ignore next */ []));
|
|
752
|
+
suffixes = contentChildren(NB_INPUT_SUFFIX, ...(ngDevMode ? [{ debugName: "suffixes" }] : /* istanbul ignore next */ []));
|
|
753
|
+
hasPrefix = computed(() => this.prefixes().length > 0, ...(ngDevMode ? [{ debugName: "hasPrefix" }] : /* istanbul ignore next */ []));
|
|
754
|
+
hasSuffix = computed(() => this.suffixes().length > 0, ...(ngDevMode ? [{ debugName: "hasSuffix" }] : /* istanbul ignore next */ []));
|
|
755
|
+
classes = computed(() => nbClass('[--nb-input-group-bg:var(--nb-input-bg,var(--nb-field-bg))]', '[--nb-input-group-border:var(--nb-border)]', '[--nb-input-group-radius:var(--nb-radius)]', 'relative inline-flex w-full rounded-(--nb-input-group-radius) border-2 border-(--nb-input-group-border)', 'bg-(--nb-input-group-bg) shadow-nb focus-within:outline-none', 'focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-(--nb-input-group-border) focus-within:shadow-none'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
756
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInputGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
757
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NbInputGroup, isStandalone: true, selector: "nb-input-group", host: { properties: { "class": "classes()" } }, providers: [{ provide: NB_INPUT_GROUP, useExisting: NbInputGroup }], queries: [{ propertyName: "prefixes", predicate: NB_INPUT_PREFIX, isSignal: true }, { propertyName: "suffixes", predicate: NB_INPUT_SUFFIX, isSignal: true }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
758
|
+
}
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInputGroup, decorators: [{
|
|
760
|
+
type: Component,
|
|
761
|
+
args: [{
|
|
762
|
+
selector: 'nb-input-group',
|
|
763
|
+
template: `<ng-content />`,
|
|
764
|
+
host: {
|
|
765
|
+
'[class]': 'classes()',
|
|
766
|
+
},
|
|
767
|
+
providers: [{ provide: NB_INPUT_GROUP, useExisting: NbInputGroup }],
|
|
768
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
769
|
+
}]
|
|
770
|
+
}], propDecorators: { prefixes: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NB_INPUT_PREFIX), { isSignal: true }] }], suffixes: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NB_INPUT_SUFFIX), { isSignal: true }] }] } });
|
|
771
|
+
|
|
772
|
+
class NbInputPrefix {
|
|
773
|
+
align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
774
|
+
classes = computed(() => nbClass('[--nb-input-group-addon-bg:#ffd24a]', '[--nb-input-group-prefix-bg:var(--nb-input-group-addon-bg)]', 'flex w-12 shrink-0 justify-center', 'border-r-2 border-(--nb-input-group-border,var(--nb-border))', 'bg-(--nb-input-group-prefix-bg)', this.align() === 'stretch'
|
|
775
|
+
? 'self-stretch items-start pt-2'
|
|
776
|
+
: 'items-center'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
777
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInputPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
778
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbInputPrefix, isStandalone: true, selector: "[nbInputPrefix]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-align": "align()" } }, providers: [{ provide: NB_INPUT_PREFIX, useExisting: NbInputPrefix }], ngImport: i0 });
|
|
779
|
+
}
|
|
780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInputPrefix, decorators: [{
|
|
781
|
+
type: Directive,
|
|
782
|
+
args: [{
|
|
783
|
+
selector: '[nbInputPrefix]',
|
|
784
|
+
host: {
|
|
785
|
+
'[class]': 'classes()',
|
|
786
|
+
'[attr.data-align]': 'align()',
|
|
787
|
+
},
|
|
788
|
+
providers: [{ provide: NB_INPUT_PREFIX, useExisting: NbInputPrefix }],
|
|
789
|
+
}]
|
|
790
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
|
|
791
|
+
|
|
792
|
+
class NbInputSuffix {
|
|
793
|
+
align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
794
|
+
classes = computed(() => nbClass('[--nb-input-group-addon-bg:#ffd24a]', '[--nb-input-group-suffix-bg:var(--nb-input-group-addon-bg)]', 'flex w-12 shrink-0 items-center justify-center', 'border-l-2 border-(--nb-input-group-border,var(--nb-border))', 'bg-(--nb-input-group-suffix-bg)', this.align() === 'stretch' ? 'self-stretch' : ''), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
795
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInputSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
796
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbInputSuffix, isStandalone: true, selector: "[nbInputSuffix]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-align": "align()" } }, providers: [{ provide: NB_INPUT_SUFFIX, useExisting: NbInputSuffix }], ngImport: i0 });
|
|
797
|
+
}
|
|
798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbInputSuffix, decorators: [{
|
|
799
|
+
type: Directive,
|
|
800
|
+
args: [{
|
|
801
|
+
selector: '[nbInputSuffix]',
|
|
802
|
+
host: {
|
|
803
|
+
'[class]': 'classes()',
|
|
804
|
+
'[attr.data-align]': 'align()',
|
|
805
|
+
},
|
|
806
|
+
providers: [{ provide: NB_INPUT_SUFFIX, useExisting: NbInputSuffix }],
|
|
807
|
+
}]
|
|
808
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
|
|
809
|
+
|
|
810
|
+
class NbNativeSelect {
|
|
811
|
+
group = inject(NB_INPUT_GROUP, { optional: true });
|
|
812
|
+
classes = computed(() => {
|
|
813
|
+
const inGroup = this.group !== null;
|
|
814
|
+
return nbClass('[--nb-select-bg:var(--nb-input-bg,var(--nb-field-bg))]', '[--nb-select-fg:var(--nb-foreground)]', '[--nb-select-border:var(--nb-border)]', '[--nb-select-radius:var(--nb-radius)]', 'flex border-2 border-(--nb-select-border)', 'bg-(--nb-select-bg) text-(--nb-select-fg)', 'font-medium', 'appearance-none', 'pr-10', 'has-[option:disabled:checked]:text-gray-400', 'disabled:opacity-50 disabled:cursor-not-allowed', inGroup
|
|
815
|
+
? [
|
|
816
|
+
'flex-1 min-w-0',
|
|
817
|
+
'bg-transparent',
|
|
818
|
+
'border-0',
|
|
819
|
+
'focus-visible:outline-none',
|
|
820
|
+
]
|
|
821
|
+
: [
|
|
822
|
+
'rounded-(--nb-select-radius)',
|
|
823
|
+
'shadow-nb',
|
|
824
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--nb-select-border)',
|
|
825
|
+
'focus-visible:ring-offset-2 focus-visible:shadow-none',
|
|
826
|
+
]);
|
|
827
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
828
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbNativeSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
829
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NbNativeSelect, isStandalone: true, selector: "select[nbSelect]", host: { properties: { "class": "classes()" } }, ngImport: i0 });
|
|
830
|
+
}
|
|
831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbNativeSelect, decorators: [{
|
|
832
|
+
type: Directive,
|
|
833
|
+
args: [{
|
|
834
|
+
selector: 'select[nbSelect]',
|
|
835
|
+
host: {
|
|
836
|
+
'[class]': 'classes()',
|
|
837
|
+
},
|
|
838
|
+
}]
|
|
839
|
+
}] });
|
|
840
|
+
|
|
841
|
+
const NB_SELECT = new InjectionToken('NB_SELECT');
|
|
842
|
+
|
|
843
|
+
let nextSelectOptionId = 0;
|
|
844
|
+
class NbSelectOption {
|
|
845
|
+
element = inject(ElementRef);
|
|
846
|
+
select = inject(NB_SELECT);
|
|
847
|
+
id = `neo-select-option-${nextSelectOptionId++}`;
|
|
848
|
+
value = input(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
849
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
850
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
851
|
+
selected = computed(() => {
|
|
852
|
+
const value = this.value();
|
|
853
|
+
return this.select.isSelected(value);
|
|
854
|
+
}, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
855
|
+
showIndicator = computed(() => this.value() !== null && this.selected(), ...(ngDevMode ? [{ debugName: "showIndicator" }] : /* istanbul ignore next */ []));
|
|
856
|
+
classes = computed(() => nbClass('flex h-11 w-full items-center gap-3 px-2', 'font-mono text-base font-bold text-(--nb-select-fg)', 'transition-colors duration-150', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--nb-select-border)', 'disabled:pointer-events-none disabled:opacity-50', this.selected()
|
|
857
|
+
? 'bg-[#bdf7c8]'
|
|
858
|
+
: 'bg-transparent hover:bg-[#e8d6ff] focus-visible:bg-[#e8d6ff]'), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
859
|
+
focus() {
|
|
860
|
+
this.element.nativeElement.querySelector('button')?.focus();
|
|
861
|
+
}
|
|
862
|
+
selectOptionOnKey(event) {
|
|
863
|
+
if (event.key === 'ArrowUp') {
|
|
864
|
+
event.preventDefault();
|
|
865
|
+
this.select.focusPreviousOption(this);
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
if (event.key === 'ArrowDown') {
|
|
869
|
+
event.preventDefault();
|
|
870
|
+
this.select.focusNextOption(this);
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
if (event.key === 'Escape') {
|
|
874
|
+
event.preventDefault();
|
|
875
|
+
this.select.closeAndFocusTrigger();
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
879
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NbSelectOption, isStandalone: true, selector: "nb-select-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
880
|
+
<button
|
|
881
|
+
#button
|
|
882
|
+
type="button"
|
|
883
|
+
role="option"
|
|
884
|
+
[id]="id"
|
|
885
|
+
[attr.aria-selected]="selected()"
|
|
886
|
+
[disabled]="disabled() || select.disabled()"
|
|
887
|
+
[class]="classes()"
|
|
888
|
+
(click)="select.selectOption(this)"
|
|
889
|
+
(keydown)="selectOptionOnKey($event)"
|
|
890
|
+
>
|
|
891
|
+
<span
|
|
892
|
+
class="min-w-0 flex flex-1 items-center gap-3 truncate text-left [&_svg]:size-6 [&_svg]:shrink-0 [&_svg]:fill-none [&_svg]:stroke-current [&_svg]:stroke-[2.3] [&_svg]:stroke-linecap-round [&_svg]:stroke-linejoin-round"
|
|
893
|
+
>
|
|
894
|
+
<ng-content />
|
|
895
|
+
</span>
|
|
896
|
+
@if (showIndicator()) {
|
|
897
|
+
<svg
|
|
898
|
+
class="size-6 shrink-0 fill-none stroke-current stroke-[3] stroke-linecap-round stroke-linejoin-round"
|
|
899
|
+
viewBox="0 0 24 24"
|
|
900
|
+
aria-hidden="true"
|
|
901
|
+
>
|
|
902
|
+
<path d="m20 6-11 11-5-5" />
|
|
903
|
+
</svg>
|
|
904
|
+
}
|
|
905
|
+
</button>
|
|
906
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
907
|
+
}
|
|
908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbSelectOption, decorators: [{
|
|
909
|
+
type: Component,
|
|
910
|
+
args: [{
|
|
911
|
+
selector: 'nb-select-option',
|
|
912
|
+
template: `
|
|
913
|
+
<button
|
|
914
|
+
#button
|
|
915
|
+
type="button"
|
|
916
|
+
role="option"
|
|
917
|
+
[id]="id"
|
|
918
|
+
[attr.aria-selected]="selected()"
|
|
919
|
+
[disabled]="disabled() || select.disabled()"
|
|
920
|
+
[class]="classes()"
|
|
921
|
+
(click)="select.selectOption(this)"
|
|
922
|
+
(keydown)="selectOptionOnKey($event)"
|
|
923
|
+
>
|
|
924
|
+
<span
|
|
925
|
+
class="min-w-0 flex flex-1 items-center gap-3 truncate text-left [&_svg]:size-6 [&_svg]:shrink-0 [&_svg]:fill-none [&_svg]:stroke-current [&_svg]:stroke-[2.3] [&_svg]:stroke-linecap-round [&_svg]:stroke-linejoin-round"
|
|
926
|
+
>
|
|
927
|
+
<ng-content />
|
|
928
|
+
</span>
|
|
929
|
+
@if (showIndicator()) {
|
|
930
|
+
<svg
|
|
931
|
+
class="size-6 shrink-0 fill-none stroke-current stroke-[3] stroke-linecap-round stroke-linejoin-round"
|
|
932
|
+
viewBox="0 0 24 24"
|
|
933
|
+
aria-hidden="true"
|
|
934
|
+
>
|
|
935
|
+
<path d="m20 6-11 11-5-5" />
|
|
936
|
+
</svg>
|
|
937
|
+
}
|
|
938
|
+
</button>
|
|
939
|
+
`,
|
|
940
|
+
host: {
|
|
941
|
+
class: 'block',
|
|
942
|
+
},
|
|
943
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
944
|
+
}]
|
|
945
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
946
|
+
|
|
947
|
+
let nextSelectId = 0;
|
|
948
|
+
class NbSelect {
|
|
949
|
+
element = inject(ElementRef);
|
|
950
|
+
group = inject(NB_INPUT_GROUP, { optional: true });
|
|
951
|
+
placeholder = input('Select an option', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
952
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
953
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
954
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
955
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
956
|
+
options = contentChildren(NbSelectOption, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
957
|
+
trigger = viewChild('trigger', ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
958
|
+
open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
959
|
+
id = nextSelectId++;
|
|
960
|
+
triggerId = `neo-select-trigger-${this.id}`;
|
|
961
|
+
listboxId = `neo-select-listbox-${this.id}`;
|
|
962
|
+
selectedOption = computed(() => this.options().find((option) => option.value() === this.value()), ...(ngDevMode ? [{ debugName: "selectedOption" }] : /* istanbul ignore next */ []));
|
|
963
|
+
selectedLabel = computed(() => this.selectedOption()?.label() ?? '', ...(ngDevMode ? [{ debugName: "selectedLabel" }] : /* istanbul ignore next */ []));
|
|
964
|
+
hostClasses = computed(() => {
|
|
965
|
+
const inGroup = this.group !== null;
|
|
966
|
+
return nbClass('[--nb-select-bg:var(--nb-input-bg,var(--nb-field-bg))]', '[--nb-select-fg:var(--nb-foreground)]', '[--nb-select-border:var(--nb-border)]', '[--nb-select-radius:var(--nb-radius)]', '[--nb-select-listbox-bg:var(--nb-select-bg)]', inGroup
|
|
967
|
+
? 'block w-full'
|
|
968
|
+
: [
|
|
969
|
+
'relative block w-full',
|
|
970
|
+
'rounded-(--nb-select-radius) border-2 border-(--nb-select-border)',
|
|
971
|
+
'bg-(--nb-select-bg) shadow-nb',
|
|
972
|
+
'focus-within:outline-none focus-within:ring-2 focus-within:ring-(--nb-select-border)',
|
|
973
|
+
'focus-within:ring-offset-2 focus-within:shadow-none',
|
|
974
|
+
'data-[disabled]:border-gray-400 data-[disabled]:shadow-[5px_5px_0_0_#a3a3a3]',
|
|
975
|
+
]);
|
|
976
|
+
}, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
|
|
977
|
+
triggerClasses = computed(() => {
|
|
978
|
+
const inGroup = this.group !== null;
|
|
979
|
+
return nbClass('flex h-14 w-full items-center gap-4 font-mono text-base font-bold', 'text-(--nb-select-fg) transition-all duration-150', 'disabled:cursor-not-allowed disabled:text-gray-400', inGroup
|
|
980
|
+
? ['flex-1 min-w-0 bg-transparent px-3 focus-visible:outline-none']
|
|
981
|
+
: ['flex-1 min-w-0 bg-transparent px-5 focus-visible:outline-none']);
|
|
982
|
+
}, ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
|
|
983
|
+
valueClasses = computed(() => nbClass('min-w-0 flex-1 truncate text-left', this.selectedLabel() ? 'text-(--nb-select-fg)' : 'text-gray-400'), ...(ngDevMode ? [{ debugName: "valueClasses" }] : /* istanbul ignore next */ []));
|
|
984
|
+
listboxClasses = nbClass('absolute z-50 top-[calc(100%+8px)]', 'left-[-6px] w-[calc(100%+12px)] mt-0.5', 'rounded-b-(--nb-select-radius) border-2 border-(--nb-select-border) bg-(--nb-select-listbox-bg)', 'shadow-nb');
|
|
985
|
+
isSelected(value) {
|
|
986
|
+
return this.value() === value;
|
|
987
|
+
}
|
|
988
|
+
selectOption(option) {
|
|
989
|
+
if (this.disabled() || option.disabled()) {
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
this.value.set(option.value());
|
|
993
|
+
this.closeAndFocusTrigger();
|
|
994
|
+
}
|
|
995
|
+
toggle() {
|
|
996
|
+
if (!this.disabled()) {
|
|
997
|
+
this.open.update((open) => !open);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
openAndFocusOption() {
|
|
1001
|
+
if (this.disabled()) {
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
this.open.set(true);
|
|
1005
|
+
queueMicrotask(() => {
|
|
1006
|
+
(this.selectedOption() ?? this.firstEnabledOption())?.focus();
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
closeAndFocusTrigger() {
|
|
1010
|
+
this.open.set(false);
|
|
1011
|
+
queueMicrotask(() => this.trigger()?.nativeElement.focus());
|
|
1012
|
+
}
|
|
1013
|
+
focusPreviousOption(current) {
|
|
1014
|
+
this.focusRelativeOption(current, -1);
|
|
1015
|
+
}
|
|
1016
|
+
focusNextOption(current) {
|
|
1017
|
+
this.focusRelativeOption(current, 1);
|
|
1018
|
+
}
|
|
1019
|
+
openListboxOnKey(event) {
|
|
1020
|
+
if (event.key === 'ArrowDown' ||
|
|
1021
|
+
event.key === 'Enter' ||
|
|
1022
|
+
event.key === ' ') {
|
|
1023
|
+
event.preventDefault();
|
|
1024
|
+
this.openAndFocusOption();
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
closeOnOutsideClick(event) {
|
|
1028
|
+
if (!this.element.nativeElement.contains(event.target)) {
|
|
1029
|
+
this.open.set(false);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
firstEnabledOption() {
|
|
1033
|
+
return this.options().find((option) => !option.disabled());
|
|
1034
|
+
}
|
|
1035
|
+
focusRelativeOption(current, direction) {
|
|
1036
|
+
const options = this.options().filter((option) => !option.disabled());
|
|
1037
|
+
const currentIndex = options.indexOf(current);
|
|
1038
|
+
const nextIndex = (currentIndex + direction + options.length) % options.length;
|
|
1039
|
+
options[nextIndex]?.focus();
|
|
1040
|
+
}
|
|
1041
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1042
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NbSelect, isStandalone: true, selector: "nb-select", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", open: "openChange" }, host: { listeners: { "document:click": "closeOnOutsideClick($event)" }, properties: { "class": "hostClasses()", "attr.data-state": "open() ? \"open\" : \"closed\"", "attr.data-disabled": "disabled() ? \"\" : null" } }, providers: [{ provide: NB_SELECT, useExisting: NbSelect }], queries: [{ propertyName: "options", predicate: NbSelectOption, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1043
|
+
<button
|
|
1044
|
+
#trigger
|
|
1045
|
+
type="button"
|
|
1046
|
+
[id]="triggerId"
|
|
1047
|
+
[class]="triggerClasses()"
|
|
1048
|
+
[disabled]="disabled()"
|
|
1049
|
+
[attr.aria-haspopup]="'listbox'"
|
|
1050
|
+
[attr.aria-expanded]="open()"
|
|
1051
|
+
[attr.aria-controls]="listboxId"
|
|
1052
|
+
[attr.aria-label]="ariaLabel()"
|
|
1053
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
1054
|
+
(click)="toggle()"
|
|
1055
|
+
(keydown)="openListboxOnKey($event)"
|
|
1056
|
+
>
|
|
1057
|
+
<span [class]="valueClasses()">
|
|
1058
|
+
{{ selectedLabel() || placeholder() }}
|
|
1059
|
+
</span>
|
|
1060
|
+
|
|
1061
|
+
<svg
|
|
1062
|
+
class="size-6 shrink-0 fill-none stroke-current stroke-[3] stroke-linecap-round stroke-linejoin-round"
|
|
1063
|
+
viewBox="0 0 24 24"
|
|
1064
|
+
aria-hidden="true"
|
|
1065
|
+
>
|
|
1066
|
+
<path [attr.d]="open() ? 'm18 15-6-6-6 6' : 'm6 9 6 6 6-6'" />
|
|
1067
|
+
</svg>
|
|
1068
|
+
</button>
|
|
1069
|
+
|
|
1070
|
+
@if (open()) {
|
|
1071
|
+
<div
|
|
1072
|
+
[id]="listboxId"
|
|
1073
|
+
role="listbox"
|
|
1074
|
+
[attr.aria-labelledby]="triggerId"
|
|
1075
|
+
[class]="listboxClasses"
|
|
1076
|
+
>
|
|
1077
|
+
<ng-content />
|
|
1078
|
+
</div>
|
|
1079
|
+
}
|
|
1080
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1081
|
+
}
|
|
1082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbSelect, decorators: [{
|
|
1083
|
+
type: Component,
|
|
1084
|
+
args: [{
|
|
1085
|
+
selector: 'nb-select',
|
|
1086
|
+
template: `
|
|
1087
|
+
<button
|
|
1088
|
+
#trigger
|
|
1089
|
+
type="button"
|
|
1090
|
+
[id]="triggerId"
|
|
1091
|
+
[class]="triggerClasses()"
|
|
1092
|
+
[disabled]="disabled()"
|
|
1093
|
+
[attr.aria-haspopup]="'listbox'"
|
|
1094
|
+
[attr.aria-expanded]="open()"
|
|
1095
|
+
[attr.aria-controls]="listboxId"
|
|
1096
|
+
[attr.aria-label]="ariaLabel()"
|
|
1097
|
+
[attr.aria-labelledby]="ariaLabelledby()"
|
|
1098
|
+
(click)="toggle()"
|
|
1099
|
+
(keydown)="openListboxOnKey($event)"
|
|
1100
|
+
>
|
|
1101
|
+
<span [class]="valueClasses()">
|
|
1102
|
+
{{ selectedLabel() || placeholder() }}
|
|
1103
|
+
</span>
|
|
1104
|
+
|
|
1105
|
+
<svg
|
|
1106
|
+
class="size-6 shrink-0 fill-none stroke-current stroke-[3] stroke-linecap-round stroke-linejoin-round"
|
|
1107
|
+
viewBox="0 0 24 24"
|
|
1108
|
+
aria-hidden="true"
|
|
1109
|
+
>
|
|
1110
|
+
<path [attr.d]="open() ? 'm18 15-6-6-6 6' : 'm6 9 6 6 6-6'" />
|
|
1111
|
+
</svg>
|
|
1112
|
+
</button>
|
|
1113
|
+
|
|
1114
|
+
@if (open()) {
|
|
1115
|
+
<div
|
|
1116
|
+
[id]="listboxId"
|
|
1117
|
+
role="listbox"
|
|
1118
|
+
[attr.aria-labelledby]="triggerId"
|
|
1119
|
+
[class]="listboxClasses"
|
|
1120
|
+
>
|
|
1121
|
+
<ng-content />
|
|
1122
|
+
</div>
|
|
1123
|
+
}
|
|
1124
|
+
`,
|
|
1125
|
+
host: {
|
|
1126
|
+
'[class]': 'hostClasses()',
|
|
1127
|
+
'[attr.data-state]': 'open() ? "open" : "closed"',
|
|
1128
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
1129
|
+
'(document:click)': 'closeOnOutsideClick($event)',
|
|
1130
|
+
},
|
|
1131
|
+
providers: [{ provide: NB_SELECT, useExisting: NbSelect }],
|
|
1132
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1133
|
+
}]
|
|
1134
|
+
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", 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 }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => NbSelectOption), { isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
|
|
1135
|
+
|
|
1136
|
+
class NbBadge {
|
|
1137
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1138
|
+
classes = computed(() => nbClass('inline-flex items-center rounded-(--nb-badge-radius) border-2 border-(--nb-badge-border)', 'bg-(--nb-badge-bg) text-(--nb-badge-fg)', '[--nb-badge-bg:#fff]', '[--nb-badge-fg:var(--nb-foreground)]', '[--nb-badge-border:var(--nb-border)]', '[--nb-badge-radius:9999px]', '[--nb-badge-shadow:2px_2px_0_var(--nb-shadow)]', 'px-2.5 py-0.5 text-xs font-bold', 'shadow-[var(--nb-badge-shadow)]', this.variantClass()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
1139
|
+
variantClass() {
|
|
1140
|
+
const map = {
|
|
1141
|
+
default: '',
|
|
1142
|
+
secondary: '[--nb-badge-bg:var(--nb-accent)] [--nb-badge-fg:var(--nb-accent-foreground)]',
|
|
1143
|
+
success: '[--nb-badge-bg:var(--nb-success)] [--nb-badge-fg:var(--nb-success-foreground)]',
|
|
1144
|
+
warning: '[--nb-badge-bg:var(--nb-warning)] [--nb-badge-fg:var(--nb-warning-foreground)]',
|
|
1145
|
+
danger: '[--nb-badge-bg:var(--nb-danger)] [--nb-badge-fg:var(--nb-danger-foreground)]',
|
|
1146
|
+
};
|
|
1147
|
+
return map[this.variant()];
|
|
1148
|
+
}
|
|
1149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1150
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: NbBadge, isStandalone: true, selector: "span[nbBadge]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-variant": "variant()" } }, ngImport: i0 });
|
|
1151
|
+
}
|
|
1152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbBadge, decorators: [{
|
|
1153
|
+
type: Directive,
|
|
1154
|
+
args: [{
|
|
1155
|
+
selector: 'span[nbBadge]',
|
|
1156
|
+
host: {
|
|
1157
|
+
'[class]': 'classes()',
|
|
1158
|
+
'[attr.data-variant]': 'variant()',
|
|
1159
|
+
},
|
|
1160
|
+
}]
|
|
1161
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
1162
|
+
|
|
1163
|
+
class NbAvatar {
|
|
1164
|
+
src = input(undefined, ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
1165
|
+
alt = input('', ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
1166
|
+
classes = nbClass('[--nb-avatar-bg:var(--nb-secondary-background)]', '[--nb-avatar-fg:var(--nb-foreground)]', '[--nb-avatar-border:var(--nb-border)]', '[--nb-avatar-radius:9999px]', '[--nb-avatar-shadow:2px_2px_0_0_var(--nb-shadow)]', 'relative inline-flex h-10 w-10 shrink-0 overflow-hidden', 'rounded-(--nb-avatar-radius) border-2 border-(--nb-avatar-border)', 'bg-(--nb-avatar-bg) text-(--nb-avatar-fg)', 'shadow-[var(--nb-avatar-shadow)]', 'font-bold text-sm items-center justify-center');
|
|
1167
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: NbAvatar, isStandalone: true, selector: "nb-avatar", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes", "attr.data-slot": "\"avatar\"", "attr.role": "\"img\"", "attr.aria-label": "alt()" } }, ngImport: i0, template: `
|
|
1169
|
+
@if (src()) {
|
|
1170
|
+
<img [src]="src()" [alt]="alt()" class="h-full w-full object-cover" />
|
|
1171
|
+
} @else {
|
|
1172
|
+
<ng-content />
|
|
1173
|
+
}
|
|
1174
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1175
|
+
}
|
|
1176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbAvatar, decorators: [{
|
|
1177
|
+
type: Component,
|
|
1178
|
+
args: [{
|
|
1179
|
+
selector: 'nb-avatar',
|
|
1180
|
+
template: `
|
|
1181
|
+
@if (src()) {
|
|
1182
|
+
<img [src]="src()" [alt]="alt()" class="h-full w-full object-cover" />
|
|
1183
|
+
} @else {
|
|
1184
|
+
<ng-content />
|
|
1185
|
+
}
|
|
1186
|
+
`,
|
|
1187
|
+
host: {
|
|
1188
|
+
'[class]': 'classes',
|
|
1189
|
+
'[attr.data-slot]': '"avatar"',
|
|
1190
|
+
'[attr.role]': '"img"',
|
|
1191
|
+
'[attr.aria-label]': 'alt()',
|
|
1192
|
+
},
|
|
1193
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1194
|
+
}]
|
|
1195
|
+
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }] } });
|
|
1196
|
+
|
|
1197
|
+
const NB_DIALOG = new InjectionToken('NB_DIALOG');
|
|
1198
|
+
|
|
1199
|
+
class NbDialog {
|
|
1200
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
1201
|
+
dialogEl = viewChild.required('dialogEl');
|
|
1202
|
+
classes = nbClass('[--nb-dialog-bg:#fff]', '[--nb-dialog-fg:var(--nb-foreground)]', '[--nb-dialog-border:var(--nb-border)]', '[--nb-dialog-radius:0.5rem]', '[--nb-dialog-shadow:8px_8px_0_0_var(--nb-shadow)]', 'w-[calc(100vw-2rem)] max-w-2xl rounded-(--nb-dialog-radius)', 'border-2 border-(--nb-dialog-border)', 'bg-(--nb-dialog-bg) text-(--nb-dialog-fg)', 'shadow-[var(--nb-dialog-shadow)]', 'm-auto p-0 max-h-[90vh] overflow-x-hidden', 'open:flex open:flex-col');
|
|
1203
|
+
open() {
|
|
1204
|
+
if (this.isBrowser) {
|
|
1205
|
+
this.dialogEl().nativeElement.showModal();
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
close() {
|
|
1209
|
+
if (this.isBrowser) {
|
|
1210
|
+
this.dialogEl().nativeElement.close();
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
dismissOnBackdrop(event) {
|
|
1214
|
+
if (event.target === this.dialogEl().nativeElement) {
|
|
1215
|
+
this.close();
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1219
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: NbDialog, isStandalone: true, selector: "nb-dialog", host: { properties: { "attr.data-slot": "\"dialog\"" } }, providers: [{ provide: NB_DIALOG, useExisting: NbDialog }], viewQueries: [{ propertyName: "dialogEl", first: true, predicate: ["dialogEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1220
|
+
<dialog
|
|
1221
|
+
#dialogEl
|
|
1222
|
+
data-nb-dialog
|
|
1223
|
+
[class]="classes"
|
|
1224
|
+
(click)="dismissOnBackdrop($event)"
|
|
1225
|
+
>
|
|
1226
|
+
<ng-content />
|
|
1227
|
+
</dialog>
|
|
1228
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1229
|
+
}
|
|
1230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialog, decorators: [{
|
|
1231
|
+
type: Component,
|
|
1232
|
+
args: [{
|
|
1233
|
+
selector: 'nb-dialog',
|
|
1234
|
+
template: `
|
|
1235
|
+
<dialog
|
|
1236
|
+
#dialogEl
|
|
1237
|
+
data-nb-dialog
|
|
1238
|
+
[class]="classes"
|
|
1239
|
+
(click)="dismissOnBackdrop($event)"
|
|
1240
|
+
>
|
|
1241
|
+
<ng-content />
|
|
1242
|
+
</dialog>
|
|
1243
|
+
`,
|
|
1244
|
+
host: { '[attr.data-slot]': '"dialog"' },
|
|
1245
|
+
providers: [{ provide: NB_DIALOG, useExisting: NbDialog }],
|
|
1246
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1247
|
+
}]
|
|
1248
|
+
}], propDecorators: { dialogEl: [{ type: i0.ViewChild, args: ['dialogEl', { isSignal: true }] }] } });
|
|
1249
|
+
|
|
1250
|
+
class NbDialogTitle {
|
|
1251
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1252
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NbDialogTitle, isStandalone: true, selector: "[nbDialogTitle]", host: { properties: { "attr.data-slot": "\"dialog-title\"" } }, ngImport: i0 });
|
|
1253
|
+
}
|
|
1254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogTitle, decorators: [{
|
|
1255
|
+
type: Directive,
|
|
1256
|
+
args: [{
|
|
1257
|
+
selector: '[nbDialogTitle]',
|
|
1258
|
+
host: {
|
|
1259
|
+
'[attr.data-slot]': '"dialog-title"',
|
|
1260
|
+
},
|
|
1261
|
+
}]
|
|
1262
|
+
}] });
|
|
1263
|
+
|
|
1264
|
+
class NbDialogDescription {
|
|
1265
|
+
classes = nbClass('[--nb-dialog-description-fg:#4b5563]', 'text-(--nb-dialog-description-fg)');
|
|
1266
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1267
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NbDialogDescription, isStandalone: true, selector: "[nbDialogDescription]", host: { properties: { "class": "classes", "attr.data-slot": "\"dialog-description\"" } }, ngImport: i0 });
|
|
1268
|
+
}
|
|
1269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogDescription, decorators: [{
|
|
1270
|
+
type: Directive,
|
|
1271
|
+
args: [{
|
|
1272
|
+
selector: '[nbDialogDescription]',
|
|
1273
|
+
host: {
|
|
1274
|
+
'[class]': 'classes',
|
|
1275
|
+
'[attr.data-slot]': '"dialog-description"',
|
|
1276
|
+
},
|
|
1277
|
+
}]
|
|
1278
|
+
}] });
|
|
1279
|
+
|
|
1280
|
+
class NbDialogContent {
|
|
1281
|
+
classes = nbClass('[--nb-dialog-content-bg:transparent]', 'bg-(--nb-dialog-content-bg)');
|
|
1282
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1283
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbDialogContent, isStandalone: true, selector: "nb-dialog-content", host: { properties: { "class": "classes", "attr.data-slot": "\"dialog-content\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1284
|
+
}
|
|
1285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogContent, decorators: [{
|
|
1286
|
+
type: Component,
|
|
1287
|
+
args: [{
|
|
1288
|
+
selector: 'nb-dialog-content',
|
|
1289
|
+
template: `<ng-content />`,
|
|
1290
|
+
host: {
|
|
1291
|
+
'[class]': 'classes',
|
|
1292
|
+
'[attr.data-slot]': '"dialog-content"',
|
|
1293
|
+
},
|
|
1294
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1295
|
+
}]
|
|
1296
|
+
}] });
|
|
1297
|
+
|
|
1298
|
+
class NbDialogActions {
|
|
1299
|
+
classes = nbClass('[--nb-dialog-actions-bg:transparent]', 'bg-(--nb-dialog-actions-bg)');
|
|
1300
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1301
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NbDialogActions, isStandalone: true, selector: "nb-dialog-actions", host: { properties: { "class": "classes", "attr.data-slot": "\"dialog-actions\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1302
|
+
}
|
|
1303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogActions, decorators: [{
|
|
1304
|
+
type: Component,
|
|
1305
|
+
args: [{
|
|
1306
|
+
selector: 'nb-dialog-actions',
|
|
1307
|
+
template: `<ng-content />`,
|
|
1308
|
+
host: {
|
|
1309
|
+
'[class]': 'classes',
|
|
1310
|
+
'[attr.data-slot]': '"dialog-actions"',
|
|
1311
|
+
},
|
|
1312
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1313
|
+
}]
|
|
1314
|
+
}] });
|
|
1315
|
+
|
|
1316
|
+
class NbDialogClose {
|
|
1317
|
+
controller = inject(NB_DIALOG);
|
|
1318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1319
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: NbDialogClose, isStandalone: true, selector: "[nbDialogClose]", host: { listeners: { "click": "controller.close()" } }, ngImport: i0 });
|
|
1320
|
+
}
|
|
1321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NbDialogClose, decorators: [{
|
|
1322
|
+
type: Directive,
|
|
1323
|
+
args: [{
|
|
1324
|
+
selector: '[nbDialogClose]',
|
|
1325
|
+
host: { '(click)': 'controller.close()' },
|
|
1326
|
+
}]
|
|
1327
|
+
}] });
|
|
1328
|
+
|
|
1329
|
+
// Foundation
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* Generated bundle index. Do not edit.
|
|
1333
|
+
*/
|
|
1334
|
+
|
|
1335
|
+
export { NB_THEME_CONFIG, NbAccordion, NbAccordionContent, NbAccordionItem, NbAccordionTrigger, NbAvatar, NbBadge, NbButton, NbCard, NbCardActions, NbCardContent, NbCardDescription, NbCardFooter, NbCardHeader, NbCardTitle, NbCheckbox, NbDialog, NbDialogActions, NbDialogClose, NbDialogContent, NbDialogDescription, NbDialogTitle, NbImageCard, NbImageCardCaption, NbInput, NbInputGroup, NbInputPrefix, NbInputSuffix, NbLabel, NbMarquee, NbMarqueeItem, NbNativeSelect, NbSelect, NbSelectOption, NbTextarea, NbTitle, nbClass, provideNgBrutalism };
|
|
1336
|
+
//# sourceMappingURL=ng-brutalism-ui.mjs.map
|