@sixbell-telco/sdk 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/README.md +44 -0
- package/_index.css +52 -25
- package/components/avatar/src/avatar.component.d.ts +40 -26
- package/components/button/src/button.component.d.ts +2 -2
- package/components/dropdown/dropdown-chevron/dropdown-chevron.component.d.ts +39 -0
- package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +41 -0
- package/components/dropdown/dropdown-group/dropdown-group.component.d.ts +9 -0
- package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +23 -12
- package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +49 -0
- package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +53 -0
- package/components/dropdown/dropdown-label/dropdown-label.component.d.ts +17 -0
- package/components/dropdown/dropdown-separator/dropdown-separator.component.d.ts +21 -0
- package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +121 -0
- package/components/dropdown/public-api.d.ts +9 -0
- package/components/dropdown/src/dropdown.component.d.ts +20 -174
- package/components/dropdown/src/services/dropdown.service.d.ts +22 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +22 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +64 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +37 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +54 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +58 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-label/dropdown-menu-bar-label.component.d.ts +16 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-separator/dropdown-menu-bar-separator.component.d.ts +16 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +29 -0
- package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +50 -0
- package/components/dropdown-menu/bar/index.d.ts +5 -0
- package/components/dropdown-menu/bar/public-api.d.ts +9 -0
- package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +23 -0
- package/components/dropdown-menu/context/index.d.ts +5 -0
- package/components/dropdown-menu/context/public-api.d.ts +1 -0
- package/components/dropdown-menu/dropdown-menu-chevron/dropdown-menu-chevron.component.d.ts +43 -0
- package/components/dropdown-menu/index.d.ts +5 -0
- package/components/dropdown-menu/public-api.d.ts +13 -0
- package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +40 -0
- package/components/dropdown-menu/src/dropdown-menu/dropdown-menu.component.d.ts +9 -0
- package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +40 -0
- package/components/dropdown-menu/src/dropdown-menu-group/dropdown-menu-group.component.d.ts +8 -0
- package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +38 -0
- package/components/dropdown-menu/src/dropdown-menu-label/dropdown-menu-label.component.d.ts +16 -0
- package/components/dropdown-menu/src/dropdown-menu-separator/dropdown-menu-separator.component.d.ts +16 -0
- package/components/dropdown-menu/src/dropdown-menu-sub/dropdown-menu-sub.component.d.ts +8 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +31 -0
- package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +18 -0
- package/components/dropdown-menu/src/dropdown-menu-trigger/dropdown-menu-trigger.component.d.ts +19 -0
- package/components/dropdown-menu/src/services/dropdown-menu.service.d.ts +22 -0
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +75 -39
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +1 -0
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +529 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +52 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +539 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +592 -213
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +139 -0
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +183 -0
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -0
- package/package.json +21 -1
- package/sixbell-telco-sdk-1.1.0.tgz +0 -0
- package/utils/theme/index.d.ts +5 -0
- package/utils/theme/public-api.d.ts +1 -0
- package/utils/theme/src/theme.service.d.ts +55 -0
- package/utils/translation/index.d.ts +5 -0
- package/utils/translation/public-api.d.ts +1 -0
- package/utils/translation/src/translation.service.d.ts +112 -0
- package/sixbell-telco-sdk-1.0.3.tgz +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* DropdownItemRadio - Radio dropdown item
|
|
4
|
+
* Provides radio button functionality for dropdown selections
|
|
5
|
+
*/
|
|
6
|
+
export declare class DropdownItemRadioComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the radio is checked
|
|
9
|
+
*/
|
|
10
|
+
checked: import("@angular/core").InputSignal<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* The value of this radio item
|
|
13
|
+
*/
|
|
14
|
+
value: import("@angular/core").InputSignal<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the menu item is disabled
|
|
17
|
+
*/
|
|
18
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Custom indicator character or text
|
|
21
|
+
*/
|
|
22
|
+
indicator: import("@angular/core").InputSignal<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show the indicator
|
|
25
|
+
*/
|
|
26
|
+
showIndicator: import("@angular/core").InputSignal<boolean>;
|
|
27
|
+
/**
|
|
28
|
+
* Custom CSS classes
|
|
29
|
+
*/
|
|
30
|
+
class: import("@angular/core").InputSignal<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Emitted when the radio state changes
|
|
33
|
+
*/
|
|
34
|
+
checkedChange: import("@angular/core").OutputEmitterRef<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Emitted when the menu item is triggered/clicked
|
|
37
|
+
*/
|
|
38
|
+
triggered: import("@angular/core").OutputEmitterRef<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Computed data state for ARIA
|
|
41
|
+
*/
|
|
42
|
+
dataState: import("@angular/core").Signal<"checked" | "unchecked">;
|
|
43
|
+
/**
|
|
44
|
+
* Handle item click - select this radio option
|
|
45
|
+
*/
|
|
46
|
+
onItemClick(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Computed CSS classes for the menu item
|
|
49
|
+
*/
|
|
50
|
+
itemClass: () => string;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownItemRadioComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownItemRadioComponent, "st-dropdown-item-radio", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indicator": { "alias": "indicator"; "required": false; "isSignal": true; }; "showIndicator": { "alias": "showIndicator"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checkedChange": "checkedChange"; "triggered": "triggered"; }, never, ["*"], true, never>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* DropdownLabel - Label for dropdown sections
|
|
4
|
+
* Provides section headers for dropdown content
|
|
5
|
+
*/
|
|
6
|
+
export declare class DropdownLabelComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Custom CSS classes
|
|
9
|
+
*/
|
|
10
|
+
class: import("@angular/core").InputSignal<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Computed CSS classes for the label
|
|
13
|
+
*/
|
|
14
|
+
labelClass: () => string;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownLabelComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownLabelComponent, "st-dropdown-label", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* DropdownSeparator - Visual separator for dropdown menu sections
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* A simple horizontal divider to separate groups of dropdown items.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <st-dropdown-content>
|
|
11
|
+
* <st-dropdown-item>Item 1</st-dropdown-item>
|
|
12
|
+
* <st-dropdown-item>Item 2</st-dropdown-item>
|
|
13
|
+
* <st-dropdown-separator></st-dropdown-separator>
|
|
14
|
+
* <st-dropdown-item>Item 3</st-dropdown-item>
|
|
15
|
+
* </st-dropdown-content>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class DropdownSeparatorComponent {
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownSeparatorComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownSeparatorComponent, "st-dropdown-separator", never, {}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ConnectedOverlayPositionChange, ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Dropdown X position options for CDK overlay positioning */
|
|
5
|
+
export type DropdownXPosition = 'start' | 'center' | 'end';
|
|
6
|
+
/** Dropdown Y position options for CDK overlay positioning */
|
|
7
|
+
export type DropdownYPosition = 'top' | 'bottom' | 'center';
|
|
8
|
+
/** Dropdown fallback position configuration */
|
|
9
|
+
export interface DropdownFallbackPositions {
|
|
10
|
+
/** Enable automatic fallback positions */
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
/** Custom fallback positions - if not provided, default fallbacks will be used */
|
|
13
|
+
positions?: ConnectedPosition[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* DropdownTrigger - Trigger element for opening dropdown content
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This component acts as the trigger that opens/closes the dropdown content.
|
|
20
|
+
* It can contain any content (buttons, avatars, text, icons, etc.).
|
|
21
|
+
* Uses CdkConnectedOverlay for positioning and management.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <st-dropdown>
|
|
26
|
+
* <st-dropdown-trigger>
|
|
27
|
+
* <button class="btn btn-primary">
|
|
28
|
+
* Open Menu
|
|
29
|
+
* <st-icon [icon]="chevronDown"></st-icon>
|
|
30
|
+
* </button>
|
|
31
|
+
* </st-dropdown-trigger>
|
|
32
|
+
* <st-dropdown-content>
|
|
33
|
+
* <st-dropdown-item>Item 1</st-dropdown-item>
|
|
34
|
+
* </st-dropdown-content>
|
|
35
|
+
* </st-dropdown>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare class DropdownTriggerComponent {
|
|
39
|
+
/** Offset X in pixels */
|
|
40
|
+
offsetX: import("@angular/core").InputSignal<number>;
|
|
41
|
+
/** Offset Y in pixels */
|
|
42
|
+
offsetY: import("@angular/core").InputSignal<number>;
|
|
43
|
+
/** Origin X position */
|
|
44
|
+
originX: import("@angular/core").InputSignal<DropdownXPosition>;
|
|
45
|
+
/** Origin Y position */
|
|
46
|
+
originY: import("@angular/core").InputSignal<DropdownYPosition>;
|
|
47
|
+
/** Overlay X position */
|
|
48
|
+
overlayX: import("@angular/core").InputSignal<DropdownXPosition>;
|
|
49
|
+
/** Overlay Y position */
|
|
50
|
+
overlayY: import("@angular/core").InputSignal<DropdownYPosition>;
|
|
51
|
+
/** Fallback positions configuration */
|
|
52
|
+
fallbacks: import("@angular/core").InputSignal<DropdownFallbackPositions>;
|
|
53
|
+
/** Event emitted when dropdown is opened */
|
|
54
|
+
opened: import("@angular/core").OutputEmitterRef<void>;
|
|
55
|
+
/** Event emitted when dropdown is closed */
|
|
56
|
+
closed: import("@angular/core").OutputEmitterRef<void>;
|
|
57
|
+
/** Current open state */
|
|
58
|
+
isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
59
|
+
/** Current active position configuration */
|
|
60
|
+
currentPosition: import("@angular/core").WritableSignal<ConnectedPosition | null>;
|
|
61
|
+
/** Content template reference */
|
|
62
|
+
contentTemplate: TemplateRef<unknown> | null;
|
|
63
|
+
/**
|
|
64
|
+
* Computed positions array based on signal inputs
|
|
65
|
+
*/
|
|
66
|
+
positions: import("@angular/core").Signal<ConnectedPosition[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Generate default fallback positions based on the primary position
|
|
69
|
+
* Provides comprehensive fallback coverage for all space constraints
|
|
70
|
+
*/
|
|
71
|
+
private generateDefaultFallbacks;
|
|
72
|
+
/**
|
|
73
|
+
* Helper to flip Y position
|
|
74
|
+
*/
|
|
75
|
+
private getOppositeY;
|
|
76
|
+
/**
|
|
77
|
+
* Helper to flip X position
|
|
78
|
+
*/
|
|
79
|
+
private getOppositeX;
|
|
80
|
+
/**
|
|
81
|
+
* Helper to create position variant
|
|
82
|
+
*/
|
|
83
|
+
private createPosition;
|
|
84
|
+
/**
|
|
85
|
+
* Add axis flip fallbacks
|
|
86
|
+
*/
|
|
87
|
+
private addAxisFlips;
|
|
88
|
+
/**
|
|
89
|
+
* Add standard dropdown positions
|
|
90
|
+
*/
|
|
91
|
+
private addStandardPositions;
|
|
92
|
+
/**
|
|
93
|
+
* Add center alignment fallbacks
|
|
94
|
+
*/
|
|
95
|
+
private addCenterFallbacks;
|
|
96
|
+
/**
|
|
97
|
+
* Check if position is duplicate
|
|
98
|
+
*/
|
|
99
|
+
private isPositionDuplicate; /**
|
|
100
|
+
* Set the content template to be displayed in the overlay
|
|
101
|
+
*/
|
|
102
|
+
setContentTemplate(template: TemplateRef<unknown>): void;
|
|
103
|
+
/**
|
|
104
|
+
* Toggle the dropdown open/close state
|
|
105
|
+
*/
|
|
106
|
+
toggle(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Open the dropdown
|
|
109
|
+
*/
|
|
110
|
+
open(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Close the dropdown
|
|
113
|
+
*/
|
|
114
|
+
close(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Handle position changes from CDK overlay
|
|
117
|
+
*/
|
|
118
|
+
onPositionChange(position: ConnectedOverlayPositionChange): void;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownTriggerComponent, never>;
|
|
120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownTriggerComponent, "st-dropdown-trigger", never, { "offsetX": { "alias": "offsetX"; "required": false; "isSignal": true; }; "offsetY": { "alias": "offsetY"; "required": false; "isSignal": true; }; "originX": { "alias": "originX"; "required": false; "isSignal": true; }; "originY": { "alias": "originY"; "required": false; "isSignal": true; }; "overlayX": { "alias": "overlayX"; "required": false; "isSignal": true; }; "overlayY": { "alias": "overlayY"; "required": false; "isSignal": true; }; "fallbacks": { "alias": "fallbacks"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
121
|
+
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
export * from './dropdown-chevron/dropdown-chevron.component';
|
|
2
|
+
export * from './dropdown-content/dropdown-content.component';
|
|
3
|
+
export * from './dropdown-group/dropdown-group.component';
|
|
4
|
+
export * from './dropdown-item-checkbox/dropdown-item-checkbox.component';
|
|
5
|
+
export * from './dropdown-item-radio/dropdown-item-radio.component';
|
|
1
6
|
export * from './dropdown-item/dropdown-item.component';
|
|
7
|
+
export * from './dropdown-label/dropdown-label.component';
|
|
8
|
+
export * from './dropdown-separator/dropdown-separator.component';
|
|
9
|
+
export * from './dropdown-trigger/dropdown-trigger.component';
|
|
2
10
|
export * from './src/dropdown.component';
|
|
11
|
+
export * from './src/services/dropdown.service';
|
|
@@ -1,186 +1,32 @@
|
|
|
1
|
+
import { AfterContentInit } from '@angular/core';
|
|
2
|
+
import { DropdownContentComponent } from '../dropdown-content/dropdown-content.component';
|
|
3
|
+
import { DropdownTriggerComponent } from '../dropdown-trigger/dropdown-trigger.component';
|
|
1
4
|
import * as i0 from "@angular/core";
|
|
2
5
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Generates base dropdown button classes with style variants
|
|
5
|
-
*/
|
|
6
|
-
export declare const dropdownButton: (props?: ({
|
|
7
|
-
variant?: "primary" | "secondary" | "tertiary" | "accent" | "info" | "success" | "warning" | "error" | "icon" | null | undefined;
|
|
8
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
|
-
iconPosition?: "left" | "right" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
-
/** Possible dropdown button style variants */
|
|
12
|
-
export type DropdownButtonVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'icon' | null | undefined;
|
|
13
|
-
/** Possible dropdown button alignment options */
|
|
14
|
-
export type DropdownButtonAlignmentProps = 'center' | 'left' | 'right' | null | undefined;
|
|
15
|
-
/** Possible dropdown button icon positions */
|
|
16
|
-
export type DropdownButtonPositionProps = 'left' | 'right' | null | undefined;
|
|
17
|
-
/** Possible dropdown button size variants */
|
|
18
|
-
export type DropdownButtonSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
* Generates base dropdown menu classes with positioning variants
|
|
22
|
-
*/
|
|
23
|
-
export declare const dropdownMenu: (props?: ({
|
|
24
|
-
menuPosition?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
25
|
-
menuAlignment?: "start" | "end" | null | undefined;
|
|
26
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
|
-
/** Possible dropdown menu position variants */
|
|
28
|
-
export type DropdownMenuPositionProps = 'top' | 'bottom' | 'right' | 'left' | null | undefined;
|
|
29
|
-
/** Possible dropdown menu alignment variants */
|
|
30
|
-
export type DropdownMenuAlignmentProps = 'start' | 'end' | null | undefined;
|
|
31
|
-
/** Configuration object for dropdown styling variants */
|
|
32
|
-
export type DropdownProps = {
|
|
33
|
-
variant?: DropdownButtonVariantProps;
|
|
34
|
-
alignment?: DropdownButtonAlignmentProps;
|
|
35
|
-
menuAlignment?: DropdownMenuAlignmentProps;
|
|
36
|
-
menuPosition?: DropdownMenuPositionProps;
|
|
37
|
-
iconPosition?: DropdownButtonPositionProps;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* @internal
|
|
41
|
-
* Combines dropdown button and menu classes
|
|
42
|
-
*/
|
|
43
|
-
export declare const dropdownComponent: ({ variant, menuAlignment, menuPosition, iconPosition }?: DropdownProps) => string;
|
|
44
|
-
/**
|
|
45
|
-
* A customizable dropdown component with menu positioning and various styling options
|
|
6
|
+
* Dropdown - Main container component for dropdown menus
|
|
46
7
|
*
|
|
47
8
|
* @remarks
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```html
|
|
53
|
-
* <st-dropdown
|
|
54
|
-
* variant="primary"
|
|
55
|
-
* menuPosition="bottom"
|
|
56
|
-
* menuAlignment="end"
|
|
57
|
-
* icon="chevron-down"
|
|
58
|
-
* >
|
|
59
|
-
* <button>Actions</button>
|
|
60
|
-
* <div slot="menu">
|
|
61
|
-
* <button class="menu-item">Edit</button>
|
|
62
|
-
* <button class="menu-item">Delete</button>
|
|
63
|
-
* </div>
|
|
64
|
-
* </st-dropdown>
|
|
65
|
-
* ```
|
|
9
|
+
* This is the root container that provides a wrapper for trigger and content components.
|
|
10
|
+
* The trigger and content components coordinate themselves through this parent component.
|
|
66
11
|
*
|
|
67
12
|
* @example
|
|
68
13
|
* ```html
|
|
69
|
-
* <st-dropdown
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
14
|
+
* <st-dropdown>
|
|
15
|
+
* <st-dropdown-trigger [showChevron]="true">
|
|
16
|
+
* <button class="btn btn-primary">Open Menu</button>
|
|
17
|
+
* </st-dropdown-trigger>
|
|
18
|
+
* <st-dropdown-content>
|
|
19
|
+
* <st-dropdown-item>Item 1</st-dropdown-item>
|
|
20
|
+
* <st-dropdown-item>Item 2</st-dropdown-item>
|
|
21
|
+
* </st-dropdown-content>
|
|
75
22
|
* </st-dropdown>
|
|
76
23
|
* ```
|
|
77
24
|
*/
|
|
78
|
-
export declare class DropdownComponent {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
variant: import("@angular/core").InputSignal<DropdownButtonVariantProps>;
|
|
84
|
-
/**
|
|
85
|
-
* Ghost button style (transparent background)
|
|
86
|
-
* @defaultValue false
|
|
87
|
-
*/
|
|
88
|
-
ghost: import("@angular/core").InputSignal<boolean>;
|
|
89
|
-
/**
|
|
90
|
-
* Outline button style (border with transparent fill)
|
|
91
|
-
* @defaultValue false
|
|
92
|
-
*/
|
|
93
|
-
outline: import("@angular/core").InputSignal<boolean>;
|
|
94
|
-
/**
|
|
95
|
-
* Soft button style (muted/subdued color variant)
|
|
96
|
-
* @defaultValue false
|
|
97
|
-
*/
|
|
98
|
-
soft: import("@angular/core").InputSignal<boolean>;
|
|
99
|
-
/**
|
|
100
|
-
* Dash button style (dashed border)
|
|
101
|
-
* @defaultValue false
|
|
102
|
-
*/
|
|
103
|
-
dash: import("@angular/core").InputSignal<boolean>;
|
|
104
|
-
/**
|
|
105
|
-
* Circular button shape
|
|
106
|
-
* @defaultValue false
|
|
107
|
-
*/
|
|
108
|
-
circle: import("@angular/core").InputSignal<boolean>;
|
|
109
|
-
/**
|
|
110
|
-
* Square button shape
|
|
111
|
-
* @defaultValue false
|
|
112
|
-
*/
|
|
113
|
-
square: import("@angular/core").InputSignal<boolean>;
|
|
114
|
-
/**
|
|
115
|
-
* Glass effect styling
|
|
116
|
-
* @defaultValue false
|
|
117
|
-
*/
|
|
118
|
-
glass: import("@angular/core").InputSignal<boolean>;
|
|
119
|
-
/**
|
|
120
|
-
* Button size variant
|
|
121
|
-
* @defaultValue 'md'
|
|
122
|
-
*/
|
|
123
|
-
size: import("@angular/core").InputSignal<DropdownButtonSizeProps>;
|
|
124
|
-
/**
|
|
125
|
-
* Add drop shadow
|
|
126
|
-
* @defaultValue false
|
|
127
|
-
*/
|
|
128
|
-
shadow: import("@angular/core").InputSignal<boolean>;
|
|
129
|
-
/**
|
|
130
|
-
* Icon name (from icon library)
|
|
131
|
-
*/
|
|
132
|
-
icon: import("@angular/core").InputSignal<string | undefined>;
|
|
133
|
-
/**
|
|
134
|
-
* Position of icon relative to text
|
|
135
|
-
*/
|
|
136
|
-
iconPosition: import("@angular/core").InputSignal<DropdownButtonPositionProps>;
|
|
137
|
-
/**
|
|
138
|
-
* Position of dropdown menu relative to button
|
|
139
|
-
* @defaultValue 'bottom'
|
|
140
|
-
*/
|
|
141
|
-
menuPosition: import("@angular/core").InputSignal<DropdownMenuPositionProps>;
|
|
142
|
-
/**
|
|
143
|
-
* Alignment of dropdown menu content
|
|
144
|
-
*/
|
|
145
|
-
menuAlignment: import("@angular/core").InputSignal<DropdownMenuAlignmentProps>;
|
|
146
|
-
/**
|
|
147
|
-
* Button label text
|
|
148
|
-
*/
|
|
149
|
-
label: import("@angular/core").InputSignal<string | undefined>;
|
|
150
|
-
/**
|
|
151
|
-
* Controls dropdown open/close state
|
|
152
|
-
* @defaultValue false
|
|
153
|
-
*/
|
|
154
|
-
isOpened: import("@angular/core").ModelSignal<boolean>;
|
|
155
|
-
/**
|
|
156
|
-
* Event emitted when dropdown toggle state changes
|
|
157
|
-
*/
|
|
158
|
-
toggled: import("@angular/core").OutputEmitterRef<boolean>;
|
|
159
|
-
/**
|
|
160
|
-
* @internal
|
|
161
|
-
* Computed class string for the dropdown button
|
|
162
|
-
*/
|
|
163
|
-
buttonClass: import("@angular/core").Signal<string>;
|
|
164
|
-
/**
|
|
165
|
-
* @internal
|
|
166
|
-
* Computed class string for the dropdown menu container
|
|
167
|
-
*/
|
|
168
|
-
menuClass: import("@angular/core").Signal<string>;
|
|
169
|
-
/**
|
|
170
|
-
* @internal
|
|
171
|
-
* Computed class string for the dropdown content
|
|
172
|
-
*/
|
|
173
|
-
dropdownContentClass: import("@angular/core").Signal<string>;
|
|
174
|
-
/**
|
|
175
|
-
* @internal
|
|
176
|
-
* Toggles dropdown visibility state
|
|
177
|
-
*/
|
|
178
|
-
handleToggle(): void;
|
|
179
|
-
/**
|
|
180
|
-
* @internal
|
|
181
|
-
* Handles click outside to close dropdown
|
|
182
|
-
*/
|
|
183
|
-
handleClickOuside(): void;
|
|
25
|
+
export declare class DropdownComponent implements AfterContentInit {
|
|
26
|
+
private readonly dropdownService;
|
|
27
|
+
trigger: DropdownTriggerComponent;
|
|
28
|
+
content: DropdownContentComponent;
|
|
29
|
+
ngAfterContentInit(): void;
|
|
184
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
|
|
185
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "st-dropdown", never, {
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "st-dropdown", never, {}, {}, ["trigger", "content"], ["*"], true, never>;
|
|
186
32
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Service to manage dropdown state
|
|
4
|
+
* Used by dropdown components to communicate state to chevron
|
|
5
|
+
*/
|
|
6
|
+
export declare class DropdownService {
|
|
7
|
+
private readonly _isOpen;
|
|
8
|
+
/**
|
|
9
|
+
* Current open state of the dropdown
|
|
10
|
+
*/
|
|
11
|
+
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Set the open state
|
|
14
|
+
*/
|
|
15
|
+
setOpen(open: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* Toggle the open state
|
|
18
|
+
*/
|
|
19
|
+
toggle(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DropdownService>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* DropdownMenuBar - Container for horizontal menu bar (like Google Docs)
|
|
4
|
+
*/
|
|
5
|
+
export declare class DropdownMenuBarComponent {
|
|
6
|
+
/**
|
|
7
|
+
* Custom CSS classes
|
|
8
|
+
*/
|
|
9
|
+
class: import("@angular/core").InputSignal<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Size variant
|
|
12
|
+
*/
|
|
13
|
+
size: import("@angular/core").InputSignal<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
14
|
+
/** Whether to apply shadow */
|
|
15
|
+
shadow: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Computed CSS classes for the menu bar
|
|
18
|
+
*/
|
|
19
|
+
menuBarClass: () => string;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuBarComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuBarComponent, "st-dropdown-menu-bar", ["menuBar"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Animation states for the menu bar content
|
|
5
|
+
*/
|
|
6
|
+
type AnimationState = 'closed' | 'opening' | 'open' | 'closing';
|
|
7
|
+
/**
|
|
8
|
+
* DropdownMenuBarContent - Container for menu bar dropdown content
|
|
9
|
+
*/
|
|
10
|
+
export declare class DropdownMenuBarContentComponent {
|
|
11
|
+
private readonly menuStack;
|
|
12
|
+
template: TemplateRef<unknown>;
|
|
13
|
+
private readonly isOpen;
|
|
14
|
+
private readonly isAnimatingOpen;
|
|
15
|
+
/**
|
|
16
|
+
* Custom CSS classes
|
|
17
|
+
*/
|
|
18
|
+
class: import("@angular/core").InputSignal<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Size variant
|
|
21
|
+
*/
|
|
22
|
+
size: import("@angular/core").InputSignal<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
23
|
+
/** Whether to apply shadow */
|
|
24
|
+
shadow: import("@angular/core").InputSignal<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Emitted when the menu is opened
|
|
27
|
+
*/
|
|
28
|
+
opened: import("@angular/core").OutputEmitterRef<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Emitted when the menu is closed
|
|
31
|
+
*/
|
|
32
|
+
closed: import("@angular/core").OutputEmitterRef<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Computed data state for ARIA and animations
|
|
35
|
+
*/
|
|
36
|
+
dataState: import("@angular/core").Signal<AnimationState>;
|
|
37
|
+
/**
|
|
38
|
+
* Handle ESC key press
|
|
39
|
+
*/
|
|
40
|
+
onEscapeKey(event: KeyboardEvent): void;
|
|
41
|
+
/**
|
|
42
|
+
* Handle menu opened event
|
|
43
|
+
*/
|
|
44
|
+
onMenuOpened(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Handle menu closed event
|
|
47
|
+
*/
|
|
48
|
+
onMenuClosed(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Handle animation end
|
|
51
|
+
*/
|
|
52
|
+
onAnimationEnd(event: AnimationEvent): void;
|
|
53
|
+
/**
|
|
54
|
+
* Close this menu and all child menus
|
|
55
|
+
*/
|
|
56
|
+
closeMenu(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Computed CSS classes for the menu
|
|
59
|
+
*/
|
|
60
|
+
menuClass: () => string;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuBarContentComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuBarContentComponent, "st-dropdown-menu-bar-content", ["menuBarContent"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/cdk/menu";
|
|
3
|
+
/**
|
|
4
|
+
* DropdownMenuBarItem - Regular menu item for menu bar
|
|
5
|
+
*/
|
|
6
|
+
export declare class DropdownMenuBarItemComponent {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the menu item is disabled
|
|
9
|
+
*/
|
|
10
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the menu item is active
|
|
13
|
+
*/
|
|
14
|
+
active: import("@angular/core").InputSignal<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Optional keyboard shortcut text
|
|
17
|
+
*/
|
|
18
|
+
shortcut: import("@angular/core").InputSignal<string | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Custom CSS classes
|
|
21
|
+
*/
|
|
22
|
+
class: import("@angular/core").InputSignal<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when the menu item is triggered/clicked
|
|
25
|
+
*/
|
|
26
|
+
triggered: import("@angular/core").OutputEmitterRef<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Handle item click
|
|
29
|
+
*/
|
|
30
|
+
onItemClick(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Computed CSS classes for the menu item
|
|
33
|
+
*/
|
|
34
|
+
itemClass: () => string;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuBarItemComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuBarItemComponent, "st-dropdown-menu-bar-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "triggered": "triggered"; }, never, ["*"], true, [{ directive: typeof i1.CdkMenuItem; inputs: {}; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/cdk/menu";
|
|
3
|
+
/**
|
|
4
|
+
* DropdownMenuBarItemCheckbox - Checkbox menu item for menu bar
|
|
5
|
+
*/
|
|
6
|
+
export declare class DropdownMenuBarItemCheckboxComponent {
|
|
7
|
+
private readonly isChecked;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the checkbox is checked
|
|
10
|
+
*/
|
|
11
|
+
checked: import("@angular/core").InputSignal<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Watch for changes to checked input
|
|
14
|
+
*/
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Whether the menu item is disabled
|
|
18
|
+
*/
|
|
19
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Custom indicator character or text
|
|
22
|
+
*/
|
|
23
|
+
indicator: import("@angular/core").InputSignal<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to show the indicator
|
|
26
|
+
*/
|
|
27
|
+
showIndicator: import("@angular/core").InputSignal<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Custom CSS classes
|
|
30
|
+
*/
|
|
31
|
+
class: import("@angular/core").InputSignal<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Emitted when the checkbox state changes
|
|
34
|
+
*/
|
|
35
|
+
checkedChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* Emitted when the menu item is triggered/clicked
|
|
38
|
+
*/
|
|
39
|
+
triggered: import("@angular/core").OutputEmitterRef<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Computed data state for ARIA
|
|
42
|
+
*/
|
|
43
|
+
dataState: import("@angular/core").Signal<"checked" | "unchecked">;
|
|
44
|
+
/**
|
|
45
|
+
* Handle item click - toggle checkbox state
|
|
46
|
+
*/
|
|
47
|
+
onItemClick(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Computed CSS classes for the menu item
|
|
50
|
+
*/
|
|
51
|
+
itemClass: () => string;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenuBarItemCheckboxComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenuBarItemCheckboxComponent, "st-dropdown-menu-bar-item-checkbox", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indicator": { "alias": "indicator"; "required": false; "isSignal": true; }; "showIndicator": { "alias": "showIndicator"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checkedChange": "checkedChange"; "triggered": "triggered"; }, never, ["*"], true, [{ directive: typeof i1.CdkMenuItemCheckbox; inputs: { "cdkMenuItemChecked": "checked"; }; outputs: { "cdkMenuItemTriggered": "triggered"; }; }]>;
|
|
54
|
+
}
|