@sixbell-telco/sdk 1.0.2 → 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.
Files changed (87) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/README.md +44 -0
  3. package/_index.css +52 -25
  4. package/components/avatar/src/avatar.component.d.ts +40 -26
  5. package/components/button/src/button.component.d.ts +2 -2
  6. package/components/dropdown/dropdown-chevron/dropdown-chevron.component.d.ts +39 -0
  7. package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +41 -0
  8. package/components/dropdown/dropdown-group/dropdown-group.component.d.ts +9 -0
  9. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +23 -12
  10. package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +49 -0
  11. package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +53 -0
  12. package/components/dropdown/dropdown-label/dropdown-label.component.d.ts +17 -0
  13. package/components/dropdown/dropdown-separator/dropdown-separator.component.d.ts +21 -0
  14. package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +121 -0
  15. package/components/dropdown/public-api.d.ts +9 -0
  16. package/components/dropdown/src/dropdown.component.d.ts +20 -179
  17. package/components/dropdown/src/services/dropdown.service.d.ts +22 -0
  18. package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +22 -0
  19. package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +64 -0
  20. package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +37 -0
  21. package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +54 -0
  22. package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +58 -0
  23. package/components/dropdown-menu/bar/dropdown-menu-bar-label/dropdown-menu-bar-label.component.d.ts +16 -0
  24. package/components/dropdown-menu/bar/dropdown-menu-bar-separator/dropdown-menu-bar-separator.component.d.ts +16 -0
  25. package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +29 -0
  26. package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +50 -0
  27. package/components/dropdown-menu/bar/index.d.ts +5 -0
  28. package/components/dropdown-menu/bar/public-api.d.ts +9 -0
  29. package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +23 -0
  30. package/components/dropdown-menu/context/index.d.ts +5 -0
  31. package/components/dropdown-menu/context/public-api.d.ts +1 -0
  32. package/components/dropdown-menu/dropdown-menu-chevron/dropdown-menu-chevron.component.d.ts +43 -0
  33. package/components/dropdown-menu/index.d.ts +5 -0
  34. package/components/dropdown-menu/public-api.d.ts +13 -0
  35. package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +40 -0
  36. package/components/dropdown-menu/src/dropdown-menu/dropdown-menu.component.d.ts +9 -0
  37. package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +40 -0
  38. package/components/dropdown-menu/src/dropdown-menu-group/dropdown-menu-group.component.d.ts +8 -0
  39. package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +38 -0
  40. package/components/dropdown-menu/src/dropdown-menu-label/dropdown-menu-label.component.d.ts +16 -0
  41. package/components/dropdown-menu/src/dropdown-menu-separator/dropdown-menu-separator.component.d.ts +16 -0
  42. package/components/dropdown-menu/src/dropdown-menu-sub/dropdown-menu-sub.component.d.ts +8 -0
  43. package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +31 -0
  44. package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +18 -0
  45. package/components/dropdown-menu/src/dropdown-menu-trigger/dropdown-menu-trigger.component.d.ts +19 -0
  46. package/components/dropdown-menu/src/services/dropdown-menu.service.d.ts +22 -0
  47. package/components/notification/src/notification.component.d.ts +3 -3
  48. package/components/product-card/directives/product-card-actions.directive.d.ts +1 -1
  49. package/components/product-card/directives/product-card-content.directive.d.ts +1 -1
  50. package/components/product-card/directives/product-card-header.directive.d.ts +1 -1
  51. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +75 -39
  52. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  53. package/fesm2022/sixbell-telco-sdk-components-button.mjs +1 -0
  54. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  55. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +529 -0
  56. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -0
  57. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +52 -0
  58. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -0
  59. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +539 -0
  60. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -0
  61. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +590 -217
  62. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  63. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +2 -2
  64. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  65. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +2 -2
  66. package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
  67. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +2 -2
  68. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  69. package/fesm2022/sixbell-telco-sdk-components-notification.mjs +21 -15
  70. package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
  71. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +7 -7
  72. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
  73. package/fesm2022/sixbell-telco-sdk-components-table.mjs +2 -2
  74. package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
  75. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +139 -0
  76. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -0
  77. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +183 -0
  78. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -0
  79. package/package.json +44 -24
  80. package/sixbell-telco-sdk-1.1.0.tgz +0 -0
  81. package/utils/theme/index.d.ts +5 -0
  82. package/utils/theme/public-api.d.ts +1 -0
  83. package/utils/theme/src/theme.service.d.ts +55 -0
  84. package/utils/translation/index.d.ts +5 -0
  85. package/utils/translation/public-api.d.ts +1 -0
  86. package/utils/translation/src/translation.service.d.ts +112 -0
  87. package/sixbell-telco-sdk-1.0.2.tgz +0 -0
