@samuel-charpentier/sform 0.0.4 → 0.0.5

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/README.md CHANGED
@@ -193,6 +193,7 @@ Supported text types: `text`, `email`, `tel`, `url`, `search`, `date`, `datetime
193
193
  | `showToggleIcon` | `Snippet<[passwordShown: boolean]>` | `undefined` | Custom toggle icon snippet |
194
194
  | `prefix` | `string \| Snippet` | `undefined` | Content before input |
195
195
  | `suffix` | `string \| Snippet` | `undefined` | Content after input |
196
+ | `autocomplete` | `string` | `undefined` | HTML autocomplete attribute |
196
197
 
197
198
  #### Number Input
198
199
 
@@ -221,11 +222,10 @@ Supported text types: `text`, `email`, `tel`, `url`, `search`, `date`, `datetime
221
222
  <Sfield field={fields.notes} type="textarea" label="Notes" prefix="📝" suffix="(max 500 chars)" />
222
223
  ```
223
224
 
224
- | Prop | Type | Default | Description |
225
- | -------------- | ------------------- | ----------- | --------------------------- |
226
- | `prefix` | `string \| Snippet` | `undefined` | Content before input |
227
- | `suffix` | `string \| Snippet` | `undefined` | Content after input |
228
- | `autocomplete` | `string` | `undefined` | HTML autocomplete attribute |
225
+ | Prop | Type | Default | Description |
226
+ | -------- | ------------------- | ----------- | -------------------- |
227
+ | `prefix` | `string \| Snippet` | `undefined` | Content before input |
228
+ | `suffix` | `string \| Snippet` | `undefined` | Content after input |
229
229
 
230
230
  #### Select
231
231
 
@@ -242,9 +242,10 @@ Supported text types: `text`, `email`, `tel`, `url`, `search`, `date`, `datetime
242
242
  />
243
243
  ```
244
244
 
245
- | Prop | Type | Default | Description |
246
- | --------- | ---------------------------- | -------- | -------------- |
247
- | `options` | `SelectOption[] \| string[]` | required | Select options |
245
+ | Prop | Type | Default | Description |
246
+ | -------------- | ---------------------------- | ----------- | --------------------------- |
247
+ | `options` | `SelectOption[] \| string[]` | required | Select options |
248
+ | `autocomplete` | `string` | `undefined` | HTML autocomplete attribute |
248
249
 
249
250
  #### Checkbox
250
251
 
@@ -286,13 +287,14 @@ Supported text types: `text`, `email`, `tel`, `url`, `search`, `date`, `datetime
286
287
  />
287
288
  ```
288
289
 
289
- | Prop | Type | Default | Description |
290
- | ------------- | --------------------------- | ----------- | ---------------------- |
291
- | `min` | `number \| string` | `0` | Minimum value |
292
- | `max` | `number \| string` | `100` | Maximum value |
293
- | `step` | `number \| string` | `1` | Step increment |
294
- | `showValue` | `boolean` | `false` | Show current value |
295
- | `formatValue` | `(value: number) => string` | `undefined` | Format displayed value |
290
+ | Prop | Type | Default | Description |
291
+ | -------------- | --------------------------- | ----------- | --------------------------- |
292
+ | `min` | `number \| string` | `0` | Minimum value |
293
+ | `max` | `number \| string` | `100` | Maximum value |
294
+ | `step` | `number \| string` | `1` | Step increment |
295
+ | `showValue` | `boolean` | `false` | Show current value |
296
+ | `formatValue` | `(value: number) => string` | `undefined` | Format displayed value |
297
+ | `autocomplete` | `string` | `undefined` | HTML autocomplete attribute |
296
298
 
297
299
  #### Toggle
298
300
 
@@ -365,6 +367,7 @@ Supported text types: `text`, `email`, `tel`, `url`, `search`, `date`, `datetime
365
367
  | `unmaskValue` | `boolean` | `true` | Store unmasked value |
366
368
  | `prefix` | `string \| Snippet` | `undefined` | Content before input |
367
369
  | `suffix` | `string \| Snippet` | `undefined` | Content after input |
