ng-blatui 1.6.0 → 1.8.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/fesm2022/ng-blatui.mjs +383 -3
- package/fesm2022/ng-blatui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-blatui.d.ts +118 -2
package/fesm2022/ng-blatui.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, computed, Directive, Component, signal, model, inject, PLATFORM_ID, effect, Injectable, ElementRef } from '@angular/core';
|
|
4
|
+
import { input, computed, Directive, Component, signal, model, inject, PLATFORM_ID, effect, Injectable, ElementRef, ViewContainerRef } from '@angular/core';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
export { AccordionContent, AccordionGroup, AccordionPanel, AccordionTrigger, ɵɵDeferredContent, ɵɵDeferredContentAware } from '@angular/aria/accordion';
|
|
7
7
|
export { Tab, TabContent, TabList, TabPanel, Tabs } from '@angular/aria/tabs';
|
|
@@ -9,7 +9,7 @@ export { DIALOG_DATA, Dialog, DialogModule, DialogRef } from '@angular/cdk/dialo
|
|
|
9
9
|
import { isPlatformBrowser } from '@angular/common';
|
|
10
10
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
11
11
|
import { Overlay } from '@angular/cdk/overlay';
|
|
12
|
-
import { ComponentPortal } from '@angular/cdk/portal';
|
|
12
|
+
import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Merge class names with `clsx` semantics and resolve Tailwind conflicts with
|
|
@@ -3133,6 +3133,386 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
3133
3133
|
}]
|
|
3134
3134
|
}], propDecorators: { avatars: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatars", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3135
3135
|
|
|
3136
|
+
/** Pagination navigation landmark. */
|
|
3137
|
+
class BuiPagination {
|
|
3138
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3139
|
+
computedClass = computed(() => cn('mx-auto flex w-full justify-center', this.userClass()), /* @ts-ignore */
|
|
3140
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPagination, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3142
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiPagination, isStandalone: true, selector: "nav[buiPagination]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation", "aria-label": "pagination", "data-slot": "pagination" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3143
|
+
}
|
|
3144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPagination, decorators: [{
|
|
3145
|
+
type: Directive,
|
|
3146
|
+
args: [{
|
|
3147
|
+
selector: 'nav[buiPagination]',
|
|
3148
|
+
host: {
|
|
3149
|
+
role: 'navigation',
|
|
3150
|
+
'aria-label': 'pagination',
|
|
3151
|
+
'data-slot': 'pagination',
|
|
3152
|
+
'[class]': 'computedClass()',
|
|
3153
|
+
},
|
|
3154
|
+
}]
|
|
3155
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3156
|
+
class BuiPaginationContent {
|
|
3157
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3158
|
+
computedClass = computed(() => cn('flex flex-row items-center gap-1', this.userClass()), /* @ts-ignore */
|
|
3159
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3161
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiPaginationContent, isStandalone: true, selector: "ul[buiPaginationContent]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "pagination-content" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3162
|
+
}
|
|
3163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationContent, decorators: [{
|
|
3164
|
+
type: Directive,
|
|
3165
|
+
args: [{
|
|
3166
|
+
selector: 'ul[buiPaginationContent]',
|
|
3167
|
+
host: { 'data-slot': 'pagination-content', '[class]': 'computedClass()' },
|
|
3168
|
+
}]
|
|
3169
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3170
|
+
class BuiPaginationItem {
|
|
3171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3172
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: BuiPaginationItem, isStandalone: true, selector: "li[buiPaginationItem]", host: { attributes: { "data-slot": "pagination-item" } }, ngImport: i0 });
|
|
3173
|
+
}
|
|
3174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationItem, decorators: [{
|
|
3175
|
+
type: Directive,
|
|
3176
|
+
args: [{
|
|
3177
|
+
selector: 'li[buiPaginationItem]',
|
|
3178
|
+
host: { 'data-slot': 'pagination-item' },
|
|
3179
|
+
}]
|
|
3180
|
+
}] });
|
|
3181
|
+
const LINK_BASE = "inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
3182
|
+
const LINK_SIZES = {
|
|
3183
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
3184
|
+
sm: 'h-8 gap-1.5 px-3',
|
|
3185
|
+
lg: 'h-10 px-6',
|
|
3186
|
+
icon: 'size-9',
|
|
3187
|
+
};
|
|
3188
|
+
/** A pagination link; set `active` for the current page. */
|
|
3189
|
+
class BuiPaginationLink {
|
|
3190
|
+
active = input(false, /* @ts-ignore */
|
|
3191
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
3192
|
+
size = input('icon', /* @ts-ignore */
|
|
3193
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3194
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3195
|
+
computedClass = computed(() => cn(LINK_BASE, this.active()
|
|
3196
|
+
? 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground'
|
|
3197
|
+
: 'hover:bg-accent hover:text-accent-foreground', LINK_SIZES[this.size()], this.userClass()), /* @ts-ignore */
|
|
3198
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3199
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3200
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiPaginationLink, isStandalone: true, selector: "a[buiPaginationLink]", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "pagination-link" }, properties: { "attr.aria-current": "active() ? 'page' : null", "attr.data-active": "active() ? 'true' : null", "class": "computedClass()" } }, ngImport: i0 });
|
|
3201
|
+
}
|
|
3202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationLink, decorators: [{
|
|
3203
|
+
type: Directive,
|
|
3204
|
+
args: [{
|
|
3205
|
+
selector: 'a[buiPaginationLink]',
|
|
3206
|
+
host: {
|
|
3207
|
+
'data-slot': 'pagination-link',
|
|
3208
|
+
'[attr.aria-current]': "active() ? 'page' : null",
|
|
3209
|
+
'[attr.data-active]': "active() ? 'true' : null",
|
|
3210
|
+
'[class]': 'computedClass()',
|
|
3211
|
+
},
|
|
3212
|
+
}]
|
|
3213
|
+
}], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3214
|
+
/** Ellipsis indicator for skipped pages. */
|
|
3215
|
+
class BuiPaginationEllipsis {
|
|
3216
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3217
|
+
computedClass = computed(() => cn('flex size-9 items-center justify-center', this.userClass()), /* @ts-ignore */
|
|
3218
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationEllipsis, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiPaginationEllipsis, isStandalone: true, selector: "bui-pagination-ellipsis", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "pagination-ellipsis", "aria-hidden": "true" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
|
|
3221
|
+
<svg
|
|
3222
|
+
viewBox="0 0 24 24"
|
|
3223
|
+
fill="none"
|
|
3224
|
+
stroke="currentColor"
|
|
3225
|
+
stroke-width="2"
|
|
3226
|
+
stroke-linecap="round"
|
|
3227
|
+
stroke-linejoin="round"
|
|
3228
|
+
class="size-4"
|
|
3229
|
+
>
|
|
3230
|
+
<circle cx="12" cy="12" r="1" />
|
|
3231
|
+
<circle cx="19" cy="12" r="1" />
|
|
3232
|
+
<circle cx="5" cy="12" r="1" />
|
|
3233
|
+
</svg>
|
|
3234
|
+
<span class="sr-only">More pages</span>
|
|
3235
|
+
`, isInline: true });
|
|
3236
|
+
}
|
|
3237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPaginationEllipsis, decorators: [{
|
|
3238
|
+
type: Component,
|
|
3239
|
+
args: [{
|
|
3240
|
+
selector: 'bui-pagination-ellipsis',
|
|
3241
|
+
host: { 'data-slot': 'pagination-ellipsis', 'aria-hidden': 'true', '[class]': 'computedClass()' },
|
|
3242
|
+
template: `
|
|
3243
|
+
<svg
|
|
3244
|
+
viewBox="0 0 24 24"
|
|
3245
|
+
fill="none"
|
|
3246
|
+
stroke="currentColor"
|
|
3247
|
+
stroke-width="2"
|
|
3248
|
+
stroke-linecap="round"
|
|
3249
|
+
stroke-linejoin="round"
|
|
3250
|
+
class="size-4"
|
|
3251
|
+
>
|
|
3252
|
+
<circle cx="12" cy="12" r="1" />
|
|
3253
|
+
<circle cx="19" cy="12" r="1" />
|
|
3254
|
+
<circle cx="5" cy="12" r="1" />
|
|
3255
|
+
</svg>
|
|
3256
|
+
<span class="sr-only">More pages</span>
|
|
3257
|
+
`,
|
|
3258
|
+
}]
|
|
3259
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3260
|
+
|
|
3261
|
+
/**
|
|
3262
|
+
* Click-triggered popover on the Angular CDK overlay. Bind the content template:
|
|
3263
|
+
* `<button [buiPopover]="tpl">…</button>` with `<ng-template #tpl><div buiPopoverContent>…`.
|
|
3264
|
+
* Closes on outside click and Escape. SSR-safe (the overlay is browser-only, on click).
|
|
3265
|
+
*/
|
|
3266
|
+
class BuiPopover {
|
|
3267
|
+
content = input.required({ ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'buiPopover' });
|
|
3268
|
+
overlay = inject(Overlay);
|
|
3269
|
+
host = inject(ElementRef);
|
|
3270
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
3271
|
+
overlayRef = null;
|
|
3272
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
3273
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
3274
|
+
toggle() {
|
|
3275
|
+
if (this.isOpen()) {
|
|
3276
|
+
this.close();
|
|
3277
|
+
}
|
|
3278
|
+
else {
|
|
3279
|
+
this.open();
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
open() {
|
|
3283
|
+
const positionStrategy = this.overlay
|
|
3284
|
+
.position()
|
|
3285
|
+
.flexibleConnectedTo(this.host)
|
|
3286
|
+
.withPositions([
|
|
3287
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 4 },
|
|
3288
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -4 },
|
|
3289
|
+
]);
|
|
3290
|
+
const overlayReference = this.overlay.create({
|
|
3291
|
+
positionStrategy,
|
|
3292
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
3293
|
+
});
|
|
3294
|
+
overlayReference.attach(new TemplatePortal(this.content(), this.viewContainerRef));
|
|
3295
|
+
overlayReference.outsidePointerEvents().subscribe((event) => {
|
|
3296
|
+
if (!this.host.nativeElement.contains(event.target)) {
|
|
3297
|
+
this.close();
|
|
3298
|
+
}
|
|
3299
|
+
});
|
|
3300
|
+
overlayReference.keydownEvents().subscribe((event) => {
|
|
3301
|
+
if (event.key === 'Escape') {
|
|
3302
|
+
this.close();
|
|
3303
|
+
}
|
|
3304
|
+
});
|
|
3305
|
+
this.overlayRef = overlayReference;
|
|
3306
|
+
this.isOpen.set(true);
|
|
3307
|
+
}
|
|
3308
|
+
close() {
|
|
3309
|
+
this.overlayRef?.dispose();
|
|
3310
|
+
this.overlayRef = null;
|
|
3311
|
+
this.isOpen.set(false);
|
|
3312
|
+
}
|
|
3313
|
+
ngOnDestroy() {
|
|
3314
|
+
this.close();
|
|
3315
|
+
}
|
|
3316
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPopover, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3317
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiPopover, isStandalone: true, selector: "[buiPopover]", inputs: { content: { classPropertyName: "content", publicName: "buiPopover", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "aria-haspopup": "dialog" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-expanded": "isOpen()" } }, ngImport: i0 });
|
|
3318
|
+
}
|
|
3319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPopover, decorators: [{
|
|
3320
|
+
type: Directive,
|
|
3321
|
+
args: [{
|
|
3322
|
+
selector: '[buiPopover]',
|
|
3323
|
+
host: {
|
|
3324
|
+
'aria-haspopup': 'dialog',
|
|
3325
|
+
'[attr.aria-expanded]': 'isOpen()',
|
|
3326
|
+
'(click)': 'toggle()',
|
|
3327
|
+
},
|
|
3328
|
+
}]
|
|
3329
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "buiPopover", required: true }] }] } });
|
|
3330
|
+
/** Styling + role for the popover content root (inside the bound template). */
|
|
3331
|
+
class BuiPopoverContent {
|
|
3332
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3333
|
+
computedClass = computed(() => cn('z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none', this.userClass()), /* @ts-ignore */
|
|
3334
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPopoverContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3336
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiPopoverContent, isStandalone: true, selector: "[buiPopoverContent]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "popover-content", "role": "dialog", "tabindex": "-1" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3337
|
+
}
|
|
3338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiPopoverContent, decorators: [{
|
|
3339
|
+
type: Directive,
|
|
3340
|
+
args: [{
|
|
3341
|
+
selector: '[buiPopoverContent]',
|
|
3342
|
+
host: {
|
|
3343
|
+
'data-slot': 'popover-content',
|
|
3344
|
+
role: 'dialog',
|
|
3345
|
+
tabindex: '-1',
|
|
3346
|
+
'[class]': 'computedClass()',
|
|
3347
|
+
},
|
|
3348
|
+
}]
|
|
3349
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3350
|
+
|
|
3351
|
+
const ITEM_BASE = 'group/item flex flex-wrap items-center rounded-md border border-transparent text-sm outline-none transition-colors duration-100 [a&]:transition-colors [a&]:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]';
|
|
3352
|
+
const ITEM_VARIANTS = {
|
|
3353
|
+
default: 'bg-transparent',
|
|
3354
|
+
outline: 'border-border',
|
|
3355
|
+
muted: 'bg-muted/50',
|
|
3356
|
+
};
|
|
3357
|
+
const ITEM_SIZES = {
|
|
3358
|
+
default: 'gap-4 p-4',
|
|
3359
|
+
sm: 'gap-2.5 px-4 py-3',
|
|
3360
|
+
};
|
|
3361
|
+
/** A list/row item; use on a `<div>` or an `<a>`. */
|
|
3362
|
+
class BuiItem {
|
|
3363
|
+
variant = input('default', /* @ts-ignore */
|
|
3364
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
3365
|
+
size = input('default', /* @ts-ignore */
|
|
3366
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3367
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3368
|
+
computedClass = computed(() => cn(ITEM_BASE, ITEM_VARIANTS[this.variant()], ITEM_SIZES[this.size()], this.userClass()), /* @ts-ignore */
|
|
3369
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3371
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItem, isStandalone: true, selector: "[buiItem]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item" }, properties: { "attr.data-variant": "variant()", "attr.data-size": "size()", "class": "computedClass()" } }, ngImport: i0 });
|
|
3372
|
+
}
|
|
3373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItem, decorators: [{
|
|
3374
|
+
type: Directive,
|
|
3375
|
+
args: [{
|
|
3376
|
+
selector: '[buiItem]',
|
|
3377
|
+
host: {
|
|
3378
|
+
'data-slot': 'item',
|
|
3379
|
+
'[attr.data-variant]': 'variant()',
|
|
3380
|
+
'[attr.data-size]': 'size()',
|
|
3381
|
+
'[class]': 'computedClass()',
|
|
3382
|
+
},
|
|
3383
|
+
}]
|
|
3384
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3385
|
+
const MEDIA_VARIANTS = {
|
|
3386
|
+
default: 'bg-transparent',
|
|
3387
|
+
icon: "bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
|
|
3388
|
+
image: 'size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover',
|
|
3389
|
+
};
|
|
3390
|
+
class BuiItemMedia {
|
|
3391
|
+
variant = input('default', /* @ts-ignore */
|
|
3392
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
3393
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3394
|
+
computedClass = computed(() => cn('flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none', MEDIA_VARIANTS[this.variant()], this.userClass()), /* @ts-ignore */
|
|
3395
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3397
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItemMedia, isStandalone: true, selector: "[buiItemMedia]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-media" }, properties: { "attr.data-variant": "variant()", "class": "computedClass()" } }, ngImport: i0 });
|
|
3398
|
+
}
|
|
3399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemMedia, decorators: [{
|
|
3400
|
+
type: Directive,
|
|
3401
|
+
args: [{
|
|
3402
|
+
selector: '[buiItemMedia]',
|
|
3403
|
+
host: {
|
|
3404
|
+
'data-slot': 'item-media',
|
|
3405
|
+
'[attr.data-variant]': 'variant()',
|
|
3406
|
+
'[class]': 'computedClass()',
|
|
3407
|
+
},
|
|
3408
|
+
}]
|
|
3409
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3410
|
+
class BuiItemContent {
|
|
3411
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3412
|
+
computedClass = computed(() => cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', this.userClass()), /* @ts-ignore */
|
|
3413
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3414
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3415
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItemContent, isStandalone: true, selector: "[buiItemContent]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-content" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3416
|
+
}
|
|
3417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemContent, decorators: [{
|
|
3418
|
+
type: Directive,
|
|
3419
|
+
args: [{
|
|
3420
|
+
selector: '[buiItemContent]',
|
|
3421
|
+
host: { 'data-slot': 'item-content', '[class]': 'computedClass()' },
|
|
3422
|
+
}]
|
|
3423
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3424
|
+
class BuiItemTitle {
|
|
3425
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3426
|
+
computedClass = computed(() => cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', this.userClass()), /* @ts-ignore */
|
|
3427
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3429
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItemTitle, isStandalone: true, selector: "[buiItemTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-title" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3430
|
+
}
|
|
3431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemTitle, decorators: [{
|
|
3432
|
+
type: Directive,
|
|
3433
|
+
args: [{
|
|
3434
|
+
selector: '[buiItemTitle]',
|
|
3435
|
+
host: { 'data-slot': 'item-title', '[class]': 'computedClass()' },
|
|
3436
|
+
}]
|
|
3437
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3438
|
+
class BuiItemDescription {
|
|
3439
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3440
|
+
computedClass = computed(() => cn('line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary', this.userClass()), /* @ts-ignore */
|
|
3441
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3442
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3443
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItemDescription, isStandalone: true, selector: "p[buiItemDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-description" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3444
|
+
}
|
|
3445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemDescription, decorators: [{
|
|
3446
|
+
type: Directive,
|
|
3447
|
+
args: [{
|
|
3448
|
+
selector: 'p[buiItemDescription]',
|
|
3449
|
+
host: { 'data-slot': 'item-description', '[class]': 'computedClass()' },
|
|
3450
|
+
}]
|
|
3451
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3452
|
+
class BuiItemActions {
|
|
3453
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3454
|
+
computedClass = computed(() => cn('flex items-center gap-2', this.userClass()), /* @ts-ignore */
|
|
3455
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3457
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItemActions, isStandalone: true, selector: "[buiItemActions]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-actions" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3458
|
+
}
|
|
3459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemActions, decorators: [{
|
|
3460
|
+
type: Directive,
|
|
3461
|
+
args: [{
|
|
3462
|
+
selector: '[buiItemActions]',
|
|
3463
|
+
host: { 'data-slot': 'item-actions', '[class]': 'computedClass()' },
|
|
3464
|
+
}]
|
|
3465
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3466
|
+
class BuiItemGroup {
|
|
3467
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3468
|
+
computedClass = computed(() => cn('group/item-group flex flex-col', this.userClass()), /* @ts-ignore */
|
|
3469
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3471
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiItemGroup, isStandalone: true, selector: "[buiItemGroup]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-group" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3472
|
+
}
|
|
3473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiItemGroup, decorators: [{
|
|
3474
|
+
type: Directive,
|
|
3475
|
+
args: [{
|
|
3476
|
+
selector: '[buiItemGroup]',
|
|
3477
|
+
host: { 'data-slot': 'item-group', '[class]': 'computedClass()' },
|
|
3478
|
+
}]
|
|
3479
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3480
|
+
|
|
3481
|
+
/** A scrollable region with a thin, themed scrollbar and a focusable viewport. */
|
|
3482
|
+
class BuiScrollArea {
|
|
3483
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3484
|
+
computedClass = computed(() => cn('relative block', this.userClass()), /* @ts-ignore */
|
|
3485
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiScrollArea, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3487
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiScrollArea, isStandalone: true, selector: "bui-scroll-area", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "scroll-area" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
|
|
3488
|
+
<div
|
|
3489
|
+
data-slot="scroll-area-viewport"
|
|
3490
|
+
tabindex="0"
|
|
3491
|
+
role="region"
|
|
3492
|
+
class="size-full [scrollbar-width:thin] [scrollbar-color:var(--border)_transparent] overflow-auto rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
3493
|
+
>
|
|
3494
|
+
<ng-content />
|
|
3495
|
+
</div>
|
|
3496
|
+
`, isInline: true });
|
|
3497
|
+
}
|
|
3498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiScrollArea, decorators: [{
|
|
3499
|
+
type: Component,
|
|
3500
|
+
args: [{
|
|
3501
|
+
selector: 'bui-scroll-area',
|
|
3502
|
+
host: { 'data-slot': 'scroll-area', '[class]': 'computedClass()' },
|
|
3503
|
+
template: `
|
|
3504
|
+
<div
|
|
3505
|
+
data-slot="scroll-area-viewport"
|
|
3506
|
+
tabindex="0"
|
|
3507
|
+
role="region"
|
|
3508
|
+
class="size-full [scrollbar-width:thin] [scrollbar-color:var(--border)_transparent] overflow-auto rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
3509
|
+
>
|
|
3510
|
+
<ng-content />
|
|
3511
|
+
</div>
|
|
3512
|
+
`,
|
|
3513
|
+
}]
|
|
3514
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3515
|
+
|
|
3136
3516
|
/*
|
|
3137
3517
|
* Public API Surface of ng-blatui
|
|
3138
3518
|
*/
|
|
@@ -3141,5 +3521,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
3141
3521
|
* Generated bundle index. Do not edit.
|
|
3142
3522
|
*/
|
|
3143
3523
|
|
|
3144
|
-
export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertTitle, BuiAspectRatio, BuiAvatar, BuiAvatarGroup, BuiBadge, BuiBanner, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiCollapsible, BuiCollapsibleContent, BuiCollapsibleTrigger, BuiContainer, BuiCopyButton, BuiDialogContent, BuiDialogDescription, BuiDialogFooter, BuiDialogHeader, BuiDialogTitle, BuiEmpty, BuiEmptyContent, BuiEmptyDescription, BuiEmptyHeader, BuiEmptyMedia, BuiEmptyTitle, BuiField, BuiFieldContent, BuiFieldDescription, BuiFieldError, BuiFieldGroup, BuiFieldLabel, BuiFieldLegend, BuiFieldSeparator, BuiFieldSet, BuiFieldTitle, BuiInput, BuiKbd, BuiLabel, BuiProgress, BuiRadioGroup, BuiRadioGroupItem, BuiSeparator, BuiSkeleton, BuiSpinner, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTable, BuiTableBody, BuiTableCaption, BuiTableCell, BuiTableContainer, BuiTableFooter, BuiTableHead, BuiTableHeader, BuiTableRow, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiToggle, BuiTooltip, BuiTooltipContent, THEME_TOKENS, ThemeStore, buttonVariants, cn, toggleVariants };
|
|
3524
|
+
export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertTitle, BuiAspectRatio, BuiAvatar, BuiAvatarGroup, BuiBadge, BuiBanner, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiCollapsible, BuiCollapsibleContent, BuiCollapsibleTrigger, BuiContainer, BuiCopyButton, BuiDialogContent, BuiDialogDescription, BuiDialogFooter, BuiDialogHeader, BuiDialogTitle, BuiEmpty, BuiEmptyContent, BuiEmptyDescription, BuiEmptyHeader, BuiEmptyMedia, BuiEmptyTitle, BuiField, BuiFieldContent, BuiFieldDescription, BuiFieldError, BuiFieldGroup, BuiFieldLabel, BuiFieldLegend, BuiFieldSeparator, BuiFieldSet, BuiFieldTitle, BuiInput, BuiItem, BuiItemActions, BuiItemContent, BuiItemDescription, BuiItemGroup, BuiItemMedia, BuiItemTitle, BuiKbd, BuiLabel, BuiPagination, BuiPaginationContent, BuiPaginationEllipsis, BuiPaginationItem, BuiPaginationLink, BuiPopover, BuiPopoverContent, BuiProgress, BuiRadioGroup, BuiRadioGroupItem, BuiScrollArea, BuiSeparator, BuiSkeleton, BuiSpinner, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTable, BuiTableBody, BuiTableCaption, BuiTableCell, BuiTableContainer, BuiTableFooter, BuiTableHead, BuiTableHeader, BuiTableRow, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiToggle, BuiTooltip, BuiTooltipContent, THEME_TOKENS, ThemeStore, buttonVariants, cn, toggleVariants };
|
|
3145
3525
|
//# sourceMappingURL=ng-blatui.mjs.map
|