@uibit/number-increment 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 +470 -20
- package/dist/frameworks/angular/index.ts +6 -6
- package/dist/frameworks/preact/index.d.ts +1 -1
- package/dist/frameworks/react/index.d.ts +1 -1
- package/dist/frameworks/solid/index.d.ts +1 -1
- package/dist/frameworks/stencil/index.d.ts +1 -1
- package/dist/frameworks/svelte/index.svelte +5 -5
- package/dist/frameworks/vue/index.ts +2 -2
- package/dist/number-increment.d.ts +4 -3
- package/dist/number-increment.d.ts.map +1 -1
- package/dist/number-increment.js +10 -8
- package/dist/number-increment.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# Number Ticker
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@uibit/number-increment)
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
[Interactive Demonstration](https://rawlings.github.io/uibit/number-ticker)
|
|
4
7
|
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @uibit/number-increment
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
5
15
|
Number Ticker is a visual performance indicator component that animates numerical statistics, percentages, and currencies when they enter the user's viewport. By displaying numbers with a smooth counting motion rather than as static values, it highlights milestones and growth metrics.
|
|
6
16
|
|
|
7
17
|
## Value Delivery
|
package/custom-elements.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"declarations": [
|
|
40
40
|
{
|
|
41
41
|
"kind": "class",
|
|
42
|
-
"description": "Animates a numeric value from zero (or a custom start) up to the `value
|
|
42
|
+
"description": "Animates a numeric value from zero (or a custom start) up to the `value`",
|
|
43
43
|
"name": "NumberIncrement",
|
|
44
44
|
"cssProperties": [
|
|
45
45
|
{
|
|
@@ -109,16 +109,6 @@
|
|
|
109
109
|
"description": "Number of decimal places to display. Used only if no custom formatter is provided.",
|
|
110
110
|
"attribute": "decimals"
|
|
111
111
|
},
|
|
112
|
-
{
|
|
113
|
-
"kind": "field",
|
|
114
|
-
"name": "locale",
|
|
115
|
-
"type": {
|
|
116
|
-
"text": "string"
|
|
117
|
-
},
|
|
118
|
-
"default": "''",
|
|
119
|
-
"description": "BCP 47 locale string for number formatting (e.g. \"en-US\"). Defaults to browser locale if options is set.",
|
|
120
|
-
"attribute": "locale"
|
|
121
|
-
},
|
|
122
112
|
{
|
|
123
113
|
"kind": "field",
|
|
124
114
|
"name": "options",
|
|
@@ -278,6 +268,211 @@
|
|
|
278
268
|
}
|
|
279
269
|
}
|
|
280
270
|
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"kind": "field",
|
|
274
|
+
"name": "locale",
|
|
275
|
+
"type": {
|
|
276
|
+
"text": "string"
|
|
277
|
+
},
|
|
278
|
+
"default": "''",
|
|
279
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
280
|
+
"attribute": "locale",
|
|
281
|
+
"inheritedFrom": {
|
|
282
|
+
"name": "UIBitElement",
|
|
283
|
+
"module": "../../platform/core/src/element.ts"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"kind": "field",
|
|
288
|
+
"name": "resolvedLocale",
|
|
289
|
+
"type": {
|
|
290
|
+
"text": "string | undefined"
|
|
291
|
+
},
|
|
292
|
+
"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).",
|
|
293
|
+
"readonly": true,
|
|
294
|
+
"inheritedFrom": {
|
|
295
|
+
"name": "UIBitElement",
|
|
296
|
+
"module": "../../platform/core/src/element.ts"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"kind": "field",
|
|
301
|
+
"name": "_disposables",
|
|
302
|
+
"type": {
|
|
303
|
+
"text": "Set<() => void>"
|
|
304
|
+
},
|
|
305
|
+
"privacy": "private",
|
|
306
|
+
"default": "new Set()",
|
|
307
|
+
"inheritedFrom": {
|
|
308
|
+
"name": "UIBitElement",
|
|
309
|
+
"module": "../../platform/core/src/element.ts"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"kind": "method",
|
|
314
|
+
"name": "createProperty",
|
|
315
|
+
"static": true,
|
|
316
|
+
"parameters": [
|
|
317
|
+
{
|
|
318
|
+
"name": "name",
|
|
319
|
+
"type": {
|
|
320
|
+
"text": "PropertyKey"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "options",
|
|
325
|
+
"optional": true,
|
|
326
|
+
"type": {
|
|
327
|
+
"text": "PropertyDeclaration"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default.",
|
|
332
|
+
"inheritedFrom": {
|
|
333
|
+
"name": "UIBitElement",
|
|
334
|
+
"module": "../../platform/core/src/element.ts"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"kind": "method",
|
|
339
|
+
"name": "finalizeStyles",
|
|
340
|
+
"static": true,
|
|
341
|
+
"return": {
|
|
342
|
+
"type": {
|
|
343
|
+
"text": "Array<any>"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"parameters": [
|
|
347
|
+
{
|
|
348
|
+
"name": "styles",
|
|
349
|
+
"optional": true,
|
|
350
|
+
"type": {
|
|
351
|
+
"text": "CSSResultGroup"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles.",
|
|
356
|
+
"inheritedFrom": {
|
|
357
|
+
"name": "UIBitElement",
|
|
358
|
+
"module": "../../platform/core/src/element.ts"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"kind": "method",
|
|
363
|
+
"name": "dispatchCustomEvent",
|
|
364
|
+
"return": {
|
|
365
|
+
"type": {
|
|
366
|
+
"text": "boolean"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"parameters": [
|
|
370
|
+
{
|
|
371
|
+
"name": "name",
|
|
372
|
+
"type": {
|
|
373
|
+
"text": "string"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"name": "detail",
|
|
378
|
+
"optional": true,
|
|
379
|
+
"type": {
|
|
380
|
+
"text": "T"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"name": "options",
|
|
385
|
+
"optional": true,
|
|
386
|
+
"type": {
|
|
387
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options.",
|
|
392
|
+
"inheritedFrom": {
|
|
393
|
+
"name": "UIBitElement",
|
|
394
|
+
"module": "../../platform/core/src/element.ts"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"kind": "method",
|
|
399
|
+
"name": "getCssPropertyValue",
|
|
400
|
+
"return": {
|
|
401
|
+
"type": {
|
|
402
|
+
"text": "string"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"parameters": [
|
|
406
|
+
{
|
|
407
|
+
"name": "propertyName",
|
|
408
|
+
"type": {
|
|
409
|
+
"text": "string"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element.",
|
|
414
|
+
"inheritedFrom": {
|
|
415
|
+
"name": "UIBitElement",
|
|
416
|
+
"module": "../../platform/core/src/element.ts"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"kind": "method",
|
|
421
|
+
"name": "registerDisposable",
|
|
422
|
+
"parameters": [
|
|
423
|
+
{
|
|
424
|
+
"name": "cleanup",
|
|
425
|
+
"type": {
|
|
426
|
+
"text": "() => void"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM.",
|
|
431
|
+
"inheritedFrom": {
|
|
432
|
+
"name": "UIBitElement",
|
|
433
|
+
"module": "../../platform/core/src/element.ts"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"kind": "method",
|
|
438
|
+
"name": "listen",
|
|
439
|
+
"return": {
|
|
440
|
+
"type": {
|
|
441
|
+
"text": "() => void"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"parameters": [
|
|
445
|
+
{
|
|
446
|
+
"name": "target",
|
|
447
|
+
"type": {
|
|
448
|
+
"text": "EventTarget"
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"name": "type",
|
|
453
|
+
"type": {
|
|
454
|
+
"text": "K"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"name": "listener",
|
|
459
|
+
"type": {
|
|
460
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"name": "options",
|
|
465
|
+
"optional": true,
|
|
466
|
+
"type": {
|
|
467
|
+
"text": "boolean | AddEventListenerOptions"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected.",
|
|
472
|
+
"inheritedFrom": {
|
|
473
|
+
"name": "UIBitElement",
|
|
474
|
+
"module": "../../platform/core/src/element.ts"
|
|
475
|
+
}
|
|
281
476
|
}
|
|
282
477
|
],
|
|
283
478
|
"events": [
|
|
@@ -323,15 +518,6 @@
|
|
|
323
518
|
"description": "Number of decimal places to display. Used only if no custom formatter is provided.",
|
|
324
519
|
"fieldName": "decimals"
|
|
325
520
|
},
|
|
326
|
-
{
|
|
327
|
-
"name": "locale",
|
|
328
|
-
"type": {
|
|
329
|
-
"text": "string"
|
|
330
|
-
},
|
|
331
|
-
"default": "''",
|
|
332
|
-
"description": "BCP 47 locale string for number formatting (e.g. \"en-US\"). Defaults to browser locale if options is set.",
|
|
333
|
-
"fieldName": "locale"
|
|
334
|
-
},
|
|
335
521
|
{
|
|
336
522
|
"name": "options",
|
|
337
523
|
"type": {
|
|
@@ -366,12 +552,32 @@
|
|
|
366
552
|
"default": "false",
|
|
367
553
|
"description": "Re-animate each time the element re-enters the viewport.",
|
|
368
554
|
"fieldName": "repeat"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "locale",
|
|
558
|
+
"type": {
|
|
559
|
+
"text": "string"
|
|
560
|
+
},
|
|
561
|
+
"default": "''",
|
|
562
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
563
|
+
"fieldName": "locale",
|
|
564
|
+
"inheritedFrom": {
|
|
565
|
+
"name": "UIBitElement",
|
|
566
|
+
"module": "../../platform/core/src/element.ts"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"cssStates": [
|
|
571
|
+
{
|
|
572
|
+
"name": "animating",
|
|
573
|
+
"description": "Active when the count animation is running."
|
|
369
574
|
}
|
|
370
575
|
],
|
|
371
576
|
"superclass": {
|
|
372
577
|
"name": "UIBitElement",
|
|
373
578
|
"package": "@uibit/core"
|
|
374
579
|
},
|
|
580
|
+
"summary": "A scroll-triggered animated numeric counter component.\nattribute once the element scrolls into the viewport. Supports easing,\ndecimal places, and custom formatting functions.\n\nThe animation runs entirely in the shadow DOM on a rAF loop so it never\nblocks the main thread via layout thrashing.",
|
|
375
581
|
"tagName": "uibit-number-increment",
|
|
376
582
|
"customElement": true
|
|
377
583
|
}
|
|
@@ -429,6 +635,250 @@
|
|
|
429
635
|
"path": "src/types.ts",
|
|
430
636
|
"declarations": [],
|
|
431
637
|
"exports": []
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"kind": "javascript-module",
|
|
641
|
+
"path": "../../platform/core/src/element.ts",
|
|
642
|
+
"declarations": [
|
|
643
|
+
{
|
|
644
|
+
"kind": "class",
|
|
645
|
+
"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.",
|
|
646
|
+
"name": "UIBitElement",
|
|
647
|
+
"members": [
|
|
648
|
+
{
|
|
649
|
+
"kind": "field",
|
|
650
|
+
"name": "locale",
|
|
651
|
+
"type": {
|
|
652
|
+
"text": "string"
|
|
653
|
+
},
|
|
654
|
+
"default": "''",
|
|
655
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
656
|
+
"attribute": "locale"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "field",
|
|
660
|
+
"name": "resolvedLocale",
|
|
661
|
+
"type": {
|
|
662
|
+
"text": "string | undefined"
|
|
663
|
+
},
|
|
664
|
+
"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).",
|
|
665
|
+
"readonly": true
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"kind": "field",
|
|
669
|
+
"name": "_disposables",
|
|
670
|
+
"type": {
|
|
671
|
+
"text": "Set<() => void>"
|
|
672
|
+
},
|
|
673
|
+
"privacy": "private",
|
|
674
|
+
"default": "new Set()"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"kind": "method",
|
|
678
|
+
"name": "createProperty",
|
|
679
|
+
"static": true,
|
|
680
|
+
"parameters": [
|
|
681
|
+
{
|
|
682
|
+
"name": "name",
|
|
683
|
+
"type": {
|
|
684
|
+
"text": "PropertyKey"
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"name": "options",
|
|
689
|
+
"optional": true,
|
|
690
|
+
"type": {
|
|
691
|
+
"text": "PropertyDeclaration"
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default."
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"kind": "method",
|
|
699
|
+
"name": "finalizeStyles",
|
|
700
|
+
"static": true,
|
|
701
|
+
"return": {
|
|
702
|
+
"type": {
|
|
703
|
+
"text": "Array<any>"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"parameters": [
|
|
707
|
+
{
|
|
708
|
+
"name": "styles",
|
|
709
|
+
"optional": true,
|
|
710
|
+
"type": {
|
|
711
|
+
"text": "CSSResultGroup"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
],
|
|
715
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles."
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"kind": "method",
|
|
719
|
+
"name": "dispatchCustomEvent",
|
|
720
|
+
"return": {
|
|
721
|
+
"type": {
|
|
722
|
+
"text": "boolean"
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
"parameters": [
|
|
726
|
+
{
|
|
727
|
+
"name": "name",
|
|
728
|
+
"type": {
|
|
729
|
+
"text": "string"
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"name": "detail",
|
|
734
|
+
"optional": true,
|
|
735
|
+
"type": {
|
|
736
|
+
"text": "T"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "options",
|
|
741
|
+
"optional": true,
|
|
742
|
+
"type": {
|
|
743
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options."
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"kind": "method",
|
|
751
|
+
"name": "getCssPropertyValue",
|
|
752
|
+
"return": {
|
|
753
|
+
"type": {
|
|
754
|
+
"text": "string"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"parameters": [
|
|
758
|
+
{
|
|
759
|
+
"name": "propertyName",
|
|
760
|
+
"type": {
|
|
761
|
+
"text": "string"
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
],
|
|
765
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element."
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"kind": "method",
|
|
769
|
+
"name": "registerDisposable",
|
|
770
|
+
"parameters": [
|
|
771
|
+
{
|
|
772
|
+
"name": "cleanup",
|
|
773
|
+
"type": {
|
|
774
|
+
"text": "() => void"
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
],
|
|
778
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM."
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"kind": "method",
|
|
782
|
+
"name": "listen",
|
|
783
|
+
"return": {
|
|
784
|
+
"type": {
|
|
785
|
+
"text": "() => void"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"parameters": [
|
|
789
|
+
{
|
|
790
|
+
"name": "target",
|
|
791
|
+
"type": {
|
|
792
|
+
"text": "EventTarget"
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"name": "type",
|
|
797
|
+
"type": {
|
|
798
|
+
"text": "K"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "listener",
|
|
803
|
+
"type": {
|
|
804
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "options",
|
|
809
|
+
"optional": true,
|
|
810
|
+
"type": {
|
|
811
|
+
"text": "boolean | AddEventListenerOptions"
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected."
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"kind": "method",
|
|
819
|
+
"name": "listen",
|
|
820
|
+
"return": {
|
|
821
|
+
"type": {
|
|
822
|
+
"text": "() => void"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"parameters": [
|
|
826
|
+
{
|
|
827
|
+
"name": "target",
|
|
828
|
+
"type": {
|
|
829
|
+
"text": "EventTarget"
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"name": "type",
|
|
834
|
+
"type": {
|
|
835
|
+
"text": "string"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"name": "listener",
|
|
840
|
+
"type": {
|
|
841
|
+
"text": "EventListenerOrEventListenerObject"
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"name": "options",
|
|
846
|
+
"optional": true,
|
|
847
|
+
"type": {
|
|
848
|
+
"text": "boolean | AddEventListenerOptions"
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
]
|
|
852
|
+
}
|
|
853
|
+
],
|
|
854
|
+
"attributes": [
|
|
855
|
+
{
|
|
856
|
+
"name": "locale",
|
|
857
|
+
"type": {
|
|
858
|
+
"text": "string"
|
|
859
|
+
},
|
|
860
|
+
"default": "''",
|
|
861
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
862
|
+
"fieldName": "locale"
|
|
863
|
+
}
|
|
864
|
+
],
|
|
865
|
+
"superclass": {
|
|
866
|
+
"name": "LitElement",
|
|
867
|
+
"package": "lit"
|
|
868
|
+
},
|
|
869
|
+
"customElement": true
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"exports": [
|
|
873
|
+
{
|
|
874
|
+
"kind": "js",
|
|
875
|
+
"name": "UIBitElement",
|
|
876
|
+
"declaration": {
|
|
877
|
+
"name": "UIBitElement",
|
|
878
|
+
"module": "../../platform/core/src/element.ts"
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
]
|
|
432
882
|
}
|
|
433
883
|
]
|
|
434
884
|
}
|
|
@@ -33,11 +33,6 @@ export class NgxNumberIncrement {
|
|
|
33
33
|
this.el.nativeElement.decimals = this.decimals();
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
effect(() => {
|
|
37
|
-
if (this.el.nativeElement) {
|
|
38
|
-
this.el.nativeElement.locale = this.locale();
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
36
|
effect(() => {
|
|
42
37
|
if (this.el.nativeElement) {
|
|
43
38
|
this.el.nativeElement.options = this.options();
|
|
@@ -63,18 +58,23 @@ export class NgxNumberIncrement {
|
|
|
63
58
|
this.el.nativeElement.repeat = this.repeat();
|
|
64
59
|
}
|
|
65
60
|
});
|
|
61
|
+
effect(() => {
|
|
62
|
+
if (this.el.nativeElement) {
|
|
63
|
+
this.el.nativeElement.locale = this.locale();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
readonly value = input<number, any>(0, { transform: numberAttribute });
|
|
69
69
|
readonly from = input<number, any>(0, { transform: numberAttribute });
|
|
70
70
|
readonly duration = input<number, any>(1800, { transform: numberAttribute });
|
|
71
71
|
readonly decimals = input<number, any>(0, { transform: numberAttribute });
|
|
72
|
-
readonly locale = input<string, any>('');
|
|
73
72
|
readonly options = input<Intl.NumberFormatOptions | undefined, any>(undefined);
|
|
74
73
|
readonly formatter = input<(value: number) => string | undefined, any>(0, { transform: numberAttribute });
|
|
75
74
|
readonly easing = input<'ease-out' | 'ease-in-out' | 'linear', any>('ease-out');
|
|
76
75
|
readonly threshold = input<number, any>(0.2, { transform: numberAttribute });
|
|
77
76
|
readonly repeat = input<boolean, any>(false, { transform: booleanAttribute });
|
|
77
|
+
readonly locale = input<string, any>('');
|
|
78
78
|
|
|
79
79
|
readonly void = output<CustomEvent<any>>();
|
|
80
80
|
}
|
|
@@ -10,12 +10,12 @@ declare module 'preact' {
|
|
|
10
10
|
from?: number;
|
|
11
11
|
duration?: number;
|
|
12
12
|
decimals?: number;
|
|
13
|
-
locale?: string;
|
|
14
13
|
options?: Intl.NumberFormatOptions | undefined;
|
|
15
14
|
formatter?: (value: number) => string | undefined;
|
|
16
15
|
easing?: 'ease-out' | 'ease-in-out' | 'linear';
|
|
17
16
|
threshold?: number;
|
|
18
17
|
repeat?: boolean;
|
|
18
|
+
locale?: string;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -13,12 +13,12 @@ declare global {
|
|
|
13
13
|
from?: number;
|
|
14
14
|
duration?: number;
|
|
15
15
|
decimals?: number;
|
|
16
|
-
locale?: string;
|
|
17
16
|
options?: Intl.NumberFormatOptions | undefined;
|
|
18
17
|
formatter?: (value: number) => string | undefined;
|
|
19
18
|
easing?: 'ease-out' | 'ease-in-out' | 'linear';
|
|
20
19
|
threshold?: number;
|
|
21
20
|
repeat?: boolean;
|
|
21
|
+
locale?: string;
|
|
22
22
|
onVoid?: (event: any) => void;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -10,12 +10,12 @@ declare module 'solid-js' {
|
|
|
10
10
|
from?: number;
|
|
11
11
|
duration?: number;
|
|
12
12
|
decimals?: number;
|
|
13
|
-
locale?: string;
|
|
14
13
|
options?: Intl.NumberFormatOptions | undefined;
|
|
15
14
|
formatter?: (value: number) => string | undefined;
|
|
16
15
|
easing?: 'ease-out' | 'ease-in-out' | 'linear';
|
|
17
16
|
threshold?: number;
|
|
18
17
|
repeat?: boolean;
|
|
18
|
+
locale?: string;
|
|
19
19
|
"on:void"?: (event: CustomEvent) => void;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -9,12 +9,12 @@ declare module '@stencil/core' {
|
|
|
9
9
|
from?: number;
|
|
10
10
|
duration?: number;
|
|
11
11
|
decimals?: number;
|
|
12
|
-
locale?: string;
|
|
13
12
|
options?: Intl.NumberFormatOptions | undefined;
|
|
14
13
|
formatter?: (value: number) => string | undefined;
|
|
15
14
|
easing?: 'ease-out' | 'ease-in-out' | 'linear';
|
|
16
15
|
threshold?: number;
|
|
17
16
|
repeat?: boolean;
|
|
17
|
+
locale?: string;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
from = undefined,
|
|
8
8
|
duration = undefined,
|
|
9
9
|
decimals = undefined,
|
|
10
|
-
locale = undefined,
|
|
11
10
|
options = undefined,
|
|
12
11
|
formatter = undefined,
|
|
13
12
|
easing = undefined,
|
|
14
13
|
threshold = undefined,
|
|
15
14
|
repeat = undefined,
|
|
15
|
+
locale = undefined,
|
|
16
16
|
children
|
|
17
17
|
} = $props<{
|
|
18
18
|
children?: any;
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
from?: number;
|
|
21
21
|
duration?: number;
|
|
22
22
|
decimals?: number;
|
|
23
|
-
locale?: string;
|
|
24
23
|
options?: Intl.NumberFormatOptions | undefined;
|
|
25
24
|
formatter?: (value: number) => string | undefined;
|
|
26
25
|
easing?: 'ease-out' | 'ease-in-out' | 'linear';
|
|
27
26
|
threshold?: number;
|
|
28
27
|
repeat?: boolean;
|
|
28
|
+
locale?: string;
|
|
29
29
|
|
|
30
30
|
}>();
|
|
31
31
|
|
|
@@ -44,9 +44,6 @@
|
|
|
44
44
|
if (elementRef && decimals !== undefined) {
|
|
45
45
|
elementRef.decimals = decimals;
|
|
46
46
|
}
|
|
47
|
-
if (elementRef && locale !== undefined) {
|
|
48
|
-
elementRef.locale = locale;
|
|
49
|
-
}
|
|
50
47
|
if (elementRef && options !== undefined) {
|
|
51
48
|
elementRef.options = options;
|
|
52
49
|
}
|
|
@@ -62,6 +59,9 @@
|
|
|
62
59
|
if (elementRef && repeat !== undefined) {
|
|
63
60
|
elementRef.repeat = repeat;
|
|
64
61
|
}
|
|
62
|
+
if (elementRef && locale !== undefined) {
|
|
63
|
+
elementRef.locale = locale;
|
|
64
|
+
}
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
</script>
|
|
@@ -9,12 +9,12 @@ export const NumberIncrement = defineComponent({
|
|
|
9
9
|
from: { type: [String, Number, Boolean, Array, Object] as any },
|
|
10
10
|
duration: { type: [String, Number, Boolean, Array, Object] as any },
|
|
11
11
|
decimals: { type: [String, Number, Boolean, Array, Object] as any },
|
|
12
|
-
locale: { type: [String, Number, Boolean, Array, Object] as any },
|
|
13
12
|
options: { type: [String, Number, Boolean, Array, Object] as any },
|
|
14
13
|
formatter: { type: [String, Number, Boolean, Array, Object] as any },
|
|
15
14
|
easing: { type: [String, Number, Boolean, Array, Object] as any },
|
|
16
15
|
threshold: { type: [String, Number, Boolean, Array, Object] as any },
|
|
17
|
-
repeat: { type: [String, Number, Boolean, Array, Object] as any }
|
|
16
|
+
repeat: { type: [String, Number, Boolean, Array, Object] as any },
|
|
17
|
+
locale: { type: [String, Number, Boolean, Array, Object] as any }
|
|
18
18
|
},
|
|
19
19
|
emits: ['void'],
|
|
20
20
|
setup(props, { slots, emit }) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { UIBitElement } from '@uibit/core';
|
|
2
2
|
/**
|
|
3
3
|
* Animates a numeric value from zero (or a custom start) up to the `value`
|
|
4
|
+
|
|
5
|
+
* @summary A scroll-triggered animated numeric counter component.
|
|
4
6
|
* attribute once the element scrolls into the viewport. Supports easing,
|
|
5
7
|
* decimal places, and custom formatting functions.
|
|
6
8
|
*
|
|
@@ -15,7 +17,8 @@ import { UIBitElement } from '@uibit/core';
|
|
|
15
17
|
* @cssprop [--uibit-number-increment-color=inherit] - Text color
|
|
16
18
|
* @cssprop [--uibit-number-increment-font-family=inherit] - Font family
|
|
17
19
|
* @cssprop [--uibit-number-increment-line-height=inherit] - Line height
|
|
18
|
-
|
|
20
|
+
|
|
21
|
+
* @cssstate animating - Active when the count animation is running.*/
|
|
19
22
|
export declare class NumberIncrement extends UIBitElement {
|
|
20
23
|
static styles: import("lit").CSSResult;
|
|
21
24
|
/** Target numeric value to count up to. */
|
|
@@ -26,8 +29,6 @@ export declare class NumberIncrement extends UIBitElement {
|
|
|
26
29
|
duration: number;
|
|
27
30
|
/** Number of decimal places to display. Used only if no custom formatter is provided. */
|
|
28
31
|
decimals: number;
|
|
29
|
-
/** BCP 47 locale string for number formatting (e.g. "en-US"). Defaults to browser locale if options is set. */
|
|
30
|
-
locale: string;
|
|
31
32
|
/** Options for Intl.NumberFormat. */
|
|
32
33
|
options?: Intl.NumberFormatOptions;
|
|
33
34
|
/** Custom formatter function to format the number for display. Overrides locale and options. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-increment.d.ts","sourceRoot":"","sources":["../src/number-increment.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,YAAY,EAAsC,MAAM,aAAa,CAAC;AAI9F
|
|
1
|
+
{"version":3,"file":"number-increment.d.ts","sourceRoot":"","sources":["../src/number-increment.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,YAAY,EAAsC,MAAM,aAAa,CAAC;AAI9F;;;;;;;;;;;;;;;;;;;sEAmBsE;AACtE,qBACa,eAAgB,SAAQ,YAAY;IAC/C,MAAM,CAAC,MAAM,0BAAU;IAEvB,2CAA2C;IACf,KAAK,SAAK;IACtC,wCAAwC;IACO,IAAI,SAAK;IACxD,uDAAuD;IAC3B,QAAQ,SAAQ;IAC5C,yFAAyF;IAC7D,QAAQ,SAAK;IAEzC,qCAAqC;IACT,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IAC/D,gGAAgG;IAChE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtE,2DAA2D;IAC/B,MAAM,EAAE,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAc;IACvF,oEAAoE;IACxC,SAAS,SAAO;IAC5C,+DAA+D;IAClC,MAAM,UAAS;IAEnC,OAAO,CAAC,QAAQ,CAAM;IAE/B,OAAO,CAAC,SAAS,CAAC,CAAqB;IACvC,OAAO,CAAC,KAAK,CAGV;IAEH,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,OAAO,CAAK;IAEpB,iBAAiB,SAahB;IAED,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,QAIpC;IAED,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,MAAM;IAUd,OAAO,CAAC,KAAK;IAcb,MAAM,oCAEL;CACF;eAEc,eAAe"}
|
package/dist/number-increment.js
CHANGED
|
@@ -10,6 +10,8 @@ import { property, state } from 'lit/decorators.js';
|
|
|
10
10
|
import { styles } from './styles';
|
|
11
11
|
/**
|
|
12
12
|
* Animates a numeric value from zero (or a custom start) up to the `value`
|
|
13
|
+
|
|
14
|
+
* @summary A scroll-triggered animated numeric counter component.
|
|
13
15
|
* attribute once the element scrolls into the viewport. Supports easing,
|
|
14
16
|
* decimal places, and custom formatting functions.
|
|
15
17
|
*
|
|
@@ -24,7 +26,8 @@ import { styles } from './styles';
|
|
|
24
26
|
* @cssprop [--uibit-number-increment-color=inherit] - Text color
|
|
25
27
|
* @cssprop [--uibit-number-increment-font-family=inherit] - Font family
|
|
26
28
|
* @cssprop [--uibit-number-increment-line-height=inherit] - Line height
|
|
27
|
-
|
|
29
|
+
|
|
30
|
+
* @cssstate animating - Active when the count animation is running.*/
|
|
28
31
|
let NumberIncrement = class NumberIncrement extends UIBitElement {
|
|
29
32
|
constructor() {
|
|
30
33
|
super(...arguments);
|
|
@@ -36,8 +39,6 @@ let NumberIncrement = class NumberIncrement extends UIBitElement {
|
|
|
36
39
|
this.duration = 1800;
|
|
37
40
|
/** Number of decimal places to display. Used only if no custom formatter is provided. */
|
|
38
41
|
this.decimals = 0;
|
|
39
|
-
/** BCP 47 locale string for number formatting (e.g. "en-US"). Defaults to browser locale if options is set. */
|
|
40
|
-
this.locale = '';
|
|
41
42
|
/** Easing curve: "ease-out" | "ease-in-out" | "linear". */
|
|
42
43
|
this.easing = 'ease-out';
|
|
43
44
|
/** Intersection threshold (0–1) at which the animation triggers. */
|
|
@@ -86,10 +87,14 @@ let NumberIncrement = class NumberIncrement extends UIBitElement {
|
|
|
86
87
|
if (this.formatter) {
|
|
87
88
|
return this.formatter(n);
|
|
88
89
|
}
|
|
90
|
+
const locale = this.resolvedLocale;
|
|
89
91
|
if (this.options || this.locale) {
|
|
90
|
-
return new Intl.NumberFormat(this.
|
|
92
|
+
return new Intl.NumberFormat(locale, this.options || undefined).format(n);
|
|
91
93
|
}
|
|
92
|
-
return
|
|
94
|
+
return new Intl.NumberFormat(locale, {
|
|
95
|
+
minimumFractionDigits: this.decimals,
|
|
96
|
+
maximumFractionDigits: this.decimals,
|
|
97
|
+
}).format(n);
|
|
93
98
|
}
|
|
94
99
|
_start() {
|
|
95
100
|
this._started = true;
|
|
@@ -128,9 +133,6 @@ __decorate([
|
|
|
128
133
|
__decorate([
|
|
129
134
|
property({ type: Number })
|
|
130
135
|
], NumberIncrement.prototype, "decimals", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
property({ type: String })
|
|
133
|
-
], NumberIncrement.prototype, "locale", void 0);
|
|
134
136
|
__decorate([
|
|
135
137
|
property({ type: Object })
|
|
136
138
|
], NumberIncrement.prototype, "options", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-increment.js","sourceRoot":"","sources":["../src/number-increment.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAA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CAyG3B;;AAED,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uibit/number-increment",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Intersection-aware numeric counter that animates to a target value with easing curves, locale-aware formatting, and custom formatter function overrides. Triggers once the element scrolls into the viewport.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"directory": "packages/components/number-increment"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@uibit/core": "0.
|
|
49
|
+
"@uibit/core": "0.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^20.19.43",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"tagName": "uibit-number-increment"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
|
-
"build": "cem analyze --
|
|
87
|
-
"dev": "concurrently \"cem analyze --
|
|
88
|
-
"analyze": "cem analyze --
|
|
86
|
+
"build": "cem analyze --config ../custom-elements-manifest.config.js && uibit-codegen --package . && tsc",
|
|
87
|
+
"dev": "concurrently \"cem analyze --config ../custom-elements-manifest.config.js --watch\" \"tsc --watch\"",
|
|
88
|
+
"analyze": "cem analyze --config ../custom-elements-manifest.config.js",
|
|
89
89
|
"typecheck": "tsc --noEmit",
|
|
90
90
|
"test": "vitest run -c ../../../vitest.config.ts --passWithNoTests"
|
|
91
91
|
}
|