@flusys/ng-ui 8.0.0-beta.1 → 8.0.0
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.
|
@@ -6832,6 +6832,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
6832
6832
|
}], propDecorators: { stars: [{ type: i0.Input, args: [{ isSignal: true, alias: "stars", required: false }] }], cancel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancel", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], iconOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOn", required: false }] }], iconOff: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOff", required: false }] }], cancelIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelIcon", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], onRate: [{ type: i0.Output, args: ["onRate"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }] } });
|
|
6833
6833
|
|
|
6834
6834
|
class InputIconComponent {
|
|
6835
|
+
_iconField = inject(IconFieldComponent, { optional: true });
|
|
6835
6836
|
icon = input('', /* @ts-ignore */
|
|
6836
6837
|
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
6837
6838
|
position = input('left', /* @ts-ignore */
|
|
@@ -6840,8 +6841,10 @@ class InputIconComponent {
|
|
|
6840
6841
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
6841
6842
|
style = input(null, /* @ts-ignore */
|
|
6842
6843
|
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
6844
|
+
_resolvedPosition = computed(() => this._iconField?.resolvedPosition() ?? this.position(), /* @ts-ignore */
|
|
6845
|
+
...(ngDevMode ? [{ debugName: "_resolvedPosition" }] : /* istanbul ignore next */ []));
|
|
6843
6846
|
hostClass = computed(() => {
|
|
6844
|
-
const sideClass = this.
|
|
6847
|
+
const sideClass = this._resolvedPosition() === 'right'
|
|
6845
6848
|
? 'right-(--f-field-padding-x)'
|
|
6846
6849
|
: 'left-(--f-field-padding-x)';
|
|
6847
6850
|
return `absolute ${sideClass} top-1/2 -translate-y-1/2 text-(--f-form-field-placeholder-color) ${this.styleClass()}`;
|
|
@@ -6877,14 +6880,10 @@ class IconFieldComponent {
|
|
|
6877
6880
|
...(ngDevMode ? [{ debugName: "iconPosition" }] : /* istanbul ignore next */ []));
|
|
6878
6881
|
styleClass = input('', /* @ts-ignore */
|
|
6879
6882
|
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
6880
|
-
|
|
6881
|
-
...(ngDevMode ? [{ debugName: "
|
|
6883
|
+
resolvedPosition = computed(() => this.iconPosition() || this._icon()?.position() || 'left', /* @ts-ignore */
|
|
6884
|
+
...(ngDevMode ? [{ debugName: "resolvedPosition" }] : /* istanbul ignore next */ []));
|
|
6882
6885
|
hostClass = computed(() => {
|
|
6883
|
-
|
|
6884
|
-
// between icon and text stays constant in every preset. Spelled out in full:
|
|
6885
|
-
// Tailwind generates a utility only for class names it can find verbatim in the
|
|
6886
|
-
// source, so an interpolated one silently produces no CSS at all.
|
|
6887
|
-
const paddingClass = this._resolvedPosition() === 'right'
|
|
6886
|
+
const paddingClass = this.resolvedPosition() === 'right'
|
|
6888
6887
|
? '[&_input]:pr-[calc(var(--f-field-padding-x)+1.5rem)] [&_textarea]:pr-[calc(var(--f-field-padding-x)+1.5rem)]'
|
|
6889
6888
|
: '[&_input]:pl-[calc(var(--f-field-padding-x)+1.5rem)] [&_textarea]:pl-[calc(var(--f-field-padding-x)+1.5rem)]';
|
|
6890
6889
|
return `relative flex items-center ${paddingClass} ${this.styleClass()}`;
|