@wello-dev/core 1.0.6 → 1.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.
Files changed (35) hide show
  1. package/dist/{chunk-QCMTAQSP.js → chunk-2MVQG2PQ.js} +6 -3
  2. package/dist/{chunk-QCMTAQSP.js.map → chunk-2MVQG2PQ.js.map} +1 -1
  3. package/dist/{chunk-2WHZJI3S.js → chunk-3IKAVFR3.js} +2 -2
  4. package/dist/{chunk-DRSBB5T4.js → chunk-4E45SQMX.js} +2 -2
  5. package/dist/{chunk-FSR3OEUP.js → chunk-EME4ROPE.js} +4 -4
  6. package/dist/{chunk-RVFCTNPD.js → chunk-JXRN4MGT.js} +2 -2
  7. package/dist/{chunk-XBLREJCR.js → chunk-LGL6XP6C.js} +11 -6
  8. package/dist/chunk-LGL6XP6C.js.map +1 -0
  9. package/dist/{chunk-NH26XE7T.js → chunk-N76DWAX4.js} +2 -2
  10. package/dist/{chunk-A76QHCP5.js → chunk-OYUQO4ZT.js} +2 -2
  11. package/dist/{chunk-BZPG4NZ6.js → chunk-WVYAE5MT.js} +2 -2
  12. package/dist/{chunk-YRKCM3OL.js → chunk-XG7ZGCBW.js} +7 -6
  13. package/dist/{chunk-YRKCM3OL.js.map → chunk-XG7ZGCBW.js.map} +1 -1
  14. package/dist/components/ColorPicker/ColorInput.js +3 -3
  15. package/dist/components/Combobox/Combobox.js +3 -3
  16. package/dist/components/Combobox/Select.js +4 -4
  17. package/dist/components/Combobox/TagsInput.js +4 -4
  18. package/dist/components/Menu/Menu.js +3 -3
  19. package/dist/components/PhoneInput/PhoneInput.js +5 -5
  20. package/dist/components/Popover/Popover.js +2 -2
  21. package/dist/components/Tooltip/Tooltip.js +2 -2
  22. package/dist/index.cjs +19 -10
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +99 -99
  25. package/dist/shadcn/Floating.js +5 -5
  26. package/dist/styles.css +36 -3
  27. package/package.json +1 -1
  28. package/dist/chunk-XBLREJCR.js.map +0 -1
  29. /package/dist/{chunk-2WHZJI3S.js.map → chunk-3IKAVFR3.js.map} +0 -0
  30. /package/dist/{chunk-DRSBB5T4.js.map → chunk-4E45SQMX.js.map} +0 -0
  31. /package/dist/{chunk-FSR3OEUP.js.map → chunk-EME4ROPE.js.map} +0 -0
  32. /package/dist/{chunk-RVFCTNPD.js.map → chunk-JXRN4MGT.js.map} +0 -0
  33. /package/dist/{chunk-NH26XE7T.js.map → chunk-N76DWAX4.js.map} +0 -0
  34. /package/dist/{chunk-A76QHCP5.js.map → chunk-OYUQO4ZT.js.map} +0 -0
  35. /package/dist/{chunk-BZPG4NZ6.js.map → chunk-WVYAE5MT.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,10 +1,17 @@
1
1
  "use client";
2
+ import {
3
+ Typography
4
+ } from "./chunk-SIZ7G2KD.js";
2
5
  import {
3
6
  VisuallyHidden
4
7
  } from "./chunk-R3H3IYNM.js";
5
8
  import {
6
- Typography
7
- } from "./chunk-SIZ7G2KD.js";
9
+ InputNumber,
10
+ NumberInput,
11
+ PasswordInput,
12
+ TextInput,
13
+ Textarea
14
+ } from "./chunk-7S7RIVCI.js";
8
15
  import {
9
16
  ThemeToggle,
10
17
  ThemeToggleButton
@@ -19,6 +26,9 @@ import {
19
26
  import {
20
27
  Toggle
21
28
  } from "./chunk-2WIGWLPL.js";
29
+ import {
30
+ SimpleGrid
31
+ } from "./chunk-QIS6W7Q6.js";
22
32
  import {
23
33
  RangeSlider,
24
34
  Slider
@@ -26,12 +36,14 @@ import {
26
36
  import {
27
37
  Spoiler
28
38
  } from "./chunk-YTI5AZL4.js";
29
- import {
30
- SimpleGrid
31
- } from "./chunk-QIS6W7Q6.js";
32
39
  import {
33
40
  Stack
34
41
  } from "./chunk-E74HEMFS.js";
42
+ import {
43
+ Stepper,
44
+ StepperCompleted,
45
+ StepperStep
46
+ } from "./chunk-VNM5TVQZ.js";
35
47
  import {
36
48
  TabCount,
37
49
  Tabs,
@@ -43,45 +55,6 @@ import {
43
55
  tabsListVariants,
44
56
  useTabsContext
45
57
  } from "./chunk-GSLJSEUI.js";
46
- import {
47
- Stepper,
48
- StepperCompleted,
49
- StepperStep
50
- } from "./chunk-VNM5TVQZ.js";
51
- import {
52
- InputNumber,
53
- NumberInput,
54
- PasswordInput,
55
- TextInput,
56
- Textarea
57
- } from "./chunk-7S7RIVCI.js";
58
- import {
59
- RingProgress,
60
- SemiCircleProgress
61
- } from "./chunk-3NXEX2BT.js";
62
- import {
63
- Progress
64
- } from "./chunk-HESG7OWV.js";
65
- import {
66
- ScrollArea,
67
- ScrollAreaAutosize
68
- } from "./chunk-QHJMXGDE.js";
69
- import {
70
- NavLink
71
- } from "./chunk-KPWAEDRU.js";
72
- import {
73
- Notification
74
- } from "./chunk-3Z5OAUG3.js";
75
- import {
76
- DOTS,
77
- Pagination,
78
- getPaginationRange,
79
- usePagination
80
- } from "./chunk-JZJ5R7XW.js";
81
- import {
82
- NumberFormatter,
83
- formatNumber
84
- } from "./chunk-TIVOXLDX.js";
85
58
  import {
86
59
  Paper
87
60
  } from "./chunk-B3LVDQJU.js";
@@ -92,7 +65,7 @@ import {
92
65
  matchesPhoneStartingNumber,
93
66
  normalizeStartingNumber,
94
67
  resolvePhoneCountry
95
- } from "./chunk-XBLREJCR.js";
68
+ } from "./chunk-LGL6XP6C.js";
96
69
  import {
97
70
  Skeleton
98
71
  } from "./chunk-TVOR2RGE.js";
@@ -107,13 +80,43 @@ import {
107
80
  REGEXP_ONLY_DIGITS_AND_CHARS
108
81
  } from "./chunk-E2765LHX.js";
109
82
  import {
110
- BackgroundImage,
111
- Image
112
- } from "./chunk-L5MO7VKZ.js";
83
+ Progress
84
+ } from "./chunk-HESG7OWV.js";
85
+ import {
86
+ RingProgress,
87
+ SemiCircleProgress
88
+ } from "./chunk-3NXEX2BT.js";
89
+ import {
90
+ ScrollArea,
91
+ ScrollAreaAutosize
92
+ } from "./chunk-QHJMXGDE.js";
93
+ import {
94
+ NavLink
95
+ } from "./chunk-KPWAEDRU.js";
96
+ import {
97
+ NumberFormatter,
98
+ formatNumber
99
+ } from "./chunk-TIVOXLDX.js";
100
+ import {
101
+ Notification
102
+ } from "./chunk-3Z5OAUG3.js";
103
+ import {
104
+ DOTS,
105
+ Pagination,
106
+ getPaginationRange,
107
+ usePagination
108
+ } from "./chunk-JZJ5R7XW.js";
113
109
  import {
114
110
  Grid,
115
111
  GridCol
116
112
  } from "./chunk-HSJ27BGL.js";
113
+ import {
114
+ Group
115
+ } from "./chunk-2A6MTZBO.js";
116
+ import {
117
+ BackgroundImage,
118
+ Image
119
+ } from "./chunk-L5MO7VKZ.js";
117
120
  import {
118
121
  Indicator
119
122
  } from "./chunk-2GM6477D.js";
@@ -122,33 +125,47 @@ import {
122
125
  ListItem
123
126
  } from "./chunk-GKBBDYNB.js";
124
127
  import {
125
- Container
126
- } from "./chunk-RJK6AQEW.js";
128
+ CopyButton
129
+ } from "./chunk-FR7TZXY3.js";
130
+ import {
131
+ Dialog
132
+ } from "./chunk-K3B2RENY.js";
127
133
  import {
128
134
  Dropzone,
129
135
  formatFileSize
130
136
  } from "./chunk-NGXT7GNE.js";
131
137
  import {
132
- Dialog
133
- } from "./chunk-K3B2RENY.js";
138
+ FileButton
139
+ } from "./chunk-ZVXCVBC4.js";
134
140
  import {
135
141
  Flex
136
142
  } from "./chunk-BZ222ZYD.js";
137
143
  import {
138
- FileButton
139
- } from "./chunk-ZVXCVBC4.js";
144
+ ColorInput
145
+ } from "./chunk-4E45SQMX.js";
140
146
  import {
141
- Group
142
- } from "./chunk-2A6MTZBO.js";
147
+ AlphaSlider,
148
+ ColorPicker,
149
+ HueSlider,
150
+ colorLuminance,
151
+ convertHsvaTo,
152
+ hsvaToRgbaObject,
153
+ isColorValid,
154
+ parseColor
155
+ } from "./chunk-VIO22OUP.js";
156
+ import {
157
+ ColorSwatch,
158
+ ThemeIcon
159
+ } from "./chunk-MWYGXAJQ.js";
143
160
  import {
144
161
  Select
145
- } from "./chunk-RVFCTNPD.js";
162
+ } from "./chunk-JXRN4MGT.js";
146
163
  import {
147
164
  EmptyState
148
165
  } from "./chunk-DHAMBKCR.js";
