@lumaui/angular 0.2.3 → 0.3.2
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/fesm2022/lumaui-angular.mjs +439 -77
- package/fesm2022/lumaui-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/types/lumaui-angular.d.ts +85 -17
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumaui/angular",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Angular components for Luma UI - Neo-Minimal design system",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@lumaui/core": "^0.
|
|
7
|
-
"@lumaui/tokens": "^0.
|
|
6
|
+
"@lumaui/core": "^0.3.1",
|
|
7
|
+
"@lumaui/tokens": "^0.3.1",
|
|
8
8
|
"tslib": "^2.3.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, Signal, OnDestroy, WritableSignal, ElementRef, OnInit
|
|
3
|
-
import { ButtonVariant, ButtonSize, CardVariant, CardTitleSize, CardDescriptionSize, AccordionItemVariant, AccordionTitleSize, TooltipPosition,
|
|
2
|
+
import { InjectionToken, Signal, OnDestroy, WritableSignal, AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
3
|
+
import { ButtonVariant, ButtonSize, ButtonRadius, BadgeVariant, BadgeRadius, CardVariant, CardTitleSize, CardDescriptionSize, AccordionItemVariant, AccordionTitleSize, TooltipPosition, TabsVariant, ToastPosition as ToastPosition$1, ToastVariant as ToastVariant$1 } from '@lumaui/core';
|
|
4
4
|
export { ToastCloseVariants, ToastContainerVariants, ToastIconVariants, ToastItemVariants, ToastState } from '@lumaui/core';
|
|
5
5
|
import * as _lumaui_angular from '@lumaui/angular';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
@@ -8,32 +8,33 @@ import { Observable } from 'rxjs';
|
|
|
8
8
|
declare class LmButtonDirective {
|
|
9
9
|
lmVariant: _angular_core.InputSignal<ButtonVariant>;
|
|
10
10
|
lmSize: _angular_core.InputSignal<ButtonSize>;
|
|
11
|
+
lmRadius: _angular_core.InputSignal<ButtonRadius>;
|
|
11
12
|
lmDisabled: _angular_core.InputSignal<boolean>;
|
|
12
13
|
lmType: _angular_core.InputSignal<"button" | "submit" | "reset">;
|
|
13
14
|
classes: _angular_core.Signal<string>;
|
|
14
15
|
get hostClasses(): string;
|
|
15
16
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LmButtonDirective, never>;
|
|
16
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LmButtonDirective, "button[lumaButton], a[lumaButton]", never, { "lmVariant": { "alias": "lmVariant"; "required": false; "isSignal": true; }; "lmSize": { "alias": "lmSize"; "required": false; "isSignal": true; }; "lmDisabled": { "alias": "lmDisabled"; "required": false; "isSignal": true; }; "lmType": { "alias": "lmType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LmButtonDirective, "button[lumaButton], a[lumaButton]", never, { "lmVariant": { "alias": "lmVariant"; "required": false; "isSignal": true; }; "lmSize": { "alias": "lmSize"; "required": false; "isSignal": true; }; "lmRadius": { "alias": "lmRadius"; "required": false; "isSignal": true; }; "lmDisabled": { "alias": "lmDisabled"; "required": false; "isSignal": true; }; "lmType": { "alias": "lmType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
declare class LmBadgeDirective {
|
|
21
|
+
lmVariant: _angular_core.InputSignal<BadgeVariant>;
|
|
22
|
+
lmRadius: _angular_core.InputSignal<BadgeRadius>;
|
|
20
23
|
classes: _angular_core.Signal<string>;
|
|
21
24
|
get hostClasses(): string;
|
|
22
25
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LmBadgeDirective, never>;
|
|
23
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LmBadgeDirective, "[lumaBadge]", never, {}, {}, never, never, true, never>;
|
|
26
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LmBadgeDirective, "[lumaBadge]", never, { "lmVariant": { "alias": "lmVariant"; "required": false; "isSignal": true; }; "lmRadius": { "alias": "lmRadius"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
declare class LmCardComponent {
|
|
27
30
|
/**
|
|
28
31
|
* Card visual style variant
|
|
29
|
-
* - default:
|
|
30
|
-
* -
|
|
31
|
-
* -
|
|
32
|
-
* - preview: For documentation examples
|
|
32
|
+
* - default: Simple border card
|
|
33
|
+
* - elevated: Card with shadow elevation
|
|
34
|
+
* - subtle: Muted background card
|
|
33
35
|
*/
|
|
34
36
|
lmVariant: _angular_core.InputSignal<CardVariant>;
|
|
35
|
-
|
|
36
|
-
contentClasses: _angular_core.Signal<string>;
|
|
37
|
+
classes: _angular_core.Signal<string>;
|
|
37
38
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LmCardComponent, never>;
|
|
38
39
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LmCardComponent, "luma-card", never, { "lmVariant": { "alias": "lmVariant"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
39
40
|
}
|
|
@@ -53,11 +54,13 @@ declare class LmCardDescriptionDirective {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
declare class LmCardHeaderDirective {
|
|
57
|
+
classes: _angular_core.Signal<string>;
|
|
56
58
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LmCardHeaderDirective, never>;
|
|
57
59
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LmCardHeaderDirective, "[lumaCardHeader]", never, {}, {}, never, never, true, never>;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
declare class LmCardContentDirective {
|
|
63
|
+
classes: _angular_core.Signal<string>;
|
|
61
64
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LmCardContentDirective, never>;
|
|
62
65
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LmCardContentDirective, "[lumaCardContent]", never, {}, {}, never, never, true, never>;
|
|
63
66
|
}
|
|
@@ -339,6 +342,8 @@ declare class LmTooltipDirective implements OnDestroy {
|
|
|
339
342
|
private el;
|
|
340
343
|
private renderer;
|
|
341
344
|
private platformId;
|
|
345
|
+
private document;
|
|
346
|
+
private ngZone;
|
|
342
347
|
lumaTooltip: _angular_core.InputSignal<string>;
|
|
343
348
|
lmPosition: _angular_core.InputSignal<TooltipPosition>;
|
|
344
349
|
lmHtml: _angular_core.InputSignal<boolean>;
|
|
@@ -349,11 +354,17 @@ declare class LmTooltipDirective implements OnDestroy {
|
|
|
349
354
|
tooltipId: string;
|
|
350
355
|
private tooltipElement;
|
|
351
356
|
private showTimeout;
|
|
357
|
+
private scrollListener;
|
|
358
|
+
private resizeListener;
|
|
359
|
+
private captureScrollHandler;
|
|
352
360
|
classes: _angular_core.Signal<string>;
|
|
353
361
|
constructor();
|
|
354
362
|
private ensureTooltipElement;
|
|
355
363
|
private updateContent;
|
|
356
364
|
private updateClasses;
|
|
365
|
+
private updatePosition;
|
|
366
|
+
private addPositionListeners;
|
|
367
|
+
private removePositionListeners;
|
|
357
368
|
private isTouchDevice;
|
|
358
369
|
private getFlippedPosition;
|
|
359
370
|
onMouseEnter(): void;
|
|
@@ -376,7 +387,7 @@ interface TabsGroupBase {
|
|
|
376
387
|
/** Currently selected tab value */
|
|
377
388
|
value: WritableSignal<string | null>;
|
|
378
389
|
/** Visual style of the tabs (underline, background, pill) */
|
|
379
|
-
lmVariant: Signal<
|
|
390
|
+
lmVariant: Signal<TabsVariant>;
|
|
380
391
|
/** Whether to lazy load panel content */
|
|
381
392
|
lmLazy: Signal<boolean>;
|
|
382
393
|
/** Select a tab by value */
|
|
@@ -403,6 +414,8 @@ interface TabsListBase {
|
|
|
403
414
|
};
|
|
404
415
|
/** Get the currently active trigger element */
|
|
405
416
|
getActiveTrigger(): HTMLElement | null;
|
|
417
|
+
/** Get the element that acts as the semantic tablist container */
|
|
418
|
+
getListContainer(): HTMLElement;
|
|
406
419
|
}
|
|
407
420
|
/**
|
|
408
421
|
* Injection token for tabs group
|
|
@@ -439,7 +452,7 @@ declare class LmTabsComponent implements TabsGroupBase {
|
|
|
439
452
|
/** Default value for uncontrolled mode */
|
|
440
453
|
lmDefaultValue: _angular_core.InputSignal<string>;
|
|
441
454
|
/** Visual style: underline, background, or pill */
|
|
442
|
-
lmVariant: _angular_core.InputSignal<
|
|
455
|
+
lmVariant: _angular_core.InputSignal<TabsVariant>;
|
|
443
456
|
/** Whether to lazy load panel content */
|
|
444
457
|
lmLazy: _angular_core.InputSignal<boolean>;
|
|
445
458
|
/** Emits when selected tab changes */
|
|
@@ -490,10 +503,11 @@ declare class LmTabsComponent implements TabsGroupBase {
|
|
|
490
503
|
}
|
|
491
504
|
|
|
492
505
|
/**
|
|
493
|
-
* Tabs list
|
|
506
|
+
* Tabs list component
|
|
494
507
|
*
|
|
495
508
|
* Container for tab triggers with role="tablist".
|
|
496
509
|
* Provides context for the indicator component.
|
|
510
|
+
* Supports horizontal scrolling with arrow navigation.
|
|
497
511
|
*
|
|
498
512
|
* @example
|
|
499
513
|
* ```html
|
|
@@ -502,23 +516,77 @@ declare class LmTabsComponent implements TabsGroupBase {
|
|
|
502
516
|
* <button lumaTabsTrigger="tab-2">Tab 2</button>
|
|
503
517
|
* </div>
|
|
504
518
|
* ```
|
|
519
|
+
*
|
|
520
|
+
* @example
|
|
521
|
+
* ```html
|
|
522
|
+
* <div lumaTabsList [lmScrollable]="true">
|
|
523
|
+
* <button lumaTabsTrigger="tab-1">Tab 1</button>
|
|
524
|
+
* <!-- ... many more tabs -->
|
|
525
|
+
* </div>
|
|
526
|
+
* ```
|
|
505
527
|
*/
|
|
506
|
-
declare class LmTabsListDirective implements TabsListBase {
|
|
528
|
+
declare class LmTabsListDirective implements TabsListBase, AfterViewInit, OnDestroy {
|
|
507
529
|
readonly elementRef: ElementRef<any>;
|
|
508
530
|
protected readonly tabsGroup: _lumaui_angular.TabsGroupBase;
|
|
531
|
+
private readonly platformId;
|
|
532
|
+
/** Reference to the scroll container */
|
|
533
|
+
scrollContainerRef: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
509
534
|
/** Whether horizontal scrolling is enabled */
|
|
510
|
-
lmScrollable: boolean
|
|
511
|
-
|
|
535
|
+
lmScrollable: _angular_core.InputSignal<boolean>;
|
|
536
|
+
/** Whether to show scroll arrows */
|
|
537
|
+
showArrows: _angular_core.WritableSignal<boolean>;
|
|
538
|
+
showLeftArrow: _angular_core.WritableSignal<boolean>;
|
|
539
|
+
showRightArrow: _angular_core.WritableSignal<boolean>;
|
|
540
|
+
/** ResizeObserver for overflow detection */
|
|
541
|
+
private resizeObserver?;
|
|
542
|
+
/** Debounce timeout for ResizeObserver */
|
|
543
|
+
private resizeTimeout?;
|
|
544
|
+
/** Throttle timeout for scroll events */
|
|
545
|
+
private scrollTimeout?;
|
|
546
|
+
/** Host element classes */
|
|
547
|
+
hostClasses: _angular_core.Signal<string>;
|
|
548
|
+
/** Scroll container classes */
|
|
549
|
+
scrollContainerClasses: _angular_core.Signal<string[]>;
|
|
550
|
+
/** Left arrow button classes */
|
|
551
|
+
leftArrowClasses: _angular_core.Signal<string>;
|
|
552
|
+
/** Right arrow button classes */
|
|
553
|
+
rightArrowClasses: _angular_core.Signal<string>;
|
|
554
|
+
constructor();
|
|
555
|
+
ngAfterViewInit(): void;
|
|
556
|
+
ngOnDestroy(): void;
|
|
512
557
|
/**
|
|
513
558
|
* Get the currently active trigger element
|
|
514
559
|
*/
|
|
515
560
|
getActiveTrigger(): HTMLElement | null;
|
|
561
|
+
/**
|
|
562
|
+
* Get the element that acts as the semantic tablist container.
|
|
563
|
+
* When scrollable, this is the inner scroll container (which has role="tablist").
|
|
564
|
+
* When non-scrollable, this is the host element itself.
|
|
565
|
+
*/
|
|
566
|
+
getListContainer(): HTMLElement;
|
|
567
|
+
/**
|
|
568
|
+
* Scroll to the next set of tabs (85% of container width)
|
|
569
|
+
*/
|
|
570
|
+
scrollNext(): void;
|
|
571
|
+
/**
|
|
572
|
+
* Scroll to the previous set of tabs (85% of container width)
|
|
573
|
+
*/
|
|
574
|
+
scrollPrevious(): void;
|
|
575
|
+
/**
|
|
576
|
+
* Handle scroll event to update arrow states (throttled)
|
|
577
|
+
*/
|
|
578
|
+
onScroll(): void;
|
|
516
579
|
/**
|
|
517
580
|
* Handle mouse wheel for horizontal scroll
|
|
518
581
|
*/
|
|
519
582
|
onWheel(event: WheelEvent): void;
|
|
583
|
+
/**
|
|
584
|
+
* Update arrow visibility and enabled states based on scroll position
|
|
585
|
+
* Optimized to only update signals when values actually change
|
|
586
|
+
*/
|
|
587
|
+
private updateArrowsVisibility;
|
|
520
588
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LmTabsListDirective, never>;
|
|
521
|
-
static
|
|
589
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LmTabsListDirective, "[lumaTabsList]", never, { "lmScrollable": { "alias": "lmScrollable"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
522
590
|
}
|
|
523
591
|
|
|
524
592
|
/**
|