intl-tel-input 27.0.5 → 27.0.7

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.
@@ -4502,7 +4502,7 @@ var intlTelInput = Object.assign(
4502
4502
  attachUtils,
4503
4503
  startedLoadingUtilsScript: false,
4504
4504
  startedLoadingAutoCountry: false,
4505
- version: "27.0.5"
4505
+ version: "27.0.7"
4506
4506
  }
4507
4507
  );
4508
4508
  var intl_tel_input_default = intlTelInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "27.0.5",
3
+ "version": "27.0.7",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -166,10 +166,12 @@
166
166
  "import": "./angular/dist/IntlTelInputWithUtils.js"
167
167
  },
168
168
  "./svelte": {
169
+ "types": "./svelte/src/IntlTelInput.svelte.d.ts",
169
170
  "svelte": "./svelte/src/IntlTelInput.svelte",
170
171
  "import": "./svelte/src/IntlTelInput.svelte"
171
172
  },
172
173
  "./svelteWithUtils": {
174
+ "types": "./svelte/src/IntlTelInput.svelte.d.ts",
173
175
  "svelte": "./svelte/src/IntlTelInputWithUtils.svelte",
174
176
  "import": "./svelte/src/IntlTelInputWithUtils.svelte"
175
177
  },
@@ -4470,7 +4470,7 @@ var intlTelInput = Object.assign(
4470
4470
  attachUtils,
4471
4471
  startedLoadingUtilsScript: false,
4472
4472
  startedLoadingAutoCountry: false,
4473
- version: "27.0.5"
4473
+ version: "27.0.7"
4474
4474
  }
4475
4475
  );
4476
4476
  var intl_tel_input_default = intlTelInput;
@@ -4470,7 +4470,7 @@ var intlTelInput = Object.assign(
4470
4470
  attachUtils,
4471
4471
  startedLoadingUtilsScript: false,
4472
4472
  startedLoadingAutoCountry: false,
4473
- version: "27.0.5"
4473
+ version: "27.0.7"
4474
4474
  }
4475
4475
  );
4476
4476
  var intl_tel_input_default = intlTelInput;
@@ -4,22 +4,10 @@
4
4
  </script>
5
5
 
6
6
  <script lang="ts">
7
- import type { SomeOptions } from "intl-tel-input";
7
+ // Resolves to IntlTelInput.svelte.d.ts (the type declaration file for this component).
8
+ import type { Props } from "./IntlTelInput.svelte";
8
9
  import { onMount, onDestroy } from "svelte";
9
10
 
10
- type Props = SomeOptions & {
11
- disabled?: boolean;
12
- readonly?: boolean;
13
- inputProps?: Record<string, unknown>;
14
- initialValue?: string;
15
- value?: string | null;
16
- usePreciseValidation?: boolean;
17
- onChangeNumber?: (number: string) => void;
18
- onChangeCountry?: (country: string) => void;
19
- onChangeValidity?: (valid: boolean) => void;
20
- onChangeErrorCode?: (errorCode: number | null) => void;
21
- };
22
-
23
11
  // Props
24
12
  let {
25
13
  disabled = false,
@@ -0,0 +1,30 @@
1
+ // Hand-written because svelte2tsx can't generate correct prop types for Svelte 5's $props() rune.
2
+ // See: https://github.com/sveltejs/svelte/discussions/13164
3
+ import type { Component } from "svelte";
4
+ import type { Iti, SomeOptions } from "intl-tel-input";
5
+ import intlTelInput from "intl-tel-input";
6
+
7
+ export type Props = SomeOptions & {
8
+ disabled?: boolean;
9
+ readonly?: boolean;
10
+ inputProps?: Record<string, unknown>;
11
+ initialValue?: string;
12
+ value?: string | null;
13
+ usePreciseValidation?: boolean;
14
+ onChangeNumber?: (number: string) => void;
15
+ onChangeCountry?: (country: string) => void;
16
+ onChangeValidity?: (valid: boolean) => void;
17
+ onChangeErrorCode?: (errorCode: number | null) => void;
18
+ };
19
+
20
+ export { intlTelInput };
21
+
22
+ declare const IntlTelInput: Component<
23
+ Props,
24
+ {
25
+ getInstance: () => Iti | undefined;
26
+ getInput: () => HTMLInputElement | undefined;
27
+ }
28
+ >;
29
+
30
+ export default IntlTelInput;
@@ -2464,7 +2464,7 @@ var p = new Set(f.map((e) => e.iso2)), m = (e) => p.has(e), h = f, g = {
2464
2464
  },
2465
2465
  startedLoadingUtilsScript: !1,
2466
2466
  startedLoadingAutoCountry: !1,
2467
- version: "27.0.5"
2467
+ version: "27.0.7"
2468
2468
  }), $ = Q, we = /* @__PURE__ */ n({
2469
2469
  inheritAttrs: !1,
2470
2470
  __name: "IntlTelInput",
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./IntlTelInput-BcdIkmVR.js";
1
+ import { n as e, t } from "./IntlTelInput-2C80jOBa.js";
2
2
  //#region vue/src/index.ts
3
3
  var n = t;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./IntlTelInput-BcdIkmVR.js";
1
+ import { n as e, t } from "./IntlTelInput-2C80jOBa.js";
2
2
  //#region dist/js/utils.js
3
3
  var n = {};
4
4
  //#endregion
@@ -1,4 +0,0 @@
1
- // Empty .d.ts file just so svelte/tsconfig.json has at least one TS input.
2
- // (tsc doesn't recognise .svelte files via the `include` glob, so without
3
- // this file it errors with "No inputs were found".)
4
- export {};