@vsn-ux/ngx-gaia 0.10.0 → 0.10.1
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/DOCS.md +110 -0
- package/fesm2022/vsn-ux-ngx-gaia.mjs +157 -22
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/index.d.ts +61 -2
- package/package.json +1 -1
package/DOCS.md
CHANGED
|
@@ -1315,6 +1315,116 @@ Switch with label
|
|
|
1315
1315
|
<ga-switch [(ngModel)]="value" label="Dark mode" />
|
|
1316
1316
|
```
|
|
1317
1317
|
|
|
1318
|
+
## Tabs
|
|
1319
|
+
|
|
1320
|
+
Tab components for organizing content into switchable panels.
|
|
1321
|
+
|
|
1322
|
+
**Angular module: GaTabsModule**
|
|
1323
|
+
|
|
1324
|
+
### `<ga-tabs>`
|
|
1325
|
+
|
|
1326
|
+
Container component for managing tab selection and content display.
|
|
1327
|
+
|
|
1328
|
+
#### Inputs:
|
|
1329
|
+
|
|
1330
|
+
- `selectedIndex: number` - Index of the selected tab (default: 0)
|
|
1331
|
+
- `withKeyline: boolean` - Display keyline below tabs (default: false)
|
|
1332
|
+
- `orientation: 'horizontal' | 'vertical'` - Tab orientation (default: 'horizontal')
|
|
1333
|
+
- `aria-label: string` - Accessible label for tab list
|
|
1334
|
+
- `aria-labelledby: string` - ID of element labeling tab list
|
|
1335
|
+
|
|
1336
|
+
#### Outputs:
|
|
1337
|
+
|
|
1338
|
+
- `beforeTabChange(event: GaBeforeTabChangeEvent)` - Emitted before tab changes, can prevent change via event.preventChange()
|
|
1339
|
+
- `selectedIndexChange(index: number)` - Emitted when selected index changes
|
|
1340
|
+
- `selectedTabChange(event: GaTabChangeEvent)` - Emitted when selected tab changes
|
|
1341
|
+
|
|
1342
|
+
### `<ga-tab>`
|
|
1343
|
+
|
|
1344
|
+
Individual tab component for tab content.
|
|
1345
|
+
|
|
1346
|
+
#### Inputs:
|
|
1347
|
+
|
|
1348
|
+
- `title: string` - Tab label text (default: '')
|
|
1349
|
+
- `disabled: boolean` - Disabled state (default: false)
|
|
1350
|
+
- `rightIcon: GaIconData` - Icon displayed next to title
|
|
1351
|
+
- `rightIconColor: string` - Icon color
|
|
1352
|
+
|
|
1353
|
+
### `[gaTabContent]`
|
|
1354
|
+
|
|
1355
|
+
Directive for explicit tab content template definition.
|
|
1356
|
+
|
|
1357
|
+
### Examples:
|
|
1358
|
+
|
|
1359
|
+
Basic tabs
|
|
1360
|
+
|
|
1361
|
+
```html
|
|
1362
|
+
<ga-tabs [(selectedIndex)]="selectedIndex">
|
|
1363
|
+
<ga-tab title="First"><p>First tab content</p></ga-tab>
|
|
1364
|
+
<ga-tab title="Second"><p>Second tab content</p></ga-tab>
|
|
1365
|
+
<ga-tab title="Third" disabled><p>Disabled tab</p></ga-tab>
|
|
1366
|
+
</ga-tabs>
|
|
1367
|
+
```
|
|
1368
|
+
|
|
1369
|
+
Vertical orientation with keyline
|
|
1370
|
+
|
|
1371
|
+
```html
|
|
1372
|
+
<ga-tabs orientation="vertical" withKeyline>
|
|
1373
|
+
<ga-tab title="Overview"><p>Overview content</p></ga-tab>
|
|
1374
|
+
<ga-tab title="Settings"><p>Settings content</p></ga-tab>
|
|
1375
|
+
<ga-tab title="Profile"><p>Profile content</p></ga-tab>
|
|
1376
|
+
</ga-tabs>
|
|
1377
|
+
```
|
|
1378
|
+
|
|
1379
|
+
Tabs with icons
|
|
1380
|
+
|
|
1381
|
+
```html
|
|
1382
|
+
<ga-tabs>
|
|
1383
|
+
<ga-tab title="Home" [rightIcon]="HomeIcon">
|
|
1384
|
+
<p>Home tab content</p>
|
|
1385
|
+
</ga-tab>
|
|
1386
|
+
<ga-tab title="Settings" [rightIcon]="SettingsIcon">
|
|
1387
|
+
<p>Settings tab content</p>
|
|
1388
|
+
</ga-tab>
|
|
1389
|
+
<ga-tab
|
|
1390
|
+
title="Alerts"
|
|
1391
|
+
[rightIcon]="AlertIcon"
|
|
1392
|
+
rightIconColor="var(--ga-color-warning)"
|
|
1393
|
+
>
|
|
1394
|
+
<p>Alerts tab content</p>
|
|
1395
|
+
</ga-tab>
|
|
1396
|
+
</ga-tabs>
|
|
1397
|
+
```
|
|
1398
|
+
|
|
1399
|
+
Preventing tab change
|
|
1400
|
+
|
|
1401
|
+
```html
|
|
1402
|
+
<ga-tabs (beforeTabChange)="onBeforeChange($event)">
|
|
1403
|
+
<ga-tab title="Tab 1"><p>Content 1</p></ga-tab>
|
|
1404
|
+
<ga-tab title="Tab 2"><p>Content 2</p></ga-tab>
|
|
1405
|
+
</ga-tabs>
|
|
1406
|
+
```
|
|
1407
|
+
|
|
1408
|
+
```typescript
|
|
1409
|
+
onBeforeChange(event: GaBeforeTabChangeEvent) {
|
|
1410
|
+
if (!confirm('Change tab?')) {
|
|
1411
|
+
event.preventChange();
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
```
|
|
1415
|
+
|
|
1416
|
+
Explicit content template
|
|
1417
|
+
|
|
1418
|
+
```html
|
|
1419
|
+
<ga-tabs>
|
|
1420
|
+
<ga-tab title="Template Tab">
|
|
1421
|
+
<ng-template gaTabContent>
|
|
1422
|
+
<p>Content defined in explicit template</p>
|
|
1423
|
+
</ng-template>
|
|
1424
|
+
</ga-tab>
|
|
1425
|
+
</ga-tabs>
|
|
1426
|
+
```
|
|
1427
|
+
|
|
1318
1428
|
## Text Area
|
|
1319
1429
|
|
|
1320
1430
|
Text area directive for multi-line text input.
|
|
@@ -368,7 +368,7 @@ function provideGaAlertI18n(value) {
|
|
|
368
368
|
]);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
let nextUniqueId$
|
|
371
|
+
let nextUniqueId$b = 0;
|
|
372
372
|
class GaAlertComponent {
|
|
373
373
|
i18n = inject(GaAlertI18n);
|
|
374
374
|
dismissIcon = X;
|
|
@@ -396,7 +396,7 @@ class GaAlertComponent {
|
|
|
396
396
|
return null;
|
|
397
397
|
});
|
|
398
398
|
title = contentChild(GaAlertTitleComponent);
|
|
399
|
-
progressId = `ga-alert-progress-${++nextUniqueId$
|
|
399
|
+
progressId = `ga-alert-progress-${++nextUniqueId$b}`;
|
|
400
400
|
variantClass = computed(() => {
|
|
401
401
|
return `ga-notification ga-notification--${this.variant()}`;
|
|
402
402
|
});
|
|
@@ -657,10 +657,10 @@ const CHECKBOX_CONTROL_VALUE_ACCESSOR = {
|
|
|
657
657
|
};
|
|
658
658
|
// Increasing integer for generating unique ids for checkbox components.
|
|
659
659
|
// Inspired by @angular/components
|
|
660
|
-
let nextUniqueId$
|
|
660
|
+
let nextUniqueId$a = 0;
|
|
661
661
|
class GaCheckboxComponent {
|
|
662
662
|
/** @ignore */
|
|
663
|
-
_uniqueId = `ga-checkbox-${++nextUniqueId$
|
|
663
|
+
_uniqueId = `ga-checkbox-${++nextUniqueId$a}`;
|
|
664
664
|
/** @ignore */
|
|
665
665
|
implicitNgControlState = injectNgControlState();
|
|
666
666
|
/** @ignore */
|
|
@@ -1262,9 +1262,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1262
1262
|
type: Injectable
|
|
1263
1263
|
}] });
|
|
1264
1264
|
|
|
1265
|
-
let nextUniqueId$
|
|
1265
|
+
let nextUniqueId$9 = 0;
|
|
1266
1266
|
class GaInputDirective {
|
|
1267
|
-
uniqueId = `ga-input-${++nextUniqueId$
|
|
1267
|
+
uniqueId = `ga-input-${++nextUniqueId$9}`;
|
|
1268
1268
|
formFieldConnector = inject(GaFormFieldConnector, {
|
|
1269
1269
|
optional: true,
|
|
1270
1270
|
});
|
|
@@ -2186,7 +2186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2186
2186
|
|
|
2187
2187
|
const GA_FORM_FIELD_ID = new InjectionToken('ga-form-field-id');
|
|
2188
2188
|
|
|
2189
|
-
let nextUniqueId$
|
|
2189
|
+
let nextUniqueId$8 = 0;
|
|
2190
2190
|
class GaFormFieldComponent {
|
|
2191
2191
|
uniqueId = inject(GA_FORM_FIELD_ID);
|
|
2192
2192
|
formFieldConnector = inject(GaFormFieldConnector);
|
|
@@ -2204,7 +2204,7 @@ class GaFormFieldComponent {
|
|
|
2204
2204
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: GaFormFieldComponent, isStandalone: true, selector: "ga-form-field", inputs: { disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ga-form-field" }, providers: [
|
|
2205
2205
|
{
|
|
2206
2206
|
provide: GA_FORM_FIELD_ID,
|
|
2207
|
-
useFactory: () => `ga-form-field-${++nextUniqueId$
|
|
2207
|
+
useFactory: () => `ga-form-field-${++nextUniqueId$8}`,
|
|
2208
2208
|
},
|
|
2209
2209
|
GaFormFieldConnector,
|
|
2210
2210
|
], queries: [{ propertyName: "fieldInfo", first: true, predicate: GaFieldInfoComponent, descendants: true, isSignal: true }, { propertyName: "fieldErrors", predicate: GaFieldErrorDirective, isSignal: true }], exportAs: ["gaFormField"], ngImport: i0, template: "<ng-content select=\"ga-label\" />\n<ng-content />\n<ga-field-callout />\n", dependencies: [{ kind: "component", type: GaFieldCalloutComponent, selector: "ga-field-callout" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -2216,13 +2216,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2216
2216
|
}, providers: [
|
|
2217
2217
|
{
|
|
2218
2218
|
provide: GA_FORM_FIELD_ID,
|
|
2219
|
-
useFactory: () => `ga-form-field-${++nextUniqueId$
|
|
2219
|
+
useFactory: () => `ga-form-field-${++nextUniqueId$8}`,
|
|
2220
2220
|
},
|
|
2221
2221
|
GaFormFieldConnector,
|
|
2222
2222
|
], template: "<ng-content select=\"ga-label\" />\n<ng-content />\n<ga-field-callout />\n" }]
|
|
2223
2223
|
}] });
|
|
2224
2224
|
|
|
2225
|
-
let nextUniqueId$
|
|
2225
|
+
let nextUniqueId$7 = 0;
|
|
2226
2226
|
/**
|
|
2227
2227
|
* Internal tooltip component used by the gaTooltip directive.
|
|
2228
2228
|
* This component is not intended for direct use in templates.
|
|
@@ -2230,7 +2230,7 @@ let nextUniqueId$6 = 0;
|
|
|
2230
2230
|
* @internal
|
|
2231
2231
|
*/
|
|
2232
2232
|
class GaTooltipComponent {
|
|
2233
|
-
uniqueId = `ga-tooltip-${++nextUniqueId$
|
|
2233
|
+
uniqueId = `ga-tooltip-${++nextUniqueId$7}`;
|
|
2234
2234
|
mouseLeaveSubject = new Subject();
|
|
2235
2235
|
afterMouseLeave = () => this.mouseLeaveSubject.asObservable();
|
|
2236
2236
|
mouseOver = signal(false);
|
|
@@ -3548,10 +3548,10 @@ const RADIO_CONTROL_VALUE_ACCESSOR = {
|
|
|
3548
3548
|
multi: true,
|
|
3549
3549
|
};
|
|
3550
3550
|
// Increasing integer for generating unique ids for radio components.
|
|
3551
|
-
let nextUniqueId$
|
|
3551
|
+
let nextUniqueId$6 = 0;
|
|
3552
3552
|
class GaRadioGroupComponent {
|
|
3553
3553
|
/** Name of the radio button group. All radio buttons inside this group will use this name. */
|
|
3554
|
-
name = input(`ga-radio-group-${nextUniqueId$
|
|
3554
|
+
name = input(`ga-radio-group-${nextUniqueId$6++}`);
|
|
3555
3555
|
/**
|
|
3556
3556
|
* Value for the radio-group. Should equal the value of the selected radio button if there is
|
|
3557
3557
|
* a corresponding radio button with a matching value. If there is not such a corresponding
|
|
@@ -3610,7 +3610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3610
3610
|
}] });
|
|
3611
3611
|
|
|
3612
3612
|
// Increasing integer for generating unique ids for radio button components.
|
|
3613
|
-
let nextUniqueId$
|
|
3613
|
+
let nextUniqueId$5 = 0;
|
|
3614
3614
|
class GaRadioButtonComponent {
|
|
3615
3615
|
radioGroup = inject(GaRadioGroupComponent, {
|
|
3616
3616
|
optional: true,
|
|
@@ -3619,7 +3619,7 @@ class GaRadioButtonComponent {
|
|
|
3619
3619
|
optional: true,
|
|
3620
3620
|
});
|
|
3621
3621
|
implicitNgControlState = injectNgControlState();
|
|
3622
|
-
_uniqueId = `ga-radio-button-${++nextUniqueId$
|
|
3622
|
+
_uniqueId = `ga-radio-button-${++nextUniqueId$5}`;
|
|
3623
3623
|
/** The value attribute of the native input element */
|
|
3624
3624
|
value = input(null);
|
|
3625
3625
|
inputId = input(null, { alias: 'id' });
|
|
@@ -3885,9 +3885,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3885
3885
|
}, template: "@if (loading()) {\n <ga-select-dropdown-spinner />\n} @else {\n <ng-content />\n}\n" }]
|
|
3886
3886
|
}] });
|
|
3887
3887
|
|
|
3888
|
-
let nextUniqueId$
|
|
3888
|
+
let nextUniqueId$4 = 0;
|
|
3889
3889
|
class GaSelectComponent {
|
|
3890
|
-
_uniqueId = `ga-select-${++nextUniqueId$
|
|
3890
|
+
_uniqueId = `ga-select-${++nextUniqueId$4}`;
|
|
3891
3891
|
icons = { CircleX };
|
|
3892
3892
|
_onTouched;
|
|
3893
3893
|
_onModelChanged;
|
|
@@ -4734,9 +4734,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
4734
4734
|
args: [{ selector: 'ga-intersection-trigger', template: ``, styles: [":host{height:0px;display:block;flex-shrink:0}\n"] }]
|
|
4735
4735
|
}], ctorParameters: () => [] });
|
|
4736
4736
|
|
|
4737
|
-
let nextUniqueId$
|
|
4737
|
+
let nextUniqueId$3 = 0;
|
|
4738
4738
|
class GaDataSelectComponent {
|
|
4739
|
-
_uniqueId = `ga-data-select-${++nextUniqueId$
|
|
4739
|
+
_uniqueId = `ga-data-select-${++nextUniqueId$3}`;
|
|
4740
4740
|
icons = { CircleX };
|
|
4741
4741
|
_onTouched;
|
|
4742
4742
|
_onModelChanged;
|
|
@@ -5353,13 +5353,13 @@ const SWITCH_CONTROL_VALUE_ACCESSOR = {
|
|
|
5353
5353
|
multi: true,
|
|
5354
5354
|
};
|
|
5355
5355
|
// Increasing integer for generating unique ids for switch components.
|
|
5356
|
-
let nextUniqueId$
|
|
5356
|
+
let nextUniqueId$2 = 0;
|
|
5357
5357
|
class GaSwitchComponent {
|
|
5358
5358
|
icons = { Check };
|
|
5359
5359
|
/** @ignore */
|
|
5360
5360
|
implicitNgControlState = injectNgControlState();
|
|
5361
5361
|
/** @ignore */
|
|
5362
|
-
_uniqueId = `ga-switch-${++nextUniqueId$
|
|
5362
|
+
_uniqueId = `ga-switch-${++nextUniqueId$2}`;
|
|
5363
5363
|
/** @ignore */
|
|
5364
5364
|
tabindex = input(0, {
|
|
5365
5365
|
alias: 'tabindex',
|
|
@@ -5551,6 +5551,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
5551
5551
|
}]
|
|
5552
5552
|
}] });
|
|
5553
5553
|
|
|
5554
|
+
class GaTabContentDirective {
|
|
5555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5556
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: GaTabContentDirective, isStandalone: true, selector: "ng-template[gaTabContent]", ngImport: i0 });
|
|
5557
|
+
}
|
|
5558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabContentDirective, decorators: [{
|
|
5559
|
+
type: Directive,
|
|
5560
|
+
args: [{
|
|
5561
|
+
selector: 'ng-template[gaTabContent]',
|
|
5562
|
+
}]
|
|
5563
|
+
}] });
|
|
5564
|
+
class GaTabComponent {
|
|
5565
|
+
title = input('');
|
|
5566
|
+
disabled = input(false, { transform: booleanAttribute });
|
|
5567
|
+
rightIcon = input();
|
|
5568
|
+
rightIconColor = input();
|
|
5569
|
+
/** @ignore */
|
|
5570
|
+
explicitContent = contentChild(GaTabContentDirective, {
|
|
5571
|
+
read: TemplateRef,
|
|
5572
|
+
});
|
|
5573
|
+
/** @ignore */
|
|
5574
|
+
implicitContent = viewChild.required(TemplateRef);
|
|
5575
|
+
/** @ignore */
|
|
5576
|
+
contentTpl = computed(() => {
|
|
5577
|
+
return this.explicitContent() ?? this.implicitContent();
|
|
5578
|
+
});
|
|
5579
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: GaTabComponent, isStandalone: true, selector: "ga-tab", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, rightIcon: { classPropertyName: "rightIcon", publicName: "rightIcon", isSignal: true, isRequired: false, transformFunction: null }, rightIconColor: { classPropertyName: "rightIconColor", publicName: "rightIconColor", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "explicitContent", first: true, predicate: GaTabContentDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template><ng-content></ng-content></ng-template>\n" });
|
|
5581
|
+
}
|
|
5582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabComponent, decorators: [{
|
|
5583
|
+
type: Component,
|
|
5584
|
+
args: [{ selector: 'ga-tab', template: "<ng-template><ng-content></ng-content></ng-template>\n" }]
|
|
5585
|
+
}] });
|
|
5586
|
+
|
|
5587
|
+
// Increasing integer for generating unique id for tabpanels.
|
|
5588
|
+
let nextUniqueId$1 = 0;
|
|
5589
|
+
class GaTabsComponent {
|
|
5590
|
+
/** @ignore */
|
|
5591
|
+
uniqueId = `ga-tabs-${nextUniqueId$1++}`;
|
|
5592
|
+
/** @ignore */
|
|
5593
|
+
selectedTab = signal(null);
|
|
5594
|
+
/** @ignore */
|
|
5595
|
+
tabs = contentChildren(GaTabComponent);
|
|
5596
|
+
withKeyline = input(false, { transform: booleanAttribute });
|
|
5597
|
+
orientation = input('horizontal');
|
|
5598
|
+
ariaLabel = input(undefined, { alias: 'aria-label' });
|
|
5599
|
+
ariaLabelledby = input(undefined, {
|
|
5600
|
+
alias: 'aria-labelledby',
|
|
5601
|
+
});
|
|
5602
|
+
selectedIndexInput = input(0, {
|
|
5603
|
+
transform: numberAttribute,
|
|
5604
|
+
alias: 'selectedIndex',
|
|
5605
|
+
});
|
|
5606
|
+
selectedIndex = linkedSignal(() => this.selectedIndexInput());
|
|
5607
|
+
beforeTabChange = output();
|
|
5608
|
+
selectedIndexChange = output();
|
|
5609
|
+
selectedTabChange = output();
|
|
5610
|
+
constructor() {
|
|
5611
|
+
effect(() => {
|
|
5612
|
+
const selectedIndex = this.selectedIndex();
|
|
5613
|
+
untracked(() => this.selectTab(selectedIndex, false));
|
|
5614
|
+
});
|
|
5615
|
+
effect(() => {
|
|
5616
|
+
const selectedTab = this.selectedTab();
|
|
5617
|
+
const tabs = this.tabs();
|
|
5618
|
+
if (selectedTab && !tabs.includes(selectedTab)) {
|
|
5619
|
+
untracked(() => this.selectTab(this.selectedIndex(), true));
|
|
5620
|
+
}
|
|
5621
|
+
});
|
|
5622
|
+
}
|
|
5623
|
+
/** @ignore */
|
|
5624
|
+
onTabClick(index) {
|
|
5625
|
+
let canChange = true;
|
|
5626
|
+
this.beforeTabChange.emit({
|
|
5627
|
+
newIndex: index,
|
|
5628
|
+
oldIndex: this.selectedIndex(),
|
|
5629
|
+
preventChange: () => {
|
|
5630
|
+
canChange = false;
|
|
5631
|
+
},
|
|
5632
|
+
});
|
|
5633
|
+
if (canChange) {
|
|
5634
|
+
this.selectTab(index, true);
|
|
5635
|
+
}
|
|
5636
|
+
}
|
|
5637
|
+
selectTab(index, broadcastEvent) {
|
|
5638
|
+
const tabs = this.tabs();
|
|
5639
|
+
if (!tabs?.length) {
|
|
5640
|
+
return;
|
|
5641
|
+
}
|
|
5642
|
+
const clampedTabIndex = Math.min(tabs.length - 1, Math.max(index || 0, 0));
|
|
5643
|
+
const tabAtIndex = tabs.find((_, i) => i === clampedTabIndex);
|
|
5644
|
+
if (tabAtIndex.disabled()) {
|
|
5645
|
+
return;
|
|
5646
|
+
}
|
|
5647
|
+
if (clampedTabIndex !== this.selectedIndex()) {
|
|
5648
|
+
this.selectedIndex.set(clampedTabIndex);
|
|
5649
|
+
if (broadcastEvent) {
|
|
5650
|
+
this.selectedIndexChange.emit(clampedTabIndex);
|
|
5651
|
+
}
|
|
5652
|
+
}
|
|
5653
|
+
if (tabAtIndex !== this.selectedTab()) {
|
|
5654
|
+
this.selectedTab.set(tabAtIndex);
|
|
5655
|
+
if (broadcastEvent) {
|
|
5656
|
+
this.selectedTabChange.emit({
|
|
5657
|
+
index: clampedTabIndex,
|
|
5658
|
+
tab: tabAtIndex,
|
|
5659
|
+
});
|
|
5660
|
+
}
|
|
5661
|
+
}
|
|
5662
|
+
}
|
|
5663
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5664
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GaTabsComponent, isStandalone: true, selector: "ga-tabs", inputs: { withKeyline: { classPropertyName: "withKeyline", publicName: "withKeyline", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, selectedIndexInput: { classPropertyName: "selectedIndexInput", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { beforeTabChange: "beforeTabChange", selectedIndexChange: "selectedIndexChange", selectedTabChange: "selectedTabChange" }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "class.ga-tabs-container--horizontal": "orientation() === 'horizontal'", "class.ga-tabs-container--vertical": "orientation() === 'vertical'" } }, queries: [{ propertyName: "tabs", predicate: GaTabComponent, isSignal: true }], ngImport: i0, template: "<ul\n role=\"tablist\"\n [attr.id]=\"uniqueId\"\n class=\"ga-tabs\"\n [class.ga-tabs--horizontal]=\"orientation() === 'horizontal'\"\n [class.ga-tabs--vertical]=\"orientation() === 'vertical'\"\n [class.ga-tabs--keyline]=\"withKeyline()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-orientation]=\"orientation()\"\n>\n @for (tab of tabs(); track tab; let i = $index) {\n <li\n [attr.id]=\"uniqueId + '-tablabel-' + i\"\n class=\"ga-tabs__tab\"\n [class.ga-tabs__tab--selected]=\"i === selectedIndex()\"\n [class.ga-tabs__tab--disabled]=\"tab.disabled()\"\n role=\"tab\"\n [tabindex]=\"tab.disabled() ? -1 : undefined\"\n (click)=\"onTabClick(i); $event.preventDefault()\"\n (keydown.enter)=\"onTabClick(i); $event.preventDefault()\"\n (keydown.space)=\"onTabClick(i); $event.preventDefault()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [attr.aria-disabled]=\"tab.disabled()\"\n [attr.aria-controls]=\"uniqueId + '-tabpanel-' + i\"\n >\n {{ tab.title() }}\n @let tabTitleIcon = tab.rightIcon();\n @if (tabTitleIcon) {\n <ga-icon\n [icon]=\"tabTitleIcon\"\n size=\"16\"\n class=\"ga-tabs__tab-icon\"\n [color]=\"tab.rightIconColor()\"\n />\n }\n </li>\n }\n</ul>\n\n@for (tab of tabs(); track tab; let i = $index) {\n @if (tab === selectedTab()) {\n <div\n role=\"tabpanel\"\n [attr.id]=\"uniqueId + '-tabpanel-' + i\"\n [attr.aria-labelledby]=\"uniqueId + '-tablabel-' + i\"\n >\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl()\"></ng-template>\n </div>\n }\n}\n", styles: [":host{display:flex}:host.ga-tabs-container--horizontal{flex-direction:column}:host.ga-tabs-container--vertical{flex-direction:row}:host .ga-tabs{overflow:auto;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GaIconComponent, selector: "ga-icon", inputs: ["icon", "size", "color", "strokeWidth"] }] });
|
|
5665
|
+
}
|
|
5666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabsComponent, decorators: [{
|
|
5667
|
+
type: Component,
|
|
5668
|
+
args: [{ selector: 'ga-tabs', imports: [NgTemplateOutlet, GaIconComponent], host: {
|
|
5669
|
+
'[attr.aria-label]': 'null',
|
|
5670
|
+
'[attr.aria-labelledby]': 'null',
|
|
5671
|
+
'[class.ga-tabs-container--horizontal]': "orientation() === 'horizontal'",
|
|
5672
|
+
'[class.ga-tabs-container--vertical]': "orientation() === 'vertical'",
|
|
5673
|
+
}, template: "<ul\n role=\"tablist\"\n [attr.id]=\"uniqueId\"\n class=\"ga-tabs\"\n [class.ga-tabs--horizontal]=\"orientation() === 'horizontal'\"\n [class.ga-tabs--vertical]=\"orientation() === 'vertical'\"\n [class.ga-tabs--keyline]=\"withKeyline()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-orientation]=\"orientation()\"\n>\n @for (tab of tabs(); track tab; let i = $index) {\n <li\n [attr.id]=\"uniqueId + '-tablabel-' + i\"\n class=\"ga-tabs__tab\"\n [class.ga-tabs__tab--selected]=\"i === selectedIndex()\"\n [class.ga-tabs__tab--disabled]=\"tab.disabled()\"\n role=\"tab\"\n [tabindex]=\"tab.disabled() ? -1 : undefined\"\n (click)=\"onTabClick(i); $event.preventDefault()\"\n (keydown.enter)=\"onTabClick(i); $event.preventDefault()\"\n (keydown.space)=\"onTabClick(i); $event.preventDefault()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [attr.aria-disabled]=\"tab.disabled()\"\n [attr.aria-controls]=\"uniqueId + '-tabpanel-' + i\"\n >\n {{ tab.title() }}\n @let tabTitleIcon = tab.rightIcon();\n @if (tabTitleIcon) {\n <ga-icon\n [icon]=\"tabTitleIcon\"\n size=\"16\"\n class=\"ga-tabs__tab-icon\"\n [color]=\"tab.rightIconColor()\"\n />\n }\n </li>\n }\n</ul>\n\n@for (tab of tabs(); track tab; let i = $index) {\n @if (tab === selectedTab()) {\n <div\n role=\"tabpanel\"\n [attr.id]=\"uniqueId + '-tabpanel-' + i\"\n [attr.aria-labelledby]=\"uniqueId + '-tablabel-' + i\"\n >\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl()\"></ng-template>\n </div>\n }\n}\n", styles: [":host{display:flex}:host.ga-tabs-container--horizontal{flex-direction:column}:host.ga-tabs-container--vertical{flex-direction:row}:host .ga-tabs{overflow:auto;white-space:nowrap}\n"] }]
|
|
5674
|
+
}], ctorParameters: () => [] });
|
|
5675
|
+
|
|
5676
|
+
class GaTabsModule {
|
|
5677
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5678
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: GaTabsModule, imports: [GaTabsComponent, GaTabComponent, GaTabContentDirective], exports: [GaTabsComponent, GaTabComponent, GaTabContentDirective] });
|
|
5679
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabsModule, imports: [GaTabsComponent] });
|
|
5680
|
+
}
|
|
5681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GaTabsModule, decorators: [{
|
|
5682
|
+
type: NgModule,
|
|
5683
|
+
args: [{
|
|
5684
|
+
imports: [GaTabsComponent, GaTabComponent, GaTabContentDirective],
|
|
5685
|
+
exports: [GaTabsComponent, GaTabComponent, GaTabContentDirective],
|
|
5686
|
+
}]
|
|
5687
|
+
}] });
|
|
5688
|
+
|
|
5554
5689
|
let nextUniqueId = 0;
|
|
5555
5690
|
class GaTextAreaDirective {
|
|
5556
5691
|
implicitNgControlState = injectNgControlState();
|
|
@@ -5710,5 +5845,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
5710
5845
|
* Generated bundle index. Do not edit.
|
|
5711
5846
|
*/
|
|
5712
5847
|
|
|
5713
|
-
export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DEFAULT_MODAL_OPTIONS, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_BUTTON_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_DATA_SELECT_I18N_FACTORY, GA_DATA_SELECT_REQUIRED_VALIDATOR, GA_DATEPICKER_I18N_FACTORY, GA_DATEPICKER_PARSER_FORMATTER_FACTORY, GA_DATEPICKER_VALUE_ADAPTER_FACTORY, GA_DATE_PARSER_FORMATTER_CONFIG, GA_DEFAULT_DATEPICKER_FORMATS, GA_FORM_CONTROL_ADAPTER, GA_FORM_ERRORS, GA_ICON_DEFAULT_SIZE, GA_MODAL_DATA, GA_MODAL_I18N_FACTORY, GA_SELECT_I18N_FACTORY, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonI18n, GaButtonI18nDefault, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaChipComponent, GaChipListboxComponent, GaChipModule, GaDataSelectComponent, GaDataSelectI18n, GaDataSelectI18nDefault, GaDataSelectModule, GaDataSelectOptgroupLabelDirective, GaDataSelectOptionLabelDirective, GaDataSelectRequiredValidator, GaDataSelectValueDirective, GaDatepickerComponent, GaDatepickerI18n, GaDatepickerI18nDefault, GaDatepickerInputDirective, GaDatepickerModule, GaDatepickerNativeUtcIsoValueAdapter, GaDatepickerNativeUtcValueAdapter, GaDatepickerParserFormatter, GaDatepickerParserFormatterDefault, GaDatepickerStructValueAdapter, GaDatepickerToggleComponent, GaDatepickerValueAdapter, GaFieldErrorDirective, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormControlErrorsDirective, GaFormFieldComponent, GaFormFieldConnector, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLabelledByFormFieldDirective, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaModalActionsComponent, GaModalCloseDirective, GaModalComponent, GaModalContentComponent, GaModalDescriptionComponent, GaModalDescriptionDirective, GaModalHeaderComponent, GaModalI18n, GaModalI18nDefault, GaModalLabelDirective, GaModalModule, GaModalOptions, GaModalRef, GaModalService, GaModalTitleDirective, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectI18n, GaSelectI18nDefault, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaSwitchComponent, GaSwitchModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, compareStructs, extendGaDateParserFormatter, injectNgControlState, provideGaAlertI18n, provideGaBaseFontSize, provideGaButtonI18n, provideGaDataSelectI18n, provideGaDatepickerI18n, provideGaDatepickerParserFormatter, provideGaDatepickerValueAdapter, provideGaFormErrors, provideGaModalI18n, provideGaModalOptions, provideGaSelectI18n };
|
|
5848
|
+
export { CHECKBOX_CONTROL_VALUE_ACCESSOR, DEFAULT_MODAL_OPTIONS, GA_ALERT_I18N_FACTORY, GA_BASE_FONT_SIZE, GA_BUTTON_I18N_FACTORY, GA_CHECKBOX_REQUIRED_VALIDATOR, GA_DATA_SELECT_I18N_FACTORY, GA_DATA_SELECT_REQUIRED_VALIDATOR, GA_DATEPICKER_I18N_FACTORY, GA_DATEPICKER_PARSER_FORMATTER_FACTORY, GA_DATEPICKER_VALUE_ADAPTER_FACTORY, GA_DATE_PARSER_FORMATTER_CONFIG, GA_DEFAULT_DATEPICKER_FORMATS, GA_FORM_CONTROL_ADAPTER, GA_FORM_ERRORS, GA_ICON_DEFAULT_SIZE, GA_MODAL_DATA, GA_MODAL_I18N_FACTORY, GA_SELECT_I18N_FACTORY, GA_SELECT_REQUIRED_VALIDATOR, GA_TOOLTIP_DEFAULT_OFFSET, GaAlertComponent, GaAlertI18n, GaAlertI18nDefault, GaAlertModule, GaAlertTitleActionsComponent, GaAlertTitleComponent, GaBadgeComponent, GaBadgeModule, GaButtonDirective, GaButtonI18n, GaButtonI18nDefault, GaButtonModule, GaCardComponent, GaCardModule, GaCheckboxComponent, GaCheckboxModule, GaCheckboxRequiredValidator, GaChipComponent, GaChipListboxComponent, GaChipModule, GaDataSelectComponent, GaDataSelectI18n, GaDataSelectI18nDefault, GaDataSelectModule, GaDataSelectOptgroupLabelDirective, GaDataSelectOptionLabelDirective, GaDataSelectRequiredValidator, GaDataSelectValueDirective, GaDatepickerComponent, GaDatepickerI18n, GaDatepickerI18nDefault, GaDatepickerInputDirective, GaDatepickerModule, GaDatepickerNativeUtcIsoValueAdapter, GaDatepickerNativeUtcValueAdapter, GaDatepickerParserFormatter, GaDatepickerParserFormatterDefault, GaDatepickerStructValueAdapter, GaDatepickerToggleComponent, GaDatepickerValueAdapter, GaFieldErrorDirective, GaFieldInfoComponent, GaFieldLabelComponent, GaFormControlDirective, GaFormControlErrorsDirective, GaFormFieldComponent, GaFormFieldConnector, GaFormFieldModule, GaIconButtonDirective, GaIconComponent, GaIconModule, GaInputComponent, GaInputDirective, GaInputModule, GaLabelledByFormFieldDirective, GaLinkDirective, GaLinkModule, GaMenuComponent, GaMenuItemComponent, GaMenuModule, GaMenuSeparatorComponent, GaMenuTitleComponent, GaMenuTriggerDirective, GaMenuTriggerIconComponent, GaModalActionsComponent, GaModalCloseDirective, GaModalComponent, GaModalContentComponent, GaModalDescriptionComponent, GaModalDescriptionDirective, GaModalHeaderComponent, GaModalI18n, GaModalI18nDefault, GaModalLabelDirective, GaModalModule, GaModalOptions, GaModalRef, GaModalService, GaModalTitleDirective, GaOptgroupComponent, GaOptionComponent, GaRadioButtonComponent, GaRadioGroupComponent, GaRadioModule, GaSegmentedControlButtonDirective, GaSegmentedControlComponent, GaSegmentedControlIconButtonComponent, GaSegmentedControlModule, GaSegmentedControlTextButtonComponent, GaSelectComponent, GaSelectDropdownComponent, GaSelectDropdownSpinnerComponent, GaSelectI18n, GaSelectI18nDefault, GaSelectModule, GaSelectRequiredValidator, GaSelectValueComponent, GaSpinnerComponent, GaSpinnerModule, GaSwitchComponent, GaSwitchModule, GaTabComponent, GaTabContentDirective, GaTabsComponent, GaTabsModule, GaTextAreaDirective, GaTextAreaModule, GaTooltipComponent, GaTooltipDirective, GaTooltipModule, RADIO_CONTROL_VALUE_ACCESSOR, SWITCH_CONTROL_VALUE_ACCESSOR, compareStructs, extendGaDateParserFormatter, injectNgControlState, provideGaAlertI18n, provideGaBaseFontSize, provideGaButtonI18n, provideGaDataSelectI18n, provideGaDatepickerI18n, provideGaDatepickerParserFormatter, provideGaDatepickerValueAdapter, provideGaFormErrors, provideGaModalI18n, provideGaModalOptions, provideGaSelectI18n };
|
|
5714
5849
|
//# sourceMappingURL=vsn-ux-ngx-gaia.mjs.map
|