@uibit/scratch-reveal 0.1.0 → 0.1.1
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 +10 -0
- package/custom-elements.json +472 -2
- package/dist/frameworks/angular/index.ts +6 -0
- package/dist/frameworks/preact/index.d.ts +1 -0
- package/dist/frameworks/react/index.d.ts +1 -0
- package/dist/frameworks/solid/index.d.ts +1 -0
- package/dist/frameworks/stencil/index.d.ts +1 -0
- package/dist/frameworks/svelte/index.svelte +5 -0
- package/dist/frameworks/vue/index.ts +2 -1
- package/dist/scratch-reveal.d.ts +11 -1
- package/dist/scratch-reveal.d.ts.map +1 -1
- package/dist/scratch-reveal.js +11 -1
- package/dist/scratch-reveal.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# Scratch Reveal
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@uibit/scratch-reveal)
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
[Interactive Demonstration](https://rawlings.github.io/uibit/components/scratch-reveal)
|
|
4
7
|
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @uibit/scratch-reveal
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
5
15
|
Scratch Reveal is an interactive promotional display component that mimics a physical scratch-card interaction. By obscuring content (such as a discount code, coupon, or image) with an erasable overlay, it introduces gamification and anticipation to user actions.
|
|
6
16
|
|
|
7
17
|
## Value Delivery
|
package/custom-elements.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"declarations": [
|
|
32
32
|
{
|
|
33
33
|
"kind": "class",
|
|
34
|
-
"description": "Canvas-based scratch card that reveals slotted content as the user
|
|
34
|
+
"description": "Canvas-based scratch card that reveals slotted content as the user",
|
|
35
35
|
"name": "ScratchReveal",
|
|
36
36
|
"cssProperties": [
|
|
37
37
|
{
|
|
@@ -228,7 +228,213 @@
|
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
"kind": "method",
|
|
231
|
-
"name": "reset"
|
|
231
|
+
"name": "reset",
|
|
232
|
+
"description": "\n\nResets the scratch card canvas overlay to its fully obscured state."
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"kind": "field",
|
|
236
|
+
"name": "locale",
|
|
237
|
+
"type": {
|
|
238
|
+
"text": "string"
|
|
239
|
+
},
|
|
240
|
+
"default": "''",
|
|
241
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
242
|
+
"attribute": "locale",
|
|
243
|
+
"inheritedFrom": {
|
|
244
|
+
"name": "UIBitElement",
|
|
245
|
+
"module": "../../platform/core/src/element.ts"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"kind": "field",
|
|
250
|
+
"name": "resolvedLocale",
|
|
251
|
+
"type": {
|
|
252
|
+
"text": "string | undefined"
|
|
253
|
+
},
|
|
254
|
+
"description": "Resolves the active locale for formatting and localization.\nChecks the `locale` property first, then traverses up the DOM to find\nthe nearest ancestor with a `lang` attribute, and finally falls back\nto undefined (which defaults to browser locale).",
|
|
255
|
+
"readonly": true,
|
|
256
|
+
"inheritedFrom": {
|
|
257
|
+
"name": "UIBitElement",
|
|
258
|
+
"module": "../../platform/core/src/element.ts"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"kind": "field",
|
|
263
|
+
"name": "_disposables",
|
|
264
|
+
"type": {
|
|
265
|
+
"text": "Set<() => void>"
|
|
266
|
+
},
|
|
267
|
+
"privacy": "private",
|
|
268
|
+
"default": "new Set()",
|
|
269
|
+
"inheritedFrom": {
|
|
270
|
+
"name": "UIBitElement",
|
|
271
|
+
"module": "../../platform/core/src/element.ts"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"kind": "method",
|
|
276
|
+
"name": "createProperty",
|
|
277
|
+
"static": true,
|
|
278
|
+
"parameters": [
|
|
279
|
+
{
|
|
280
|
+
"name": "name",
|
|
281
|
+
"type": {
|
|
282
|
+
"text": "PropertyKey"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "options",
|
|
287
|
+
"optional": true,
|
|
288
|
+
"type": {
|
|
289
|
+
"text": "PropertyDeclaration"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default.",
|
|
294
|
+
"inheritedFrom": {
|
|
295
|
+
"name": "UIBitElement",
|
|
296
|
+
"module": "../../platform/core/src/element.ts"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"kind": "method",
|
|
301
|
+
"name": "finalizeStyles",
|
|
302
|
+
"static": true,
|
|
303
|
+
"return": {
|
|
304
|
+
"type": {
|
|
305
|
+
"text": "Array<any>"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"parameters": [
|
|
309
|
+
{
|
|
310
|
+
"name": "styles",
|
|
311
|
+
"optional": true,
|
|
312
|
+
"type": {
|
|
313
|
+
"text": "CSSResultGroup"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles.",
|
|
318
|
+
"inheritedFrom": {
|
|
319
|
+
"name": "UIBitElement",
|
|
320
|
+
"module": "../../platform/core/src/element.ts"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"kind": "method",
|
|
325
|
+
"name": "dispatchCustomEvent",
|
|
326
|
+
"return": {
|
|
327
|
+
"type": {
|
|
328
|
+
"text": "boolean"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"parameters": [
|
|
332
|
+
{
|
|
333
|
+
"name": "name",
|
|
334
|
+
"type": {
|
|
335
|
+
"text": "string"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "detail",
|
|
340
|
+
"optional": true,
|
|
341
|
+
"type": {
|
|
342
|
+
"text": "T"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "options",
|
|
347
|
+
"optional": true,
|
|
348
|
+
"type": {
|
|
349
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options.",
|
|
354
|
+
"inheritedFrom": {
|
|
355
|
+
"name": "UIBitElement",
|
|
356
|
+
"module": "../../platform/core/src/element.ts"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"kind": "method",
|
|
361
|
+
"name": "getCssPropertyValue",
|
|
362
|
+
"return": {
|
|
363
|
+
"type": {
|
|
364
|
+
"text": "string"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"parameters": [
|
|
368
|
+
{
|
|
369
|
+
"name": "propertyName",
|
|
370
|
+
"type": {
|
|
371
|
+
"text": "string"
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element.",
|
|
376
|
+
"inheritedFrom": {
|
|
377
|
+
"name": "UIBitElement",
|
|
378
|
+
"module": "../../platform/core/src/element.ts"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"kind": "method",
|
|
383
|
+
"name": "registerDisposable",
|
|
384
|
+
"parameters": [
|
|
385
|
+
{
|
|
386
|
+
"name": "cleanup",
|
|
387
|
+
"type": {
|
|
388
|
+
"text": "() => void"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM.",
|
|
393
|
+
"inheritedFrom": {
|
|
394
|
+
"name": "UIBitElement",
|
|
395
|
+
"module": "../../platform/core/src/element.ts"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"kind": "method",
|
|
400
|
+
"name": "listen",
|
|
401
|
+
"return": {
|
|
402
|
+
"type": {
|
|
403
|
+
"text": "() => void"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"parameters": [
|
|
407
|
+
{
|
|
408
|
+
"name": "target",
|
|
409
|
+
"type": {
|
|
410
|
+
"text": "EventTarget"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "type",
|
|
415
|
+
"type": {
|
|
416
|
+
"text": "K"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "listener",
|
|
421
|
+
"type": {
|
|
422
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "options",
|
|
427
|
+
"optional": true,
|
|
428
|
+
"type": {
|
|
429
|
+
"text": "boolean | AddEventListenerOptions"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected.",
|
|
434
|
+
"inheritedFrom": {
|
|
435
|
+
"name": "UIBitElement",
|
|
436
|
+
"module": "../../platform/core/src/element.ts"
|
|
437
|
+
}
|
|
232
438
|
}
|
|
233
439
|
],
|
|
234
440
|
"events": [
|
|
@@ -256,12 +462,32 @@
|
|
|
256
462
|
"default": "50",
|
|
257
463
|
"description": "Percentage (0–100) of the overlay that must be scratched before the `scratch-reveal` event fires.",
|
|
258
464
|
"fieldName": "revealThreshold"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "locale",
|
|
468
|
+
"type": {
|
|
469
|
+
"text": "string"
|
|
470
|
+
},
|
|
471
|
+
"default": "''",
|
|
472
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
473
|
+
"fieldName": "locale",
|
|
474
|
+
"inheritedFrom": {
|
|
475
|
+
"name": "UIBitElement",
|
|
476
|
+
"module": "../../platform/core/src/element.ts"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"cssStates": [
|
|
481
|
+
{
|
|
482
|
+
"name": "revealed",
|
|
483
|
+
"description": "Active when the scratch card has reached the reveal threshold."
|
|
259
484
|
}
|
|
260
485
|
],
|
|
261
486
|
"superclass": {
|
|
262
487
|
"name": "UIBitElement",
|
|
263
488
|
"package": "@uibit/core"
|
|
264
489
|
},
|
|
490
|
+
"summary": "An interactive canvas-based scratch card reveal overlay component.\nscratches over a configurable overlay layer.",
|
|
265
491
|
"tagName": "uibit-scratch-reveal",
|
|
266
492
|
"customElement": true
|
|
267
493
|
}
|
|
@@ -319,6 +545,250 @@
|
|
|
319
545
|
"path": "src/types.ts",
|
|
320
546
|
"declarations": [],
|
|
321
547
|
"exports": []
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"kind": "javascript-module",
|
|
551
|
+
"path": "../../platform/core/src/element.ts",
|
|
552
|
+
"declarations": [
|
|
553
|
+
{
|
|
554
|
+
"kind": "class",
|
|
555
|
+
"description": "A foundational base class for all UIBit web components.\nProvides custom event helpers, default kebab-case attribute mapping,\nautomatic cleanup/disposable tracking, and auto-injected reset styles.",
|
|
556
|
+
"name": "UIBitElement",
|
|
557
|
+
"members": [
|
|
558
|
+
{
|
|
559
|
+
"kind": "field",
|
|
560
|
+
"name": "locale",
|
|
561
|
+
"type": {
|
|
562
|
+
"text": "string"
|
|
563
|
+
},
|
|
564
|
+
"default": "''",
|
|
565
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
566
|
+
"attribute": "locale"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"kind": "field",
|
|
570
|
+
"name": "resolvedLocale",
|
|
571
|
+
"type": {
|
|
572
|
+
"text": "string | undefined"
|
|
573
|
+
},
|
|
574
|
+
"description": "Resolves the active locale for formatting and localization.\nChecks the `locale` property first, then traverses up the DOM to find\nthe nearest ancestor with a `lang` attribute, and finally falls back\nto undefined (which defaults to browser locale).",
|
|
575
|
+
"readonly": true
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"kind": "field",
|
|
579
|
+
"name": "_disposables",
|
|
580
|
+
"type": {
|
|
581
|
+
"text": "Set<() => void>"
|
|
582
|
+
},
|
|
583
|
+
"privacy": "private",
|
|
584
|
+
"default": "new Set()"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"kind": "method",
|
|
588
|
+
"name": "createProperty",
|
|
589
|
+
"static": true,
|
|
590
|
+
"parameters": [
|
|
591
|
+
{
|
|
592
|
+
"name": "name",
|
|
593
|
+
"type": {
|
|
594
|
+
"text": "PropertyKey"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"name": "options",
|
|
599
|
+
"optional": true,
|
|
600
|
+
"type": {
|
|
601
|
+
"text": "PropertyDeclaration"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default."
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"kind": "method",
|
|
609
|
+
"name": "finalizeStyles",
|
|
610
|
+
"static": true,
|
|
611
|
+
"return": {
|
|
612
|
+
"type": {
|
|
613
|
+
"text": "Array<any>"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"parameters": [
|
|
617
|
+
{
|
|
618
|
+
"name": "styles",
|
|
619
|
+
"optional": true,
|
|
620
|
+
"type": {
|
|
621
|
+
"text": "CSSResultGroup"
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
],
|
|
625
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles."
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"kind": "method",
|
|
629
|
+
"name": "dispatchCustomEvent",
|
|
630
|
+
"return": {
|
|
631
|
+
"type": {
|
|
632
|
+
"text": "boolean"
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"parameters": [
|
|
636
|
+
{
|
|
637
|
+
"name": "name",
|
|
638
|
+
"type": {
|
|
639
|
+
"text": "string"
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "detail",
|
|
644
|
+
"optional": true,
|
|
645
|
+
"type": {
|
|
646
|
+
"text": "T"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"name": "options",
|
|
651
|
+
"optional": true,
|
|
652
|
+
"type": {
|
|
653
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options."
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"kind": "method",
|
|
661
|
+
"name": "getCssPropertyValue",
|
|
662
|
+
"return": {
|
|
663
|
+
"type": {
|
|
664
|
+
"text": "string"
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
"parameters": [
|
|
668
|
+
{
|
|
669
|
+
"name": "propertyName",
|
|
670
|
+
"type": {
|
|
671
|
+
"text": "string"
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
],
|
|
675
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element."
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"kind": "method",
|
|
679
|
+
"name": "registerDisposable",
|
|
680
|
+
"parameters": [
|
|
681
|
+
{
|
|
682
|
+
"name": "cleanup",
|
|
683
|
+
"type": {
|
|
684
|
+
"text": "() => void"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
],
|
|
688
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM."
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"kind": "method",
|
|
692
|
+
"name": "listen",
|
|
693
|
+
"return": {
|
|
694
|
+
"type": {
|
|
695
|
+
"text": "() => void"
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
"parameters": [
|
|
699
|
+
{
|
|
700
|
+
"name": "target",
|
|
701
|
+
"type": {
|
|
702
|
+
"text": "EventTarget"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"name": "type",
|
|
707
|
+
"type": {
|
|
708
|
+
"text": "K"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "listener",
|
|
713
|
+
"type": {
|
|
714
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "options",
|
|
719
|
+
"optional": true,
|
|
720
|
+
"type": {
|
|
721
|
+
"text": "boolean | AddEventListenerOptions"
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
],
|
|
725
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected."
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"kind": "method",
|
|
729
|
+
"name": "listen",
|
|
730
|
+
"return": {
|
|
731
|
+
"type": {
|
|
732
|
+
"text": "() => void"
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"parameters": [
|
|
736
|
+
{
|
|
737
|
+
"name": "target",
|
|
738
|
+
"type": {
|
|
739
|
+
"text": "EventTarget"
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"name": "type",
|
|
744
|
+
"type": {
|
|
745
|
+
"text": "string"
|
|
746
|
+
}
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"name": "listener",
|
|
750
|
+
"type": {
|
|
751
|
+
"text": "EventListenerOrEventListenerObject"
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "options",
|
|
756
|
+
"optional": true,
|
|
757
|
+
"type": {
|
|
758
|
+
"text": "boolean | AddEventListenerOptions"
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
],
|
|
764
|
+
"attributes": [
|
|
765
|
+
{
|
|
766
|
+
"name": "locale",
|
|
767
|
+
"type": {
|
|
768
|
+
"text": "string"
|
|
769
|
+
},
|
|
770
|
+
"default": "''",
|
|
771
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
772
|
+
"fieldName": "locale"
|
|
773
|
+
}
|
|
774
|
+
],
|
|
775
|
+
"superclass": {
|
|
776
|
+
"name": "LitElement",
|
|
777
|
+
"package": "lit"
|
|
778
|
+
},
|
|
779
|
+
"customElement": true
|
|
780
|
+
}
|
|
781
|
+
],
|
|
782
|
+
"exports": [
|
|
783
|
+
{
|
|
784
|
+
"kind": "js",
|
|
785
|
+
"name": "UIBitElement",
|
|
786
|
+
"declaration": {
|
|
787
|
+
"name": "UIBitElement",
|
|
788
|
+
"module": "../../platform/core/src/element.ts"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
]
|
|
322
792
|
}
|
|
323
793
|
]
|
|
324
794
|
}
|
|
@@ -19,9 +19,15 @@ export class NgxScratchReveal {
|
|
|
19
19
|
this.el.nativeElement.revealThreshold = this.revealThreshold();
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
+
effect(() => {
|
|
23
|
+
if (this.el.nativeElement) {
|
|
24
|
+
this.el.nativeElement.locale = this.locale();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
readonly revealThreshold = input<number, any>(50, { transform: numberAttribute });
|
|
30
|
+
readonly locale = input<string, any>('');
|
|
25
31
|
|
|
26
32
|
readonly scratchProgress = output<CustomEvent<{ percentage: number }>>();
|
|
27
33
|
readonly scratchReveal = output<CustomEvent<{ percentage: number }>>();
|
|
@@ -7,6 +7,7 @@ declare module 'solid-js' {
|
|
|
7
7
|
interface IntrinsicElements {
|
|
8
8
|
'uibit-scratch-reveal': Partial<HTMLElementClass> & JSX.HTMLAttributes<HTMLElementClass> & {
|
|
9
9
|
revealThreshold?: number;
|
|
10
|
+
locale?: string;
|
|
10
11
|
"on:scratch-progress"?: (event: CustomEvent) => void;
|
|
11
12
|
"on:scratch-reveal"?: (event: CustomEvent) => void;
|
|
12
13
|
};
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
let {
|
|
6
6
|
revealThreshold = undefined,
|
|
7
|
+
locale = undefined,
|
|
7
8
|
children
|
|
8
9
|
} = $props<{
|
|
9
10
|
children?: any;
|
|
10
11
|
revealThreshold?: number;
|
|
12
|
+
locale?: string;
|
|
11
13
|
|
|
12
14
|
}>();
|
|
13
15
|
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
if (elementRef && revealThreshold !== undefined) {
|
|
18
20
|
elementRef.revealThreshold = revealThreshold;
|
|
19
21
|
}
|
|
22
|
+
if (elementRef && locale !== undefined) {
|
|
23
|
+
elementRef.locale = locale;
|
|
24
|
+
}
|
|
20
25
|
});
|
|
21
26
|
|
|
22
27
|
</script>
|
|
@@ -5,7 +5,8 @@ import '@uibit/scratch-reveal';
|
|
|
5
5
|
export const ScratchReveal = defineComponent({
|
|
6
6
|
name: 'ScratchReveal',
|
|
7
7
|
props: {
|
|
8
|
-
revealThreshold: { type: [String, Number, Boolean, Array, Object] as any }
|
|
8
|
+
revealThreshold: { type: [String, Number, Boolean, Array, Object] as any },
|
|
9
|
+
locale: { type: [String, Number, Boolean, Array, Object] as any }
|
|
9
10
|
},
|
|
10
11
|
emits: ['scratch-progress', 'scratch-reveal'],
|
|
11
12
|
setup(props, { slots, emit }) {
|
package/dist/scratch-reveal.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { UIBitElement } from '@uibit/core';
|
|
2
2
|
/**
|
|
3
3
|
* Canvas-based scratch card that reveals slotted content as the user
|
|
4
|
+
|
|
5
|
+
* @summary An interactive canvas-based scratch card reveal overlay component.
|
|
4
6
|
* scratches over a configurable overlay layer.
|
|
5
7
|
*
|
|
6
8
|
* @fires {{ percentage: number }} scratch-progress - Fired as the user scratches; `detail.percentage` is 0–100
|
|
@@ -19,7 +21,8 @@ import { UIBitElement } from '@uibit/core';
|
|
|
19
21
|
* @cssprop [--uibit-scratch-reveal-overlay-color=#d1d5db] - Fill color of the scratchable overlay
|
|
20
22
|
* @cssprop [--uibit-scratch-reveal-instructions-color=rgba(0,0,0,0.4)] - Color of the scratch instruction hint
|
|
21
23
|
* @cssprop [--uibit-scratch-reveal-instructions-font-size=0.875rem] - Font size of the scratch instruction hint
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
* @cssstate revealed - Active when the scratch card has reached the reveal threshold.*/
|
|
23
26
|
export declare class ScratchReveal extends UIBitElement {
|
|
24
27
|
static styles: import("lit").CSSResult;
|
|
25
28
|
/** Percentage (0–100) of the overlay that must be scratched before the `scratch-reveal` event fires. */
|
|
@@ -42,6 +45,13 @@ export declare class ScratchReveal extends UIBitElement {
|
|
|
42
45
|
private scratch;
|
|
43
46
|
private calculateRevealPercentage;
|
|
44
47
|
disconnectedCallback(): void;
|
|
48
|
+
/**
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
* Resets the scratch card canvas overlay to its fully obscured state.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
*/
|
|
45
55
|
reset(): void;
|
|
46
56
|
render(): import("lit").TemplateResult<1>;
|
|
47
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch-reveal.d.ts","sourceRoot":"","sources":["../src/scratch-reveal.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAC;AAI/D
|
|
1
|
+
{"version":3,"file":"scratch-reveal.d.ts","sourceRoot":"","sources":["../src/scratch-reveal.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAC;AAI/D;;;;;;;;;;;;;;;;;;;;;;;wFAuBwF;AACxF,qBACa,aAAc,SAAQ,YAAY;IAC7C,MAAM,CAAC,MAAM,0BAAU;IAEvB,wGAAwG;IAC7C,eAAe,SAAM;IAEvE,OAAO,CAAC,gBAAgB,CAAK;IAEtC,IAAI,SAAS,IAAI,MAAM,CAStB;IAEQ,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,gBAAgB,CAAQ;IAEzC,OAAO,CAAC,MAAM,CAAC,CAAoB;IACnC,OAAO,CAAC,GAAG,CAAC,CAAkC;IAC9C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,CAAS;IAExB,iBAAiB,SAEhB;IAED,YAAY,SAEX;IAED,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,oBAAoB;IAyB5B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,OAAO;IAuBf,OAAO,CAAC,yBAAyB;IA6BjC,oBAAoB,SAMnB;IAED;;;;;;OAMG;IAGH,KAAK,SAQJ;IAED,MAAM,oCAgBL;CACF;eAEc,aAAa"}
|
package/dist/scratch-reveal.js
CHANGED
|
@@ -10,6 +10,8 @@ import { property, state } from 'lit/decorators.js';
|
|
|
10
10
|
import { styles } from './styles';
|
|
11
11
|
/**
|
|
12
12
|
* Canvas-based scratch card that reveals slotted content as the user
|
|
13
|
+
|
|
14
|
+
* @summary An interactive canvas-based scratch card reveal overlay component.
|
|
13
15
|
* scratches over a configurable overlay layer.
|
|
14
16
|
*
|
|
15
17
|
* @fires {{ percentage: number }} scratch-progress - Fired as the user scratches; `detail.percentage` is 0–100
|
|
@@ -28,7 +30,8 @@ import { styles } from './styles';
|
|
|
28
30
|
* @cssprop [--uibit-scratch-reveal-overlay-color=#d1d5db] - Fill color of the scratchable overlay
|
|
29
31
|
* @cssprop [--uibit-scratch-reveal-instructions-color=rgba(0,0,0,0.4)] - Color of the scratch instruction hint
|
|
30
32
|
* @cssprop [--uibit-scratch-reveal-instructions-font-size=0.875rem] - Font size of the scratch instruction hint
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
* @cssstate revealed - Active when the scratch card has reached the reveal threshold.*/
|
|
32
35
|
let ScratchReveal = class ScratchReveal extends UIBitElement {
|
|
33
36
|
constructor() {
|
|
34
37
|
super(...arguments);
|
|
@@ -160,6 +163,13 @@ let ScratchReveal = class ScratchReveal extends UIBitElement {
|
|
|
160
163
|
this._rafId = undefined;
|
|
161
164
|
}
|
|
162
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
* Resets the scratch card canvas overlay to its fully obscured state.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
*/
|
|
163
173
|
reset() {
|
|
164
174
|
this.isRevealed = false;
|
|
165
175
|
this.showInstructions = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch-reveal.js","sourceRoot":"","sources":["../src/scratch-reveal.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC
|
|
1
|
+
{"version":3,"file":"scratch-reveal.js","sourceRoot":"","sources":["../src/scratch-reveal.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,EAA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AE;uDAA8B;AAarB;IAAhB,KAAK,EAAE;iDAA4B;AACnB;IAAhB,KAAK,EAAE;uDAAiC;AApB9B,aAAa;IADzB,aAAa,CAAC,sBAAsB,CAAC;GACzB,aAAa,CAiMzB;;AAED,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uibit/scratch-reveal",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A gamified, accessible scratch-off panel component that reveals hidden content. Users can scratch off the overlay canvas layer by dragging or touching.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"directory": "packages/components/scratch-reveal"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@uibit/core": "0.
|
|
51
|
+
"@uibit/core": "0.2.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^20.19.43",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"tagName": "uibit-scratch-reveal"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
|
-
"build": "cem analyze --
|
|
89
|
-
"dev": "concurrently \"cem analyze --
|
|
90
|
-
"analyze": "cem analyze --
|
|
88
|
+
"build": "cem analyze --config ../custom-elements-manifest.config.js && uibit-codegen --package . && tsc",
|
|
89
|
+
"dev": "concurrently \"cem analyze --config ../custom-elements-manifest.config.js --watch\" \"tsc --watch\"",
|
|
90
|
+
"analyze": "cem analyze --config ../custom-elements-manifest.config.js",
|
|
91
91
|
"typecheck": "tsc --noEmit"
|
|
92
92
|
}
|
|
93
93
|
}
|