ng-blatui 1.5.0 → 1.7.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 +446 -7
- package/fesm2022/ng-blatui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-blatui.d.ts +142 -3
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
|
|
@@ -70,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
70
70
|
}], 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 }] }] } });
|
|
71
71
|
|
|
72
72
|
const BASE = 'inline-flex items-center justify-center rounded-md border font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden';
|
|
73
|
-
const SIZES$
|
|
73
|
+
const SIZES$2 = {
|
|
74
74
|
sm: 'px-1.5 py-px text-[0.625rem]',
|
|
75
75
|
default: 'px-2 py-0.5 text-xs',
|
|
76
76
|
lg: 'px-3 py-1 text-sm [&>svg]:size-3.5',
|
|
@@ -144,7 +144,7 @@ class BuiBadge {
|
|
|
144
144
|
computedClass = computed(() => {
|
|
145
145
|
const tone = this.tone();
|
|
146
146
|
const toneOrVariant = tone === null ? brandClass(this.variant()) : TONES$1[tone][intensityFor(this.variant())];
|
|
147
|
-
return cn(BASE, SIZES$
|
|
147
|
+
return cn(BASE, SIZES$2[this.size()], toneOrVariant, this.userClass());
|
|
148
148
|
}, /* @ts-ignore */
|
|
149
149
|
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
150
150
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2343,7 +2343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2343
2343
|
}]
|
|
2344
2344
|
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2345
2345
|
|
|
2346
|
-
const SIZES = {
|
|
2346
|
+
const SIZES$1 = {
|
|
2347
2347
|
sm: 'max-w-3xl',
|
|
2348
2348
|
md: 'max-w-5xl',
|
|
2349
2349
|
lg: 'max-w-6xl',
|
|
@@ -2356,7 +2356,7 @@ class BuiContainer {
|
|
|
2356
2356
|
size = input('lg', /* @ts-ignore */
|
|
2357
2357
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2358
2358
|
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2359
|
-
computedClass = computed(() => cn('mx-auto w-full px-4 sm:px-6 lg:px-8', SIZES[this.size()], this.userClass()), /* @ts-ignore */
|
|
2359
|
+
computedClass = computed(() => cn('mx-auto w-full px-4 sm:px-6 lg:px-8', SIZES$1[this.size()], this.userClass()), /* @ts-ignore */
|
|
2360
2360
|
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2361
2361
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2362
2362
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiContainer, isStandalone: true, selector: "[buiContainer]", inputs: { 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": "container" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
@@ -2909,6 +2909,445 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2909
2909
|
}]
|
|
2910
2910
|
}], propDecorators: { tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], persistKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistKey", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2911
2911
|
|
|
2912
|
+
/** Scroll/border wrapper around a table. `variant="card"` adds a bordered card. */
|
|
2913
|
+
class BuiTableContainer {
|
|
2914
|
+
variant = input('default', /* @ts-ignore */
|
|
2915
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2916
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2917
|
+
computedClass = computed(() => cn('relative w-full overflow-x-auto', this.variant() === 'card' && 'rounded-lg border bg-card shadow-xs', this.userClass()), /* @ts-ignore */
|
|
2918
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2919
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2920
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableContainer, isStandalone: true, selector: "[buiTableContainer]", 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": "table-container" }, properties: { "attr.data-variant": "variant()", "class": "computedClass()" } }, ngImport: i0 });
|
|
2921
|
+
}
|
|
2922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableContainer, decorators: [{
|
|
2923
|
+
type: Directive,
|
|
2924
|
+
args: [{
|
|
2925
|
+
selector: '[buiTableContainer]',
|
|
2926
|
+
host: {
|
|
2927
|
+
'data-slot': 'table-container',
|
|
2928
|
+
'[attr.data-variant]': 'variant()',
|
|
2929
|
+
'[class]': 'computedClass()',
|
|
2930
|
+
},
|
|
2931
|
+
}]
|
|
2932
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2933
|
+
class BuiTable {
|
|
2934
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2935
|
+
computedClass = computed(() => cn('w-full caption-bottom text-sm', this.userClass()), /* @ts-ignore */
|
|
2936
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2937
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2938
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTable, isStandalone: true, selector: "table[buiTable]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2939
|
+
}
|
|
2940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTable, decorators: [{
|
|
2941
|
+
type: Directive,
|
|
2942
|
+
args: [{
|
|
2943
|
+
selector: 'table[buiTable]',
|
|
2944
|
+
host: { 'data-slot': 'table', '[class]': 'computedClass()' },
|
|
2945
|
+
}]
|
|
2946
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2947
|
+
class BuiTableHeader {
|
|
2948
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2949
|
+
computedClass = computed(() => cn('[&_tr]:border-b', this.userClass()), /* @ts-ignore */
|
|
2950
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2951
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2952
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableHeader, isStandalone: true, selector: "thead[buiTableHeader]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-header" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2953
|
+
}
|
|
2954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableHeader, decorators: [{
|
|
2955
|
+
type: Directive,
|
|
2956
|
+
args: [{
|
|
2957
|
+
selector: 'thead[buiTableHeader]',
|
|
2958
|
+
host: { 'data-slot': 'table-header', '[class]': 'computedClass()' },
|
|
2959
|
+
}]
|
|
2960
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2961
|
+
class BuiTableBody {
|
|
2962
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2963
|
+
computedClass = computed(() => cn('[&_tr:last-child]:border-0', this.userClass()), /* @ts-ignore */
|
|
2964
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2965
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2966
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableBody, isStandalone: true, selector: "tbody[buiTableBody]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-body" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2967
|
+
}
|
|
2968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableBody, decorators: [{
|
|
2969
|
+
type: Directive,
|
|
2970
|
+
args: [{
|
|
2971
|
+
selector: 'tbody[buiTableBody]',
|
|
2972
|
+
host: { 'data-slot': 'table-body', '[class]': 'computedClass()' },
|
|
2973
|
+
}]
|
|
2974
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2975
|
+
class BuiTableFooter {
|
|
2976
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2977
|
+
computedClass = computed(() => cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', this.userClass()), /* @ts-ignore */
|
|
2978
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2979
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2980
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableFooter, isStandalone: true, selector: "tfoot[buiTableFooter]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-footer" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2981
|
+
}
|
|
2982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableFooter, decorators: [{
|
|
2983
|
+
type: Directive,
|
|
2984
|
+
args: [{
|
|
2985
|
+
selector: 'tfoot[buiTableFooter]',
|
|
2986
|
+
host: { 'data-slot': 'table-footer', '[class]': 'computedClass()' },
|
|
2987
|
+
}]
|
|
2988
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2989
|
+
class BuiTableRow {
|
|
2990
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2991
|
+
computedClass = computed(() => cn('border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', this.userClass()), /* @ts-ignore */
|
|
2992
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2994
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableRow, isStandalone: true, selector: "tr[buiTableRow]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-row" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
2995
|
+
}
|
|
2996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableRow, decorators: [{
|
|
2997
|
+
type: Directive,
|
|
2998
|
+
args: [{
|
|
2999
|
+
selector: 'tr[buiTableRow]',
|
|
3000
|
+
host: { 'data-slot': 'table-row', '[class]': 'computedClass()' },
|
|
3001
|
+
}]
|
|
3002
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3003
|
+
class BuiTableHead {
|
|
3004
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3005
|
+
computedClass = computed(() => cn('h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0', this.userClass()), /* @ts-ignore */
|
|
3006
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3007
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableHead, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3008
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableHead, isStandalone: true, selector: "th[buiTableHead]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-head", "scope": "col" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3009
|
+
}
|
|
3010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableHead, decorators: [{
|
|
3011
|
+
type: Directive,
|
|
3012
|
+
args: [{
|
|
3013
|
+
selector: 'th[buiTableHead]',
|
|
3014
|
+
host: { 'data-slot': 'table-head', scope: 'col', '[class]': 'computedClass()' },
|
|
3015
|
+
}]
|
|
3016
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3017
|
+
class BuiTableCell {
|
|
3018
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3019
|
+
computedClass = computed(() => cn('p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0', this.userClass()), /* @ts-ignore */
|
|
3020
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3021
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3022
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableCell, isStandalone: true, selector: "td[buiTableCell]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-cell" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3023
|
+
}
|
|
3024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableCell, decorators: [{
|
|
3025
|
+
type: Directive,
|
|
3026
|
+
args: [{
|
|
3027
|
+
selector: 'td[buiTableCell]',
|
|
3028
|
+
host: { 'data-slot': 'table-cell', '[class]': 'computedClass()' },
|
|
3029
|
+
}]
|
|
3030
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3031
|
+
class BuiTableCaption {
|
|
3032
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3033
|
+
computedClass = computed(() => cn('mt-4 text-sm text-muted-foreground', this.userClass()), /* @ts-ignore */
|
|
3034
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3035
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableCaption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3036
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: BuiTableCaption, isStandalone: true, selector: "caption[buiTableCaption]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "table-caption" }, properties: { "class": "computedClass()" } }, ngImport: i0 });
|
|
3037
|
+
}
|
|
3038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTableCaption, decorators: [{
|
|
3039
|
+
type: Directive,
|
|
3040
|
+
args: [{
|
|
3041
|
+
selector: 'caption[buiTableCaption]',
|
|
3042
|
+
host: { 'data-slot': 'table-caption', '[class]': 'computedClass()' },
|
|
3043
|
+
}]
|
|
3044
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
3045
|
+
|
|
3046
|
+
const SIZES = {
|
|
3047
|
+
sm: { box: 'size-6', overlap: '-ms-2', ring: 'ring-1', text: 'text-xs' },
|
|
3048
|
+
default: { box: 'size-8', overlap: '-ms-2.5', ring: 'ring-2', text: 'text-sm' },
|
|
3049
|
+
lg: { box: 'size-12', overlap: '-ms-3', ring: 'ring-2', text: 'text-base' },
|
|
3050
|
+
};
|
|
3051
|
+
function initials(name) {
|
|
3052
|
+
const trimmed = (name ?? '').trim();
|
|
3053
|
+
if (trimmed === '') {
|
|
3054
|
+
return '?';
|
|
3055
|
+
}
|
|
3056
|
+
const parts = trimmed.split(/\s+/);
|
|
3057
|
+
const first = parts[0].charAt(0);
|
|
3058
|
+
const last = parts.length > 1 ? (parts.at(-1)?.charAt(0) ?? '') : '';
|
|
3059
|
+
return (first + last).toUpperCase();
|
|
3060
|
+
}
|
|
3061
|
+
/** Overlapping stack of avatars with an optional "+N" overflow counter. */
|
|
3062
|
+
class BuiAvatarGroup {
|
|
3063
|
+
avatars = input([], /* @ts-ignore */
|
|
3064
|
+
...(ngDevMode ? [{ debugName: "avatars" }] : /* istanbul ignore next */ []));
|
|
3065
|
+
max = input(4, /* @ts-ignore */
|
|
3066
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
3067
|
+
size = input('default', /* @ts-ignore */
|
|
3068
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3069
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
3070
|
+
shown = computed(() => this.avatars().slice(0, Math.max(0, this.max())), /* @ts-ignore */
|
|
3071
|
+
...(ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []));
|
|
3072
|
+
remaining = computed(() => Math.max(0, this.avatars().length - this.shown().length), /* @ts-ignore */
|
|
3073
|
+
...(ngDevMode ? [{ debugName: "remaining" }] : /* istanbul ignore next */ []));
|
|
3074
|
+
computedClass = computed(() => cn('flex items-center', this.userClass()), /* @ts-ignore */
|
|
3075
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
3076
|
+
toInitials = initials;
|
|
3077
|
+
itemClass(index) {
|
|
3078
|
+
const size = SIZES[this.size()];
|
|
3079
|
+
return cn(size.box, size.ring, 'ring-background', index > 0 && size.overlap);
|
|
3080
|
+
}
|
|
3081
|
+
moreClass() {
|
|
3082
|
+
const size = SIZES[this.size()];
|
|
3083
|
+
return cn('relative z-10 flex shrink-0 items-center justify-center rounded-full bg-muted font-medium text-foreground', size.box, size.ring, 'ring-background', size.text, this.shown().length > 0 && size.overlap);
|
|
3084
|
+
}
|
|
3085
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiAvatarGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3086
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: BuiAvatarGroup, isStandalone: true, selector: "bui-avatar-group", inputs: { avatars: { classPropertyName: "avatars", publicName: "avatars", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", 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": "avatar-group", "role": "list" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
|
|
3087
|
+
@for (avatar of shown(); track $index) {
|
|
3088
|
+
<bui-avatar
|
|
3089
|
+
role="listitem"
|
|
3090
|
+
[src]="avatar.src ?? null"
|
|
3091
|
+
[alt]="avatar.name ?? 'User avatar'"
|
|
3092
|
+
[class]="itemClass($index)"
|
|
3093
|
+
>{{ toInitials(avatar.name) }}</bui-avatar
|
|
3094
|
+
>
|
|
3095
|
+
}
|
|
3096
|
+
@if (remaining() > 0) {
|
|
3097
|
+
<span
|
|
3098
|
+
role="listitem"
|
|
3099
|
+
[attr.aria-label]="'and ' + remaining() + ' more'"
|
|
3100
|
+
[class]="moreClass()"
|
|
3101
|
+
>
|
|
3102
|
+
<span aria-hidden="true">+{{ remaining() }}</span>
|
|
3103
|
+
</span>
|
|
3104
|
+
}
|
|
3105
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BuiAvatar, selector: "bui-avatar", inputs: ["src", "alt", "class"] }] });
|
|
3106
|
+
}
|
|
3107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiAvatarGroup, decorators: [{
|
|
3108
|
+
type: Component,
|
|
3109
|
+
args: [{
|
|
3110
|
+
selector: 'bui-avatar-group',
|
|
3111
|
+
imports: [BuiAvatar],
|
|
3112
|
+
host: { 'data-slot': 'avatar-group', role: 'list', '[class]': 'computedClass()' },
|
|
3113
|
+
template: `
|
|
3114
|
+
@for (avatar of shown(); track $index) {
|
|
3115
|
+
<bui-avatar
|
|
3116
|
+
role="listitem"
|
|
3117
|
+
[src]="avatar.src ?? null"
|
|
3118
|
+
[alt]="avatar.name ?? 'User avatar'"
|
|
3119
|
+
[class]="itemClass($index)"
|
|
3120
|
+
>{{ toInitials(avatar.name) }}</bui-avatar
|
|
3121
|
+
>
|
|
3122
|
+
}
|
|
3123
|
+
@if (remaining() > 0) {
|
|
3124
|
+
<span
|
|
3125
|
+
role="listitem"
|
|
3126
|
+
[attr.aria-label]="'and ' + remaining() + ' more'"
|
|
3127
|
+
[class]="moreClass()"
|
|
3128
|
+
>
|
|
3129
|
+
<span aria-hidden="true">+{{ remaining() }}</span>
|
|
3130
|
+
</span>
|
|
3131
|
+
}
|
|
3132
|
+
`,
|
|
3133
|
+
}]
|
|
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
|
+
|
|
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
|
+
|
|
2912
3351
|
/*
|
|
2913
3352
|
* Public API Surface of ng-blatui
|
|
2914
3353
|
*/
|
|
@@ -2917,5 +3356,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2917
3356
|
* Generated bundle index. Do not edit.
|
|
2918
3357
|
*/
|
|
2919
3358
|
|
|
2920
|
-
export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertTitle, BuiAspectRatio, BuiAvatar, 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, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiToggle, BuiTooltip, BuiTooltipContent, THEME_TOKENS, ThemeStore, buttonVariants, cn, toggleVariants };
|
|
3359
|
+
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, BuiPagination, BuiPaginationContent, BuiPaginationEllipsis, BuiPaginationItem, BuiPaginationLink, BuiPopover, BuiPopoverContent, 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 };
|
|
2921
3360
|
//# sourceMappingURL=ng-blatui.mjs.map
|