svelte-tel-input 3.4.0 → 3.5.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.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  Svelte Tel Input is distributed via [npm](https://www.npmjs.com/package/svelte-tel-input).
16
16
 
17
17
  ```bash
18
- npm install --save svelte-tel-input
18
+ npm install svelte-tel-input
19
19
  ```
20
20
 
21
21
  ## Features
@@ -29,6 +29,7 @@ export let country;
29
29
  export let detailedValue = null;
30
30
  export let valid = true;
31
31
  export let options = defaultOptions;
32
+ export let el = void 0;
32
33
  let inputValue = value;
33
34
  let prevCountry = country;
34
35
  const combinedOptions = {
@@ -137,6 +138,8 @@ onMount(() => {
137
138
  </script>
138
139
 
139
140
  <input
141
+ {...$$restProps}
142
+ bind:this={el}
140
143
  {autocomplete}
141
144
  class={classes}
142
145
  {disabled}
@@ -2,21 +2,23 @@ import { SvelteComponentTyped } from "svelte";
2
2
  import type { DetailedValue, CountryCode, E164Number, TelInputOptions } from '../../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
+ [x: string]: any;
5
6
  autocomplete?: string | null;
6
- /** You can set the classes of the input field*/ class?: string;
7
- /** You can disable the component and set the disabled attribute of the input field */ disabled?: boolean;
8
- /** You can set the id attribute of the input field */ id?: string;
9
- /** You can set the name attribute of the input field */ name?: string | null;
10
- /** It will overwrite the autoPlaceholder ! */ placeholder?: string | null;
11
- /** You can set the readonly attribute of the input field */ readonly?: boolean | null;
12
- /** Set the required attribute on the input element */ required?: boolean | null;
13
- /** You can set the size attribute of the input field */ size?: number | null;
14
- /** The core value of the input, this is the only one what you can store. It's an E164 phone number.*/ value: E164Number | null;
15
- /** It's accept any Country Code Alpha-2 (ISO 3166) */ country: CountryCode | null;
16
- /** Detailed parse of the E164 phone number */ detailedValue?: Partial<DetailedValue> | null;
17
- /** Validity of the input based on the config settings.*/ valid?: boolean;
18
- /** You can turn on and off certain features by this object */ options?: TelInputOptions;
19
- updateValue?: (newValue: string | E164Number | null, newCountry: CountryCode | null) => void;
7
+ class?: string;
8
+ disabled?: boolean;
9
+ id?: string;
10
+ name?: string | null;
11
+ placeholder?: string | null;
12
+ readonly?: boolean | null;
13
+ required?: boolean | null;
14
+ size?: number | null;
15
+ value: E164Number | null;
16
+ country: CountryCode | null;
17
+ detailedValue?: Partial<DetailedValue> | null;
18
+ valid?: boolean;
19
+ options?: TelInputOptions;
20
+ el?: HTMLInputElement | undefined;
21
+ updateValue?: (newValue: string | E164Number | null, newCountry?: CountryCode | null) => void;
20
22
  };
21
23
  events: {
22
24
  beforeinput: InputEvent;
@@ -43,6 +45,6 @@ export type TelInputProps = typeof __propDef.props;
43
45
  export type TelInputEvents = typeof __propDef.events;
44
46
  export type TelInputSlots = typeof __propDef.slots;
45
47
  export default class TelInput extends SvelteComponentTyped<TelInputProps, TelInputEvents, TelInputSlots> {
46
- get updateValue(): (newValue: string | E164Number | null, newCountry: CountryCode | null) => void;
48
+ get updateValue(): (newValue: string | E164Number | null, newCountry?: CountryCode | null) => void;
47
49
  }
48
50
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-tel-input",
3
3
  "description": "svelte-tel-input",
4
- "version": "3.4.0",
4
+ "version": "3.5.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/gyurielf/svelte-tel-input.git"