370
+ | `autocomplete` | `string` | `undefined` | HTML autocomplete attribute |
368
371
 
369
372
  **Mask Tokens:**
370
373
 
@@ -458,8 +458,6 @@ export interface BaseInputComponentProps {
458
458
  disabled?: boolean;
459
459
  /** Whether input is readonly */
460
460
  readonly?: boolean;
461
- /** Autocomplete attribute */
462
- autocomplete?: HTMLInputAttributes['autocomplete'];
463
461
  /** Whether to show validation state (controls aria-invalid) */
464
462
  showIssues?: boolean;
465
463
  /** Blur handler */
@@ -512,6 +510,8 @@ export interface NumberInputComponentProps extends BaseInputComponentProps, Inpu
512
510
  align?: 'start' | 'end';
513
511
  /** Maximum decimal places allowed (0 = integers only, undefined = no limit) */
514
512
  maxDecimals?: number;
513
+ /** Autocomplete attribute */
514
+ autocomplete?: HTMLInputAttributes['autocomplete'];
515
515
  }
516
516
  /**
517
517
  * Props for text input component (text, email, tel, url, search, date, etc.)
@@ -519,11 +519,15 @@ export interface NumberInputComponentProps extends BaseInputComponentProps, Inpu
519
519
  export interface TextInputComponentProps extends BaseInputComponentProps, InputAffixProps {
520
520
  /** Input type - text-like types only */
521
521
  type: TextInputType;
522
+ /** Autocomplete attribute */
523
+ autocomplete?: HTMLInputAttributes['autocomplete'];
522
524
  }
523
525
  /**
524
526
  * Props for textarea input component
525
527
  */
526
528
  export interface TextareaInputProps extends BaseInputComponentProps, InputAffixProps {
529
+ /** Autocomplete attribute */
530
+ autocomplete?: HTMLInputAttributes['autocomplete'];
527
531
  }
528
532
  /**
529
533
  * Props for select input component
@@ -531,6 +535,8 @@ export interface TextareaInputProps extends BaseInputComponentProps, InputAffixP
531
535
  export interface SelectInputProps extends BaseInputComponentProps {
532
536
  /** Options for select */
533
537
  options: SelectOption[] | string[];
538
+ /** Autocomplete attribute */
539
+ autocomplete?: HTMLInputAttributes['autocomplete'];
534
540
  }
535
541
  /**
536
542
  * Props for checkbox input component (single yes/no)
@@ -628,6 +634,8 @@ export interface RangeInputProps extends NumericInputComponentProps {
628
634
  showValue?: boolean;
629
635
  /** Format function for value display */
630
636
  formatValue?: (value: number) => string;
637
+ /** Autocomplete attribute */
638
+ autocomplete?: HTMLInputAttributes['autocomplete'];
631
639
  }
632
640
  /**
633
641
  * Props for password input component
@@ -636,6 +644,8 @@ export interface PasswordInputProps extends BaseInputComponentProps {
636
644
  /** Whether to show the password visibility toggle */
637
645
  showToggle?: boolean;
638
646
  showToggleIcon?: Snippet<[boolean]>;
647
+ /** Autocomplete attribute */
648
+ autocomplete?: HTMLInputAttributes['autocomplete'];
639
649
  }
640
650
  /**
641
651
  * Props for toggle input component
@@ -681,6 +691,8 @@ export interface MaskedInputProps extends BaseInputComponentProps, InputAffixPro
681
691
  showMaskPlaceholder?: boolean;
682
692
  /** Whether to store the unmasked (raw) value. If true, stores '1234567890'. If false, stores '(123) 456-7890'. Default: true */
683
693
  unmaskValue?: boolean;
694
+ /** Autocomplete attribute */
695
+ autocomplete?: HTMLInputAttributes['autocomplete'];
684
696
  }
685
697
  /**
686
698
  * Props for Fieldset utils component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samuel-charpentier/sform",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A Svelte 5 form library for SvelteKit remote forms",
5
5
  "keywords": [
6
6
  "svelte",