@basis-ng/primitives 0.0.1-alpha.12 → 0.0.1-alpha.13

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.
@@ -0,0 +1,122 @@
1
+ import { CdkConnectedOverlay } from '@angular/cdk/overlay';
2
+ import { OnInit } from '@angular/core';
3
+ import { Button } from '../button/button.component';
4
+ import { ControlValueAccessor } from '@angular/forms';
5
+ import { CommandComponent } from '../command/command.component';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Component representing a combobox dropdown.
9
+ * This component provides a button to toggle the dropdown and displays the selected option(s) with an input field.
10
+ */
11
+ export declare class ComboboxComponent implements OnInit, ControlValueAccessor {
12
+ /**
13
+ * Placeholder text displayed when no option is selected.
14
+ * Defaults to 'Select an option'.
15
+ */
16
+ readonly placeholder: import("@angular/core").InputSignal<string>;
17
+ /**
18
+ * Signal indicating whether the dropdown is currently open.
19
+ */
20
+ readonly isOpen: import("@angular/core").WritableSignal<boolean>;
21
+ /**
22
+ * Reference to the button element used to toggle the dropdown.
23
+ * This is used for managing focus and interactions.
24
+ */
25
+ readonly button: import("@angular/core").Signal<Button | undefined>;
26
+ /**
27
+ * Reference to the content component of the dropdown.
28
+ * This contains the list of selectable options.
29
+ */
30
+ readonly command: import("@angular/core").Signal<CommandComponent | undefined>;
31
+ /**
32
+ * Computed signal representing the selected values from the dropdown.
33
+ * This is linked to the value of the `CommandComponent`.
34
+ */
35
+ readonly value: import("@angular/core").WritableSignal<string[] | undefined>;
36
+ /**
37
+ * Input for setting the maximum width of the dropdown.
38
+ * Defaults to '100%'.
39
+ */
40
+ readonly maxWidth: import("@angular/core").InputSignal<string>;
41
+ /**
42
+ * Computed signal for the width of the button element.
43
+ * This is used to set the width of the dropdown overlay.
44
+ */
45
+ readonly buttonWidth: import("@angular/core").Signal<any>;
46
+ /**
47
+ * Model indicating whether the combobox component is disabled.
48
+ * When disabled, the dropdown cannot be opened or interacted with.
49
+ */
50
+ readonly disabled: import("@angular/core").ModelSignal<boolean>;
51
+ /**
52
+ * Computed signal representing the options available in the dropdown.
53
+ * This retrieves the options from the `CommandComponent`.
54
+ */
55
+ readonly options: import("@angular/core").Signal<readonly import("@angular/cdk/listbox").CdkOption<any>[] | undefined>;
56
+ /**
57
+ * Computed signal representing the content of the selected option(s).
58
+ * If no option is selected, it returns the placeholder text.
59
+ */
60
+ readonly content: import("@angular/core").Signal<string | undefined>;
61
+ /**
62
+ * Signal representing the delay before closing the dropdown.
63
+ * This is used to provide a smooth transition when closing the dropdown.
64
+ */
65
+ readonly closeDelay: import("@angular/core").WritableSignal<number>;
66
+ /**
67
+ * Reference to the CdkConnectedOverlay directive.
68
+ * This is used to manage the positioning and visibility of the dropdown overlay.
69
+ */
70
+ readonly cdkConnectedOverlay: import("@angular/core").Signal<CdkConnectedOverlay | undefined>;
71
+ /**
72
+ * Lifecycle hook that is called after the component is initialized.
73
+ * It sets up the necessary subscriptions for handling value changes.
74
+ */
75
+ ngOnInit(): void;
76
+ /**
77
+ * Subscribes to the `closeEmitter` of the `CommandComponent` to handle
78
+ * changes to the selected value. This ensures the dropdown closes and the
79
+ * value is propagated to Angular Forms.
80
+ */
81
+ handleSelectedValueChange(): void;
82
+ /**
83
+ * Closes the dropdown with a transition effect and refocuses the button.
84
+ * This method sets the `isOpen` signal to `false` after a delay and removes
85
+ * the transition class from the overlay panel.
86
+ */
87
+ close(): void;
88
+ /**
89
+ * Callback function to propagate changes to the model.
90
+ * This is called whenever the value changes.
91
+ */
92
+ private onChange;
93
+ /**
94
+ * Callback function to mark the component as touched.
95
+ * This is called when the component loses focus.
96
+ */
97
+ private onTouched;
98
+ /**
99
+ * Writes a new value to the component.
100
+ * This method is called by Angular Forms to update the value of the combobox component.
101
+ * @param value - The new value to set.
102
+ */
103
+ writeValue(value: string[]): void;
104
+ /**
105
+ * Registers a callback function to be called when the value changes.
106
+ * @param fn - The callback function.
107
+ */
108
+ registerOnChange(fn: (value: string[]) => void): void;
109
+ /**
110
+ * Registers a callback function to be called when the component is touched.
111
+ * @param fn - The callback function.
112
+ */
113
+ registerOnTouched(fn: () => void): void;
114
+ /**
115
+ * Sets the disabled state of the component.
116
+ * This method is called by Angular Forms to enable or disable the component.
117
+ * @param isDisabled - A boolean indicating whether the component should be disabled.
118
+ */
119
+ setDisabledState(isDisabled: boolean): void;
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
121
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "b-combobox", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; }, ["command"], ["*"], true, never>;
122
+ }
@@ -28,6 +28,10 @@ export declare class CommandOptionsComponent implements OnInit {
28
28
  * Reference to the injected CDK Listbox instance.
29
29
  */
30
30
  cdkListbox: CdkListbox<any>;
31
+ /**
32
+ * Emitter for closing the command options.
33
+ */
34
+ closeEmitter: import("@angular/core").OutputEmitterRef<void>;
31
35
  /**
32
36
  * Lifecycle hook that initializes the component.
33
37
  * Enables the use of active descendant for the listbox.
@@ -50,5 +54,5 @@ export declare class CommandOptionsComponent implements OnInit {
50
54
  */
51
55
  updateHighlightedOption(): void;
52
56
  static ɵfac: i0.ɵɵFactoryDeclaration<CommandOptionsComponent, never>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<CommandOptionsComponent, "ul[b-command-options]", never, {}, {}, ["options"], ["*"], true, [{ directive: typeof i1.CdkListbox; inputs: {}; outputs: {}; }]>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommandOptionsComponent, "ul[b-command-options]", never, {}, { "closeEmitter": "closeEmitter"; }, ["options"], ["*"], true, [{ directive: typeof i1.CdkListbox; inputs: {}; outputs: {}; }]>;
54
58
  }
