@uibit/scroll-progress 0.1.0 → 0.2.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 +10 -0
- package/custom-elements.json +464 -1
- package/dist/frameworks/angular/index.ts +18 -14
- package/dist/frameworks/astro/index.d.ts +5 -1
- package/dist/frameworks/preact/index.d.ts +2 -0
- package/dist/frameworks/react/index.ts +61 -0
- package/dist/frameworks/solid/index.d.ts +1 -0
- package/dist/frameworks/stencil/index.d.ts +2 -0
- package/dist/frameworks/svelte/index.svelte +44 -13
- package/dist/frameworks/vue/index.ts +60 -18
- package/dist/scroll-progress.d.ts +2 -0
- package/dist/scroll-progress.d.ts.map +1 -1
- package/dist/scroll-progress.js +2 -0
- package/dist/scroll-progress.js.map +1 -1
- package/package.json +7 -7
- package/dist/frameworks/react/index.d.ts +0 -17
package/README.md
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# Scroll Progress
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@uibit/scroll-progress)
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
[Interactive Demonstration](https://rawlings.github.io/uibit/components/scroll-progress)
|
|
4
7
|
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @uibit/scroll-progress
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
5
15
|
Scroll Progress is a reading indicator component that displays content navigation progress. As users scroll through long-form articles, documentation, or reports, a subtle progress indicator shows their position, providing context and encouraging reading completion.
|
|
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": "Thin progress bar that tracks scroll position — either the page or a
|
|
42
|
+
"description": "Thin progress bar that tracks scroll position — either the page or a",
|
|
43
43
|
"name": "ScrollProgress",
|
|
44
44
|
"cssProperties": [
|
|
45
45
|
{
|
|
@@ -120,6 +120,211 @@
|
|
|
120
120
|
"kind": "method",
|
|
121
121
|
"name": "updateProgress",
|
|
122
122
|
"privacy": "private"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"kind": "field",
|
|
126
|
+
"name": "locale",
|
|
127
|
+
"type": {
|
|
128
|
+
"text": "string"
|
|
129
|
+
},
|
|
130
|
+
"default": "''",
|
|
131
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
132
|
+
"attribute": "locale",
|
|
133
|
+
"inheritedFrom": {
|
|
134
|
+
"name": "UIBitElement",
|
|
135
|
+
"module": "../../platform/core/src/element.ts"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"kind": "field",
|
|
140
|
+
"name": "resolvedLocale",
|
|
141
|
+
"type": {
|
|
142
|
+
"text": "string | undefined"
|
|
143
|
+
},
|
|
144
|
+
"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).",
|
|
145
|
+
"readonly": true,
|
|
146
|
+
"inheritedFrom": {
|
|
147
|
+
"name": "UIBitElement",
|
|
148
|
+
"module": "../../platform/core/src/element.ts"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"kind": "field",
|
|
153
|
+
"name": "_disposables",
|
|
154
|
+
"type": {
|
|
155
|
+
"text": "Set<() => void>"
|
|
156
|
+
},
|
|
157
|
+
"privacy": "private",
|
|
158
|
+
"default": "new Set()",
|
|
159
|
+
"inheritedFrom": {
|
|
160
|
+
"name": "UIBitElement",
|
|
161
|
+
"module": "../../platform/core/src/element.ts"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"kind": "method",
|
|
166
|
+
"name": "createProperty",
|
|
167
|
+
"static": true,
|
|
168
|
+
"parameters": [
|
|
169
|
+
{
|
|
170
|
+
"name": "name",
|
|
171
|
+
"type": {
|
|
172
|
+
"text": "PropertyKey"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "options",
|
|
177
|
+
"optional": true,
|
|
178
|
+
"type": {
|
|
179
|
+
"text": "PropertyDeclaration"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default.",
|
|
184
|
+
"inheritedFrom": {
|
|
185
|
+
"name": "UIBitElement",
|
|
186
|
+
"module": "../../platform/core/src/element.ts"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"kind": "method",
|
|
191
|
+
"name": "finalizeStyles",
|
|
192
|
+
"static": true,
|
|
193
|
+
"return": {
|
|
194
|
+
"type": {
|
|
195
|
+
"text": "Array<any>"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"parameters": [
|
|
199
|
+
{
|
|
200
|
+
"name": "styles",
|
|
201
|
+
"optional": true,
|
|
202
|
+
"type": {
|
|
203
|
+
"text": "CSSResultGroup"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles.",
|
|
208
|
+
"inheritedFrom": {
|
|
209
|
+
"name": "UIBitElement",
|
|
210
|
+
"module": "../../platform/core/src/element.ts"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"kind": "method",
|
|
215
|
+
"name": "dispatchCustomEvent",
|
|
216
|
+
"return": {
|
|
217
|
+
"type": {
|
|
218
|
+
"text": "boolean"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"parameters": [
|
|
222
|
+
{
|
|
223
|
+
"name": "name",
|
|
224
|
+
"type": {
|
|
225
|
+
"text": "string"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "detail",
|
|
230
|
+
"optional": true,
|
|
231
|
+
"type": {
|
|
232
|
+
"text": "T"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "options",
|
|
237
|
+
"optional": true,
|
|
238
|
+
"type": {
|
|
239
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options.",
|
|
244
|
+
"inheritedFrom": {
|
|
245
|
+
"name": "UIBitElement",
|
|
246
|
+
"module": "../../platform/core/src/element.ts"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"kind": "method",
|
|
251
|
+
"name": "getCssPropertyValue",
|
|
252
|
+
"return": {
|
|
253
|
+
"type": {
|
|
254
|
+
"text": "string"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"parameters": [
|
|
258
|
+
{
|
|
259
|
+
"name": "propertyName",
|
|
260
|
+
"type": {
|
|
261
|
+
"text": "string"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element.",
|
|
266
|
+
"inheritedFrom": {
|
|
267
|
+
"name": "UIBitElement",
|
|
268
|
+
"module": "../../platform/core/src/element.ts"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"kind": "method",
|
|
273
|
+
"name": "registerDisposable",
|
|
274
|
+
"parameters": [
|
|
275
|
+
{
|
|
276
|
+
"name": "cleanup",
|
|
277
|
+
"type": {
|
|
278
|
+
"text": "() => void"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM.",
|
|
283
|
+
"inheritedFrom": {
|
|
284
|
+
"name": "UIBitElement",
|
|
285
|
+
"module": "../../platform/core/src/element.ts"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"kind": "method",
|
|
290
|
+
"name": "listen",
|
|
291
|
+
"return": {
|
|
292
|
+
"type": {
|
|
293
|
+
"text": "() => void"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"parameters": [
|
|
297
|
+
{
|
|
298
|
+
"name": "target",
|
|
299
|
+
"type": {
|
|
300
|
+
"text": "EventTarget"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "type",
|
|
305
|
+
"type": {
|
|
306
|
+
"text": "K"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "listener",
|
|
311
|
+
"type": {
|
|
312
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"name": "options",
|
|
317
|
+
"optional": true,
|
|
318
|
+
"type": {
|
|
319
|
+
"text": "boolean | AddEventListenerOptions"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected.",
|
|
324
|
+
"inheritedFrom": {
|
|
325
|
+
"name": "UIBitElement",
|
|
326
|
+
"module": "../../platform/core/src/element.ts"
|
|
327
|
+
}
|
|
123
328
|
}
|
|
124
329
|
],
|
|
125
330
|
"attributes": [
|
|
@@ -130,12 +335,26 @@
|
|
|
130
335
|
},
|
|
131
336
|
"description": "CSS selector of a custom scrollable container to track. Defaults to the page (`window`).",
|
|
132
337
|
"fieldName": "targetSelector"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "locale",
|
|
341
|
+
"type": {
|
|
342
|
+
"text": "string"
|
|
343
|
+
},
|
|
344
|
+
"default": "''",
|
|
345
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
346
|
+
"fieldName": "locale",
|
|
347
|
+
"inheritedFrom": {
|
|
348
|
+
"name": "UIBitElement",
|
|
349
|
+
"module": "../../platform/core/src/element.ts"
|
|
350
|
+
}
|
|
133
351
|
}
|
|
134
352
|
],
|
|
135
353
|
"superclass": {
|
|
136
354
|
"name": "UIBitElement",
|
|
137
355
|
"package": "@uibit/core"
|
|
138
356
|
},
|
|
357
|
+
"summary": "A responsive viewport or container scroll progress indicator bar.\ncustom scrollable element — and fills as the user scrolls down.",
|
|
139
358
|
"tagName": "uibit-scroll-progress",
|
|
140
359
|
"customElement": true
|
|
141
360
|
}
|
|
@@ -193,6 +412,250 @@
|
|
|
193
412
|
"path": "src/types.ts",
|
|
194
413
|
"declarations": [],
|
|
195
414
|
"exports": []
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"kind": "javascript-module",
|
|
418
|
+
"path": "../../platform/core/src/element.ts",
|
|
419
|
+
"declarations": [
|
|
420
|
+
{
|
|
421
|
+
"kind": "class",
|
|
422
|
+
"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.",
|
|
423
|
+
"name": "UIBitElement",
|
|
424
|
+
"members": [
|
|
425
|
+
{
|
|
426
|
+
"kind": "field",
|
|
427
|
+
"name": "locale",
|
|
428
|
+
"type": {
|
|
429
|
+
"text": "string"
|
|
430
|
+
},
|
|
431
|
+
"default": "''",
|
|
432
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
433
|
+
"attribute": "locale"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"kind": "field",
|
|
437
|
+
"name": "resolvedLocale",
|
|
438
|
+
"type": {
|
|
439
|
+
"text": "string | undefined"
|
|
440
|
+
},
|
|
441
|
+
"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).",
|
|
442
|
+
"readonly": true
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"kind": "field",
|
|
446
|
+
"name": "_disposables",
|
|
447
|
+
"type": {
|
|
448
|
+
"text": "Set<() => void>"
|
|
449
|
+
},
|
|
450
|
+
"privacy": "private",
|
|
451
|
+
"default": "new Set()"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"kind": "method",
|
|
455
|
+
"name": "createProperty",
|
|
456
|
+
"static": true,
|
|
457
|
+
"parameters": [
|
|
458
|
+
{
|
|
459
|
+
"name": "name",
|
|
460
|
+
"type": {
|
|
461
|
+
"text": "PropertyKey"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"name": "options",
|
|
466
|
+
"optional": true,
|
|
467
|
+
"type": {
|
|
468
|
+
"text": "PropertyDeclaration"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default."
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"kind": "method",
|
|
476
|
+
"name": "finalizeStyles",
|
|
477
|
+
"static": true,
|
|
478
|
+
"return": {
|
|
479
|
+
"type": {
|
|
480
|
+
"text": "Array<any>"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"parameters": [
|
|
484
|
+
{
|
|
485
|
+
"name": "styles",
|
|
486
|
+
"optional": true,
|
|
487
|
+
"type": {
|
|
488
|
+
"text": "CSSResultGroup"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles."
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"kind": "method",
|
|
496
|
+
"name": "dispatchCustomEvent",
|
|
497
|
+
"return": {
|
|
498
|
+
"type": {
|
|
499
|
+
"text": "boolean"
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"parameters": [
|
|
503
|
+
{
|
|
504
|
+
"name": "name",
|
|
505
|
+
"type": {
|
|
506
|
+
"text": "string"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "detail",
|
|
511
|
+
"optional": true,
|
|
512
|
+
"type": {
|
|
513
|
+
"text": "T"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "options",
|
|
518
|
+
"optional": true,
|
|
519
|
+
"type": {
|
|
520
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
],
|
|
524
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options."
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"kind": "method",
|
|
528
|
+
"name": "getCssPropertyValue",
|
|
529
|
+
"return": {
|
|
530
|
+
"type": {
|
|
531
|
+
"text": "string"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"parameters": [
|
|
535
|
+
{
|
|
536
|
+
"name": "propertyName",
|
|
537
|
+
"type": {
|
|
538
|
+
"text": "string"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element."
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"kind": "method",
|
|
546
|
+
"name": "registerDisposable",
|
|
547
|
+
"parameters": [
|
|
548
|
+
{
|
|
549
|
+
"name": "cleanup",
|
|
550
|
+
"type": {
|
|
551
|
+
"text": "() => void"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM."
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"kind": "method",
|
|
559
|
+
"name": "listen",
|
|
560
|
+
"return": {
|
|
561
|
+
"type": {
|
|
562
|
+
"text": "() => void"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"parameters": [
|
|
566
|
+
{
|
|
567
|
+
"name": "target",
|
|
568
|
+
"type": {
|
|
569
|
+
"text": "EventTarget"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "type",
|
|
574
|
+
"type": {
|
|
575
|
+
"text": "K"
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "listener",
|
|
580
|
+
"type": {
|
|
581
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"name": "options",
|
|
586
|
+
"optional": true,
|
|
587
|
+
"type": {
|
|
588
|
+
"text": "boolean | AddEventListenerOptions"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected."
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"kind": "method",
|
|
596
|
+
"name": "listen",
|
|
597
|
+
"return": {
|
|
598
|
+
"type": {
|
|
599
|
+
"text": "() => void"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"parameters": [
|
|
603
|
+
{
|
|
604
|
+
"name": "target",
|
|
605
|
+
"type": {
|
|
606
|
+
"text": "EventTarget"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "type",
|
|
611
|
+
"type": {
|
|
612
|
+
"text": "string"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "listener",
|
|
617
|
+
"type": {
|
|
618
|
+
"text": "EventListenerOrEventListenerObject"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "options",
|
|
623
|
+
"optional": true,
|
|
624
|
+
"type": {
|
|
625
|
+
"text": "boolean | AddEventListenerOptions"
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
"attributes": [
|
|
632
|
+
{
|
|
633
|
+
"name": "locale",
|
|
634
|
+
"type": {
|
|
635
|
+
"text": "string"
|
|
636
|
+
},
|
|
637
|
+
"default": "''",
|
|
638
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
639
|
+
"fieldName": "locale"
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
"superclass": {
|
|
643
|
+
"name": "LitElement",
|
|
644
|
+
"package": "lit"
|
|
645
|
+
},
|
|
646
|
+
"customElement": true
|
|
647
|
+
}
|
|
648
|
+
],
|
|
649
|
+
"exports": [
|
|
650
|
+
{
|
|
651
|
+
"kind": "js",
|
|
652
|
+
"name": "UIBitElement",
|
|
653
|
+
"declaration": {
|
|
654
|
+
"name": "UIBitElement",
|
|
655
|
+
"module": "../../platform/core/src/element.ts"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
]
|
|
196
659
|
}
|
|
197
660
|
]
|
|
198
661
|
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, ElementRef, input, effect } from '@angular/core';
|
|
2
2
|
import '@uibit/scroll-progress';
|
|
3
3
|
import type { ScrollProgress as HTMLElementClass } from '@uibit/scroll-progress';
|
|
4
|
-
|
|
5
4
|
@Component({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
selector: 'uibit-scroll-progress',
|
|
6
|
+
template: '<ng-content></ng-content>',
|
|
7
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
standalone: true
|
|
10
9
|
})
|
|
11
10
|
export class NgxScrollProgress {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
constructor(private el: ElementRef<HTMLElementClass>){
|
|
12
|
+
effect(()=>{
|
|
13
|
+
if (this.el.nativeElement) {
|
|
14
|
+
this.el.nativeElement.targetSelector = this.targetSelector();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
effect(()=>{
|
|
18
|
+
if (this.el.nativeElement) {
|
|
19
|
+
this.el.nativeElement.locale = this.locale();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
readonly targetSelector = input<string | undefined>(undefined);
|
|
24
|
+
readonly locale = input<string>('');
|
|
21
25
|
}
|
|
@@ -4,7 +4,11 @@ import '@uibit/scroll-progress';
|
|
|
4
4
|
declare global {
|
|
5
5
|
namespace astroHTML.JSX {
|
|
6
6
|
interface IntrinsicElements {
|
|
7
|
-
'uibit-scroll-progress': Partial<HTMLElementClass> & astroHTML.JSX.HTMLAttributes
|
|
7
|
+
'uibit-scroll-progress': Partial<HTMLElementClass> & astroHTML.JSX.HTMLAttributes & {
|
|
8
|
+
targetSelector?: string | undefined;
|
|
9
|
+
locale?: string;
|
|
10
|
+
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
}
|
|
10
14
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { useRef, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
2
|
+
import type { ScrollProgress as HTMLElementClass } from '@uibit/scroll-progress';
|
|
3
|
+
import '@uibit/scroll-progress';
|
|
4
|
+
const useTypeOfLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
5
|
+
export interface ScrollProgressProps extends Omit<React.HTMLAttributes<HTMLElementClass>, 'targetSelector' | 'locale'> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
targetSelector?: string | undefined;
|
|
8
|
+
locale?: string;
|
|
9
|
+
}
|
|
10
|
+
export const ScrollProgress = ({ ref, children, ...props }: ScrollProgressProps & {
|
|
11
|
+
ref?: React.Ref<HTMLElementClass>;
|
|
12
|
+
})=>{
|
|
13
|
+
const innerRef = useRef<HTMLElementClass>(null);
|
|
14
|
+
const propsRef = useRef(props);
|
|
15
|
+
propsRef.current = props;
|
|
16
|
+
useImperativeHandle(ref, ()=>innerRef.current!);
|
|
17
|
+
useTypeOfLayoutEffect(()=>{
|
|
18
|
+
const element = innerRef.current;
|
|
19
|
+
if (element && props.targetSelector !== undefined) {
|
|
20
|
+
(element as any).targetSelector = props.targetSelector;
|
|
21
|
+
}
|
|
22
|
+
}, [
|
|
23
|
+
props.targetSelector
|
|
24
|
+
]);
|
|
25
|
+
useTypeOfLayoutEffect(()=>{
|
|
26
|
+
const element = innerRef.current;
|
|
27
|
+
if (element && props.locale !== undefined) {
|
|
28
|
+
(element as any).locale = props.locale;
|
|
29
|
+
}
|
|
30
|
+
}, [
|
|
31
|
+
props.locale
|
|
32
|
+
]);
|
|
33
|
+
const domProps = {
|
|
34
|
+
...props
|
|
35
|
+
};
|
|
36
|
+
const customPropNames = [
|
|
37
|
+
'targetSelector',
|
|
38
|
+
'locale'
|
|
39
|
+
];
|
|
40
|
+
for (const key of customPropNames){
|
|
41
|
+
delete (domProps as any)[key];
|
|
42
|
+
}
|
|
43
|
+
return React.createElement('uibit-scroll-progress', {
|
|
44
|
+
ref: innerRef,
|
|
45
|
+
...domProps
|
|
46
|
+
}, children);
|
|
47
|
+
};
|
|
48
|
+
declare global {
|
|
49
|
+
namespace React {
|
|
50
|
+
namespace JSX {
|
|
51
|
+
interface IntrinsicElements {
|
|
52
|
+
'uibit-scroll-progress': React.ClassAttributes<HTMLElementClass> & React.HTMLAttributes<HTMLElementClass> & {
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
class?: string;
|
|
55
|
+
targetSelector?: string | undefined;
|
|
56
|
+
locale?: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -1,27 +1,58 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import '@uibit/scroll-progress';
|
|
3
3
|
import type { ScrollProgress as HTMLElementClass } from '@uibit/scroll-progress';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
targetSelector =
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
targetSelector = $bindable(),
|
|
7
|
+
locale = $bindable(),
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
8
10
|
} = $props<{
|
|
9
|
-
children?:
|
|
11
|
+
children?: import('svelte').Snippet;
|
|
10
12
|
targetSelector?: string | undefined;
|
|
11
|
-
|
|
13
|
+
locale?: string;
|
|
14
|
+
|
|
15
|
+
[key: string]: any;
|
|
12
16
|
}>();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (elementRef && targetSelector !== undefined) {
|
|
17
|
+
|
|
18
|
+
let elementRef: HTMLElementClass | null = $state(null);
|
|
19
|
+
|
|
20
|
+
$effect(() => {
|
|
21
|
+
if (elementRef && targetSelector !== undefined && elementRef.targetSelector !== targetSelector) {
|
|
18
22
|
elementRef.targetSelector = targetSelector;
|
|
19
23
|
}
|
|
24
|
+
if (elementRef && locale !== undefined && elementRef.locale !== locale) {
|
|
25
|
+
elementRef.locale = locale;
|
|
26
|
+
}
|
|
20
27
|
});
|
|
21
|
-
|
|
28
|
+
|
|
29
|
+
$effect(() => {
|
|
30
|
+
const element = elementRef;
|
|
31
|
+
if (!element) return;
|
|
32
|
+
|
|
33
|
+
const handleEvent = () => {
|
|
34
|
+
if (targetSelector !== element.targetSelector) {
|
|
35
|
+
targetSelector = element.targetSelector as any;
|
|
36
|
+
}
|
|
37
|
+
if (locale !== element.locale) {
|
|
38
|
+
locale = element.locale as any;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const events = ['change', 'input'];
|
|
43
|
+
for (const event of events) {
|
|
44
|
+
element.addEventListener(event, handleEvent);
|
|
45
|
+
}
|
|
46
|
+
return () => {
|
|
47
|
+
for (const event of events) {
|
|
48
|
+
element.removeEventListener(event, handleEvent);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
|
|
22
53
|
</script>
|
|
23
54
|
|
|
24
|
-
<uibit-scroll-progress bind:this={elementRef} {
|
|
55
|
+
<uibit-scroll-progress bind:this={elementRef} {...restProps}>
|
|
25
56
|
|
|
26
57
|
{#if children}
|
|
27
58
|
{@render children()}
|
|
@@ -1,22 +1,64 @@
|
|
|
1
|
-
import { defineComponent, h } from 'vue';
|
|
1
|
+
import { defineComponent, h, ref, watch } from 'vue';
|
|
2
2
|
import type { ScrollProgress as HTMLElementClass } from '@uibit/scroll-progress';
|
|
3
3
|
import '@uibit/scroll-progress';
|
|
4
|
-
|
|
5
4
|
export const ScrollProgress = defineComponent({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
name: 'ScrollProgress',
|
|
6
|
+
props: {
|
|
7
|
+
targetSelector: {
|
|
8
|
+
type: [
|
|
9
|
+
String,
|
|
10
|
+
Number,
|
|
11
|
+
Boolean,
|
|
12
|
+
Array,
|
|
13
|
+
Object
|
|
14
|
+
] as any
|
|
15
|
+
},
|
|
16
|
+
locale: {
|
|
17
|
+
type: [
|
|
18
|
+
String,
|
|
19
|
+
Number,
|
|
20
|
+
Boolean,
|
|
21
|
+
Array,
|
|
22
|
+
Object
|
|
23
|
+
] as any
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: [],
|
|
27
|
+
setup (props, { slots, emit }) {
|
|
28
|
+
const elementRef = ref<HTMLElementClass | null>(null);
|
|
29
|
+
if (false) {
|
|
30
|
+
watch(()=>props.modelValue, (newVal)=>{
|
|
31
|
+
if (elementRef.value && newVal !== undefined && elementRef.value.value !== newVal) {
|
|
32
|
+
elementRef.value.value = newVal;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
watch(()=>props.value, (newVal)=>{
|
|
36
|
+
if (elementRef.value && newVal !== undefined && elementRef.value.value !== newVal) {
|
|
37
|
+
elementRef.value.value = newVal;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
watch(()=>props.targetSelector, (newVal)=>{
|
|
42
|
+
if (elementRef.value && newVal !== undefined) {
|
|
43
|
+
(elementRef.value as any).targetSelector = newVal;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
watch(()=>props.locale, (newVal)=>{
|
|
47
|
+
if (elementRef.value && newVal !== undefined) {
|
|
48
|
+
(elementRef.value as any).locale = newVal;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return ()=>{
|
|
52
|
+
const eventListeners: Record<string, any> = {};
|
|
53
|
+
const mergedProps = {
|
|
54
|
+
...props,
|
|
55
|
+
...eventListeners,
|
|
56
|
+
ref: elementRef
|
|
57
|
+
};
|
|
58
|
+
if (false && props.modelValue !== undefined) {
|
|
59
|
+
(mergedProps as any).value = props.modelValue;
|
|
60
|
+
}
|
|
61
|
+
return h('uibit-scroll-progress', mergedProps, slots.default?.());
|
|
62
|
+
};
|
|
63
|
+
}
|
|
22
64
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { UIBitElement } from '@uibit/core';
|
|
2
2
|
/**
|
|
3
3
|
* Thin progress bar that tracks scroll position — either the page or a
|
|
4
|
+
|
|
5
|
+
* @summary A responsive viewport or container scroll progress indicator bar.
|
|
4
6
|
* custom scrollable element — and fills as the user scrolls down.
|
|
5
7
|
*
|
|
6
8
|
* @cssprop [--uibit-scroll-progress-height=0.1875rem] - Height of the progress bar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-progress.d.ts","sourceRoot":"","sources":["../src/scroll-progress.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAC;AAI/D
|
|
1
|
+
{"version":3,"file":"scroll-progress.d.ts","sourceRoot":"","sources":["../src/scroll-progress.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAC;AAI/D;;;;;;;;;GASG;AACH,qBACa,cAAe,SAAQ,YAAY;IAC9C,MAAM,CAAC,MAAM,0BAAU;IAEvB,+FAA+F;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IAEzE,OAAO,CAAC,eAAe,CAAK;IAErC,OAAO,CAAC,eAAe,CAAC,CAAa;IACrC,OAAO,CAAC,aAAa,CAAC,CAAuB;IAC7C,OAAO,CAAC,MAAM,CAAC,CAAS;IAExB,iBAAiB,SAIhB;IAED,oBAAoB,SAGnB;IAED,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,QAM9C;IAED,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,qBAAqB;IAc7B,OAAO,CAAC,cAAc;IAiBtB,MAAM,oCAaL;CACF;eAEc,cAAc"}
|
package/dist/scroll-progress.js
CHANGED
|
@@ -10,6 +10,8 @@ import { property, state } from 'lit/decorators.js';
|
|
|
10
10
|
import { styles } from './styles';
|
|
11
11
|
/**
|
|
12
12
|
* Thin progress bar that tracks scroll position — either the page or a
|
|
13
|
+
|
|
14
|
+
* @summary A responsive viewport or container scroll progress indicator bar.
|
|
13
15
|
* custom scrollable element — and fills as the user scrolls down.
|
|
14
16
|
*
|
|
15
17
|
* @cssprop [--uibit-scroll-progress-height=0.1875rem] - Height of the progress bar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-progress.js","sourceRoot":"","sources":["../src/scroll-progress.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":"scroll-progress.js","sourceRoot":"","sources":["../src/scroll-progress.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uibit/scroll-progress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Lightweight, accessible scroll progress indicator. Tracks viewport scrolling by default, or can be targeting a specific scrollable element using selectors.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
12
|
},
|
|
13
13
|
"./custom-elements.json": "./custom-elements.json",
|
|
14
|
-
"./react": "./dist/frameworks/react/index.
|
|
14
|
+
"./react": "./dist/frameworks/react/index.ts",
|
|
15
15
|
"./vue": "./dist/frameworks/vue/index.ts",
|
|
16
16
|
"./svelte": "./dist/frameworks/svelte/index.svelte",
|
|
17
17
|
"./angular": "./dist/frameworks/angular/index.ts",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"directory": "packages/components/scroll-progress"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@uibit/core": "0.
|
|
47
|
+
"@uibit/core": "0.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^20.19.43",
|
|
51
51
|
"lit": "^3.3.3",
|
|
52
52
|
"typescript": "7.0.2",
|
|
53
|
-
"@uibit/codegen": "0.
|
|
53
|
+
"@uibit/codegen": "0.2.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"lit": "^3.0.0",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"tagName": "uibit-scroll-progress"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
|
-
"build": "cem analyze --
|
|
85
|
-
"dev": "concurrently \"cem analyze --
|
|
86
|
-
"analyze": "cem analyze --
|
|
84
|
+
"build": "cem analyze --config ../custom-elements-manifest.config.js && uibit-codegen --package . && tsc",
|
|
85
|
+
"dev": "concurrently \"cem analyze --config ../custom-elements-manifest.config.js --watch\" \"tsc --watch\"",
|
|
86
|
+
"analyze": "cem analyze --config ../custom-elements-manifest.config.js",
|
|
87
87
|
"typecheck": "tsc --noEmit"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, ClassAttributes } from 'react';
|
|
2
|
-
import type { ScrollProgress as HTMLElementClass } from '@uibit/scroll-progress';
|
|
3
|
-
import '@uibit/scroll-progress';
|
|
4
|
-
|
|
5
|
-
declare global {
|
|
6
|
-
namespace React {
|
|
7
|
-
namespace JSX {
|
|
8
|
-
interface IntrinsicElements {
|
|
9
|
-
'uibit-scroll-progress': ClassAttributes<HTMLElementClass> & HTMLAttributes<HTMLElementClass> & {
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
class?: string;
|
|
12
|
-
targetSelector?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|