@bsginstitute/bsg-integra 0.0.4 → 0.0.6
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/.claude/settings.local.json +5 -0
- package/bsginstitute-bsg-integra-0.0.4.tgz +0 -0
- package/bsginstitute-bsg-integra-0.0.6.tgz +0 -0
- package/fesm2022/bsginstitute-bsg-integra.mjs +3194 -22
- package/fesm2022/bsginstitute-bsg-integra.mjs.map +1 -1
- package/index.d.ts +755 -4
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, signal, computed, Component, inject, output, contentChildren, viewChild, effect, HostListener, linkedSignal, forwardRef, HostBinding, Directive, ElementRef, model, Injectable, PLATFORM_ID, ChangeDetectionStrategy, ViewChild } from '@angular/core';
|
|
2
|
+
import { input, signal, computed, Component, inject, output, contentChildren, viewChild, effect, HostListener, linkedSignal, forwardRef, HostBinding, Directive, ElementRef, model, Injectable, PLATFORM_ID, ChangeDetectionStrategy, EventEmitter, Output, Input, ViewChild } from '@angular/core';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import * as i1 from '@angular/platform-browser';
|
|
6
6
|
import * as i1$2 from '@angular/common';
|
|
7
|
-
import { DOCUMENT, CommonModule, isPlatformBrowser } from '@angular/common';
|
|
7
|
+
import { DOCUMENT, CommonModule, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
8
8
|
import * as i1$1 from '@angular/forms';
|
|
9
9
|
import { NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS } from '@angular/forms';
|
|
10
10
|
|
|
@@ -1170,19 +1170,51 @@ const buttonVariants = cva(clsx('inline-flex items-center justify-center', 'gap-
|
|
|
1170
1170
|
{ shape: 'icon', size: 'sm', class: 'w-[27px] h-[27px] p-2' },
|
|
1171
1171
|
{ shape: 'icon', size: 'md', class: 'w-[35px] h-[35px] p-2' },
|
|
1172
1172
|
{ shape: 'icon', size: 'lg', class: 'w-[43px] h-[43px] p-2' },
|
|
1173
|
-
{
|
|
1174
|
-
|
|
1175
|
-
|
|
1173
|
+
{
|
|
1174
|
+
shape: 'icon-only',
|
|
1175
|
+
size: 'sm',
|
|
1176
|
+
class: 'w-[27px] h-[27px] min-w-[27px] min-h-[27px] p-0',
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
shape: 'icon-only',
|
|
1180
|
+
size: 'md',
|
|
1181
|
+
class: 'w-[35px] h-[35px] min-w-[35px] min-h-[35px] p-0',
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
shape: 'icon-only',
|
|
1185
|
+
size: 'lg',
|
|
1186
|
+
class: 'w-[43px] h-[43px] min-w-[43px] min-h-[43px] p-0',
|
|
1187
|
+
},
|
|
1176
1188
|
{
|
|
1177
1189
|
shape: 'icon-only',
|
|
1178
1190
|
variant: 'outline',
|
|
1179
1191
|
class: 'bg-transparent border border-slate-300 text-purple-600 hover:opacity-90 active:border-purple-600 focus-visible:border-slate-500 focus-visible:text-purple-800 focus-visible:ring-2 focus-visible:ring-purple-600 focus-visible:ring-offset-2',
|
|
1180
1192
|
},
|
|
1181
|
-
{
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1193
|
+
{
|
|
1194
|
+
shape: 'icon-only',
|
|
1195
|
+
variant: 'default',
|
|
1196
|
+
class: 'bg-violet-600 text-white border border-violet-600',
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
shape: 'icon-only',
|
|
1200
|
+
variant: 'secondary',
|
|
1201
|
+
class: 'bg-blue-600 text-white border border-blue-600',
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
shape: 'icon-only',
|
|
1205
|
+
variant: 'ghost',
|
|
1206
|
+
class: 'bg-violet-100 text-slate-800 border border-violet-100',
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
shape: 'icon-only',
|
|
1210
|
+
variant: 'link',
|
|
1211
|
+
class: 'bg-transparent text-blue-600 border border-transparent',
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
shape: 'icon-only',
|
|
1215
|
+
variant: 'destructive',
|
|
1216
|
+
class: 'bg-red-600 text-white border border-red-600',
|
|
1217
|
+
},
|
|
1186
1218
|
],
|
|
1187
1219
|
defaultVariants: {
|
|
1188
1220
|
size: 'md',
|
|
@@ -1240,9 +1272,9 @@ class ButtonComponent {
|
|
|
1240
1272
|
Click = output();
|
|
1241
1273
|
isDisabled = computed(() => this.disabled() || this.spinner(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
1242
1274
|
isIconButton = computed(() => this.shape() === 'icon-only' || this.shape() === 'icon', ...(ngDevMode ? [{ debugName: "isIconButton" }] : []));
|
|
1243
|
-
buttonSquarePx = computed(() =>
|
|
1244
|
-
iconFontPx = computed(() =>
|
|
1245
|
-
spinnerPx = computed(() =>
|
|
1275
|
+
buttonSquarePx = computed(() => this.size() === 'sm' ? 27 : this.size() === 'lg' ? 43 : 35, ...(ngDevMode ? [{ debugName: "buttonSquarePx" }] : []));
|
|
1276
|
+
iconFontPx = computed(() => this.size() === 'sm' ? 15 : this.size() === 'lg' ? 22 : 18, ...(ngDevMode ? [{ debugName: "iconFontPx" }] : []));
|
|
1277
|
+
spinnerPx = computed(() => this.size() === 'sm' ? 14 : this.size() === 'lg' ? 20 : 16, ...(ngDevMode ? [{ debugName: "spinnerPx" }] : []));
|
|
1246
1278
|
buttonClasses = computed(() => clsx(buttonVariants({
|
|
1247
1279
|
size: this.size(),
|
|
1248
1280
|
variant: this.variant(),
|
|
@@ -1268,7 +1300,9 @@ class ButtonComponent {
|
|
|
1268
1300
|
[disabled]="isDisabled()"
|
|
1269
1301
|
[attr.aria-disabled]="isDisabled()"
|
|
1270
1302
|
[attr.aria-busy]="spinner() ? 'true' : null"
|
|
1271
|
-
[attr.aria-label]="
|
|
1303
|
+
[attr.aria-label]="
|
|
1304
|
+
ariaLabel() ?? (isIconButton() ? label() || 'Icon button' : null)
|
|
1305
|
+
"
|
|
1272
1306
|
[style.width.px]="isIconButton() ? buttonSquarePx() : null"
|
|
1273
1307
|
[style.minWidth.px]="isIconButton() ? buttonSquarePx() : null"
|
|
1274
1308
|
[style.height.px]="isIconButton() ? buttonSquarePx() : null"
|
|
@@ -1297,13 +1331,23 @@ class ButtonComponent {
|
|
|
1297
1331
|
<ng-content></ng-content>
|
|
1298
1332
|
</span>
|
|
1299
1333
|
} @else {
|
|
1300
|
-
<span
|
|
1334
|
+
<span
|
|
1335
|
+
class="bsg-btn-icon"
|
|
1336
|
+
[class]="iconClasses('left')"
|
|
1337
|
+
[style.opacity]="spinner() ? 0 : 1"
|
|
1338
|
+
>
|
|
1301
1339
|
<ng-content select="[left-icon]"></ng-content>
|
|
1302
1340
|
</span>
|
|
1303
1341
|
|
|
1304
|
-
<span [class]="labelClasses()" [style.opacity]="spinner() ? 0 : 1">{{
|
|
1342
|
+
<span [class]="labelClasses()" [style.opacity]="spinner() ? 0 : 1">{{
|
|
1343
|
+
label()
|
|
1344
|
+
}}</span>
|
|
1305
1345
|
|
|
1306
|
-
<span
|
|
1346
|
+
<span
|
|
1347
|
+
class="bsg-btn-icon"
|
|
1348
|
+
[class]="iconClasses('right')"
|
|
1349
|
+
[style.opacity]="spinner() ? 0 : 1"
|
|
1350
|
+
>
|
|
1307
1351
|
<ng-content select="[right-icon]"></ng-content>
|
|
1308
1352
|
</span>
|
|
1309
1353
|
}
|
|
@@ -1320,7 +1364,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
1320
1364
|
[disabled]="isDisabled()"
|
|
1321
1365
|
[attr.aria-disabled]="isDisabled()"
|
|
1322
1366
|
[attr.aria-busy]="spinner() ? 'true' : null"
|
|
1323
|
-
[attr.aria-label]="
|
|
1367
|
+
[attr.aria-label]="
|
|
1368
|
+
ariaLabel() ?? (isIconButton() ? label() || 'Icon button' : null)
|
|
1369
|
+
"
|
|
1324
1370
|
[style.width.px]="isIconButton() ? buttonSquarePx() : null"
|
|
1325
1371
|
[style.minWidth.px]="isIconButton() ? buttonSquarePx() : null"
|
|
1326
1372
|
[style.height.px]="isIconButton() ? buttonSquarePx() : null"
|
|
@@ -1349,13 +1395,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
1349
1395
|
<ng-content></ng-content>
|
|
1350
1396
|
</span>
|
|
1351
1397
|
} @else {
|
|
1352
|
-
<span
|
|
1398
|
+
<span
|
|
1399
|
+
class="bsg-btn-icon"
|
|
1400
|
+
[class]="iconClasses('left')"
|
|
1401
|
+
[style.opacity]="spinner() ? 0 : 1"
|
|
1402
|
+
>
|
|
1353
1403
|
<ng-content select="[left-icon]"></ng-content>
|
|
1354
1404
|
</span>
|
|
1355
1405
|
|
|
1356
|
-
<span [class]="labelClasses()" [style.opacity]="spinner() ? 0 : 1">{{
|
|
1406
|
+
<span [class]="labelClasses()" [style.opacity]="spinner() ? 0 : 1">{{
|
|
1407
|
+
label()
|
|
1408
|
+
}}</span>
|
|
1357
1409
|
|
|
1358
|
-
<span
|
|
1410
|
+
<span
|
|
1411
|
+
class="bsg-btn-icon"
|
|
1412
|
+
[class]="iconClasses('right')"
|
|
1413
|
+
[style.opacity]="spinner() ? 0 : 1"
|
|
1414
|
+
>
|
|
1359
1415
|
<ng-content select="[right-icon]"></ng-content>
|
|
1360
1416
|
</span>
|
|
1361
1417
|
}
|
|
@@ -6618,6 +6674,3122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
6618
6674
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex}\n"] }]
|
|
6619
6675
|
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
|
|
6620
6676
|
|
|
6677
|
+
/**
|
|
6678
|
+
* Tabs Root Component
|
|
6679
|
+
*
|
|
6680
|
+
* The root container for a set of tabs. Manages the active tab state.
|
|
6681
|
+
*
|
|
6682
|
+
* Usage:
|
|
6683
|
+
* ```html
|
|
6684
|
+
* <bsg-tabs [defaultValue]="0" (valueChange)="onTabChange($event)">
|
|
6685
|
+
* <bsg-tabs-list>
|
|
6686
|
+
* <bsg-tabs-trigger [value]="0">Tab 1</bsg-tabs-trigger>
|
|
6687
|
+
* <bsg-tabs-trigger [value]="1">Tab 2</bsg-tabs-trigger>
|
|
6688
|
+
* </bsg-tabs-list>
|
|
6689
|
+
* <bsg-tabs-content [value]="0">Content 1</bsg-tabs-content>
|
|
6690
|
+
* <bsg-tabs-content [value]="1">Content 2</bsg-tabs-content>
|
|
6691
|
+
* </bsg-tabs>
|
|
6692
|
+
* ```
|
|
6693
|
+
*/
|
|
6694
|
+
class TabsComponent {
|
|
6695
|
+
/** Default active tab value */
|
|
6696
|
+
defaultValue = input(0, ...(ngDevMode ? [{ debugName: "defaultValue" }] : []));
|
|
6697
|
+
/** Additional CSS classes */
|
|
6698
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
6699
|
+
/** Controlled value (if you want to control the tab from outside) */
|
|
6700
|
+
value = input(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
6701
|
+
/** Event emitted when tab changes */
|
|
6702
|
+
valueChange = output();
|
|
6703
|
+
// Internal state for active tab
|
|
6704
|
+
_internalValue = signal(null, ...(ngDevMode ? [{ debugName: "_internalValue" }] : []));
|
|
6705
|
+
// Computed active value (uses controlled value if set, otherwise internal state, otherwise default)
|
|
6706
|
+
activeValue = computed(() => {
|
|
6707
|
+
const controlled = this.value();
|
|
6708
|
+
if (controlled !== null)
|
|
6709
|
+
return controlled;
|
|
6710
|
+
const internal = this._internalValue();
|
|
6711
|
+
if (internal !== null)
|
|
6712
|
+
return internal;
|
|
6713
|
+
return this.defaultValue();
|
|
6714
|
+
}, ...(ngDevMode ? [{ debugName: "activeValue" }] : []));
|
|
6715
|
+
// Computed classes
|
|
6716
|
+
computedClasses = computed(() => clsx(this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
6717
|
+
/**
|
|
6718
|
+
* Set the active tab value
|
|
6719
|
+
*/
|
|
6720
|
+
setValue(value) {
|
|
6721
|
+
// Only update if it's not a controlled component
|
|
6722
|
+
if (this.value() === null) {
|
|
6723
|
+
this._internalValue.set(value);
|
|
6724
|
+
}
|
|
6725
|
+
this.valueChange.emit(value);
|
|
6726
|
+
}
|
|
6727
|
+
/**
|
|
6728
|
+
* Get the current active tab value
|
|
6729
|
+
*/
|
|
6730
|
+
getValue() {
|
|
6731
|
+
return this.activeValue();
|
|
6732
|
+
}
|
|
6733
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6734
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TabsComponent, isStandalone: true, selector: "bsg-tabs", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
6735
|
+
<div [class]="computedClasses()" data-orientation="horizontal">
|
|
6736
|
+
<ng-content />
|
|
6737
|
+
</div>
|
|
6738
|
+
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
6739
|
+
}
|
|
6740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsComponent, decorators: [{
|
|
6741
|
+
type: Component,
|
|
6742
|
+
args: [{ selector: 'bsg-tabs', standalone: true, template: `
|
|
6743
|
+
<div [class]="computedClasses()" data-orientation="horizontal">
|
|
6744
|
+
<ng-content />
|
|
6745
|
+
</div>
|
|
6746
|
+
`, styles: [":host{display:block}\n"] }]
|
|
6747
|
+
}], propDecorators: { defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
6748
|
+
|
|
6749
|
+
/**
|
|
6750
|
+
* Tab Navigation container variants
|
|
6751
|
+
*
|
|
6752
|
+
* Controls the overall tab navigation container layout
|
|
6753
|
+
*/
|
|
6754
|
+
const tabNavigationVariants = cva(clsx(
|
|
6755
|
+
// Layout
|
|
6756
|
+
'flex', 'gap-2', 'items-start'), {
|
|
6757
|
+
variants: {
|
|
6758
|
+
layout: {
|
|
6759
|
+
default: 'flex-wrap',
|
|
6760
|
+
carousel: clsx('overflow-x-auto', 'overflow-y-hidden', 'flex-nowrap', 'scroll-smooth',
|
|
6761
|
+
// Hide scrollbar - navigation is via buttons
|
|
6762
|
+
'[scrollbar-width:none]', '[&::-webkit-scrollbar]:hidden'),
|
|
6763
|
+
},
|
|
6764
|
+
},
|
|
6765
|
+
defaultVariants: {
|
|
6766
|
+
layout: 'default',
|
|
6767
|
+
},
|
|
6768
|
+
});
|
|
6769
|
+
/**
|
|
6770
|
+
* Tab Item variants
|
|
6771
|
+
*
|
|
6772
|
+
* Controls the individual tab button styles with size, variant, and color combinations
|
|
6773
|
+
*/
|
|
6774
|
+
const tabItemVariants = cva(clsx(
|
|
6775
|
+
// Base layout
|
|
6776
|
+
'flex', 'justify-center', 'items-center', 'rounded-lg', 'border-none',
|
|
6777
|
+
// Typography
|
|
6778
|
+
'font-medium', 'text-sm',
|
|
6779
|
+
// Interaction
|
|
6780
|
+
'cursor-pointer', 'transition-all', 'duration-200',
|
|
6781
|
+
// Box model
|
|
6782
|
+
'box-border', 'relative',
|
|
6783
|
+
// Focus visible (semantic token)
|
|
6784
|
+
'focus-visible:outline-2', 'focus-visible:outline-offset-2', 'focus-visible:outline-ring'), {
|
|
6785
|
+
variants: {
|
|
6786
|
+
variant: {
|
|
6787
|
+
text: 'gap-2.5',
|
|
6788
|
+
'icon-text': 'flex-col gap-0',
|
|
6789
|
+
},
|
|
6790
|
+
size: {
|
|
6791
|
+
sm: '',
|
|
6792
|
+
md: '',
|
|
6793
|
+
lg: '',
|
|
6794
|
+
},
|
|
6795
|
+
color: {
|
|
6796
|
+
default: clsx(
|
|
6797
|
+
// Inactive state (semantic tokens)
|
|
6798
|
+
'bg-primary/10', 'text-primary', 'hover:not-disabled:not-[data-active=true]:opacity-70', 'hover:not-disabled:not-[data-active=true]:underline',
|
|
6799
|
+
// Active state (semantic tokens)
|
|
6800
|
+
'data-[active=true]:bg-primary', 'data-[active=true]:text-primary-foreground'),
|
|
6801
|
+
info: clsx(
|
|
6802
|
+
// Inactive state (semantic tokens)
|
|
6803
|
+
'bg-info/10', 'text-info', 'hover:not-disabled:not-[data-active=true]:opacity-70', 'hover:not-disabled:not-[data-active=true]:underline',
|
|
6804
|
+
// Active state (semantic tokens)
|
|
6805
|
+
'data-[active=true]:bg-info', 'data-[active=true]:text-info-foreground'),
|
|
6806
|
+
success: clsx(
|
|
6807
|
+
// Inactive state (semantic tokens)
|
|
6808
|
+
'bg-success/10', 'text-success', 'hover:not-disabled:not-[data-active=true]:opacity-70', 'hover:not-disabled:not-[data-active=true]:underline',
|
|
6809
|
+
// Active state (semantic tokens)
|
|
6810
|
+
'data-[active=true]:bg-success', 'data-[active=true]:text-success-foreground'),
|
|
6811
|
+
warning: clsx(
|
|
6812
|
+
// Inactive state (semantic tokens)
|
|
6813
|
+
'bg-warning/10', 'text-warning', 'hover:not-disabled:not-[data-active=true]:opacity-70', 'hover:not-disabled:not-[data-active=true]:underline',
|
|
6814
|
+
// Active state (semantic tokens)
|
|
6815
|
+
'data-[active=true]:bg-warning', 'data-[active=true]:text-warning-foreground'),
|
|
6816
|
+
destructive: clsx(
|
|
6817
|
+
// Inactive state (semantic tokens)
|
|
6818
|
+
'bg-destructive/10', 'text-destructive', 'hover:not-disabled:not-[data-active=true]:opacity-70', 'hover:not-disabled:not-[data-active=true]:underline',
|
|
6819
|
+
// Active state (semantic tokens)
|
|
6820
|
+
'data-[active=true]:bg-destructive', 'data-[active=true]:text-destructive-foreground'),
|
|
6821
|
+
},
|
|
6822
|
+
disabled: {
|
|
6823
|
+
true: 'opacity-40 cursor-not-allowed pointer-events-none',
|
|
6824
|
+
false: '',
|
|
6825
|
+
},
|
|
6826
|
+
},
|
|
6827
|
+
compoundVariants: [
|
|
6828
|
+
// Size + Variant: text
|
|
6829
|
+
{
|
|
6830
|
+
variant: 'text',
|
|
6831
|
+
size: 'sm',
|
|
6832
|
+
class: 'px-4 py-2 min-h-[29px]',
|
|
6833
|
+
},
|
|
6834
|
+
{
|
|
6835
|
+
variant: 'text',
|
|
6836
|
+
size: 'md',
|
|
6837
|
+
class: 'px-6 py-3 min-h-[35px]',
|
|
6838
|
+
},
|
|
6839
|
+
{
|
|
6840
|
+
variant: 'text',
|
|
6841
|
+
size: 'lg',
|
|
6842
|
+
class: 'px-8 py-4 min-h-[43px]',
|
|
6843
|
+
},
|
|
6844
|
+
// Size + Variant: icon-text
|
|
6845
|
+
{
|
|
6846
|
+
variant: 'icon-text',
|
|
6847
|
+
size: 'sm',
|
|
6848
|
+
class: 'px-[18px] py-2 min-h-[80px] w-[168px]',
|
|
6849
|
+
},
|
|
6850
|
+
{
|
|
6851
|
+
variant: 'icon-text',
|
|
6852
|
+
size: 'md',
|
|
6853
|
+
class: 'px-[26px] py-[13px] min-h-[88px] w-[184px]',
|
|
6854
|
+
},
|
|
6855
|
+
{
|
|
6856
|
+
variant: 'icon-text',
|
|
6857
|
+
size: 'lg',
|
|
6858
|
+
class: 'px-[34px] py-[17px] min-h-[96px] w-[200px]',
|
|
6859
|
+
},
|
|
6860
|
+
],
|
|
6861
|
+
defaultVariants: {
|
|
6862
|
+
variant: 'text',
|
|
6863
|
+
size: 'md',
|
|
6864
|
+
color: 'default',
|
|
6865
|
+
disabled: false,
|
|
6866
|
+
},
|
|
6867
|
+
});
|
|
6868
|
+
/**
|
|
6869
|
+
* Tab Icon Circle variants
|
|
6870
|
+
*
|
|
6871
|
+
* Controls the circular icon container in icon-text variant
|
|
6872
|
+
*/
|
|
6873
|
+
const tabIconCircleVariants = cva(clsx(
|
|
6874
|
+
// Size and shape
|
|
6875
|
+
'size-8', 'rounded-full',
|
|
6876
|
+
// Layout
|
|
6877
|
+
'flex', 'items-center', 'justify-center', 'shrink-0',
|
|
6878
|
+
// Transition
|
|
6879
|
+
'transition-colors', 'duration-200'), {
|
|
6880
|
+
variants: {
|
|
6881
|
+
color: {
|
|
6882
|
+
default: 'bg-primary/20 group-data-[active=true]:bg-primary-foreground/20',
|
|
6883
|
+
info: 'bg-info/20 group-data-[active=true]:bg-info-foreground/20',
|
|
6884
|
+
success: 'bg-success/20 group-data-[active=true]:bg-success-foreground/20',
|
|
6885
|
+
warning: 'bg-warning/20 group-data-[active=true]:bg-warning-foreground/20',
|
|
6886
|
+
destructive: 'bg-destructive/20 group-data-[active=true]:bg-destructive-foreground/20',
|
|
6887
|
+
},
|
|
6888
|
+
},
|
|
6889
|
+
defaultVariants: {
|
|
6890
|
+
color: 'default',
|
|
6891
|
+
},
|
|
6892
|
+
});
|
|
6893
|
+
/**
|
|
6894
|
+
* Tab Icon Content variants
|
|
6895
|
+
*
|
|
6896
|
+
* Controls the icon + label container layout
|
|
6897
|
+
*/
|
|
6898
|
+
const tabIconContentVariants = cva(clsx('flex', 'flex-col', 'items-center', 'justify-center', 'w-full'));
|
|
6899
|
+
/**
|
|
6900
|
+
* Tab Label variants
|
|
6901
|
+
*
|
|
6902
|
+
* Controls the label text in icon-text variant
|
|
6903
|
+
*/
|
|
6904
|
+
const tabLabelVariants = cva(clsx('text-xs', 'font-semibold', 'leading-normal', 'text-center', 'mt-1'));
|
|
6905
|
+
/**
|
|
6906
|
+
* Tab Text Content variants
|
|
6907
|
+
*
|
|
6908
|
+
* Controls the text content in text variant
|
|
6909
|
+
*/
|
|
6910
|
+
const tabTextContentVariants = cva(clsx('whitespace-nowrap'));
|
|
6911
|
+
|
|
6912
|
+
/**
|
|
6913
|
+
* Tabs List Component
|
|
6914
|
+
*
|
|
6915
|
+
* Container for tab triggers. This is where you place your bsg-tabs-trigger components.
|
|
6916
|
+
*
|
|
6917
|
+
* Usage:
|
|
6918
|
+
* ```html
|
|
6919
|
+
* <bsg-tabs-list>
|
|
6920
|
+
* <bsg-tabs-trigger [value]="0">Tab 1</bsg-tabs-trigger>
|
|
6921
|
+
* <bsg-tabs-trigger [value]="1">Tab 2</bsg-tabs-trigger>
|
|
6922
|
+
* </bsg-tabs-list>
|
|
6923
|
+
* ```
|
|
6924
|
+
*
|
|
6925
|
+
* Carousel layout with navigation buttons:
|
|
6926
|
+
* ```html
|
|
6927
|
+
* <bsg-tabs-list layout="carousel">
|
|
6928
|
+
* <bsg-tabs-trigger [value]="0">Tab 1</bsg-tabs-trigger>
|
|
6929
|
+
* <bsg-tabs-trigger [value]="1">Tab 2</bsg-tabs-trigger>
|
|
6930
|
+
* <!-- Many more tabs... -->
|
|
6931
|
+
* </bsg-tabs-list>
|
|
6932
|
+
* ```
|
|
6933
|
+
*/
|
|
6934
|
+
class TabsListComponent {
|
|
6935
|
+
/** Layout mode: default (wraps) or carousel (scrolls horizontally) */
|
|
6936
|
+
layout = input('default', ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
6937
|
+
/** Additional CSS classes */
|
|
6938
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
6939
|
+
// ViewChild for scroll container
|
|
6940
|
+
scrollContainer = viewChild('scrollContainer', ...(ngDevMode ? [{ debugName: "scrollContainer" }] : []));
|
|
6941
|
+
// Signals for button visibility
|
|
6942
|
+
canScrollLeft = signal(false, ...(ngDevMode ? [{ debugName: "canScrollLeft" }] : []));
|
|
6943
|
+
canScrollRight = signal(false, ...(ngDevMode ? [{ debugName: "canScrollRight" }] : []));
|
|
6944
|
+
// ResizeObserver for detecting content changes
|
|
6945
|
+
resizeObserver = null;
|
|
6946
|
+
constructor() {
|
|
6947
|
+
// Effect to check scroll position on layout change
|
|
6948
|
+
effect(() => {
|
|
6949
|
+
const isCarousel = this.layout() === 'carousel';
|
|
6950
|
+
if (isCarousel) {
|
|
6951
|
+
// Delay to ensure DOM is ready
|
|
6952
|
+
setTimeout(() => this.updateScrollButtons(), 100);
|
|
6953
|
+
}
|
|
6954
|
+
});
|
|
6955
|
+
}
|
|
6956
|
+
ngAfterViewInit() {
|
|
6957
|
+
// Initialize scroll buttons after view is ready
|
|
6958
|
+
this.setupResizeObserver();
|
|
6959
|
+
// Multiple checks to ensure content is rendered
|
|
6960
|
+
setTimeout(() => this.updateScrollButtons(), 0);
|
|
6961
|
+
setTimeout(() => this.updateScrollButtons(), 100);
|
|
6962
|
+
setTimeout(() => this.updateScrollButtons(), 500);
|
|
6963
|
+
}
|
|
6964
|
+
ngOnDestroy() {
|
|
6965
|
+
this.resizeObserver?.disconnect();
|
|
6966
|
+
}
|
|
6967
|
+
setupResizeObserver() {
|
|
6968
|
+
const container = this.scrollContainer()?.nativeElement;
|
|
6969
|
+
if (!container)
|
|
6970
|
+
return;
|
|
6971
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
6972
|
+
this.updateScrollButtons();
|
|
6973
|
+
});
|
|
6974
|
+
this.resizeObserver.observe(container);
|
|
6975
|
+
// Also observe children for content changes
|
|
6976
|
+
const children = container.children;
|
|
6977
|
+
for (let i = 0; i < children.length; i++) {
|
|
6978
|
+
this.resizeObserver.observe(children[i]);
|
|
6979
|
+
}
|
|
6980
|
+
}
|
|
6981
|
+
// Computed: is carousel mode
|
|
6982
|
+
isCarousel = computed(() => this.layout() === 'carousel', ...(ngDevMode ? [{ debugName: "isCarousel" }] : []));
|
|
6983
|
+
// Container classes
|
|
6984
|
+
containerClasses = computed(() => clsx('relative', 'flex', 'items-center', this.isCarousel() ? 'gap-3' : ''), ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
6985
|
+
// Computed classes using the existing tabNavigationVariants
|
|
6986
|
+
computedClasses = computed(() => clsx(tabNavigationVariants({
|
|
6987
|
+
layout: this.layout(),
|
|
6988
|
+
}), this.isCarousel() ? 'flex-1 min-w-0' : '', this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
6989
|
+
// Scroll left
|
|
6990
|
+
scrollLeft() {
|
|
6991
|
+
const container = this.scrollContainer()?.nativeElement;
|
|
6992
|
+
if (container) {
|
|
6993
|
+
const scrollAmount = container.clientWidth * 0.8;
|
|
6994
|
+
container.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
|
|
6995
|
+
}
|
|
6996
|
+
}
|
|
6997
|
+
// Scroll right
|
|
6998
|
+
scrollRight() {
|
|
6999
|
+
const container = this.scrollContainer()?.nativeElement;
|
|
7000
|
+
if (container) {
|
|
7001
|
+
const scrollAmount = container.clientWidth * 0.8;
|
|
7002
|
+
container.scrollBy({ left: scrollAmount, behavior: 'smooth' });
|
|
7003
|
+
}
|
|
7004
|
+
}
|
|
7005
|
+
// Handle scroll event
|
|
7006
|
+
onScroll() {
|
|
7007
|
+
this.updateScrollButtons();
|
|
7008
|
+
}
|
|
7009
|
+
// Update button visibility based on scroll position
|
|
7010
|
+
updateScrollButtons() {
|
|
7011
|
+
const container = this.scrollContainer()?.nativeElement;
|
|
7012
|
+
if (!container)
|
|
7013
|
+
return;
|
|
7014
|
+
const { scrollLeft, scrollWidth, clientWidth } = container;
|
|
7015
|
+
// Can scroll left if not at start
|
|
7016
|
+
this.canScrollLeft.set(scrollLeft > 0);
|
|
7017
|
+
// Can scroll right if not at end (with small tolerance)
|
|
7018
|
+
this.canScrollRight.set(scrollLeft < scrollWidth - clientWidth - 1);
|
|
7019
|
+
}
|
|
7020
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7021
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TabsListComponent, isStandalone: true, selector: "bsg-tabs-list", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
7022
|
+
<div [class]="containerClasses()">
|
|
7023
|
+
<!-- Previous Button - Only shown in carousel mode -->
|
|
7024
|
+
@if (isCarousel()) {
|
|
7025
|
+
<button
|
|
7026
|
+
type="button"
|
|
7027
|
+
class="carousel-nav-btn carousel-nav-btn--prev"
|
|
7028
|
+
(click)="scrollLeft()"
|
|
7029
|
+
[disabled]="!canScrollLeft()"
|
|
7030
|
+
aria-label="Previous tabs"
|
|
7031
|
+
>
|
|
7032
|
+
<svg
|
|
7033
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7034
|
+
width="24"
|
|
7035
|
+
height="24"
|
|
7036
|
+
viewBox="0 0 24 24"
|
|
7037
|
+
fill="none"
|
|
7038
|
+
stroke="currentColor"
|
|
7039
|
+
stroke-width="2"
|
|
7040
|
+
stroke-linecap="round"
|
|
7041
|
+
stroke-linejoin="round"
|
|
7042
|
+
>
|
|
7043
|
+
<path d="m15 18-6-6 6-6" />
|
|
7044
|
+
</svg>
|
|
7045
|
+
</button>
|
|
7046
|
+
}
|
|
7047
|
+
|
|
7048
|
+
<!-- Tabs Container -->
|
|
7049
|
+
<div
|
|
7050
|
+
#scrollContainer
|
|
7051
|
+
role="tablist"
|
|
7052
|
+
aria-orientation="horizontal"
|
|
7053
|
+
aria-label="Tab navigation"
|
|
7054
|
+
data-orientation="horizontal"
|
|
7055
|
+
[class]="computedClasses()"
|
|
7056
|
+
(scroll)="onScroll()"
|
|
7057
|
+
>
|
|
7058
|
+
<ng-content />
|
|
7059
|
+
</div>
|
|
7060
|
+
|
|
7061
|
+
<!-- Next Button - Only shown in carousel mode -->
|
|
7062
|
+
@if (isCarousel()) {
|
|
7063
|
+
<button
|
|
7064
|
+
type="button"
|
|
7065
|
+
class="carousel-nav-btn carousel-nav-btn--next"
|
|
7066
|
+
(click)="scrollRight()"
|
|
7067
|
+
[disabled]="!canScrollRight()"
|
|
7068
|
+
aria-label="Next tabs"
|
|
7069
|
+
>
|
|
7070
|
+
<svg
|
|
7071
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7072
|
+
width="24"
|
|
7073
|
+
height="24"
|
|
7074
|
+
viewBox="0 0 24 24"
|
|
7075
|
+
fill="none"
|
|
7076
|
+
stroke="currentColor"
|
|
7077
|
+
stroke-width="2"
|
|
7078
|
+
stroke-linecap="round"
|
|
7079
|
+
stroke-linejoin="round"
|
|
7080
|
+
>
|
|
7081
|
+
<path d="m9 18 6-6-6-6" />
|
|
7082
|
+
</svg>
|
|
7083
|
+
</button>
|
|
7084
|
+
}
|
|
7085
|
+
</div>
|
|
7086
|
+
`, isInline: true, styles: [":host{display:block;width:100%}.carousel-nav-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border-radius:50%;border:1px solid hsl(var(--border));background-color:hsl(var(--background));color:hsl(var(--foreground));cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #0000000d}.carousel-nav-btn:hover:not(:disabled){background-color:hsl(var(--accent));color:hsl(var(--accent-foreground))}.carousel-nav-btn:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.carousel-nav-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}\n"] });
|
|
7087
|
+
}
|
|
7088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsListComponent, decorators: [{
|
|
7089
|
+
type: Component,
|
|
7090
|
+
args: [{ selector: 'bsg-tabs-list', standalone: true, template: `
|
|
7091
|
+
<div [class]="containerClasses()">
|
|
7092
|
+
<!-- Previous Button - Only shown in carousel mode -->
|
|
7093
|
+
@if (isCarousel()) {
|
|
7094
|
+
<button
|
|
7095
|
+
type="button"
|
|
7096
|
+
class="carousel-nav-btn carousel-nav-btn--prev"
|
|
7097
|
+
(click)="scrollLeft()"
|
|
7098
|
+
[disabled]="!canScrollLeft()"
|
|
7099
|
+
aria-label="Previous tabs"
|
|
7100
|
+
>
|
|
7101
|
+
<svg
|
|
7102
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7103
|
+
width="24"
|
|
7104
|
+
height="24"
|
|
7105
|
+
viewBox="0 0 24 24"
|
|
7106
|
+
fill="none"
|
|
7107
|
+
stroke="currentColor"
|
|
7108
|
+
stroke-width="2"
|
|
7109
|
+
stroke-linecap="round"
|
|
7110
|
+
stroke-linejoin="round"
|
|
7111
|
+
>
|
|
7112
|
+
<path d="m15 18-6-6 6-6" />
|
|
7113
|
+
</svg>
|
|
7114
|
+
</button>
|
|
7115
|
+
}
|
|
7116
|
+
|
|
7117
|
+
<!-- Tabs Container -->
|
|
7118
|
+
<div
|
|
7119
|
+
#scrollContainer
|
|
7120
|
+
role="tablist"
|
|
7121
|
+
aria-orientation="horizontal"
|
|
7122
|
+
aria-label="Tab navigation"
|
|
7123
|
+
data-orientation="horizontal"
|
|
7124
|
+
[class]="computedClasses()"
|
|
7125
|
+
(scroll)="onScroll()"
|
|
7126
|
+
>
|
|
7127
|
+
<ng-content />
|
|
7128
|
+
</div>
|
|
7129
|
+
|
|
7130
|
+
<!-- Next Button - Only shown in carousel mode -->
|
|
7131
|
+
@if (isCarousel()) {
|
|
7132
|
+
<button
|
|
7133
|
+
type="button"
|
|
7134
|
+
class="carousel-nav-btn carousel-nav-btn--next"
|
|
7135
|
+
(click)="scrollRight()"
|
|
7136
|
+
[disabled]="!canScrollRight()"
|
|
7137
|
+
aria-label="Next tabs"
|
|
7138
|
+
>
|
|
7139
|
+
<svg
|
|
7140
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7141
|
+
width="24"
|
|
7142
|
+
height="24"
|
|
7143
|
+
viewBox="0 0 24 24"
|
|
7144
|
+
fill="none"
|
|
7145
|
+
stroke="currentColor"
|
|
7146
|
+
stroke-width="2"
|
|
7147
|
+
stroke-linecap="round"
|
|
7148
|
+
stroke-linejoin="round"
|
|
7149
|
+
>
|
|
7150
|
+
<path d="m9 18 6-6-6-6" />
|
|
7151
|
+
</svg>
|
|
7152
|
+
</button>
|
|
7153
|
+
}
|
|
7154
|
+
</div>
|
|
7155
|
+
`, styles: [":host{display:block;width:100%}.carousel-nav-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border-radius:50%;border:1px solid hsl(var(--border));background-color:hsl(var(--background));color:hsl(var(--foreground));cursor:pointer;transition:all .2s ease;box-shadow:0 1px 2px #0000000d}.carousel-nav-btn:hover:not(:disabled){background-color:hsl(var(--accent));color:hsl(var(--accent-foreground))}.carousel-nav-btn:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.carousel-nav-btn:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}\n"] }]
|
|
7156
|
+
}], ctorParameters: () => [], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], scrollContainer: [{ type: i0.ViewChild, args: ['scrollContainer', { isSignal: true }] }] } });
|
|
7157
|
+
|
|
7158
|
+
/**
|
|
7159
|
+
* Tabs Trigger Component
|
|
7160
|
+
*
|
|
7161
|
+
* A clickable tab that activates its associated content panel.
|
|
7162
|
+
*
|
|
7163
|
+
* Usage for text variant:
|
|
7164
|
+
* ```html
|
|
7165
|
+
* <bsg-tabs-trigger [value]="0">
|
|
7166
|
+
* Tab Label
|
|
7167
|
+
* </bsg-tabs-trigger>
|
|
7168
|
+
* ```
|
|
7169
|
+
*
|
|
7170
|
+
* Usage for icon-text variant:
|
|
7171
|
+
* ```html
|
|
7172
|
+
* <bsg-tabs-trigger [value]="0" variant="icon-text">
|
|
7173
|
+
* <svg slot="icon">...</svg>
|
|
7174
|
+
* <span slot="label">Tab Label</span>
|
|
7175
|
+
* </bsg-tabs-trigger>
|
|
7176
|
+
* ```
|
|
7177
|
+
*/
|
|
7178
|
+
class TabsTriggerComponent {
|
|
7179
|
+
// Inject parent tabs component
|
|
7180
|
+
tabs = inject(TabsComponent, { optional: true });
|
|
7181
|
+
/** The value that identifies this tab */
|
|
7182
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
7183
|
+
/** Tab visual variant */
|
|
7184
|
+
variant = input('text', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
7185
|
+
/** Tab size variant */
|
|
7186
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
7187
|
+
/** Tab color scheme */
|
|
7188
|
+
color = input('default', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
7189
|
+
/** Whether the tab is disabled */
|
|
7190
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
7191
|
+
/** Additional CSS classes */
|
|
7192
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7193
|
+
// Computed: is this tab active?
|
|
7194
|
+
isActive = computed(() => {
|
|
7195
|
+
if (!this.tabs)
|
|
7196
|
+
return false;
|
|
7197
|
+
return this.tabs.activeValue() === this.value();
|
|
7198
|
+
}, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
7199
|
+
// Computed tab button classes
|
|
7200
|
+
computedClasses = computed(() => clsx(tabItemVariants({
|
|
7201
|
+
variant: this.variant(),
|
|
7202
|
+
size: this.size(),
|
|
7203
|
+
color: this.color(),
|
|
7204
|
+
disabled: this.disabled(),
|
|
7205
|
+
}), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
7206
|
+
// Computed icon content classes
|
|
7207
|
+
iconContentClasses = computed(() => clsx(tabIconContentVariants()), ...(ngDevMode ? [{ debugName: "iconContentClasses" }] : []));
|
|
7208
|
+
// Computed icon circle classes
|
|
7209
|
+
iconCircleClasses = computed(() => clsx(tabIconCircleVariants({
|
|
7210
|
+
color: this.color(),
|
|
7211
|
+
})), ...(ngDevMode ? [{ debugName: "iconCircleClasses" }] : []));
|
|
7212
|
+
// Computed label classes
|
|
7213
|
+
labelClasses = computed(() => clsx(tabLabelVariants()), ...(ngDevMode ? [{ debugName: "labelClasses" }] : []));
|
|
7214
|
+
// Computed text content classes
|
|
7215
|
+
textContentClasses = computed(() => clsx(tabTextContentVariants()), ...(ngDevMode ? [{ debugName: "textContentClasses" }] : []));
|
|
7216
|
+
// Handle click
|
|
7217
|
+
handleClick() {
|
|
7218
|
+
if (!this.disabled() && this.tabs) {
|
|
7219
|
+
this.tabs.setValue(this.value());
|
|
7220
|
+
}
|
|
7221
|
+
}
|
|
7222
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7223
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TabsTriggerComponent, isStandalone: true, selector: "bsg-tabs-trigger", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7224
|
+
<button
|
|
7225
|
+
type="button"
|
|
7226
|
+
role="tab"
|
|
7227
|
+
[class]="computedClasses()"
|
|
7228
|
+
class="group"
|
|
7229
|
+
[attr.aria-selected]="isActive()"
|
|
7230
|
+
[attr.aria-controls]="'tabpanel-' + value()"
|
|
7231
|
+
[attr.id]="'tab-' + value()"
|
|
7232
|
+
[attr.data-state]="isActive() ? 'active' : 'inactive'"
|
|
7233
|
+
[attr.data-active]="isActive()"
|
|
7234
|
+
[attr.data-disabled]="disabled() ? '' : null"
|
|
7235
|
+
data-orientation="horizontal"
|
|
7236
|
+
[attr.tabindex]="isActive() ? 0 : -1"
|
|
7237
|
+
[disabled]="disabled()"
|
|
7238
|
+
(click)="handleClick()"
|
|
7239
|
+
>
|
|
7240
|
+
@if (variant() === 'icon-text') {
|
|
7241
|
+
<!-- Icon-text variant layout -->
|
|
7242
|
+
<div [class]="iconContentClasses()">
|
|
7243
|
+
<div [class]="iconCircleClasses()">
|
|
7244
|
+
<ng-content select="[slot='icon']" />
|
|
7245
|
+
</div>
|
|
7246
|
+
<span [class]="labelClasses()">
|
|
7247
|
+
<ng-content select="[slot='label']" />
|
|
7248
|
+
</span>
|
|
7249
|
+
</div>
|
|
7250
|
+
} @else {
|
|
7251
|
+
<!-- Text variant layout -->
|
|
7252
|
+
<span [class]="textContentClasses()">
|
|
7253
|
+
<ng-content />
|
|
7254
|
+
</span>
|
|
7255
|
+
}
|
|
7256
|
+
</button>
|
|
7257
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
7258
|
+
}
|
|
7259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsTriggerComponent, decorators: [{
|
|
7260
|
+
type: Component,
|
|
7261
|
+
args: [{ selector: 'bsg-tabs-trigger', standalone: true, template: `
|
|
7262
|
+
<button
|
|
7263
|
+
type="button"
|
|
7264
|
+
role="tab"
|
|
7265
|
+
[class]="computedClasses()"
|
|
7266
|
+
class="group"
|
|
7267
|
+
[attr.aria-selected]="isActive()"
|
|
7268
|
+
[attr.aria-controls]="'tabpanel-' + value()"
|
|
7269
|
+
[attr.id]="'tab-' + value()"
|
|
7270
|
+
[attr.data-state]="isActive() ? 'active' : 'inactive'"
|
|
7271
|
+
[attr.data-active]="isActive()"
|
|
7272
|
+
[attr.data-disabled]="disabled() ? '' : null"
|
|
7273
|
+
data-orientation="horizontal"
|
|
7274
|
+
[attr.tabindex]="isActive() ? 0 : -1"
|
|
7275
|
+
[disabled]="disabled()"
|
|
7276
|
+
(click)="handleClick()"
|
|
7277
|
+
>
|
|
7278
|
+
@if (variant() === 'icon-text') {
|
|
7279
|
+
<!-- Icon-text variant layout -->
|
|
7280
|
+
<div [class]="iconContentClasses()">
|
|
7281
|
+
<div [class]="iconCircleClasses()">
|
|
7282
|
+
<ng-content select="[slot='icon']" />
|
|
7283
|
+
</div>
|
|
7284
|
+
<span [class]="labelClasses()">
|
|
7285
|
+
<ng-content select="[slot='label']" />
|
|
7286
|
+
</span>
|
|
7287
|
+
</div>
|
|
7288
|
+
} @else {
|
|
7289
|
+
<!-- Text variant layout -->
|
|
7290
|
+
<span [class]="textContentClasses()">
|
|
7291
|
+
<ng-content />
|
|
7292
|
+
</span>
|
|
7293
|
+
}
|
|
7294
|
+
</button>
|
|
7295
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
7296
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
7297
|
+
|
|
7298
|
+
/**
|
|
7299
|
+
* Tabs Content Component
|
|
7300
|
+
*
|
|
7301
|
+
* A container for tab panel content. Only displays when its value matches the active tab.
|
|
7302
|
+
*
|
|
7303
|
+
* Usage:
|
|
7304
|
+
* ```html
|
|
7305
|
+
* <bsg-tabs-content [value]="0">
|
|
7306
|
+
* <p>Content for tab 0</p>
|
|
7307
|
+
* </bsg-tabs-content>
|
|
7308
|
+
* ```
|
|
7309
|
+
*/
|
|
7310
|
+
class TabsContentComponent {
|
|
7311
|
+
// Inject parent tabs component
|
|
7312
|
+
tabs = inject(TabsComponent, { optional: true });
|
|
7313
|
+
/** The value that identifies which tab this content belongs to */
|
|
7314
|
+
value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
7315
|
+
/** Additional CSS classes */
|
|
7316
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7317
|
+
// Computed: is this content active?
|
|
7318
|
+
isActive = computed(() => {
|
|
7319
|
+
if (!this.tabs)
|
|
7320
|
+
return false;
|
|
7321
|
+
return this.tabs.activeValue() === this.value();
|
|
7322
|
+
}, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
7323
|
+
// Computed classes with default mt-2
|
|
7324
|
+
computedClasses = computed(() => clsx('mt-2', this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
7325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7326
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TabsContentComponent, isStandalone: true, selector: "bsg-tabs-content", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7327
|
+
@if (isActive()) {
|
|
7328
|
+
<div
|
|
7329
|
+
role="tabpanel"
|
|
7330
|
+
[id]="'tabpanel-' + value()"
|
|
7331
|
+
[attr.aria-labelledby]="'tab-' + value()"
|
|
7332
|
+
[attr.data-state]="isActive() ? 'active' : 'inactive'"
|
|
7333
|
+
data-orientation="horizontal"
|
|
7334
|
+
[attr.tabindex]="0"
|
|
7335
|
+
[class]="computedClasses()"
|
|
7336
|
+
>
|
|
7337
|
+
<ng-content />
|
|
7338
|
+
</div>
|
|
7339
|
+
}
|
|
7340
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
7341
|
+
}
|
|
7342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabsContentComponent, decorators: [{
|
|
7343
|
+
type: Component,
|
|
7344
|
+
args: [{ selector: 'bsg-tabs-content', standalone: true, template: `
|
|
7345
|
+
@if (isActive()) {
|
|
7346
|
+
<div
|
|
7347
|
+
role="tabpanel"
|
|
7348
|
+
[id]="'tabpanel-' + value()"
|
|
7349
|
+
[attr.aria-labelledby]="'tab-' + value()"
|
|
7350
|
+
[attr.data-state]="isActive() ? 'active' : 'inactive'"
|
|
7351
|
+
data-orientation="horizontal"
|
|
7352
|
+
[attr.tabindex]="0"
|
|
7353
|
+
[class]="computedClasses()"
|
|
7354
|
+
>
|
|
7355
|
+
<ng-content />
|
|
7356
|
+
</div>
|
|
7357
|
+
}
|
|
7358
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
7359
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
7360
|
+
|
|
7361
|
+
/**
|
|
7362
|
+
* Directive to mark content that should be projected into a specific tab panel
|
|
7363
|
+
*
|
|
7364
|
+
* Usage:
|
|
7365
|
+
* ```html
|
|
7366
|
+
* <bsg-tab-navigation [tabs]="tabs">
|
|
7367
|
+
* <ng-template bsgTabContent>Content for tab 0</ng-template>
|
|
7368
|
+
* <ng-template bsgTabContent>Content for tab 1</ng-template>
|
|
7369
|
+
* </bsg-tab-navigation>
|
|
7370
|
+
* ```
|
|
7371
|
+
*/
|
|
7372
|
+
class TabContentDirective {
|
|
7373
|
+
template;
|
|
7374
|
+
constructor(template) {
|
|
7375
|
+
this.template = template;
|
|
7376
|
+
}
|
|
7377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabContentDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
7378
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: TabContentDirective, isStandalone: true, selector: "[bsgTabContent]", ngImport: i0 });
|
|
7379
|
+
}
|
|
7380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabContentDirective, decorators: [{
|
|
7381
|
+
type: Directive,
|
|
7382
|
+
args: [{
|
|
7383
|
+
selector: '[bsgTabContent]',
|
|
7384
|
+
standalone: true,
|
|
7385
|
+
}]
|
|
7386
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
7387
|
+
/**
|
|
7388
|
+
* Tab Navigation Component
|
|
7389
|
+
*
|
|
7390
|
+
* A tabbed navigation component with support for text and icon-text variants.
|
|
7391
|
+
* Follows the shadcn/ui tabs pattern with separated TabsList and TabsContent.
|
|
7392
|
+
*
|
|
7393
|
+
* Usage:
|
|
7394
|
+
* ```html
|
|
7395
|
+
* <bsg-tab-navigation
|
|
7396
|
+
* [tabs]="tabs"
|
|
7397
|
+
* [variant]="'text'"
|
|
7398
|
+
* [size]="'md'"
|
|
7399
|
+
* [color]="'default'"
|
|
7400
|
+
* [activeIndex]="0"
|
|
7401
|
+
* (tabChange)="onTabChange($event)"
|
|
7402
|
+
* >
|
|
7403
|
+
* <ng-template bsgTabContent>Content for first tab</ng-template>
|
|
7404
|
+
* <ng-template bsgTabContent>Content for second tab</ng-template>
|
|
7405
|
+
* </bsg-tab-navigation>
|
|
7406
|
+
* ```
|
|
7407
|
+
*/
|
|
7408
|
+
class TabNavigationComponent {
|
|
7409
|
+
/** Tab size variant */
|
|
7410
|
+
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
7411
|
+
/** Tab visual variant */
|
|
7412
|
+
variant = input('text', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
7413
|
+
/** Tab color scheme */
|
|
7414
|
+
color = input('default', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
7415
|
+
/** Whether all tabs are disabled */
|
|
7416
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
7417
|
+
/** List of tab items */
|
|
7418
|
+
tabs = input([
|
|
7419
|
+
{ label: 'Solicitudes Realizadas', count: 3 },
|
|
7420
|
+
{ label: 'Información del cliente' },
|
|
7421
|
+
], ...(ngDevMode ? [{ debugName: "tabs" }] : []));
|
|
7422
|
+
/** Active tab index */
|
|
7423
|
+
activeIndex = input(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : []));
|
|
7424
|
+
/** Additional CSS classes for container */
|
|
7425
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7426
|
+
/** Tab change event */
|
|
7427
|
+
tabChange = output();
|
|
7428
|
+
/** Content children (tab content templates) */
|
|
7429
|
+
tabContents = contentChildren(TabContentDirective, ...(ngDevMode ? [{ debugName: "tabContents" }] : []));
|
|
7430
|
+
// Internal state for active tab
|
|
7431
|
+
_activeIndex = signal(null, ...(ngDevMode ? [{ debugName: "_activeIndex" }] : []));
|
|
7432
|
+
// Computed active index (uses internal state if set, otherwise input)
|
|
7433
|
+
internalActiveIndex = computed(() => {
|
|
7434
|
+
const internal = this._activeIndex();
|
|
7435
|
+
return internal !== null ? internal : this.activeIndex();
|
|
7436
|
+
}, ...(ngDevMode ? [{ debugName: "internalActiveIndex" }] : []));
|
|
7437
|
+
// Computed container classes
|
|
7438
|
+
containerClasses = computed(() => clsx(this.className()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
7439
|
+
// Computed tabs list classes
|
|
7440
|
+
tabsListClasses = computed(() => clsx(tabNavigationVariants()), ...(ngDevMode ? [{ debugName: "tabsListClasses" }] : []));
|
|
7441
|
+
// Computed tab content classes
|
|
7442
|
+
tabContentClasses = computed(() => clsx('mt-2'), ...(ngDevMode ? [{ debugName: "tabContentClasses" }] : []));
|
|
7443
|
+
// Computed icon content classes
|
|
7444
|
+
iconContentClasses = computed(() => clsx(tabIconContentVariants()), ...(ngDevMode ? [{ debugName: "iconContentClasses" }] : []));
|
|
7445
|
+
// Computed label classes
|
|
7446
|
+
labelClasses = computed(() => clsx(tabLabelVariants()), ...(ngDevMode ? [{ debugName: "labelClasses" }] : []));
|
|
7447
|
+
// Computed text content classes
|
|
7448
|
+
textContentClasses = computed(() => clsx(tabTextContentVariants()), ...(ngDevMode ? [{ debugName: "textContentClasses" }] : []));
|
|
7449
|
+
// Get tab button classes for a specific index
|
|
7450
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7451
|
+
getTabClasses(index) {
|
|
7452
|
+
return clsx(tabItemVariants({
|
|
7453
|
+
variant: this.variant(),
|
|
7454
|
+
size: this.size(),
|
|
7455
|
+
color: this.color(),
|
|
7456
|
+
disabled: this.disabled(),
|
|
7457
|
+
}));
|
|
7458
|
+
}
|
|
7459
|
+
// Get icon circle classes
|
|
7460
|
+
getIconCircleClasses() {
|
|
7461
|
+
return clsx(tabIconCircleVariants({
|
|
7462
|
+
color: this.color(),
|
|
7463
|
+
}));
|
|
7464
|
+
}
|
|
7465
|
+
// Get icon stroke color based on active state (uses currentColor to inherit from parent)
|
|
7466
|
+
getIconStroke(_index) {
|
|
7467
|
+
return 'currentColor';
|
|
7468
|
+
}
|
|
7469
|
+
// Handle tab click
|
|
7470
|
+
handleTabClick(index) {
|
|
7471
|
+
if (!this.disabled() && index !== this.internalActiveIndex()) {
|
|
7472
|
+
this._activeIndex.set(index);
|
|
7473
|
+
this.tabChange.emit(index);
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7476
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7477
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TabNavigationComponent, isStandalone: true, selector: "bsg-tab-navigation", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null }, activeIndex: { classPropertyName: "activeIndex", publicName: "activeIndex", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabChange: "tabChange" }, queries: [{ propertyName: "tabContents", predicate: TabContentDirective, isSignal: true }], ngImport: i0, template: `
|
|
7478
|
+
<!-- Tabs Root -->
|
|
7479
|
+
<div [class]="containerClasses()" data-orientation="horizontal">
|
|
7480
|
+
<!-- Tabs List -->
|
|
7481
|
+
<div
|
|
7482
|
+
role="tablist"
|
|
7483
|
+
aria-orientation="horizontal"
|
|
7484
|
+
aria-label="Tab navigation"
|
|
7485
|
+
data-orientation="horizontal"
|
|
7486
|
+
[class]="tabsListClasses()"
|
|
7487
|
+
>
|
|
7488
|
+
@for (tab of tabs(); track $index) {
|
|
7489
|
+
<!-- Tabs Trigger -->
|
|
7490
|
+
<button
|
|
7491
|
+
type="button"
|
|
7492
|
+
role="tab"
|
|
7493
|
+
[class]="getTabClasses($index)"
|
|
7494
|
+
class="group"
|
|
7495
|
+
[attr.aria-selected]="$index === internalActiveIndex()"
|
|
7496
|
+
[attr.aria-controls]="'tabpanel-' + $index"
|
|
7497
|
+
[attr.id]="'tab-' + $index"
|
|
7498
|
+
[attr.data-state]="
|
|
7499
|
+
$index === internalActiveIndex() ? 'active' : 'inactive'
|
|
7500
|
+
"
|
|
7501
|
+
[attr.data-active]="$index === internalActiveIndex()"
|
|
7502
|
+
[attr.data-disabled]="disabled() ? '' : null"
|
|
7503
|
+
data-orientation="horizontal"
|
|
7504
|
+
[attr.tabindex]="$index === internalActiveIndex() ? 0 : -1"
|
|
7505
|
+
[disabled]="disabled()"
|
|
7506
|
+
(click)="handleTabClick($index)"
|
|
7507
|
+
>
|
|
7508
|
+
@if (variant() === 'icon-text') {
|
|
7509
|
+
<div [class]="iconContentClasses()">
|
|
7510
|
+
<div [class]="getIconCircleClasses()">
|
|
7511
|
+
<svg
|
|
7512
|
+
class="block"
|
|
7513
|
+
width="24"
|
|
7514
|
+
height="24"
|
|
7515
|
+
viewBox="0 0 24 24"
|
|
7516
|
+
fill="none"
|
|
7517
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7518
|
+
aria-hidden="true"
|
|
7519
|
+
>
|
|
7520
|
+
<path
|
|
7521
|
+
d="M19 21V19C19 17.9391 18.5786 16.9217 17.8284 16.1716C17.0783 15.4214 16.0609 15 15 15H9C7.93913 15 6.92172 15.4214 6.17157 16.1716C5.42143 16.9217 5 17.9391 5 19V21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z"
|
|
7522
|
+
[attr.stroke]="getIconStroke($index)"
|
|
7523
|
+
stroke-width="2"
|
|
7524
|
+
stroke-linecap="round"
|
|
7525
|
+
stroke-linejoin="round"
|
|
7526
|
+
/>
|
|
7527
|
+
</svg>
|
|
7528
|
+
</div>
|
|
7529
|
+
<span [class]="labelClasses()">{{ tab.label }}</span>
|
|
7530
|
+
</div>
|
|
7531
|
+
} @else {
|
|
7532
|
+
<span [class]="textContentClasses()">
|
|
7533
|
+
{{ tab.label }}
|
|
7534
|
+
@if (tab.count !== undefined) {
|
|
7535
|
+
({{ tab.count }})
|
|
7536
|
+
}
|
|
7537
|
+
</span>
|
|
7538
|
+
}
|
|
7539
|
+
</button>
|
|
7540
|
+
}
|
|
7541
|
+
</div>
|
|
7542
|
+
|
|
7543
|
+
<!-- Tabs Content Panels -->
|
|
7544
|
+
@for (tab of tabs(); track $index) {
|
|
7545
|
+
<div
|
|
7546
|
+
role="tabpanel"
|
|
7547
|
+
[id]="'tabpanel-' + $index"
|
|
7548
|
+
[attr.aria-labelledby]="'tab-' + $index"
|
|
7549
|
+
[attr.data-state]="
|
|
7550
|
+
$index === internalActiveIndex() ? 'active' : 'inactive'
|
|
7551
|
+
"
|
|
7552
|
+
data-orientation="horizontal"
|
|
7553
|
+
[attr.tabindex]="0"
|
|
7554
|
+
[attr.hidden]="$index !== internalActiveIndex() ? true : null"
|
|
7555
|
+
[class]="tabContentClasses()"
|
|
7556
|
+
>
|
|
7557
|
+
@if ($index === internalActiveIndex() && tabContents()[$index]) {
|
|
7558
|
+
<ng-container *ngTemplateOutlet="tabContents()[$index].template" />
|
|
7559
|
+
}
|
|
7560
|
+
</div>
|
|
7561
|
+
}
|
|
7562
|
+
</div>
|
|
7563
|
+
`, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
7564
|
+
}
|
|
7565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabNavigationComponent, decorators: [{
|
|
7566
|
+
type: Component,
|
|
7567
|
+
args: [{ selector: 'bsg-tab-navigation', standalone: true, imports: [NgTemplateOutlet], template: `
|
|
7568
|
+
<!-- Tabs Root -->
|
|
7569
|
+
<div [class]="containerClasses()" data-orientation="horizontal">
|
|
7570
|
+
<!-- Tabs List -->
|
|
7571
|
+
<div
|
|
7572
|
+
role="tablist"
|
|
7573
|
+
aria-orientation="horizontal"
|
|
7574
|
+
aria-label="Tab navigation"
|
|
7575
|
+
data-orientation="horizontal"
|
|
7576
|
+
[class]="tabsListClasses()"
|
|
7577
|
+
>
|
|
7578
|
+
@for (tab of tabs(); track $index) {
|
|
7579
|
+
<!-- Tabs Trigger -->
|
|
7580
|
+
<button
|
|
7581
|
+
type="button"
|
|
7582
|
+
role="tab"
|
|
7583
|
+
[class]="getTabClasses($index)"
|
|
7584
|
+
class="group"
|
|
7585
|
+
[attr.aria-selected]="$index === internalActiveIndex()"
|
|
7586
|
+
[attr.aria-controls]="'tabpanel-' + $index"
|
|
7587
|
+
[attr.id]="'tab-' + $index"
|
|
7588
|
+
[attr.data-state]="
|
|
7589
|
+
$index === internalActiveIndex() ? 'active' : 'inactive'
|
|
7590
|
+
"
|
|
7591
|
+
[attr.data-active]="$index === internalActiveIndex()"
|
|
7592
|
+
[attr.data-disabled]="disabled() ? '' : null"
|
|
7593
|
+
data-orientation="horizontal"
|
|
7594
|
+
[attr.tabindex]="$index === internalActiveIndex() ? 0 : -1"
|
|
7595
|
+
[disabled]="disabled()"
|
|
7596
|
+
(click)="handleTabClick($index)"
|
|
7597
|
+
>
|
|
7598
|
+
@if (variant() === 'icon-text') {
|
|
7599
|
+
<div [class]="iconContentClasses()">
|
|
7600
|
+
<div [class]="getIconCircleClasses()">
|
|
7601
|
+
<svg
|
|
7602
|
+
class="block"
|
|
7603
|
+
width="24"
|
|
7604
|
+
height="24"
|
|
7605
|
+
viewBox="0 0 24 24"
|
|
7606
|
+
fill="none"
|
|
7607
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7608
|
+
aria-hidden="true"
|
|
7609
|
+
>
|
|
7610
|
+
<path
|
|
7611
|
+
d="M19 21V19C19 17.9391 18.5786 16.9217 17.8284 16.1716C17.0783 15.4214 16.0609 15 15 15H9C7.93913 15 6.92172 15.4214 6.17157 16.1716C5.42143 16.9217 5 17.9391 5 19V21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z"
|
|
7612
|
+
[attr.stroke]="getIconStroke($index)"
|
|
7613
|
+
stroke-width="2"
|
|
7614
|
+
stroke-linecap="round"
|
|
7615
|
+
stroke-linejoin="round"
|
|
7616
|
+
/>
|
|
7617
|
+
</svg>
|
|
7618
|
+
</div>
|
|
7619
|
+
<span [class]="labelClasses()">{{ tab.label }}</span>
|
|
7620
|
+
</div>
|
|
7621
|
+
} @else {
|
|
7622
|
+
<span [class]="textContentClasses()">
|
|
7623
|
+
{{ tab.label }}
|
|
7624
|
+
@if (tab.count !== undefined) {
|
|
7625
|
+
({{ tab.count }})
|
|
7626
|
+
}
|
|
7627
|
+
</span>
|
|
7628
|
+
}
|
|
7629
|
+
</button>
|
|
7630
|
+
}
|
|
7631
|
+
</div>
|
|
7632
|
+
|
|
7633
|
+
<!-- Tabs Content Panels -->
|
|
7634
|
+
@for (tab of tabs(); track $index) {
|
|
7635
|
+
<div
|
|
7636
|
+
role="tabpanel"
|
|
7637
|
+
[id]="'tabpanel-' + $index"
|
|
7638
|
+
[attr.aria-labelledby]="'tab-' + $index"
|
|
7639
|
+
[attr.data-state]="
|
|
7640
|
+
$index === internalActiveIndex() ? 'active' : 'inactive'
|
|
7641
|
+
"
|
|
7642
|
+
data-orientation="horizontal"
|
|
7643
|
+
[attr.tabindex]="0"
|
|
7644
|
+
[attr.hidden]="$index !== internalActiveIndex() ? true : null"
|
|
7645
|
+
[class]="tabContentClasses()"
|
|
7646
|
+
>
|
|
7647
|
+
@if ($index === internalActiveIndex() && tabContents()[$index]) {
|
|
7648
|
+
<ng-container *ngTemplateOutlet="tabContents()[$index].template" />
|
|
7649
|
+
}
|
|
7650
|
+
</div>
|
|
7651
|
+
}
|
|
7652
|
+
</div>
|
|
7653
|
+
`, styles: [":host{display:block}\n"] }]
|
|
7654
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: false }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabChange: [{ type: i0.Output, args: ["tabChange"] }], tabContents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabContentDirective), { isSignal: true }] }] } });
|
|
7655
|
+
|
|
7656
|
+
// New composable components (shadcn/ui pattern)
|
|
7657
|
+
|
|
7658
|
+
/**
|
|
7659
|
+
* Table wrapper variants
|
|
7660
|
+
*
|
|
7661
|
+
* Container with subtle shadow for depth and rounded corners
|
|
7662
|
+
* for a modern, polished look
|
|
7663
|
+
*/
|
|
7664
|
+
const tableWrapperVariants = cva(clsx('relative', 'w-full', 'overflow-auto', 'rounded-xl', 'border', 'border-slate-200', 'bg-white',
|
|
7665
|
+
// Subtle shadow for depth perception
|
|
7666
|
+
'shadow-sm',
|
|
7667
|
+
// Smooth scrollbar for better UX
|
|
7668
|
+
'scrollbar-thin', 'scrollbar-thumb-slate-300', 'scrollbar-track-transparent'));
|
|
7669
|
+
/**
|
|
7670
|
+
* Table variants
|
|
7671
|
+
*
|
|
7672
|
+
* Clean table with proper spacing and typography
|
|
7673
|
+
*/
|
|
7674
|
+
const tableVariants = cva(clsx('w-full', 'caption-bottom', 'text-sm', 'border-collapse', 'border-spacing-0', 'font-sans'));
|
|
7675
|
+
/**
|
|
7676
|
+
* Table Header variants
|
|
7677
|
+
*
|
|
7678
|
+
* Distinct header with subtle background gradient
|
|
7679
|
+
* and clear visual separation from body
|
|
7680
|
+
*/
|
|
7681
|
+
const tableHeaderVariants = cva(clsx(
|
|
7682
|
+
// Subtle gradient for visual interest
|
|
7683
|
+
'bg-gradient-to-b', 'from-blue-50', 'to-blue-50/70',
|
|
7684
|
+
// Border for separation
|
|
7685
|
+
'[&_tr]:border-b', '[&_tr]:border-slate-200',
|
|
7686
|
+
// Sticky header for long tables
|
|
7687
|
+
'sticky', 'top-0', 'z-10',
|
|
7688
|
+
// Backdrop blur for when scrolling
|
|
7689
|
+
'backdrop-blur-sm'));
|
|
7690
|
+
/**
|
|
7691
|
+
* Table Body variants
|
|
7692
|
+
*
|
|
7693
|
+
* Clean body with alternating row colors option
|
|
7694
|
+
*/
|
|
7695
|
+
const tableBodyVariants = cva(clsx('[&_tr:last-child]:border-0',
|
|
7696
|
+
// Smooth transitions for row interactions
|
|
7697
|
+
'[&_tr]:transition-colors', '[&_tr]:duration-150', '[&_tr]:ease-in-out'));
|
|
7698
|
+
/**
|
|
7699
|
+
* Table Footer variants
|
|
7700
|
+
*
|
|
7701
|
+
* Distinct footer for totals and summaries
|
|
7702
|
+
*/
|
|
7703
|
+
const tableFooterVariants = cva(clsx('bg-gradient-to-t', 'from-slate-50', 'to-slate-50/50', 'border-t-2', 'border-slate-200', 'font-semibold', '[&>tr]:last:border-b-0'));
|
|
7704
|
+
/**
|
|
7705
|
+
* Table Row variants
|
|
7706
|
+
*
|
|
7707
|
+
* Interactive rows with clear hover and selected states
|
|
7708
|
+
* Following UX best practices for discoverability
|
|
7709
|
+
*/
|
|
7710
|
+
const tableRowVariants = cva(clsx('border-b', 'border-slate-100',
|
|
7711
|
+
// Smooth transition for hover effect
|
|
7712
|
+
'transition-all', 'duration-150', 'ease-in-out',
|
|
7713
|
+
// Hover state - subtle but noticeable
|
|
7714
|
+
'hover:bg-slate-50/80',
|
|
7715
|
+
// Selected state - clear visual feedback
|
|
7716
|
+
'data-[state=selected]:bg-blue-50/60', 'data-[state=selected]:border-blue-100',
|
|
7717
|
+
// Focus within for keyboard navigation
|
|
7718
|
+
'focus-within:bg-slate-50/50',
|
|
7719
|
+
// Cursor hint for clickable rows
|
|
7720
|
+
'cursor-default'));
|
|
7721
|
+
/**
|
|
7722
|
+
* Table Head variants
|
|
7723
|
+
*
|
|
7724
|
+
* Clear, readable headers with proper hierarchy
|
|
7725
|
+
* Using semibold weight and blue accent for brand consistency
|
|
7726
|
+
*/
|
|
7727
|
+
const tableHeadVariants = cva(clsx(
|
|
7728
|
+
// Vertical rhythm
|
|
7729
|
+
'h-12', 'px-4', 'py-3',
|
|
7730
|
+
// Alignment
|
|
7731
|
+
'text-left', 'align-middle',
|
|
7732
|
+
// Typography - clear hierarchy
|
|
7733
|
+
'font-semibold', 'text-blue-700', 'text-xs', 'uppercase', 'tracking-wide',
|
|
7734
|
+
// Prevent text wrapping for cleaner look
|
|
7735
|
+
'whitespace-nowrap',
|
|
7736
|
+
// Checkbox alignment
|
|
7737
|
+
'[&:has([role=checkbox])]:pr-0',
|
|
7738
|
+
// Sort indicator space
|
|
7739
|
+
'[&:has(button)]:pr-2'));
|
|
7740
|
+
/**
|
|
7741
|
+
* Table Cell variants
|
|
7742
|
+
*
|
|
7743
|
+
* Readable cells with proper spacing and alignment
|
|
7744
|
+
*/
|
|
7745
|
+
const tableCellVariants = cva(clsx(
|
|
7746
|
+
// Generous padding for readability
|
|
7747
|
+
'px-4', 'py-4',
|
|
7748
|
+
// Alignment
|
|
7749
|
+
'align-middle',
|
|
7750
|
+
// Typography - optimized for scanning
|
|
7751
|
+
'text-slate-600', 'text-sm', 'font-normal',
|
|
7752
|
+
// Line height for multi-line content
|
|
7753
|
+
'leading-relaxed',
|
|
7754
|
+
// Checkbox alignment
|
|
7755
|
+
'[&:has([role=checkbox])]:pr-0',
|
|
7756
|
+
// First column emphasis
|
|
7757
|
+
'[&:first-child]:font-medium', '[&:first-child]:text-slate-900'));
|
|
7758
|
+
/**
|
|
7759
|
+
* Table Card Header variants
|
|
7760
|
+
*
|
|
7761
|
+
* Prominent header with semantic colors and clear hierarchy
|
|
7762
|
+
* Following UX principles for visual weight distribution
|
|
7763
|
+
*/
|
|
7764
|
+
const tableCardHeaderVariants = cva(clsx('flex', 'items-center', 'gap-3', 'px-5', 'py-4',
|
|
7765
|
+
// Gradient for visual interest
|
|
7766
|
+
'bg-gradient-to-r',
|
|
7767
|
+
// Rounded top corners
|
|
7768
|
+
'rounded-t-xl',
|
|
7769
|
+
// Subtle bottom border
|
|
7770
|
+
'border-b'), {
|
|
7771
|
+
variants: {
|
|
7772
|
+
color: {
|
|
7773
|
+
default: clsx('from-slate-100', 'to-slate-50', 'border-slate-200/50'),
|
|
7774
|
+
info: clsx('from-blue-100', 'to-blue-50', 'border-blue-200/50'),
|
|
7775
|
+
success: clsx('from-green-100', 'to-green-50', 'border-green-200/50'),
|
|
7776
|
+
warning: clsx('from-amber-100', 'to-amber-50', 'border-amber-200/50'),
|
|
7777
|
+
destructive: clsx('from-red-100', 'to-red-50', 'border-red-200/50'),
|
|
7778
|
+
},
|
|
7779
|
+
},
|
|
7780
|
+
defaultVariants: {
|
|
7781
|
+
color: 'info',
|
|
7782
|
+
},
|
|
7783
|
+
});
|
|
7784
|
+
/**
|
|
7785
|
+
* Table Card Footer variants
|
|
7786
|
+
*
|
|
7787
|
+
* Clean footer area for pagination and actions
|
|
7788
|
+
*/
|
|
7789
|
+
const tableCardFooterVariants = cva(clsx('flex', 'items-center', 'justify-between', 'gap-3', 'px-5', 'py-4', 'bg-slate-50/50', 'border-t', 'border-slate-200', 'rounded-b-xl'));
|
|
7790
|
+
/**
|
|
7791
|
+
* Table Pagination wrapper variants
|
|
7792
|
+
*
|
|
7793
|
+
* Clean pagination area with proper spacing
|
|
7794
|
+
*/
|
|
7795
|
+
const tablePaginationVariants = cva(clsx('px-4', 'py-3', 'border-t', 'border-slate-100', 'bg-slate-50/30'));
|
|
7796
|
+
/**
|
|
7797
|
+
* Table Empty State variants
|
|
7798
|
+
*
|
|
7799
|
+
* For when table has no data
|
|
7800
|
+
*/
|
|
7801
|
+
const tableEmptyStateVariants = cva(clsx('py-12', 'px-4', 'text-center', 'text-slate-400', 'text-sm'));
|
|
7802
|
+
/**
|
|
7803
|
+
* Table Loading State variants
|
|
7804
|
+
*
|
|
7805
|
+
* For skeleton loading states
|
|
7806
|
+
*/
|
|
7807
|
+
const tableLoadingVariants = cva(clsx('animate-pulse', 'bg-slate-100', 'rounded'));
|
|
7808
|
+
/**
|
|
7809
|
+
* Striped table modifier
|
|
7810
|
+
*
|
|
7811
|
+
* Apply to tbody for alternating row colors
|
|
7812
|
+
*/
|
|
7813
|
+
const tableStripedVariants = cva(clsx('[&>tr:nth-child(even)]:bg-slate-50/50'));
|
|
7814
|
+
/**
|
|
7815
|
+
* Compact table modifier
|
|
7816
|
+
*
|
|
7817
|
+
* Reduced padding for dense data
|
|
7818
|
+
*/
|
|
7819
|
+
const tableCompactVariants = cva(clsx('[&_th]:py-2', '[&_th]:px-3', '[&_td]:py-2', '[&_td]:px-3', '[&_th]:text-xs', '[&_td]:text-xs'));
|
|
7820
|
+
|
|
7821
|
+
/**
|
|
7822
|
+
* Table Component
|
|
7823
|
+
*
|
|
7824
|
+
* A responsive table wrapper with semantic HTML table element.
|
|
7825
|
+
* Follows shadcn/ui table structure.
|
|
7826
|
+
*
|
|
7827
|
+
* Usage:
|
|
7828
|
+
* ```html
|
|
7829
|
+
* <bsg-table>
|
|
7830
|
+
* <bsg-table-caption>A list of your recent invoices.</bsg-table-caption>
|
|
7831
|
+
* <bsg-table-header>
|
|
7832
|
+
* <bsg-table-row>
|
|
7833
|
+
* <bsg-table-head>Invoice</bsg-table-head>
|
|
7834
|
+
* <bsg-table-head>Status</bsg-table-head>
|
|
7835
|
+
* </bsg-table-row>
|
|
7836
|
+
* </bsg-table-header>
|
|
7837
|
+
* <bsg-table-body>
|
|
7838
|
+
* <bsg-table-row>
|
|
7839
|
+
* <bsg-table-cell>INV001</bsg-table-cell>
|
|
7840
|
+
* <bsg-table-cell>Paid</bsg-table-cell>
|
|
7841
|
+
* </bsg-table-row>
|
|
7842
|
+
* </bsg-table-body>
|
|
7843
|
+
* </bsg-table>
|
|
7844
|
+
* ```
|
|
7845
|
+
*/
|
|
7846
|
+
class TableComponent {
|
|
7847
|
+
/** Additional CSS classes for wrapper */
|
|
7848
|
+
wrapperClassName = input(...(ngDevMode ? [undefined, { debugName: "wrapperClassName" }] : []));
|
|
7849
|
+
/** Additional CSS classes for table */
|
|
7850
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7851
|
+
wrapperClasses = computed(() => clsx(tableWrapperVariants(), this.wrapperClassName()), ...(ngDevMode ? [{ debugName: "wrapperClasses" }] : []));
|
|
7852
|
+
tableClasses = computed(() => clsx(tableVariants(), this.className()), ...(ngDevMode ? [{ debugName: "tableClasses" }] : []));
|
|
7853
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7854
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableComponent, isStandalone: true, selector: "bsg-table", inputs: { wrapperClassName: { classPropertyName: "wrapperClassName", publicName: "wrapperClassName", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7855
|
+
<div [class]="wrapperClasses()">
|
|
7856
|
+
<table [class]="tableClasses()">
|
|
7857
|
+
<ng-content />
|
|
7858
|
+
</table>
|
|
7859
|
+
</div>
|
|
7860
|
+
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
7861
|
+
}
|
|
7862
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableComponent, decorators: [{
|
|
7863
|
+
type: Component,
|
|
7864
|
+
args: [{ selector: 'bsg-table', standalone: true, template: `
|
|
7865
|
+
<div [class]="wrapperClasses()">
|
|
7866
|
+
<table [class]="tableClasses()">
|
|
7867
|
+
<ng-content />
|
|
7868
|
+
</table>
|
|
7869
|
+
</div>
|
|
7870
|
+
`, styles: [":host{display:block}\n"] }]
|
|
7871
|
+
}], propDecorators: { wrapperClassName: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperClassName", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
7872
|
+
|
|
7873
|
+
/**
|
|
7874
|
+
* Table Header Component
|
|
7875
|
+
*
|
|
7876
|
+
* Wraps table header rows (thead element).
|
|
7877
|
+
*
|
|
7878
|
+
* Usage:
|
|
7879
|
+
* ```html
|
|
7880
|
+
* <bsg-table-header>
|
|
7881
|
+
* <bsg-table-row>
|
|
7882
|
+
* <bsg-table-head>Column 1</bsg-table-head>
|
|
7883
|
+
* <bsg-table-head>Column 2</bsg-table-head>
|
|
7884
|
+
* </bsg-table-row>
|
|
7885
|
+
* </bsg-table-header>
|
|
7886
|
+
* ```
|
|
7887
|
+
*/
|
|
7888
|
+
class TableHeaderComponent {
|
|
7889
|
+
/** Additional CSS classes */
|
|
7890
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7891
|
+
computedClasses = computed(() => clsx(tableHeaderVariants(), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
7892
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7893
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableHeaderComponent, isStandalone: true, selector: "bsg-table-header", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7894
|
+
<thead [class]="computedClasses()">
|
|
7895
|
+
<ng-content />
|
|
7896
|
+
</thead>
|
|
7897
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
7898
|
+
}
|
|
7899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableHeaderComponent, decorators: [{
|
|
7900
|
+
type: Component,
|
|
7901
|
+
args: [{ selector: 'bsg-table-header', standalone: true, template: `
|
|
7902
|
+
<thead [class]="computedClasses()">
|
|
7903
|
+
<ng-content />
|
|
7904
|
+
</thead>
|
|
7905
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
7906
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
7907
|
+
|
|
7908
|
+
/**
|
|
7909
|
+
* Table Body Component
|
|
7910
|
+
*
|
|
7911
|
+
* Wraps table body rows (tbody element).
|
|
7912
|
+
*
|
|
7913
|
+
* Usage:
|
|
7914
|
+
* ```html
|
|
7915
|
+
* <bsg-table-body>
|
|
7916
|
+
* <bsg-table-row>
|
|
7917
|
+
* <bsg-table-cell>Cell 1</bsg-table-cell>
|
|
7918
|
+
* <bsg-table-cell>Cell 2</bsg-table-cell>
|
|
7919
|
+
* </bsg-table-row>
|
|
7920
|
+
* </bsg-table-body>
|
|
7921
|
+
* ```
|
|
7922
|
+
*/
|
|
7923
|
+
class TableBodyComponent {
|
|
7924
|
+
/** Additional CSS classes */
|
|
7925
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7926
|
+
computedClasses = computed(() => clsx(tableBodyVariants(), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
7927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7928
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableBodyComponent, isStandalone: true, selector: "bsg-table-body", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7929
|
+
<tbody [class]="computedClasses()">
|
|
7930
|
+
<ng-content />
|
|
7931
|
+
</tbody>
|
|
7932
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
7933
|
+
}
|
|
7934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
7935
|
+
type: Component,
|
|
7936
|
+
args: [{ selector: 'bsg-table-body', standalone: true, template: `
|
|
7937
|
+
<tbody [class]="computedClasses()">
|
|
7938
|
+
<ng-content />
|
|
7939
|
+
</tbody>
|
|
7940
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
7941
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
7942
|
+
|
|
7943
|
+
/**
|
|
7944
|
+
* Table Footer Component
|
|
7945
|
+
*
|
|
7946
|
+
* Wraps table footer rows (tfoot element).
|
|
7947
|
+
*
|
|
7948
|
+
* Usage:
|
|
7949
|
+
* ```html
|
|
7950
|
+
* <bsg-table-footer>
|
|
7951
|
+
* <bsg-table-row>
|
|
7952
|
+
* <bsg-table-cell colSpan="3">Total</bsg-table-cell>
|
|
7953
|
+
* <bsg-table-cell>$2,500.00</bsg-table-cell>
|
|
7954
|
+
* </bsg-table-row>
|
|
7955
|
+
* </bsg-table-footer>
|
|
7956
|
+
* ```
|
|
7957
|
+
*/
|
|
7958
|
+
class TableFooterComponent {
|
|
7959
|
+
/** Additional CSS classes */
|
|
7960
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7961
|
+
computedClasses = computed(() => clsx(tableFooterVariants(), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
7962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableFooterComponent, isStandalone: true, selector: "bsg-table-footer", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7964
|
+
<tfoot [class]="computedClasses()">
|
|
7965
|
+
<ng-content />
|
|
7966
|
+
</tfoot>
|
|
7967
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
7968
|
+
}
|
|
7969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableFooterComponent, decorators: [{
|
|
7970
|
+
type: Component,
|
|
7971
|
+
args: [{ selector: 'bsg-table-footer', standalone: true, template: `
|
|
7972
|
+
<tfoot [class]="computedClasses()">
|
|
7973
|
+
<ng-content />
|
|
7974
|
+
</tfoot>
|
|
7975
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
7976
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
7977
|
+
|
|
7978
|
+
/**
|
|
7979
|
+
* Table Row Component
|
|
7980
|
+
*
|
|
7981
|
+
* A table row element (tr).
|
|
7982
|
+
*
|
|
7983
|
+
* Usage:
|
|
7984
|
+
* ```html
|
|
7985
|
+
* <bsg-table-row>
|
|
7986
|
+
* <bsg-table-cell>Cell 1</bsg-table-cell>
|
|
7987
|
+
* <bsg-table-cell>Cell 2</bsg-table-cell>
|
|
7988
|
+
* </bsg-table-row>
|
|
7989
|
+
* ```
|
|
7990
|
+
*/
|
|
7991
|
+
class TableRowComponent {
|
|
7992
|
+
/** Additional CSS classes */
|
|
7993
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
7994
|
+
/** Whether the row is selected */
|
|
7995
|
+
selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
7996
|
+
computedClasses = computed(() => clsx(tableRowVariants(), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
7997
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7998
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableRowComponent, isStandalone: true, selector: "bsg-table-row", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
7999
|
+
<tr
|
|
8000
|
+
[class]="computedClasses()"
|
|
8001
|
+
[attr.data-state]="selected() ? 'selected' : null"
|
|
8002
|
+
>
|
|
8003
|
+
<ng-content />
|
|
8004
|
+
</tr>
|
|
8005
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
8006
|
+
}
|
|
8007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableRowComponent, decorators: [{
|
|
8008
|
+
type: Component,
|
|
8009
|
+
args: [{ selector: 'bsg-table-row', standalone: true, template: `
|
|
8010
|
+
<tr
|
|
8011
|
+
[class]="computedClasses()"
|
|
8012
|
+
[attr.data-state]="selected() ? 'selected' : null"
|
|
8013
|
+
>
|
|
8014
|
+
<ng-content />
|
|
8015
|
+
</tr>
|
|
8016
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
8017
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
|
|
8018
|
+
|
|
8019
|
+
/**
|
|
8020
|
+
* Table Head Component
|
|
8021
|
+
*
|
|
8022
|
+
* A table header cell element (th).
|
|
8023
|
+
*
|
|
8024
|
+
* Usage:
|
|
8025
|
+
* ```html
|
|
8026
|
+
* <bsg-table-head>Column Name</bsg-table-head>
|
|
8027
|
+
* <bsg-table-head className="w-[100px]">ID</bsg-table-head>
|
|
8028
|
+
* <bsg-table-head className="text-right">Amount</bsg-table-head>
|
|
8029
|
+
* ```
|
|
8030
|
+
*/
|
|
8031
|
+
class TableHeadComponent {
|
|
8032
|
+
/** Additional CSS classes */
|
|
8033
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
8034
|
+
/** Column span */
|
|
8035
|
+
colSpan = input(...(ngDevMode ? [undefined, { debugName: "colSpan" }] : []));
|
|
8036
|
+
/** Scope attribute for accessibility */
|
|
8037
|
+
scope = input('col', ...(ngDevMode ? [{ debugName: "scope" }] : []));
|
|
8038
|
+
computedClasses = computed(() => clsx(tableHeadVariants(), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
8039
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8040
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableHeadComponent, isStandalone: true, selector: "bsg-table-head", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, colSpan: { classPropertyName: "colSpan", publicName: "colSpan", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
8041
|
+
<th
|
|
8042
|
+
[class]="computedClasses()"
|
|
8043
|
+
[attr.colspan]="colSpan()"
|
|
8044
|
+
[scope]="scope()"
|
|
8045
|
+
>
|
|
8046
|
+
<ng-content />
|
|
8047
|
+
</th>
|
|
8048
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
8049
|
+
}
|
|
8050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableHeadComponent, decorators: [{
|
|
8051
|
+
type: Component,
|
|
8052
|
+
args: [{ selector: 'bsg-table-head', standalone: true, template: `
|
|
8053
|
+
<th
|
|
8054
|
+
[class]="computedClasses()"
|
|
8055
|
+
[attr.colspan]="colSpan()"
|
|
8056
|
+
[scope]="scope()"
|
|
8057
|
+
>
|
|
8058
|
+
<ng-content />
|
|
8059
|
+
</th>
|
|
8060
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
8061
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], colSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "colSpan", required: false }] }], scope: [{ type: i0.Input, args: [{ isSignal: true, alias: "scope", required: false }] }] } });
|
|
8062
|
+
|
|
8063
|
+
/**
|
|
8064
|
+
* Table Cell Component
|
|
8065
|
+
*
|
|
8066
|
+
* A table data cell element (td).
|
|
8067
|
+
*
|
|
8068
|
+
* Usage:
|
|
8069
|
+
* ```html
|
|
8070
|
+
* <bsg-table-cell>Cell content</bsg-table-cell>
|
|
8071
|
+
* <bsg-table-cell className="font-medium">Bold content</bsg-table-cell>
|
|
8072
|
+
* <bsg-table-cell className="text-right">$250.00</bsg-table-cell>
|
|
8073
|
+
* <bsg-table-cell [colSpan]="3">Spanning cell</bsg-table-cell>
|
|
8074
|
+
* ```
|
|
8075
|
+
*/
|
|
8076
|
+
class TableCellComponent {
|
|
8077
|
+
/** Additional CSS classes */
|
|
8078
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
8079
|
+
/** Column span */
|
|
8080
|
+
colSpan = input(...(ngDevMode ? [undefined, { debugName: "colSpan" }] : []));
|
|
8081
|
+
computedClasses = computed(() => clsx(tableCellVariants(), this.className()), ...(ngDevMode ? [{ debugName: "computedClasses" }] : []));
|
|
8082
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8083
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableCellComponent, isStandalone: true, selector: "bsg-table-cell", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, colSpan: { classPropertyName: "colSpan", publicName: "colSpan", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
8084
|
+
<td [class]="computedClasses()" [attr.colspan]="colSpan()">
|
|
8085
|
+
<ng-content />
|
|
8086
|
+
</td>
|
|
8087
|
+
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
8088
|
+
}
|
|
8089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCellComponent, decorators: [{
|
|
8090
|
+
type: Component,
|
|
8091
|
+
args: [{ selector: 'bsg-table-cell', standalone: true, template: `
|
|
8092
|
+
<td [class]="computedClasses()" [attr.colspan]="colSpan()">
|
|
8093
|
+
<ng-content />
|
|
8094
|
+
</td>
|
|
8095
|
+
`, styles: [":host{display:contents}\n"] }]
|
|
8096
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], colSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "colSpan", required: false }] }] } });
|
|
8097
|
+
|
|
8098
|
+
/**
|
|
8099
|
+
* Table Card Component
|
|
8100
|
+
*
|
|
8101
|
+
* A wrapper that provides a polished card container for tables,
|
|
8102
|
+
* using content projection for header and footer sections.
|
|
8103
|
+
*
|
|
8104
|
+
* UX Considerations:
|
|
8105
|
+
* - Clear visual hierarchy with prominent header
|
|
8106
|
+
* - Consistent spacing and alignment
|
|
8107
|
+
* - Subtle shadows for depth without distraction
|
|
8108
|
+
* - Flexible composition with header/footer slots
|
|
8109
|
+
*
|
|
8110
|
+
* Usage:
|
|
8111
|
+
* ```html
|
|
8112
|
+
* <bsg-table-card>
|
|
8113
|
+
* <bsg-tableCard-header title="My Table Title">
|
|
8114
|
+
* <button slot="action">New Item</button>
|
|
8115
|
+
* </bsg-tableCard-header>
|
|
8116
|
+
*
|
|
8117
|
+
* <bsg-table>
|
|
8118
|
+
* ...
|
|
8119
|
+
* </bsg-table>
|
|
8120
|
+
*
|
|
8121
|
+
* <bsg-tableCard-footer>
|
|
8122
|
+
* <span>Showing 1-10 of 100</span>
|
|
8123
|
+
* </bsg-tableCard-footer>
|
|
8124
|
+
* </bsg-table-card>
|
|
8125
|
+
* ```
|
|
8126
|
+
*/
|
|
8127
|
+
class TableCardComponent {
|
|
8128
|
+
/** Additional CSS classes for the card container */
|
|
8129
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
8130
|
+
cardClasses = computed(() => clsx('w-full', 'rounded-xl', 'border', 'border-slate-200', 'bg-white', 'shadow-sm', 'overflow-hidden', 'transition-shadow', 'duration-200', 'hover:shadow-md', this.className()), ...(ngDevMode ? [{ debugName: "cardClasses" }] : []));
|
|
8131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableCardComponent, isStandalone: true, selector: "bsg-table-card", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
8133
|
+
<div [class]="cardClasses()">
|
|
8134
|
+
<!-- Header slot -->
|
|
8135
|
+
<ng-content select="bsg-tableCard-header" />
|
|
8136
|
+
|
|
8137
|
+
<!-- Content wrapper - removes nested borders/shadows -->
|
|
8138
|
+
<div
|
|
8139
|
+
class="[&>bsg-table]:rounded-none [&>bsg-table>div]:rounded-none [&>bsg-table>div]:border-0 [&>bsg-table>div]:shadow-none"
|
|
8140
|
+
>
|
|
8141
|
+
<ng-content />
|
|
8142
|
+
</div>
|
|
8143
|
+
|
|
8144
|
+
<!-- Footer slot -->
|
|
8145
|
+
<ng-content select="bsg-tableCard-footer" />
|
|
8146
|
+
</div>
|
|
8147
|
+
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
8148
|
+
}
|
|
8149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCardComponent, decorators: [{
|
|
8150
|
+
type: Component,
|
|
8151
|
+
args: [{ selector: 'bsg-table-card', standalone: true, template: `
|
|
8152
|
+
<div [class]="cardClasses()">
|
|
8153
|
+
<!-- Header slot -->
|
|
8154
|
+
<ng-content select="bsg-tableCard-header" />
|
|
8155
|
+
|
|
8156
|
+
<!-- Content wrapper - removes nested borders/shadows -->
|
|
8157
|
+
<div
|
|
8158
|
+
class="[&>bsg-table]:rounded-none [&>bsg-table>div]:rounded-none [&>bsg-table>div]:border-0 [&>bsg-table>div]:shadow-none"
|
|
8159
|
+
>
|
|
8160
|
+
<ng-content />
|
|
8161
|
+
</div>
|
|
8162
|
+
|
|
8163
|
+
<!-- Footer slot -->
|
|
8164
|
+
<ng-content select="bsg-tableCard-footer" />
|
|
8165
|
+
</div>
|
|
8166
|
+
`, styles: [":host{display:block}\n"] }]
|
|
8167
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
8168
|
+
|
|
8169
|
+
/**
|
|
8170
|
+
* Table Card Header Component
|
|
8171
|
+
*
|
|
8172
|
+
* Header section for table cards with content projection for icon and title.
|
|
8173
|
+
*
|
|
8174
|
+
* Usage:
|
|
8175
|
+
* ```html
|
|
8176
|
+
* <!-- Simple title -->
|
|
8177
|
+
* <bsg-tableCard-header>
|
|
8178
|
+
* <span>Titulo de la Tabla</span>
|
|
8179
|
+
* </bsg-tableCard-header>
|
|
8180
|
+
*
|
|
8181
|
+
* <!-- With icon and title -->
|
|
8182
|
+
* <bsg-tableCard-header color="info">
|
|
8183
|
+
* <svg class="size-5">...</svg>
|
|
8184
|
+
* <span>Titulo de la Tabla</span>
|
|
8185
|
+
* </bsg-tableCard-header>
|
|
8186
|
+
*
|
|
8187
|
+
* <!-- With icon, title and action -->
|
|
8188
|
+
* <bsg-tableCard-header color="success">
|
|
8189
|
+
* <svg class="size-5">...</svg>
|
|
8190
|
+
* <span>Titulo de la Tabla</span>
|
|
8191
|
+
* <button slot="action">Nueva Accion</button>
|
|
8192
|
+
* </bsg-tableCard-header>
|
|
8193
|
+
* ```
|
|
8194
|
+
*/
|
|
8195
|
+
class TableCardHeaderComponent {
|
|
8196
|
+
/** Semantic color variant */
|
|
8197
|
+
color = input('info', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
8198
|
+
/** Additional CSS classes for header */
|
|
8199
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
8200
|
+
headerClasses = computed(() => clsx(tableCardHeaderVariants({ color: this.color() }), this.className()), ...(ngDevMode ? [{ debugName: "headerClasses" }] : []));
|
|
8201
|
+
contentClasses = computed(() => {
|
|
8202
|
+
const colorMap = {
|
|
8203
|
+
default: 'text-slate-800',
|
|
8204
|
+
info: 'text-blue-800',
|
|
8205
|
+
success: 'text-green-800',
|
|
8206
|
+
warning: 'text-amber-800',
|
|
8207
|
+
destructive: 'text-red-800',
|
|
8208
|
+
};
|
|
8209
|
+
return clsx('flex', 'items-center', 'gap-3', 'flex-1', 'text-base', 'font-semibold', 'leading-tight', 'tracking-tight', colorMap[this.color()]);
|
|
8210
|
+
}, ...(ngDevMode ? [{ debugName: "contentClasses" }] : []));
|
|
8211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8212
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableCardHeaderComponent, isStandalone: true, selector: "bsg-tableCard-header", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
8213
|
+
<div [class]="headerClasses()">
|
|
8214
|
+
<!-- Content (icon + title) -->
|
|
8215
|
+
<div [class]="contentClasses()">
|
|
8216
|
+
<ng-content />
|
|
8217
|
+
</div>
|
|
8218
|
+
|
|
8219
|
+
<!-- Action slot -->
|
|
8220
|
+
<div class="ml-auto flex items-center gap-2">
|
|
8221
|
+
<ng-content select="[slot='action']" />
|
|
8222
|
+
</div>
|
|
8223
|
+
</div>
|
|
8224
|
+
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
8225
|
+
}
|
|
8226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCardHeaderComponent, decorators: [{
|
|
8227
|
+
type: Component,
|
|
8228
|
+
args: [{ selector: 'bsg-tableCard-header', standalone: true, template: `
|
|
8229
|
+
<div [class]="headerClasses()">
|
|
8230
|
+
<!-- Content (icon + title) -->
|
|
8231
|
+
<div [class]="contentClasses()">
|
|
8232
|
+
<ng-content />
|
|
8233
|
+
</div>
|
|
8234
|
+
|
|
8235
|
+
<!-- Action slot -->
|
|
8236
|
+
<div class="ml-auto flex items-center gap-2">
|
|
8237
|
+
<ng-content select="[slot='action']" />
|
|
8238
|
+
</div>
|
|
8239
|
+
</div>
|
|
8240
|
+
`, styles: [":host{display:block}\n"] }]
|
|
8241
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
8242
|
+
|
|
8243
|
+
/**
|
|
8244
|
+
* Table Card Footer Component
|
|
8245
|
+
*
|
|
8246
|
+
* Footer section for table cards, typically used for pagination,
|
|
8247
|
+
* summary info, or action buttons.
|
|
8248
|
+
*
|
|
8249
|
+
* Usage:
|
|
8250
|
+
* ```html
|
|
8251
|
+
* <bsg-tableCard-footer>
|
|
8252
|
+
* <span>Showing 1-10 of 100</span>
|
|
8253
|
+
* <div>
|
|
8254
|
+
* <button>Previous</button>
|
|
8255
|
+
* <button>Next</button>
|
|
8256
|
+
* </div>
|
|
8257
|
+
* </bsg-tableCard-footer>
|
|
8258
|
+
* ```
|
|
8259
|
+
*/
|
|
8260
|
+
class TableCardFooterComponent {
|
|
8261
|
+
/** Additional CSS classes */
|
|
8262
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
8263
|
+
footerClasses = computed(() => clsx(tableCardFooterVariants(), this.className()), ...(ngDevMode ? [{ debugName: "footerClasses" }] : []));
|
|
8264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8265
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableCardFooterComponent, isStandalone: true, selector: "bsg-tableCard-footer", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
8266
|
+
<div [class]="footerClasses()">
|
|
8267
|
+
<ng-content />
|
|
8268
|
+
</div>
|
|
8269
|
+
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
8270
|
+
}
|
|
8271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableCardFooterComponent, decorators: [{
|
|
8272
|
+
type: Component,
|
|
8273
|
+
args: [{ selector: 'bsg-tableCard-footer', standalone: true, template: `
|
|
8274
|
+
<div [class]="footerClasses()">
|
|
8275
|
+
<ng-content />
|
|
8276
|
+
</div>
|
|
8277
|
+
`, styles: [":host{display:block}\n"] }]
|
|
8278
|
+
}], propDecorators: { className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
8279
|
+
|
|
8280
|
+
/**
|
|
8281
|
+
* Pagination container variants
|
|
8282
|
+
*
|
|
8283
|
+
* Main wrapper for the pagination component
|
|
8284
|
+
*/
|
|
8285
|
+
const paginationContainerVariants = cva(clsx(
|
|
8286
|
+
// Layout
|
|
8287
|
+
'flex items-center gap-4',
|
|
8288
|
+
// Size
|
|
8289
|
+
'h-[29px]',
|
|
8290
|
+
// Typography
|
|
8291
|
+
'font-sans',
|
|
8292
|
+
// Responsive
|
|
8293
|
+
'max-md:flex-wrap max-md:h-auto max-md:gap-3'));
|
|
8294
|
+
/**
|
|
8295
|
+
* Pagination section left variants
|
|
8296
|
+
*
|
|
8297
|
+
* Contains page number input
|
|
8298
|
+
*/
|
|
8299
|
+
const paginationSectionLeftVariants = cva(clsx(
|
|
8300
|
+
// Layout
|
|
8301
|
+
'flex items-center gap-2'));
|
|
8302
|
+
/**
|
|
8303
|
+
* Pagination section middle variants
|
|
8304
|
+
*
|
|
8305
|
+
* Contains page size selector
|
|
8306
|
+
*/
|
|
8307
|
+
const paginationSectionMiddleVariants = cva(clsx(
|
|
8308
|
+
// Layout
|
|
8309
|
+
'flex items-center gap-2.5'));
|
|
8310
|
+
/**
|
|
8311
|
+
* Pagination section right variants
|
|
8312
|
+
*
|
|
8313
|
+
* Contains range label and navigation controls
|
|
8314
|
+
*/
|
|
8315
|
+
const paginationSectionRightVariants = cva(clsx(
|
|
8316
|
+
// Layout
|
|
8317
|
+
'flex items-center gap-[17px]',
|
|
8318
|
+
// Positioning
|
|
8319
|
+
'ml-auto',
|
|
8320
|
+
// Responsive
|
|
8321
|
+
'max-md:ml-0 max-md:w-full max-md:justify-between'));
|
|
8322
|
+
/**
|
|
8323
|
+
* Pagination label variants
|
|
8324
|
+
*
|
|
8325
|
+
* Standard label text style
|
|
8326
|
+
*/
|
|
8327
|
+
const paginationLabelVariants = cva(clsx(
|
|
8328
|
+
// Typography
|
|
8329
|
+
'text-muted-foreground text-[13px] font-medium leading-normal tracking-[-0.26px]'));
|
|
8330
|
+
/**
|
|
8331
|
+
* Pagination range label variants
|
|
8332
|
+
*
|
|
8333
|
+
* Range display text (e.g., "1 - 5 de 5 ítems")
|
|
8334
|
+
*/
|
|
8335
|
+
const paginationRangeLabelVariants = cva(clsx(
|
|
8336
|
+
// Typography
|
|
8337
|
+
'text-muted-foreground text-[13px] font-medium leading-normal tracking-[-0.26px]',
|
|
8338
|
+
// Text behavior
|
|
8339
|
+
'whitespace-nowrap'));
|
|
8340
|
+
/**
|
|
8341
|
+
* Pagination input variants
|
|
8342
|
+
*
|
|
8343
|
+
* Page number input field
|
|
8344
|
+
*/
|
|
8345
|
+
const paginationInputVariants = cva(clsx(
|
|
8346
|
+
// Size
|
|
8347
|
+
'w-[42px] h-[29px]',
|
|
8348
|
+
// Spacing
|
|
8349
|
+
'px-2',
|
|
8350
|
+
// Border
|
|
8351
|
+
'rounded-md border border-border',
|
|
8352
|
+
// Background
|
|
8353
|
+
'bg-background',
|
|
8354
|
+
// Typography
|
|
8355
|
+
'text-muted-foreground font-sans text-[13px] font-medium leading-normal tracking-[-0.26px] text-center',
|
|
8356
|
+
// Focus
|
|
8357
|
+
'outline-none',
|
|
8358
|
+
// Transitions
|
|
8359
|
+
'transition-all duration-200',
|
|
8360
|
+
// Remove number input spinners
|
|
8361
|
+
'[appearance:textfield]', '[&::-webkit-outer-spin-button]:appearance-none', '[&::-webkit-inner-spin-button]:appearance-none',
|
|
8362
|
+
// States
|
|
8363
|
+
'hover:enabled:border-muted-foreground/30', 'focus:border-ring focus:ring-2 focus:ring-ring/30', 'disabled:bg-muted disabled:cursor-not-allowed disabled:opacity-50'));
|
|
8364
|
+
/**
|
|
8365
|
+
* Pagination select wrapper variants
|
|
8366
|
+
*
|
|
8367
|
+
* Wrapper for the select dropdown
|
|
8368
|
+
*/
|
|
8369
|
+
const paginationSelectWrapperVariants = cva(clsx(
|
|
8370
|
+
// Position
|
|
8371
|
+
'relative',
|
|
8372
|
+
// Display
|
|
8373
|
+
'inline-block'));
|
|
8374
|
+
/**
|
|
8375
|
+
* Pagination select variants
|
|
8376
|
+
*
|
|
8377
|
+
* Page size select dropdown
|
|
8378
|
+
*/
|
|
8379
|
+
const paginationSelectVariants = cva(clsx(
|
|
8380
|
+
// Size
|
|
8381
|
+
'w-[47px] h-[29px]',
|
|
8382
|
+
// Spacing
|
|
8383
|
+
'pl-2 pr-6',
|
|
8384
|
+
// Border
|
|
8385
|
+
'rounded-md border border-border',
|
|
8386
|
+
// Background
|
|
8387
|
+
'bg-background',
|
|
8388
|
+
// Typography
|
|
8389
|
+
'text-muted-foreground font-sans text-[13px] font-medium leading-normal tracking-[-0.26px]',
|
|
8390
|
+
// Focus
|
|
8391
|
+
'outline-none',
|
|
8392
|
+
// Cursor
|
|
8393
|
+
'cursor-pointer',
|
|
8394
|
+
// Appearance
|
|
8395
|
+
'appearance-none',
|
|
8396
|
+
// Transitions
|
|
8397
|
+
'transition-all duration-200',
|
|
8398
|
+
// States
|
|
8399
|
+
'hover:enabled:border-muted-foreground/30', 'focus:border-ring focus:ring-2 focus:ring-ring/30'));
|
|
8400
|
+
/**
|
|
8401
|
+
* Pagination select icon variants
|
|
8402
|
+
*
|
|
8403
|
+
* Dropdown chevron icon
|
|
8404
|
+
*/
|
|
8405
|
+
const paginationSelectIconVariants = cva(clsx(
|
|
8406
|
+
// Position
|
|
8407
|
+
'absolute right-[7px] top-1/2 -translate-y-1/2',
|
|
8408
|
+
// Pointer events
|
|
8409
|
+
'pointer-events-none'));
|
|
8410
|
+
/**
|
|
8411
|
+
* Pagination navigation controls variants
|
|
8412
|
+
*
|
|
8413
|
+
* Container for navigation buttons
|
|
8414
|
+
*/
|
|
8415
|
+
const paginationNavControlsVariants = cva(clsx(
|
|
8416
|
+
// Layout
|
|
8417
|
+
'flex items-center gap-[7px]'));
|
|
8418
|
+
/**
|
|
8419
|
+
* Pagination navigation button variants
|
|
8420
|
+
*
|
|
8421
|
+
* Navigation buttons (first, prev, next, last, refresh)
|
|
8422
|
+
*/
|
|
8423
|
+
const paginationNavButtonVariants = cva(clsx(
|
|
8424
|
+
// Size
|
|
8425
|
+
'w-[29px] h-[29px]',
|
|
8426
|
+
// Layout
|
|
8427
|
+
'flex items-center justify-center',
|
|
8428
|
+
// Border
|
|
8429
|
+
'rounded-md border border-border',
|
|
8430
|
+
// Background
|
|
8431
|
+
'bg-background',
|
|
8432
|
+
// Cursor
|
|
8433
|
+
'cursor-pointer',
|
|
8434
|
+
// Focus
|
|
8435
|
+
'outline-none',
|
|
8436
|
+
// Spacing
|
|
8437
|
+
'p-0',
|
|
8438
|
+
// Transitions
|
|
8439
|
+
'transition-all duration-200',
|
|
8440
|
+
// States
|
|
8441
|
+
'hover:enabled:bg-muted hover:enabled:border-muted-foreground/30', 'active:enabled:bg-muted/80', 'focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30', 'disabled:cursor-not-allowed disabled:opacity-40',
|
|
8442
|
+
// Disabled SVG color
|
|
8443
|
+
'[&:disabled_svg_path]:fill-muted-foreground'), {
|
|
8444
|
+
variants: {
|
|
8445
|
+
isRefresh: {
|
|
8446
|
+
true: 'w-[30px]',
|
|
8447
|
+
false: '',
|
|
8448
|
+
},
|
|
8449
|
+
},
|
|
8450
|
+
defaultVariants: {
|
|
8451
|
+
isRefresh: false,
|
|
8452
|
+
},
|
|
8453
|
+
});
|
|
8454
|
+
|
|
8455
|
+
class PaginationComponent {
|
|
8456
|
+
/** Inputs (API existente) */
|
|
8457
|
+
currentPage = input(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : []));
|
|
8458
|
+
totalPages = input(1, ...(ngDevMode ? [{ debugName: "totalPages" }] : [])); // se mantiene, pero se "resuelve" automáticamente
|
|
8459
|
+
pageSize = input(5, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
8460
|
+
pageSizeOptions = input([5, 10, 20], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : []));
|
|
8461
|
+
totalItems = input(5, ...(ngDevMode ? [{ debugName: "totalItems" }] : []));
|
|
8462
|
+
rangeLabel = input('', ...(ngDevMode ? [{ debugName: "rangeLabel" }] : [])); // se mantiene, pero ahora el label se calcula
|
|
8463
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
8464
|
+
/** Outputs (API existente) */
|
|
8465
|
+
pageChange = output();
|
|
8466
|
+
pageSizeChange = output();
|
|
8467
|
+
paginationChange = output();
|
|
8468
|
+
refresh = output();
|
|
8469
|
+
/** Estado interno (para que el componente funcione sin que el padre lo controle) */
|
|
8470
|
+
pageSig = signal(1, ...(ngDevMode ? [{ debugName: "pageSig" }] : []));
|
|
8471
|
+
pageSizeSig = signal(5, ...(ngDevMode ? [{ debugName: "pageSizeSig" }] : []));
|
|
8472
|
+
/** Buffer para edición del input */
|
|
8473
|
+
tempPageValue = signal('', ...(ngDevMode ? [{ debugName: "tempPageValue" }] : []));
|
|
8474
|
+
constructor() {
|
|
8475
|
+
// Sincroniza estado interno si el padre cambia inputs desde afuera (Storybook Controls o app real)
|
|
8476
|
+
effect(() => {
|
|
8477
|
+
this.pageSig.set(this.currentPage());
|
|
8478
|
+
});
|
|
8479
|
+
effect(() => {
|
|
8480
|
+
this.pageSizeSig.set(this.pageSize());
|
|
8481
|
+
});
|
|
8482
|
+
// Si cambia pageSizeOptions y el pageSize actual ya no existe, cae al primero
|
|
8483
|
+
effect(() => {
|
|
8484
|
+
const opts = this.pageSizeOptions();
|
|
8485
|
+
if (opts.length === 0)
|
|
8486
|
+
return;
|
|
8487
|
+
const current = this.pageSizeSig();
|
|
8488
|
+
if (!opts.includes(current)) {
|
|
8489
|
+
this.setPageSize(opts[0]);
|
|
8490
|
+
}
|
|
8491
|
+
});
|
|
8492
|
+
}
|
|
8493
|
+
/** Total pages calculado con totalItems/pageSize */
|
|
8494
|
+
resolvedTotalPages = computed(() => {
|
|
8495
|
+
const totalItems = this.totalItems();
|
|
8496
|
+
const size = this.pageSizeSig();
|
|
8497
|
+
if (totalItems > 0 && size > 0) {
|
|
8498
|
+
return Math.max(0, Math.ceil(totalItems / size));
|
|
8499
|
+
}
|
|
8500
|
+
// fallback si no hay totalItems (o es 0) => respeta el input
|
|
8501
|
+
return Math.max(0, this.totalPages());
|
|
8502
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedTotalPages" }] : []));
|
|
8503
|
+
/** Range label calculado (siempre) */
|
|
8504
|
+
computedRangeLabel = computed(() => {
|
|
8505
|
+
const total = this.totalItems();
|
|
8506
|
+
const page = this.pageSig();
|
|
8507
|
+
const size = this.pageSizeSig();
|
|
8508
|
+
if (total <= 0 || size <= 0 || this.resolvedTotalPages() === 0) {
|
|
8509
|
+
return `0 - 0 de ${Math.max(0, total)} ítems`;
|
|
8510
|
+
}
|
|
8511
|
+
const start = (page - 1) * size + 1;
|
|
8512
|
+
const end = Math.min(total, page * size);
|
|
8513
|
+
return `${start} - ${end} de ${total} ítems`;
|
|
8514
|
+
}, ...(ngDevMode ? [{ debugName: "computedRangeLabel" }] : []));
|
|
8515
|
+
/** Valor visible en el input de página */
|
|
8516
|
+
pageInputValue = computed(() => {
|
|
8517
|
+
const tmp = this.tempPageValue();
|
|
8518
|
+
return tmp !== '' ? tmp : String(this.pageSig());
|
|
8519
|
+
}, ...(ngDevMode ? [{ debugName: "pageInputValue" }] : []));
|
|
8520
|
+
// Classes
|
|
8521
|
+
containerClasses = computed(() => clsx(paginationContainerVariants(), this.className()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
8522
|
+
sectionLeftClasses = computed(() => clsx(paginationSectionLeftVariants()), ...(ngDevMode ? [{ debugName: "sectionLeftClasses" }] : []));
|
|
8523
|
+
sectionMiddleClasses = computed(() => clsx(paginationSectionMiddleVariants()), ...(ngDevMode ? [{ debugName: "sectionMiddleClasses" }] : []));
|
|
8524
|
+
sectionRightClasses = computed(() => clsx(paginationSectionRightVariants()), ...(ngDevMode ? [{ debugName: "sectionRightClasses" }] : []));
|
|
8525
|
+
labelClasses = computed(() => clsx(paginationLabelVariants()), ...(ngDevMode ? [{ debugName: "labelClasses" }] : []));
|
|
8526
|
+
rangeLabelClasses = computed(() => clsx(paginationRangeLabelVariants()), ...(ngDevMode ? [{ debugName: "rangeLabelClasses" }] : []));
|
|
8527
|
+
inputClasses = computed(() => clsx(paginationInputVariants()), ...(ngDevMode ? [{ debugName: "inputClasses" }] : []));
|
|
8528
|
+
selectWrapperClasses = computed(() => clsx(paginationSelectWrapperVariants()), ...(ngDevMode ? [{ debugName: "selectWrapperClasses" }] : []));
|
|
8529
|
+
selectClasses = computed(() => clsx(paginationSelectVariants()), ...(ngDevMode ? [{ debugName: "selectClasses" }] : []));
|
|
8530
|
+
selectIconClasses = computed(() => clsx(paginationSelectIconVariants()), ...(ngDevMode ? [{ debugName: "selectIconClasses" }] : []));
|
|
8531
|
+
navControlsClasses = computed(() => clsx(paginationNavControlsVariants()), ...(ngDevMode ? [{ debugName: "navControlsClasses" }] : []));
|
|
8532
|
+
navButtonClasses = computed(() => clsx(paginationNavButtonVariants({ isRefresh: false })), ...(ngDevMode ? [{ debugName: "navButtonClasses" }] : []));
|
|
8533
|
+
refreshButtonClasses = computed(() => clsx(paginationNavButtonVariants({ isRefresh: true })), ...(ngDevMode ? [{ debugName: "refreshButtonClasses" }] : []));
|
|
8534
|
+
// Navigation
|
|
8535
|
+
goToFirstPage() {
|
|
8536
|
+
if (this.resolvedTotalPages() > 0)
|
|
8537
|
+
this.updatePage(1);
|
|
8538
|
+
}
|
|
8539
|
+
goToPreviousPage() {
|
|
8540
|
+
if (this.pageSig() > 1)
|
|
8541
|
+
this.updatePage(this.pageSig() - 1);
|
|
8542
|
+
}
|
|
8543
|
+
goToNextPage() {
|
|
8544
|
+
if (this.pageSig() < this.resolvedTotalPages())
|
|
8545
|
+
this.updatePage(this.pageSig() + 1);
|
|
8546
|
+
}
|
|
8547
|
+
goToLastPage() {
|
|
8548
|
+
const last = this.resolvedTotalPages();
|
|
8549
|
+
if (last > 0)
|
|
8550
|
+
this.updatePage(last);
|
|
8551
|
+
}
|
|
8552
|
+
// Page input handling
|
|
8553
|
+
onPageInputFocus() {
|
|
8554
|
+
this.tempPageValue.set(String(this.pageSig()));
|
|
8555
|
+
}
|
|
8556
|
+
onPageInputChange(event) {
|
|
8557
|
+
const inputEl = event.target;
|
|
8558
|
+
this.tempPageValue.set(inputEl.value);
|
|
8559
|
+
}
|
|
8560
|
+
onPageInputBlur() {
|
|
8561
|
+
const tempValue = this.tempPageValue().trim();
|
|
8562
|
+
if (tempValue === '') {
|
|
8563
|
+
this.tempPageValue.set('');
|
|
8564
|
+
return;
|
|
8565
|
+
}
|
|
8566
|
+
let page = parseInt(tempValue, 10);
|
|
8567
|
+
if (Number.isNaN(page)) {
|
|
8568
|
+
this.tempPageValue.set('');
|
|
8569
|
+
return;
|
|
8570
|
+
}
|
|
8571
|
+
page = Math.max(1, Math.min(page, this.resolvedTotalPages() || 1));
|
|
8572
|
+
this.updatePage(page);
|
|
8573
|
+
this.tempPageValue.set('');
|
|
8574
|
+
}
|
|
8575
|
+
// Page size change
|
|
8576
|
+
onPageSizeSelectChange(event) {
|
|
8577
|
+
const select = event.target;
|
|
8578
|
+
const newSize = parseInt(select.value, 10);
|
|
8579
|
+
if (Number.isNaN(newSize) || newSize <= 0)
|
|
8580
|
+
return;
|
|
8581
|
+
if (newSize !== this.pageSizeSig()) {
|
|
8582
|
+
this.setPageSize(newSize);
|
|
8583
|
+
}
|
|
8584
|
+
}
|
|
8585
|
+
setPageSize(newSize) {
|
|
8586
|
+
this.pageSizeSig.set(newSize);
|
|
8587
|
+
// Ajusta página actual si se sale del rango con el nuevo totalPages
|
|
8588
|
+
const max = this.resolvedTotalPages();
|
|
8589
|
+
const nextPage = Math.max(1, Math.min(this.pageSig(), max || 1));
|
|
8590
|
+
// Si prefieres resetear siempre a 1 al cambiar tamaño, cambia por: this.updatePage(1)
|
|
8591
|
+
this.pageSig.set(nextPage);
|
|
8592
|
+
this.pageSizeChange.emit(newSize);
|
|
8593
|
+
this.paginationChange.emit({ currentPage: nextPage, pageSize: newSize });
|
|
8594
|
+
// Si el clamp cambió la página, también notificamos pageChange
|
|
8595
|
+
if (nextPage !== this.currentPage()) {
|
|
8596
|
+
this.pageChange.emit(nextPage);
|
|
8597
|
+
}
|
|
8598
|
+
}
|
|
8599
|
+
onRefresh() {
|
|
8600
|
+
this.refresh.emit();
|
|
8601
|
+
}
|
|
8602
|
+
updatePage(page) {
|
|
8603
|
+
const max = this.resolvedTotalPages();
|
|
8604
|
+
const clamped = Math.max(1, Math.min(page, max || 1));
|
|
8605
|
+
this.pageSig.set(clamped);
|
|
8606
|
+
this.tempPageValue.set('');
|
|
8607
|
+
this.pageChange.emit(clamped);
|
|
8608
|
+
this.paginationChange.emit({
|
|
8609
|
+
currentPage: clamped,
|
|
8610
|
+
pageSize: this.pageSizeSig(),
|
|
8611
|
+
});
|
|
8612
|
+
}
|
|
8613
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8614
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: PaginationComponent, isStandalone: true, selector: "bsg-pagination", inputs: { currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, rangeLabel: { classPropertyName: "rangeLabel", publicName: "rangeLabel", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSizeChange: "pageSizeChange", paginationChange: "paginationChange", refresh: "refresh" }, ngImport: i0, template: `
|
|
8615
|
+
<div [class]="containerClasses()">
|
|
8616
|
+
<!-- Left section: Current page -->
|
|
8617
|
+
<div [class]="sectionLeftClasses()">
|
|
8618
|
+
<span [class]="labelClasses()">Página</span>
|
|
8619
|
+
<input
|
|
8620
|
+
type="number"
|
|
8621
|
+
[class]="inputClasses()"
|
|
8622
|
+
[value]="pageInputValue()"
|
|
8623
|
+
[min]="1"
|
|
8624
|
+
[max]="resolvedTotalPages()"
|
|
8625
|
+
(focus)="onPageInputFocus()"
|
|
8626
|
+
(input)="onPageInputChange($event)"
|
|
8627
|
+
(keydown.enter)="onPageInputBlur()"
|
|
8628
|
+
(blur)="onPageInputBlur()"
|
|
8629
|
+
[disabled]="resolvedTotalPages() === 0"
|
|
8630
|
+
/>
|
|
8631
|
+
<span [class]="labelClasses()">de {{ resolvedTotalPages() }}</span>
|
|
8632
|
+
</div>
|
|
8633
|
+
|
|
8634
|
+
<!-- Middle section: Page size selector -->
|
|
8635
|
+
<div [class]="sectionMiddleClasses()">
|
|
8636
|
+
<div [class]="selectWrapperClasses()">
|
|
8637
|
+
<select
|
|
8638
|
+
[class]="selectClasses()"
|
|
8639
|
+
[value]="pageSizeSig()"
|
|
8640
|
+
(change)="onPageSizeSelectChange($event)"
|
|
8641
|
+
>
|
|
8642
|
+
@for (option of pageSizeOptions(); track option) {
|
|
8643
|
+
<option [value]="option">{{ option }}</option>
|
|
8644
|
+
}
|
|
8645
|
+
</select>
|
|
8646
|
+
|
|
8647
|
+
<svg
|
|
8648
|
+
[class]="selectIconClasses()"
|
|
8649
|
+
width="15"
|
|
8650
|
+
height="15"
|
|
8651
|
+
viewBox="0 0 15 15"
|
|
8652
|
+
fill="none"
|
|
8653
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8654
|
+
>
|
|
8655
|
+
<path
|
|
8656
|
+
d="M10.8081 5.18312C11.0522 4.93904 11.4478 4.93904 11.6919 5.18312C11.936 5.4272 11.936 5.82283 11.6919 6.06691L7.94191 9.81691C7.69783 10.061 7.3022 10.061 7.05812 9.81691L3.30812 6.06691C3.06404 5.82283 3.06404 5.4272 3.30812 5.18312C3.5522 4.93904 3.94783 4.93904 4.19191 5.18312L7.50001 8.49122L10.8081 5.18312Z"
|
|
8657
|
+
fill="#848485"
|
|
8658
|
+
/>
|
|
8659
|
+
</svg>
|
|
8660
|
+
</div>
|
|
8661
|
+
<span [class]="labelClasses()">ítems por página</span>
|
|
8662
|
+
</div>
|
|
8663
|
+
|
|
8664
|
+
<!-- Right section: Range label and navigation -->
|
|
8665
|
+
<div [class]="sectionRightClasses()">
|
|
8666
|
+
<span [class]="rangeLabelClasses()">{{ computedRangeLabel() }}</span>
|
|
8667
|
+
|
|
8668
|
+
<div [class]="navControlsClasses()">
|
|
8669
|
+
<!-- First page -->
|
|
8670
|
+
<button
|
|
8671
|
+
type="button"
|
|
8672
|
+
[class]="navButtonClasses()"
|
|
8673
|
+
[disabled]="pageSig() === 1 || resolvedTotalPages() === 0"
|
|
8674
|
+
(click)="goToFirstPage()"
|
|
8675
|
+
aria-label="Primera página"
|
|
8676
|
+
>
|
|
8677
|
+
<svg
|
|
8678
|
+
width="15"
|
|
8679
|
+
height="15"
|
|
8680
|
+
viewBox="0 0 15 15"
|
|
8681
|
+
fill="none"
|
|
8682
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8683
|
+
>
|
|
8684
|
+
<path
|
|
8685
|
+
d="M6.43312 3.93312C6.6772 3.68904 7.07283 3.68904 7.31691 3.93312C7.56099 4.1772 7.56099 4.57283 7.31691 4.81691L4.6338 7.50001L7.31691 10.1831C7.56099 10.4272 7.56099 10.8228 7.31691 11.0669C7.07283 11.311 6.6772 11.311 6.43312 11.0669L3.30812 7.94191C3.06404 7.69783 3.06404 7.3022 3.30812 7.05812L6.43312 3.93312ZM10.8081 3.93312C11.0522 3.68904 11.4478 3.68904 11.6919 3.93312C11.936 4.1772 11.936 4.57283 11.6919 4.81691L9.0088 7.50001L11.6919 10.1831C11.936 10.4272 11.936 10.8228 11.6919 11.0669C11.4478 11.311 11.0522 11.311 10.8081 11.0669L7.68312 7.94191C7.43904 7.69783 7.43904 7.3022 7.68312 7.05812L10.8081 3.93312Z"
|
|
8686
|
+
fill="#939394"
|
|
8687
|
+
/>
|
|
8688
|
+
</svg>
|
|
8689
|
+
</button>
|
|
8690
|
+
|
|
8691
|
+
<!-- Previous page -->
|
|
8692
|
+
<button
|
|
8693
|
+
type="button"
|
|
8694
|
+
[class]="navButtonClasses()"
|
|
8695
|
+
[disabled]="pageSig() === 1 || resolvedTotalPages() === 0"
|
|
8696
|
+
(click)="goToPreviousPage()"
|
|
8697
|
+
aria-label="Página anterior"
|
|
8698
|
+
>
|
|
8699
|
+
<svg
|
|
8700
|
+
width="14"
|
|
8701
|
+
height="14"
|
|
8702
|
+
viewBox="0 0 14 14"
|
|
8703
|
+
fill="none"
|
|
8704
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8705
|
+
>
|
|
8706
|
+
<path
|
|
8707
|
+
d="M8.33754 3.08754C8.56535 2.85974 8.93461 2.85974 9.16241 3.08754C9.39022 3.31535 9.39022 3.68461 9.16241 3.91241L6.07485 6.99998L9.16241 10.0875C9.39022 10.3153 9.39022 10.6846 9.16241 10.9124C8.93461 11.1402 8.56535 11.1402 8.33754 10.9124L4.83754 7.41241C4.60974 7.18461 4.60974 6.81535 4.83754 6.58754L8.33754 3.08754Z"
|
|
8708
|
+
fill="#939394"
|
|
8709
|
+
/>
|
|
8710
|
+
</svg>
|
|
8711
|
+
</button>
|
|
8712
|
+
|
|
8713
|
+
<!-- Next page -->
|
|
8714
|
+
<button
|
|
8715
|
+
type="button"
|
|
8716
|
+
[class]="navButtonClasses()"
|
|
8717
|
+
[disabled]="
|
|
8718
|
+
pageSig() >= resolvedTotalPages() || resolvedTotalPages() === 0
|
|
8719
|
+
"
|
|
8720
|
+
(click)="goToNextPage()"
|
|
8721
|
+
aria-label="Página siguiente"
|
|
8722
|
+
>
|
|
8723
|
+
<svg
|
|
8724
|
+
width="16"
|
|
8725
|
+
height="16"
|
|
8726
|
+
viewBox="0 0 16 16"
|
|
8727
|
+
fill="none"
|
|
8728
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8729
|
+
>
|
|
8730
|
+
<path
|
|
8731
|
+
d="M5.52864 3.52864C5.78899 3.26829 6.21099 3.26829 6.47134 3.52864L10.4713 7.52864C10.7317 7.78899 10.7317 8.211 10.4713 8.47134L6.47134 12.4713C6.21099 12.7317 5.78899 12.7317 5.52864 12.4713C5.26829 12.211 5.26829 11.789 5.52864 11.5286L9.05728 7.99999L5.52864 4.47134C5.26829 4.21099 5.26829 3.78899 5.52864 3.52864Z"
|
|
8732
|
+
fill="#939394"
|
|
8733
|
+
/>
|
|
8734
|
+
</svg>
|
|
8735
|
+
</button>
|
|
8736
|
+
|
|
8737
|
+
<!-- Last page -->
|
|
8738
|
+
<button
|
|
8739
|
+
type="button"
|
|
8740
|
+
[class]="navButtonClasses()"
|
|
8741
|
+
[disabled]="
|
|
8742
|
+
pageSig() >= resolvedTotalPages() || resolvedTotalPages() === 0
|
|
8743
|
+
"
|
|
8744
|
+
(click)="goToLastPage()"
|
|
8745
|
+
aria-label="Última página"
|
|
8746
|
+
>
|
|
8747
|
+
<svg
|
|
8748
|
+
width="16"
|
|
8749
|
+
height="16"
|
|
8750
|
+
viewBox="0 0 16 16"
|
|
8751
|
+
fill="none"
|
|
8752
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8753
|
+
>
|
|
8754
|
+
<path
|
|
8755
|
+
d="M3.52864 4.19532C3.78899 3.93497 4.21099 3.93497 4.47134 4.19532L7.80468 7.52866C8.06503 7.78901 8.06503 8.21102 7.80468 8.47136L4.47134 11.8047C4.21099 12.065 3.78899 12.065 3.52864 11.8047C3.26829 11.5443 3.26829 11.1223 3.52864 10.862L6.39062 8.00001L3.52864 5.13803C3.26829 4.87768 3.26829 4.45567 3.52864 4.19532ZM8.1953 4.19532C8.45565 3.93497 8.87766 3.93497 9.13801 4.19532L12.4713 7.52866C12.7317 7.78901 12.7317 8.21102 12.4713 8.47136L9.13801 11.8047C8.87766 12.065 8.45565 12.065 8.1953 11.8047C7.93495 11.5443 7.93495 11.1223 8.1953 10.862L11.0573 8.00001L8.1953 5.13803C7.93495 4.87768 7.93495 4.45567 8.1953 4.19532Z"
|
|
8756
|
+
fill="#939394"
|
|
8757
|
+
/>
|
|
8758
|
+
</svg>
|
|
8759
|
+
</button>
|
|
8760
|
+
|
|
8761
|
+
<!-- Refresh -->
|
|
8762
|
+
<button
|
|
8763
|
+
type="button"
|
|
8764
|
+
[class]="refreshButtonClasses()"
|
|
8765
|
+
(click)="onRefresh()"
|
|
8766
|
+
aria-label="Refrescar"
|
|
8767
|
+
>
|
|
8768
|
+
<svg
|
|
8769
|
+
width="14"
|
|
8770
|
+
height="14"
|
|
8771
|
+
viewBox="0 0 14 14"
|
|
8772
|
+
fill="none"
|
|
8773
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8774
|
+
>
|
|
8775
|
+
<path
|
|
8776
|
+
d="M1.16663 12.25V9.33332C1.16663 9.01116 1.42779 8.74999 1.74996 8.74999H4.66663C4.98879 8.74999 5.24996 9.01116 5.24996 9.33332C5.24996 9.65549 4.98879 9.91666 4.66663 9.91666H3.15816L3.47376 10.2322L3.65491 10.3992C4.57867 11.2098 5.76662 11.6612 7.0011 11.6661C8.23836 11.6658 9.42511 11.1749 10.3 10.3C11.1752 9.42487 11.6666 8.23767 11.6666 6.99999C11.6666 6.67782 11.9278 6.41666 12.25 6.41666C12.5721 6.41666 12.8333 6.67782 12.8333 6.99999C12.8333 8.54709 12.2188 10.0309 11.1249 11.1249C10.0309 12.2189 8.54706 12.8333 6.99996 12.8333H6.99768C5.48052 12.8276 4.02054 12.2721 2.88529 11.2759L2.65572 11.064L2.33329 10.7415V12.25C2.33329 12.5722 2.07213 12.8333 1.74996 12.8333C1.42779 12.8333 1.16663 12.5722 1.16663 12.25ZM1.16663 6.99999C1.16663 5.45289 1.78108 3.96903 2.87504 2.87507C3.969 1.78111 5.45286 1.16666 6.99996 1.16666H7.00224L7.30473 1.1752C8.71256 1.24848 10.055 1.79424 11.1146 2.72411L11.3442 2.93603L11.6666 3.25845V1.74999C11.6666 1.42782 11.9278 1.16666 12.25 1.16666C12.5721 1.16666 12.8333 1.42782 12.8333 1.74999V4.66666C12.8333 4.98882 12.5721 5.24999 12.25 5.24999H9.33329C9.01113 5.24999 8.74996 4.98882 8.74996 4.66666C8.74996 4.34449 9.01113 4.08332 9.33329 4.08332H10.8418L10.5262 3.76773L10.345 3.60082C9.4211 2.79008 8.23293 2.33809 6.99825 2.33332C5.76119 2.33378 4.57468 2.82517 3.69991 3.69994C2.82474 4.57511 2.33329 5.76231 2.33329 6.99999C2.33329 7.32216 2.07213 7.58332 1.74996 7.58332C1.42779 7.58332 1.16663 7.32216 1.16663 6.99999Z"
|
|
8777
|
+
fill="#939394"
|
|
8778
|
+
/>
|
|
8779
|
+
</svg>
|
|
8780
|
+
</button>
|
|
8781
|
+
</div>
|
|
8782
|
+
</div>
|
|
8783
|
+
</div>
|
|
8784
|
+
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
8785
|
+
}
|
|
8786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
8787
|
+
type: Component,
|
|
8788
|
+
args: [{ selector: 'bsg-pagination', standalone: true, template: `
|
|
8789
|
+
<div [class]="containerClasses()">
|
|
8790
|
+
<!-- Left section: Current page -->
|
|
8791
|
+
<div [class]="sectionLeftClasses()">
|
|
8792
|
+
<span [class]="labelClasses()">Página</span>
|
|
8793
|
+
<input
|
|
8794
|
+
type="number"
|
|
8795
|
+
[class]="inputClasses()"
|
|
8796
|
+
[value]="pageInputValue()"
|
|
8797
|
+
[min]="1"
|
|
8798
|
+
[max]="resolvedTotalPages()"
|
|
8799
|
+
(focus)="onPageInputFocus()"
|
|
8800
|
+
(input)="onPageInputChange($event)"
|
|
8801
|
+
(keydown.enter)="onPageInputBlur()"
|
|
8802
|
+
(blur)="onPageInputBlur()"
|
|
8803
|
+
[disabled]="resolvedTotalPages() === 0"
|
|
8804
|
+
/>
|
|
8805
|
+
<span [class]="labelClasses()">de {{ resolvedTotalPages() }}</span>
|
|
8806
|
+
</div>
|
|
8807
|
+
|
|
8808
|
+
<!-- Middle section: Page size selector -->
|
|
8809
|
+
<div [class]="sectionMiddleClasses()">
|
|
8810
|
+
<div [class]="selectWrapperClasses()">
|
|
8811
|
+
<select
|
|
8812
|
+
[class]="selectClasses()"
|
|
8813
|
+
[value]="pageSizeSig()"
|
|
8814
|
+
(change)="onPageSizeSelectChange($event)"
|
|
8815
|
+
>
|
|
8816
|
+
@for (option of pageSizeOptions(); track option) {
|
|
8817
|
+
<option [value]="option">{{ option }}</option>
|
|
8818
|
+
}
|
|
8819
|
+
</select>
|
|
8820
|
+
|
|
8821
|
+
<svg
|
|
8822
|
+
[class]="selectIconClasses()"
|
|
8823
|
+
width="15"
|
|
8824
|
+
height="15"
|
|
8825
|
+
viewBox="0 0 15 15"
|
|
8826
|
+
fill="none"
|
|
8827
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8828
|
+
>
|
|
8829
|
+
<path
|
|
8830
|
+
d="M10.8081 5.18312C11.0522 4.93904 11.4478 4.93904 11.6919 5.18312C11.936 5.4272 11.936 5.82283 11.6919 6.06691L7.94191 9.81691C7.69783 10.061 7.3022 10.061 7.05812 9.81691L3.30812 6.06691C3.06404 5.82283 3.06404 5.4272 3.30812 5.18312C3.5522 4.93904 3.94783 4.93904 4.19191 5.18312L7.50001 8.49122L10.8081 5.18312Z"
|
|
8831
|
+
fill="#848485"
|
|
8832
|
+
/>
|
|
8833
|
+
</svg>
|
|
8834
|
+
</div>
|
|
8835
|
+
<span [class]="labelClasses()">ítems por página</span>
|
|
8836
|
+
</div>
|
|
8837
|
+
|
|
8838
|
+
<!-- Right section: Range label and navigation -->
|
|
8839
|
+
<div [class]="sectionRightClasses()">
|
|
8840
|
+
<span [class]="rangeLabelClasses()">{{ computedRangeLabel() }}</span>
|
|
8841
|
+
|
|
8842
|
+
<div [class]="navControlsClasses()">
|
|
8843
|
+
<!-- First page -->
|
|
8844
|
+
<button
|
|
8845
|
+
type="button"
|
|
8846
|
+
[class]="navButtonClasses()"
|
|
8847
|
+
[disabled]="pageSig() === 1 || resolvedTotalPages() === 0"
|
|
8848
|
+
(click)="goToFirstPage()"
|
|
8849
|
+
aria-label="Primera página"
|
|
8850
|
+
>
|
|
8851
|
+
<svg
|
|
8852
|
+
width="15"
|
|
8853
|
+
height="15"
|
|
8854
|
+
viewBox="0 0 15 15"
|
|
8855
|
+
fill="none"
|
|
8856
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8857
|
+
>
|
|
8858
|
+
<path
|
|
8859
|
+
d="M6.43312 3.93312C6.6772 3.68904 7.07283 3.68904 7.31691 3.93312C7.56099 4.1772 7.56099 4.57283 7.31691 4.81691L4.6338 7.50001L7.31691 10.1831C7.56099 10.4272 7.56099 10.8228 7.31691 11.0669C7.07283 11.311 6.6772 11.311 6.43312 11.0669L3.30812 7.94191C3.06404 7.69783 3.06404 7.3022 3.30812 7.05812L6.43312 3.93312ZM10.8081 3.93312C11.0522 3.68904 11.4478 3.68904 11.6919 3.93312C11.936 4.1772 11.936 4.57283 11.6919 4.81691L9.0088 7.50001L11.6919 10.1831C11.936 10.4272 11.936 10.8228 11.6919 11.0669C11.4478 11.311 11.0522 11.311 10.8081 11.0669L7.68312 7.94191C7.43904 7.69783 7.43904 7.3022 7.68312 7.05812L10.8081 3.93312Z"
|
|
8860
|
+
fill="#939394"
|
|
8861
|
+
/>
|
|
8862
|
+
</svg>
|
|
8863
|
+
</button>
|
|
8864
|
+
|
|
8865
|
+
<!-- Previous page -->
|
|
8866
|
+
<button
|
|
8867
|
+
type="button"
|
|
8868
|
+
[class]="navButtonClasses()"
|
|
8869
|
+
[disabled]="pageSig() === 1 || resolvedTotalPages() === 0"
|
|
8870
|
+
(click)="goToPreviousPage()"
|
|
8871
|
+
aria-label="Página anterior"
|
|
8872
|
+
>
|
|
8873
|
+
<svg
|
|
8874
|
+
width="14"
|
|
8875
|
+
height="14"
|
|
8876
|
+
viewBox="0 0 14 14"
|
|
8877
|
+
fill="none"
|
|
8878
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8879
|
+
>
|
|
8880
|
+
<path
|
|
8881
|
+
d="M8.33754 3.08754C8.56535 2.85974 8.93461 2.85974 9.16241 3.08754C9.39022 3.31535 9.39022 3.68461 9.16241 3.91241L6.07485 6.99998L9.16241 10.0875C9.39022 10.3153 9.39022 10.6846 9.16241 10.9124C8.93461 11.1402 8.56535 11.1402 8.33754 10.9124L4.83754 7.41241C4.60974 7.18461 4.60974 6.81535 4.83754 6.58754L8.33754 3.08754Z"
|
|
8882
|
+
fill="#939394"
|
|
8883
|
+
/>
|
|
8884
|
+
</svg>
|
|
8885
|
+
</button>
|
|
8886
|
+
|
|
8887
|
+
<!-- Next page -->
|
|
8888
|
+
<button
|
|
8889
|
+
type="button"
|
|
8890
|
+
[class]="navButtonClasses()"
|
|
8891
|
+
[disabled]="
|
|
8892
|
+
pageSig() >= resolvedTotalPages() || resolvedTotalPages() === 0
|
|
8893
|
+
"
|
|
8894
|
+
(click)="goToNextPage()"
|
|
8895
|
+
aria-label="Página siguiente"
|
|
8896
|
+
>
|
|
8897
|
+
<svg
|
|
8898
|
+
width="16"
|
|
8899
|
+
height="16"
|
|
8900
|
+
viewBox="0 0 16 16"
|
|
8901
|
+
fill="none"
|
|
8902
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8903
|
+
>
|
|
8904
|
+
<path
|
|
8905
|
+
d="M5.52864 3.52864C5.78899 3.26829 6.21099 3.26829 6.47134 3.52864L10.4713 7.52864C10.7317 7.78899 10.7317 8.211 10.4713 8.47134L6.47134 12.4713C6.21099 12.7317 5.78899 12.7317 5.52864 12.4713C5.26829 12.211 5.26829 11.789 5.52864 11.5286L9.05728 7.99999L5.52864 4.47134C5.26829 4.21099 5.26829 3.78899 5.52864 3.52864Z"
|
|
8906
|
+
fill="#939394"
|
|
8907
|
+
/>
|
|
8908
|
+
</svg>
|
|
8909
|
+
</button>
|
|
8910
|
+
|
|
8911
|
+
<!-- Last page -->
|
|
8912
|
+
<button
|
|
8913
|
+
type="button"
|
|
8914
|
+
[class]="navButtonClasses()"
|
|
8915
|
+
[disabled]="
|
|
8916
|
+
pageSig() >= resolvedTotalPages() || resolvedTotalPages() === 0
|
|
8917
|
+
"
|
|
8918
|
+
(click)="goToLastPage()"
|
|
8919
|
+
aria-label="Última página"
|
|
8920
|
+
>
|
|
8921
|
+
<svg
|
|
8922
|
+
width="16"
|
|
8923
|
+
height="16"
|
|
8924
|
+
viewBox="0 0 16 16"
|
|
8925
|
+
fill="none"
|
|
8926
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8927
|
+
>
|
|
8928
|
+
<path
|
|
8929
|
+
d="M3.52864 4.19532C3.78899 3.93497 4.21099 3.93497 4.47134 4.19532L7.80468 7.52866C8.06503 7.78901 8.06503 8.21102 7.80468 8.47136L4.47134 11.8047C4.21099 12.065 3.78899 12.065 3.52864 11.8047C3.26829 11.5443 3.26829 11.1223 3.52864 10.862L6.39062 8.00001L3.52864 5.13803C3.26829 4.87768 3.26829 4.45567 3.52864 4.19532ZM8.1953 4.19532C8.45565 3.93497 8.87766 3.93497 9.13801 4.19532L12.4713 7.52866C12.7317 7.78901 12.7317 8.21102 12.4713 8.47136L9.13801 11.8047C8.87766 12.065 8.45565 12.065 8.1953 11.8047C7.93495 11.5443 7.93495 11.1223 8.1953 10.862L11.0573 8.00001L8.1953 5.13803C7.93495 4.87768 7.93495 4.45567 8.1953 4.19532Z"
|
|
8930
|
+
fill="#939394"
|
|
8931
|
+
/>
|
|
8932
|
+
</svg>
|
|
8933
|
+
</button>
|
|
8934
|
+
|
|
8935
|
+
<!-- Refresh -->
|
|
8936
|
+
<button
|
|
8937
|
+
type="button"
|
|
8938
|
+
[class]="refreshButtonClasses()"
|
|
8939
|
+
(click)="onRefresh()"
|
|
8940
|
+
aria-label="Refrescar"
|
|
8941
|
+
>
|
|
8942
|
+
<svg
|
|
8943
|
+
width="14"
|
|
8944
|
+
height="14"
|
|
8945
|
+
viewBox="0 0 14 14"
|
|
8946
|
+
fill="none"
|
|
8947
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8948
|
+
>
|
|
8949
|
+
<path
|
|
8950
|
+
d="M1.16663 12.25V9.33332C1.16663 9.01116 1.42779 8.74999 1.74996 8.74999H4.66663C4.98879 8.74999 5.24996 9.01116 5.24996 9.33332C5.24996 9.65549 4.98879 9.91666 4.66663 9.91666H3.15816L3.47376 10.2322L3.65491 10.3992C4.57867 11.2098 5.76662 11.6612 7.0011 11.6661C8.23836 11.6658 9.42511 11.1749 10.3 10.3C11.1752 9.42487 11.6666 8.23767 11.6666 6.99999C11.6666 6.67782 11.9278 6.41666 12.25 6.41666C12.5721 6.41666 12.8333 6.67782 12.8333 6.99999C12.8333 8.54709 12.2188 10.0309 11.1249 11.1249C10.0309 12.2189 8.54706 12.8333 6.99996 12.8333H6.99768C5.48052 12.8276 4.02054 12.2721 2.88529 11.2759L2.65572 11.064L2.33329 10.7415V12.25C2.33329 12.5722 2.07213 12.8333 1.74996 12.8333C1.42779 12.8333 1.16663 12.5722 1.16663 12.25ZM1.16663 6.99999C1.16663 5.45289 1.78108 3.96903 2.87504 2.87507C3.969 1.78111 5.45286 1.16666 6.99996 1.16666H7.00224L7.30473 1.1752C8.71256 1.24848 10.055 1.79424 11.1146 2.72411L11.3442 2.93603L11.6666 3.25845V1.74999C11.6666 1.42782 11.9278 1.16666 12.25 1.16666C12.5721 1.16666 12.8333 1.42782 12.8333 1.74999V4.66666C12.8333 4.98882 12.5721 5.24999 12.25 5.24999H9.33329C9.01113 5.24999 8.74996 4.98882 8.74996 4.66666C8.74996 4.34449 9.01113 4.08332 9.33329 4.08332H10.8418L10.5262 3.76773L10.345 3.60082C9.4211 2.79008 8.23293 2.33809 6.99825 2.33332C5.76119 2.33378 4.57468 2.82517 3.69991 3.69994C2.82474 4.57511 2.33329 5.76231 2.33329 6.99999C2.33329 7.32216 2.07213 7.58332 1.74996 7.58332C1.42779 7.58332 1.16663 7.32216 1.16663 6.99999Z"
|
|
8951
|
+
fill="#939394"
|
|
8952
|
+
/>
|
|
8953
|
+
</svg>
|
|
8954
|
+
</button>
|
|
8955
|
+
</div>
|
|
8956
|
+
</div>
|
|
8957
|
+
</div>
|
|
8958
|
+
`, styles: [":host{display:block}\n"] }]
|
|
8959
|
+
}], ctorParameters: () => [], propDecorators: { currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], rangeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeLabel", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], pageSizeChange: [{ type: i0.Output, args: ["pageSizeChange"] }], paginationChange: [{ type: i0.Output, args: ["paginationChange"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
|
|
8960
|
+
|
|
8961
|
+
/**
|
|
8962
|
+
* Separator variants
|
|
8963
|
+
*
|
|
8964
|
+
* Controls the visual separator line between content sections
|
|
8965
|
+
*/
|
|
8966
|
+
const separatorVariants = cva(clsx(
|
|
8967
|
+
// Base
|
|
8968
|
+
'shrink-0',
|
|
8969
|
+
// Background color (semantic token)
|
|
8970
|
+
'bg-border',
|
|
8971
|
+
// Reset
|
|
8972
|
+
'border-none'), {
|
|
8973
|
+
variants: {
|
|
8974
|
+
orientation: {
|
|
8975
|
+
horizontal: 'w-full h-px',
|
|
8976
|
+
vertical: 'h-full w-px self-stretch',
|
|
8977
|
+
},
|
|
8978
|
+
},
|
|
8979
|
+
defaultVariants: {
|
|
8980
|
+
orientation: 'horizontal',
|
|
8981
|
+
},
|
|
8982
|
+
});
|
|
8983
|
+
|
|
8984
|
+
/**
|
|
8985
|
+
* Separator Component
|
|
8986
|
+
*
|
|
8987
|
+
* A visual divider between content sections.
|
|
8988
|
+
*
|
|
8989
|
+
* Usage:
|
|
8990
|
+
* ```html
|
|
8991
|
+
* <bsg-separator />
|
|
8992
|
+
* <bsg-separator orientation="vertical" />
|
|
8993
|
+
* ```
|
|
8994
|
+
*/
|
|
8995
|
+
class SeparatorComponent {
|
|
8996
|
+
/** Separator orientation */
|
|
8997
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
8998
|
+
/** Additional CSS classes */
|
|
8999
|
+
className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
|
|
9000
|
+
/** Computed separator classes */
|
|
9001
|
+
separatorClasses = computed(() => clsx(separatorVariants({ orientation: this.orientation() }), this.className()), ...(ngDevMode ? [{ debugName: "separatorClasses" }] : []));
|
|
9002
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9003
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: SeparatorComponent, isStandalone: true, selector: "bsg-separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
9004
|
+
<div
|
|
9005
|
+
[class]="separatorClasses()"
|
|
9006
|
+
role="separator"
|
|
9007
|
+
[attr.aria-orientation]="orientation()"
|
|
9008
|
+
></div>
|
|
9009
|
+
`, isInline: true, styles: [":host{display:block}:host([orientation=\"vertical\"]){display:inline-block;height:100%}\n"] });
|
|
9010
|
+
}
|
|
9011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SeparatorComponent, decorators: [{
|
|
9012
|
+
type: Component,
|
|
9013
|
+
args: [{ selector: 'bsg-separator', standalone: true, template: `
|
|
9014
|
+
<div
|
|
9015
|
+
[class]="separatorClasses()"
|
|
9016
|
+
role="separator"
|
|
9017
|
+
[attr.aria-orientation]="orientation()"
|
|
9018
|
+
></div>
|
|
9019
|
+
`, styles: [":host{display:block}:host([orientation=\"vertical\"]){display:inline-block;height:100%}\n"] }]
|
|
9020
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
|
|
9021
|
+
|
|
9022
|
+
/**
|
|
9023
|
+
* @deprecated Use the new composable table components (TableComponent, TableHeader, TableBody, etc.) instead.
|
|
9024
|
+
* This component is kept for backwards compatibility.
|
|
9025
|
+
*/
|
|
9026
|
+
class TableContainerComponent {
|
|
9027
|
+
/** Container title */
|
|
9028
|
+
title = 'Título del Contenedor';
|
|
9029
|
+
/** Display variant */
|
|
9030
|
+
variant = 'table-basic';
|
|
9031
|
+
/** Header action button (e.g., "Nuevo mensaje") */
|
|
9032
|
+
headerAction;
|
|
9033
|
+
// Collapsible mode inputs
|
|
9034
|
+
isCollapsible = false;
|
|
9035
|
+
isExpanded = true;
|
|
9036
|
+
disableExpansion = false;
|
|
9037
|
+
// Table variant inputs
|
|
9038
|
+
tableColumns = [];
|
|
9039
|
+
tableRows = [];
|
|
9040
|
+
tablePagination;
|
|
9041
|
+
// Table-actions specific
|
|
9042
|
+
showActionsColumn = true;
|
|
9043
|
+
actionsColumnLabel = 'Acciones';
|
|
9044
|
+
actionsColumnWidth = '200px';
|
|
9045
|
+
// List variant inputs
|
|
9046
|
+
listItems = [];
|
|
9047
|
+
// Tabs variant inputs
|
|
9048
|
+
tabs = [];
|
|
9049
|
+
activeTabIndex = 0;
|
|
9050
|
+
tabsPagination = [];
|
|
9051
|
+
// Events
|
|
9052
|
+
headerActionClick = new EventEmitter();
|
|
9053
|
+
collapseToggle = new EventEmitter();
|
|
9054
|
+
tabChange = new EventEmitter();
|
|
9055
|
+
tablePageChange = new EventEmitter();
|
|
9056
|
+
tablePageSizeChange = new EventEmitter();
|
|
9057
|
+
tableRefresh = new EventEmitter();
|
|
9058
|
+
tabPageChange = new EventEmitter();
|
|
9059
|
+
tabPageSizeChange = new EventEmitter();
|
|
9060
|
+
tabRefresh = new EventEmitter();
|
|
9061
|
+
rowAction = new EventEmitter();
|
|
9062
|
+
get containerClasses() {
|
|
9063
|
+
const classes = [`table-${this.variant}`];
|
|
9064
|
+
if (this.isCollapsible && !this.isExpanded) {
|
|
9065
|
+
classes.push('table-collapsed');
|
|
9066
|
+
}
|
|
9067
|
+
return classes;
|
|
9068
|
+
}
|
|
9069
|
+
toggleCollapse() {
|
|
9070
|
+
this.isExpanded = !this.isExpanded;
|
|
9071
|
+
this.collapseToggle.emit(this.isExpanded);
|
|
9072
|
+
}
|
|
9073
|
+
onHeaderAction() {
|
|
9074
|
+
this.headerActionClick.emit();
|
|
9075
|
+
}
|
|
9076
|
+
onTabChange(index) {
|
|
9077
|
+
this.activeTabIndex = index;
|
|
9078
|
+
this.tabChange.emit(index);
|
|
9079
|
+
}
|
|
9080
|
+
onTablePageChange(page) {
|
|
9081
|
+
this.tablePageChange.emit(page);
|
|
9082
|
+
}
|
|
9083
|
+
onTablePageSizeChange(pageSize) {
|
|
9084
|
+
this.tablePageSizeChange.emit(pageSize);
|
|
9085
|
+
}
|
|
9086
|
+
onTableRefresh() {
|
|
9087
|
+
this.tableRefresh.emit();
|
|
9088
|
+
}
|
|
9089
|
+
onTabPageChange(tabIndex, page) {
|
|
9090
|
+
this.tabPageChange.emit({ tabIndex, page });
|
|
9091
|
+
}
|
|
9092
|
+
onTabPageSizeChange(tabIndex, pageSize) {
|
|
9093
|
+
this.tabPageSizeChange.emit({ tabIndex, pageSize });
|
|
9094
|
+
}
|
|
9095
|
+
onTabRefresh(tabIndex) {
|
|
9096
|
+
this.tabRefresh.emit(tabIndex);
|
|
9097
|
+
}
|
|
9098
|
+
onRowAction(rowIndex, action) {
|
|
9099
|
+
this.rowAction.emit({ rowIndex, action });
|
|
9100
|
+
if (action.onClick) {
|
|
9101
|
+
action.onClick();
|
|
9102
|
+
}
|
|
9103
|
+
}
|
|
9104
|
+
getActionVariant(actionVariant) {
|
|
9105
|
+
switch (actionVariant) {
|
|
9106
|
+
case 'approve':
|
|
9107
|
+
return 'default'; // Green variant
|
|
9108
|
+
case 'reject':
|
|
9109
|
+
return 'destructive'; // Red variant
|
|
9110
|
+
case 'view':
|
|
9111
|
+
return 'ghost'; // Light blue variant
|
|
9112
|
+
default:
|
|
9113
|
+
return 'default';
|
|
9114
|
+
}
|
|
9115
|
+
}
|
|
9116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TableContainerComponent, isStandalone: true, selector: "bsg-table-container", inputs: { title: "title", variant: "variant", headerAction: "headerAction", isCollapsible: "isCollapsible", isExpanded: "isExpanded", disableExpansion: "disableExpansion", tableColumns: "tableColumns", tableRows: "tableRows", tablePagination: "tablePagination", showActionsColumn: "showActionsColumn", actionsColumnLabel: "actionsColumnLabel", actionsColumnWidth: "actionsColumnWidth", listItems: "listItems", tabs: "tabs", activeTabIndex: "activeTabIndex", tabsPagination: "tabsPagination" }, outputs: { headerActionClick: "headerActionClick", collapseToggle: "collapseToggle", tabChange: "tabChange", tablePageChange: "tablePageChange", tablePageSizeChange: "tablePageSizeChange", tableRefresh: "tableRefresh", tabPageChange: "tabPageChange", tabPageSizeChange: "tabPageSizeChange", tabRefresh: "tabRefresh", rowAction: "rowAction" }, ngImport: i0, template: `
|
|
9118
|
+
<div class="table" [class]="containerClasses">
|
|
9119
|
+
<!-- Header -->
|
|
9120
|
+
<div
|
|
9121
|
+
class="table-header"
|
|
9122
|
+
[class.table-header-collapsible]="isCollapsible"
|
|
9123
|
+
>
|
|
9124
|
+
<!-- Icon -->
|
|
9125
|
+
@if (!isCollapsible) {
|
|
9126
|
+
<div class="table-icon">
|
|
9127
|
+
<svg
|
|
9128
|
+
width="28"
|
|
9129
|
+
height="28"
|
|
9130
|
+
viewBox="0 0 28 28"
|
|
9131
|
+
fill="none"
|
|
9132
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9133
|
+
>
|
|
9134
|
+
<circle cx="14" cy="14" r="14" fill="#2563EB" />
|
|
9135
|
+
</svg>
|
|
9136
|
+
<svg
|
|
9137
|
+
class="table-check-icon"
|
|
9138
|
+
width="15"
|
|
9139
|
+
height="15"
|
|
9140
|
+
viewBox="0 0 15 15"
|
|
9141
|
+
fill="none"
|
|
9142
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9143
|
+
>
|
|
9144
|
+
<g clip-path="url(#clip0_check)">
|
|
9145
|
+
<path
|
|
9146
|
+
d="M6.43155 0.706459C7.98492 0.461733 9.5751 0.757369 10.9372 1.54325C11.2361 1.71571 11.339 2.09758 11.1667 2.39652C10.9942 2.6955 10.6118 2.79791 10.3128 2.6254C9.19841 1.98244 7.89713 1.74102 6.62625 1.9412C5.35534 2.14143 4.19126 2.77142 3.32852 3.72587C2.4658 4.68036 1.95624 5.90193 1.88504 7.18656C1.81386 8.47123 2.18527 9.74182 2.93729 10.7858C3.6893 11.8297 4.77673 12.5845 6.01773 12.9239C7.25873 13.2632 8.57877 13.167 9.75736 12.651C10.936 12.1351 11.9023 11.2303 12.4948 10.0882C13.0872 8.94613 13.2698 7.63546 13.013 6.37479C12.9441 6.03664 13.1625 5.7065 13.5006 5.63749C13.8389 5.56857 14.169 5.78696 14.2379 6.12516C14.5519 7.66605 14.328 9.26786 13.6038 10.6637C12.8796 12.0596 11.699 13.1654 10.2585 13.7961C8.818 14.4266 7.20487 14.5441 5.68814 14.1293C4.17132 13.7145 2.84201 12.7923 1.92288 11.5164C1.00377 10.2404 0.549897 8.68771 0.636872 7.11759C0.72387 5.54744 1.34693 4.05449 2.4014 2.88786C3.45585 1.7213 4.87821 0.951184 6.43155 0.706459ZM13.3084 2.05778C13.5525 1.81398 13.9482 1.81382 14.1922 2.05778C14.4362 2.30185 14.4362 2.6981 14.1922 2.94218L7.94217 9.19218C7.69818 9.43613 7.30247 9.43597 7.05838 9.19218L5.18338 7.31718C4.9393 7.0731 4.9393 6.67686 5.18338 6.43278C5.42747 6.18898 5.82318 6.18882 6.06717 6.43278L7.50028 7.86588L13.3084 2.05778Z"
|
|
9147
|
+
fill="white"
|
|
9148
|
+
/>
|
|
9149
|
+
</g>
|
|
9150
|
+
<defs>
|
|
9151
|
+
<clipPath id="clip0_check">
|
|
9152
|
+
<rect width="15" height="15" fill="white" />
|
|
9153
|
+
</clipPath>
|
|
9154
|
+
</defs>
|
|
9155
|
+
</svg>
|
|
9156
|
+
</div>
|
|
9157
|
+
}
|
|
9158
|
+
|
|
9159
|
+
<!-- Title -->
|
|
9160
|
+
<h2 class="table-title">{{ title }}</h2>
|
|
9161
|
+
|
|
9162
|
+
<!-- Header Actions (e.g., "Nuevo mensaje" button) -->
|
|
9163
|
+
@if (headerAction && !isCollapsible) {
|
|
9164
|
+
<div class="table-header-actions">
|
|
9165
|
+
<bsg-button
|
|
9166
|
+
[label]="headerAction.label"
|
|
9167
|
+
[variant]="headerAction.variant || 'default'"
|
|
9168
|
+
[size]="headerAction.size || 'md'"
|
|
9169
|
+
(onClick)="onHeaderAction()"
|
|
9170
|
+
></bsg-button>
|
|
9171
|
+
</div>
|
|
9172
|
+
}
|
|
9173
|
+
|
|
9174
|
+
<!-- Chevron Icon for Collapsible Mode (right side) -->
|
|
9175
|
+
@if (isCollapsible) {
|
|
9176
|
+
<button
|
|
9177
|
+
type="button"
|
|
9178
|
+
class="table-collapse-chevron"
|
|
9179
|
+
[class.table-chevron-expanded]="isExpanded"
|
|
9180
|
+
(click)="toggleCollapse()"
|
|
9181
|
+
[attr.aria-expanded]="isExpanded"
|
|
9182
|
+
[attr.aria-label]="isExpanded ? 'Contraer' : 'Expandir'"
|
|
9183
|
+
>
|
|
9184
|
+
<svg
|
|
9185
|
+
width="24"
|
|
9186
|
+
height="24"
|
|
9187
|
+
viewBox="0 0 24 24"
|
|
9188
|
+
fill="none"
|
|
9189
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9190
|
+
>
|
|
9191
|
+
<path
|
|
9192
|
+
d="M11.3691 8.22462C11.7618 7.90427 12.3408 7.92686 12.707 8.29298L18.707 14.293C19.0975 14.6835 19.0975 15.3165 18.707 15.707C18.3164 16.0976 17.6834 16.0976 17.2929 15.707L11.9999 10.4141L6.70696 15.707C6.31643 16.0976 5.68342 16.0976 5.29289 15.707C4.90237 15.3165 4.90237 14.6835 5.29289 14.293L11.2929 8.29298L11.3691 8.22462Z"
|
|
9193
|
+
fill="currentColor"
|
|
9194
|
+
/>
|
|
9195
|
+
</svg>
|
|
9196
|
+
</button>
|
|
9197
|
+
}
|
|
9198
|
+
</div>
|
|
9199
|
+
|
|
9200
|
+
<!-- Body -->
|
|
9201
|
+
<div class="table-body">
|
|
9202
|
+
<!-- Table Variants (table-basic, table-actions) -->
|
|
9203
|
+
@if (variant === 'table-basic' || variant === 'table-actions') {
|
|
9204
|
+
<div class="table-content">
|
|
9205
|
+
<!-- Table Header -->
|
|
9206
|
+
<div class="table-content-header">
|
|
9207
|
+
@for (column of tableColumns; track column.key) {
|
|
9208
|
+
<div
|
|
9209
|
+
class="table-header-cell"
|
|
9210
|
+
[style.width]="column.width || 'auto'"
|
|
9211
|
+
>
|
|
9212
|
+
{{ column.label }}
|
|
9213
|
+
</div>
|
|
9214
|
+
}
|
|
9215
|
+
@if (variant === 'table-actions' && showActionsColumn) {
|
|
9216
|
+
<div
|
|
9217
|
+
class="table-header-cell table-actions-header"
|
|
9218
|
+
[style.width]="actionsColumnWidth || 'auto'"
|
|
9219
|
+
>
|
|
9220
|
+
{{ actionsColumnLabel || 'Acciones' }}
|
|
9221
|
+
</div>
|
|
9222
|
+
}
|
|
9223
|
+
</div>
|
|
9224
|
+
|
|
9225
|
+
<bsg-separator></bsg-separator>
|
|
9226
|
+
|
|
9227
|
+
<!-- Table Rows -->
|
|
9228
|
+
<div class="table-content-body">
|
|
9229
|
+
@for (row of tableRows; track $index; let i = $index) {
|
|
9230
|
+
<div class="table-row">
|
|
9231
|
+
@for (column of tableColumns; track column.key) {
|
|
9232
|
+
<div
|
|
9233
|
+
class="table-cell"
|
|
9234
|
+
[style.width]="column.width || 'auto'"
|
|
9235
|
+
>
|
|
9236
|
+
<!-- Render badge if specified -->
|
|
9237
|
+
@if (row[column.key + '_badge']) {
|
|
9238
|
+
<bsg-badge
|
|
9239
|
+
[variant]="
|
|
9240
|
+
row[column.key + '_badge_variant'] || 'default'
|
|
9241
|
+
"
|
|
9242
|
+
[value]="row[column.key]"
|
|
9243
|
+
[size]="row[column.key + '_badge_size'] || 'default'"
|
|
9244
|
+
></bsg-badge>
|
|
9245
|
+
} @else if (row[column.key + '_label']) {
|
|
9246
|
+
<!-- Render label if specified -->
|
|
9247
|
+
<bsg-label [text]="row[column.key]"></bsg-label>
|
|
9248
|
+
} @else {
|
|
9249
|
+
<!-- Render plain text otherwise -->
|
|
9250
|
+
<span>{{ row[column.key] }}</span>
|
|
9251
|
+
}
|
|
9252
|
+
</div>
|
|
9253
|
+
}
|
|
9254
|
+
|
|
9255
|
+
<!-- Actions Column (for table-actions variant) -->
|
|
9256
|
+
@if (variant === 'table-actions' && row['actions']) {
|
|
9257
|
+
<div
|
|
9258
|
+
class="table-cell table-actions-cell"
|
|
9259
|
+
[style.width]="actionsColumnWidth || 'auto'"
|
|
9260
|
+
>
|
|
9261
|
+
<div class="table-actions">
|
|
9262
|
+
@for (action of row['actions']; track $index) {
|
|
9263
|
+
<bsg-button
|
|
9264
|
+
[label]="action.label"
|
|
9265
|
+
[variant]="getActionVariant(action.variant)"
|
|
9266
|
+
[size]="'md'"
|
|
9267
|
+
[shape]="'rectangular'"
|
|
9268
|
+
(onClick)="onRowAction(i, action)"
|
|
9269
|
+
class="table-action-btn"
|
|
9270
|
+
></bsg-button>
|
|
9271
|
+
}
|
|
9272
|
+
</div>
|
|
9273
|
+
</div>
|
|
9274
|
+
}
|
|
9275
|
+
</div>
|
|
9276
|
+
}
|
|
9277
|
+
</div>
|
|
9278
|
+
|
|
9279
|
+
<!-- Pagination -->
|
|
9280
|
+
@if (tablePagination) {
|
|
9281
|
+
<div class="table-pagination">
|
|
9282
|
+
<bsg-separator></bsg-separator>
|
|
9283
|
+
<bsg-pagination
|
|
9284
|
+
[currentPage]="tablePagination.currentPage"
|
|
9285
|
+
[totalPages]="tablePagination.totalPages"
|
|
9286
|
+
[pageSize]="tablePagination.pageSize"
|
|
9287
|
+
[pageSizeOptions]="tablePagination.pageSizeOptions"
|
|
9288
|
+
[totalItems]="tablePagination.totalItems"
|
|
9289
|
+
[rangeLabel]="tablePagination.rangeLabel"
|
|
9290
|
+
(pageChange)="onTablePageChange($event)"
|
|
9291
|
+
(pageSizeChange)="onTablePageSizeChange($event)"
|
|
9292
|
+
(refresh)="onTableRefresh()"
|
|
9293
|
+
></bsg-pagination>
|
|
9294
|
+
</div>
|
|
9295
|
+
}
|
|
9296
|
+
</div>
|
|
9297
|
+
}
|
|
9298
|
+
|
|
9299
|
+
<!-- List Variant (list-content) -->
|
|
9300
|
+
@if (variant === 'list-content') {
|
|
9301
|
+
<div class="table-list">
|
|
9302
|
+
@for (item of listItems; track $index; let i = $index) {
|
|
9303
|
+
<div class="table-list-item">
|
|
9304
|
+
<div class="table-list-number">
|
|
9305
|
+
<svg
|
|
9306
|
+
width="27"
|
|
9307
|
+
height="26"
|
|
9308
|
+
viewBox="0 0 27 26"
|
|
9309
|
+
fill="none"
|
|
9310
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9311
|
+
>
|
|
9312
|
+
<ellipse
|
|
9313
|
+
cx="13.5"
|
|
9314
|
+
cy="13"
|
|
9315
|
+
rx="13.5"
|
|
9316
|
+
ry="13"
|
|
9317
|
+
fill="#2563EB"
|
|
9318
|
+
/>
|
|
9319
|
+
</svg>
|
|
9320
|
+
<span class="table-list-number-text">{{ i + 1 }}</span>
|
|
9321
|
+
</div>
|
|
9322
|
+
<div class="table-list-text">{{ item.text }}</div>
|
|
9323
|
+
</div>
|
|
9324
|
+
}
|
|
9325
|
+
</div>
|
|
9326
|
+
}
|
|
9327
|
+
|
|
9328
|
+
<!-- Tabs Variant (table-tabs) -->
|
|
9329
|
+
@if (variant === 'table-tabs') {
|
|
9330
|
+
<div class="table-tabs-wrapper">
|
|
9331
|
+
<!-- Tab Navigation -->
|
|
9332
|
+
<bsg-tab-navigation
|
|
9333
|
+
[tabs]="tabs"
|
|
9334
|
+
[activeIndex]="activeTabIndex"
|
|
9335
|
+
[size]="'md'"
|
|
9336
|
+
[variant]="'text'"
|
|
9337
|
+
(tabChange)="onTabChange($event)"
|
|
9338
|
+
></bsg-tab-navigation>
|
|
9339
|
+
|
|
9340
|
+
<!-- Tab Content -->
|
|
9341
|
+
<div class="table-tab-content">
|
|
9342
|
+
@for (tab of tabs; track $index; let i = $index) {
|
|
9343
|
+
@if (i === activeTabIndex && tab.tableData) {
|
|
9344
|
+
<div class="table-content">
|
|
9345
|
+
<!-- Table Header -->
|
|
9346
|
+
<div class="table-content-header">
|
|
9347
|
+
@for (column of tab.tableData.columns; track column.key) {
|
|
9348
|
+
<div
|
|
9349
|
+
class="table-header-cell"
|
|
9350
|
+
[style.width]="column.width || 'auto'"
|
|
9351
|
+
>
|
|
9352
|
+
{{ column.label }}
|
|
9353
|
+
</div>
|
|
9354
|
+
}
|
|
9355
|
+
</div>
|
|
9356
|
+
|
|
9357
|
+
<bsg-separator></bsg-separator>
|
|
9358
|
+
|
|
9359
|
+
<!-- Table Rows -->
|
|
9360
|
+
<div class="table-content-body">
|
|
9361
|
+
@for (row of tab.tableData.rows; track $index) {
|
|
9362
|
+
<div class="table-row">
|
|
9363
|
+
@for (
|
|
9364
|
+
column of tab.tableData.columns;
|
|
9365
|
+
track column.key
|
|
9366
|
+
) {
|
|
9367
|
+
<div
|
|
9368
|
+
class="table-cell"
|
|
9369
|
+
[style.width]="column.width || 'auto'"
|
|
9370
|
+
>
|
|
9371
|
+
<!-- Render badge if specified -->
|
|
9372
|
+
@if (row[column.key + '_badge']) {
|
|
9373
|
+
<bsg-badge
|
|
9374
|
+
[variant]="
|
|
9375
|
+
row[column.key + '_badge_variant'] ||
|
|
9376
|
+
'default'
|
|
9377
|
+
"
|
|
9378
|
+
[value]="row[column.key]"
|
|
9379
|
+
[size]="
|
|
9380
|
+
row[column.key + '_badge_size'] || 'default'
|
|
9381
|
+
"
|
|
9382
|
+
></bsg-badge>
|
|
9383
|
+
} @else if (row[column.key + '_label']) {
|
|
9384
|
+
<!-- Render label if specified -->
|
|
9385
|
+
<bsg-label [text]="row[column.key]"></bsg-label>
|
|
9386
|
+
} @else {
|
|
9387
|
+
<!-- Render plain text otherwise -->
|
|
9388
|
+
<span>{{ row[column.key] }}</span>
|
|
9389
|
+
}
|
|
9390
|
+
</div>
|
|
9391
|
+
}
|
|
9392
|
+
</div>
|
|
9393
|
+
}
|
|
9394
|
+
</div>
|
|
9395
|
+
|
|
9396
|
+
<!-- Pagination for this tab -->
|
|
9397
|
+
@if (tabsPagination && tabsPagination[i]) {
|
|
9398
|
+
<div class="table-pagination">
|
|
9399
|
+
<bsg-separator></bsg-separator>
|
|
9400
|
+
<bsg-pagination
|
|
9401
|
+
[currentPage]="tabsPagination[i].currentPage"
|
|
9402
|
+
[totalPages]="tabsPagination[i].totalPages"
|
|
9403
|
+
[pageSize]="tabsPagination[i].pageSize"
|
|
9404
|
+
[pageSizeOptions]="tabsPagination[i].pageSizeOptions"
|
|
9405
|
+
[totalItems]="tabsPagination[i].totalItems"
|
|
9406
|
+
[rangeLabel]="tabsPagination[i].rangeLabel"
|
|
9407
|
+
(pageChange)="onTabPageChange(i, $event)"
|
|
9408
|
+
(pageSizeChange)="onTabPageSizeChange(i, $event)"
|
|
9409
|
+
(refresh)="onTabRefresh(i)"
|
|
9410
|
+
></bsg-pagination>
|
|
9411
|
+
</div>
|
|
9412
|
+
}
|
|
9413
|
+
</div>
|
|
9414
|
+
}
|
|
9415
|
+
}
|
|
9416
|
+
</div>
|
|
9417
|
+
</div>
|
|
9418
|
+
}
|
|
9419
|
+
</div>
|
|
9420
|
+
</div>
|
|
9421
|
+
`, isInline: true, styles: [".table{width:100%;border-radius:12px;border:1px solid #cbd5e1;background:#fff;overflow:hidden;font-family:Inter,-apple-system,Roboto,Helvetica,sans-serif}.table-header{display:flex;align-items:center;gap:14px;padding:20px;background:#dbeafe;border-radius:12px 12px 0 0;position:relative}.table-header-collapsible{padding:16px 20px;gap:12px;justify-content:space-between}.table-header-collapsible .table-title{flex:1}.table-icon{position:relative;width:28px;height:28px;flex-shrink:0}.table-check-icon{position:absolute;left:7px;top:6px}.table-title{flex:1;margin:0;color:#2563eb;font-size:16px;font-weight:600;line-height:normal}.table-header-actions{margin-left:auto;margin-right:16px}.table-collapse-chevron{width:24px;height:24px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:0;outline:none;transition:transform .3s ease;flex-shrink:0;color:#2563eb;margin-left:auto;margin-right:0}.table-collapse-chevron:hover{opacity:.8}.table-collapse-chevron:focus-visible{outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}.table-chevron-expanded{transform:rotate(180deg)}.table-body,.table-content{padding:0}.table-content-header{display:flex;gap:16px;padding:12px 20px;background:#eff6ff;margin:0;align-items:flex-start}.table-header-cell{color:#2563eb;font-size:14px;font-weight:500;line-height:1.5;flex-shrink:1;word-break:break-word;overflow-wrap:break-word;white-space:normal}.table-actions-header{text-align:center}.table-content-body{padding:0 20px}.table-row{display:flex;gap:16px;padding:20px 0;border-bottom:1px solid #cbd5e1;align-items:flex-start}.table-row:last-child{border-bottom:none}.table-cell{color:#334155;font-size:14px;font-weight:500;line-height:1.5;display:flex;align-items:flex-start;flex-shrink:1;word-break:break-word;overflow-wrap:break-word;white-space:normal}.table-actions-cell{justify-content:center}.table-actions{display:flex;flex-direction:column;gap:16px;width:100%}.table-action-btn{width:83px;height:26px}.table-pagination{padding:20px}.table-pagination bsg-separator{margin-bottom:20px}.table-list{padding:20px;display:flex;flex-direction:column;gap:24px}.table-list-item{display:flex;align-items:flex-start;gap:17px}.table-list-number{position:relative;width:27px;height:26px;flex-shrink:0}.table-list-number-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:14px;font-weight:500;line-height:normal}.table-list-text{flex:1;color:#334155;font-size:14px;font-weight:500;line-height:normal}.table-tabs-wrapper{padding:0}.table-tabs-wrapper bsg-tab-navigation{display:block;padding:20px}.table-tabs-wrapper bsg-tab-navigation .tab-navigation{display:flex;gap:8px;flex-wrap:wrap}.table-tab-content{margin-top:0;padding:0}.table-tab-content .table-content{padding:0}.table-tab-content .table-content-header{margin:0;padding:12px 20px;background:#eff6ff}.table-tab-content .table-content-body{margin-top:0;padding:0 20px}.table-tab-content .table-row{padding:20px 0}.table-tab-content .table-pagination{padding:20px}.table-collapsed,.table-collapsed .table-header{border-radius:12px}.table-collapsed .table-body{display:none}@media (max-width: 768px){.table-header{padding:16px}.table-title{font-size:14px}.table-content,.table-list,.table-tabs-wrapper{padding:16px}.table-content-header,.table-row{flex-direction:column;gap:8px}.table-header-cell,.table-cell{width:100%!important}.table-actions{flex-direction:row;justify-content:center}.table-pagination{padding:16px}}.table-action-btn bsg-button{width:100%}.table-actions .table-action-btn:first-child bsg-button{--button-bg: #16a34a;--button-color: #ffffff}.table-actions .table-action-btn:last-child bsg-button{--button-bg: #dc2626;--button-color: #ffffff}\n"], dependencies: [{ kind: "component", type: TabNavigationComponent, selector: "bsg-tab-navigation", inputs: ["size", "variant", "color", "disabled", "tabs", "activeIndex", "className"], outputs: ["tabChange"] }, { kind: "component", type: PaginationComponent, selector: "bsg-pagination", inputs: ["currentPage", "totalPages", "pageSize", "pageSizeOptions", "totalItems", "rangeLabel", "className"], outputs: ["pageChange", "pageSizeChange", "paginationChange", "refresh"] }, { kind: "component", type: SeparatorComponent, selector: "bsg-separator", inputs: ["orientation", "className"] }, { kind: "component", type: LabelComponent, selector: "bsg-label", inputs: ["text", "className"] }, { kind: "component", type: ButtonComponent, selector: "bsg-button", inputs: ["size", "variant", "shape", "label", "disabled", "spinner", "ariaLabel", "className"], outputs: ["Click"] }, { kind: "component", type: BadgeComponent, selector: "bsg-badge", inputs: ["variant", "size", "layout", "value", "className"] }] });
|
|
9422
|
+
}
|
|
9423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableContainerComponent, decorators: [{
|
|
9424
|
+
type: Component,
|
|
9425
|
+
args: [{ selector: 'bsg-table-container', standalone: true, imports: [
|
|
9426
|
+
TabNavigationComponent,
|
|
9427
|
+
PaginationComponent,
|
|
9428
|
+
SeparatorComponent,
|
|
9429
|
+
LabelComponent,
|
|
9430
|
+
ButtonComponent,
|
|
9431
|
+
BadgeComponent,
|
|
9432
|
+
], template: `
|
|
9433
|
+
<div class="table" [class]="containerClasses">
|
|
9434
|
+
<!-- Header -->
|
|
9435
|
+
<div
|
|
9436
|
+
class="table-header"
|
|
9437
|
+
[class.table-header-collapsible]="isCollapsible"
|
|
9438
|
+
>
|
|
9439
|
+
<!-- Icon -->
|
|
9440
|
+
@if (!isCollapsible) {
|
|
9441
|
+
<div class="table-icon">
|
|
9442
|
+
<svg
|
|
9443
|
+
width="28"
|
|
9444
|
+
height="28"
|
|
9445
|
+
viewBox="0 0 28 28"
|
|
9446
|
+
fill="none"
|
|
9447
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9448
|
+
>
|
|
9449
|
+
<circle cx="14" cy="14" r="14" fill="#2563EB" />
|
|
9450
|
+
</svg>
|
|
9451
|
+
<svg
|
|
9452
|
+
class="table-check-icon"
|
|
9453
|
+
width="15"
|
|
9454
|
+
height="15"
|
|
9455
|
+
viewBox="0 0 15 15"
|
|
9456
|
+
fill="none"
|
|
9457
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9458
|
+
>
|
|
9459
|
+
<g clip-path="url(#clip0_check)">
|
|
9460
|
+
<path
|
|
9461
|
+
d="M6.43155 0.706459C7.98492 0.461733 9.5751 0.757369 10.9372 1.54325C11.2361 1.71571 11.339 2.09758 11.1667 2.39652C10.9942 2.6955 10.6118 2.79791 10.3128 2.6254C9.19841 1.98244 7.89713 1.74102 6.62625 1.9412C5.35534 2.14143 4.19126 2.77142 3.32852 3.72587C2.4658 4.68036 1.95624 5.90193 1.88504 7.18656C1.81386 8.47123 2.18527 9.74182 2.93729 10.7858C3.6893 11.8297 4.77673 12.5845 6.01773 12.9239C7.25873 13.2632 8.57877 13.167 9.75736 12.651C10.936 12.1351 11.9023 11.2303 12.4948 10.0882C13.0872 8.94613 13.2698 7.63546 13.013 6.37479C12.9441 6.03664 13.1625 5.7065 13.5006 5.63749C13.8389 5.56857 14.169 5.78696 14.2379 6.12516C14.5519 7.66605 14.328 9.26786 13.6038 10.6637C12.8796 12.0596 11.699 13.1654 10.2585 13.7961C8.818 14.4266 7.20487 14.5441 5.68814 14.1293C4.17132 13.7145 2.84201 12.7923 1.92288 11.5164C1.00377 10.2404 0.549897 8.68771 0.636872 7.11759C0.72387 5.54744 1.34693 4.05449 2.4014 2.88786C3.45585 1.7213 4.87821 0.951184 6.43155 0.706459ZM13.3084 2.05778C13.5525 1.81398 13.9482 1.81382 14.1922 2.05778C14.4362 2.30185 14.4362 2.6981 14.1922 2.94218L7.94217 9.19218C7.69818 9.43613 7.30247 9.43597 7.05838 9.19218L5.18338 7.31718C4.9393 7.0731 4.9393 6.67686 5.18338 6.43278C5.42747 6.18898 5.82318 6.18882 6.06717 6.43278L7.50028 7.86588L13.3084 2.05778Z"
|
|
9462
|
+
fill="white"
|
|
9463
|
+
/>
|
|
9464
|
+
</g>
|
|
9465
|
+
<defs>
|
|
9466
|
+
<clipPath id="clip0_check">
|
|
9467
|
+
<rect width="15" height="15" fill="white" />
|
|
9468
|
+
</clipPath>
|
|
9469
|
+
</defs>
|
|
9470
|
+
</svg>
|
|
9471
|
+
</div>
|
|
9472
|
+
}
|
|
9473
|
+
|
|
9474
|
+
<!-- Title -->
|
|
9475
|
+
<h2 class="table-title">{{ title }}</h2>
|
|
9476
|
+
|
|
9477
|
+
<!-- Header Actions (e.g., "Nuevo mensaje" button) -->
|
|
9478
|
+
@if (headerAction && !isCollapsible) {
|
|
9479
|
+
<div class="table-header-actions">
|
|
9480
|
+
<bsg-button
|
|
9481
|
+
[label]="headerAction.label"
|
|
9482
|
+
[variant]="headerAction.variant || 'default'"
|
|
9483
|
+
[size]="headerAction.size || 'md'"
|
|
9484
|
+
(onClick)="onHeaderAction()"
|
|
9485
|
+
></bsg-button>
|
|
9486
|
+
</div>
|
|
9487
|
+
}
|
|
9488
|
+
|
|
9489
|
+
<!-- Chevron Icon for Collapsible Mode (right side) -->
|
|
9490
|
+
@if (isCollapsible) {
|
|
9491
|
+
<button
|
|
9492
|
+
type="button"
|
|
9493
|
+
class="table-collapse-chevron"
|
|
9494
|
+
[class.table-chevron-expanded]="isExpanded"
|
|
9495
|
+
(click)="toggleCollapse()"
|
|
9496
|
+
[attr.aria-expanded]="isExpanded"
|
|
9497
|
+
[attr.aria-label]="isExpanded ? 'Contraer' : 'Expandir'"
|
|
9498
|
+
>
|
|
9499
|
+
<svg
|
|
9500
|
+
width="24"
|
|
9501
|
+
height="24"
|
|
9502
|
+
viewBox="0 0 24 24"
|
|
9503
|
+
fill="none"
|
|
9504
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9505
|
+
>
|
|
9506
|
+
<path
|
|
9507
|
+
d="M11.3691 8.22462C11.7618 7.90427 12.3408 7.92686 12.707 8.29298L18.707 14.293C19.0975 14.6835 19.0975 15.3165 18.707 15.707C18.3164 16.0976 17.6834 16.0976 17.2929 15.707L11.9999 10.4141L6.70696 15.707C6.31643 16.0976 5.68342 16.0976 5.29289 15.707C4.90237 15.3165 4.90237 14.6835 5.29289 14.293L11.2929 8.29298L11.3691 8.22462Z"
|
|
9508
|
+
fill="currentColor"
|
|
9509
|
+
/>
|
|
9510
|
+
</svg>
|
|
9511
|
+
</button>
|
|
9512
|
+
}
|
|
9513
|
+
</div>
|
|
9514
|
+
|
|
9515
|
+
<!-- Body -->
|
|
9516
|
+
<div class="table-body">
|
|
9517
|
+
<!-- Table Variants (table-basic, table-actions) -->
|
|
9518
|
+
@if (variant === 'table-basic' || variant === 'table-actions') {
|
|
9519
|
+
<div class="table-content">
|
|
9520
|
+
<!-- Table Header -->
|
|
9521
|
+
<div class="table-content-header">
|
|
9522
|
+
@for (column of tableColumns; track column.key) {
|
|
9523
|
+
<div
|
|
9524
|
+
class="table-header-cell"
|
|
9525
|
+
[style.width]="column.width || 'auto'"
|
|
9526
|
+
>
|
|
9527
|
+
{{ column.label }}
|
|
9528
|
+
</div>
|
|
9529
|
+
}
|
|
9530
|
+
@if (variant === 'table-actions' && showActionsColumn) {
|
|
9531
|
+
<div
|
|
9532
|
+
class="table-header-cell table-actions-header"
|
|
9533
|
+
[style.width]="actionsColumnWidth || 'auto'"
|
|
9534
|
+
>
|
|
9535
|
+
{{ actionsColumnLabel || 'Acciones' }}
|
|
9536
|
+
</div>
|
|
9537
|
+
}
|
|
9538
|
+
</div>
|
|
9539
|
+
|
|
9540
|
+
<bsg-separator></bsg-separator>
|
|
9541
|
+
|
|
9542
|
+
<!-- Table Rows -->
|
|
9543
|
+
<div class="table-content-body">
|
|
9544
|
+
@for (row of tableRows; track $index; let i = $index) {
|
|
9545
|
+
<div class="table-row">
|
|
9546
|
+
@for (column of tableColumns; track column.key) {
|
|
9547
|
+
<div
|
|
9548
|
+
class="table-cell"
|
|
9549
|
+
[style.width]="column.width || 'auto'"
|
|
9550
|
+
>
|
|
9551
|
+
<!-- Render badge if specified -->
|
|
9552
|
+
@if (row[column.key + '_badge']) {
|
|
9553
|
+
<bsg-badge
|
|
9554
|
+
[variant]="
|
|
9555
|
+
row[column.key + '_badge_variant'] || 'default'
|
|
9556
|
+
"
|
|
9557
|
+
[value]="row[column.key]"
|
|
9558
|
+
[size]="row[column.key + '_badge_size'] || 'default'"
|
|
9559
|
+
></bsg-badge>
|
|
9560
|
+
} @else if (row[column.key + '_label']) {
|
|
9561
|
+
<!-- Render label if specified -->
|
|
9562
|
+
<bsg-label [text]="row[column.key]"></bsg-label>
|
|
9563
|
+
} @else {
|
|
9564
|
+
<!-- Render plain text otherwise -->
|
|
9565
|
+
<span>{{ row[column.key] }}</span>
|
|
9566
|
+
}
|
|
9567
|
+
</div>
|
|
9568
|
+
}
|
|
9569
|
+
|
|
9570
|
+
<!-- Actions Column (for table-actions variant) -->
|
|
9571
|
+
@if (variant === 'table-actions' && row['actions']) {
|
|
9572
|
+
<div
|
|
9573
|
+
class="table-cell table-actions-cell"
|
|
9574
|
+
[style.width]="actionsColumnWidth || 'auto'"
|
|
9575
|
+
>
|
|
9576
|
+
<div class="table-actions">
|
|
9577
|
+
@for (action of row['actions']; track $index) {
|
|
9578
|
+
<bsg-button
|
|
9579
|
+
[label]="action.label"
|
|
9580
|
+
[variant]="getActionVariant(action.variant)"
|
|
9581
|
+
[size]="'md'"
|
|
9582
|
+
[shape]="'rectangular'"
|
|
9583
|
+
(onClick)="onRowAction(i, action)"
|
|
9584
|
+
class="table-action-btn"
|
|
9585
|
+
></bsg-button>
|
|
9586
|
+
}
|
|
9587
|
+
</div>
|
|
9588
|
+
</div>
|
|
9589
|
+
}
|
|
9590
|
+
</div>
|
|
9591
|
+
}
|
|
9592
|
+
</div>
|
|
9593
|
+
|
|
9594
|
+
<!-- Pagination -->
|
|
9595
|
+
@if (tablePagination) {
|
|
9596
|
+
<div class="table-pagination">
|
|
9597
|
+
<bsg-separator></bsg-separator>
|
|
9598
|
+
<bsg-pagination
|
|
9599
|
+
[currentPage]="tablePagination.currentPage"
|
|
9600
|
+
[totalPages]="tablePagination.totalPages"
|
|
9601
|
+
[pageSize]="tablePagination.pageSize"
|
|
9602
|
+
[pageSizeOptions]="tablePagination.pageSizeOptions"
|
|
9603
|
+
[totalItems]="tablePagination.totalItems"
|
|
9604
|
+
[rangeLabel]="tablePagination.rangeLabel"
|
|
9605
|
+
(pageChange)="onTablePageChange($event)"
|
|
9606
|
+
(pageSizeChange)="onTablePageSizeChange($event)"
|
|
9607
|
+
(refresh)="onTableRefresh()"
|
|
9608
|
+
></bsg-pagination>
|
|
9609
|
+
</div>
|
|
9610
|
+
}
|
|
9611
|
+
</div>
|
|
9612
|
+
}
|
|
9613
|
+
|
|
9614
|
+
<!-- List Variant (list-content) -->
|
|
9615
|
+
@if (variant === 'list-content') {
|
|
9616
|
+
<div class="table-list">
|
|
9617
|
+
@for (item of listItems; track $index; let i = $index) {
|
|
9618
|
+
<div class="table-list-item">
|
|
9619
|
+
<div class="table-list-number">
|
|
9620
|
+
<svg
|
|
9621
|
+
width="27"
|
|
9622
|
+
height="26"
|
|
9623
|
+
viewBox="0 0 27 26"
|
|
9624
|
+
fill="none"
|
|
9625
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9626
|
+
>
|
|
9627
|
+
<ellipse
|
|
9628
|
+
cx="13.5"
|
|
9629
|
+
cy="13"
|
|
9630
|
+
rx="13.5"
|
|
9631
|
+
ry="13"
|
|
9632
|
+
fill="#2563EB"
|
|
9633
|
+
/>
|
|
9634
|
+
</svg>
|
|
9635
|
+
<span class="table-list-number-text">{{ i + 1 }}</span>
|
|
9636
|
+
</div>
|
|
9637
|
+
<div class="table-list-text">{{ item.text }}</div>
|
|
9638
|
+
</div>
|
|
9639
|
+
}
|
|
9640
|
+
</div>
|
|
9641
|
+
}
|
|
9642
|
+
|
|
9643
|
+
<!-- Tabs Variant (table-tabs) -->
|
|
9644
|
+
@if (variant === 'table-tabs') {
|
|
9645
|
+
<div class="table-tabs-wrapper">
|
|
9646
|
+
<!-- Tab Navigation -->
|
|
9647
|
+
<bsg-tab-navigation
|
|
9648
|
+
[tabs]="tabs"
|
|
9649
|
+
[activeIndex]="activeTabIndex"
|
|
9650
|
+
[size]="'md'"
|
|
9651
|
+
[variant]="'text'"
|
|
9652
|
+
(tabChange)="onTabChange($event)"
|
|
9653
|
+
></bsg-tab-navigation>
|
|
9654
|
+
|
|
9655
|
+
<!-- Tab Content -->
|
|
9656
|
+
<div class="table-tab-content">
|
|
9657
|
+
@for (tab of tabs; track $index; let i = $index) {
|
|
9658
|
+
@if (i === activeTabIndex && tab.tableData) {
|
|
9659
|
+
<div class="table-content">
|
|
9660
|
+
<!-- Table Header -->
|
|
9661
|
+
<div class="table-content-header">
|
|
9662
|
+
@for (column of tab.tableData.columns; track column.key) {
|
|
9663
|
+
<div
|
|
9664
|
+
class="table-header-cell"
|
|
9665
|
+
[style.width]="column.width || 'auto'"
|
|
9666
|
+
>
|
|
9667
|
+
{{ column.label }}
|
|
9668
|
+
</div>
|
|
9669
|
+
}
|
|
9670
|
+
</div>
|
|
9671
|
+
|
|
9672
|
+
<bsg-separator></bsg-separator>
|
|
9673
|
+
|
|
9674
|
+
<!-- Table Rows -->
|
|
9675
|
+
<div class="table-content-body">
|
|
9676
|
+
@for (row of tab.tableData.rows; track $index) {
|
|
9677
|
+
<div class="table-row">
|
|
9678
|
+
@for (
|
|
9679
|
+
column of tab.tableData.columns;
|
|
9680
|
+
track column.key
|
|
9681
|
+
) {
|
|
9682
|
+
<div
|
|
9683
|
+
class="table-cell"
|
|
9684
|
+
[style.width]="column.width || 'auto'"
|
|
9685
|
+
>
|
|
9686
|
+
<!-- Render badge if specified -->
|
|
9687
|
+
@if (row[column.key + '_badge']) {
|
|
9688
|
+
<bsg-badge
|
|
9689
|
+
[variant]="
|
|
9690
|
+
row[column.key + '_badge_variant'] ||
|
|
9691
|
+
'default'
|
|
9692
|
+
"
|
|
9693
|
+
[value]="row[column.key]"
|
|
9694
|
+
[size]="
|
|
9695
|
+
row[column.key + '_badge_size'] || 'default'
|
|
9696
|
+
"
|
|
9697
|
+
></bsg-badge>
|
|
9698
|
+
} @else if (row[column.key + '_label']) {
|
|
9699
|
+
<!-- Render label if specified -->
|
|
9700
|
+
<bsg-label [text]="row[column.key]"></bsg-label>
|
|
9701
|
+
} @else {
|
|
9702
|
+
<!-- Render plain text otherwise -->
|
|
9703
|
+
<span>{{ row[column.key] }}</span>
|
|
9704
|
+
}
|
|
9705
|
+
</div>
|
|
9706
|
+
}
|
|
9707
|
+
</div>
|
|
9708
|
+
}
|
|
9709
|
+
</div>
|
|
9710
|
+
|
|
9711
|
+
<!-- Pagination for this tab -->
|
|
9712
|
+
@if (tabsPagination && tabsPagination[i]) {
|
|
9713
|
+
<div class="table-pagination">
|
|
9714
|
+
<bsg-separator></bsg-separator>
|
|
9715
|
+
<bsg-pagination
|
|
9716
|
+
[currentPage]="tabsPagination[i].currentPage"
|
|
9717
|
+
[totalPages]="tabsPagination[i].totalPages"
|
|
9718
|
+
[pageSize]="tabsPagination[i].pageSize"
|
|
9719
|
+
[pageSizeOptions]="tabsPagination[i].pageSizeOptions"
|
|
9720
|
+
[totalItems]="tabsPagination[i].totalItems"
|
|
9721
|
+
[rangeLabel]="tabsPagination[i].rangeLabel"
|
|
9722
|
+
(pageChange)="onTabPageChange(i, $event)"
|
|
9723
|
+
(pageSizeChange)="onTabPageSizeChange(i, $event)"
|
|
9724
|
+
(refresh)="onTabRefresh(i)"
|
|
9725
|
+
></bsg-pagination>
|
|
9726
|
+
</div>
|
|
9727
|
+
}
|
|
9728
|
+
</div>
|
|
9729
|
+
}
|
|
9730
|
+
}
|
|
9731
|
+
</div>
|
|
9732
|
+
</div>
|
|
9733
|
+
}
|
|
9734
|
+
</div>
|
|
9735
|
+
</div>
|
|
9736
|
+
`, styles: [".table{width:100%;border-radius:12px;border:1px solid #cbd5e1;background:#fff;overflow:hidden;font-family:Inter,-apple-system,Roboto,Helvetica,sans-serif}.table-header{display:flex;align-items:center;gap:14px;padding:20px;background:#dbeafe;border-radius:12px 12px 0 0;position:relative}.table-header-collapsible{padding:16px 20px;gap:12px;justify-content:space-between}.table-header-collapsible .table-title{flex:1}.table-icon{position:relative;width:28px;height:28px;flex-shrink:0}.table-check-icon{position:absolute;left:7px;top:6px}.table-title{flex:1;margin:0;color:#2563eb;font-size:16px;font-weight:600;line-height:normal}.table-header-actions{margin-left:auto;margin-right:16px}.table-collapse-chevron{width:24px;height:24px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;cursor:pointer;padding:0;outline:none;transition:transform .3s ease;flex-shrink:0;color:#2563eb;margin-left:auto;margin-right:0}.table-collapse-chevron:hover{opacity:.8}.table-collapse-chevron:focus-visible{outline:2px solid #7c3aed;outline-offset:-2px;border-radius:4px}.table-chevron-expanded{transform:rotate(180deg)}.table-body,.table-content{padding:0}.table-content-header{display:flex;gap:16px;padding:12px 20px;background:#eff6ff;margin:0;align-items:flex-start}.table-header-cell{color:#2563eb;font-size:14px;font-weight:500;line-height:1.5;flex-shrink:1;word-break:break-word;overflow-wrap:break-word;white-space:normal}.table-actions-header{text-align:center}.table-content-body{padding:0 20px}.table-row{display:flex;gap:16px;padding:20px 0;border-bottom:1px solid #cbd5e1;align-items:flex-start}.table-row:last-child{border-bottom:none}.table-cell{color:#334155;font-size:14px;font-weight:500;line-height:1.5;display:flex;align-items:flex-start;flex-shrink:1;word-break:break-word;overflow-wrap:break-word;white-space:normal}.table-actions-cell{justify-content:center}.table-actions{display:flex;flex-direction:column;gap:16px;width:100%}.table-action-btn{width:83px;height:26px}.table-pagination{padding:20px}.table-pagination bsg-separator{margin-bottom:20px}.table-list{padding:20px;display:flex;flex-direction:column;gap:24px}.table-list-item{display:flex;align-items:flex-start;gap:17px}.table-list-number{position:relative;width:27px;height:26px;flex-shrink:0}.table-list-number-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:14px;font-weight:500;line-height:normal}.table-list-text{flex:1;color:#334155;font-size:14px;font-weight:500;line-height:normal}.table-tabs-wrapper{padding:0}.table-tabs-wrapper bsg-tab-navigation{display:block;padding:20px}.table-tabs-wrapper bsg-tab-navigation .tab-navigation{display:flex;gap:8px;flex-wrap:wrap}.table-tab-content{margin-top:0;padding:0}.table-tab-content .table-content{padding:0}.table-tab-content .table-content-header{margin:0;padding:12px 20px;background:#eff6ff}.table-tab-content .table-content-body{margin-top:0;padding:0 20px}.table-tab-content .table-row{padding:20px 0}.table-tab-content .table-pagination{padding:20px}.table-collapsed,.table-collapsed .table-header{border-radius:12px}.table-collapsed .table-body{display:none}@media (max-width: 768px){.table-header{padding:16px}.table-title{font-size:14px}.table-content,.table-list,.table-tabs-wrapper{padding:16px}.table-content-header,.table-row{flex-direction:column;gap:8px}.table-header-cell,.table-cell{width:100%!important}.table-actions{flex-direction:row;justify-content:center}.table-pagination{padding:16px}}.table-action-btn bsg-button{width:100%}.table-actions .table-action-btn:first-child bsg-button{--button-bg: #16a34a;--button-color: #ffffff}.table-actions .table-action-btn:last-child bsg-button{--button-bg: #dc2626;--button-color: #ffffff}\n"] }]
|
|
9737
|
+
}], propDecorators: { title: [{
|
|
9738
|
+
type: Input
|
|
9739
|
+
}], variant: [{
|
|
9740
|
+
type: Input
|
|
9741
|
+
}], headerAction: [{
|
|
9742
|
+
type: Input
|
|
9743
|
+
}], isCollapsible: [{
|
|
9744
|
+
type: Input
|
|
9745
|
+
}], isExpanded: [{
|
|
9746
|
+
type: Input
|
|
9747
|
+
}], disableExpansion: [{
|
|
9748
|
+
type: Input
|
|
9749
|
+
}], tableColumns: [{
|
|
9750
|
+
type: Input
|
|
9751
|
+
}], tableRows: [{
|
|
9752
|
+
type: Input
|
|
9753
|
+
}], tablePagination: [{
|
|
9754
|
+
type: Input
|
|
9755
|
+
}], showActionsColumn: [{
|
|
9756
|
+
type: Input
|
|
9757
|
+
}], actionsColumnLabel: [{
|
|
9758
|
+
type: Input
|
|
9759
|
+
}], actionsColumnWidth: [{
|
|
9760
|
+
type: Input
|
|
9761
|
+
}], listItems: [{
|
|
9762
|
+
type: Input
|
|
9763
|
+
}], tabs: [{
|
|
9764
|
+
type: Input
|
|
9765
|
+
}], activeTabIndex: [{
|
|
9766
|
+
type: Input
|
|
9767
|
+
}], tabsPagination: [{
|
|
9768
|
+
type: Input
|
|
9769
|
+
}], headerActionClick: [{
|
|
9770
|
+
type: Output
|
|
9771
|
+
}], collapseToggle: [{
|
|
9772
|
+
type: Output
|
|
9773
|
+
}], tabChange: [{
|
|
9774
|
+
type: Output
|
|
9775
|
+
}], tablePageChange: [{
|
|
9776
|
+
type: Output
|
|
9777
|
+
}], tablePageSizeChange: [{
|
|
9778
|
+
type: Output
|
|
9779
|
+
}], tableRefresh: [{
|
|
9780
|
+
type: Output
|
|
9781
|
+
}], tabPageChange: [{
|
|
9782
|
+
type: Output
|
|
9783
|
+
}], tabPageSizeChange: [{
|
|
9784
|
+
type: Output
|
|
9785
|
+
}], tabRefresh: [{
|
|
9786
|
+
type: Output
|
|
9787
|
+
}], rowAction: [{
|
|
9788
|
+
type: Output
|
|
9789
|
+
}] } });
|
|
9790
|
+
|
|
9791
|
+
// Table components (shadcn-style primitives)
|
|
9792
|
+
|
|
6621
9793
|
const textareaVariants = cva(clsx(
|
|
6622
9794
|
// Layout & sizing
|
|
6623
9795
|
'w-full min-w-0', 'min-h-[80px]',
|
|
@@ -8292,5 +11464,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
8292
11464
|
* Generated bundle index. Do not edit.
|
|
8293
11465
|
*/
|
|
8294
11466
|
|
|
8295
|
-
export { AccordionComponent, AccordionContentComponent, AccordionItemComponent, AccordionTriggerComponent, AlertComponent, AvatarComponent, BadgeComponent, ButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CarouselComponent, CarouselItemComponent, CheckboxComponent, CollapsibleComponent, CollapsibleContentComponent, CollapsibleTriggerDirective, ComboboxComponent, DialogComponent, InputComponent, LabelComponent, RadioComponent, RadioGroupComponent, SelectComponent, SidebarComponent, SidebarContentComponent, SidebarFooterComponent, SidebarGroupActionComponent, SidebarGroupComponent, SidebarGroupContentComponent, SidebarGroupLabelComponent, SidebarHeaderComponent, SidebarInsetComponent, SidebarMenuActionComponent, SidebarMenuBadgeComponent, SidebarMenuButtonComponent, SidebarMenuComponent, SidebarMenuItemComponent, SidebarMenuSubButtonComponent, SidebarMenuSubComponent, SidebarMenuSubItemComponent, SidebarProviderComponent, SidebarRailComponent, SidebarSeparatorComponent, SidebarService, SidebarTriggerComponent, SkeletonComponent, SpinnerComponent, SwitchComponent, TextareaComponent, TimePickerComponent, ToastComponent, TooltipComponent, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, accordionVariants, alertCloseVariants, alertContentVariants, alertIconVariants, alertVariants, avatarIconVariants, avatarImgVariants, avatarInitialsVariants, avatarVariants, badgeIconVariants, badgeVariants, buttonIconOnlyVariants, buttonIconVariants, buttonLabelVariants, buttonSpinnerVariants, buttonVariants, cardActionIconVariants, cardCurrencyContentVariants, cardCurrencyIconVariants, cardCurrencyLabelVariants, cardCurrencyTextVariants, cardHeaderRowVariants, cardHeaderVariants, cardHelperDescriptionVariants, cardHelperRowVariants, cardHelperVariants, cardInfoIconVariants, cardInfoLabelVariants, cardInfoTextVariants, cardMetricTitleVariants, cardMetricValueVariants, cardSlotBodyVariants, cardSlotFooterVariants, cardSlotHeaderVariants, cardValueVariants, cardVariants, carouselArrowVariants, carouselChevronVariants, carouselContainerVariants, carouselIndicatorVariants, carouselIndicatorsVariants, carouselRootVariants, carouselTrackVariants, carouselViewportVariants, checkboxVariants, comboboxDropdownVariants, comboboxEmptyStateVariants, comboboxErrorMessageVariants, comboboxIconVariants, comboboxOptionVariants, comboboxOptionsContainerVariants, comboboxSearchInputVariants, comboboxSearchWrapperVariants, comboboxTriggerVariants, comboboxValueVariants, comboboxWrapperVariants, dialogBodyVariants, dialogContentVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, inputVariants, labelVariants, radioFocusRingVariants, radioGroupVariants, radioInnerVariants, radioLabelVariants, radioOptionVariants, radioOuterVariants, radioWrapperVariants, selectDropdownVariants, selectErrorVariants, selectIconVariants, selectOptionVariants, selectTriggerVariants, selectValueVariants, selectWrapperVariants, sidebarChevronVariants, sidebarContentVariants, sidebarFooterVariants, sidebarGroupActionVariants, sidebarGroupContentVariants, sidebarGroupLabelVariants, sidebarGroupVariants, sidebarHeaderVariants, sidebarInsetVariants, sidebarMenuActionVariants, sidebarMenuBadgeVariants, sidebarMenuButtonVariants, sidebarMenuItemVariants, sidebarMenuSkeletonVariants, sidebarMenuSubButtonVariants, sidebarMenuSubItemVariants, sidebarMenuSubVariants, sidebarMenuVariants, sidebarProviderVariants, sidebarRailVariants, sidebarSeparatorVariants, sidebarTriggerVariants, sidebarVariants, sidebarWrapperVariants, skeletonVariants, spinnerVariants, switchRootVariants, switchThumbVariants, textareaVariants, timepickerActionButtonVariants, timepickerActionsVariants, timepickerColumnHeaderVariants, timepickerColumnVariants, timepickerDropdownVariants, timepickerErrorMessageVariants, timepickerFieldVariants, timepickerIconButtonVariants, timepickerInputVariants, timepickerLabelVariants, timepickerListVariants, timepickerOptionVariants, timepickerSelectionAreaVariants, timepickerSeparatorVariants, timepickerWrapperVariants, toastAccentVariants, toastCloseVariants, toastContentVariants, toastIconVariants, toastVariants, tooltipArrowVariants, tooltipContentVariants, tooltipTriggerVariants };
|
|
11467
|
+
export { AccordionComponent, AccordionContentComponent, AccordionItemComponent, AccordionTriggerComponent, AlertComponent, AvatarComponent, BadgeComponent, ButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CarouselComponent, CarouselItemComponent, CheckboxComponent, CollapsibleComponent, CollapsibleContentComponent, CollapsibleTriggerDirective, ComboboxComponent, DialogComponent, InputComponent, LabelComponent, RadioComponent, RadioGroupComponent, SelectComponent, SidebarComponent, SidebarContentComponent, SidebarFooterComponent, SidebarGroupActionComponent, SidebarGroupComponent, SidebarGroupContentComponent, SidebarGroupLabelComponent, SidebarHeaderComponent, SidebarInsetComponent, SidebarMenuActionComponent, SidebarMenuBadgeComponent, SidebarMenuButtonComponent, SidebarMenuComponent, SidebarMenuItemComponent, SidebarMenuSubButtonComponent, SidebarMenuSubComponent, SidebarMenuSubItemComponent, SidebarProviderComponent, SidebarRailComponent, SidebarSeparatorComponent, SidebarService, SidebarTriggerComponent, SkeletonComponent, SpinnerComponent, SwitchComponent, TabNavigationComponent, TableBodyComponent, TableCardComponent, TableCardFooterComponent, TableCardHeaderComponent, TableCellComponent, TableComponent, TableContainerComponent, TableFooterComponent, TableHeadComponent, TableHeaderComponent, TableRowComponent, TabsComponent, TabsContentComponent, TabsListComponent, TabsTriggerComponent, TextareaComponent, TimePickerComponent, ToastComponent, TooltipComponent, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, accordionVariants, alertCloseVariants, alertContentVariants, alertIconVariants, alertVariants, avatarIconVariants, avatarImgVariants, avatarInitialsVariants, avatarVariants, badgeIconVariants, badgeVariants, buttonIconOnlyVariants, buttonIconVariants, buttonLabelVariants, buttonSpinnerVariants, buttonVariants, cardActionIconVariants, cardCurrencyContentVariants, cardCurrencyIconVariants, cardCurrencyLabelVariants, cardCurrencyTextVariants, cardHeaderRowVariants, cardHeaderVariants, cardHelperDescriptionVariants, cardHelperRowVariants, cardHelperVariants, cardInfoIconVariants, cardInfoLabelVariants, cardInfoTextVariants, cardMetricTitleVariants, cardMetricValueVariants, cardSlotBodyVariants, cardSlotFooterVariants, cardSlotHeaderVariants, cardValueVariants, cardVariants, carouselArrowVariants, carouselChevronVariants, carouselContainerVariants, carouselIndicatorVariants, carouselIndicatorsVariants, carouselRootVariants, carouselTrackVariants, carouselViewportVariants, checkboxVariants, comboboxDropdownVariants, comboboxEmptyStateVariants, comboboxErrorMessageVariants, comboboxIconVariants, comboboxOptionVariants, comboboxOptionsContainerVariants, comboboxSearchInputVariants, comboboxSearchWrapperVariants, comboboxTriggerVariants, comboboxValueVariants, comboboxWrapperVariants, dialogBodyVariants, dialogContentVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, inputVariants, labelVariants, radioFocusRingVariants, radioGroupVariants, radioInnerVariants, radioLabelVariants, radioOptionVariants, radioOuterVariants, radioWrapperVariants, selectDropdownVariants, selectErrorVariants, selectIconVariants, selectOptionVariants, selectTriggerVariants, selectValueVariants, selectWrapperVariants, sidebarChevronVariants, sidebarContentVariants, sidebarFooterVariants, sidebarGroupActionVariants, sidebarGroupContentVariants, sidebarGroupLabelVariants, sidebarGroupVariants, sidebarHeaderVariants, sidebarInsetVariants, sidebarMenuActionVariants, sidebarMenuBadgeVariants, sidebarMenuButtonVariants, sidebarMenuItemVariants, sidebarMenuSkeletonVariants, sidebarMenuSubButtonVariants, sidebarMenuSubItemVariants, sidebarMenuSubVariants, sidebarMenuVariants, sidebarProviderVariants, sidebarRailVariants, sidebarSeparatorVariants, sidebarTriggerVariants, sidebarVariants, sidebarWrapperVariants, skeletonVariants, spinnerVariants, switchRootVariants, switchThumbVariants, tabIconCircleVariants, tabIconContentVariants, tabItemVariants, tabLabelVariants, tabNavigationVariants, tabTextContentVariants, tableBodyVariants, tableCardFooterVariants, tableCardHeaderVariants, tableCellVariants, tableCompactVariants, tableEmptyStateVariants, tableFooterVariants, tableHeadVariants, tableHeaderVariants, tableLoadingVariants, tablePaginationVariants, tableRowVariants, tableStripedVariants, tableVariants, tableWrapperVariants, textareaVariants, timepickerActionButtonVariants, timepickerActionsVariants, timepickerColumnHeaderVariants, timepickerColumnVariants, timepickerDropdownVariants, timepickerErrorMessageVariants, timepickerFieldVariants, timepickerIconButtonVariants, timepickerInputVariants, timepickerLabelVariants, timepickerListVariants, timepickerOptionVariants, timepickerSelectionAreaVariants, timepickerSeparatorVariants, timepickerWrapperVariants, toastAccentVariants, toastCloseVariants, toastContentVariants, toastIconVariants, toastVariants, tooltipArrowVariants, tooltipContentVariants, tooltipTriggerVariants };
|
|
8296
11468
|
//# sourceMappingURL=bsginstitute-bsg-integra.mjs.map
|