@@ -20,6 +20,16 @@ export declare class CommandComponent {
20
20
  * This can be used to control the visual appearance of the command component.
21
21
  */
22
22
  readonly maxHeight: import("@angular/core").InputSignal<string>;
23
+ /**
24
+ * Computed signal representing the selected value from the command options.
25
+ * This is linked to the value of the `CommandOptionsComponent`.
26
+ */
27
+ readonly value: import("@angular/core").Signal<string[] | undefined>;
28
+ /**
29
+ * Computed signal representing the options available in the command options.
30
+ * This is linked to the options of the `CommandOptionsComponent`.
31
+ */
32
+ readonly options: import("@angular/core").Signal<readonly import("@angular/cdk/listbox").CdkOption<any>[] | undefined>;
23
33
  static ɵfac: i0.ɵɵFactoryDeclaration<CommandComponent, never>;
24
34
  static ɵcmp: i0.ɵɵComponentDeclaration<CommandComponent, "b-command", never, { "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, {}, ["commandOptions"], ["*"], true, never>;
25
35
  }
@@ -2504,6 +2504,10 @@ class CommandOptionsComponent {
2504
2504
  * Reference to the injected CDK Listbox instance.
2505
2505
  */
2506
2506
  cdkListbox = inject(CdkListbox);
2507
+ /**
2508
+ * Emitter for closing the command options.
2509
+ */
2510
+ closeEmitter = output();
2507
2511
  /**
2508
2512
  * Lifecycle hook that initializes the component.
2509
2513
  * Enables the use of active descendant for the listbox.
@@ -2517,6 +2521,7 @@ class CommandOptionsComponent {
2517
2521
  selectOption() {
2518
2522
  this.value.set(this.listKeyManager().activeItem?.value ?? []);
2519
2523
  this.cdkListbox.value = this.value();
2524
+ this.closeEmitter.emit();
2520
2525
  }
2521
2526
  /**
2522
2527
  * Moves the active item to the next option and updates the highlighted option.
@@ -2548,7 +2553,7 @@ class CommandOptionsComponent {
2548
2553
  });
2549
2554
  }
2550
2555
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: CommandOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2551
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: CommandOptionsComponent, isStandalone: true, selector: "ul[b-command-options]", queries: [{ propertyName: "options", predicate: CdkOption, isSignal: true }], hostDirectives: [{ directive: i1.CdkListbox }], ngImport: i0, template: `<ng-content />`, isInline: true });
2556
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: CommandOptionsComponent, isStandalone: true, selector: "ul[b-command-options]", outputs: { closeEmitter: "closeEmitter" }, queries: [{ propertyName: "options", predicate: CdkOption, isSignal: true }], hostDirectives: [{ directive: i1.CdkListbox }], ngImport: i0, template: `<ng-content />`, isInline: true });
2552
2557
  }
2553
2558
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: CommandOptionsComponent, decorators: [{
2554
2559
  type: Component,
@@ -2580,6 +2585,16 @@ class CommandComponent {
2580
2585
  * This can be used to control the visual appearance of the command component.
2581
2586
  */
2582
2587
  maxHeight = input('300px');
2588
+ /**
2589
+ * Computed signal representing the selected value from the command options.
2590
+ * This is linked to the value of the `CommandOptionsComponent`.
2591
+ */
2592
+ value = computed(() => this.commandOptions()?.value());
2593
+ /**
2594
+ * Computed signal representing the options available in the command options.
2595
+ * This is linked to the options of the `CommandOptionsComponent`.
2596
+ */
2597
+ options = computed(() => this.commandOptions()?.options());
2583
2598
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: CommandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2584
2599
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: CommandComponent, isStandalone: true, selector: "b-command", inputs: { maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.maxWidth": "maxWidth()", "style.maxHeight": "maxHeight()" } }, queries: [{ propertyName: "commandOptions", first: true, predicate: CommandOptionsComponent, descendants: true, isSignal: true }], ngImport: i0, template: `<input
2585
2600
  type="text"
@@ -2616,6 +2631,268 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
2616
2631
  }]
2617
2632
  }] });