149
166
  import {
150
167
  TagsInput
151
- } from "./chunk-NH26XE7T.js";
168
+ } from "./chunk-N76DWAX4.js";
152
169
  import {
153
170
  Field,
154
171
  FieldContent,
@@ -194,27 +211,14 @@ import {
194
211
  ComboboxTarget,
195
212
  useCombobox,
196
213
  useComboboxContext
197
- } from "./chunk-BZPG4NZ6.js";
198
- import {
199
- CopyButton
200
- } from "./chunk-FR7TZXY3.js";
214
+ } from "./chunk-WVYAE5MT.js";
201
215
  import {
202
- ColorInput
203
- } from "./chunk-DRSBB5T4.js";
204
- import {
205
- AlphaSlider,
206
- ColorPicker,
207
- HueSlider,
208
- colorLuminance,
209
- convertHsvaTo,
210
- hsvaToRgbaObject,
211
- isColorValid,
212
- parseColor
213
- } from "./chunk-VIO22OUP.js";
216
+ Container
217
+ } from "./chunk-RJK6AQEW.js";
214
218
  import {
215
- ColorSwatch,
216
- ThemeIcon
217
- } from "./chunk-MWYGXAJQ.js";
219
+ Card,
220
+ CardSection
221
+ } from "./chunk-L2V4OD4Q.js";
218
222
  import {
219
223
  Carousel
220
224
  } from "./chunk-APTAGITO.js";
@@ -246,16 +250,6 @@ import {
246
250
  splitInputProps,
247
251
  useInputWrapperContext
248
252
  } from "./chunk-JJXJXOZ7.js";
249
- import {
250
- Breadcrumb,
251
- BreadcrumbEllipsis,
252
- BreadcrumbItem,
253
- BreadcrumbLink,
254
- BreadcrumbList,
255
- BreadcrumbPage,
256
- BreadcrumbSeparator,
257
- Breadcrumbs
258
- } from "./chunk-NOYSHU5U.js";
259
253
  import {
260
254
  Chip,
261
255
  ChipGroup,
@@ -286,16 +280,22 @@ import {
286
280
  import {
287
281
  Badge
288
282
  } from "./chunk-XAHR3DK7.js";
289
- import {
290
- Burger
291
- } from "./chunk-GGRLDV5L.js";
292
- import {
293
- Card,
294
- CardSection
295
- } from "./chunk-L2V4OD4Q.js";
296
283
  import {
297
284
  Blockquote
298
285
  } from "./chunk-QFN4MBT2.js";
286
+ import {
287
+ Breadcrumb,
288
+ BreadcrumbEllipsis,
289
+ BreadcrumbItem,
290
+ BreadcrumbLink,
291
+ BreadcrumbList,
292
+ BreadcrumbPage,
293
+ BreadcrumbSeparator,
294
+ Breadcrumbs
295
+ } from "./chunk-NOYSHU5U.js";
296
+ import {
297
+ Burger
298
+ } from "./chunk-GGRLDV5L.js";
299
299
  import "./chunk-G7EIISMY.js";
300
300
  import {
301
301
  buildViewTransitionCss,
@@ -418,10 +418,10 @@ import {
418
418
  TooltipContent,
419
419
  TooltipProvider,
420
420
  TooltipTrigger
421
- } from "./chunk-FSR3OEUP.js";
421
+ } from "./chunk-EME4ROPE.js";
422
422
  import {
423
423
  TooltipFloating
424
- } from "./chunk-2WHZJI3S.js";
424
+ } from "./chunk-3IKAVFR3.js";
425
425
  import {
426
426
  Menu,
427
427
  MenuDivider,
@@ -429,13 +429,13 @@ import {
429
429
  MenuItem,
430
430
  MenuLabel,
431
431
  MenuTarget
432
- } from "./chunk-A76QHCP5.js";
432
+ } from "./chunk-OYUQO4ZT.js";
433
433
  import {
434
434
  PopoverDropdown,
435
435
  PopoverTarget,
436
436
  usePopoverContext
437
- } from "./chunk-YRKCM3OL.js";
438
- import "./chunk-QCMTAQSP.js";
437
+ } from "./chunk-XG7ZGCBW.js";
438
+ import "./chunk-2MVQG2PQ.js";
439
439
  import "./chunk-AZ4WBNXD.js";
