canvasframework 0.5.16 → 0.5.18

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 (112) hide show
  1. package/dist/canvasframework.js +2 -0
  2. package/dist/canvasframework.js.LICENSE.txt +1 -0
  3. package/package.json +18 -17
  4. package/components/Accordion.js +0 -265
  5. package/components/AndroidDatePickerDialog.js +0 -406
  6. package/components/AppBar.js +0 -398
  7. package/components/AudioPlayer.js +0 -611
  8. package/components/Avatar.js +0 -202
  9. package/components/Banner.js +0 -342
  10. package/components/BottomNavigationBar.js +0 -433
  11. package/components/BottomSheet.js +0 -234
  12. package/components/Button.js +0 -360
  13. package/components/Camera.js +0 -644
  14. package/components/Card.js +0 -193
  15. package/components/Chart.js +0 -700
  16. package/components/Checkbox.js +0 -166
  17. package/components/Chip.js +0 -212
  18. package/components/CircularProgress.js +0 -327
  19. package/components/ContextMenu.js +0 -116
  20. package/components/DatePicker.js +0 -298
  21. package/components/Dialog.js +0 -337
  22. package/components/Divider.js +0 -125
  23. package/components/Drawer.js +0 -276
  24. package/components/FAB.js +0 -270
  25. package/components/FileUpload.js +0 -315
  26. package/components/FloatedCamera.js +0 -644
  27. package/components/IOSDatePickerWheel.js +0 -430
  28. package/components/ImageCarousel.js +0 -219
  29. package/components/ImageComponent.js +0 -223
  30. package/components/Input.js +0 -831
  31. package/components/InputDatalist.js +0 -723
  32. package/components/InputTags.js +0 -624
  33. package/components/List.js +0 -95
  34. package/components/ListItem.js +0 -269
  35. package/components/Modal.js +0 -364
  36. package/components/MorphingFAB.js +0 -428
  37. package/components/MultiSelectDialog.js +0 -206
  38. package/components/NumberInput.js +0 -271
  39. package/components/PasswordInput.js +0 -462
  40. package/components/ProgressBar.js +0 -88
  41. package/components/QRCodeReader.js +0 -539
  42. package/components/RadioButton.js +0 -151
  43. package/components/SearchInput.js +0 -315
  44. package/components/SegmentedControl.js +0 -357
  45. package/components/Select.js +0 -199
  46. package/components/SelectDialog.js +0 -255
  47. package/components/Slider.js +0 -113
  48. package/components/SliverAppBar.js +0 -139
  49. package/components/Snackbar.js +0 -243
  50. package/components/SpeedDialFAB.js +0 -397
  51. package/components/Stepper.js +0 -281
  52. package/components/SwipeableListItem.js +0 -327
  53. package/components/Switch.js +0 -147
  54. package/components/Table.js +0 -492
  55. package/components/Tabs.js +0 -423
  56. package/components/Text.js +0 -141
  57. package/components/TextField.js +0 -151
  58. package/components/TimePicker.js +0 -934
  59. package/components/Toast.js +0 -236
  60. package/components/TreeView.js +0 -420
  61. package/components/Video.js +0 -397
  62. package/components/View.js +0 -140
  63. package/components/VirtualList.js +0 -120
  64. package/core/CanvasFramework.js +0 -3034
  65. package/core/Component.js +0 -243
  66. package/core/ThemeManager.js +0 -358
  67. package/core/UIBuilder.js +0 -267
  68. package/core/WebGLCanvasAdapter.js +0 -782
  69. package/features/Column.js +0 -43
  70. package/features/Grid.js +0 -47
  71. package/features/LayoutComponent.js +0 -43
  72. package/features/OpenStreetMap.js +0 -310
  73. package/features/Positioned.js +0 -33
  74. package/features/PullToRefresh.js +0 -328
  75. package/features/Row.js +0 -40
  76. package/features/SignaturePad.js +0 -257
  77. package/features/Skeleton.js +0 -193
  78. package/features/Stack.js +0 -21
  79. package/index.js +0 -119
  80. package/manager/AccessibilityManager.js +0 -107
  81. package/manager/ErrorHandler.js +0 -59
  82. package/manager/FeatureFlags.js +0 -60
  83. package/manager/MemoryManager.js +0 -107
  84. package/manager/PerformanceMonitor.js +0 -84
  85. package/manager/SecurityManager.js +0 -54
  86. package/utils/AnimationEngine.js +0 -734
  87. package/utils/CryptoManager.js +0 -303
  88. package/utils/DataStore.js +0 -403
  89. package/utils/DevTools.js +0 -1618
  90. package/utils/DevToolsConsole.js +0 -201
  91. package/utils/EventBus.js +0 -407
  92. package/utils/FetchClient.js +0 -74
  93. package/utils/FirebaseAuth.js +0 -653
  94. package/utils/FirebaseCore.js +0 -246
  95. package/utils/FirebaseFirestore.js +0 -581
  96. package/utils/FirebaseFunctions.js +0 -97
  97. package/utils/FirebaseRealtimeDB.js +0 -498
  98. package/utils/FirebaseStorage.js +0 -612
  99. package/utils/FormValidator.js +0 -355
  100. package/utils/GeoLocationService.js +0 -62
  101. package/utils/I18n.js +0 -207
  102. package/utils/IndexedDBManager.js +0 -273
  103. package/utils/InspectionOverlay.js +0 -308
  104. package/utils/NotificationManager.js +0 -60
  105. package/utils/OfflineSyncManager.js +0 -342
  106. package/utils/PayPalPayment.js +0 -678
  107. package/utils/QueryBuilder.js +0 -478
  108. package/utils/SafeArea.js +0 -64
  109. package/utils/SecureStorage.js +0 -289
  110. package/utils/StateManager.js +0 -207
  111. package/utils/StripePayment.js +0 -552
  112. package/utils/WebSocketClient.js +0 -66
@@ -1,462 +0,0 @@
1
- import Component from '../core/Component.js';
2
-
3
- /**
4
- * Champ de saisie de mot de passe avec masquage
5
- * @class
6
- * @extends Component
7
- * @property {string} placeholder - Texte d'indication
8
- * @property {string} value - Valeur réelle
9
- * @property {string} displayedValue - Valeur affichée (avec *)
10
- * @property {number} fontSize - Taille de police
11
- * @property {boolean} focused - Focus actif
12
- * @property {string} platform - Plateforme
13
- * @property {boolean} cursorVisible - Curseur visible
14
- * @property {number} cursorPosition - Position du curseur
15
- * @property {HTMLInputElement} hiddenInput - Input HTML caché
16
- * @property {boolean} showPassword - Afficher le mot de passe en clair
17
- * @property {string} maskChar - Caractère de masquage
18
- */
19
- class PasswordInput extends Component {
20
- static activeInput = null;
21
- static allInputs = new Set();
22
- static globalClickHandler = null;
23
-
24
- /**
25
- * Crée une instance de PasswordInput
26
- * @param {CanvasFramework} framework - Framework parent
27
- * @param {Object} [options={}] - Options de configuration
28
- * @param {string} [options.placeholder=''] - Texte d'indication
29
- * @param {string} [options.value=''] - Valeur initiale
30
- * @param {number} [options.fontSize=16] - Taille de police
31
- * @param {Function} [options.onFocus] - Callback au focus
32
- * @param {Function} [options.onBlur] - Callback au blur
33
- * @param {string} [options.maskChar='*'] - Caractère de masquage
34
- * @param {boolean} [options.showPassword=false] - Afficher le mot de passe initialement
35
- */
36
- constructor(framework, options = {}) {
37
- super(framework, options);
38
- this.placeholder = options.placeholder || 'Mot de passe';
39
- this.value = options.value || '';
40
- this.maskChar = options.maskChar || '•';
41
- this.showPassword = options.showPassword || false;
42
- this.fontSize = options.fontSize || 16;
43
- this.focused = false;
44
- this.platform = framework.platform;
45
- this.cursorVisible = true;
46
- this.cursorPosition = this.value.length;
47
- this.displayedValue = this.getDisplayedValue();
48
-
49
- // Bouton pour afficher/masquer le mot de passe
50
- this.toggleButtonSize = 24;
51
- this.toggleButtonPadding = 10;
52
-
53
- // Gestion du focus
54
- this.onFocus = this.onFocus.bind(this);
55
- this.onBlur = this.onBlur.bind(this);
56
- this.onTogglePassword = this.onTogglePassword.bind(this);
57
-
58
- // Enregistrer cet input
59
- PasswordInput.allInputs.add(this);
60
-
61
- // Animation du curseur
62
- this.cursorInterval = setInterval(() => {
63
- if (this.focused) this.cursorVisible = !this.cursorVisible;
64
- }, 500);
65
-
66
- // Écouter les clics partout pour détecter quand on clique ailleurs
67
- this.setupGlobalClickHandler();
68
- }
69
-
70
- /**
71
- * Obtient la valeur affichée
72
- * @returns {string} Valeur affichée
73
- */
74
- getDisplayedValue() {
75
- if (this.showPassword) {
76
- return this.value;
77
- }
78
- return this.maskChar.repeat(this.value.length);
79
- }
80
-
81
- /**
82
- * Bascule l'affichage du mot de passe
83
- */
84
- onTogglePassword() {
85
- this.showPassword = !this.showPassword;
86
- this.displayedValue = this.getDisplayedValue();
87
- }
88
-
89
- /**
90
- * Vérifie si un point est sur le bouton d'affichage
91
- * @param {number} x - Coordonnée X
92
- * @param {number} y - Coordonnée Y
93
- * @returns {boolean} True si le point est sur le bouton
94
- */
95
- isPointOnToggleButton(x, y) {
96
- const buttonX = this.x + this.width - this.toggleButtonSize - this.toggleButtonPadding;
97
- const buttonY = this.y + (this.height - this.toggleButtonSize) / 2;
98
-
99
- return x >= buttonX &&
100
- x <= buttonX + this.toggleButtonSize &&
101
- y >= buttonY &&
102
- y <= buttonY + this.toggleButtonSize;
103
- }
104
-
105
- /**
106
- * Écoute les clics globaux pour détecter les clics hors input
107
- */
108
- setupGlobalClickHandler() {
109
- if (!PasswordInput.globalClickHandler) {
110
- PasswordInput.globalClickHandler = (e) => {
111
- let clickedOnInput = false;
112
-
113
- for (let input of PasswordInput.allInputs) {
114
- if (input.hiddenInput && e.target === input.hiddenInput) {
115
- clickedOnInput = true;
116
- break;
117
- }
118
- }
119
-
120
- if (!clickedOnInput) {
121
- PasswordInput.removeAllHiddenInputs();
122
- }
123
- };
124
-
125
- document.addEventListener('click', PasswordInput.globalClickHandler, true);
126
- document.addEventListener('touchstart', PasswordInput.globalClickHandler, true);
127
- }
128
- }
129
-
130
- /**
131
- * Configure l'input HTML caché
132
- * @private
133
- */
134
- setupHiddenInput() {
135
- if (this.hiddenInput) return;
136
-
137
- this.hiddenInput = document.createElement('input');
138
- this.hiddenInput.style.position = 'fixed';
139
- this.hiddenInput.type = this.showPassword ? 'text' : 'password';
140
- this.hiddenInput.style.opacity = '0';
141
- this.hiddenInput.style.pointerEvents = 'none';
142
- this.hiddenInput.style.top = '-100px';
143
- this.hiddenInput.style.zIndex = '9999';
144
- document.body.appendChild(this.hiddenInput);
145
-
146
- this.hiddenInput.addEventListener('input', (e) => {
147
- if (this.focused) {
148
- this.value = e.target.value;
149
- this.cursorPosition = this.value.length;
150
- this.displayedValue = this.getDisplayedValue();
151
- }
152
- });
153
-
154
- this.hiddenInput.addEventListener('blur', () => {
155
- this.focused = false;
156
- this.cursorVisible = false;
157
-
158
- setTimeout(() => {
159
- this.destroyHiddenInput();
160
- }, 100);
161
- });
162
- }
163
-
164
- /**
165
- * Gère le focus
166
- */
167
- onFocus() {
168
- if (PasswordInput.activeInput === this) {
169
- return;
170
- }
171
-
172
- PasswordInput.removeAllHiddenInputs();
173
-
174
- for (let input of PasswordInput.allInputs) {
175
- if (input !== this) {
176
- input.focused = false;
177
- input.cursorVisible = false;
178
- }
179
- }
180
-
181
- this.focused = true;
182
- this.cursorVisible = true;
183
- PasswordInput.activeInput = this;
184
-
185
- this.setupHiddenInput();
186
-
187
- if (this.hiddenInput) {
188
- this.hiddenInput.value = this.value;
189
- this.hiddenInput.type = this.showPassword ? 'text' : 'password';
190
-
191
- const adjustedY = this.y + this.framework.scrollOffset;
192
- this.hiddenInput.style.top = `${adjustedY}px`;
193
-
194
- setTimeout(() => {
195
- if (this.hiddenInput && this.focused) {
196
- this.hiddenInput.focus();
197
- this.hiddenInput.setSelectionRange(this.value.length, this.value.length);
198
- }
199
- }, 50);
200
- }
201
- }
202
-
203
- /**
204
- * Gère le blur
205
- */
206
- onBlur() {
207
- this.focused = false;
208
- this.cursorVisible = false;
209
- }
210
-
211
- /**
212
- * Détruit l'input HTML
213
- */
214
- destroyHiddenInput() {
215
- if (this.hiddenInput && this.hiddenInput.parentNode) {
216
- this.hiddenInput.parentNode.removeChild(this.hiddenInput);
217
- this.hiddenInput = null;
218
- }
219
- }
220
-
221
- /**
222
- * Gère le clic
223
- */
224
- onClick() {
225
- this.onFocus();
226
- }
227
-
228
- /**
229
- * Gère le clic sur le bouton d'affichage
230
- */
231
- onToggleButtonClick() {
232
- this.onTogglePassword();
233
-
234
- // Mettre à jour le type de l'input HTML si existant
235
- if (this.hiddenInput) {
236
- this.hiddenInput.type = this.showPassword ? 'text' : 'password';
237
- if (this.focused) {
238
- setTimeout(() => {
239
- if (this.hiddenInput) {
240
- this.hiddenInput.focus();
241
- }
242
- }, 10);
243
- }
244
- }
245
- }
246
-
247
- /**
248
- * Méthode statique pour détruire tous les inputs HTML
249
- */
250
- static removeAllHiddenInputs() {
251
- for (let input of PasswordInput.allInputs) {
252
- input.focused = false;
253
- input.cursorVisible = false;
254
-
255
- if (input.hiddenInput && input.hiddenInput.parentNode) {
256
- input.hiddenInput.parentNode.removeChild(input.hiddenInput);
257
- input.hiddenInput = null;
258
- }
259
- }
260
-
261
- PasswordInput.activeInput = null;
262
- }
263
-
264
- /**
265
- * Vérifie si un point est dans les limites
266
- * @param {number} x - Coordonnée X
267
- * @param {number} y - Coordonnée Y
268
- * @returns {boolean} True si le point est dans l'input
269
- */
270
- isPointInside(x, y) {
271
- return x >= this.x &&
272
- x <= this.x + this.width &&
273
- y >= this.y &&
274
- y <= this.y + this.height;
275
- }
276
-
277
- /**
278
- * Dessine l'input
279
- * @param {CanvasRenderingContext2D} ctx - Contexte de dessin
280
- */
281
- draw(ctx) {
282
- ctx.save();
283
-
284
- if (this.platform === 'material') {
285
- ctx.strokeStyle = this.focused ? '#6200EE' : '#CCCCCC';
286
- ctx.lineWidth = this.focused ? 2 : 1;
287
- ctx.beginPath();
288
- ctx.moveTo(this.x, this.y + this.height);
289
- ctx.lineTo(this.x + this.width, this.y + this.height);
290
- ctx.stroke();
291
- } else {
292
- ctx.strokeStyle = this.focused ? '#007AFF' : '#C7C7CC';
293
- ctx.lineWidth = 1;
294
- ctx.beginPath();
295
- this.roundRect(ctx, this.x, this.y, this.width, this.height, 8);
296
- ctx.stroke();
297
- }
298
-
299
- // Texte
300
- ctx.fillStyle = this.value ? '#000000' : '#999999';
301
- ctx.font = `${this.fontSize}px -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif`;
302
- ctx.textAlign = 'left';
303
- ctx.textBaseline = 'middle';
304
- const displayText = this.displayedValue || this.placeholder;
305
-
306
- // Calculer la largeur disponible (en tenant compte du bouton)
307
- const availableWidth = this.width - 20 - this.toggleButtonSize - this.toggleButtonPadding;
308
-
309
- // Tronquer le texte si nécessaire
310
- let finalDisplayText = displayText;
311
- const textWidth = ctx.measureText(displayText).width;
312
- if (textWidth > availableWidth) {
313
- // Tronquer le texte avec "..."
314
- for (let i = displayText.length; i > 0; i--) {
315
- const truncated = displayText.substring(0, i) + '...';
316
- if (ctx.measureText(truncated).width <= availableWidth) {
317
- finalDisplayText = truncated;
318
- break;
319
- }
320
- }
321
- }
322
-
323
- ctx.fillText(finalDisplayText, this.x + 10, this.y + this.height / 2);
324
-
325
- // Curseur
326
- if (this.focused && this.cursorVisible && this.displayedValue) {
327
- const textWidth = ctx.measureText(finalDisplayText).width;
328
- ctx.fillStyle = '#000000';
329
- ctx.fillRect(this.x + 10 + textWidth, this.y + 10, 2, this.height - 20);
330
- }
331
-
332
- // Bouton d'affichage/masquage
333
- this.drawToggleButton(ctx);
334
-
335
- ctx.restore();
336
- }
337
-
338
- /**
339
- * Dessine le bouton d'affichage/masquage
340
- * @param {CanvasRenderingContext2D} ctx - Contexte de dessin
341
- */
342
- drawToggleButton(ctx) {
343
- const buttonX = this.x + this.width - this.toggleButtonSize - this.toggleButtonPadding;
344
- const buttonY = this.y + (this.height - this.toggleButtonSize) / 2;
345
-
346
- // Cercle du bouton
347
- ctx.fillStyle = '#F0F0F0';
348
- ctx.beginPath();
349
- ctx.arc(
350
- buttonX + this.toggleButtonSize / 2,
351
- buttonY + this.toggleButtonSize / 2,
352
- this.toggleButtonSize / 2,
353
- 0,
354
- Math.PI * 2
355
- );
356
- ctx.fill();
357
-
358
- // Icône de l'œil
359
- ctx.strokeStyle = '#666666';
360
- ctx.lineWidth = 2;
361
- ctx.beginPath();
362
-
363
- if (this.showPassword) {
364
- // Œil barré (mot de passe visible)
365
- // Contour de l'œil
366
- ctx.arc(
367
- buttonX + this.toggleButtonSize / 2,
368
- buttonY + this.toggleButtonSize / 2,
369
- this.toggleButtonSize / 4,
370
- 0,
371
- Math.PI * 2
372
- );
373
- ctx.stroke();
374
-
375
- // Pupille
376
- ctx.fillStyle = '#666666';
377
- ctx.beginPath();
378
- ctx.arc(
379
- buttonX + this.toggleButtonSize / 2,
380
- buttonY + this.toggleButtonSize / 2,
381
- this.toggleButtonSize / 8,
382
- 0,
383
- Math.PI * 2
384
- );
385
- ctx.fill();
386
-
387
- // Barre diagonale
388
- ctx.beginPath();
389
- ctx.moveTo(buttonX + 5, buttonY + 5);
390
- ctx.lineTo(buttonX + this.toggleButtonSize - 5, buttonY + this.toggleButtonSize - 5);
391
- ctx.stroke();
392
- } else {
393
- // Œil ouvert (mot de passe masqué)
394
- // Contour de l'œil
395
- ctx.arc(
396
- buttonX + this.toggleButtonSize / 2,
397
- buttonY + this.toggleButtonSize / 2,
398
- this.toggleButtonSize / 4,
399
- 0,
400
- Math.PI * 2
401
- );
402
- ctx.stroke();
403
-
404
- // Pupille
405
- ctx.fillStyle = '#666666';
406
- ctx.beginPath();
407
- ctx.arc(
408
- buttonX + this.toggleButtonSize / 2,
409
- buttonY + this.toggleButtonSize / 2,
410
- this.toggleButtonSize / 8,
411
- 0,
412
- Math.PI * 2
413
- );
414
- ctx.fill();
415
- }
416
- }
417
-
418
- /**
419
- * Dessine un rectangle avec coins arrondis
420
- * @param {CanvasRenderingContext2D} ctx - Contexte de dessin
421
- * @param {number} x - Position X
422
- * @param {number} y - Position Y
423
- * @param {number} width - Largeur
424
- * @param {number} height - Hauteur
425
- * @param {number} radius - Rayon des coins
426
- * @private
427
- */
428
- roundRect(ctx, x, y, width, height, radius) {
429
- ctx.moveTo(x + radius, y);
430
- ctx.lineTo(x + width - radius, y);
431
- ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
432
- ctx.lineTo(x + width, y + height - radius);
433
- ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
434
- ctx.lineTo(x + radius, y + height);
435
- ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
436
- ctx.lineTo(x, y + radius);
437
- ctx.quadraticCurveTo(x, y, x + radius, y);
438
- }
439
-
440
- /**
441
- * Nettoie les ressources
442
- */
443
- destroy() {
444
- this.destroyHiddenInput();
445
-
446
- if (this.cursorInterval) {
447
- clearInterval(this.cursorInterval);
448
- }
449
-
450
- PasswordInput.allInputs.delete(this);
451
-
452
- if (PasswordInput.allInputs.size === 0 && PasswordInput.globalClickHandler) {
453
- document.removeEventListener('click', PasswordInput.globalClickHandler, true);
454
- document.removeEventListener('touchstart', PasswordInput.globalClickHandler, true);
455
- PasswordInput.globalClickHandler = null;
456
- }
457
-
458
- super.destroy && super.destroy();
459
- }
460
- }
461
-
462
- export default PasswordInput;
@@ -1,88 +0,0 @@
1
- import Component from '../core/Component.js';
2
- /**
3
- * Barre de progression
4
- * @class
5
- * @extends Component
6
- * @property {number} progress - Progression (0-100)
7
- * @property {string} platform - Plateforme ('material' ou 'cupertino')
8
- * @property {number} height - Hauteur de la barre
9
- */
10
- class ProgressBar extends Component {
11
- /**
12
- * Crée une instance de ProgressBar
13
- * @param {CanvasFramework} framework - Framework parent
14
- * @param {Object} [options={}] - Options de configuration
15
- * @param {number} [options.progress=0] - Progression (0-100)
16
- * @param {number} [options.height=4] - Hauteur de la barre
17
- */
18
- constructor(framework, options = {}) {
19
- super(framework, options);
20
- this.progress = options.progress || 0; // 0-100
21
- this.platform = framework.platform;
22
- this.height = options.height || 4;
23
- }
24
-
25
- /**
26
- * Dessine la barre de progression
27
- * @param {CanvasRenderingContext2D} ctx - Contexte de dessin
28
- */
29
- draw(ctx) {
30
- ctx.save();
31
-
32
- if (this.platform === 'material') {
33
- // Track
34
- ctx.fillStyle = '#E0E0E0';
35
- ctx.fillRect(this.x, this.y, this.width, this.height);
36
-
37
- // Progress
38
- ctx.fillStyle = '#6200EE';
39
- ctx.fillRect(this.x, this.y, (this.width * this.progress) / 100, this.height);
40
- } else {
41
- // Cupertino
42
- ctx.fillStyle = '#E5E5EA';
43
- ctx.beginPath();
44
- this.roundRect(ctx, this.x, this.y, this.width, this.height, this.height / 2);
45
- ctx.fill();
46
-
47
- ctx.fillStyle = '#007AFF';
48
- ctx.beginPath();
49
- this.roundRect(ctx, this.x, this.y, (this.width * this.progress) / 100, this.height, this.height / 2);
50
- ctx.fill();
51
- }
52
-
53
- ctx.restore();
54
- }
55
-
56
- /**
57
- * Dessine un rectangle avec coins arrondis
58
- * @param {CanvasRenderingContext2D} ctx - Contexte de dessin
59
- * @param {number} x - Position X
60
- * @param {number} y - Position Y
61
- * @param {number} width - Largeur
62
- * @param {number} height - Hauteur
63
- * @param {number} radius - Rayon des coins
64
- * @private
65
- */
66
- roundRect(ctx, x, y, width, height, radius) {
67
- if (width < radius * 2) width = radius * 2;
68
- ctx.moveTo(x + radius, y);
69
- ctx.lineTo(x + width - radius, y);
70
- ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
71
- ctx.lineTo(x + width, y + height - radius);
72
- ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
73
- ctx.lineTo(x + radius, y + height);
74
- ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
75
- ctx.lineTo(x, y + radius);
76
- ctx.quadraticCurveTo(x, y, x + radius, y);
77
- }
78
-
79
- /**
80
- * Vérifie si un point est dans les limites (toujours false pour ProgressBar)
81
- * @returns {boolean} False (non cliquable)
82
- */
83
- isPointInside() {
84
- return false;
85
- }
86
- }
87
-
88
- export default ProgressBar;