@juspay/svelte-ui-components 2.81.3 → 2.82.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.
@@ -22,6 +22,7 @@
22
22
  actionInput = false,
23
23
  useTextArea = false,
24
24
  autoComplete = 'on',
25
+ inputMode,
25
26
  name = '',
26
27
  testId = '',
27
28
  textTransformers = [],
@@ -256,6 +257,7 @@
256
257
  {value}
257
258
  {placeholder}
258
259
  autocomplete={autoComplete}
260
+ inputmode={inputMode}
259
261
  {name}
260
262
  {role}
261
263
  aria-expanded={ariaExpanded}
@@ -286,6 +288,7 @@
286
288
  {value}
287
289
  {placeholder}
288
290
  autocomplete={autoComplete}
291
+ inputmode={inputMode}
289
292
  {name}
290
293
  {role}
291
294
  aria-expanded={ariaExpanded}
@@ -41,6 +41,11 @@ export type OptionalInputProperties = {
41
41
  /** Show a live `current / maxLength` character counter beneath the field. */
42
42
  showCount?: boolean;
43
43
  autoComplete?: HTMLInputAttributes['autocomplete'];
44
+ /**
45
+ * Virtual-keyboard hint rendered as the native `inputmode` attribute
46
+ * (e.g. `'numeric'` for OTP/PIN fields). Left off by default.
47
+ */
48
+ inputMode?: HTMLInputAttributes['inputmode'];
44
49
  name?: string;
45
50
  textTransformers?: TextTransformer[];
46
51
  textViewPresentation?: TextTransformer[];
@@ -159,6 +159,8 @@
159
159
  placeholder={config.placeholder}
160
160
  validationPattern={config.validationPattern ?? null}
161
161
  validators={config.validators ?? []}
162
+ autoComplete={config.autoComplete ?? 'on'}
163
+ inputMode={config.inputMode}
162
164
  disable={disabled}
163
165
  actionInput={true}
164
166
  classes="field-group-input"
@@ -1,5 +1,5 @@
1
1
  import type { OptionalInputProperties } from '../Input/properties';
2
- export type FieldConfig = Pick<OptionalInputProperties, 'dataType' | 'maxLength' | 'min' | 'max' | 'placeholder' | 'validationPattern' | 'validators' | 'label'>;
2
+ export type FieldConfig = Pick<OptionalInputProperties, 'dataType' | 'maxLength' | 'min' | 'max' | 'placeholder' | 'validationPattern' | 'validators' | 'label' | 'autoComplete' | 'inputMode'>;
3
3
  export type SplitInputProperties = MandatorySplitInputProperties & OptionalSplitInputProperties & SplitInputEventProperties;
4
4
  export type MandatorySplitInputProperties = {
5
5
  values: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.81.3",
3
+ "version": "2.82.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",