@basis-ng/primitives 0.0.1-alpha.15 → 0.0.1-alpha.150

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 (51) hide show
  1. package/fesm2022/basis-ng-primitives.mjs +3636 -2224
  2. package/fesm2022/basis-ng-primitives.mjs.map +1 -1
  3. package/package.json +13 -5
  4. package/types/basis-ng-primitives.d.ts +1847 -0
  5. package/core/components/alert/alert.component.d.ts +0 -20
  6. package/core/components/attached-box/attached-box.component.d.ts +0 -125
  7. package/core/components/attached-box/types/alignment.type.d.ts +0 -1
  8. package/core/components/attached-box/types/direction.type.d.ts +0 -1
  9. package/core/components/badge/badge.component.d.ts +0 -9
  10. package/core/components/bottom-sheet/bottom-sheet.component.d.ts +0 -60
  11. package/core/components/button/button.component.d.ts +0 -22
  12. package/core/components/button-group/button-group.component.d.ts +0 -9
  13. package/core/components/checkbox/checkbox.component.d.ts +0 -26
  14. package/core/components/color-picker/color-picker.component.d.ts +0 -61
  15. package/core/components/combobox/combobox.component.d.ts +0 -127
  16. package/core/components/command/command-options.component.d.ts +0 -58
  17. package/core/components/command/command.component.d.ts +0 -41
  18. package/core/components/icon/icon.component.d.ts +0 -29
  19. package/core/components/input/input.component.d.ts +0 -78
  20. package/core/components/input-group/input-group.component.d.ts +0 -13
  21. package/core/components/menu/menu.component.d.ts +0 -9
  22. package/core/components/menu/shared/components/menu-item/menu-item.component.d.ts +0 -9
  23. package/core/components/menu/shared/components/menu-item-checkbox/menu-item-checkbox.component.d.ts +0 -9
  24. package/core/components/menu/shared/components/menu-item-radio/menu-item-radio.component.d.ts +0 -9
  25. package/core/components/menu/shared/components/menu-label/menu-label.component.d.ts +0 -8
  26. package/core/components/menu/shared/directives/menu-trigger.directive.d.ts +0 -14
  27. package/core/components/range/range.component.d.ts +0 -26
  28. package/core/components/select/select-options.component.d.ts +0 -51
  29. package/core/components/select/select.component.d.ts +0 -127
  30. package/core/components/side-sheet/side-sheet.component.d.ts +0 -46
  31. package/core/components/spinner/spinner.component.d.ts +0 -9
  32. package/core/components/switch/switch.component.d.ts +0 -35
  33. package/core/components/table/components/row/components/row-item/row-item.component.d.ts +0 -12
  34. package/core/components/table/components/row/row.component.d.ts +0 -9
  35. package/core/components/table/table.component.d.ts +0 -5
  36. package/core/components/tabs/components/tab/tab.component.d.ts +0 -25
  37. package/core/components/tabs/tabs.component.d.ts +0 -60
  38. package/core/components/textarea/textarea.component.d.ts +0 -48
  39. package/core/components/tooltip/tooltip.component.d.ts +0 -36
  40. package/core/components/tree/shared/components/tree-node/tree-node.component.d.ts +0 -43
  41. package/core/components/tree/tree.component.d.ts +0 -56
  42. package/core/directives/in-viewport.directive.d.ts +0 -13
  43. package/core/services/in-viewport.service.d.ts +0 -23
  44. package/core/services/responsive.service.d.ts +0 -47
  45. package/core/services/theme.service.d.ts +0 -44
  46. package/index.d.ts +0 -5
  47. package/public-api.d.ts +0 -44
  48. package/shared/components/label.component.d.ts +0 -30
  49. package/shared/components/option.component.d.ts +0 -22
  50. package/shared/directives/lazy-content.directive.d.ts +0 -7
  51. package/shared/types/position.type.d.ts +0 -1
