@hashrytech/quick-components-kit 0.19.2 → 0.19.3
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/CHANGELOG.md
CHANGED
|
@@ -107,6 +107,12 @@
|
|
|
107
107
|
lg: "text-base placeholder:text-base px-3"
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
+
let iconStyle: Record<TextInputSize, string> = {
|
|
111
|
+
sm: "pl-2.5",
|
|
112
|
+
md: "px-2.5",
|
|
113
|
+
lg: "text-base placeholder:text-base px-3"
|
|
114
|
+
};
|
|
115
|
+
|
|
110
116
|
let textBoxStyle: Record<TextInputSize, string> = {
|
|
111
117
|
sm: "h-[2.05rem]",
|
|
112
118
|
md: "h-[2.375rem]",
|
|
@@ -122,7 +128,7 @@
|
|
|
122
128
|
|
|
123
129
|
// --- Debounce logic ---
|
|
124
130
|
let localValue = value; // local for immediate typing
|
|
125
|
-
let debounceTimer: ReturnType<typeof setTimeout>;
|
|
131
|
+
let debounceTimer: ReturnType<typeof setTimeout>;
|
|
126
132
|
|
|
127
133
|
function handleInput(e: Event) {
|
|
128
134
|
localValue = (e.target as HTMLInputElement).value;
|
|
@@ -145,12 +151,12 @@
|
|
|
145
151
|
<div class={twMerge("flex flex-row items-center rounded-primary border border-primary-input-border focus-within:ring focus-within:border-primary-focus focus-within:ring-primary-focus has-[input:disabled]:bg-neutral-300/30 has-[input:disabled]:border-neutral-300/30",
|
|
146
152
|
error ? "bg-red-50 border-red-300" : "", textBoxStyle[size], thirdDivClass)}>
|
|
147
153
|
|
|
148
|
-
{#if leftIcon}<div class="h-full flex flex-col items-center justify-center pl-2">{@render leftIcon()}</div>{/if}
|
|
154
|
+
{#if leftIcon}<div class="h-full flex flex-col items-center justify-center {size == 'lg' ? 'pl-3' : 'pl-2.5'}">{@render leftIcon()}</div>{/if}
|
|
149
155
|
|
|
150
156
|
<input {disabled} {required} {type} {id} name={name ? name: id} {placeholder} {onmouseup} bind:value {autocomplete} {inputmode} {min} {max} oninput={handleInput}
|
|
151
|
-
class={twMerge("border-0 focus:border-0 focus:ring-0 active:border-0 outline-none p-0 bg-transparent placeholder:text-neutral-600/50 h-full w-full", sizeStyle[size], restProps.class)} />
|
|
157
|
+
class={twMerge("border-0 focus:border-0 focus:ring-0 active:border-0 outline-none p-0 bg-transparent placeholder:text-neutral-600/50 h-full w-full rounded-primary", sizeStyle[size], restProps.class)} />
|
|
152
158
|
|
|
153
|
-
{#if rightIcon}<div class="h-full flex flex-col items-center justify-center pr-2">{@render rightIcon()}</div>{/if}
|
|
159
|
+
{#if rightIcon}<div class="h-full flex flex-col items-center justify-center {size == 'lg' ? 'pr-3' : 'pr-2.5'}">{@render rightIcon()}</div>{/if}
|
|
154
160
|
</div>
|
|
155
161
|
|
|
156
162
|
</div>
|