ng-blatui 1.17.0 → 1.19.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.
@@ -4983,6 +4983,448 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
4983
4983
  }]
4984
4984
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
4985
4985
 
4986
+ /**
4987
+ * A terminal / console window (always dark). Put prompt + output lines in the content;
4988
+ * helper classes `.prompt .ok .dim .path .warn` colour them.
4989
+ */
4990
+ class BuiTerminal {
4991
+ title = input(null, /* @ts-ignore */
4992
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
4993
+ buttons = input(true, /* @ts-ignore */
4994
+ ...(ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []));
4995
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
4996
+ computedClass = computed(() => cn('block overflow-hidden rounded-lg border border-zinc-800 bg-zinc-950 text-zinc-100 shadow-md', this.userClass()), /* @ts-ignore */
4997
+ ...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
4998
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTerminal, deps: [], target: i0.ɵɵFactoryTarget.Component });
4999
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: BuiTerminal, isStandalone: true, selector: "bui-terminal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, buttons: { classPropertyName: "buttons", publicName: "buttons", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "terminal" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
5000
+ <div
5001
+ data-slot="terminal-bar"
5002
+ class="flex items-center gap-2 border-b border-white/10 bg-zinc-900 px-3.5 py-2.5"
5003
+ >
5004
+ @if (buttons()) {
5005
+ <span class="size-3 rounded-full" style="background:#ff5f57"></span>
5006
+ <span class="size-3 rounded-full" style="background:#febc2e"></span>
5007
+ <span class="size-3 rounded-full" style="background:#28c840"></span>
5008
+ }
5009
+ @if (title()) {
5010
+ <span
5011
+ data-slot="terminal-title"
5012
+ class="truncate font-mono text-xs text-zinc-400"
5013
+ [class.ml-2]="buttons()"
5014
+ >{{ title() }}</span
5015
+ >
5016
+ }
5017
+ </div>
5018
+ <div
5019
+ data-slot="terminal-body"
5020
+ class="overflow-x-auto p-4 font-mono text-[13px] leading-relaxed [&_.dim]:text-zinc-400 [&_.ok]:text-emerald-400 [&_.path]:text-cyan-400 [&_.prompt]:text-emerald-400 [&_.warn]:text-amber-400"
5021
+ >
5022
+ <ng-content />
5023
+ </div>
5024
+ `, isInline: true });
5025
+ }
5026
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTerminal, decorators: [{
5027
+ type: Component,
5028
+ args: [{
5029
+ selector: 'bui-terminal',
5030
+ host: { 'data-slot': 'terminal', '[class]': 'computedClass()' },
5031
+ template: `
5032
+ <div
5033
+ data-slot="terminal-bar"
5034
+ class="flex items-center gap-2 border-b border-white/10 bg-zinc-900 px-3.5 py-2.5"
5035
+ >
5036
+ @if (buttons()) {
5037
+ <span class="size-3 rounded-full" style="background:#ff5f57"></span>
5038
+ <span class="size-3 rounded-full" style="background:#febc2e"></span>
5039
+ <span class="size-3 rounded-full" style="background:#28c840"></span>
5040
+ }
5041
+ @if (title()) {
5042
+ <span
5043
+ data-slot="terminal-title"
5044
+ class="truncate font-mono text-xs text-zinc-400"
5045
+ [class.ml-2]="buttons()"
5046
+ >{{ title() }}</span
5047
+ >
5048
+ }
5049
+ </div>
5050
+ <div
5051
+ data-slot="terminal-body"
5052
+ class="overflow-x-auto p-4 font-mono text-[13px] leading-relaxed [&_.dim]:text-zinc-400 [&_.ok]:text-emerald-400 [&_.path]:text-cyan-400 [&_.prompt]:text-emerald-400 [&_.warn]:text-amber-400"
5053
+ >
5054
+ <ng-content />
5055
+ </div>
5056
+ `,
5057
+ }]
5058
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], buttons: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttons", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5059
+
5060
+ /** A data-driven feature-comparison / pricing table. */
5061
+ class BuiComparisonTable {
5062
+ tiers = input([], /* @ts-ignore */
5063
+ ...(ngDevMode ? [{ debugName: "tiers" }] : /* istanbul ignore next */ []));
5064
+ rows = input([], /* @ts-ignore */
5065
+ ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
5066
+ highlight = input(null, /* @ts-ignore */
5067
+ ...(ngDevMode ? [{ debugName: "highlight" }] : /* istanbul ignore next */ []));
5068
+ featureLabel = input('Feature', /* @ts-ignore */
5069
+ ...(ngDevMode ? [{ debugName: "featureLabel" }] : /* istanbul ignore next */ []));
5070
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
5071
+ highlightIndex = computed(() => {
5072
+ const highlight = this.highlight();
5073
+ if (typeof highlight === 'number') {
5074
+ return highlight;
5075
+ }
5076
+ return highlight === null ? -1 : this.tiers().indexOf(highlight);
5077
+ }, /* @ts-ignore */
5078
+ ...(ngDevMode ? [{ debugName: "highlightIndex" }] : /* istanbul ignore next */ []));
5079
+ computedClass = computed(() => cn('w-full overflow-x-auto rounded-xl border', this.userClass()), /* @ts-ignore */
5080
+ ...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
5081
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiComparisonTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
5082
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: BuiComparisonTable, isStandalone: true, selector: "bui-comparison-table", inputs: { tiers: { classPropertyName: "tiers", publicName: "tiers", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, highlight: { classPropertyName: "highlight", publicName: "highlight", isSignal: true, isRequired: false, transformFunction: null }, featureLabel: { classPropertyName: "featureLabel", publicName: "featureLabel", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "comparison-table" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
5083
+ <table class="w-full text-sm">
5084
+ <caption class="sr-only">
5085
+ {{
5086
+ featureLabel()
5087
+ }}
5088
+ comparison
5089
+ </caption>
5090
+ <thead>
5091
+ <tr class="border-b bg-muted/40">
5092
+ <th scope="col" class="px-4 py-3 text-left font-medium text-muted-foreground">
5093
+ {{ featureLabel() }}
5094
+ </th>
5095
+ @for (tier of tiers(); track tier) {
5096
+ <th
5097
+ scope="col"
5098
+ class="px-4 py-3 text-center font-semibold"
5099
+ [class]="$index === highlightIndex() ? 'text-primary' : ''"
5100
+ >
5101
+ {{ tier }}
5102
+ </th>
5103
+ }
5104
+ </tr>
5105
+ </thead>
5106
+ <tbody>
5107
+ @for (row of rows(); track row.feature) {
5108
+ <tr class="border-b last:border-0">
5109
+ <th scope="row" class="px-4 py-3 text-left font-medium">{{ row.feature }}</th>
5110
+ @for (value of row.values; track $index) {
5111
+ <td
5112
+ class="px-4 py-3 text-center"
5113
+ [class]="$index === highlightIndex() ? 'bg-muted/30' : ''"
5114
+ >
5115
+ @if (value === true) {
5116
+ <svg
5117
+ viewBox="0 0 24 24"
5118
+ fill="none"
5119
+ stroke="currentColor"
5120
+ stroke-width="2"
5121
+ stroke-linecap="round"
5122
+ stroke-linejoin="round"
5123
+ aria-label="Included"
5124
+ class="mx-auto size-4 text-primary"
5125
+ >
5126
+ <path d="M20 6 9 17l-5-5" />
5127
+ </svg>
5128
+ } @else if (value === false || value === null) {
5129
+ <span class="text-muted-foreground" aria-label="Not included">—</span>
5130
+ } @else {
5131
+ {{ value }}
5132
+ }
5133
+ </td>
5134
+ }
5135
+ </tr>
5136
+ }
5137
+ </tbody>
5138
+ </table>
5139
+ `, isInline: true });
5140
+ }
5141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiComparisonTable, decorators: [{
5142
+ type: Component,
5143
+ args: [{
5144
+ selector: 'bui-comparison-table',
5145
+ host: { 'data-slot': 'comparison-table', '[class]': 'computedClass()' },
5146
+ template: `
5147
+ <table class="w-full text-sm">
5148
+ <caption class="sr-only">
5149
+ {{
5150
+ featureLabel()
5151
+ }}
5152
+ comparison
5153
+ </caption>
5154
+ <thead>
5155
+ <tr class="border-b bg-muted/40">
5156
+ <th scope="col" class="px-4 py-3 text-left font-medium text-muted-foreground">
5157
+ {{ featureLabel() }}
5158
+ </th>
5159
+ @for (tier of tiers(); track tier) {
5160
+ <th
5161
+ scope="col"
5162
+ class="px-4 py-3 text-center font-semibold"
5163
+ [class]="$index === highlightIndex() ? 'text-primary' : ''"
5164
+ >
5165
+ {{ tier }}
5166
+ </th>
5167
+ }
5168
+ </tr>
5169
+ </thead>
5170
+ <tbody>
5171
+ @for (row of rows(); track row.feature) {
5172
+ <tr class="border-b last:border-0">
5173
+ <th scope="row" class="px-4 py-3 text-left font-medium">{{ row.feature }}</th>
5174
+ @for (value of row.values; track $index) {
5175
+ <td
5176
+ class="px-4 py-3 text-center"
5177
+ [class]="$index === highlightIndex() ? 'bg-muted/30' : ''"
5178
+ >
5179
+ @if (value === true) {
5180
+ <svg
5181
+ viewBox="0 0 24 24"
5182
+ fill="none"
5183
+ stroke="currentColor"
5184
+ stroke-width="2"
5185
+ stroke-linecap="round"
5186
+ stroke-linejoin="round"
5187
+ aria-label="Included"
5188
+ class="mx-auto size-4 text-primary"
5189
+ >
5190
+ <path d="M20 6 9 17l-5-5" />
5191
+ </svg>
5192
+ } @else if (value === false || value === null) {
5193
+ <span class="text-muted-foreground" aria-label="Not included">—</span>
5194
+ } @else {
5195
+ {{ value }}
5196
+ }
5197
+ </td>
5198
+ }
5199
+ </tr>
5200
+ }
5201
+ </tbody>
5202
+ </table>
5203
+ `,
5204
+ }]
5205
+ }], propDecorators: { tiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "tiers", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], highlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlight", required: false }] }], featureLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "featureLabel", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5206
+
5207
+ /**
5208
+ * A card that flips to reveal its back. Default content is the front; project the back
5209
+ * with `[buiFlipBack]`. `trigger="hover"` (default) or `"click"` (keyboard-accessible).
5210
+ */
5211
+ class BuiFlipCard {
5212
+ trigger = input('hover', /* @ts-ignore */
5213
+ ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
5214
+ height = input('16rem', /* @ts-ignore */
5215
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
5216
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
5217
+ flipped = signal(false, /* @ts-ignore */
5218
+ ...(ngDevMode ? [{ debugName: "flipped" }] : /* istanbul ignore next */ []));
5219
+ computedClass = computed(() => cn('relative block w-full', this.userClass()), /* @ts-ignore */
5220
+ ...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
5221
+ onHover(shouldFlip) {
5222
+ if (this.trigger() === 'hover') {
5223
+ this.flipped.set(shouldFlip);
5224
+ }
5225
+ }
5226
+ onClick() {
5227
+ if (this.trigger() === 'click') {
5228
+ this.flipped.update((value) => !value);
5229
+ }
5230
+ }
5231
+ onKeydown(event) {
5232
+ if (!(this.trigger() === 'click' && (event.key === 'Enter' || event.key === ' '))) {
5233
+ return;
5234
+ }
5235
+ event.preventDefault();
5236
+ this.flipped.update((value) => !value);
5237
+ }
5238
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFlipCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
5239
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiFlipCard, isStandalone: true, selector: "bui-flip-card", inputs: { trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "flip-card" }, listeners: { "mouseenter": "onHover(true)", "mouseleave": "onHover(false)", "focusin": "onHover(true)", "focusout": "onHover(false)", "click": "onClick()", "keydown": "onKeydown($event)" }, properties: { "class": "computedClass()", "style.perspective": "'1000px'", "style.height": "height()", "attr.role": "trigger() === 'click' ? 'button' : null", "attr.tabindex": "trigger() === 'click' ? 0 : null", "attr.aria-pressed": "trigger() === 'click' ? flipped() : null" } }, ngImport: i0, template: `
5240
+ <div
5241
+ data-slot="flip-card-flipper"
5242
+ class="relative block size-full rounded-xl transition-transform duration-500 [transform-style:preserve-3d]"
5243
+ [class]="flipped() ? '[transform:rotateY(180deg)]' : ''"
5244
+ >
5245
+ <div
5246
+ data-slot="flip-card-front"
5247
+ class="absolute inset-0 flex flex-col overflow-hidden rounded-xl border bg-card p-6 text-card-foreground shadow-sm [backface-visibility:hidden]"
5248
+ [attr.aria-hidden]="flipped()"
5249
+ >
5250
+ <ng-content />
5251
+ </div>
5252
+ <div
5253
+ data-slot="flip-card-back"
5254
+ class="absolute inset-0 flex [transform:rotateY(180deg)] flex-col overflow-hidden rounded-xl border bg-card p-6 text-card-foreground shadow-sm [backface-visibility:hidden]"
5255
+ [attr.aria-hidden]="!flipped()"
5256
+ >
5257
+ <ng-content select="[buiFlipBack]" />
5258
+ </div>
5259
+ </div>
5260
+ `, isInline: true });
5261
+ }
5262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiFlipCard, decorators: [{
5263
+ type: Component,
5264
+ args: [{
5265
+ selector: 'bui-flip-card',
5266
+ host: {
5267
+ 'data-slot': 'flip-card',
5268
+ '[class]': 'computedClass()',
5269
+ '[style.perspective]': "'1000px'",
5270
+ '[style.height]': 'height()',
5271
+ '[attr.role]': "trigger() === 'click' ? 'button' : null",
5272
+ '[attr.tabindex]': "trigger() === 'click' ? 0 : null",
5273
+ '[attr.aria-pressed]': "trigger() === 'click' ? flipped() : null",
5274
+ '(mouseenter)': 'onHover(true)',
5275
+ '(mouseleave)': 'onHover(false)',
5276
+ '(focusin)': 'onHover(true)',
5277
+ '(focusout)': 'onHover(false)',
5278
+ '(click)': 'onClick()',
5279
+ '(keydown)': 'onKeydown($event)',
5280
+ },
5281
+ template: `
5282
+ <div
5283
+ data-slot="flip-card-flipper"
5284
+ class="relative block size-full rounded-xl transition-transform duration-500 [transform-style:preserve-3d]"
5285
+ [class]="flipped() ? '[transform:rotateY(180deg)]' : ''"
5286
+ >
5287
+ <div
5288
+ data-slot="flip-card-front"
5289
+ class="absolute inset-0 flex flex-col overflow-hidden rounded-xl border bg-card p-6 text-card-foreground shadow-sm [backface-visibility:hidden]"
5290
+ [attr.aria-hidden]="flipped()"
5291
+ >
5292
+ <ng-content />
5293
+ </div>
5294
+ <div
5295
+ data-slot="flip-card-back"
5296
+ class="absolute inset-0 flex [transform:rotateY(180deg)] flex-col overflow-hidden rounded-xl border bg-card p-6 text-card-foreground shadow-sm [backface-visibility:hidden]"
5297
+ [attr.aria-hidden]="!flipped()"
5298
+ >
5299
+ <ng-content select="[buiFlipBack]" />
5300
+ </div>
5301
+ </div>
5302
+ `,
5303
+ }]
5304
+ }], propDecorators: { trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5305
+
5306
+ /** A card with a radial spotlight glow that follows the cursor on hover. */
5307
+ class BuiSpotlightCard {
5308
+ color = input(null, /* @ts-ignore */
5309
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
5310
+ size = input(350, /* @ts-ignore */
5311
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5312
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
5313
+ host = inject(ElementRef);
5314
+ hover = signal(false, /* @ts-ignore */
5315
+ ...(ngDevMode ? [{ debugName: "hover" }] : /* istanbul ignore next */ []));
5316
+ glowStyle = computed(() => {
5317
+ const glow = this.color() ?? 'color-mix(in oklab, var(--foreground) 14%, transparent)';
5318
+ return `radial-gradient(circle ${this.size()}px at var(--x, 50%) var(--y, 50%), ${glow}, transparent 80%)`;
5319
+ }, /* @ts-ignore */
5320
+ ...(ngDevMode ? [{ debugName: "glowStyle" }] : /* istanbul ignore next */ []));
5321
+ computedClass = computed(() => cn('relative overflow-hidden rounded-xl border bg-card p-6 text-card-foreground shadow-sm', this.userClass()), /* @ts-ignore */
5322
+ ...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
5323
+ track(event) {
5324
+ const element = this.host.nativeElement;
5325
+ const rect = element.getBoundingClientRect();
5326
+ element.style.setProperty('--x', `${event.clientX - rect.left}px`);
5327
+ element.style.setProperty('--y', `${event.clientY - rect.top}px`);
5328
+ }
5329
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiSpotlightCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
5330
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiSpotlightCard, isStandalone: true, selector: "bui-spotlight-card", inputs: { color: { classPropertyName: "color", publicName: "color", 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": "spotlight-card" }, listeners: { "mousemove": "track($event)", "mouseenter": "hover.set(true)", "mouseleave": "hover.set(false)" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
5331
+ <div
5332
+ aria-hidden="true"
5333
+ class="pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-300"
5334
+ [style.opacity]="hover() ? 1 : 0"
5335
+ [style.background]="glowStyle()"
5336
+ ></div>
5337
+ <div class="relative z-10"><ng-content /></div>
5338
+ `, isInline: true });
5339
+ }
5340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiSpotlightCard, decorators: [{
5341
+ type: Component,
5342
+ args: [{
5343
+ selector: 'bui-spotlight-card',
5344
+ host: {
5345
+ 'data-slot': 'spotlight-card',
5346
+ '[class]': 'computedClass()',
5347
+ '(mousemove)': 'track($event)',
5348
+ '(mouseenter)': 'hover.set(true)',
5349
+ '(mouseleave)': 'hover.set(false)',
5350
+ },
5351
+ template: `
5352
+ <div
5353
+ aria-hidden="true"
5354
+ class="pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-300"
5355
+ [style.opacity]="hover() ? 1 : 0"
5356
+ [style.background]="glowStyle()"
5357
+ ></div>
5358
+ <div class="relative z-10"><ng-content /></div>
5359
+ `,
5360
+ }]
5361
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5362
+
5363
+ /** A card that tilts in 3D toward the cursor. SSR-safe (geometry read on mousemove). */
5364
+ class BuiTiltCard {
5365
+ max = input(10, /* @ts-ignore */
5366
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
5367
+ scaleTo = input(1.05, /* @ts-ignore */
5368
+ ...(ngDevMode ? [{ debugName: "scaleTo" }] : /* istanbul ignore next */ []));
5369
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
5370
+ active = signal(false, /* @ts-ignore */
5371
+ ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
5372
+ rx = signal(0, /* @ts-ignore */
5373
+ ...(ngDevMode ? [{ debugName: "rx" }] : /* istanbul ignore next */ []));
5374
+ ry = signal(0, /* @ts-ignore */
5375
+ ...(ngDevMode ? [{ debugName: "ry" }] : /* istanbul ignore next */ []));
5376
+ cardTransform = computed(() => {
5377
+ const scale = this.active() ? this.scaleTo() : 1;
5378
+ return `rotateX(${this.rx()}deg) rotateY(${this.ry()}deg) scale(${scale})`;
5379
+ }, /* @ts-ignore */
5380
+ ...(ngDevMode ? [{ debugName: "cardTransform" }] : /* istanbul ignore next */ []));
5381
+ computedClass = computed(() => cn('block [perspective:1000px]', this.userClass()), /* @ts-ignore */
5382
+ ...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
5383
+ move(event) {
5384
+ const rect = event.currentTarget.getBoundingClientRect();
5385
+ const px = (event.clientX - rect.left) / rect.width;
5386
+ const py = (event.clientY - rect.top) / rect.height;
5387
+ this.active.set(true);
5388
+ this.ry.set((px - 0.5) * 2 * this.max());
5389
+ this.rx.set(-(py - 0.5) * 2 * this.max());
5390
+ }
5391
+ leave() {
5392
+ this.active.set(false);
5393
+ this.rx.set(0);
5394
+ this.ry.set(0);
5395
+ }
5396
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTiltCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
5397
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.2", type: BuiTiltCard, isStandalone: true, selector: "bui-tilt-card", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, scaleTo: { classPropertyName: "scaleTo", publicName: "scaleTo", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "tilt-card" }, properties: { "class": "computedClass()" } }, ngImport: i0, template: `
5398
+ <div
5399
+ class="relative block overflow-hidden rounded-xl border bg-card text-card-foreground shadow-sm [transform-style:preserve-3d]"
5400
+ [class]="active() ? 'transition-none' : 'transition-transform duration-500 ease-out'"
5401
+ [style.transform]="cardTransform()"
5402
+ (mousemove)="move($event)"
5403
+ (mouseleave)="leave()"
5404
+ >
5405
+ <ng-content />
5406
+ </div>
5407
+ `, isInline: true });
5408
+ }
5409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: BuiTiltCard, decorators: [{
5410
+ type: Component,
5411
+ args: [{
5412
+ selector: 'bui-tilt-card',
5413
+ host: { 'data-slot': 'tilt-card', '[class]': 'computedClass()' },
5414
+ template: `
5415
+ <div
5416
+ class="relative block overflow-hidden rounded-xl border bg-card text-card-foreground shadow-sm [transform-style:preserve-3d]"
5417
+ [class]="active() ? 'transition-none' : 'transition-transform duration-500 ease-out'"
5418
+ [style.transform]="cardTransform()"
5419
+ (mousemove)="move($event)"
5420
+ (mouseleave)="leave()"
5421
+ >
5422
+ <ng-content />
5423
+ </div>
5424
+ `,
5425
+ }]
5426
+ }], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], scaleTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "scaleTo", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5427
+
4986
5428
  /*
4987
5429
  * Public API Surface of ng-blatui
4988
5430
  */
@@ -4991,5 +5433,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
4991
5433
  * Generated bundle index. Do not edit.
4992
5434
  */
4993
5435
 
4994
- export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertDialogAction, BuiAlertDialogCancel, BuiAlertDialogContent, BuiAlertDialogDescription, BuiAlertDialogFooter, BuiAlertDialogHeader, BuiAlertDialogTitle, BuiAlertTitle, BuiAspectRatio, BuiAutosizeTextarea, BuiAvatar, BuiAvatarGroup, BuiBadge, BuiBanner, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiCodeBlock, BuiCollapsible, BuiCollapsibleContent, BuiCollapsibleTrigger, BuiContainer, BuiCopyButton, BuiDialogContent, BuiDialogDescription, BuiDialogFooter, BuiDialogHeader, BuiDialogTitle, BuiDotPattern, BuiDropdownMenu, BuiDropdownMenuItem, BuiDropdownMenuLabel, BuiDropdownMenuSeparator, BuiEmpty, BuiEmptyContent, BuiEmptyDescription, BuiEmptyHeader, BuiEmptyMedia, BuiEmptyTitle, BuiField, BuiFieldContent, BuiFieldDescription, BuiFieldError, BuiFieldGroup, BuiFieldLabel, BuiFieldLegend, BuiFieldSeparator, BuiFieldSet, BuiFieldTitle, BuiGridPattern, BuiHoverCard, BuiHoverCardContent, BuiInput, BuiInputGroup, BuiInputGroupAddon, BuiInputGroupButton, BuiInputGroupInput, BuiInputGroupText, BuiItem, BuiItemActions, BuiItemContent, BuiItemDescription, BuiItemGroup, BuiItemMedia, BuiItemTitle, BuiKbd, BuiLabel, BuiMenubar, BuiMenubarTrigger, BuiMeter, BuiPagination, BuiPaginationContent, BuiPaginationEllipsis, BuiPaginationItem, BuiPaginationLink, BuiPopover, BuiPopoverContent, BuiProgress, BuiQuantitySelector, BuiRadioGroup, BuiRadioGroupItem, BuiRating, BuiScrollArea, BuiSegmentedControl, BuiSeparator, BuiSkeleton, BuiSlider, BuiSpinner, BuiStat, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTable, BuiTableBody, BuiTableCaption, BuiTableCell, BuiTableContainer, BuiTableFooter, BuiTableHead, BuiTableHeader, BuiTableRow, BuiTabs, BuiTextarea, BuiThemeCustomizer, BuiToggle, BuiTooltip, BuiTooltipContent, BuiTypography, BuiVisuallyHidden, THEME_TOKENS, ThemeStore, buttonVariants, cn, toggleVariants };
5436
+ export { BuiAccordion, BuiAccordionContent, BuiAccordionItem, BuiAccordionTrigger, BuiAlert, BuiAlertDescription, BuiAlertDialogAction, BuiAlertDialogCancel, BuiAlertDialogContent, BuiAlertDialogDescription, BuiAlertDialogFooter, BuiAlertDialogHeader, BuiAlertDialogTitle, BuiAlertTitle, BuiAspectRatio, BuiAutosizeTextarea, BuiAvatar, BuiAvatarGroup, BuiBadge, BuiBanner, BuiBreadcrumb, BuiBreadcrumbEllipsis, BuiBreadcrumbItem, BuiBreadcrumbLink, BuiBreadcrumbList, BuiBreadcrumbPage, BuiBreadcrumbSeparator, BuiButton, BuiButtonGroup, BuiButtonGroupText, BuiCard, BuiCardAction, BuiCardContent, BuiCardDescription, BuiCardFooter, BuiCardHeader, BuiCardTitle, BuiCheckbox, BuiCodeBlock, BuiCollapsible, BuiCollapsibleContent, BuiCollapsibleTrigger, BuiComparisonTable, BuiContainer, BuiCopyButton, BuiDialogContent, BuiDialogDescription, BuiDialogFooter, BuiDialogHeader, BuiDialogTitle, BuiDotPattern, BuiDropdownMenu, BuiDropdownMenuItem, BuiDropdownMenuLabel, BuiDropdownMenuSeparator, BuiEmpty, BuiEmptyContent, BuiEmptyDescription, BuiEmptyHeader, BuiEmptyMedia, BuiEmptyTitle, BuiField, BuiFieldContent, BuiFieldDescription, BuiFieldError, BuiFieldGroup, BuiFieldLabel, BuiFieldLegend, BuiFieldSeparator, BuiFieldSet, BuiFieldTitle, BuiFlipCard, BuiGridPattern, BuiHoverCard, BuiHoverCardContent, BuiInput, BuiInputGroup, BuiInputGroupAddon, BuiInputGroupButton, BuiInputGroupInput, BuiInputGroupText, BuiItem, BuiItemActions, BuiItemContent, BuiItemDescription, BuiItemGroup, BuiItemMedia, BuiItemTitle, BuiKbd, BuiLabel, BuiMenubar, BuiMenubarTrigger, BuiMeter, BuiPagination, BuiPaginationContent, BuiPaginationEllipsis, BuiPaginationItem, BuiPaginationLink, BuiPopover, BuiPopoverContent, BuiProgress, BuiQuantitySelector, BuiRadioGroup, BuiRadioGroupItem, BuiRating, BuiScrollArea, BuiSegmentedControl, BuiSeparator, BuiSkeleton, BuiSlider, BuiSpinner, BuiSpotlightCard, BuiStat, BuiSwitch, BuiTabList, BuiTabPanel, BuiTabTrigger, BuiTable, BuiTableBody, BuiTableCaption, BuiTableCell, BuiTableContainer, BuiTableFooter, BuiTableHead, BuiTableHeader, BuiTableRow, BuiTabs, BuiTerminal, BuiTextarea, BuiThemeCustomizer, BuiTiltCard, BuiToggle, BuiTooltip, BuiTooltipContent, BuiTypography, BuiVisuallyHidden, THEME_TOKENS, ThemeStore, buttonVariants, cn, toggleVariants };
4995
5437
  //# sourceMappingURL=ng-blatui.mjs.map