@mirantes-micro/foundation-design-system 1.2.409 → 1.2.411
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/27d54d5c68c7baef59d63931c62016d014d55518-Y4EV6WKY.png +0 -0
- package/dist/chunk-5KHU3CLL.js +2 -0
- package/dist/design-system.css +2 -0
- package/dist/dynamic-input-W6QXTNYD.js +2 -0
- package/dist/index.d.ts +2737 -0
- package/dist/index.js +4443 -0
- package/package.json +213 -211
- package/dist/310.bundle.js +0 -3
- package/dist/310.bundle.js.LICENSE.txt +0 -6
- package/dist/310.bundle.js.map +0 -1
- package/dist/443.bundle.js +0 -2
- package/dist/443.bundle.js.map +0 -1
- package/dist/527.bundle.js +0 -3
- package/dist/527.bundle.js.LICENSE.txt +0 -1
- package/dist/527.bundle.js.map +0 -1
- package/dist/bundle.js +0 -3389
- package/dist/bundle.js.LICENSE.txt +0 -401
- package/dist/bundle.js.map +0 -1
- package/dist/images/layers-2x.8f2c4d11474275fbc1614b9098334eae.png +0 -0
- package/dist/images/layers.416d91365b44e4b4f4777663e6f009f3.png +0 -0
- package/dist/images/marker-icon.2b3e1faf89f94a4835397e7a43b4f77d.png +0 -0
- package/dist/index.html +0 -1
package/package.json
CHANGED
|
@@ -1,211 +1,213 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@mirantes-micro/foundation-design-system",
|
|
3
|
+
"description": "A scalable and customizable design system package featuring a collection of reusable React components, utility functions, and context providers. Built to enforce visual and functional consistency across applications, this package offers accessible, themeable UI elements, shared logic through utility helpers, and context-based providers for managing global state such as themes, modals, and user sessions.",
|
|
4
|
+
"version": "1.2.411",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Mirantes Frontend team"
|
|
8
|
+
},
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"*.css"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"./styles": "./dist/design-system.css",
|
|
24
|
+
"./design-system.css": "./dist/design-system.css"
|
|
25
|
+
},
|
|
26
|
+
"source": "./src/components/fromMirantes/index.ts",
|
|
27
|
+
"module": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/*"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"dev": "webpack serve --mode development",
|
|
34
|
+
"build": "webpack --mode production",
|
|
35
|
+
"build:webpack": "tsup src/components/fromMirantes/index.ts --format cjs --minify && pnpm build:css",
|
|
36
|
+
"release": "pnpm build:webpack && npm publish",
|
|
37
|
+
"build:css": "npx tailwindcss -i ./src/styles/globals.css -o ./dist/design-system.css --minify",
|
|
38
|
+
"prepare": "husky",
|
|
39
|
+
"format": "biome check --staged --write --no-errors-on-unmatched",
|
|
40
|
+
"test": "vitest --run --passWithNoTests"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@babel/core": "7.26.0",
|
|
44
|
+
"@babel/preset-env": "7.26.0",
|
|
45
|
+
"@babel/preset-react": "7.26.3",
|
|
46
|
+
"@biomejs/biome": "2.4.6",
|
|
47
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
|
|
48
|
+
"@tailwindcss/postcss7-compat": "2.2.17",
|
|
49
|
+
"@tanstack/react-query": "5.76.1",
|
|
50
|
+
"@testing-library/dom": "10.4.1",
|
|
51
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
52
|
+
"@testing-library/react": "16.3.2",
|
|
53
|
+
"@types/clientjs": "0.2.2",
|
|
54
|
+
"@types/country-data": "0.0.5",
|
|
55
|
+
"@types/crypto-js": "4.2.2",
|
|
56
|
+
"@types/js-cookie": "3.0.6",
|
|
57
|
+
"@types/lodash.throttle": "^4.1.9",
|
|
58
|
+
"@types/node": "22.10.5",
|
|
59
|
+
"@types/react": "19.1.4",
|
|
60
|
+
"@types/react-detect-offline": "2.4.5",
|
|
61
|
+
"@types/react-dom": "19.1.5",
|
|
62
|
+
"@types/react-syntax-highlighter": "15.5.13",
|
|
63
|
+
"@types/uuid": "10.0.0",
|
|
64
|
+
"@vitejs/plugin-react": "5.1.4",
|
|
65
|
+
"@vitest/ui": "4.1.6",
|
|
66
|
+
"babel-loader": "9.2.1",
|
|
67
|
+
"baseline-browser-mapping": "^2.9.19",
|
|
68
|
+
"css-loader": "6.8.1",
|
|
69
|
+
"esbuild-sass-plugin": "3.3.1",
|
|
70
|
+
"eslint": "9.17.0",
|
|
71
|
+
"eslint-plugin-react": "7.37.3",
|
|
72
|
+
"file-loader": "6.2.0",
|
|
73
|
+
"graphql-tag": "2.12.6",
|
|
74
|
+
"html-webpack-plugin": "5.5.3",
|
|
75
|
+
"husky": "9.1.7",
|
|
76
|
+
"jsdom": "28.1.0",
|
|
77
|
+
"postcss": "8.4.39",
|
|
78
|
+
"postcss-import": "16.1.0",
|
|
79
|
+
"postcss-important": "0.3.0",
|
|
80
|
+
"postcss-loader": "7.3.3",
|
|
81
|
+
"postcss-nesting": "12.1.5",
|
|
82
|
+
"prettier": "3.4.2",
|
|
83
|
+
"react-refresh": "0.16.0",
|
|
84
|
+
"sass": "^1.94.2",
|
|
85
|
+
"sass-embedded": "^1.93.3",
|
|
86
|
+
"sass-loader": "^16.0.6",
|
|
87
|
+
"style-loader": "3.3.3",
|
|
88
|
+
"tailwind-merge": "2.6.0",
|
|
89
|
+
"tailwindcss": "3.4.4",
|
|
90
|
+
"tailwindcss-animate": "1.0.7",
|
|
91
|
+
"ts-loader": "9.5.1",
|
|
92
|
+
"tsup": "8.3.5",
|
|
93
|
+
"typescript": "5.7.2",
|
|
94
|
+
"vite-tsconfig-paths": "6.1.1",
|
|
95
|
+
"vitest": "4.0.18",
|
|
96
|
+
"webpack": "5.97.1",
|
|
97
|
+
"webpack-cli": "6.0.1",
|
|
98
|
+
"webpack-dev-server": "5.2.0"
|
|
99
|
+
},
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"@emoji-mart/data": "1.2.1",
|
|
102
|
+
"@emoji-mart/react": "1.1.1",
|
|
103
|
+
"@emotion/is-prop-valid": "^1.4.0",
|
|
104
|
+
"@ffmpeg/ffmpeg": "0.12.15",
|
|
105
|
+
"@ffmpeg/util": "0.12.2",
|
|
106
|
+
"@fingerprintjs/fingerprintjs": "^5.2.0",
|
|
107
|
+
"@floating-ui/react": "^0.27.16",
|
|
108
|
+
"@hookform/resolvers": "^5.2.2",
|
|
109
|
+
"@mirantes-micro/billing-v2": "0.1.50",
|
|
110
|
+
"@mirantes-micro/errors": "^1.0.6",
|
|
111
|
+
"@mirantes-micro/notifications-v2": "0.0.45",
|
|
112
|
+
"@mirantes-micro/widgets": "0.0.161",
|
|
113
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
114
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
115
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
116
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
117
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
118
|
+
"@radix-ui/react-popover": "1.1.15",
|
|
119
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
120
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
121
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
122
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
123
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
124
|
+
"@radix-ui/react-visually-hidden": "1.2.4",
|
|
125
|
+
"@tanstack/react-query-devtools": "5.76.1",
|
|
126
|
+
"@tiptap/core": "^3.10.7",
|
|
127
|
+
"@tiptap/extension-highlight": "^3.13.0",
|
|
128
|
+
"@tiptap/extension-horizontal-rule": "^3.13.0",
|
|
129
|
+
"@tiptap/extension-image": "^3.13.0",
|
|
130
|
+
"@tiptap/extension-list": "^3.13.0",
|
|
131
|
+
"@tiptap/extension-mention": "^3.10.7",
|
|
132
|
+
"@tiptap/extension-placeholder": "^3.10.7",
|
|
133
|
+
"@tiptap/extension-subscript": "^3.13.0",
|
|
134
|
+
"@tiptap/extension-superscript": "^3.13.0",
|
|
135
|
+
"@tiptap/extension-text-align": "^3.13.0",
|
|
136
|
+
"@tiptap/extension-typography": "^3.13.0",
|
|
137
|
+
"@tiptap/extensions": "^3.13.0",
|
|
138
|
+
"@tiptap/pm": "^3.13.0",
|
|
139
|
+
"@tiptap/react": "^3.10.7",
|
|
140
|
+
"@tiptap/starter-kit": "^3.10.7",
|
|
141
|
+
"@tiptap/suggestion": "^3.10.7",
|
|
142
|
+
"@uidotdev/usehooks": "2.4.1",
|
|
143
|
+
"axios": "1.11.0",
|
|
144
|
+
"browser-image-compression": "2.0.2",
|
|
145
|
+
"class-variance-authority": "0.7.1",
|
|
146
|
+
"clientjs": "0.2.1",
|
|
147
|
+
"clsx": "2.1.1",
|
|
148
|
+
"cmdk": "^1.1.1",
|
|
149
|
+
"cookies-next": "^5.1.0",
|
|
150
|
+
"country-data": "0.0.31",
|
|
151
|
+
"crypto-js": "4.2.0",
|
|
152
|
+
"currencies.json": "1.1.0",
|
|
153
|
+
"date-fns": "^4.1.0",
|
|
154
|
+
"date-fns-tz": "3.2.0",
|
|
155
|
+
"emoji-mart": "5.6.0",
|
|
156
|
+
"emoji-picker-react": "4.13.3",
|
|
157
|
+
"framer-motion": "12.40.0",
|
|
158
|
+
"global-currencies": "1.0.3",
|
|
159
|
+
"graphql": "16.11.0",
|
|
160
|
+
"graphql-request": "^7.3.1",
|
|
161
|
+
"html2canvas": "1.4.1",
|
|
162
|
+
"idb-keyval": "6.2.2",
|
|
163
|
+
"isomorphic-dompurify": "^2.34.0",
|
|
164
|
+
"js-cookie": "3.0.5",
|
|
165
|
+
"jspdf": "3.0.3",
|
|
166
|
+
"link-preview-js": "^3.1.0",
|
|
167
|
+
"lodash.throttle": "^4.1.1",
|
|
168
|
+
"lucide-react": "0.510.0",
|
|
169
|
+
"marked": "^17.0.0",
|
|
170
|
+
"motion": "^12.23.24",
|
|
171
|
+
"msw": "2.12.14",
|
|
172
|
+
"next": "15.3.2",
|
|
173
|
+
"next-themes": "^0.4.6",
|
|
174
|
+
"ogp-parser": "0.8.1",
|
|
175
|
+
"pdf-lib": "^1.17.1",
|
|
176
|
+
"pdfjs-dist": "4.8.69",
|
|
177
|
+
"process": "0.11.10",
|
|
178
|
+
"radix-ui": "^1.4.3",
|
|
179
|
+
"react": "19.1.0",
|
|
180
|
+
"react-day-picker": "^9.11.1",
|
|
181
|
+
"react-detect-offline": "2.4.5",
|
|
182
|
+
"react-dom": "19.1.0",
|
|
183
|
+
"react-dropzone": "14.3.8",
|
|
184
|
+
"react-easy-crop": "5.5.7",
|
|
185
|
+
"react-hook-form": "^7.65.0",
|
|
186
|
+
"react-hotkeys-hook": "^5.2.1",
|
|
187
|
+
"react-infinite-scroll-hook": "6.0.1",
|
|
188
|
+
"react-intersection-observer": "10.0.3",
|
|
189
|
+
"react-markdown": "^10.1.0",
|
|
190
|
+
"react-mentions-ts": "5.4.7",
|
|
191
|
+
"react-router-dom": "7.6.0",
|
|
192
|
+
"react-syntax-highlighter": "16.1.0",
|
|
193
|
+
"react-toastify": "^11.0.5",
|
|
194
|
+
"remark-gfm": "^4.0.1",
|
|
195
|
+
"shiki": "^3.15.0",
|
|
196
|
+
"slugify": "1.6.6",
|
|
197
|
+
"socket.io-client": "4.8.1",
|
|
198
|
+
"sonner": "^2.0.7",
|
|
199
|
+
"swiper": "11.2.10",
|
|
200
|
+
"tailwind-scrollbar-hide": "4.0.0",
|
|
201
|
+
"tippy.js": "^6.3.7",
|
|
202
|
+
"tw-animate-css": "1.2.9",
|
|
203
|
+
"uuid": "11.1.0",
|
|
204
|
+
"vaul": "^1.1.2",
|
|
205
|
+
"yup": "^1.7.1",
|
|
206
|
+
"zustand": "^5.0.8"
|
|
207
|
+
},
|
|
208
|
+
"peerDependencies": {
|
|
209
|
+
"tailwind-scrollbar-hide": "^4.0.0",
|
|
210
|
+
"tailwindcss": "^3.0.0",
|
|
211
|
+
"tailwindcss-animate": "^1.0.0"
|
|
212
|
+
}
|
|
213
|
+
}
|
package/dist/310.bundle.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 310.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_mirantes_micro_foundation_design_system=self.webpackChunk_mirantes_micro_foundation_design_system||[]).push([[310],{310:(e,n,o)=>{o.r(n),o.d(n,{DynamicContactInput:()=>f});var a=o(6440);const c=(0,o(6910).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var t=o(6672),d=o(8412),g=o(8646),l=o(4637),m=o(3323);const p=[{code:"+93",countryCode:"AF",flag:"https://flagcdn.com/w20/af.png",name:"Afghanistan"},{code:"+355",countryCode:"AL",flag:"https://flagcdn.com/w20/al.png",name:"Albania"},{code:"+213",countryCode:"DZ",flag:"https://flagcdn.com/w20/dz.png",name:"Algeria"},{code:"+376",countryCode:"AD",flag:"https://flagcdn.com/w20/ad.png",name:"Andorra"},{code:"+244",countryCode:"AO",flag:"https://flagcdn.com/w20/ao.png",name:"Angola"},{code:"+54",countryCode:"AR",flag:"https://flagcdn.com/w20/ar.png",name:"Argentina"},{code:"+374",countryCode:"AM",flag:"https://flagcdn.com/w20/am.png",name:"Armenia"},{code:"+61",countryCode:"AU",flag:"https://flagcdn.com/w20/au.png",name:"Australia"},{code:"+43",countryCode:"AT",flag:"https://flagcdn.com/w20/at.png",name:"Austria"},{code:"+994",countryCode:"AZ",flag:"https://flagcdn.com/w20/az.png",name:"Azerbaijan"},{code:"+973",countryCode:"BH",flag:"https://flagcdn.com/w20/bh.png",name:"Bahrain"},{code:"+880",countryCode:"BD",flag:"https://flagcdn.com/w20/bd.png",name:"Bangladesh"},{code:"+375",countryCode:"BY",flag:"https://flagcdn.com/w20/by.png",name:"Belarus"},{code:"+32",countryCode:"BE",flag:"https://flagcdn.com/w20/be.png",name:"Belgium"},{code:"+501",countryCode:"BZ",flag:"https://flagcdn.com/w20/bz.png",name:"Belize"},{code:"+229",countryCode:"BJ",flag:"https://flagcdn.com/w20/bj.png",name:"Benin"},{code:"+975",countryCode:"BT",flag:"https://flagcdn.com/w20/bt.png",name:"Bhutan"},{code:"+591",countryCode:"BO",flag:"https://flagcdn.com/w20/bo.png",name:"Bolivia"},{code:"+387",countryCode:"BA",flag:"https://flagcdn.com/w20/ba.png",name:"Bosnia and Herzegovina"},{code:"+267",countryCode:"BW",flag:"https://flagcdn.com/w20/bw.png",name:"Botswana"},{code:"+55",countryCode:"BR",flag:"https://flagcdn.com/w20/br.png",name:"Brazil"},{code:"+673",countryCode:"BN",flag:"https://flagcdn.com/w20/bn.png",name:"Brunei"},{code:"+359",countryCode:"BG",flag:"https://flagcdn.com/w20/bg.png",name:"Bulgaria"},{code:"+226",countryCode:"BF",flag:"https://flagcdn.com/w20/bf.png",name:"Burkina Faso"},{code:"+257",countryCode:"BI",flag:"https://flagcdn.com/w20/bi.png",name:"Burundi"},{code:"+855",countryCode:"KH",flag:"https://flagcdn.com/w20/kh.png",name:"Cambodia"},{code:"+237",countryCode:"CM",flag:"https://flagcdn.com/w20/cm.png",name:"Cameroon"},{code:"+1",countryCode:"CA",flag:"https://flagcdn.com/w20/ca.png",name:"Canada"},{code:"+238",countryCode:"CV",flag:"https://flagcdn.com/w20/cv.png",name:"Cape Verde"},{code:"+236",countryCode:"CF",flag:"https://flagcdn.com/w20/cf.png",name:"Central African Republic"},{code:"+235",countryCode:"TD",flag:"https://flagcdn.com/w20/td.png",name:"Chad"},{code:"+56",countryCode:"CL",flag:"https://flagcdn.com/w20/cl.png",name:"Chile"},{code:"+86",countryCode:"CN",flag:"https://flagcdn.com/w20/cn.png",name:"China"},{code:"+57",countryCode:"CO",flag:"https://flagcdn.com/w20/co.png",name:"Colombia"},{code:"+269",countryCode:"KM",flag:"https://flagcdn.com/w20/km.png",name:"Comoros"},{code:"+243",countryCode:"CD",flag:"https://flagcdn.com/w20/cd.png",name:"Congo (DRC)"},{code:"+242",countryCode:"CG",flag:"https://flagcdn.com/w20/cg.png",name:"Congo (Republic)"},{code:"+506",countryCode:"CR",flag:"https://flagcdn.com/w20/cr.png",name:"Costa Rica"},{code:"+385",countryCode:"HR",flag:"https://flagcdn.com/w20/hr.png",name:"Croatia"},{code:"+53",countryCode:"CU",flag:"https://flagcdn.com/w20/cu.png",name:"Cuba"},{code:"+357",countryCode:"CY",flag:"https://flagcdn.com/w20/cy.png",name:"Cyprus"},{code:"+420",countryCode:"CZ",flag:"https://flagcdn.com/w20/cz.png",name:"Czech Republic"},{code:"+45",countryCode:"DK",flag:"https://flagcdn.com/w20/dk.png",name:"Denmark"},{code:"+253",countryCode:"DJ",flag:"https://flagcdn.com/w20/dj.png",name:"Djibouti"},{code:"+670",countryCode:"TL",flag:"https://flagcdn.com/w20/tl.png",name:"East Timor"},{code:"+593",countryCode:"EC",flag:"https://flagcdn.com/w20/ec.png",name:"Ecuador"},{code:"+20",countryCode:"EG",flag:"https://flagcdn.com/w20/eg.png",name:"Egypt"},{code:"+503",countryCode:"SV",flag:"https://flagcdn.com/w20/sv.png",name:"El Salvador"},{code:"+240",countryCode:"GQ",flag:"https://flagcdn.com/w20/gq.png",name:"Equ部分: Equitorial Guinea"},{code:"+291",countryCode:"ER",flag:"https://flagcdn.com/w20/er.png",name:"Eritrea"},{code:"+372",countryCode:"EE",flag:"https://flagcdn.com/w20/ee.png",name:"Estonia"},{code:"+251",countryCode:"ET",flag:"https://flagcdn.com/w20/et.png",name:"Ethiopia"},{code:"+679",countryCode:"FJ",flag:"https://flagcdn.com/w20/fj.png",name:"Fiji"},{code:"+358",countryCode:"FI",flag:"https://flagcdn.com/w20/fi.png",name:"Finland"},{code:"+33",countryCode:"FR",flag:"https://flagcdn.com/w20/fr.png",name:"France"},{code:"+241",countryCode:"GA",flag:"https://flagcdn.com/w20/ga.png",name:"Gabon"},{code:"+220",countryCode:"GM",flag:"https://flagcdn.com/w20/gm.png",name:"Gambia"},{code:"+995",countryCode:"GE",flag:"https://flagcdn.com/w20/ge.png",name:"Georgia"},{code:"+49",countryCode:"DE",flag:"https://flagcdn.com/w20/de.png",name:"Germany"},{code:"+233",countryCode:"GH",flag:"https://flagcdn.com/w20/gh.png",name:"Ghana"},{code:"+30",countryCode:"GR",flag:"https://flagcdn.com/w20/gr.png",name:"Greece"},{code:"+502",countryCode:"GT",flag:"https://flagcdn.com/w20/gt.png",name:"Guatemala"},{code:"+224",countryCode:"GN",flag:"https://flagcdn.com/w20/gn.png",name:"Guinea"},{code:"+245",countryCode:"GW",flag:"https://flagcdn.com/w20/gw.png",name:"Guinea-Bissau"},{code:"+592",countryCode:"GY",flag:"https://flagcdn.com/w20/gy.png",name:"Guyana"},{code:"+509",countryCode:"HT",flag:"https://flagcdn.com/w20/ht.png",name:"Haiti"},{code:"+504",countryCode:"HN",flag:"https://flagcdn.com/w20/hn.png",name:"Honduras"},{code:"+852",countryCode:"HK",flag:"https://flagcdn.com/w20/hk.png",name:"Hong Kong"},{code:"+36",countryCode:"HU",flag:"https://flagcdn.com/w20/hu.png",name:"Hungary"},{code:"+354",countryCode:"IS",flag:"https://flagcdn.com/w20/is.png",name:"Iceland"},{code:"+91",countryCode:"IN",flag:"https://flagcdn.com/w20/in.png",name:"India"},{code:"+62",countryCode:"ID",flag:"https://flagcdn.com/w20/id.png",name:"Indonesia"},{code:"+98",countryCode:"IR",flag:"https://flagcdn.com/w20/ir.png",name:"Iran"},{code:"+964",countryCode:"IQ",flag:"https://flagcdn.com/w20/iq.png",name:"Iraq"},{code:"+353",countryCode:"IE",flag:"https://flagcdn.com/w20/ie.png",name:"Ireland"},{code:"+972",countryCode:"IL",flag:"https://flagcdn.com/w20/il.png",name:"Israel"},{code:"+39",countryCode:"IT",flag:"https://flagcdn.com/w20/it.png",name:"Italy"},{code:"+225",countryCode:"CI",flag:"https://flagcdn.com/w20/ci.png",name:"Ivory Coast"},{code:"+876",countryCode:"JM",flag:"https://flagcdn.com/w20/jm.png",name:"Jamaica"},{code:"+81",countryCode:"JP",flag:"https://flagcdn.com/w20/jp.png",name:"Japan"},{code:"+962",countryCode:"JO",flag:"https://flagcdn.com/w20/jo.png",name:"Jordan"},{code:"+7",countryCode:"KZ",flag:"https://flagcdn.com/w20/kz.png",name:"Kazakhstan"},{code:"+254",countryCode:"KE",flag:"https://flagcdn.com/w20/ke.png",name:"Kenya"},{code:"+686",countryCode:"KI",flag:"https://flagcdn.com/w20/ki.png",name:"Kiribati"},{code:"+965",countryCode:"KW",flag:"https://flagcdn.com/w20/kw.png",name:"Kuwait"},{code:"+996",countryCode:"KG",flag:"https://flagcdn.com/w20/kg.png",name:"Kyrgyzstan"},{code:"+856",countryCode:"LA",flag:"https://flagcdn.com/w20/la.png",name:"Laos"},{code:"+371",countryCode:"LV",flag:"https://flagcdn.com/w20/lv.png",name:"Latvia"},{code:"+961",countryCode:"LB",flag:"https://flagcdn.com/w20/lb.png",name:"Lebanon"},{code:"+266",countryCode:"LS",flag:"https://flagcdn.com/w20/ls.png",name:"Lesotho"},{code:"+231",countryCode:"LR",flag:"https://flagcdn.com/w20/lr.png",name:"Liberia"},{code:"+218",countryCode:"LY",flag:"https://flagcdn.com/w20/ly.png",name:"Libya"},{code:"+423",countryCode:"LI",flag:"https://flagcdn.com/w20/li.png",name:"Liechtenstein"},{code:"+370",countryCode:"LT",flag:"https://flagcdn.com/w20/lt.png",name:"Lithuania"},{code:"+352",countryCode:"LU",flag:"https://flagcdn.com/w20/lu.png",name:"Luxembourg"},{code:"+853",countryCode:"MO",flag:"https://flagcdn.com/w20/mo.png",name:"Macau"},{code:"+389",countryCode:"MK",flag:"https://flagcdn.com/w20/mk.png",name:"Macedonia"},{code:"+261",countryCode:"MG",flag:"https://flagcdn.com/w20/mg.png",name:"Madagascar"},{code:"+265",countryCode:"MW",flag:"https://flagcdn.com/w20/mw.png",name:"Malawi"},{code:"+60",countryCode:"MY",flag:"https://flagcdn.com/w20/my.png",name:"Malaysia"},{code:"+960",countryCode:"MV",flag:"https://flagcdn.com/w20/mv.png",name:"Maldives"},{code:"+223",countryCode:"ML",flag:"https://flagcdn.com/w20/ml.png",name:"Mali"},{code:"+356",countryCode:"MT",flag:"https://flagcdn.com/w20/mt.png",name:"Malta"},{code:"+692",countryCode:"MH",flag:"https://flagcdn.com/w20/mh.png",name:"Marshall Islands"},{code:"+222",countryCode:"MR",flag:"https://flagcdn.com/w20/mr.png",name:"Mauritania"},{code:"+230",countryCode:"MU",flag:"https://flagcdn.com/w20/mu.png",name:"Mauritius"},{code:"+52",countryCode:"MX",flag:"https://flagcdn.com/w20/mx.png",name:"Mexico"},{code:"+691",countryCode:"FM",flag:"https://flagcdn.com/w20/fm.png",name:"Micronesia"},{code:"+373",countryCode:"MD",flag:"https://flagcdn.com/w20/md.png",name:"Moldova"},{code:"+377",countryCode:"MC",flag:"https://flagcdn.com/w20/mc.png",name:"Monaco"},{code:"+976",countryCode:"MN",flag:"https://flagcdn.com/w20/mn.png",name:"Mongolia"},{code:"+382",countryCode:"ME",flag:"https://flagcdn.com/w20/me.png",name:"Montenegro"},{code:"+212",countryCode:"MA",flag:"https://flagcdn.com/w20/ma.png",name:"Morocco"},{code:"+258",countryCode:"MZ",flag:"https://flagcdn.com/w20/mz.png",name:"Mozambique"},{code:"+95",countryCode:"MM",flag:"https://flagcdn.com/w20/mm.png",name:"Myanmar"},{code:"+264",countryCode:"NA",flag:"https://flagcdn.com/w20/na.png",name:"Namibia"},{code:"+674",countryCode:"NR",flag:"https://flagcdn.com/w20/nr.png",name:"Nauru"},{code:"+977",countryCode:"NP",flag:"https://flagcdn.com/w20/np.png",name:"Nepal"},{code:"+31",countryCode:"NL",flag:"https://flagcdn.com/w20/nl.png",name:"Netherlands"},{code:"+64",countryCode:"NZ",flag:"https://flagcdn.com/w20/nz.png",name:"New Zealand"},{code:"+505",countryCode:"NI",flag:"https://flagcdn.com/w20/ni.png",name:"Nicaragua"},{code:"+227",countryCode:"NE",flag:"https://flagcdn.com/w20/ne.png",name:"Niger"},{code:"+234",countryCode:"NG",flag:"https://flagcdn.com/w20/ng.png",name:"Nigeria"},{code:"+47",countryCode:"NO",flag:"https://flagcdn.com/w20/no.png",name:"Norway"},{code:"+968",countryCode:"OM",flag:"https://flagcdn.com/w20/om.png",name:"Oman"},{code:"+92",countryCode:"PK",flag:"https://flagcdn.com/w20/pk.png",name:"Pakistan"},{code:"+680",countryCode:"PW",flag:"https://flagcdn.com/w20/pw.png",name:"Palau"},{code:"+507",countryCode:"PA",flag:"https://flagcdn.com/w20/pa.png",name:"Panama"},{code:"+675",countryCode:"PG",flag:"https://flagcdn.com/w20/pg.png",name:"Papua New Guinea"},{code:"+595",countryCode:"PY",flag:"https://flagcdn.com/w20/py.png",name:"Paraguay"},{code:"+51",countryCode:"PE",flag:"https://flagcdn.com/w20/pe.png",name:"Peru"},{code:"+63",countryCode:"PH",flag:"https://flagcdn.com/w20/ph.png",name:"Philippines"},{code:"+48",countryCode:"PL",flag:"https://flagcdn.com/w20/pl.png",name:"Poland"},{code:"+351",countryCode:"PT",flag:"https://flagcdn.com/w20/pt.png",name:"Portugal"},{code:"+974",countryCode:"QA",flag:"https://flagcdn.com/w20/qa.png",name:"Qatar"},{code:"+40",countryCode:"RO",flag:"https://flagcdn.com/w20/ro.png",name:"Romania"},{code:"+7",countryCode:"RU",flag:"https://flagcdn.com/w20/ru.png",name:"Russia"},{code:"+250",countryCode:"RW",flag:"https://flagcdn.com/w20/rw.png",name:"Rwanda"},{code:"+966",countryCode:"SA",flag:"https://flagcdn.com/w20/sa.png",name:"Saudi Arabia"},{code:"+221",countryCode:"SN",flag:"https://flagcdn.com/w20/sn.png",name:"Senegal"},{code:"+381",countryCode:"RS",flag:"https://flagcdn.com/w20/rs.png",name:"Serbia"},{code:"+248",countryCode:"SC",flag:"https://flagcdn.com/w20/sc.png",name:"Seychelles"},{code:"+232",countryCode:"SL",flag:"https://flagcdn.com/w20/sl.png",name:"Sierra Leone"},{code:"+65",countryCode:"SG",flag:"https://flagcdn.com/w20/sg.png",name:"Singapore"},{code:"+421",countryCode:"SK",flag:"https://flagcdn.com/w20/sk.png",name:"Slovakia"},{code:"+386",countryCode:"SI",flag:"https://flagcdn.com/w20/si.png",name:"Slovenia"},{code:"+677",countryCode:"SB",flag:"https://flagcdn.com/w20/sb.png",name:"Solomon Islands"},{code:"+252",countryCode:"SO",flag:"https://flagcdn.com/w20/so.png",name:"Somalia"},{code:"+27",countryCode:"ZA",flag:"https://flagcdn.com/w20/za.png",name:"South Africa"},{code:"+82",countryCode:"KR",flag:"https://flagcdn.com/w20/kr.png",name:"South Korea"},{code:"+211",countryCode:"SS",flag:"https://flagcdn.com/w20/ss.png",name:"South Sudan"},{code:"+34",countryCode:"ES",flag:"https://flagcdn.com/w20/es.png",name:"Spain"},{code:"+94",countryCode:"LK",flag:"https://flagcdn.com/w20/lk.png",name:"Sri Lanka"},{code:"+249",countryCode:"SD",flag:"https://flagcdn.com/w20/sd.png",name:"Sudan"},{code:"+597",countryCode:"SR",flag:"https://flagcdn.com/w20/sr.png",name:"Suriname"},{code:"+268",countryCode:"SZ",flag:"https://flagcdn.com/w20/sz.png",name:"Eswatini"},{code:"+46",countryCode:"SE",flag:"https://flagcdn.com/w20/se.png",name:"Sweden"},{code:"+41",countryCode:"CH",flag:"https://flagcdn.com/w20/ch.png",name:"Switzerland"},{code:"+963",countryCode:"SY",flag:"https://flagcdn.com/w20/sy.png",name:"Syria"},{code:"+886",countryCode:"TW",flag:"https://flagcdn.com/w20/tw.png",name:"Taiwan"},{code:"+992",countryCode:"TJ",flag:"https://flagcdn.com/w20/tj.png",name:"Tajikistan"},{code:"+255",countryCode:"TZ",flag:"https://flagcdn.com/w20/tz.png",name:"Tanzania"},{code:"+66",countryCode:"TH",flag:"https://flagcdn.com/w20/th.png",name:"Thailand"},{code:"+228",countryCode:"TG",flag:"https://flagcdn.com/w20/tg.png",name:"Togo"},{code:"+676",countryCode:"TO",flag:"https://flagcdn.com/w20/to.png",name:"Tonga"},{code:"+216",countryCode:"TN",flag:"https://flagcdn.com/w20/tn.png",name:"Tunisia"},{code:"+90",countryCode:"TR",flag:"https://flagcdn.com/w20/tr.png",name:"Turkey"},{code:"+993",countryCode:"TM",flag:"https://flagcdn.com/w20/tm.png",name:"Turkmenistan"},{code:"+688",countryCode:"TV",flag:"https://flagcdn.com/w20/tv.png",name:"Tuvalu"},{code:"+256",countryCode:"UG",flag:"https://flagcdn.com/w20/ug.png",name:"Uganda"},{code:"+380",countryCode:"UA",flag:"https://flagcdn.com/w20/ua.png",name:"Ukraine"},{code:"+971",countryCode:"AE",flag:"https://flagcdn.com/w20/ae.png",name:"United Arab Emirates"},{code:"+44",countryCode:"GB",flag:"https://flagcdn.com/w20/gb.png",name:"United Kingdom"},{code:"+1",countryCode:"US",flag:"https://flagcdn.com/w20/us.png",name:"United States"},{code:"+598",countryCode:"UY",flag:"https://flagcdn.com/w20/uy.png",name:"Uruguay"},{code:"+998",countryCode:"UZ",flag:"https://flagcdn.com/w20/uz.png",name:"Uzbekistan"},{code:"+678",countryCode:"VU",flag:"https://flagcdn.com/w20/vu.png",name:"Vanuatu"},{code:"+58",countryCode:"VE",flag:"https://flagcdn.com/w20/ve.png",name:"Venezuela"},{code:"+84",countryCode:"VN",flag:"https://flagcdn.com/w20/vn.png",name:"Vietnam"},{code:"+967",countryCode:"YE",flag:"https://flagcdn.com/w20/ye.png",name:"Yemen"},{code:"+260",countryCode:"ZM",flag:"https://flagcdn.com/w20/zm.png",name:"Zambia"},{code:"+263",countryCode:"ZW",flag:"https://flagcdn.com/w20/zw.png",name:"Zimbabwe"}],r=p.find(e=>"Angola"===e.name)??{code:"+244",countryCode:"AO",flag:"https://flagcdn.com/w20/ao.png",name:"Angola"};function f({countries:e=p,defaultCountry:n="+244",phonePlaceholder:o="9487486537 *",searchPlaceholder:f="Angola",showIcons:s=!0,onChange:u,onCountryChange:h,handleChangeCountry:C,value:y,countryCode:i,className:w="",defaultPlaceholder:b,noCountriesMessage:E="No countries found",phoneError:S,error:M,disabled:N=!1,onKeyDown:v}){const{selectedCountry:A,searchQuery:B,dropdownOpen:k,filteredCountries:x,setDropdownOpen:T,handleCountryChange:G,handleSearchChange:I,inputRef:L,setSelectedCountry:R}=function({countries:e=p,defaultCountry:n="+244",defaultInputType:o="phone",onChange:a,onCountryChange:c,countryCode:d}={}){const g=(0,t.useRef)(null),l=n&&e.find(e=>e.code===n)||r,[m,f]=(0,t.useState)(l),[s,u]=(0,t.useState)(""),[h,C]=(0,t.useState)(""),[y,i]=(0,t.useState)(!1),w=h?e.filter(e=>e.name.toLowerCase().includes(h.toLowerCase())||e.code.includes(h)):e;return(0,t.useEffect)(()=>{y||C("")},[y]),(0,t.useEffect)(()=>{const e=g.current;if(e&&s){const n=s.replace(m.code,"");setTimeout(()=>{e.setSelectionRange(n.length,n.length)},0)}},[s,m]),(0,t.useEffect)(()=>{if(d){const n=e.find(e=>e.code===d);if(n&&n.code!==m.code){const e=s.replace(m.code,""),o=n.code+e;f(n),u(o),a&&a(o,"phone"),c&&c(n)}}},[d,e,c,a,m.code,s]),{selectedCountry:m,inputValue:s,searchQuery:h,dropdownOpen:y,filteredCountries:w,setDropdownOpen:i,handleInputChange:e=>{const n=e.replace(/[^0-9]/g,""),o=m.code+n;u(o),a&&a(o,"phone")},handleCountryChange:e=>{f(e),i(!1),C("");const n=s.replace(m.code,""),o=e.code+n;u(o),a&&a(o,"phone"),c&&c(e)},handleSearchChange:e=>{C(e.target.value)},inputRef:g,setSelectedCountry:f}}({countries:e,defaultCountry:n,defaultInputType:"phone",onChange:u,onCountryChange:h,countryCode:i}),[z,K]=(0,t.useState)(void 0),[P,D]=(0,t.useState)(""),O=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(y){let n=y;e.forEach(e=>{n.startsWith(e.code)&&(n=n.slice(e.code.length))}),D(n)}else D("")},[y,e]),(0,t.useEffect)(()=>{if(!A?.code){const n=e.find(e=>"+244"===e.code)||r;R(n),C?.(n.code),u&&!y&&u(n.code)}},[]),t.createElement("div",{className:"max-w-md w-full",ref:O},t.createElement("div",{className:(0,m.cn)("flex items-center w-full gap-2 relative","border border-input rounded-lg",M||S||z?"border-red-500 focus-within:!border-red-500 focus-within:!ring-red-500 focus-within:!ring-[1px]":"focus-within:border-[#0B89CE] focus-within:ring-[1px] focus-within:ring-[#0B89CE]",N&&"opacity-50 cursor-not-allowed pointer-events-none",w)},t.createElement(l.AM,{open:k,onOpenChange:T,modal:!0},t.createElement(l.Wv,{asChild:!0},t.createElement(d.$,{variant:"ghost",className:"cursor-pointer hover:bg-transparent px-3",disabled:N},t.createElement("img",{src:A.flag,alt:A.code,className:"w-5 h-5"}),t.createElement("span",{className:"mx-1"},A.code),t.createElement(a.A,{className:"w-4 h-4 text-gray-500"}))),t.createElement(l.hl,{side:"bottom",align:"start",sideOffset:5,className:"!bg-white min-w-[220px] max-h-[320px] overflow-hidden overscroll-contain p-0 z-[10000]",style:{zIndex:1e4,position:"fixed"},onOpenAutoFocus:e=>e.preventDefault()},t.createElement("div",{className:"p-2 sticky top-0 bg-white z-10 border-b"},t.createElement("div",{className:"relative"},t.createElement(c,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),t.createElement(g.p,{placeholder:f,value:B,onChange:I,className:"pl-8 h-9",disabled:N}))),t.createElement("div",{className:"max-h-[250px] overflow-y-auto py-1"},x.length>0?x.map(e=>t.createElement("div",{key:`${e.code}-${e.name}`,onClick:()=>(e=>{G(e),C?.(e.code);const n=e.code+P;u?.(n),T(!1)})(e),className:"flex items-center gap-2 cursor-pointer px-2 py-1.5 text-sm hover:bg-gray-100"},t.createElement("img",{src:e.flag,alt:e.name,className:"w-5 h-5"}),t.createElement("span",null,e.name),t.createElement("span",{className:"ml-auto text-gray-500"},e.code))):t.createElement("div",{className:"px-2 py-4 text-center text-sm text-gray-500"},E)))),t.createElement("div",{className:"relative flex-1"},t.createElement(g.p,{type:"tel",value:P,ref:L,onChange:e=>(e=>{const n=e.replace(/[^0-9\s()-]/g,"");K(e!==n?"Only numbers are allowed":void 0),D(n);const o=A.code+n;u?.(o)})(e.target.value),onKeyDown:v,placeholder:b?.length?b:o,className:(0,m.cn)("w-full px-3 text-sm placeholder:text-sm text-dark-1 placeholder:text-gray-shade7 bg-white","border-none shadow-none outline-none",w),disabled:N}))),(M||S||z)&&t.createElement("div",{className:"text-red-500 text-sm mt-1"},z||S||M))}}}]);
|
|
3
|
-
//# sourceMappingURL=310.bundle.js.map
|