@@ -1,36 +0,0 @@
1
- import { Position } from '../../../shared/types/position.type';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * TooltipComponent is a reusable UI component that displays a tooltip
5
- * with customizable position, gap, variant, and size.
6
- */
7
- export declare class TooltipComponent {
8
- /**
9
- * The position of the tooltip relative to its trigger element.
10
- * Defaults to 'top-center'.
11
- */
12
- readonly position: import("@angular/core").InputSignal<Position>;
13
- /**
14
- * The gap (in pixels) between the tooltip and its trigger element.
15
- * Defaults to 8.
16
- */
17
- readonly gap: import("@angular/core").InputSignal<number>;
18
- /**
19
- * The visual variant of the tooltip. Options include:
20
- * - 'primary'
21
- * - 'secondary'
22
- * - 'ghost'
23
- * - 'outlined'
24
- * Defaults to 'primary'.
25
- */
26
- readonly variant: import("@angular/core").InputSignal<"primary" | "secondary" | "ghost" | "outlined">;
27
- /**
28
- * The size of the tooltip. Options include:
29
- * - 'small'
30
- * - 'default'
31
- * Defaults to 'default'.
32
- */
33
- readonly size: import("@angular/core").InputSignal<"small" | "default">;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "b-tooltip", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[b-tooltip-content]"], true, never>;
36
- }
@@ -1,43 +0,0 @@
1
- import { CdkDrag } from '@angular/cdk/drag-drop';
2
- import { OnInit } from '@angular/core';
3
- import { Tree } from '../../../tree.component';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/cdk/drag-drop";
6
- /**
7
- * Represents a tree node component that can be extended, collapsed,
8
- * and optionally supports drag-and-drop functionality.
9
- */
10
- export declare class TreeNode implements OnInit {
11
- /**
12
- * Indicates whether the node is extended (expanded).
13
- */
14
- readonly extended: import("@angular/core").ModelSignal<boolean>;
15
- /**
16
- * Reference to the `CdkDrag` directive for drag-and-drop functionality.
17
- */
18
- protected node: CdkDrag<any>;
19
- /**
20
- * Reference to a nested `Tree` component, if present.
21
- */
22
- readonly nestedTree: import("@angular/core").Signal<Tree | undefined>;
23
- /**
24
- * Emits an event when the node is closed.
25
- */
26
- closeEmitter: import("@angular/core").OutputEmitterRef<void>;
27
- /**
28
- * Lifecycle hook that is called after the component is initialized.
29
- */
30
- ngOnInit(): void;
31
- /**
32
- * Updates the disabled state of the node.
33
- * @param disabled - Whether the node should be disabled.
34
- */
35
- handleNodeDisability(disabled: boolean): void;
36
- /**
37
- * Toggles the extended (expanded) state of the node.
38
- * Emits a close event if the node is collapsed and contains a nested tree.
39
- */
40
- handleExtension(): void;
41
- static ɵfac: i0.ɵɵFactoryDeclaration<TreeNode, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<TreeNode, "b-tree-node", never, { "extended": { "alias": "extended"; "required": false; "isSignal": true; }; }, { "extended": "extendedChange"; "closeEmitter": "closeEmitter"; }, ["nestedTree"], ["*", "b-tree"], true, [{ directive: typeof i1.CdkDrag; inputs: { "cdkDragDisabled": "disabled"; }; outputs: {}; }]>;
43
- }
@@ -1,56 +0,0 @@
1
- import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
- import { OnInit } from '@angular/core';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/cdk/drag-drop";
5
- /**
6
- * Represents a tree component that supports drag-and-drop functionality
7
- * and manages nested tree nodes.
8
- */
9
- export declare class Tree implements OnInit {
10
- /**
11
- * The ID of the tree component.
12
- */
13
- readonly maxWidth: import("@angular/core").InputSignal<string>;
14
- /**
15
- * Determines whether the tree is draggable.
16
- */
17
- readonly draggable: import("@angular/core").InputSignal<boolean>;
18
- /**
19
- * Reference to the `CdkDropList` directive used for drag-and-drop.
20
- */
21
- private tree;
22
- /**
23
- * Collection of nested `TreeNode` components.
24
- */
25
- private readonly nestedNodes;
26
- /**
27
- * Determines whether to close nodes recursively.
28
- */
29
- readonly closeRecursively: import("@angular/core").InputSignal<boolean>;
30
- /**
31
- * Emits an event when a drop occurs in the tree.
32
- */
33
- dropEmitter: import("@angular/core").OutputEmitterRef<CdkDragDrop<string[], string[], any>>;
34
- /**
35
- * Initializes the `Tree` component and sets up reactive effects.
36
- */
37
- constructor();
38
- /**
39
- * Lifecycle hook that is called after the component is initialized.
40
- */
41
- ngOnInit(): void;
42
- /**
43
- * Updates the disabled state of the tree and its nested nodes.
44
- */
45
- private handleTreeDisability;
46
- /**
47
- * Sets up recursive closing behavior for nested nodes.
48
- */
49
- handleCloseRecursively(): void;
50
- /**
51
- * Closes all nested nodes recursively.
52
- */
53
- closeNestedNodes(): void;
54
- static ɵfac: i0.ɵɵFactoryDeclaration<Tree, never>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<Tree, "b-tree", never, { "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "closeRecursively": { "alias": "closeRecursively"; "required": false; "isSignal": true; }; }, { "dropEmitter": "dropEmitter"; }, ["nestedNodes"], ["*"], true, [{ directive: typeof i1.CdkDropList; inputs: { "id": "id"; "cdkDropListConnectedTo": "connectedTo"; }; outputs: { "cdkDropListDropped": "cdkDropListDropped"; }; }, { directive: typeof i1.CdkDropListGroup; inputs: {}; outputs: {}; }]>;
56
- }
@@ -1,13 +0,0 @@
1
- import { ElementRef, OnDestroy } from '@angular/core';
2
- import { InViewportService } from '../services/in-viewport.service';
3
- import * as i0 from "@angular/core";
4
- export declare class InViewportDirective implements OnDestroy {
5
- readonly inViewportId: import("@angular/core").InputSignal<string>;
6
- readonly inViewportInitialVisibility: import("@angular/core").InputSignal<boolean>;
7
- el: ElementRef<any>;
8
- inViewportService: InViewportService;
9
- constructor();
10
- ngOnDestroy(): void;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<InViewportDirective, never>;
12
- static ɵdir: i0.ɵɵDirectiveDeclaration<InViewportDirective, "[b-in-viewport]", never, { "inViewportId": { "alias": "inViewportId"; "required": true; "isSignal": true; }; "inViewportInitialVisibility": { "alias": "inViewportInitialVisibility"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
13
- }
@@ -1,23 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class InViewportService {
3
- readonly elements: import("@angular/core").WritableSignal<Record<string, boolean>>;
4
- observer: IntersectionObserver;
5
- /**
6
- * Register an element to be tracked by the service.
7
- * @param {string} id - The id of the element to register.
8
- */
9
- registerElement(id: string, nativeElement: HTMLElement, initialVisibility: boolean): void;
10
- /**
11
- * Unregister an element from being tracked by the service.
12
- * @param {string} id - The id of the element to unregister.
13
- */
14
- unregisterElement(id: string): void;
15
- /**
16
- * Update the visibility of an element.
17
- * @param {string} id - The id of the element to update.
18
- * @param {boolean} isVisible - The new visibility state of the element.
19
- */
20
- updateElementVisibility(id: string, isVisible: boolean): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<InViewportService, never>;
22
- static ɵprov: i0.ɵɵInjectableDeclaration<InViewportService>;
23
- }
@@ -1,47 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Interface that defines the breakpoints for different device types
4
- */
5
- export interface DeviceBreakpoints {
6
- /** Maximum width for mobile devices in pixels */
7
- mobile: number;
8
- /** Maximum width for tablet devices in pixels */
9
- tablet: number;
10
- /** Maximum width for desktop devices in pixels */
11
- desktop: number;
12
- }
13
- /** Available device types */
14
- export type DeviceType = 'mobile' | 'tablet' | 'desktop';
15
- /**
16
- * Service that handles responsive design functionality
17
- * Detects current device type based on window width and configurable breakpoints
18
- */
19
- export declare class ResponsiveService {
20
- /** Signal that holds the breakpoint configuration */
21
- private readonly breakpoints;
22
- /** Signal that holds the current window width */
23
- private readonly windowWidth;
24
- /**
25
- * Computed signal that returns the current device type based on window width
26
- * @returns The current device type ('mobile', 'tablet', or 'desktop')
27
- */
28
- readonly currentDevice: import("@angular/core").Signal<DeviceType>;
29
- constructor();
30
- /**
31
- * Initializes the window width signal with the current window inner width
32
- * Only called in browser environment
33
- */
34
- private initializeWindowWidth;
35
- /**
36
- * Sets up the resize event listener to update window width
37
- * Only called in browser environment
38
- */
39
- private setupResizeListener;
40
- /**
41
- * Updates the breakpoint configuration
42
- * @param newBreakpoints - Partial breakpoint configuration to update
43
- */
44
- updateBreakpoints(newBreakpoints: Partial<DeviceBreakpoints>): void;
45
- static ɵfac: i0.ɵɵFactoryDeclaration<ResponsiveService, never>;
46
- static ɵprov: i0.ɵɵInjectableDeclaration<ResponsiveService>;
47
- }
@@ -1,44 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ThemeService {
3
- /**
4
- * Signal representing the current theme.
5
- *
6
- * Possible values:
7
- * - `'light'`: Light theme.
8
- * - `'dark'`: Dark theme.
9
- * - `'auto'`: Automatically determine the theme.
10
- */
11
- readonly theme: import("@angular/core").WritableSignal<"light" | "dark" | "auto">;
12
- /**
13
- * Renderer2 instance for manipulating the DOM.
14
- * Used to set the `data-theme` attribute on the document root (`<html>`).
15
- */
16
- private renderer;
17
- /**
18
- * RendererFactory2 instance for creating Renderer2 instances.
19
- * Injected to create the renderer.
20
- */
21
- private rendererFactory;
22
- constructor();
23
- /**
24
- * Applies the specified theme to the document root (`<html>`).
25
- *
26
- * @param theme - The theme to apply. Possible values:
27
- * - `'light'`: Apply the light theme.
28
- * - `'dark'`: Apply the dark theme.
29
- * - `'auto'`: Remove the theme attribute and let the system decide.
30
- */
31
- applyTheme(theme: 'light' | 'dark' | 'auto'): void;
32
- /**
33
- * Toggles the theme between `'light'` and `'dark'`.
34
- * If the current theme is `'light'`, it switches to `'dark'`, and vice versa.
35
- */
36
- toggleTheme(): void;
37
- /**
38
- * Removes the `data-theme` attribute from the document body.
39
- * This is used when the theme is set to `'auto'`.
40
- */
41
- removeTheme(): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
43
- static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
44
- }
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@basis-ng/primitives" />
5
- export * from './public-api';
package/public-api.d.ts DELETED
@@ -1,44 +0,0 @@
1
- export * from './core/services/theme.service';
2
- export * from './core/components/button/button.component';
3
- export * from './core/components/button-group/button-group.component';
4
- export * from './shared/directives/lazy-content.directive';
5
- export * from './core/components/input/input.component';
6
- export * from './core/components/select/select.component';
7
- export * from './core/components/select/select-options.component';
8
- export * from './shared/components/option.component';
9
- export * from './core/components/spinner/spinner.component';
10
- export * from './core/components/switch/switch.component';
11
- export * from './core/components/table/table.component';
12
- export * from './core/components/table/components/row/row.component';
13
- export * from './core/components/table/components/row/components/row-item/row-item.component';
14
- export * from './core/components/tabs/tabs.component';
15
- export * from './core/components/tabs/components/tab/tab.component';
16
- export * from './core/directives/in-viewport.directive';
17
- export * from './core/services/in-viewport.service';
18
- export * from './core/components/side-sheet/side-sheet.component';
19
- export * from './core/components/bottom-sheet/bottom-sheet.component';
20
- export * from './core/services/responsive.service';
21
- export * from './core/components/attached-box/attached-box.component';
22
- export * from './core/components/icon/icon.component';
23
- export * from './shared/components/label.component';
24
- export * from './core/components/badge/badge.component';
25
- export * from './core/components/checkbox/checkbox.component';
26
- export * from './core/components/textarea/textarea.component';
27
- export * from './core/components/input-group/input-group.component';
28
- export * from './core/components/range/range.component';
29
- export * from './core/components/badge/badge.component';
30
- export * from './core/components/tooltip/tooltip.component';
31
- export * from './core/components/color-picker/color-picker.component';
32
- export * from './core/components/tree/tree.component';
33
- export * from './core/components/tree/shared/components/tree-node/tree-node.component';
34
- export * from './core/components/menu/menu.component';
35
- export * from './core/components/menu/shared/components/menu-label/menu-label.component';
36
- export * from './core/components/menu/shared/components/menu-item/menu-item.component';
37
- export * from './core/components/menu/shared/components/menu-item-checkbox/menu-item-checkbox.component';
38
- export * from './core/components/menu/shared/components/menu-item-radio/menu-item-radio.component';
39
- export * from './core/components/menu/shared/directives/menu-trigger.directive';
40
- export * from './core/components/alert/alert.component';
41
- export * from './shared/types/position.type';
42
- export * from './core/components/command/command.component';
43
- export * from './core/components/command/command-options.component';
44
- export * from './core/components/combobox/combobox.component';
@@ -1,30 +0,0 @@
1
- import { Checkbox, Input, Switch, Textarea } from '../../public-api';
2
- import * as i0 from "@angular/core";
3
- export declare class Label {
4
- /**
5
- * The input element.
6
- */
7
- readonly input: import("@angular/core").Signal<Input | undefined>;
8
- /**
9
- * The switch element.
10
- */
11
- readonly switch: import("@angular/core").Signal<Switch | undefined>;
12
- /**
13
- * The checkbox element.
14
- */
15
- readonly checkbox: import("@angular/core").Signal<Checkbox | undefined>;
16
- /**
17
- * The textarea element.
18
- */
19
- readonly textarea: import("@angular/core").Signal<Textarea | undefined>;
20
- /**
21
- * Whether the label should be up.
22
- */
23
- readonly labelUp: import("@angular/core").Signal<string | number | true | undefined>;
24
- /**
25
- * The label width.
26
- */
27
- readonly maxWidth: import("@angular/core").Signal<string | number | undefined>;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<Label, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<Label, "b-label", never, {}, {}, ["input", "switch", "checkbox", "textarea"], ["*"], true, never>;
30
- }
@@ -1,22 +0,0 @@
1
- import { CdkOption } from '@angular/cdk/listbox';
2
- import { ElementRef } from '@angular/core';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/cdk/listbox";
5
- /**
6
- * Component representing an individual option in a select or combobox.
7
- * This component integrates with Angular CDK Option to manage the option's state and behavior.
8
- */
9
- export declare class OptionComponent {
10
- /**
11
- * The `ElementRef` of the option.
12
- * This provides direct access to the DOM element of the option.
13
- */
14
- el: ElementRef<any>;
15
- /**
16
- * The `CdkOption` instance associated with this option.
17
- * This provides methods and properties for managing the option's state, such as selection and value.
18
- */
19
- cdkOption: CdkOption<any>;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "li[b-option]", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkOption; inputs: { "cdkOption": "value"; }; outputs: {}; }]>;
22
- }
@@ -1,7 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class LazyContentDirective {
4
- tpl: TemplateRef<any>;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<LazyContentDirective, never>;
6
- static ɵdir: i0.ɵɵDirectiveDeclaration<LazyContentDirective, "[b-lazy]", never, {}, {}, never, never, true, never>;
7
- }
@@ -1 +0,0 @@
1
- export type Position = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom';