react-french-ssn 1.3.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 +192 -0
- package/dist/components/SocialSecurityInput/SocialSecurityInput.d.ts +5 -0
- package/dist/components/SocialSecurityInput/SocialSecurityInput.d.ts.map +1 -0
- package/dist/components/SocialSecurityInput/index.d.ts +2 -0
- package/dist/components/SocialSecurityInput/index.d.ts.map +1 -0
- package/dist/components/SocialSecurityInput/useSocialSecurityInput.d.ts +56 -0
- package/dist/components/SocialSecurityInput/useSocialSecurityInput.d.ts.map +1 -0
- package/dist/components/ThemeProvider.d.ts +9 -0
- package/dist/components/ThemeProvider.d.ts.map +1 -0
- package/dist/config/index.d.ts +83 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/decorators/withTheme.d.ts +8 -0
- package/dist/decorators/withTheme.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +520 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +529 -0
- package/dist/index.js.map +1 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.d.ts.map +1 -0
- package/dist/types/index.d.ts +39 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/cssVariables.d.ts +3 -0
- package/dist/utils/cssVariables.d.ts.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +101 -0
package/dist/index.js
ADDED
@@ -0,0 +1,529 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
4
|
+
var react = require('react');
|
5
|
+
|
6
|
+
function styleInject(css, ref) {
|
7
|
+
if ( ref === void 0 ) ref = {};
|
8
|
+
var insertAt = ref.insertAt;
|
9
|
+
|
10
|
+
if (!css || typeof document === 'undefined') { return; }
|
11
|
+
|
12
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
13
|
+
var style = document.createElement('style');
|
14
|
+
style.type = 'text/css';
|
15
|
+
|
16
|
+
if (insertAt === 'top') {
|
17
|
+
if (head.firstChild) {
|
18
|
+
head.insertBefore(style, head.firstChild);
|
19
|
+
} else {
|
20
|
+
head.appendChild(style);
|
21
|
+
}
|
22
|
+
} else {
|
23
|
+
head.appendChild(style);
|
24
|
+
}
|
25
|
+
|
26
|
+
if (style.styleSheet) {
|
27
|
+
style.styleSheet.cssText = css;
|
28
|
+
} else {
|
29
|
+
style.appendChild(document.createTextNode(css));
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
var css_248z$1 = "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Poppins:wght@400;500;600;700&family=Open+Sans:wght@400;500;700&family=Montserrat:wght@400;500;600;700&family=Lato:wght@400;500;700&family=Nunito:wght@400;500;600;700&family=Source+Sans+Pro:wght@400;500;700&display=swap\");:root{--ui-color-primary:#3b82f6;--ui-color-primary-dark:#2563eb;--ui-color-secondary:#64748b;--ui-color-background:#fff;--ui-color-surface:#f8fafc;--ui-color-text-primary:#1e293b;--ui-color-text-secondary:#64748b;--ui-color-text-disabled:#94a3b8;--ui-color-border-default:#e2e8f0;--ui-color-border-focus:#3b82f6;--ui-color-error:#ef4444;--ui-color-success:#10b981;--ui-color-warning:#f59e0b;--ui-color-gray-300:#d1d5db;--ui-spacing-xs:0.25rem;--ui-spacing-sm:0.5rem;--ui-spacing-md:1rem;--ui-spacing-lg:1.5rem;--ui-spacing-xl:2rem;--ui-font-family:\"Inter\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Roboto\",\"Oxygen\",\"Ubuntu\",\"Cantarell\",\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",sans-serif;--ui-font-size-xs:0.75rem;--ui-font-size-sm:0.875rem;--ui-font-size-md:1rem;--ui-font-size-lg:1.125rem;--ui-font-size-xl:1.25rem;--ui-font-weight-normal:400;--ui-font-weight-medium:500;--ui-font-weight-semibold:600;--ui-font-weight-bold:700;--ui-border-radius-sm:0.25rem;--ui-border-radius-md:0.375rem;--ui-border-radius-lg:0.5rem;--ui-border-radius-xl:0.75rem;--ui-shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--ui-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--ui-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)}@media (prefers-color-scheme:dark){:root{--ui-color-background:#0f172a;--ui-color-surface:#1e293b;--ui-color-text-primary:#f1f5f9;--ui-color-text-secondary:#cbd5e1;--ui-color-text-disabled:#64748b;--ui-color-border-default:#334155;--ui-color-border-focus:#3b82f6}}";
|
34
|
+
styleInject(css_248z$1);
|
35
|
+
|
36
|
+
const useSocialSecurityInput = ({ onChange, placeholder = '269054958815780', value }) => {
|
37
|
+
const [state, setState] = react.useState({
|
38
|
+
sex: '',
|
39
|
+
year: '',
|
40
|
+
month: '',
|
41
|
+
department: '',
|
42
|
+
insee: '',
|
43
|
+
order: '',
|
44
|
+
controlKey: '',
|
45
|
+
error: '',
|
46
|
+
});
|
47
|
+
const calculateControlKey = (nir) => {
|
48
|
+
if (nir.length !== 13)
|
49
|
+
return '';
|
50
|
+
let nirForCalculation = nir;
|
51
|
+
if (nirForCalculation.includes('2A')) {
|
52
|
+
nirForCalculation = nirForCalculation.replace('2A', '19');
|
53
|
+
}
|
54
|
+
if (nirForCalculation.includes('2B')) {
|
55
|
+
nirForCalculation = nirForCalculation.replace('2B', '20');
|
56
|
+
}
|
57
|
+
let remainder = 0;
|
58
|
+
for (let i = 0; i < nirForCalculation.length; i++) {
|
59
|
+
remainder = (remainder * 10 + parseInt(nirForCalculation[i], 10)) % 97;
|
60
|
+
}
|
61
|
+
const controlKey = 97 - remainder;
|
62
|
+
return controlKey.toString().padStart(2, '0');
|
63
|
+
};
|
64
|
+
const updateControlKey = react.useCallback(() => {
|
65
|
+
const nir = state.sex + state.year + state.month + state.department + state.insee + state.order;
|
66
|
+
const key = calculateControlKey(nir);
|
67
|
+
setState(prev => ({ ...prev, controlKey: key }));
|
68
|
+
if (nir.length === 13 && key) {
|
69
|
+
const fullNir = nir + key;
|
70
|
+
onChange?.(fullNir);
|
71
|
+
}
|
72
|
+
}, [state.sex, state.year, state.month, state.department, state.insee, state.order, onChange]);
|
73
|
+
react.useEffect(() => {
|
74
|
+
updateControlKey();
|
75
|
+
}, [state.sex, state.year, state.month, state.department, state.insee, state.order, updateControlKey]);
|
76
|
+
const updateField = (field, value) => {
|
77
|
+
setState(prev => ({ ...prev, [field]: value, error: '' }));
|
78
|
+
};
|
79
|
+
const parsePlaceholder = (placeholder) => {
|
80
|
+
const cleaned = placeholder.replace(/\D/g, '');
|
81
|
+
if (cleaned.length >= 15) {
|
82
|
+
return {
|
83
|
+
sex: cleaned.substring(0, 1),
|
84
|
+
year: cleaned.substring(1, 3),
|
85
|
+
month: cleaned.substring(3, 5),
|
86
|
+
department: cleaned.substring(5, 7),
|
87
|
+
insee: cleaned.substring(7, 10),
|
88
|
+
order: cleaned.substring(10, 13),
|
89
|
+
controlKey: cleaned.substring(13, 15),
|
90
|
+
};
|
91
|
+
}
|
92
|
+
return {
|
93
|
+
sex: '2',
|
94
|
+
year: '69',
|
95
|
+
month: '05',
|
96
|
+
department: '49',
|
97
|
+
insee: '588',
|
98
|
+
order: '157',
|
99
|
+
controlKey: '80',
|
100
|
+
};
|
101
|
+
};
|
102
|
+
const placeholders = parsePlaceholder(placeholder);
|
103
|
+
const parseValue = (value) => {
|
104
|
+
const cleaned = value.replace(/\D/g, '');
|
105
|
+
if (cleaned.length === 15) {
|
106
|
+
return {
|
107
|
+
sex: cleaned.substring(0, 1),
|
108
|
+
year: cleaned.substring(1, 3),
|
109
|
+
month: cleaned.substring(3, 5),
|
110
|
+
department: cleaned.substring(5, 7),
|
111
|
+
insee: cleaned.substring(7, 10),
|
112
|
+
order: cleaned.substring(10, 13),
|
113
|
+
controlKey: cleaned.substring(13, 15),
|
114
|
+
};
|
115
|
+
}
|
116
|
+
return null;
|
117
|
+
};
|
118
|
+
react.useEffect(() => {
|
119
|
+
if (value) {
|
120
|
+
const parsed = parseValue(value);
|
121
|
+
if (parsed) {
|
122
|
+
setState(prev => ({ ...prev, ...parsed, error: '' }));
|
123
|
+
}
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
setState(prev => ({
|
127
|
+
...prev,
|
128
|
+
sex: '',
|
129
|
+
year: '',
|
130
|
+
month: '',
|
131
|
+
department: '',
|
132
|
+
insee: '',
|
133
|
+
order: '',
|
134
|
+
controlKey: '',
|
135
|
+
error: '',
|
136
|
+
}));
|
137
|
+
}
|
138
|
+
}, [value]);
|
139
|
+
const parseSocialSecurityNumber = (fullNumber) => {
|
140
|
+
const cleaned = fullNumber.replace(/\D/g, '');
|
141
|
+
if (cleaned.length === 15) {
|
142
|
+
const parsed = {
|
143
|
+
sex: cleaned.substring(0, 1),
|
144
|
+
year: cleaned.substring(1, 3),
|
145
|
+
month: cleaned.substring(3, 5),
|
146
|
+
department: cleaned.substring(5, 7),
|
147
|
+
insee: cleaned.substring(7, 10),
|
148
|
+
order: cleaned.substring(10, 13),
|
149
|
+
controlKey: cleaned.substring(13, 15),
|
150
|
+
};
|
151
|
+
const nir = parsed.sex + parsed.year + parsed.month + parsed.department + parsed.insee + parsed.order;
|
152
|
+
const calculatedKey = calculateControlKey(nir);
|
153
|
+
if (calculatedKey === parsed.controlKey) {
|
154
|
+
setState(prev => ({ ...prev, ...parsed, error: '' }));
|
155
|
+
onChange?.(cleaned);
|
156
|
+
}
|
157
|
+
else {
|
158
|
+
setState(prev => ({
|
159
|
+
...prev,
|
160
|
+
...parsed,
|
161
|
+
error: 'Clé de contrôle incorrecte. La clé calculée est ' + calculatedKey + ' mais vous avez saisi ' + parsed.controlKey
|
162
|
+
}));
|
163
|
+
}
|
164
|
+
}
|
165
|
+
else {
|
166
|
+
setState(prev => ({ ...prev, error: 'Le numéro de sécurité sociale doit contenir exactement 15 chiffres' }));
|
167
|
+
}
|
168
|
+
};
|
169
|
+
const handlers = {
|
170
|
+
sex: {
|
171
|
+
onChange: (e) => {
|
172
|
+
const inputValue = e.target.value;
|
173
|
+
if (inputValue === '' || inputValue === '1' || inputValue === '2') {
|
174
|
+
updateField('sex', inputValue);
|
175
|
+
if (inputValue === '1' || inputValue === '2') {
|
176
|
+
const nextInput = e.target.parentElement?.querySelector('input:nth-child(2)');
|
177
|
+
nextInput?.focus();
|
178
|
+
}
|
179
|
+
}
|
180
|
+
},
|
181
|
+
onPaste: (e) => {
|
182
|
+
const pastedText = e.clipboardData.getData('text');
|
183
|
+
const cleaned = pastedText.replace(/\D/g, '');
|
184
|
+
if (cleaned.length === 15) {
|
185
|
+
e.preventDefault();
|
186
|
+
parseSocialSecurityNumber(pastedText);
|
187
|
+
}
|
188
|
+
// Sinon, laisser le comportement par défaut (pas de preventDefault)
|
189
|
+
},
|
190
|
+
},
|
191
|
+
year: {
|
192
|
+
onChange: (e) => {
|
193
|
+
const inputValue = e.target.value;
|
194
|
+
const cleaned = inputValue.replace(/\D/g, '');
|
195
|
+
if (cleaned.length <= 2) {
|
196
|
+
updateField('year', cleaned);
|
197
|
+
if (cleaned.length === 2) {
|
198
|
+
const nextInput = e.target.parentElement?.querySelector('input:nth-child(3)');
|
199
|
+
nextInput?.focus();
|
200
|
+
}
|
201
|
+
}
|
202
|
+
},
|
203
|
+
onKeyDown: (e) => {
|
204
|
+
if (e.key === 'Backspace' && e.currentTarget.value === '') {
|
205
|
+
const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(1)');
|
206
|
+
prevInput?.focus();
|
207
|
+
}
|
208
|
+
},
|
209
|
+
},
|
210
|
+
month: {
|
211
|
+
onChange: (e) => {
|
212
|
+
const inputValue = e.target.value;
|
213
|
+
const cleaned = inputValue.replace(/\D/g, '');
|
214
|
+
if (cleaned.length <= 2) {
|
215
|
+
updateField('month', cleaned);
|
216
|
+
if (cleaned.length === 2 && cleaned >= '01' && cleaned <= '12') {
|
217
|
+
const nextInput = e.target.parentElement?.querySelector('input:nth-child(4)');
|
218
|
+
nextInput?.focus();
|
219
|
+
}
|
220
|
+
}
|
221
|
+
},
|
222
|
+
onKeyDown: (e) => {
|
223
|
+
if (e.key === 'Backspace' && e.currentTarget.value === '') {
|
224
|
+
const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(2)');
|
225
|
+
prevInput?.focus();
|
226
|
+
}
|
227
|
+
},
|
228
|
+
},
|
229
|
+
department: {
|
230
|
+
onChange: (e) => {
|
231
|
+
const inputValue = e.target.value.toUpperCase();
|
232
|
+
const cleaned = inputValue.replace(/[^0-9AB]/g, '');
|
233
|
+
if (cleaned.length <= 2) {
|
234
|
+
updateField('department', cleaned);
|
235
|
+
if (cleaned.length === 2 && ((cleaned >= '01' && cleaned <= '95') ||
|
236
|
+
cleaned === '2A' ||
|
237
|
+
cleaned === '2B' ||
|
238
|
+
cleaned === '99')) {
|
239
|
+
const nextInput = e.target.parentElement?.querySelector('input:nth-child(5)');
|
240
|
+
nextInput?.focus();
|
241
|
+
}
|
242
|
+
}
|
243
|
+
},
|
244
|
+
onKeyDown: (e) => {
|
245
|
+
if (e.key === 'Backspace' && e.currentTarget.value === '') {
|
246
|
+
const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(3)');
|
247
|
+
prevInput?.focus();
|
248
|
+
}
|
249
|
+
},
|
250
|
+
},
|
251
|
+
insee: {
|
252
|
+
onChange: (e) => {
|
253
|
+
const inputValue = e.target.value;
|
254
|
+
const cleaned = inputValue.replace(/\D/g, '');
|
255
|
+
if (cleaned.length <= 3) {
|
256
|
+
updateField('insee', cleaned);
|
257
|
+
if (cleaned.length === 3) {
|
258
|
+
const nextInput = e.target.parentElement?.querySelector('input:nth-child(6)');
|
259
|
+
nextInput?.focus();
|
260
|
+
}
|
261
|
+
}
|
262
|
+
},
|
263
|
+
onKeyDown: (e) => {
|
264
|
+
if (e.key === 'Backspace' && e.currentTarget.value === '') {
|
265
|
+
const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(4)');
|
266
|
+
prevInput?.focus();
|
267
|
+
}
|
268
|
+
},
|
269
|
+
},
|
270
|
+
order: {
|
271
|
+
onChange: (e) => {
|
272
|
+
const inputValue = e.target.value;
|
273
|
+
const cleaned = inputValue.replace(/\D/g, '');
|
274
|
+
if (cleaned.length <= 3) {
|
275
|
+
updateField('order', cleaned);
|
276
|
+
}
|
277
|
+
},
|
278
|
+
onKeyDown: (e) => {
|
279
|
+
if (e.key === 'Backspace' && e.currentTarget.value === '') {
|
280
|
+
const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(5)');
|
281
|
+
prevInput?.focus();
|
282
|
+
}
|
283
|
+
},
|
284
|
+
},
|
285
|
+
};
|
286
|
+
return {
|
287
|
+
values: state,
|
288
|
+
handlers,
|
289
|
+
parseSocialSecurityNumber,
|
290
|
+
placeholders,
|
291
|
+
};
|
292
|
+
};
|
293
|
+
|
294
|
+
var css_248z = ".SocialSecurityInput-module__inputContainer___Og6B7{width:100%}.SocialSecurityInput-module__inputsRow___zwkoW{align-items:center;display:flex;gap:var(--ui-spacing-xs);width:100%}.SocialSecurityInput-module__inputLabel___4Agoh{color:var(--ui-color-text-secondary);display:block;margin-bottom:var(--ui-spacing-xs)}.SocialSecurityInput-module__inputLabel___4Agoh,.SocialSecurityInput-module__input___NmvkG{font-family:var(--ui-font-family);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-weight-medium)}.SocialSecurityInput-module__input___NmvkG{background-color:var(--ui-color-background);border:1px solid var(--ui-color-border-default);border-radius:var(--ui-border-radius-md);box-shadow:var(--ui-shadow-sm);color:var(--ui-color-text-primary);line-height:1.5;padding:var(--ui-spacing-sm);text-align:center;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.SocialSecurityInput-module__input___NmvkG:first-child{width:.5rem}.SocialSecurityInput-module__input___NmvkG:nth-child(2),.SocialSecurityInput-module__input___NmvkG:nth-child(3),.SocialSecurityInput-module__input___NmvkG:nth-child(4){width:1.25rem}.SocialSecurityInput-module__input___NmvkG:nth-child(5),.SocialSecurityInput-module__input___NmvkG:nth-child(6){width:1.75rem}.SocialSecurityInput-module__input___NmvkG:nth-child(7){width:1.25rem}.SocialSecurityInput-module__input___NmvkG::placeholder{color:var(--ui-color-text-disabled);font-size:var(--ui-font-size-xs)}.SocialSecurityInput-module__input___NmvkG:focus{border-color:var(--ui-color-border-focus);box-shadow:0 0 0 3px rgba(59,130,246,.1);outline:none}.SocialSecurityInput-module__input___NmvkG:disabled{background-color:var(--ui-color-surface);color:var(--ui-color-text-disabled);cursor:not-allowed}.SocialSecurityInput-module__input--error___9tEpq{border-color:var(--ui-color-error)}.SocialSecurityInput-module__input--error___9tEpq:focus{border-color:var(--ui-color-error);box-shadow:0 0 0 3px rgba(239,68,68,.1)}.SocialSecurityInput-module__inputError___TymBP{color:var(--ui-color-error);font-family:var(--ui-font-family);font-size:var(--ui-font-size-sm);margin-top:var(--ui-spacing-xs)}.SocialSecurityInput-module__copyButton___Cx1bs{align-items:center;background-color:inherit;border:none;cursor:pointer;display:flex;font-size:16px;height:40px;justify-content:center;margin-left:var(--ui-spacing-xs);padding:0;transition:background-color .2s ease;width:40px}.SocialSecurityInput-module__copyButton___Cx1bs svg{fill:var(--ui-color-border-default)}.SocialSecurityInput-module__copyButton___Cx1bs:hover:not(:disabled){background:var(--ui-color-primary-dark)}.SocialSecurityInput-module__copyButton___Cx1bs:disabled{background:var(--ui-color-gray-300);cursor:not-allowed;opacity:.6}.SocialSecurityInput-module__copyButton___Cx1bs.SocialSecurityInput-module__copied___23tm0{animation:SocialSecurityInput-module__copySuccess___aC-bf .3s ease-in-out}@keyframes SocialSecurityInput-module__copySuccess___aC-bf{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}";
|
295
|
+
var styles = {"inputContainer":"SocialSecurityInput-module__inputContainer___Og6B7","inputsRow":"SocialSecurityInput-module__inputsRow___zwkoW","inputLabel":"SocialSecurityInput-module__inputLabel___4Agoh","input":"SocialSecurityInput-module__input___NmvkG","inputError":"SocialSecurityInput-module__inputError___TymBP","copyButton":"SocialSecurityInput-module__copyButton___Cx1bs","copied":"SocialSecurityInput-module__copied___23tm0"};
|
296
|
+
styleInject(css_248z);
|
297
|
+
|
298
|
+
const SocialSecurityInput = ({ label = 'Numéro de sécurité sociale', placeholder = '269054958815780', value, onChange, error, disabled = false, className, showCopyButton = false, }) => {
|
299
|
+
const { values, handlers, placeholders } = useSocialSecurityInput({
|
300
|
+
onChange,
|
301
|
+
placeholder,
|
302
|
+
value,
|
303
|
+
});
|
304
|
+
const [copied, setCopied] = react.useState(false);
|
305
|
+
const handleCopy = async () => {
|
306
|
+
const fullNumber = values.sex +
|
307
|
+
values.year +
|
308
|
+
values.month +
|
309
|
+
values.department +
|
310
|
+
values.insee +
|
311
|
+
values.order +
|
312
|
+
values.controlKey;
|
313
|
+
if (fullNumber.length === 15) {
|
314
|
+
try {
|
315
|
+
await navigator.clipboard.writeText(fullNumber);
|
316
|
+
setCopied(true);
|
317
|
+
setTimeout(() => setCopied(false), 2000);
|
318
|
+
}
|
319
|
+
catch (err) {
|
320
|
+
console.error('Failed to copy:', err);
|
321
|
+
}
|
322
|
+
}
|
323
|
+
};
|
324
|
+
return (jsxRuntime.jsxs("div", { className: `${styles.inputContainer} ${className}`, children: [label && jsxRuntime.jsx("label", { className: styles.inputLabel, children: label }), jsxRuntime.jsxs("div", { className: styles.inputsRow, children: [jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.sex, minLength: 1, maxLength: 1, disabled: disabled, onChange: handlers.sex.onChange, onPaste: handlers.sex.onPaste, value: values.sex }), jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.year, minLength: 2, maxLength: 2, disabled: disabled, onChange: handlers.year.onChange, onKeyDown: handlers.year.onKeyDown, value: values.year }), jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.month, minLength: 2, maxLength: 2, disabled: disabled, onChange: handlers.month.onChange, onKeyDown: handlers.month.onKeyDown, value: values.month }), jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.department, minLength: 2, maxLength: 2, disabled: disabled, onChange: handlers.department.onChange, onKeyDown: handlers.department.onKeyDown, value: values.department }), jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.insee, minLength: 3, maxLength: 3, disabled: disabled, onChange: handlers.insee.onChange, onKeyDown: handlers.insee.onKeyDown, value: values.insee }), jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.order, minLength: 3, maxLength: 3, disabled: disabled, onChange: handlers.order.onChange, onKeyDown: handlers.order.onKeyDown, value: values.order }), jsxRuntime.jsx("input", { type: "text", className: styles.input, placeholder: placeholders.controlKey, minLength: 2, maxLength: 2, disabled: true, value: values.controlKey, readOnly: true }), showCopyButton && (jsxRuntime.jsx("button", { type: "button", className: `${styles.copyButton} ${copied ? styles.copied : ''}`, onClick: handleCopy, disabled: disabled ||
|
325
|
+
(values.sex +
|
326
|
+
values.year +
|
327
|
+
values.month +
|
328
|
+
values.department +
|
329
|
+
values.insee +
|
330
|
+
values.order +
|
331
|
+
values.controlKey).length !== 15, title: copied ? "Copié !" : "Copier le numéro de sécurité sociale", children: copied ? (jsxRuntime.jsx("svg", { height: "24px", width: "24px", viewBox: "0 -960 960 960", fill: "white", children: jsxRuntime.jsx("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" }) })) : (jsxRuntime.jsx("svg", { height: "24px", width: "24px", viewBox: "0 -960 960 960", fill: "white", children: jsxRuntime.jsx("path", { d: "M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z" }) })) }))] }), error && jsxRuntime.jsx("p", { className: styles.inputError, children: error }), values.error && jsxRuntime.jsx("p", { className: styles.inputError, children: values.error })] }));
|
332
|
+
};
|
333
|
+
|
334
|
+
const defaultTheme = {
|
335
|
+
colors: {
|
336
|
+
primary: '#F17F29',
|
337
|
+
secondary: '#4b5563',
|
338
|
+
success: '#10b981',
|
339
|
+
warning: '#f59e0b',
|
340
|
+
error: '#ef4444',
|
341
|
+
info: '#3b82f6',
|
342
|
+
background: '#ffffff',
|
343
|
+
surface: '#f9fafb',
|
344
|
+
text: {
|
345
|
+
primary: '#111827',
|
346
|
+
secondary: '#6b7280',
|
347
|
+
disabled: '#9ca3af',
|
348
|
+
},
|
349
|
+
border: {
|
350
|
+
default: '#d1d5db',
|
351
|
+
focus: '#3b82f6',
|
352
|
+
error: '#ef4444',
|
353
|
+
},
|
354
|
+
},
|
355
|
+
spacing: {
|
356
|
+
xs: '4px',
|
357
|
+
sm: '8px',
|
358
|
+
md: '16px',
|
359
|
+
lg: '24px',
|
360
|
+
xl: '32px',
|
361
|
+
},
|
362
|
+
typography: {
|
363
|
+
fontFamily: "'Inter', 'Roboto', system-ui, -apple-system, sans-serif",
|
364
|
+
fontSize: {
|
365
|
+
xs: '12px',
|
366
|
+
sm: '14px',
|
367
|
+
base: '16px',
|
368
|
+
lg: '18px',
|
369
|
+
xl: '20px',
|
370
|
+
},
|
371
|
+
fontWeight: {
|
372
|
+
normal: 400,
|
373
|
+
medium: 500,
|
374
|
+
semibold: 600,
|
375
|
+
bold: 700,
|
376
|
+
},
|
377
|
+
},
|
378
|
+
borderRadius: {
|
379
|
+
sm: '4px',
|
380
|
+
md: '6px',
|
381
|
+
lg: '8px',
|
382
|
+
full: '9999px',
|
383
|
+
},
|
384
|
+
shadows: {
|
385
|
+
sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
386
|
+
md: '0 4px 6px -1px rgba(0, 0, 0, 0.1)',
|
387
|
+
lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
|
388
|
+
},
|
389
|
+
breakpoints: {
|
390
|
+
sm: '640px',
|
391
|
+
md: '768px',
|
392
|
+
lg: '1024px',
|
393
|
+
xl: '1280px',
|
394
|
+
},
|
395
|
+
};
|
396
|
+
const defaultComponents = {
|
397
|
+
button: {
|
398
|
+
defaultVariant: 'primary',
|
399
|
+
defaultSize: 'medium',
|
400
|
+
disabledOpacity: 0.5,
|
401
|
+
},
|
402
|
+
input: {
|
403
|
+
defaultType: 'text',
|
404
|
+
disabledOpacity: 0.5,
|
405
|
+
},
|
406
|
+
};
|
407
|
+
const defaultConfig = {
|
408
|
+
theme: defaultTheme,
|
409
|
+
components: defaultComponents,
|
410
|
+
prefix: 'ui',
|
411
|
+
};
|
412
|
+
let globalConfig = { ...defaultConfig };
|
413
|
+
const setGlobalConfig = (config) => {
|
414
|
+
globalConfig = {
|
415
|
+
...globalConfig,
|
416
|
+
...config,
|
417
|
+
theme: {
|
418
|
+
...globalConfig.theme,
|
419
|
+
...config.theme,
|
420
|
+
},
|
421
|
+
components: {
|
422
|
+
...globalConfig.components,
|
423
|
+
...config.components,
|
424
|
+
},
|
425
|
+
};
|
426
|
+
};
|
427
|
+
const getGlobalConfig = () => {
|
428
|
+
return globalConfig;
|
429
|
+
};
|
430
|
+
const resetGlobalConfig = () => {
|
431
|
+
globalConfig = { ...defaultConfig };
|
432
|
+
};
|
433
|
+
|
434
|
+
const getCSSVariable = (path) => {
|
435
|
+
const config = getGlobalConfig();
|
436
|
+
const keys = path.split('.');
|
437
|
+
let value = config;
|
438
|
+
for (const key of keys) {
|
439
|
+
value = value[key];
|
440
|
+
if (value === undefined) {
|
441
|
+
console.warn(`CSS variable not found: ${path}`);
|
442
|
+
return '';
|
443
|
+
}
|
444
|
+
}
|
445
|
+
return typeof value === 'string' ? value : String(value);
|
446
|
+
};
|
447
|
+
const createCSSVariables = () => {
|
448
|
+
const config = getGlobalConfig();
|
449
|
+
const prefix = config.prefix;
|
450
|
+
const variables = [
|
451
|
+
`--${prefix}-color-primary: ${config.theme.colors.primary};`,
|
452
|
+
`--${prefix}-color-secondary: ${config.theme.colors.secondary};`,
|
453
|
+
`--${prefix}-color-success: ${config.theme.colors.success};`,
|
454
|
+
`--${prefix}-color-warning: ${config.theme.colors.warning};`,
|
455
|
+
`--${prefix}-color-error: ${config.theme.colors.error};`,
|
456
|
+
`--${prefix}-color-info: ${config.theme.colors.info};`,
|
457
|
+
`--${prefix}-color-background: ${config.theme.colors.background};`,
|
458
|
+
`--${prefix}-color-surface: ${config.theme.colors.surface};`,
|
459
|
+
`--${prefix}-color-text-primary: ${config.theme.colors.text.primary};`,
|
460
|
+
`--${prefix}-color-text-secondary: ${config.theme.colors.text.secondary};`,
|
461
|
+
`--${prefix}-color-text-disabled: ${config.theme.colors.text.disabled};`,
|
462
|
+
`--${prefix}-color-border-default: ${config.theme.colors.border.default};`,
|
463
|
+
`--${prefix}-color-border-focus: ${config.theme.colors.border.focus};`,
|
464
|
+
`--${prefix}-color-border-error: ${config.theme.colors.border.error};`,
|
465
|
+
`--${prefix}-spacing-xs: ${config.theme.spacing.xs};`,
|
466
|
+
`--${prefix}-spacing-sm: ${config.theme.spacing.sm};`,
|
467
|
+
`--${prefix}-spacing-md: ${config.theme.spacing.md};`,
|
468
|
+
`--${prefix}-spacing-lg: ${config.theme.spacing.lg};`,
|
469
|
+
`--${prefix}-spacing-xl: ${config.theme.spacing.xl};`,
|
470
|
+
`--${prefix}-font-family: ${config.theme.typography.fontFamily};`,
|
471
|
+
`--${prefix}-font-size-xs: ${config.theme.typography.fontSize.xs};`,
|
472
|
+
`--${prefix}-font-size-sm: ${config.theme.typography.fontSize.sm};`,
|
473
|
+
`--${prefix}-font-size-base: ${config.theme.typography.fontSize.base};`,
|
474
|
+
`--${prefix}-font-size-lg: ${config.theme.typography.fontSize.lg};`,
|
475
|
+
`--${prefix}-font-size-xl: ${config.theme.typography.fontSize.xl};`,
|
476
|
+
`--${prefix}-font-weight-normal: ${config.theme.typography.fontWeight.normal};`,
|
477
|
+
`--${prefix}-font-weight-medium: ${config.theme.typography.fontWeight.medium};`,
|
478
|
+
`--${prefix}-font-weight-semibold: ${config.theme.typography.fontWeight.semibold};`,
|
479
|
+
`--${prefix}-font-weight-bold: ${config.theme.typography.fontWeight.bold};`,
|
480
|
+
`--${prefix}-border-radius-sm: ${config.theme.borderRadius.sm};`,
|
481
|
+
`--${prefix}-border-radius-md: ${config.theme.borderRadius.md};`,
|
482
|
+
`--${prefix}-border-radius-lg: ${config.theme.borderRadius.lg};`,
|
483
|
+
`--${prefix}-border-radius-full: ${config.theme.borderRadius.full};`,
|
484
|
+
`--${prefix}-shadow-sm: ${config.theme.shadows.sm};`,
|
485
|
+
`--${prefix}-shadow-md: ${config.theme.shadows.md};`,
|
486
|
+
`--${prefix}-shadow-lg: ${config.theme.shadows.lg};`,
|
487
|
+
];
|
488
|
+
return `:root {\n ${variables.join('\n ')}\n}\n\n* {\n font-family: var(--ui-font-family);\n}`;
|
489
|
+
};
|
490
|
+
|
491
|
+
const ThemeProvider = ({ children, theme }) => {
|
492
|
+
react.useEffect(() => {
|
493
|
+
if (theme && Object.keys(theme).length > 0) {
|
494
|
+
const currentConfig = getGlobalConfig();
|
495
|
+
setGlobalConfig({
|
496
|
+
theme: {
|
497
|
+
...currentConfig.theme,
|
498
|
+
...theme,
|
499
|
+
colors: {
|
500
|
+
...currentConfig.theme.colors,
|
501
|
+
...theme.colors,
|
502
|
+
},
|
503
|
+
},
|
504
|
+
});
|
505
|
+
}
|
506
|
+
const cssVariables = createCSSVariables();
|
507
|
+
const styleElement = document.createElement('style');
|
508
|
+
styleElement.textContent = cssVariables;
|
509
|
+
styleElement.id = 'ui-theme-variables';
|
510
|
+
document.head.appendChild(styleElement);
|
511
|
+
return () => {
|
512
|
+
const existingStyle = document.getElementById('ui-theme-variables');
|
513
|
+
if (existingStyle) {
|
514
|
+
existingStyle.remove();
|
515
|
+
}
|
516
|
+
};
|
517
|
+
}, [theme]);
|
518
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
519
|
+
};
|
520
|
+
|
521
|
+
exports.SocialSecurityInput = SocialSecurityInput;
|
522
|
+
exports.ThemeProvider = ThemeProvider;
|
523
|
+
exports.createCSSVariables = createCSSVariables;
|
524
|
+
exports.defaultConfig = defaultConfig;
|
525
|
+
exports.getCSSVariable = getCSSVariable;
|
526
|
+
exports.getGlobalConfig = getGlobalConfig;
|
527
|
+
exports.resetGlobalConfig = resetGlobalConfig;
|
528
|
+
exports.setGlobalConfig = setGlobalConfig;
|
529
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/components/SocialSecurityInput/useSocialSecurityInput.ts","../src/components/SocialSecurityInput/SocialSecurityInput.tsx","../src/config/index.ts","../src/utils/cssVariables.ts","../src/components/ThemeProvider.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { useState, useEffect, useCallback } from 'react';\n\ninterface UseSocialSecurityInputProps {\n onChange?: (value: string) => void;\n placeholder?: string;\n value?: string;\n}\n\ninterface SocialSecurityState {\n sex: string;\n year: string;\n month: string;\n department: string;\n insee: string;\n order: string;\n controlKey: string;\n error: string;\n}\n\nexport const useSocialSecurityInput = ({ onChange, placeholder = '269054958815780', value }: UseSocialSecurityInputProps) => {\n const [state, setState] = useState<SocialSecurityState>({\n sex: '',\n year: '',\n month: '',\n department: '',\n insee: '',\n order: '',\n controlKey: '',\n error: '',\n });\n\n const calculateControlKey = (nir: string): string => {\n if (nir.length !== 13) return '';\n \n let nirForCalculation = nir;\n if (nirForCalculation.includes('2A')) {\n nirForCalculation = nirForCalculation.replace('2A', '19');\n }\n if (nirForCalculation.includes('2B')) {\n nirForCalculation = nirForCalculation.replace('2B', '20');\n }\n \n let remainder = 0;\n for (let i = 0; i < nirForCalculation.length; i++) {\n remainder = (remainder * 10 + parseInt(nirForCalculation[i], 10)) % 97;\n }\n \n const controlKey = 97 - remainder;\n return controlKey.toString().padStart(2, '0');\n };\n\n const updateControlKey = useCallback(() => {\n const nir = state.sex + state.year + state.month + state.department + state.insee + state.order;\n const key = calculateControlKey(nir);\n \n setState(prev => ({ ...prev, controlKey: key }));\n \n if (nir.length === 13 && key) {\n const fullNir = nir + key;\n onChange?.(fullNir);\n }\n }, [state.sex, state.year, state.month, state.department, state.insee, state.order, onChange]);\n\n useEffect(() => {\n updateControlKey();\n }, [state.sex, state.year, state.month, state.department, state.insee, state.order, updateControlKey]);\n\n const updateField = (field: keyof SocialSecurityState, value: string) => {\n setState(prev => ({ ...prev, [field]: value, error: '' }));\n };\n\n const parsePlaceholder = (placeholder: string) => {\n const cleaned = placeholder.replace(/\\D/g, '');\n if (cleaned.length >= 15) {\n return {\n sex: cleaned.substring(0, 1),\n year: cleaned.substring(1, 3),\n month: cleaned.substring(3, 5),\n department: cleaned.substring(5, 7),\n insee: cleaned.substring(7, 10),\n order: cleaned.substring(10, 13),\n controlKey: cleaned.substring(13, 15),\n };\n }\n return {\n sex: '2',\n year: '69',\n month: '05',\n department: '49',\n insee: '588',\n order: '157',\n controlKey: '80',\n };\n };\n\n const placeholders = parsePlaceholder(placeholder);\n\n const parseValue = (value: string) => {\n const cleaned = value.replace(/\\D/g, '');\n if (cleaned.length === 15) {\n return {\n sex: cleaned.substring(0, 1),\n year: cleaned.substring(1, 3),\n month: cleaned.substring(3, 5),\n department: cleaned.substring(5, 7),\n insee: cleaned.substring(7, 10),\n order: cleaned.substring(10, 13),\n controlKey: cleaned.substring(13, 15),\n };\n }\n return null;\n };\n\n\n useEffect(() => {\n if (value) {\n const parsed = parseValue(value);\n if (parsed) {\n setState(prev => ({ ...prev, ...parsed, error: '' }));\n }\n } else {\n setState(prev => ({\n ...prev,\n sex: '',\n year: '',\n month: '',\n department: '',\n insee: '',\n order: '',\n controlKey: '',\n error: '',\n }));\n }\n }, [value]);\n\n const parseSocialSecurityNumber = (fullNumber: string) => {\n const cleaned = fullNumber.replace(/\\D/g, '');\n \n if (cleaned.length === 15) {\n const parsed = {\n sex: cleaned.substring(0, 1),\n year: cleaned.substring(1, 3),\n month: cleaned.substring(3, 5),\n department: cleaned.substring(5, 7),\n insee: cleaned.substring(7, 10),\n order: cleaned.substring(10, 13),\n controlKey: cleaned.substring(13, 15),\n };\n \n const nir = parsed.sex + parsed.year + parsed.month + parsed.department + parsed.insee + parsed.order;\n const calculatedKey = calculateControlKey(nir);\n \n if (calculatedKey === parsed.controlKey) {\n setState(prev => ({ ...prev, ...parsed, error: '' }));\n onChange?.(cleaned);\n } else {\n setState(prev => ({ \n ...prev, \n ...parsed, \n error: 'Clé de contrôle incorrecte. La clé calculée est ' + calculatedKey + ' mais vous avez saisi ' + parsed.controlKey \n }));\n }\n } else {\n setState(prev => ({ ...prev, error: 'Le numéro de sécurité sociale doit contenir exactement 15 chiffres' }));\n }\n };\n\n const handlers = {\n sex: {\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n if (inputValue === '' || inputValue === '1' || inputValue === '2') {\n updateField('sex', inputValue);\n if (inputValue === '1' || inputValue === '2') {\n const nextInput = e.target.parentElement?.querySelector('input:nth-child(2)') as HTMLInputElement;\n nextInput?.focus();\n }\n }\n },\n onPaste: (e: React.ClipboardEvent<HTMLInputElement>) => {\n const pastedText = e.clipboardData.getData('text');\n const cleaned = pastedText.replace(/\\D/g, '');\n \n if (cleaned.length === 15) {\n e.preventDefault();\n parseSocialSecurityNumber(pastedText);\n }\n // Sinon, laisser le comportement par défaut (pas de preventDefault)\n },\n },\n\n year: {\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleaned = inputValue.replace(/\\D/g, '');\n if (cleaned.length <= 2) {\n updateField('year', cleaned);\n if (cleaned.length === 2) {\n const nextInput = e.target.parentElement?.querySelector('input:nth-child(3)') as HTMLInputElement;\n nextInput?.focus();\n }\n }\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Backspace' && e.currentTarget.value === '') {\n const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(1)') as HTMLInputElement;\n prevInput?.focus();\n }\n },\n },\n\n month: {\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleaned = inputValue.replace(/\\D/g, '');\n if (cleaned.length <= 2) {\n updateField('month', cleaned);\n if (cleaned.length === 2 && cleaned >= '01' && cleaned <= '12') {\n const nextInput = e.target.parentElement?.querySelector('input:nth-child(4)') as HTMLInputElement;\n nextInput?.focus();\n }\n }\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Backspace' && e.currentTarget.value === '') {\n const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(2)') as HTMLInputElement;\n prevInput?.focus();\n }\n },\n },\n\n department: {\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value.toUpperCase();\n const cleaned = inputValue.replace(/[^0-9AB]/g, '');\n \n if (cleaned.length <= 2) {\n updateField('department', cleaned);\n \n if (cleaned.length === 2 && (\n (cleaned >= '01' && cleaned <= '95') || \n cleaned === '2A' || \n cleaned === '2B' ||\n cleaned === '99'\n )) {\n const nextInput = e.target.parentElement?.querySelector('input:nth-child(5)') as HTMLInputElement;\n nextInput?.focus();\n }\n }\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Backspace' && e.currentTarget.value === '') {\n const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(3)') as HTMLInputElement;\n prevInput?.focus();\n }\n },\n },\n\n insee: {\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleaned = inputValue.replace(/\\D/g, '');\n if (cleaned.length <= 3) {\n updateField('insee', cleaned);\n if (cleaned.length === 3) {\n const nextInput = e.target.parentElement?.querySelector('input:nth-child(6)') as HTMLInputElement;\n nextInput?.focus();\n }\n }\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Backspace' && e.currentTarget.value === '') {\n const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(4)') as HTMLInputElement;\n prevInput?.focus();\n }\n },\n },\n\n order: {\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleaned = inputValue.replace(/\\D/g, '');\n if (cleaned.length <= 3) {\n updateField('order', cleaned);\n }\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Backspace' && e.currentTarget.value === '') {\n const prevInput = e.currentTarget.parentElement?.querySelector('input:nth-child(5)') as HTMLInputElement;\n prevInput?.focus();\n }\n },\n },\n };\n\n return {\n values: state,\n handlers,\n parseSocialSecurityNumber,\n placeholders,\n };\n};\n","import React, { useState } from 'react';\nimport { SocialSecurityInputProps } from '../../types';\nimport { useSocialSecurityInput } from './useSocialSecurityInput';\nimport styles from './SocialSecurityInput.module.css';\n\nconst SocialSecurityInput: React.FC<SocialSecurityInputProps> = ({\n label = 'Numéro de sécurité sociale',\n placeholder = '269054958815780',\n value,\n onChange,\n error,\n disabled = false,\n className,\n showCopyButton = false,\n}) => {\n const { values, handlers, placeholders } = useSocialSecurityInput({\n onChange,\n placeholder,\n value,\n });\n\n const [copied, setCopied] = useState(false);\n\n const handleCopy = async () => {\n const fullNumber =\n values.sex +\n values.year +\n values.month +\n values.department +\n values.insee +\n values.order +\n values.controlKey;\n if (fullNumber.length === 15) {\n try {\n await navigator.clipboard.writeText(fullNumber);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch (err) {\n console.error('Failed to copy:', err);\n }\n }\n };\n\n return (\n <div className={`${styles.inputContainer} ${className}`}>\n {label && <label className={styles.inputLabel}>{label}</label>}\n <div className={styles.inputsRow}>\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.sex}\n minLength={1}\n maxLength={1}\n disabled={disabled}\n onChange={handlers.sex.onChange}\n onPaste={handlers.sex.onPaste}\n value={values.sex}\n />\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.year}\n minLength={2}\n maxLength={2}\n disabled={disabled}\n onChange={handlers.year.onChange}\n onKeyDown={handlers.year.onKeyDown}\n value={values.year}\n />\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.month}\n minLength={2}\n maxLength={2}\n disabled={disabled}\n onChange={handlers.month.onChange}\n onKeyDown={handlers.month.onKeyDown}\n value={values.month}\n />\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.department}\n minLength={2}\n maxLength={2}\n disabled={disabled}\n onChange={handlers.department.onChange}\n onKeyDown={handlers.department.onKeyDown}\n value={values.department}\n />\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.insee}\n minLength={3}\n maxLength={3}\n disabled={disabled}\n onChange={handlers.insee.onChange}\n onKeyDown={handlers.insee.onKeyDown}\n value={values.insee}\n />\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.order}\n minLength={3}\n maxLength={3}\n disabled={disabled}\n onChange={handlers.order.onChange}\n onKeyDown={handlers.order.onKeyDown}\n value={values.order}\n />\n <input\n type=\"text\"\n className={styles.input}\n placeholder={placeholders.controlKey}\n minLength={2}\n maxLength={2}\n disabled={true}\n value={values.controlKey}\n readOnly\n />\n {showCopyButton && (\n <button\n type=\"button\"\n className={`${styles.copyButton} ${copied ? styles.copied : ''}`}\n onClick={handleCopy}\n disabled={\n disabled ||\n (\n values.sex +\n values.year +\n values.month +\n values.department +\n values.insee +\n values.order +\n values.controlKey\n ).length !== 15\n }\n title={copied ? \"Copié !\" : \"Copier le numéro de sécurité sociale\"}\n >\n {copied ? (\n <svg\n height=\"24px\"\n width=\"24px\"\n viewBox=\"0 -960 960 960\"\n fill=\"white\"\n >\n <path d=\"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z\" />\n </svg>\n ) : (\n <svg\n height=\"24px\"\n width=\"24px\"\n viewBox=\"0 -960 960 960\"\n fill=\"white\"\n >\n <path d=\"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z\" />\n </svg>\n )}\n </button>\n )}\n </div>\n {error && <p className={styles.inputError}>{error}</p>}\n {values.error && <p className={styles.inputError}>{values.error}</p>}\n </div>\n );\n};\n\nexport default SocialSecurityInput;\n","export interface ThemeConfig {\n colors: {\n primary: string;\n secondary: string;\n success: string;\n warning: string;\n error: string;\n info: string;\n background: string;\n surface: string;\n text: {\n primary: string;\n secondary: string;\n disabled: string;\n };\n border: {\n default: string;\n focus: string;\n error: string;\n };\n };\n spacing: {\n xs: string;\n sm: string;\n md: string;\n lg: string;\n xl: string;\n };\n typography: {\n fontFamily: string;\n fontSize: {\n xs: string;\n sm: string;\n base: string;\n lg: string;\n xl: string;\n };\n fontWeight: {\n normal: number;\n medium: number;\n semibold: number;\n bold: number;\n };\n };\n borderRadius: {\n sm: string;\n md: string;\n lg: string;\n full: string;\n };\n shadows: {\n sm: string;\n md: string;\n lg: string;\n };\n breakpoints: {\n sm: string;\n md: string;\n lg: string;\n xl: string;\n };\n}\n\nexport interface ComponentConfig {\n button: {\n defaultVariant: 'primary' | 'secondary' | 'outline';\n defaultSize: 'small' | 'medium' | 'large';\n disabledOpacity: number;\n };\n input: {\n defaultType: 'text' | 'email' | 'password' | 'number';\n disabledOpacity: number;\n };\n}\n\nexport interface GlobalConfig {\n theme: ThemeConfig;\n components: ComponentConfig;\n prefix: string;\n}\n\nconst defaultTheme: ThemeConfig = {\n colors: {\n primary: '#F17F29',\n secondary: '#4b5563',\n success: '#10b981',\n warning: '#f59e0b',\n error: '#ef4444',\n info: '#3b82f6',\n background: '#ffffff',\n surface: '#f9fafb',\n text: {\n primary: '#111827',\n secondary: '#6b7280',\n disabled: '#9ca3af',\n },\n border: {\n default: '#d1d5db',\n focus: '#3b82f6',\n error: '#ef4444',\n },\n },\n spacing: {\n xs: '4px',\n sm: '8px',\n md: '16px',\n lg: '24px',\n xl: '32px',\n },\n typography: {\n fontFamily: \"'Inter', 'Roboto', system-ui, -apple-system, sans-serif\",\n fontSize: {\n xs: '12px',\n sm: '14px',\n base: '16px',\n lg: '18px',\n xl: '20px',\n },\n fontWeight: {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n },\n borderRadius: {\n sm: '4px',\n md: '6px',\n lg: '8px',\n full: '9999px',\n },\n shadows: {\n sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n md: '0 4px 6px -1px rgba(0, 0, 0, 0.1)',\n lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1)',\n },\n breakpoints: {\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n },\n};\n\nconst defaultComponents: ComponentConfig = {\n button: {\n defaultVariant: 'primary',\n defaultSize: 'medium',\n disabledOpacity: 0.5,\n },\n input: {\n defaultType: 'text',\n disabledOpacity: 0.5,\n },\n};\n\nexport const defaultConfig: GlobalConfig = {\n theme: defaultTheme,\n components: defaultComponents,\n prefix: 'ui',\n};\n\nlet globalConfig: GlobalConfig = { ...defaultConfig };\n\nexport const setGlobalConfig = (config: Partial<GlobalConfig>): void => {\n globalConfig = {\n ...globalConfig,\n ...config,\n theme: {\n ...globalConfig.theme,\n ...config.theme,\n },\n components: {\n ...globalConfig.components,\n ...config.components,\n },\n };\n};\n\nexport const getGlobalConfig = (): GlobalConfig => {\n return globalConfig;\n};\n\nexport const resetGlobalConfig = (): void => {\n globalConfig = { ...defaultConfig };\n};\n","import { getGlobalConfig } from '../config';\n\nexport const getCSSVariable = (path: string): string => {\n const config = getGlobalConfig();\n const keys = path.split('.');\n let value: unknown = config;\n \n for (const key of keys) {\n value = (value as Record<string, unknown>)[key];\n if (value === undefined) {\n console.warn(`CSS variable not found: ${path}`);\n return '';\n }\n }\n \n return typeof value === 'string' ? value : String(value);\n};\n\nexport const createCSSVariables = (): string => {\n const config = getGlobalConfig();\n const prefix = config.prefix;\n \n const variables = [\n `--${prefix}-color-primary: ${config.theme.colors.primary};`,\n `--${prefix}-color-secondary: ${config.theme.colors.secondary};`,\n `--${prefix}-color-success: ${config.theme.colors.success};`,\n `--${prefix}-color-warning: ${config.theme.colors.warning};`,\n `--${prefix}-color-error: ${config.theme.colors.error};`,\n `--${prefix}-color-info: ${config.theme.colors.info};`,\n `--${prefix}-color-background: ${config.theme.colors.background};`,\n `--${prefix}-color-surface: ${config.theme.colors.surface};`,\n `--${prefix}-color-text-primary: ${config.theme.colors.text.primary};`,\n `--${prefix}-color-text-secondary: ${config.theme.colors.text.secondary};`,\n `--${prefix}-color-text-disabled: ${config.theme.colors.text.disabled};`,\n `--${prefix}-color-border-default: ${config.theme.colors.border.default};`,\n `--${prefix}-color-border-focus: ${config.theme.colors.border.focus};`,\n `--${prefix}-color-border-error: ${config.theme.colors.border.error};`,\n `--${prefix}-spacing-xs: ${config.theme.spacing.xs};`,\n `--${prefix}-spacing-sm: ${config.theme.spacing.sm};`,\n `--${prefix}-spacing-md: ${config.theme.spacing.md};`,\n `--${prefix}-spacing-lg: ${config.theme.spacing.lg};`,\n `--${prefix}-spacing-xl: ${config.theme.spacing.xl};`,\n `--${prefix}-font-family: ${config.theme.typography.fontFamily};`,\n `--${prefix}-font-size-xs: ${config.theme.typography.fontSize.xs};`,\n `--${prefix}-font-size-sm: ${config.theme.typography.fontSize.sm};`,\n `--${prefix}-font-size-base: ${config.theme.typography.fontSize.base};`,\n `--${prefix}-font-size-lg: ${config.theme.typography.fontSize.lg};`,\n `--${prefix}-font-size-xl: ${config.theme.typography.fontSize.xl};`,\n `--${prefix}-font-weight-normal: ${config.theme.typography.fontWeight.normal};`,\n `--${prefix}-font-weight-medium: ${config.theme.typography.fontWeight.medium};`,\n `--${prefix}-font-weight-semibold: ${config.theme.typography.fontWeight.semibold};`,\n `--${prefix}-font-weight-bold: ${config.theme.typography.fontWeight.bold};`,\n `--${prefix}-border-radius-sm: ${config.theme.borderRadius.sm};`,\n `--${prefix}-border-radius-md: ${config.theme.borderRadius.md};`,\n `--${prefix}-border-radius-lg: ${config.theme.borderRadius.lg};`,\n `--${prefix}-border-radius-full: ${config.theme.borderRadius.full};`,\n `--${prefix}-shadow-sm: ${config.theme.shadows.sm};`,\n `--${prefix}-shadow-md: ${config.theme.shadows.md};`,\n `--${prefix}-shadow-lg: ${config.theme.shadows.lg};`,\n ];\n \n return `:root {\\n ${variables.join('\\n ')}\\n}\\n\\n* {\\n font-family: var(--ui-font-family);\\n}`;\n};\n","import React, { useEffect } from 'react';\nimport { createCSSVariables } from '../utils/cssVariables';\nimport { setGlobalConfig, getGlobalConfig, ThemeConfig } from '../config';\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n theme?: Partial<ThemeConfig>;\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, theme }) => {\n useEffect(() => {\n if (theme && Object.keys(theme).length > 0) {\n const currentConfig = getGlobalConfig();\n setGlobalConfig({\n theme: {\n ...currentConfig.theme,\n ...theme,\n colors: {\n ...currentConfig.theme.colors,\n ...theme.colors,\n },\n },\n });\n }\n \n const cssVariables = createCSSVariables();\n \n const styleElement = document.createElement('style');\n styleElement.textContent = cssVariables;\n styleElement.id = 'ui-theme-variables';\n \n document.head.appendChild(styleElement);\n \n return () => {\n const existingStyle = document.getElementById('ui-theme-variables');\n if (existingStyle) {\n existingStyle.remove();\n }\n };\n }, [theme]);\n\n return <>{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