440
440
  import {
441
441
  OptionalPortal,
@@ -26,11 +26,11 @@ import {
26
26
  TooltipContent,
27
27
  TooltipProvider,
28
28
  TooltipTrigger
29
- } from "../chunk-FSR3OEUP.js";
30
- import "../chunk-2WHZJI3S.js";
31
- import "../chunk-A76QHCP5.js";
32
- import "../chunk-YRKCM3OL.js";
33
- import "../chunk-QCMTAQSP.js";
29
+ } from "../chunk-EME4ROPE.js";
30
+ import "../chunk-3IKAVFR3.js";
31
+ import "../chunk-OYUQO4ZT.js";
32
+ import "../chunk-XG7ZGCBW.js";
33
+ import "../chunk-2MVQG2PQ.js";
34
34
  import "../chunk-AZ4WBNXD.js";
35
35
  import "../chunk-2TFJ4SMR.js";
36
36
  import "../chunk-H4D7LXZL.js";
package/dist/styles.css CHANGED
@@ -6582,13 +6582,26 @@
6582
6582
  max-width: 100%;
6583
6583
  }
6584
6584
  .wello-PhoneInput-code .wello-Input-wrapper,
6585
- .wello-PhoneInput-code .wello-Select-trigger {
6585
+ .wello-PhoneInput-code .wello-Select-trigger,
6586
+ .wello-PhoneInput-code .wello-Select-value,
6587
+ .wello-PhoneInput-code .wello-PhoneInput-codeValue {
6588
+ /* Isolate from page RTL — order is code → flag (chevron pinned left in CSS). */
6586
6589
  direction: ltr;
6590
+ unicode-bidi: isolate;
6591
+ }
6592
+ .wello-PhoneInput-code .wello-Select-value,
6593
+ .wello-PhoneInput-code .wello-PhoneInput-codeValue {
6594
+ flex-direction: row;
6595
+ }
6596
+ .wello-PhoneInput-code .wello-Input-wrapper {
6597
+ /* Room for chevron + code + flag; don't let width:auto collapse the section. */
6598
+ min-width: 5.75rem;
6587
6599
  }
6588
6600
  .wello-PhoneInput-code .wello-Select-trigger.wello-Input-input {
6589
6601
  height: var(--phone-height);
6590
6602
  min-height: var(--phone-height);
6591
- padding-inline: 0.75rem 2rem;
6603
+ /* Physical padding — start space is for the chevron on the left (old UX). */
6604
+ padding: 0 0.65rem 0 1.75rem;
6592
6605
  border: 0;
6593
6606
  border-radius: 0;
6594
6607
  background: transparent;
@@ -6598,6 +6611,24 @@
6598
6611
  letter-spacing: normal;
6599
6612
  font-synthesis: none;
6600
6613
  }
6614
+ .wello-PhoneInput-code .wello-Input-section:where([data-position="right"]) {
6615
+ /* Physical left — old Mantine dial control put the caret outside the code/flag. */
6616
+ inset-inline: auto;
6617
+ right: auto;
6618
+ left: 2px;
6619
+ width: var(--input-right-section-width, 1.5rem);
6620
+ color: var(--wello-color-text);
6621
+ opacity: 1;
6622
+ pointer-events: none;
6623
+ }
6624
+ .wello-PhoneInput-code .wello-Combobox-chevron {
6625
+ width: 1.05rem;
6626
+ height: 1.05rem;
6627
+ color: var(--wello-color-text);
6628
+ stroke: var(--wello-color-text);
6629
+ stroke-width: 3;
6630
+ opacity: 0.95;
6631
+ }
6601
6632
  .wello-PhoneInput-code .wello-Select-trigger.wello-Input-input:focus,
6602
6633
  .wello-PhoneInput-code .wello-Select-trigger.wello-Input-input:focus-within {
6603
6634
  border: 0;
@@ -6689,7 +6720,9 @@
6689
6720
  */
6690
6721
  .wello-PhoneInput-dropdown.wello-PhoneInput-dropdown {
6691
6722
  direction: ltr;
6692
- min-width: 12rem;
6723
+ min-width: 14rem;
6724
+ border: 1px solid color-mix(in srgb, var(--wello-primary-color) 12%, var(--wello-color-border));
6725
+ box-shadow: var(--wello-shadow-md);
6693
6726
  }
6694
6727
  .wello-PhoneInput-dropdown .wello-Combobox-option,
6695
6728
  .wello-PhoneInput-dropdown .wello-Select-option {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wello-dev/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "React UI components: theme, Styles API, style props, dark mode and RTL",
5
5
  "homepage": "https://wello-dev.vercel.app/",
6
6
  "author": "Mohamed Wael <mohamedwael4553@gmail.com>",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/PhoneInput/PhoneInput.tsx","../src/components/PhoneInput/countries.ts"],"sourcesContent":["import { useEndpointLoaders } from \"../../core/api/api\";\r\nimport { useWelloLabels } from \"../../core/provider/labels\";\r\nimport { useEffect, useMemo, useRef, useState, type ReactNode } from \"react\";\r\nimport { Box, type BoxProps } from \"../../core/Box/Box\";\r\nimport { factory } from \"../../core/factory/factory\";\r\nimport { useComponentStyles, useProps, type StylesApiProps } from \"../../core/styles-api/styles-api\";\r\nimport { useId } from \"../../core/utils\";\r\nimport { Select, type LoadOptionsInput, type SingleSelectProps } from \"../Combobox/Select\";\r\nimport { InputError, InputWrapper } from \"../Input/Input\";\r\nimport { Skeleton } from \"../Skeleton/Skeleton\";\r\nimport { ALL_PHONE_COUNTRIES, DEFAULT_PHONE_CODE } from \"./countries\";\r\n\r\nexport type PhoneInputStylesNames = \"root\" | \"label\" | \"description\" | \"field\" | \"code\" | \"codeValue\" | \"flag\" | \"dialCode\" | \"input\" | \"errors\" | \"error\";\r\n\r\n/** A country. Your API's names work too: `phone_code`, `phone_limit`, `phone_number_limit`, `phone_starting_number`. */\r\nexport interface PhoneCountry {\r\n /** Dial code, without + */\r\n code?: string | number;\r\n phone_code?: string | number;\r\n value?: string | number;\r\n name?: string;\r\n /** Image URL or your own element */\r\n flag?: ReactNode;\r\n /** Digits allowed */\r\n limit?: number | string | null;\r\n phone_limit?: number | string | null;\r\n phone_number_limit?: number | string | null;\r\n /** First digit of the number; applied when the country changes */\r\n startingNumber?: number | string | null;\r\n phone_starting_number?: number | string | null;\r\n [key: string]: unknown;\r\n}\r\n\r\n/** A country with its fields resolved. */\r\nexport interface ResolvedPhoneCountry {\r\n code: string;\r\n name?: string;\r\n flag?: ReactNode;\r\n limit: number | null;\r\n startingNumber: string | null;\r\n /** What you passed */\r\n country: PhoneCountry;\r\n}\r\n\r\nexport interface PhoneInputProps extends BoxProps, StylesApiProps<PhoneInputStylesNames, PhoneInputProps> {\r\n label?: ReactNode;\r\n description?: ReactNode;\r\n /** Number error, under the field */\r\n error?: ReactNode;\r\n /** Dial code error, under the field */\r\n codeError?: ReactNode;\r\n required?: boolean;\r\n withAsterisk?: boolean;\r\n\r\n /** The number: digits only */\r\n value?: string | number | null;\r\n defaultValue?: string | number;\r\n onChange?: (value: string) => void;\r\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\r\n name?: string;\r\n id?: string;\r\n /** Text, or a function of the limit. Default: \"10 digits\" */\r\n placeholder?: string | ((limit: number | null) => string);\r\n disabled?: boolean;\r\n readOnly?: boolean;\r\n /** Skeleton instead of the field */\r\n loading?: boolean;\r\n\r\n /** The dial code */\r\n code?: string | number | null;\r\n defaultCode?: string | number;\r\n /** `seed` is true when a fixed list picked its first country by itself, so a form shouldn't turn dirty */\r\n onCodeChange?: (code: string, country: ResolvedPhoneCountry | null, meta: { seed: boolean }) => void;\r\n /** Form name of the dial code (hidden input) */\r\n codeName?: string;\r\n /** Form name of the limit (hidden input) */\r\n limitName?: string;\r\n /** Form name of the country's required first digit(s) (hidden input) */\r\n startingNumberName?: string;\r\n\r\n /** Fixed list. Default: every country's dial code, starting on Egypt (+20) */\r\n countries?: PhoneCountry[];\r\n /**\r\n * Address of the countries on your API (`\"countries\"`): the only thing needed to fetch them. The base address and\r\n * headers come from the theme's `api`. With `params={{ paginate: false }}` everything is asked at once.\r\n */\r\n endpoint?: string | null;\r\n /** With `endpoint`: more query parameters */\r\n params?: Record<string, unknown>;\r\n /** With `endpoint`: use `api.generalBaseURL` */\r\n general?: boolean;\r\n /** With `endpoint`: turn the whole answer into the list of countries, when `{ data: [...] }` or an array doesn't fit */\r\n select?: (data: any) => PhoneCountry[];\r\n /** Fetch countries instead. Same input as Select's `loadOptions` */\r\n loadCountries?: (input: LoadOptionsInput) => Promise<PhoneCountry[] | { items: PhoneCountry[]; total?: number; hasMore?: boolean }> | PhoneCountry[] | { items: PhoneCountry[]; total?: number; hasMore?: boolean };\r\n /** Change it to fetch again */\r\n loadKey?: string | number | null;\r\n\r\n /** Digits allowed. Default: from the country */\r\n limit?: number | null;\r\n onLimitChange?: (limit: number | null) => void;\r\n onStartingNumberChange?: (startingNumber: string | null) => void;\r\n /** Change it to fire `onLimitChange` and `onStartingNumberChange` again (e.g. after a form reset) */\r\n resyncToken?: string | number | null;\r\n\r\n /** Own flag + code, in the field and the list */\r\n renderCountry?: (country: ResolvedPhoneCountry) => ReactNode;\r\n /** Shown when there is no dial code. Default: 'Code' */\r\n codePlaceholder?: string;\r\n /** Anything else for the dial code Select: search text, messages, classNames… */\r\n selectProps?: Partial<SingleSelectProps>;\r\n}\r\n\r\nconst DEFAULT_COUNTRIES = ALL_PHONE_COUNTRIES;\r\n\r\nconst digitsOnly = (value: unknown) => String(value ?? \"\").replace(/\\D/g, \"\");\r\n\r\nfunction parseLimit(value: unknown) {\r\n const limit = Number(value);\r\n return Number.isFinite(limit) && limit > 0 ? limit : null;\r\n}\r\n\r\n/** Country `startingNumber` / `phone_starting_number` as digits. */\r\nexport function normalizeStartingNumber(value: unknown): string | null {\r\n if (value == null || value === \"\") return null;\r\n const digits = digitsOnly(value);\r\n return digits || null;\r\n}\r\n\r\n/**\r\n * True when digits already match the required start, or are still a partial prefix of it\r\n * (so typing the first digit of a multi-digit start is allowed).\r\n */\r\nexport function matchesPhoneStartingNumber(digits: string, start: string | null): boolean {\r\n if (!start || !digits) return true;\r\n return digits.startsWith(start) || start.startsWith(digits);\r\n}\r\n\r\n/** Fills in a country's fields from any of their names. */\r\nexport function resolvePhoneCountry(country: PhoneCountry): ResolvedPhoneCountry {\r\n return {\r\n code: String(country.code ?? country.phone_code ?? country.value ?? \"\"),\r\n name: country.name,\r\n flag: country.flag,\r\n limit: parseLimit(country.limit ?? country.phone_limit ?? country.phone_number_limit),\r\n startingNumber: normalizeStartingNumber(country.startingNumber ?? country.phone_starting_number),\r\n country,\r\n };\r\n}\r\n\r\n/** Number after moving to a country: right first digit, not over its limit. */\r\nexport function fitPhoneNumber(value: unknown, country: Pick<ResolvedPhoneCountry, \"limit\" | \"startingNumber\">) {\r\n let phone = digitsOnly(value);\r\n if (phone && country.startingNumber && !phone.startsWith(country.startingNumber)) {\r\n phone = country.startingNumber + phone.slice(country.startingNumber.length);\r\n }\r\n return country.limit ? phone.slice(0, country.limit) : phone;\r\n}\r\n\r\n/**\r\n * Phone number with a dial code. Keeps digits only, limits them per country and fixes the\r\n * first digit when the country changes. Takes react-hook-form's `{...field}` for the number.\r\n *\r\n * @example\r\n * <PhoneInput label=\"Phone\" value={phone} onChange={setPhone} code={code} onCodeChange={setCode} countries={[\r\n * { code: \"966\", name: \"Saudi Arabia\", flag: \"https://flagcdn.com/sa.svg\", limit: 9, startingNumber: 5 },\r\n * { code: \"20\", name: \"Egypt\", flag: \"https://flagcdn.com/eg.svg\", limit: 10, startingNumber: 1 },\r\n * ]} />\r\n * <PhoneInput {...field} loadCountries={() => api.countries().then((r) => r.data)} onCodeChange={(c) => setValue(\"phone_code\", c)} onLimitChange={(l) => setValue(\"phone_limit\", l)} />\r\n */\r\nexport const PhoneInput = factory<{ props: PhoneInputProps; ref: HTMLInputElement; stylesNames: PhoneInputStylesNames }>((_props, ref) => {\r\n const labels = useWelloLabels();\r\n const props = useProps(\"PhoneInput\", {}, _props);\r\n const [getStyles, rest] = useComponentStyles(\"PhoneInput\", props);\r\n const {\r\n label,\r\n description,\r\n error,\r\n codeError,\r\n required,\r\n withAsterisk,\r\n value: controlled,\r\n defaultValue,\r\n onChange,\r\n onBlur,\r\n name,\r\n id,\r\n placeholder,\r\n disabled,\r\n readOnly,\r\n loading,\r\n code: codeProp,\r\n defaultCode,\r\n onCodeChange,\r\n codeName,\r\n limitName,\r\n startingNumberName,\r\n countries,\r\n endpoint,\r\n params,\r\n general,\r\n select: selectCountries,\r\n loadCountries: loadCountriesProp,\r\n loadKey: loadKeyProp,\r\n limit: limitProp,\r\n onLimitChange,\r\n onStartingNumberChange,\r\n resyncToken,\r\n renderCountry,\r\n codePlaceholder = labels.phoneCode,\r\n selectProps,\r\n // Layout goes on the root.\r\n m, mt, mb, ml, mr, ms, me, mx, my, w, miw, maw, flex,\r\n ...inputProps\r\n } = rest;\r\n const inputId = useId(id);\r\n const fromEndpoint = useEndpointLoaders({ endpoint, params, general, select: selectCountries, hasShow: false });\r\n const loadCountries = (loadCountriesProp ?? fromEndpoint.loadOptions) as PhoneInputProps[\"loadCountries\"];\r\n const loadKey = loadKeyProp ?? fromEndpoint.loadKey;\r\n const remote = !!loadCountries;\r\n\r\n // Number\r\n const [internal, setInternal] = useState(digitsOnly(defaultValue));\r\n const phone = controlled !== undefined ? digitsOnly(controlled) : internal;\r\n const setPhone = (next: string) => {\r\n if (controlled === undefined) setInternal(next);\r\n onChange?.(next);\r\n };\r\n\r\n // Dial code\r\n const [codeInternal, setCodeInternal] = useState(defaultCode === undefined ? \"\" : String(defaultCode));\r\n const code = codeProp !== undefined ? String(codeProp ?? \"\") : codeInternal;\r\n const list = useMemo(() => (countries?.length ? countries : DEFAULT_COUNTRIES).map(resolvePhoneCountry), [countries]);\r\n const [fetched, setFetched] = useState<ResolvedPhoneCountry | null>(null);\r\n const country = remote ? (fetched && fetched.code === code ? fetched : null) : (list.find((item) => item.code === code) ?? null);\r\n const limit = limitProp ?? country?.limit ?? null;\r\n const startingNumber = country?.startingNumber ?? null;\r\n\r\n const setCode = (next: string, resolved: ResolvedPhoneCountry | null, seed = false) => {\r\n if (codeProp === undefined) setCodeInternal(next);\r\n onCodeChange?.(next, resolved, { seed });\r\n };\r\n\r\n // A fixed list always has a code: start on the first country.\r\n // With no list of your own, the full list starts on Egypt, not on the first name alphabetically.\r\n const usesDefaults = !remote && !countries?.length;\r\n const first = remote ? undefined : usesDefaults ? (list.find((item) => item.code === DEFAULT_PHONE_CODE) ?? list[0]) : list[0];\r\n useEffect(() => {\r\n if (!code && first) setCode(first.code, first, true);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [code, first?.code]);\r\n\r\n // Tell the form the limit and first digit of the current country.\r\n const callbacks = useRef({ onLimitChange, onStartingNumberChange });\r\n callbacks.current = { onLimitChange, onStartingNumberChange };\r\n const countryLimit = country?.limit ?? null;\r\n useEffect(() => callbacks.current.onLimitChange?.(countryLimit), [countryLimit, resyncToken]);\r\n useEffect(() => callbacks.current.onStartingNumberChange?.(startingNumber), [startingNumber, resyncToken]);\r\n\r\n // Changing country fits the number to it. The first country is left alone: that's saved data.\r\n const lastCode = useRef(\"\");\r\n const latest = useRef({ phone, setPhone });\r\n latest.current = { phone, setPhone };\r\n const countryCode = country?.code ?? \"\";\r\n useEffect(() => {\r\n const previous = lastCode.current;\r\n lastCode.current = countryCode;\r\n if (!previous || !country || previous === countryCode) return;\r\n const fitted = fitPhoneNumber(latest.current.phone, country);\r\n if (fitted !== latest.current.phone) latest.current.setPhone(fitted);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [countryCode]);\r\n\r\n const showCountry = (item: ResolvedPhoneCountry) =>\r\n renderCountry ? (\r\n renderCountry(item)\r\n ) : (\r\n // Always LTR: flag then dial code (RTL pages were flipping to \"966 | flag\").\r\n <span {...getStyles(\"codeValue\")} dir=\"ltr\">\r\n {typeof item.flag === \"string\" ? <img {...getStyles(\"flag\")} src={item.flag} alt={item.name ?? \"\"} onError={(event) => (event.currentTarget.style.display = \"none\")} /> : item.flag}\r\n <span {...getStyles(\"dialCode\")}>{item.code}</span>\r\n </span>\r\n );\r\n const toOption = (item: ResolvedPhoneCountry) => ({ value: item.code, label: showCountry(item), searchText: `${item.name ?? \"\"} ${item.code}`, resolved: item });\r\n\r\n const hasMessage = (message: ReactNode) => message !== undefined && message !== null && message !== false && message !== true && message !== \"\";\r\n const startingMismatch =\r\n !!startingNumber && !!phone && !matchesPhoneStartingNumber(phone, startingNumber);\r\n const startingError = startingMismatch ? labels.phoneStartingNumber(startingNumber) : null;\r\n // External `error` wins; otherwise show the starting-digit message while typing.\r\n const numberError = hasMessage(error) ? error : startingError;\r\n const hasError = hasMessage(numberError) || hasMessage(codeError);\r\n const errorId = `${inputId}-phone-error`;\r\n const shownPlaceholder = typeof placeholder === \"function\" ? placeholder(limit) : (placeholder ?? (limit ? labels.phoneDigits(limit) : undefined));\r\n const layout = { m, mt, mb, ml, mr, ms, me, mx, my, w, miw, maw, flex };\r\n\r\n if (loading) return <Skeleton height={36} radius={999} {...layout} />;\r\n\r\n const selectPropClassNames =\r\n typeof selectProps?.classNames === \"object\" && selectProps.classNames\r\n ? (selectProps.classNames as Record<string, string | undefined>)\r\n : {};\r\n const select = {\r\n value: code,\r\n emptyValue: \"\",\r\n disabled,\r\n readOnly,\r\n placeholder: codePlaceholder,\r\n withFooter: false,\r\n radius: 0,\r\n \"aria-invalid\": !!codeError || undefined,\r\n \"aria-label\": codePlaceholder,\r\n ...selectProps,\r\n // PhoneInput wins these after selectProps — dial codes stay LTR and compact.\r\n searchable: false,\r\n checkIconPosition: \"right\" as const,\r\n classNames: {\r\n ...selectPropClassNames,\r\n dropdown: [\"wello-PhoneInput-dropdown\", selectPropClassNames.dropdown].filter(Boolean).join(\" \"),\r\n },\r\n attributes: {\r\n ...(typeof selectProps?.attributes === \"object\" ? selectProps.attributes : {}),\r\n // Physical LTR on the portaled node — portal root may still be dir=rtl from <html>.\r\n dropdown: {\r\n ...((typeof selectProps?.attributes === \"object\" && selectProps.attributes?.dropdown) || {}),\r\n dir: \"ltr\",\r\n },\r\n },\r\n comboboxProps: {\r\n middlewares: { flip: true, shift: true },\r\n ...selectProps?.comboboxProps,\r\n // Physical left — never mirrors in RTL (start/end would).\r\n position: \"bottom-left\" as const,\r\n // Shrink-wrap to flag+code; `target` was the narrow trigger and fought min-width.\r\n width: \"auto\" as const,\r\n withinPortal: true,\r\n // overflow:hidden on the phone field must not hide the menu as \"detached\".\r\n hideDetached: false,\r\n dir: \"ltr\" as const,\r\n },\r\n onChange: (next: unknown, option: unknown) => {\r\n const resolved = (option as { resolved?: ResolvedPhoneCountry } | null)?.resolved ?? null;\r\n if (resolved) setFetched(resolved);\r\n setCode(String(next ?? \"\"), resolved);\r\n selectProps?.onChange?.(next, option as never);\r\n },\r\n };\r\n\r\n return (\r\n <InputWrapper\r\n id={inputId}\r\n label={label}\r\n description={description}\r\n required={required || withAsterisk}\r\n labelProps={getStyles(\"label\")}\r\n descriptionProps={getStyles(\"description\")}\r\n {...getStyles(\"root\")}\r\n {...layout}\r\n >\r\n {/* The code stays on the left in both directions, like a written phone number. */}\r\n <Box {...getStyles(\"field\")} mod={{ error: hasError, disabled }}>\r\n <div {...getStyles(\"code\")} data-error={codeError ? true : undefined}>\r\n {remote ? (\r\n <Select\r\n {...select}\r\n allowDeselect\r\n onOptionSelect={(option) => {\r\n setFetched((option as { resolved: ResolvedPhoneCountry }).resolved);\r\n selectProps?.onOptionSelect?.(option);\r\n }}\r\n loadKey={loadKey}\r\n loadOptions={(input) =>\r\n Promise.resolve(loadCountries!(input)).then((result) =>\r\n Array.isArray(result) ? result.map((item) => toOption(resolvePhoneCountry(item))) : { ...result, items: result.items.map((item) => toOption(resolvePhoneCountry(item))) },\r\n )\r\n }\r\n />\r\n ) : list.length > 1 ? (\r\n <Select {...select} allowDeselect={false} options={list.map(toOption)} />\r\n ) : (\r\n <span className=\"wello-PhoneInput-single\">{list[0] && showCountry(list[0])}</span>\r\n )}\r\n </div>\r\n <input\r\n {...(inputProps as object)}\r\n {...getStyles(\"input\")}\r\n ref={ref}\r\n id={inputId}\r\n type=\"tel\"\r\n inputMode=\"numeric\"\r\n autoComplete=\"tel-national\"\r\n // Digits + placeholders stay LTR (avoids \"أرقام 9\" bidi flip on RTL pages).\r\n dir=\"ltr\"\r\n name={name}\r\n value={phone}\r\n disabled={disabled}\r\n readOnly={readOnly}\r\n required={required}\r\n maxLength={limit ?? undefined}\r\n placeholder={shownPlaceholder}\r\n aria-invalid={hasMessage(numberError) || undefined}\r\n aria-describedby={hasMessage(numberError) ? errorId : undefined}\r\n onBlur={onBlur}\r\n onChange={(event) => {\r\n const digits = digitsOnly(event.currentTarget.value);\r\n setPhone(limit ? digits.slice(0, limit) : digits);\r\n }}\r\n />\r\n </Box>\r\n {(hasMessage(numberError) || hasMessage(codeError)) && (\r\n <div {...getStyles(\"errors\")}>\r\n {hasMessage(numberError) && (\r\n <InputError {...getStyles(\"error\")} id={errorId}>\r\n {numberError}\r\n </InputError>\r\n )}\r\n {hasMessage(codeError) && <InputError {...getStyles(\"error\")} data-code>{codeError}</InputError>}\r\n </div>\r\n )}\r\n {codeName && <input type=\"hidden\" name={codeName} value={code} />}\r\n {limitName && <input type=\"hidden\" name={limitName} value={limit ?? \"\"} />}\r\n {startingNumberName && <input type=\"hidden\" name={startingNumberName} value={startingNumber ?? \"\"} />}\r\n </InputWrapper>\r\n );\r\n});\r\nPhoneInput.displayName = \"PhoneInput\";\r\n","import type { PhoneCountry } from \"./PhoneInput\";\n\n/**\n * [ISO code, name, dial code]. One entry for each dial code: where countries share one (+1, +7, +44) the main\n * country stands for it, and the name says so. Digit limits differ by number type, so only Egypt (the default)\n * has one; pass your own `countries` for the rest.\n */\nconst ROWS: [string, string, string][] = [\n [\"af\", \"Afghanistan\", \"93\"],\n [\"al\", \"Albania\", \"355\"],\n [\"dz\", \"Algeria\", \"213\"],\n [\"ad\", \"Andorra\", \"376\"],\n [\"ao\", \"Angola\", \"244\"],\n [\"ar\", \"Argentina\", \"54\"],\n [\"am\", \"Armenia\", \"374\"],\n [\"aw\", \"Aruba\", \"297\"],\n [\"au\", \"Australia\", \"61\"],\n [\"at\", \"Austria\", \"43\"],\n [\"az\", \"Azerbaijan\", \"994\"],\n [\"bh\", \"Bahrain\", \"973\"],\n [\"bd\", \"Bangladesh\", \"880\"],\n [\"by\", \"Belarus\", \"375\"],\n [\"be\", \"Belgium\", \"32\"],\n [\"bz\", \"Belize\", \"501\"],\n [\"bj\", \"Benin\", \"229\"],\n [\"bt\", \"Bhutan\", \"975\"],\n [\"bo\", \"Bolivia\", \"591\"],\n [\"ba\", \"Bosnia and Herzegovina\", \"387\"],\n [\"bw\", \"Botswana\", \"267\"],\n [\"br\", \"Brazil\", \"55\"],\n [\"bn\", \"Brunei\", \"673\"],\n [\"bg\", \"Bulgaria\", \"359\"],\n [\"bf\", \"Burkina Faso\", \"226\"],\n [\"bi\", \"Burundi\", \"257\"],\n [\"kh\", \"Cambodia\", \"855\"],\n [\"cm\", \"Cameroon\", \"237\"],\n [\"cv\", \"Cape Verde\", \"238\"],\n [\"cf\", \"Central African Republic\", \"236\"],\n [\"td\", \"Chad\", \"235\"],\n [\"cl\", \"Chile\", \"56\"],\n [\"cn\", \"China\", \"86\"],\n [\"co\", \"Colombia\", \"57\"],\n [\"km\", \"Comoros\", \"269\"],\n [\"cg\", \"Congo\", \"242\"],\n [\"cd\", \"DR Congo\", \"243\"],\n [\"cr\", \"Costa Rica\", \"506\"],\n [\"ci\", \"Côte d'Ivoire\", \"225\"],\n [\"hr\", \"Croatia\", \"385\"],\n [\"cu\", \"Cuba\", \"53\"],\n [\"cy\", \"Cyprus\", \"357\"],\n [\"cz\", \"Czechia\", \"420\"],\n [\"dk\", \"Denmark\", \"45\"],\n [\"dj\", \"Djibouti\", \"253\"],\n [\"ec\", \"Ecuador\", \"593\"],\n [\"eg\", \"Egypt\", \"20\"],\n [\"sv\", \"El Salvador\", \"503\"],\n [\"gq\", \"Equatorial Guinea\", \"240\"],\n [\"er\", \"Eritrea\", \"291\"],\n [\"ee\", \"Estonia\", \"372\"],\n [\"sz\", \"Eswatini\", \"268\"],\n [\"et\", \"Ethiopia\", \"251\"],\n [\"fj\", \"Fiji\", \"679\"],\n [\"fi\", \"Finland\", \"358\"],\n [\"fr\", \"France\", \"33\"],\n [\"gf\", \"French Guiana\", \"594\"],\n [\"pf\", \"French Polynesia\", \"689\"],\n [\"ga\", \"Gabon\", \"241\"],\n [\"gm\", \"Gambia\", \"220\"],\n [\"ge\", \"Georgia\", \"995\"],\n [\"de\", \"Germany\", \"49\"],\n [\"gh\", \"Ghana\", \"233\"],\n [\"gi\", \"Gibraltar\", \"350\"],\n [\"gr\", \"Greece\", \"30\"],\n [\"gl\", \"Greenland\", \"299\"],\n [\"gp\", \"Guadeloupe\", \"590\"],\n [\"gt\", \"Guatemala\", \"502\"],\n [\"gn\", \"Guinea\", \"224\"],\n [\"gw\", \"Guinea-Bissau\", \"245\"],\n [\"gy\", \"Guyana\", \"592\"],\n [\"ht\", \"Haiti\", \"509\"],\n [\"hn\", \"Honduras\", \"504\"],\n [\"hk\", \"Hong Kong\", \"852\"],\n [\"hu\", \"Hungary\", \"36\"],\n [\"is\", \"Iceland\", \"354\"],\n [\"in\", \"India\", \"91\"],\n [\"id\", \"Indonesia\", \"62\"],\n [\"ir\", \"Iran\", \"98\"],\n [\"iq\", \"Iraq\", \"964\"],\n [\"ie\", \"Ireland\", \"353\"],\n // [\"il\", \"Israel\", \"972\"],\n [\"it\", \"Italy\", \"39\"],\n [\"jp\", \"Japan\", \"81\"],\n [\"jo\", \"Jordan\", \"962\"],\n [\"ke\", \"Kenya\", \"254\"],\n [\"ki\", \"Kiribati\", \"686\"],\n [\"kw\", \"Kuwait\", \"965\"],\n [\"kg\", \"Kyrgyzstan\", \"996\"],\n [\"la\", \"Laos\", \"856\"],\n [\"lv\", \"Latvia\", \"371\"],\n [\"lb\", \"Lebanon\", \"961\"],\n [\"ls\", \"Lesotho\", \"266\"],\n [\"lr\", \"Liberia\", \"231\"],\n [\"ly\", \"Libya\", \"218\"],\n [\"li\", \"Liechtenstein\", \"423\"],\n [\"lt\", \"Lithuania\", \"370\"],\n [\"lu\", \"Luxembourg\", \"352\"],\n [\"mo\", \"Macao\", \"853\"],\n [\"mg\", \"Madagascar\", \"261\"],\n [\"mw\", \"Malawi\", \"265\"],\n [\"my\", \"Malaysia\", \"60\"],\n [\"mv\", \"Maldives\", \"960\"],\n [\"ml\", \"Mali\", \"223\"],\n [\"mt\", \"Malta\", \"356\"],\n [\"mq\", \"Martinique\", \"596\"],\n [\"mr\", \"Mauritania\", \"222\"],\n [\"mu\", \"Mauritius\", \"230\"],\n [\"mx\", \"Mexico\", \"52\"],\n [\"md\", \"Moldova\", \"373\"],\n [\"mc\", \"Monaco\", \"377\"],\n [\"mn\", \"Mongolia\", \"976\"],\n [\"me\", \"Montenegro\", \"382\"],\n [\"ma\", \"Morocco\", \"212\"],\n [\"mz\", \"Mozambique\", \"258\"],\n [\"mm\", \"Myanmar\", \"95\"],\n [\"na\", \"Namibia\", \"264\"],\n [\"np\", \"Nepal\", \"977\"],\n [\"nl\", \"Netherlands\", \"31\"],\n [\"nc\", \"New Caledonia\", \"687\"],\n [\"nz\", \"New Zealand\", \"64\"],\n [\"ni\", \"Nicaragua\", \"505\"],\n [\"ne\", \"Niger\", \"227\"],\n [\"ng\", \"Nigeria\", \"234\"],\n [\"kp\", \"North Korea\", \"850\"],\n [\"mk\", \"North Macedonia\", \"389\"],\n [\"no\", \"Norway\", \"47\"],\n [\"om\", \"Oman\", \"968\"],\n [\"pk\", \"Pakistan\", \"92\"],\n [\"ps\", \"Palestine\", \"970\"],\n [\"pa\", \"Panama\", \"507\"],\n [\"pg\", \"Papua New Guinea\", \"675\"],\n [\"py\", \"Paraguay\", \"595\"],\n [\"pe\", \"Peru\", \"51\"],\n [\"ph\", \"Philippines\", \"63\"],\n [\"pl\", \"Poland\", \"48\"],\n [\"pt\", \"Portugal\", \"351\"],\n [\"qa\", \"Qatar\", \"974\"],\n [\"re\", \"Réunion\", \"262\"],\n [\"ro\", \"Romania\", \"40\"],\n [\"ru\", \"Russia / Kazakhstan\", \"7\"],\n [\"rw\", \"Rwanda\", \"250\"],\n [\"ws\", \"Samoa\", \"685\"],\n [\"sm\", \"San Marino\", \"378\"],\n [\"st\", \"São Tomé and Príncipe\", \"239\"],\n [\"sa\", \"Saudi Arabia\", \"966\"],\n [\"sn\", \"Senegal\", \"221\"],\n [\"rs\", \"Serbia\", \"381\"],\n [\"sc\", \"Seychelles\", \"248\"],\n [\"sl\", \"Sierra Leone\", \"232\"],\n [\"sg\", \"Singapore\", \"65\"],\n [\"sk\", \"Slovakia\", \"421\"],\n [\"si\", \"Slovenia\", \"386\"],\n [\"sb\", \"Solomon Islands\", \"677\"],\n [\"so\", \"Somalia\", \"252\"],\n [\"za\", \"South Africa\", \"27\"],\n [\"kr\", \"South Korea\", \"82\"],\n [\"ss\", \"South Sudan\", \"211\"],\n [\"es\", \"Spain\", \"34\"],\n [\"lk\", \"Sri Lanka\", \"94\"],\n [\"sd\", \"Sudan\", \"249\"],\n [\"sr\", \"Suriname\", \"597\"],\n [\"se\", \"Sweden\", \"46\"],\n [\"ch\", \"Switzerland\", \"41\"],\n [\"sy\", \"Syria\", \"963\"],\n [\"tw\", \"Taiwan\", \"886\"],\n [\"tj\", \"Tajikistan\", \"992\"],\n [\"tz\", \"Tanzania\", \"255\"],\n [\"th\", \"Thailand\", \"66\"],\n [\"tl\", \"Timor-Leste\", \"670\"],\n [\"tg\", \"Togo\", \"228\"],\n [\"to\", \"Tonga\", \"676\"],\n [\"tn\", \"Tunisia\", \"216\"],\n [\"tr\", \"Türkiye\", \"90\"],\n [\"tm\", \"Turkmenistan\", \"993\"],\n [\"ug\", \"Uganda\", \"256\"],\n [\"ua\", \"Ukraine\", \"380\"],\n [\"ae\", \"United Arab Emirates\", \"971\"],\n [\"gb\", \"United Kingdom\", \"44\"],\n [\"us\", \"United States / Canada\", \"1\"],\n [\"uy\", \"Uruguay\", \"598\"],\n [\"uz\", \"Uzbekistan\", \"998\"],\n [\"vu\", \"Vanuatu\", \"678\"],\n [\"ve\", \"Venezuela\", \"58\"],\n [\"vn\", \"Vietnam\", \"84\"],\n [\"ye\", \"Yemen\", \"967\"],\n [\"zm\", \"Zambia\", \"260\"],\n [\"zw\", \"Zimbabwe\", \"263\"],\n];\n\n/** Egypt's own numbers: ten digits, starting with 1. */\nconst EGYPT_RULE = { limit: 10, startingNumber: 1 };\n\n/** Every dial code, by country name: what `PhoneInput` lists when no `countries`, `loadCountries` or `endpoint` is given. */\nexport const ALL_PHONE_COUNTRIES: PhoneCountry[] = ROWS.map(([iso, name, code]) => ({\n code,\n name,\n flag: `https://flagcdn.com/${iso}.svg`,\n ...(code === \"20\" ? EGYPT_RULE : {}),\n}));\n\n/** The country selected when nothing else is: Egypt (+20). */\nexport const DEFAULT_PHONE_CODE = \"20\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,WAAW,SAAS,QAAQ,gBAAgC;;;ACKrE,IAAM,OAAmC;AAAA,EACvC,CAAC,MAAM,eAAe,IAAI;AAAA,EAC1B,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,WAAW,KAAK;AAAA,EACvB,CAAC,MAAM,WAA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