ng-blatui 1.17.0 → 1.18.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,227 @@ 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
+
4986
5207
  /*
4987
5208
  * Public API Surface of ng-blatui
4988
5209
  */
@@ -4991,5 +5212,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
4991
5212
  * Generated bundle index. Do not edit.
4992
5213
  */
4993
5214
 
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 };
5215
+ 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, 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, BuiTerminal, BuiTextarea, BuiThemeCustomizer, BuiToggle, BuiTooltip, BuiTooltipContent, BuiTypography, BuiVisuallyHidden, THEME_TOKENS, ThemeStore, buttonVariants, cn, toggleVariants };
4995
5216
  //# sourceMappingURL=ng-blatui.mjs.map