@srimandir/common 1.7.6 → 2.0.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/dist/index.d.ts CHANGED
@@ -10,5 +10,7 @@ export { BottomSheet } from './components/BottomSheet';
10
10
  export type { BottomSheetProps } from './components/BottomSheet';
11
11
  export { cn } from './utils/cn';
12
12
  export { validatePhoneByCountryCode, getMaxLengthForCountry } from './utils/phoneValidation';
13
+ export { DEFAULT_COUNTRIES, getFlagEmoji } from './utils/countries';
14
+ export type { Country } from './utils/countries';
13
15
  export { createI18n } from './i18n';
14
16
  export type { I18nContextValue } from './i18n';
@@ -0,0 +1,13 @@
1
+ /** Dial-code country list + flag helper for `PhoneNumberInput`. */
2
+ export interface Country {
3
+ name: string;
4
+ code: string;
5
+ iso: string;
6
+ }
7
+ export declare const DEFAULT_COUNTRIES: Country[];
8
+ /**
9
+ * Renders a flag purely from the ISO alpha-2 code via Unicode regional
10
+ * indicator symbols — no image assets/CDN needed. Pass `getFlagUrl` to
11
+ * `PhoneNumberInput` instead if the host wants real flag images.
12
+ */
13
+ export declare const getFlagEmoji: (iso: string | undefined) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srimandir/common",
3
- "version": "1.7.6",
3
+ "version": "2.0.0",
4
4
  "description": "Generic, product-agnostic UI primitives (bottom sheet, buttons, modals) shared across the Srimandir packages",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -54,5 +54,5 @@
54
54
  "react"
55
55
  ],
56
56
  "license": "MIT",
57
- "gitHead": "81db0c28547a9bfa55cae9e530e835523288dc97"
57
+ "gitHead": "dcec8cd1c85b04905004d4624f66460f1d80eb84"
58
58
  }