codexly-ui 0.10.77 → 0.10.79
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 +42 -28
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +4 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -925,14 +925,16 @@ class ClxButtonComponent {
|
|
|
925
925
|
const shapeClass = s === 'rounded'
|
|
926
926
|
? resolveRadius(this._themeSvc.config().borderRadius)
|
|
927
927
|
: BUTTON_SHAPE_FIXED[s];
|
|
928
|
-
|
|
928
|
+
// The host no longer needs to toggle overflow-hidden/-visible for the badge — the ripple has
|
|
929
|
+
// its own clipped container (.clx-ripple-clip) independent of the host's overflow, so the host
|
|
930
|
+
// can stay overflow-visible unconditionally without ripple waves escaping the button shape.
|
|
929
931
|
// If the consumer already positions the button (absolute/fixed/sticky), don't force
|
|
930
932
|
// `relative` — same-specificity utility classes are resolved by CSS source order, not
|
|
931
933
|
// template order, so `relative` from the base class can silently win over a consumer's
|
|
932
934
|
// `absolute`, leaving the button positioned in-flow instead of where it was placed.
|
|
933
935
|
const isPositioned = /(^|\s)(absolute|fixed|sticky)(\s|$)/.test(this._consumerClass);
|
|
934
936
|
const base = (isPositioned ? BUTTON_BASE_CLASS.replace(/^relative\s/, '') : BUTTON_BASE_CLASS)
|
|
935
|
-
.replace('overflow-hidden',
|
|
937
|
+
.replace('overflow-hidden', 'overflow-visible');
|
|
936
938
|
const consumer = this._consumerClass ? ` ${this._consumerClass}` : '';
|
|
937
939
|
return `${base} ${colorClass} ${sizeClass} ${shapeClass}${this.block() ? ' w-full' : ''}${consumer}`.trimEnd();
|
|
938
940
|
}, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
@@ -958,20 +960,22 @@ class ClxButtonComponent {
|
|
|
958
960
|
@if (icon() && iconPosition() === 'right' && !loading()) {
|
|
959
961
|
<span clx-icon [name]="icon()!" [size]="_iconSize()"></span>
|
|
960
962
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
963
|
+
<span class="clx-ripple-clip">
|
|
964
|
+
@for (r of _ripples(); track r.id) {
|
|
965
|
+
<span
|
|
966
|
+
class="clx-ripple-wave"
|
|
967
|
+
[style.background-color]="_rippleColor()"
|
|
968
|
+
[style.width.px]="r.diameter"
|
|
969
|
+
[style.height.px]="r.diameter"
|
|
970
|
+
[style.left.px]="r.x - r.diameter / 2"
|
|
971
|
+
[style.top.px]="r.y - r.diameter / 2"
|
|
972
|
+
></span>
|
|
973
|
+
}
|
|
974
|
+
</span>
|
|
971
975
|
@if (badge() !== undefined && badge() !== null) {
|
|
972
976
|
<span [class]="_badgeClass()">{{ badge() }}</span>
|
|
973
977
|
}
|
|
974
|
-
`, isInline: true, styles: ["@keyframes clx-ripple-anim{to{transform:scale(4);opacity:0}}.clx-ripple-wave{position:absolute;border-radius:50%;transform:scale(0);animation:clx-ripple-anim .6s linear;pointer-events:none}\n"], dependencies: [{ kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }, { kind: "component", type: ClxSpinnerComponent, selector: "clx-spinner", inputs: ["size", "color", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
978
|
+
`, isInline: true, styles: ["@keyframes clx-ripple-anim{to{transform:scale(4);opacity:0}}.clx-ripple-clip{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}.clx-ripple-wave{position:absolute;border-radius:50%;transform:scale(0);animation:clx-ripple-anim .6s linear;pointer-events:none}\n"], dependencies: [{ kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }, { kind: "component", type: ClxSpinnerComponent, selector: "clx-spinner", inputs: ["size", "color", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
975
979
|
}
|
|
976
980
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxButtonComponent, decorators: [{
|
|
977
981
|
type: Component,
|
|
@@ -986,16 +990,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
986
990
|
@if (icon() && iconPosition() === 'right' && !loading()) {
|
|
987
991
|
<span clx-icon [name]="icon()!" [size]="_iconSize()"></span>
|
|
988
992
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
993
|
+
<span class="clx-ripple-clip">
|
|
994
|
+
@for (r of _ripples(); track r.id) {
|
|
995
|
+
<span
|
|
996
|
+
class="clx-ripple-wave"
|
|
997
|
+
[style.background-color]="_rippleColor()"
|
|
998
|
+
[style.width.px]="r.diameter"
|
|
999
|
+
[style.height.px]="r.diameter"
|
|
1000
|
+
[style.left.px]="r.x - r.diameter / 2"
|
|
1001
|
+
[style.top.px]="r.y - r.diameter / 2"
|
|
1002
|
+
></span>
|
|
1003
|
+
}
|
|
1004
|
+
</span>
|
|
999
1005
|
@if (badge() !== undefined && badge() !== null) {
|
|
1000
1006
|
<span [class]="_badgeClass()">{{ badge() }}</span>
|
|
1001
1007
|
}
|
|
@@ -1006,7 +1012,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1006
1012
|
'[attr.disabled]': '_inactive() ? true : null',
|
|
1007
1013
|
'[attr.aria-busy]': 'loading()',
|
|
1008
1014
|
'(click)': '_onRipple($event)',
|
|
1009
|
-
}, styles: ["@keyframes clx-ripple-anim{to{transform:scale(4);opacity:0}}.clx-ripple-wave{position:absolute;border-radius:50%;transform:scale(0);animation:clx-ripple-anim .6s linear;pointer-events:none}\n"] }]
|
|
1015
|
+
}, styles: ["@keyframes clx-ripple-anim{to{transform:scale(4);opacity:0}}.clx-ripple-clip{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}.clx-ripple-wave{position:absolute;border-radius:50%;transform:scale(0);animation:clx-ripple-anim .6s linear;pointer-events:none}\n"] }]
|
|
1010
1016
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], textColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "textColor", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPosition", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], badgeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeColor", required: false }] }] } });
|
|
1011
1017
|
|
|
1012
1018
|
class ClxButtonGroupComponent {
|
|
@@ -1358,6 +1364,9 @@ class ClxCardComponent {
|
|
|
1358
1364
|
shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
1359
1365
|
hover = input(false, ...(ngDevMode ? [{ debugName: "hover" }] : /* istanbul ignore next */ []));
|
|
1360
1366
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1367
|
+
/** Set to false to drop the card's border entirely (e.g. a shadow-only card matching a
|
|
1368
|
+
* product-cart-style layout) regardless of variant/color. */
|
|
1369
|
+
border = input(true, ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
|
|
1361
1370
|
/** Auto-generated header icon (Material Symbols name) — shown in a rounded primary-subtle
|
|
1362
1371
|
* square next to headerTitle. Ignored when a manual [clxCardHeader] block is projected. */
|
|
1363
1372
|
icon = input(undefined, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
@@ -1388,14 +1397,19 @@ class ClxCardComponent {
|
|
|
1388
1397
|
const t = resolveColor(this._color());
|
|
1389
1398
|
const shadowInput = this.shadow();
|
|
1390
1399
|
const hover = this.hover() ? `transition-shadow duration-200 hover:shadow-lg cursor-pointer` : '';
|
|
1400
|
+
const showBorder = this.border();
|
|
1391
1401
|
let variantClass;
|
|
1392
1402
|
if (variant === 'elevated') {
|
|
1393
1403
|
const shadowClass = shadowInput !== undefined ? CARD_SHADOW_MAP[shadowInput] : 'shadow-md';
|
|
1394
|
-
variantClass =
|
|
1404
|
+
variantClass = showBorder
|
|
1405
|
+
? `bg-clx-surface ${shadowClass} border ${t.borderLight}`
|
|
1406
|
+
: `bg-clx-surface ${shadowClass} border border-transparent`;
|
|
1395
1407
|
}
|
|
1396
1408
|
else if (variant === 'outlined') {
|
|
1397
1409
|
const shadowClass = shadowInput !== undefined ? CARD_SHADOW_MAP[shadowInput] : '';
|
|
1398
|
-
variantClass =
|
|
1410
|
+
variantClass = showBorder
|
|
1411
|
+
? `bg-clx-surface border ${t.border} ${shadowClass}`
|
|
1412
|
+
: `bg-clx-surface border border-transparent ${shadowClass}`;
|
|
1399
1413
|
}
|
|
1400
1414
|
else {
|
|
1401
1415
|
const shadowClass = shadowInput !== undefined ? CARD_SHADOW_MAP[shadowInput] : '';
|
|
@@ -1405,7 +1419,7 @@ class ClxCardComponent {
|
|
|
1405
1419
|
return `flex flex-col ${resolveContainerRadius(this._themeSvc.config().borderRadius)} overflow-hidden w-full ${variantClass} ${hover} ${disabledCls}`.trim();
|
|
1406
1420
|
}, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
1407
1421
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1408
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCardComponent, isStandalone: true, selector: "clx-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, hover: { classPropertyName: "hover", publicName: "hover", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, headerTitle: { classPropertyName: "headerTitle", publicName: "headerTitle", isSignal: true, isRequired: false, transformFunction: null }, headerSubtitle: { classPropertyName: "headerSubtitle", publicName: "headerSubtitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_hostClass()", "attr.aria-disabled": "disabled() || null" } }, queries: [{ propertyName: "_headerSlot", first: true, predicate: ClxCardHeaderDirective, descendants: true, isSignal: true }, { propertyName: "_headerActionsSlot", first: true, predicate: ClxCardHeaderActionsDirective, descendants: true, isSignal: true }, { propertyName: "_bodySlot", first: true, predicate: ClxCardBodyDirective, descendants: true, isSignal: true }, { propertyName: "_footerSlot", first: true, predicate: ClxCardFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCardComponent, isStandalone: true, selector: "clx-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, hover: { classPropertyName: "hover", publicName: "hover", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, headerTitle: { classPropertyName: "headerTitle", publicName: "headerTitle", isSignal: true, isRequired: false, transformFunction: null }, headerSubtitle: { classPropertyName: "headerSubtitle", publicName: "headerSubtitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_hostClass()", "attr.aria-disabled": "disabled() || null" } }, queries: [{ propertyName: "_headerSlot", first: true, predicate: ClxCardHeaderDirective, descendants: true, isSignal: true }, { propertyName: "_headerActionsSlot", first: true, predicate: ClxCardHeaderActionsDirective, descendants: true, isSignal: true }, { propertyName: "_bodySlot", first: true, predicate: ClxCardBodyDirective, descendants: true, isSignal: true }, { propertyName: "_footerSlot", first: true, predicate: ClxCardFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1409
1423
|
@if (_hasHeader()) {
|
|
1410
1424
|
<div class="clx-card-header flex items-center justify-between gap-3 px-4 py-3 border-b border-clx-border-soft">
|
|
1411
1425
|
<ng-content select="[clxCardHeader]" />
|
|
@@ -1497,7 +1511,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1497
1511
|
}
|
|
1498
1512
|
`,
|
|
1499
1513
|
}]
|
|
1500
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], hover: [{ type: i0.Input, args: [{ isSignal: true, alias: "hover", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], headerTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTitle", required: false }] }], headerSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerSubtitle", required: false }] }], _headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardHeaderDirective), { isSignal: true }] }], _headerActionsSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardHeaderActionsDirective), { isSignal: true }] }], _bodySlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardBodyDirective), { isSignal: true }] }], _footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardFooterDirective), { isSignal: true }] }] } });
|
|
1514
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], hover: [{ type: i0.Input, args: [{ isSignal: true, alias: "hover", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], headerTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerTitle", required: false }] }], headerSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerSubtitle", required: false }] }], _headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardHeaderDirective), { isSignal: true }] }], _headerActionsSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardHeaderActionsDirective), { isSignal: true }] }], _bodySlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardBodyDirective), { isSignal: true }] }], _footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ClxCardFooterDirective), { isSignal: true }] }] } });
|
|
1501
1515
|
|
|
1502
1516
|
const CLX_LIST_CONTEXT = new InjectionToken('CLX_LIST_CONTEXT');
|
|
1503
1517
|
// ── Variant maps ──────────────────────────────────────────────────────────────
|