2618
2633
 
2634
+ /**
2635
+ * Component representing a combobox dropdown.
2636
+ * This component provides a button to toggle the dropdown and displays the selected option(s) with an input field.
2637
+ */
2638
+ class ComboboxComponent {
2639
+ /**
2640
+ * Placeholder text displayed when no option is selected.
2641
+ * Defaults to 'Select an option'.
2642
+ */
2643
+ placeholder = input('Select an option');
2644
+ /**
2645
+ * Signal indicating whether the dropdown is currently open.
2646
+ */
2647
+ isOpen = signal(false);
2648
+ /**
2649
+ * Reference to the button element used to toggle the dropdown.
2650
+ * This is used for managing focus and interactions.
2651
+ */
2652
+ button = viewChild(Button);
2653
+ /**
2654
+ * Reference to the content component of the dropdown.
2655
+ * This contains the list of selectable options.
2656
+ */
2657
+ command = contentChild(CommandComponent);
2658
+ /**
2659
+ * Computed signal representing the selected values from the dropdown.
2660
+ * This is linked to the value of the `CommandComponent`.
2661
+ */
2662
+ value = linkedSignal(() => this.command()?.value());
2663
+ /**
2664
+ * Input for setting the maximum width of the dropdown.
2665
+ * Defaults to '100%'.
2666
+ */
2667
+ maxWidth = input('100%');
2668
+ /**
2669
+ * Computed signal for the width of the button element.
2670
+ * This is used to set the width of the dropdown overlay.
2671
+ */
2672
+ buttonWidth = computed(() => this.button()?.el.nativeElement.offsetWidth);
2673
+ /**
2674
+ * Model indicating whether the combobox component is disabled.
2675
+ * When disabled, the dropdown cannot be opened or interacted with.
2676
+ */
2677
+ disabled = model(false);
2678
+ /**
2679
+ * Computed signal representing the options available in the dropdown.
2680
+ * This retrieves the options from the `CommandComponent`.
2681
+ */
2682
+ options = computed(() => this.command()?.options());
2683
+ /**
2684
+ * Computed signal representing the content of the selected option(s).
2685
+ * If no option is selected, it returns the placeholder text.
2686
+ */
2687
+ content = computed(() => {
2688
+ const selected = this.value();
2689
+ if (selected && selected.length > 0) {
2690
+ return this.options()?.reduce((acc, option) => {
2691
+ if (selected.includes(option.value)) {
2692
+ return acc ? acc + ', ' + option.getLabel() : option.getLabel();
2693
+ }
2694
+ return acc;
2695
+ }, '');
2696
+ }
2697
+ else {
2698
+ return this.placeholder();
2699
+ }
2700
+ });
2701
+ /**
2702
+ * Signal representing the delay before closing the dropdown.
2703
+ * This is used to provide a smooth transition when closing the dropdown.
2704
+ */
2705
+ closeDelay = signal(150);
2706
+ /**
2707
+ * Reference to the CdkConnectedOverlay directive.
2708
+ * This is used to manage the positioning and visibility of the dropdown overlay.
2709
+ */
2710
+ cdkConnectedOverlay = viewChild(CdkConnectedOverlay);
2711
+ /**
2712
+ * Lifecycle hook that is called after the component is initialized.
2713
+ * It sets up the necessary subscriptions for handling value changes.
2714
+ */
2715
+ ngOnInit() {
2716
+ this.handleSelectedValueChange();
2717
+ }
2718
+ /**
2719
+ * Subscribes to the `closeEmitter` of the `CommandComponent` to handle
2720
+ * changes to the selected value. This ensures the dropdown closes and the
2721
+ * value is propagated to Angular Forms.
2722
+ */
2723
+ handleSelectedValueChange() {
2724
+ this.command()
2725
+ ?.commandOptions()
2726
+ ?.closeEmitter.subscribe(() => {
2727
+ this.onChange(this.value()); // Notify Angular Forms about the change
2728
+ this.onTouched(); // Mark the component as touched
2729
+ this.close(); // Close the dropdown
2730
+ });
2731
+ }
2732
+ /**
2733
+ * Closes the dropdown with a transition effect and refocuses the button.
2734
+ * This method sets the `isOpen` signal to `false` after a delay and removes
2735
+ * the transition class from the overlay panel.
2736
+ */
2737
+ close() {
2738
+ this.cdkConnectedOverlay()?.overlayRef.addPanelClass('cdk-overlay-pane-closing');
2739
+ setTimeout(() => {
2740
+ this.isOpen.set(false);
2741
+ this.cdkConnectedOverlay()?.overlayRef.removePanelClass('cdk-overlay-pane-closing');
2742
+ this.button()?.el.nativeElement.focus();
2743
+ }, this.closeDelay());
2744
+ }
2745
+ // Control Value Accessor methods
2746
+ /**
2747
+ * Callback function to propagate changes to the model.
2748
+ * This is called whenever the value changes.
2749
+ */
2750
+ onChange = () => undefined;
2751
+ /**
2752
+ * Callback function to mark the component as touched.
2753
+ * This is called when the component loses focus.
2754
+ */
2755
+ onTouched = () => undefined;
2756
+ /**
2757
+ * Writes a new value to the component.
2758
+ * This method is called by Angular Forms to update the value of the combobox component.
2759
+ * @param value - The new value to set.
2760
+ */
2761
+ writeValue(value) {
2762
+ if (value) {
2763
+ value.forEach(value => {
2764
+ this.command()?.commandOptions()?.cdkListbox?.selectValue(value);
2765
+ });
2766
+ this.value.set(value);
2767
+ }
2768
+ }
2769
+ /**
2770
+ * Registers a callback function to be called when the value changes.
2771
+ * @param fn - The callback function.
2772
+ */
2773
+ registerOnChange(fn) {
2774
+ this.onChange = fn;
2775
+ }
2776
+ /**
2777
+ * Registers a callback function to be called when the component is touched.
2778
+ * @param fn - The callback function.
2779
+ */
2780
+ registerOnTouched(fn) {
2781
+ this.onTouched = fn;
2782
+ }
2783
+ /**
2784
+ * Sets the disabled state of the component.
2785
+ * This method is called by Angular Forms to enable or disable the component.
2786
+ * @param isDisabled - A boolean indicating whether the component should be disabled.
2787
+ */
2788
+ setDisabledState(isDisabled) {
2789
+ this.disabled.set(isDisabled);
2790
+ }
2791
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ComboboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2792
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.7", type: ComboboxComponent, isStandalone: true, selector: "b-combobox", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange" }, host: { properties: { "style.max-width": "maxWidth()", "class.disabled": "disabled()" } }, providers: [
2793
+ {
2794
+ provide: NG_VALUE_ACCESSOR,
2795
+ useExisting: forwardRef(() => ComboboxComponent),
2796
+ multi: true,
2797
+ },
2798
+ ], queries: [{ propertyName: "command", first: true, predicate: CommandComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "button", first: true, predicate: Button, descendants: true, isSignal: true }, { propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], ngImport: i0, template: ` <button
2799
+ b-button
2800
+ variant="outlined"
2801
+ (click)="isOpen() ? close() : this.isOpen.set(true)"
2802
+ (keydown.arrowUp)="!isOpen() && this.isOpen.set(true)"
2803
+ (keydown.arrowDown)="!isOpen() && this.isOpen.set(true)"
2804
+ cdkOverlayOrigin
2805
+ [activeEnabled]="false"
2806
+ #trigger="cdkOverlayOrigin">
2807
+ {{ content() }}
2808
+ <i b-icon icon="ChevronDown" [size]="20"></i>
2809
+ </button>
2810
+ <ng-template
2811
+ cdkConnectedOverlay
2812
+ [cdkConnectedOverlayOrigin]="trigger"
2813
+ [cdkConnectedOverlayOpen]="isOpen()"
2814
+ [cdkConnectedOverlayWidth]="buttonWidth()"
2815
+ [cdkConnectedOverlayHasBackdrop]="true"
2816
+ cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
2817
+ [cdkConnectedOverlayPositions]="[
2818
+ {
2819
+ originX: 'start',
2820
+ originY: 'bottom',
2821
+ overlayX: 'start',
2822
+ overlayY: 'top',
2823
+ offsetY: 5,
2824
+ },
2825
+ {
2826
+ originX: 'start',
2827
+ originY: 'top',
2828
+ overlayX: 'start',
2829
+ overlayY: 'bottom',
2830
+ offsetY: -5,
2831
+ },
2832
+ ]"
2833
+ (backdropClick)="close()"
2834
+ (detach)="close()">
2835
+ <ng-content />
2836
+ </ng-template>`, isInline: true, dependencies: [{ kind: "component", type: Button, selector: "button[b-button]", inputs: ["variant", "size", "loading", "equalPadding", "toggle", "isToggled", "activeEnabled"] }, { kind: "component", type: Icon, selector: "i[b-icon]", inputs: ["icon", "size", "strokeWidth", "color"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }] });
2837
+ }
2838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ComboboxComponent, decorators: [{
2839
+ type: Component,
2840
+ args: [{
2841
+ selector: 'b-combobox',
2842
+ imports: [Button, Icon, CdkConnectedOverlay, CdkOverlayOrigin],
2843
+ template: ` <button
2844
+ b-button
2845
+ variant="outlined"
2846
+ (click)="isOpen() ? close() : this.isOpen.set(true)"
2847
+ (keydown.arrowUp)="!isOpen() && this.isOpen.set(true)"
2848
+ (keydown.arrowDown)="!isOpen() && this.isOpen.set(true)"
2849
+ cdkOverlayOrigin
2850
+ [activeEnabled]="false"
2851
+ #trigger="cdkOverlayOrigin">
2852
+ {{ content() }}
2853
+ <i b-icon icon="ChevronDown" [size]="20"></i>
2854
+ </button>
2855
+ <ng-template
2856
+ cdkConnectedOverlay
2857
+ [cdkConnectedOverlayOrigin]="trigger"
2858
+ [cdkConnectedOverlayOpen]="isOpen()"
2859
+ [cdkConnectedOverlayWidth]="buttonWidth()"
2860
+ [cdkConnectedOverlayHasBackdrop]="true"
2861
+ cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
2862
+ [cdkConnectedOverlayPositions]="[
2863
+ {
2864
+ originX: 'start',
2865
+ originY: 'bottom',
2866
+ overlayX: 'start',
2867
+ overlayY: 'top',
2868
+ offsetY: 5,
2869
+ },
2870
+ {
2871
+ originX: 'start',
2872
+ originY: 'top',
2873
+ overlayX: 'start',
2874
+ overlayY: 'bottom',
2875
+ offsetY: -5,
2876
+ },
2877
+ ]"
2878
+ (backdropClick)="close()"
2879
+ (detach)="close()">
2880
+ <ng-content />
2881
+ </ng-template>`,
2882
+ host: {
2883
+ '[style.max-width]': 'maxWidth()',
2884
+ '[class.disabled]': 'disabled()',
2885
+ },
2886
+ providers: [
2887
+ {
2888
+ provide: NG_VALUE_ACCESSOR,
2889
+ useExisting: forwardRef(() => ComboboxComponent),
2890
+ multi: true,
2891
+ },
2892
+ ],
2893
+ }]
2894
+ }] });
2895
+
2619
2896
  /*
2620
2897
  * Public API Surface of basis-ng
2621
2898
  */
