ng-blatui 1.4.0 → 1.5.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 +313 -3
- package/fesm2022/ng-blatui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-blatui.d.ts +56 -1
package/fesm2022/ng-blatui.mjs
CHANGED
|
@@ -81,7 +81,7 @@ const VARIANTS = {
|
|
|
81
81
|
destructive: 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
82
82
|
outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
|
|
83
83
|
};
|
|
84
|
-
const TONES = {
|
|
84
|
+
const TONES$1 = {
|
|
85
85
|
success: {
|
|
86
86
|
soft: 'border-transparent bg-success/10 text-success dark:bg-success/15',
|
|
87
87
|
solid: 'border-transparent bg-success text-success-foreground',
|
|
@@ -143,7 +143,7 @@ class BuiBadge {
|
|
|
143
143
|
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
144
144
|
computedClass = computed(() => {
|
|
145
145
|
const tone = this.tone();
|
|
146
|
-
const toneOrVariant = tone === null ? brandClass(this.variant()) : TONES[tone][intensityFor(this.variant())];
|
|
146
|
+
const toneOrVariant = tone === null ? brandClass(this.variant()) : TONES$1[tone][intensityFor(this.variant())];
|
|
147
147
|
return cn(BASE, SIZES$1[this.size()], toneOrVariant, this.userClass());
|
|
148
148
|
}, /* @ts-ignore */
|
|
149
149
|
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
@@ -2599,6 +2599,316 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2599
2599
|
}]
|
|
2600
2600
|
}] });
|
|
2601
2601
|
|
|
2602
|
+
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
2603
|
+
variants: {
|
|
2604
|
+
variant: {
|
|
2605
|
+
default: 'bg-transparent',
|
|
2606
|
+
outline: 'border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground',
|
|
2607
|
+
},
|
|
2608
|
+
size: {
|
|
2609
|
+
default: 'h-9 min-w-9 px-2',
|
|
2610
|
+
sm: 'h-8 min-w-8 px-1.5',
|
|
2611
|
+
lg: 'h-10 min-w-10 px-2.5',
|
|
2612
|
+
},
|
|
2613
|
+
},
|
|
2614
|
+
defaultVariants: { variant: 'default', size: 'default' },
|
|
2615
|
+
});
|
|
2616
|
+
/** A two-state toggle button (`aria-pressed`). */
|
|
2617
|
+
class BuiToggle {
|
|
2618
|
+
pressed = model(false, /* @ts-ignore */
|
|
2619
|
+
...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
|
|
2620
|
+
variant = input('default', /* @ts-ignore */
|
|
2621
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
2622
|
+
size = input('default', /* @ts-ignore */
|
|
2623
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2624
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2625
|
+
computedClass = computed(() => cn(toggleVariants({ variant: this.variant(), size: this.size() }), this.userClass()), /* @ts-ignore */
|
|
2626
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2627
|
+
toggle() {
|
|
2628
|
+
this.pressed.update((value) => !value);
|
|
2629
|
+
}
|
|
2630
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2631
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiToggle, isStandalone: true, selector: "button[buiToggle]", inputs: { pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, 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 } }, outputs: { pressed: "pressedChange" }, host: { attributes: { "type": "button", "data-slot": "toggle" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-pressed": "pressed()", "attr.data-state": "pressed() ? 'on' : 'off'", "class": "computedClass()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
2632
|
+
}
|
|
2633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiToggle, decorators: [{
|
|
2634
|
+
type: Component,
|
|
2635
|
+
args: [{
|
|
2636
|
+
selector: 'button[buiToggle]',
|
|
2637
|
+
host: {
|
|
2638
|
+
type: 'button',
|
|
2639
|
+
'data-slot': 'toggle',
|
|
2640
|
+
'[attr.aria-pressed]': 'pressed()',
|
|
2641
|
+
'[attr.data-state]': "pressed() ? 'on' : 'off'",
|
|
2642
|
+
'[class]': 'computedClass()',
|
|
2643
|
+
'(click)': 'toggle()',
|
|
2644
|
+
},
|
|
2645
|
+
template: `<ng-content />`,
|
|
2646
|
+
}]
|
|
2647
|
+
}], propDecorators: { pressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "pressed", required: false }] }, { type: i0.Output, args: ["pressedChange"] }], 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 }] }] } });
|
|
2648
|
+
|
|
2649
|
+
/** A spinning loading indicator (`role="status"`). */
|
|
2650
|
+
class BuiSpinner {
|
|
2651
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2652
|
+
computedClass = computed(() => cn('inline-block size-4 animate-spin', this.userClass()), /* @ts-ignore */
|
|
2653
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2654
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2655
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiSpinner, isStandalone: true, selector: "bui-spinner", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "spinner", "role": "status", "aria-label": "Loading" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
|
|
2656
|
+
<svg
|
|
2657
|
+
viewBox="0 0 24 24"
|
|
2658
|
+
fill="none"
|
|
2659
|
+
stroke="currentColor"
|
|
2660
|
+
stroke-width="2"
|
|
2661
|
+
stroke-linecap="round"
|
|
2662
|
+
stroke-linejoin="round"
|
|
2663
|
+
aria-hidden="true"
|
|
2664
|
+
class="size-full"
|
|
2665
|
+
>
|
|
2666
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
2667
|
+
</svg>
|
|
2668
|
+
`, isInline: true });
|
|
2669
|
+
}
|
|
2670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiSpinner, decorators: [{
|
|
2671
|
+
type: Component,
|
|
2672
|
+
args: [{
|
|
2673
|
+
selector: 'bui-spinner',
|
|
2674
|
+
host: {
|
|
2675
|
+
'data-slot': 'spinner',
|
|
2676
|
+
role: 'status',
|
|
2677
|
+
'aria-label': 'Loading',
|
|
2678
|
+
'[class]': 'computedClass()',
|
|
2679
|
+
},
|
|
2680
|
+
template: `
|
|
2681
|
+
<svg
|
|
2682
|
+
viewBox="0 0 24 24"
|
|
2683
|
+
fill="none"
|
|
2684
|
+
stroke="currentColor"
|
|
2685
|
+
stroke-width="2"
|
|
2686
|
+
stroke-linecap="round"
|
|
2687
|
+
stroke-linejoin="round"
|
|
2688
|
+
aria-hidden="true"
|
|
2689
|
+
class="size-full"
|
|
2690
|
+
>
|
|
2691
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
2692
|
+
</svg>
|
|
2693
|
+
`,
|
|
2694
|
+
}]
|
|
2695
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2696
|
+
|
|
2697
|
+
/** Copy-to-clipboard button: copies `value`, flips to a check, announces "Copied". */
|
|
2698
|
+
class BuiCopyButton {
|
|
2699
|
+
value = input('', /* @ts-ignore */
|
|
2700
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2701
|
+
label = input('Copy', /* @ts-ignore */
|
|
2702
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2703
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2704
|
+
copied = signal(false, /* @ts-ignore */
|
|
2705
|
+
...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
|
|
2706
|
+
computedClass = computed(() => cn('inline-flex h-8 items-center justify-center gap-1.5 rounded-md px-2 text-sm font-medium text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50', this.userClass()), /* @ts-ignore */
|
|
2707
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2708
|
+
async copy() {
|
|
2709
|
+
try {
|
|
2710
|
+
await navigator.clipboard.writeText(this.value());
|
|
2711
|
+
this.copied.set(true);
|
|
2712
|
+
setTimeout(() => {
|
|
2713
|
+
this.copied.set(false);
|
|
2714
|
+
}, 1500);
|
|
2715
|
+
}
|
|
2716
|
+
catch {
|
|
2717
|
+
// Clipboard unavailable — ignore.
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCopyButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2721
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: BuiCopyButton, isStandalone: true, selector: "button[buiCopyButton]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "data-slot": "copy-button" }, listeners: { "click": "copy()" }, properties: { "attr.aria-label": "copied() ? 'Copied' : label()", "class": "computedClass()" } }, ngImport: i0, template: `
|
|
2722
|
+
<span class="grid size-4 place-items-center *:col-start-1 *:row-start-1">
|
|
2723
|
+
@if (copied()) {
|
|
2724
|
+
<svg
|
|
2725
|
+
viewBox="0 0 24 24"
|
|
2726
|
+
fill="none"
|
|
2727
|
+
stroke="currentColor"
|
|
2728
|
+
stroke-width="2"
|
|
2729
|
+
stroke-linecap="round"
|
|
2730
|
+
stroke-linejoin="round"
|
|
2731
|
+
aria-hidden="true"
|
|
2732
|
+
class="size-4 text-success"
|
|
2733
|
+
>
|
|
2734
|
+
<path d="M20 6 9 17l-5-5" />
|
|
2735
|
+
</svg>
|
|
2736
|
+
} @else {
|
|
2737
|
+
<svg
|
|
2738
|
+
viewBox="0 0 24 24"
|
|
2739
|
+
fill="none"
|
|
2740
|
+
stroke="currentColor"
|
|
2741
|
+
stroke-width="2"
|
|
2742
|
+
stroke-linecap="round"
|
|
2743
|
+
stroke-linejoin="round"
|
|
2744
|
+
aria-hidden="true"
|
|
2745
|
+
class="size-4"
|
|
2746
|
+
>
|
|
2747
|
+
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
2748
|
+
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
2749
|
+
</svg>
|
|
2750
|
+
}
|
|
2751
|
+
</span>
|
|
2752
|
+
<ng-content />
|
|
2753
|
+
<span class="sr-only" aria-live="polite">{{ copied() ? 'Copied' : '' }}</span>
|
|
2754
|
+
`, isInline: true });
|
|
2755
|
+
}
|
|
2756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiCopyButton, decorators: [{
|
|
2757
|
+
type: Component,
|
|
2758
|
+
args: [{
|
|
2759
|
+
selector: 'button[buiCopyButton]',
|
|
2760
|
+
host: {
|
|
2761
|
+
type: 'button',
|
|
2762
|
+
'data-slot': 'copy-button',
|
|
2763
|
+
'[attr.aria-label]': "copied() ? 'Copied' : label()",
|
|
2764
|
+
'[class]': 'computedClass()',
|
|
2765
|
+
'(click)': 'copy()',
|
|
2766
|
+
},
|
|
2767
|
+
template: `
|
|
2768
|
+
<span class="grid size-4 place-items-center *:col-start-1 *:row-start-1">
|
|
2769
|
+
@if (copied()) {
|
|
2770
|
+
<svg
|
|
2771
|
+
viewBox="0 0 24 24"
|
|
2772
|
+
fill="none"
|
|
2773
|
+
stroke="currentColor"
|
|
2774
|
+
stroke-width="2"
|
|
2775
|
+
stroke-linecap="round"
|
|
2776
|
+
stroke-linejoin="round"
|
|
2777
|
+
aria-hidden="true"
|
|
2778
|
+
class="size-4 text-success"
|
|
2779
|
+
>
|
|
2780
|
+
<path d="M20 6 9 17l-5-5" />
|
|
2781
|
+
</svg>
|
|
2782
|
+
} @else {
|
|
2783
|
+
<svg
|
|
2784
|
+
viewBox="0 0 24 24"
|
|
2785
|
+
fill="none"
|
|
2786
|
+
stroke="currentColor"
|
|
2787
|
+
stroke-width="2"
|
|
2788
|
+
stroke-linecap="round"
|
|
2789
|
+
stroke-linejoin="round"
|
|
2790
|
+
aria-hidden="true"
|
|
2791
|
+
class="size-4"
|
|
2792
|
+
>
|
|
2793
|
+
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
2794
|
+
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
2795
|
+
</svg>
|
|
2796
|
+
}
|
|
2797
|
+
</span>
|
|
2798
|
+
<ng-content />
|
|
2799
|
+
<span class="sr-only" aria-live="polite">{{ copied() ? 'Copied' : '' }}</span>
|
|
2800
|
+
`,
|
|
2801
|
+
}]
|
|
2802
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
2803
|
+
|
|
2804
|
+
const TONES = {
|
|
2805
|
+
default: 'bg-muted text-foreground border-border',
|
|
2806
|
+
primary: 'bg-primary text-primary-foreground border-transparent',
|
|
2807
|
+
info: 'bg-info/10 text-info border-info/25',
|
|
2808
|
+
success: 'bg-success/10 text-success border-success/25',
|
|
2809
|
+
warning: 'bg-warning/10 text-warning border-warning/25',
|
|
2810
|
+
danger: 'bg-destructive/10 text-destructive border-destructive/25',
|
|
2811
|
+
};
|
|
2812
|
+
/**
|
|
2813
|
+
* Full-width announcement bar. Optionally dismissible and (with `persistKey`) remembers
|
|
2814
|
+
* the dismissal in localStorage. SSR-safe — localStorage is only touched in the browser.
|
|
2815
|
+
*/
|
|
2816
|
+
class BuiBanner {
|
|
2817
|
+
tone = input('default', /* @ts-ignore */
|
|
2818
|
+
...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
|
|
2819
|
+
dismissible = input(true, /* @ts-ignore */
|
|
2820
|
+
...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
2821
|
+
persistKey = input(undefined, /* @ts-ignore */
|
|
2822
|
+
...(ngDevMode ? [{ debugName: "persistKey" }] : /* istanbul ignore next */ []));
|
|
2823
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
2824
|
+
show = signal(true, /* @ts-ignore */
|
|
2825
|
+
...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
|
|
2826
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
2827
|
+
computedClass = computed(() => cn('relative flex w-full items-center gap-3 border-b px-4 py-2.5 text-sm', TONES[this.tone()], this.userClass()), /* @ts-ignore */
|
|
2828
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
2829
|
+
ngOnInit() {
|
|
2830
|
+
const key = this.persistKey();
|
|
2831
|
+
if (this.isBrowser && key && localStorage.getItem(`bui-banner-${key}`) === '1') {
|
|
2832
|
+
this.show.set(false);
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
dismiss() {
|
|
2836
|
+
this.show.set(false);
|
|
2837
|
+
const key = this.persistKey();
|
|
2838
|
+
if (this.isBrowser && key) {
|
|
2839
|
+
localStorage.setItem(`bui-banner-${key}`, '1');
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiBanner, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: BuiBanner, isStandalone: true, selector: "bui-banner", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, persistKey: { classPropertyName: "persistKey", publicName: "persistKey", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "banner", "role": "region", "aria-label": "Announcement" }, properties: { "hidden": "!show()", "class": "computedClass()" } }, ngImport: i0, template: `
|
|
2844
|
+
<div class="flex flex-1 flex-wrap items-center justify-center gap-x-3 gap-y-1">
|
|
2845
|
+
<ng-content />
|
|
2846
|
+
</div>
|
|
2847
|
+
@if (dismissible()) {
|
|
2848
|
+
<button
|
|
2849
|
+
type="button"
|
|
2850
|
+
aria-label="Dismiss"
|
|
2851
|
+
class="shrink-0 rounded-md p-1 opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-current/40"
|
|
2852
|
+
(click)="dismiss()"
|
|
2853
|
+
>
|
|
2854
|
+
<svg
|
|
2855
|
+
viewBox="0 0 24 24"
|
|
2856
|
+
fill="none"
|
|
2857
|
+
stroke="currentColor"
|
|
2858
|
+
stroke-width="2"
|
|
2859
|
+
stroke-linecap="round"
|
|
2860
|
+
stroke-linejoin="round"
|
|
2861
|
+
aria-hidden="true"
|
|
2862
|
+
class="size-4"
|
|
2863
|
+
>
|
|
2864
|
+
<path d="M18 6 6 18" />
|
|
2865
|
+
<path d="m6 6 12 12" />
|
|
2866
|
+
</svg>
|
|
2867
|
+
</button>
|
|
2868
|
+
}
|
|
2869
|
+
`, isInline: true });
|
|
2870
|
+
}
|
|
2871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiBanner, decorators: [{
|
|
2872
|
+
type: Component,
|
|
2873
|
+
args: [{
|
|
2874
|
+
selector: 'bui-banner',
|
|
2875
|
+
host: {
|
|
2876
|
+
'data-slot': 'banner',
|
|
2877
|
+
role: 'region',
|
|
2878
|
+
'aria-label': 'Announcement',
|
|
2879
|
+
'[hidden]': '!show()',
|
|
2880
|
+
'[class]': 'computedClass()',
|
|
2881
|
+
},
|
|
2882
|
+
template: `
|
|
2883
|
+
<div class="flex flex-1 flex-wrap items-center justify-center gap-x-3 gap-y-1">
|
|
2884
|
+
<ng-content />
|
|
2885
|
+
</div>
|
|
2886
|
+
@if (dismissible()) {
|
|
2887
|
+
<button
|
|
2888
|
+
type="button"
|
|
2889
|
+
aria-label="Dismiss"
|
|
2890
|
+
class="shrink-0 rounded-md p-1 opacity-70 transition-opacity outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-current/40"
|
|
2891
|
+
(click)="dismiss()"
|
|
2892
|
+
>
|
|
2893
|
+
<svg
|
|
2894
|
+
viewBox="0 0 24 24"
|
|
2895
|
+
fill="none"
|
|
2896
|
+
stroke="currentColor"
|
|
2897
|
+
stroke-width="2"
|
|
2898
|
+
stroke-linecap="round"
|
|
2899
|
+
stroke-linejoin="round"
|
|
2900
|
+
aria-hidden="true"
|
|
2901
|
+
class="size-4"
|
|
2902
|
+
>
|
|
2903
|
+
<path d="M18 6 6 18" />
|
|
2904
|
+
<path d="m6 6 12 12" />
|
|
2905
|
+
</svg>
|
|
2906
|
+
</button>
|
|
2907
|
+
}
|
|
2908
|
+
`,
|
|
2909
|
+
}]
|
|
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
|
+
|
|
2602
2912
|
/*
|
|
2603
2913
|
* Public API Surface of ng-blatui
|
|
2604
2914
|
*/
|
|
@@ -2607,5 +2917,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2607
2917
|
* Generated bundle index. Do not edit.
|
|
2608
2918
|
*/
|
|
2609
2919
|
|
|
2610
|
-
export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertTitle, BuiAspectRatio, BuiAvatar, BuiBadge, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiCollapsible, BuiCollapsibleContent, BuiCollapsibleTrigger, BuiContainer, 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, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiTooltip, BuiTooltipContent, THEME_TOKENS, ThemeStore, buttonVariants, cn };
|
|
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 };
|
|
2611
2921
|
//# sourceMappingURL=ng-blatui.mjs.map
|