@@ -0,0 +1,49 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * DropdownItemCheckbox - Checkbox dropdown item
4
+ * Provides checkbox functionality for dropdown selections
5
+ */
6
+ export declare class DropdownItemCheckboxComponent {
7
+ /**
8
+ * Whether the checkbox is checked
9
+ */
10
+ checked: import("@angular/core").InputSignal<boolean>;
11
+ /**
12
+ * Whether the menu item is disabled
13
+ */
14
+ disabled: import("@angular/core").InputSignal<boolean>;
15
+ /**
16
+ * Custom indicator character or text
17
+ */
18
+ indicator: import("@angular/core").InputSignal<string>;
19
+ /**
20
+ * Whether to show the indicator
21
+ */
22
+ showIndicator: import("@angular/core").InputSignal<boolean>;
23
+ /**
24
+ * Custom CSS classes
25
+ */
26
+ class: import("@angular/core").InputSignal<string>;
27
+ /**
28
+ * Emitted when the checkbox state changes
29
+ */
30
+ checkedChange: import("@angular/core").OutputEmitterRef<boolean>;
31
+ /**
32
+ * Emitted when the menu item is triggered/clicked
33
+ */
34
+ triggered: import("@angular/core").OutputEmitterRef<void>;
35
+ /**
36
+ * Computed data state for ARIA
37
+ */
38
+ dataState: import("@angular/core").Signal<"checked" | "unchecked">;
39
+ /**
40
+ * Handle item click - toggle checkbox state
41
+ */
42
+ onItemClick(): void;
43
+ /**
44
+ * Computed CSS classes for the menu item
45
+ */
46
+ itemClass: () => string;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownItemCheckboxComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownItemCheckboxComponent, "st-dropdown-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, never>;
49
+ }
@@ -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,191 +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
- * @internal
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
- * Built with Tailwind CSS and class-variance-authority for style management.
49
- * Supports multiple button variants, menu positioning, and responsive behavior.
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
- * variant="icon"
71
- * menuPosition="right"
72
- * icon="more-vertical"
73
- * >
74
- * <div slot="menu">...</div>
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
- * Button style variant
81
- * @defaultValue 'secondary'
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
- * Link button style (appears as a hyperlink)
96
- * @defaultValue false
97
- */
98
- link: import("@angular/core").InputSignal<boolean>;
99
- /**
100
- * Soft button style (muted/subdued color variant)
101
- * @defaultValue false
102
- */
103
- soft: import("@angular/core").InputSignal<boolean>;
104
- /**
105
- * Dash button style (dashed border)
106
- * @defaultValue false
107
- */
108
- dash: import("@angular/core").InputSignal<boolean>;
109
- /**
110
- * Circular button shape
111
- * @defaultValue false
112
- */
113
- circle: import("@angular/core").InputSignal<boolean>;
114
- /**
115
- * Square button shape
116
- * @defaultValue false
117
- */
118
- square: import("@angular/core").InputSignal<boolean>;
119
- /**
120
- * Glass effect styling
121
- * @defaultValue false
122
- */
123
- glass: import("@angular/core").InputSignal<boolean>;
124
- /**
125
- * Button size variant
126
- * @defaultValue 'md'
127
- */
128
- size: import("@angular/core").InputSignal<DropdownButtonSizeProps>;
129
- /**
130
- * Add drop shadow
131
- * @defaultValue false
132
- */
133
- shadow: import("@angular/core").InputSignal<boolean>;
134
- /**
135
- * Icon name (from icon library)
136
- */
137
- icon: import("@angular/core").InputSignal<string | undefined>;
138
- /**
139
- * Position of icon relative to text
140
- */
141
- iconPosition: import("@angular/core").InputSignal<DropdownButtonPositionProps>;
142
- /**
143
- * Position of dropdown menu relative to button
144
- * @defaultValue 'bottom'
145
- */
146
- menuPosition: import("@angular/core").InputSignal<DropdownMenuPositionProps>;
147
- /**
148
- * Alignment of dropdown menu content
149
- */
150
- menuAlignment: import("@angular/core").InputSignal<DropdownMenuAlignmentProps>;
151
- /**
152
- * Button label text
153
- */
154
- label: import("@angular/core").InputSignal<string | undefined>;
155
- /**
156
- * Controls dropdown open/close state
157
- * @defaultValue false
158
- */
159
- isOpened: import("@angular/core").ModelSignal<boolean>;
160
- /**
161
- * Event emitted when dropdown toggle state changes
162
- */
163
- toggled: import("@angular/core").OutputEmitterRef<boolean>;
164
- /**
165
- * @internal
166
- * Computed class string for the dropdown button
167
- */
168
- buttonClass: import("@angular/core").Signal<string>;
169
- /**
170
- * @internal
171
- * Computed class string for the dropdown menu container
172
- */
173
- menuClass: import("@angular/core").Signal<string>;
174
- /**
175
- * @internal
176
- * Computed class string for the dropdown content
177
- */
178
- dropdownContentClass: import("@angular/core").Signal<string>;
179
- /**
180
- * @internal
181
- * Toggles dropdown visibility state
182
- */
183
- handleToggle(): void;
184
- /**
185
- * @internal
186
- * Handles click outside to close dropdown
187
- */
188
- handleClickOuside(): void;
25
+ export declare class DropdownComponent implements AfterContentInit {
26
+ private readonly dropdownService;
27
+ trigger: DropdownTriggerComponent;
28
+ content: DropdownContentComponent;
29
+ ngAfterContentInit(): void;
189
30
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
190
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "st-dropdown", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "ghost": { "alias": "ghost"; "required": false; "isSignal": true; }; "outline": { "alias": "outline"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "soft": { "alias": "soft"; "required": false; "isSignal": true; }; "dash": { "alias": "dash"; "required": false; "isSignal": true; }; "circle": { "alias": "circle"; "required": false; "isSignal": true; }; "square": { "alias": "square"; "required": false; "isSignal": true; }; "glass": { "alias": "glass"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "menuPosition": { "alias": "menuPosition"; "required": false; "isSignal": true; }; "menuAlignment": { "alias": "menuAlignment"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "toggled": "toggled"; }, never, ["*"], true, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "st-dropdown", never, {}, {}, ["trigger", "content"], ["*"], true, never>;
191
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 {};
@@ -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
+ }