@@ -2625,5 +2902,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
2625
2902
  * Generated bundle index. Do not edit.
2626
2903
  */
2627
2904
 
2628
- export { Alert, AttachedBox, Badge, BottomSheet, Button, ButtonGroup, Checkbox, ColorPicker, CommandComponent, CommandOptionsComponent, Icon, InViewportDirective, InViewportService, Input, InputGroup, Label, LazyContentDirective, Menu, MenuItemCheckboxComponent, MenuItemComponent, MenuItemRadioComponent, MenuLabel, MenuTrigger, OptionComponent, Range, ResponsiveService, Row, RowItem, SelectComponent, SelectOptionsComponent, SideSheet, Spinner, Switch, Tab, Table, Tabs, Textarea, ThemeService, TooltipComponent, Tree, TreeNode };
2905
+ export { Alert, AttachedBox, Badge, BottomSheet, Button, ButtonGroup, Checkbox, ColorPicker, ComboboxComponent, CommandComponent, CommandOptionsComponent, Icon, InViewportDirective, InViewportService, Input, InputGroup, Label, LazyContentDirective, Menu, MenuItemCheckboxComponent, MenuItemComponent, MenuItemRadioComponent, MenuLabel, MenuTrigger, OptionComponent, Range, ResponsiveService, Row, RowItem, SelectComponent, SelectOptionsComponent, SideSheet, Spinner, Switch, Tab, Table, Tabs, Textarea, ThemeService, TooltipComponent, Tree, TreeNode };
2629
2906
  //# sourceMappingURL=basis-ng-primitives.mjs.map