valtech-components 2.0.430 → 2.0.431
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/esm2022/lib/components/organisms/article/types.mjs +2 -2
- package/esm2022/lib/components/organisms/tabbed-content/tabbed-content.component.mjs +170 -0
- package/esm2022/lib/components/organisms/tabbed-content/types.mjs +2 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +168 -3
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/tabbed-content/tabbed-content.component.d.ts +65 -0
- package/lib/components/organisms/tabbed-content/types.d.ts +53 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { SegmentControlMetadata } from '../../molecules/segment-control/types';
|
|
3
|
+
import { TabbedContentMetadata, TabbedContentTab, TabbedContentContext } from './types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* val-tabbed-content
|
|
7
|
+
*
|
|
8
|
+
* A container component that combines segment navigation with dynamic content panels.
|
|
9
|
+
* Uses segment-control internally for tab navigation and renders the associated
|
|
10
|
+
* template for the active tab.
|
|
11
|
+
*
|
|
12
|
+
* @example Basic usage with templates
|
|
13
|
+
* ```html
|
|
14
|
+
* <ng-template #catalogTemplate>
|
|
15
|
+
* <div>Catalog Content</div>
|
|
16
|
+
* </ng-template>
|
|
17
|
+
* <ng-template #settingsTemplate>
|
|
18
|
+
* <div>Settings Content</div>
|
|
19
|
+
* </ng-template>
|
|
20
|
+
*
|
|
21
|
+
* <val-tabbed-content [props]="{
|
|
22
|
+
* tabs: [
|
|
23
|
+
* { value: 'catalog', label: 'Catalog', icon: 'layers-outline', template: catalogTemplate },
|
|
24
|
+
* { value: 'settings', label: 'Settings', icon: 'settings-outline', template: settingsTemplate }
|
|
25
|
+
* ],
|
|
26
|
+
* selectedTab: 'catalog',
|
|
27
|
+
* scrollable: true,
|
|
28
|
+
* animated: true
|
|
29
|
+
* }" (tabChange)="onTabChange($event)"></val-tabbed-content>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @input props: TabbedContentMetadata - Configuration for the tabbed content
|
|
33
|
+
* @output tabChange: string - Emits the selected tab value when changed
|
|
34
|
+
*/
|
|
35
|
+
export declare class TabbedContentComponent implements OnInit {
|
|
36
|
+
/**
|
|
37
|
+
* Configuration object for the tabbed content.
|
|
38
|
+
*/
|
|
39
|
+
props: TabbedContentMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* Emits when the active tab changes.
|
|
42
|
+
*/
|
|
43
|
+
tabChange: EventEmitter<string>;
|
|
44
|
+
/** Currently selected tab value */
|
|
45
|
+
private selectedValue;
|
|
46
|
+
/** Whether a transition is in progress */
|
|
47
|
+
isTransitioning: import("@angular/core").WritableSignal<boolean>;
|
|
48
|
+
/** Computed animation duration string */
|
|
49
|
+
animationDuration: import("@angular/core").Signal<string>;
|
|
50
|
+
/** Computed segment control props derived from tabs config */
|
|
51
|
+
segmentControlProps: import("@angular/core").Signal<SegmentControlMetadata>;
|
|
52
|
+
/** Computed active tab object */
|
|
53
|
+
activeTab: import("@angular/core").Signal<TabbedContentTab>;
|
|
54
|
+
ngOnInit(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Handles segment change events.
|
|
57
|
+
*/
|
|
58
|
+
onSegmentChange(value: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Creates the context object for the template outlet.
|
|
61
|
+
*/
|
|
62
|
+
getTemplateContext(tab: TabbedContentTab): TabbedContentContext;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TabbedContentComponent, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TabbedContentComponent, "val-tabbed-content", never, { "props": { "alias": "props"; "required": false; }; }, { "tabChange": "tabChange"; }, never, never, true, never>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { Color } from '@ionic/core';
|
|
3
|
+
/**
|
|
4
|
+
* Context passed to each tab's template.
|
|
5
|
+
*/
|
|
6
|
+
export interface TabbedContentContext {
|
|
7
|
+
/** The value of the active tab */
|
|
8
|
+
$implicit: string;
|
|
9
|
+
/** The full tab configuration */
|
|
10
|
+
tab: TabbedContentTab;
|
|
11
|
+
/** Index of the tab */
|
|
12
|
+
index: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for a single tab.
|
|
16
|
+
*/
|
|
17
|
+
export interface TabbedContentTab {
|
|
18
|
+
/** Unique identifier for the tab */
|
|
19
|
+
value: string;
|
|
20
|
+
/** Display label for the tab button */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Icon name (Ionicons) */
|
|
23
|
+
icon?: string;
|
|
24
|
+
/** Whether the tab is disabled */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Layout direction for icon and label */
|
|
27
|
+
layout?: 'icon-start' | 'icon-end' | 'icon-top' | 'icon-bottom';
|
|
28
|
+
/** Template to render when this tab is active */
|
|
29
|
+
template: TemplateRef<TabbedContentContext>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Metadata for the tabbed-content component.
|
|
33
|
+
*/
|
|
34
|
+
export interface TabbedContentMetadata {
|
|
35
|
+
/** Array of tab configurations */
|
|
36
|
+
tabs: TabbedContentTab[];
|
|
37
|
+
/** Initially selected tab value (defaults to first tab) */
|
|
38
|
+
selectedTab?: string;
|
|
39
|
+
/** Color theme for the segment control */
|
|
40
|
+
color?: Color;
|
|
41
|
+
/** Allow horizontal scrolling for many tabs */
|
|
42
|
+
scrollable?: boolean;
|
|
43
|
+
/** Enable swipe gesture to change tabs (iOS only) */
|
|
44
|
+
swipeGesture?: boolean;
|
|
45
|
+
/** Visual mode style */
|
|
46
|
+
mode?: 'ios' | 'md';
|
|
47
|
+
/** Enable fade animation on tab change */
|
|
48
|
+
animated?: boolean;
|
|
49
|
+
/** Animation duration in milliseconds */
|
|
50
|
+
animationDuration?: number;
|
|
51
|
+
/** Additional CSS class for the container */
|
|
52
|
+
cssClass?: string;
|
|
53
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -185,6 +185,8 @@ export * from './lib/components/organisms/company-footer/company-footer.componen
|
|
|
185
185
|
export * from './lib/components/organisms/company-footer/types';
|
|
186
186
|
export * from './lib/components/organisms/menu/menu.component';
|
|
187
187
|
export * from './lib/components/organisms/menu/types';
|
|
188
|
+
export * from './lib/components/organisms/tabbed-content/tabbed-content.component';
|
|
189
|
+
export * from './lib/components/organisms/tabbed-content/types';
|
|
188
190
|
export * from './lib/components/templates/layout/layout.component';
|
|
189
191
|
export * from './lib/components/templates/simple/simple.component';
|
|
190
192
|
export * from './lib/components/templates/simple/types';
|