codexly-ui 0.6.7 → 0.6.8
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/codexly-ui.mjs +54 -16
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +16 -5
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -12367,6 +12367,8 @@ class ClxFabComponent {
|
|
|
12367
12367
|
position = input(undefined, ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
12368
12368
|
/** Initial corner used only when the user hasn't dragged/saved a position yet. */
|
|
12369
12369
|
defaultPosition = input(DEFAULT_POSITION, ...(ngDevMode ? [{ debugName: "defaultPosition" }] : /* istanbul ignore next */ []));
|
|
12370
|
+
/** Direction the shortcut stack expands toward. */
|
|
12371
|
+
expandDirection = input('up', ...(ngDevMode ? [{ debugName: "expandDirection" }] : /* istanbul ignore next */ []));
|
|
12370
12372
|
// ── Outputs ─────────────────────────────────────────────────────────────────
|
|
12371
12373
|
itemClick = output();
|
|
12372
12374
|
/** Emitted once, after a drag ends, with the new position to persist. */
|
|
@@ -12387,10 +12389,46 @@ class ClxFabComponent {
|
|
|
12387
12389
|
// ── CDK Overlay ─────────────────────────────────────────────────────────────
|
|
12388
12390
|
_sso = inject(ScrollStrategyOptions);
|
|
12389
12391
|
_scrollStrategy = this._sso.reposition();
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12392
|
+
static POSITIONS_BY_DIRECTION = {
|
|
12393
|
+
up: [
|
|
12394
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },
|
|
12395
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },
|
|
12396
|
+
],
|
|
12397
|
+
down: [
|
|
12398
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },
|
|
12399
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },
|
|
12400
|
+
],
|
|
12401
|
+
left: [
|
|
12402
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },
|
|
12403
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },
|
|
12404
|
+
],
|
|
12405
|
+
right: [
|
|
12406
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },
|
|
12407
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },
|
|
12408
|
+
],
|
|
12409
|
+
};
|
|
12410
|
+
_positions = computed(() => ClxFabComponent.POSITIONS_BY_DIRECTION[this.expandDirection()], ...(ngDevMode ? [{ debugName: "_positions" }] : /* istanbul ignore next */ []));
|
|
12411
|
+
static STACK_CLASS_BY_DIRECTION = {
|
|
12412
|
+
up: 'flex-col items-end mb-2',
|
|
12413
|
+
down: 'flex-col-reverse items-end mt-2',
|
|
12414
|
+
left: 'flex-row items-center mr-2',
|
|
12415
|
+
right: 'flex-row-reverse items-center ml-2',
|
|
12416
|
+
};
|
|
12417
|
+
_stackClass = computed(() => `flex gap-2 ${ClxFabComponent.STACK_CLASS_BY_DIRECTION[this.expandDirection()]}`, ...(ngDevMode ? [{ debugName: "_stackClass" }] : /* istanbul ignore next */ []));
|
|
12418
|
+
static ITEM_CLASS_BY_DIRECTION = {
|
|
12419
|
+
up: 'flex items-center gap-2',
|
|
12420
|
+
down: 'flex items-center gap-2',
|
|
12421
|
+
left: 'flex items-center gap-2 flex-row-reverse',
|
|
12422
|
+
right: 'flex items-center gap-2',
|
|
12423
|
+
};
|
|
12424
|
+
_itemClass = computed(() => ClxFabComponent.ITEM_CLASS_BY_DIRECTION[this.expandDirection()], ...(ngDevMode ? [{ debugName: "_itemClass" }] : /* istanbul ignore next */ []));
|
|
12425
|
+
static ANIMATION_BY_DIRECTION = {
|
|
12426
|
+
up: 'fadeInUp',
|
|
12427
|
+
down: 'fadeInDown',
|
|
12428
|
+
left: 'fadeInLeft',
|
|
12429
|
+
right: 'fadeInRight',
|
|
12430
|
+
};
|
|
12431
|
+
_itemAnimation = computed(() => ClxFabComponent.ANIMATION_BY_DIRECTION[this.expandDirection()], ...(ngDevMode ? [{ debugName: "_itemAnimation" }] : /* istanbul ignore next */ []));
|
|
12394
12432
|
// ── State ────────────────────────────────────────────────────────────────────
|
|
12395
12433
|
_isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
|
|
12396
12434
|
// ── Drag ─────────────────────────────────────────────────────────────────────
|
|
@@ -12457,7 +12495,7 @@ class ClxFabComponent {
|
|
|
12457
12495
|
this._close();
|
|
12458
12496
|
}
|
|
12459
12497
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxFabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12460
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxFabComponent, isStandalone: true, selector: "clx-fab", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", positionChange: "positionChange" }, ngImport: i0, template: `
|
|
12498
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxFabComponent, isStandalone: true, selector: "clx-fab", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null }, expandDirection: { classPropertyName: "expandDirection", publicName: "expandDirection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", positionChange: "positionChange" }, ngImport: i0, template: `
|
|
12461
12499
|
<!-- ── Trigger (this wrapper owns the fixed positioning + drag; the button inside stays a plain clx-button) ── -->
|
|
12462
12500
|
<div
|
|
12463
12501
|
#origin="cdkOverlayOrigin"
|
|
@@ -12483,25 +12521,25 @@ class ClxFabComponent {
|
|
|
12483
12521
|
</button>
|
|
12484
12522
|
</div>
|
|
12485
12523
|
|
|
12486
|
-
<!-- ── Overlay panel:
|
|
12524
|
+
<!-- ── Overlay panel: stack expanding toward expandDirection() ────────────────── -->
|
|
12487
12525
|
<ng-template
|
|
12488
12526
|
cdkConnectedOverlay
|
|
12489
12527
|
[cdkConnectedOverlayOrigin]="origin"
|
|
12490
12528
|
[cdkConnectedOverlayOpen]="_isOpen()"
|
|
12491
|
-
[cdkConnectedOverlayPositions]="_positions"
|
|
12529
|
+
[cdkConnectedOverlayPositions]="_positions()"
|
|
12492
12530
|
[cdkConnectedOverlayScrollStrategy]="_scrollStrategy"
|
|
12493
12531
|
[cdkConnectedOverlayPush]="true"
|
|
12494
12532
|
(overlayOutsideClick)="_close()"
|
|
12495
12533
|
(overlayKeydown)="_onKeydown($event)">
|
|
12496
12534
|
|
|
12497
|
-
<div class="
|
|
12535
|
+
<div [class]="_stackClass()" role="menu">
|
|
12498
12536
|
@for (item of items(); track item.key; let i = $index) {
|
|
12499
12537
|
<div
|
|
12500
|
-
clxAnimate="
|
|
12538
|
+
[clxAnimate]="_itemAnimation()"
|
|
12501
12539
|
trigger="onEnter"
|
|
12502
12540
|
[delay]="i * 60"
|
|
12503
12541
|
[duration]="220"
|
|
12504
|
-
class="
|
|
12542
|
+
[class]="_itemClass()">
|
|
12505
12543
|
<span class="px-2.5 py-1 rounded-lg bg-clx-surface border border-clx-border shadow-sm text-xs font-medium text-clx-text-label whitespace-nowrap">
|
|
12506
12544
|
{{ item.label }}
|
|
12507
12545
|
</span>
|
|
@@ -12548,25 +12586,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
12548
12586
|
</button>
|
|
12549
12587
|
</div>
|
|
12550
12588
|
|
|
12551
|
-
<!-- ── Overlay panel:
|
|
12589
|
+
<!-- ── Overlay panel: stack expanding toward expandDirection() ────────────────── -->
|
|
12552
12590
|
<ng-template
|
|
12553
12591
|
cdkConnectedOverlay
|
|
12554
12592
|
[cdkConnectedOverlayOrigin]="origin"
|
|
12555
12593
|
[cdkConnectedOverlayOpen]="_isOpen()"
|
|
12556
|
-
[cdkConnectedOverlayPositions]="_positions"
|
|
12594
|
+
[cdkConnectedOverlayPositions]="_positions()"
|
|
12557
12595
|
[cdkConnectedOverlayScrollStrategy]="_scrollStrategy"
|
|
12558
12596
|
[cdkConnectedOverlayPush]="true"
|
|
12559
12597
|
(overlayOutsideClick)="_close()"
|
|
12560
12598
|
(overlayKeydown)="_onKeydown($event)">
|
|
12561
12599
|
|
|
12562
|
-
<div class="
|
|
12600
|
+
<div [class]="_stackClass()" role="menu">
|
|
12563
12601
|
@for (item of items(); track item.key; let i = $index) {
|
|
12564
12602
|
<div
|
|
12565
|
-
clxAnimate="
|
|
12603
|
+
[clxAnimate]="_itemAnimation()"
|
|
12566
12604
|
trigger="onEnter"
|
|
12567
12605
|
[delay]="i * 60"
|
|
12568
12606
|
[duration]="220"
|
|
12569
|
-
class="
|
|
12607
|
+
[class]="_itemClass()">
|
|
12570
12608
|
<span class="px-2.5 py-1 rounded-lg bg-clx-surface border border-clx-border shadow-sm text-xs font-medium text-clx-text-label whitespace-nowrap">
|
|
12571
12609
|
{{ item.label }}
|
|
12572
12610
|
</span>
|
|
@@ -12583,7 +12621,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
12583
12621
|
encapsulation: ViewEncapsulation.None,
|
|
12584
12622
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12585
12623
|
}]
|
|
12586
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], defaultPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPosition", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], positionChange: [{ type: i0.Output, args: ["positionChange"] }] } });
|
|
12624
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], defaultPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPosition", required: false }] }], expandDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandDirection", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], positionChange: [{ type: i0.Output, args: ["positionChange"] }] } });
|
|
12587
12625
|
|
|
12588
12626
|
// ── Base classes ─────────────────────────────────────────────────────────────
|
|
12589
12627
|
const TABLE_BASE_CLASS = 'w-full text-left border-collapse text-sm';
|