fix the slider
Browse files- dist/assets/{index-CvL5ef4j.css → index-BhbZavTP.css} +77 -205
- dist/assets/{index-C9o3CIT4.js → index-NR4DZ1UN.js} +39 -22
- dist/index.html +2 -2
- package-lock.json +478 -0
- src/components/slider/index.tsx +39 -59
- src/components/slider/style.module.scss +111 -295
- src/components/topics/index.tsx +0 -2
dist/assets/{index-CvL5ef4j.css → index-BhbZavTP.css}
RENAMED
|
@@ -435,137 +435,76 @@ h2 {
|
|
| 435 |
._formGroup_b3g81_1 label {
|
| 436 |
font-size: 1rem;
|
| 437 |
margin-bottom: 1rem;
|
| 438 |
-
}.
|
| 439 |
-
--
|
| 440 |
-
--
|
| 441 |
-
--
|
| 442 |
-
--value-background: transparent;
|
| 443 |
-
--value-background-hover: var(--primary-color);
|
| 444 |
-
--value-font: 700 12px/1 Arial;
|
| 445 |
-
--fill-color: var(--primary-color);
|
| 446 |
-
--progress-background: #eee;
|
| 447 |
-
--progress-radius: 20px;
|
| 448 |
-
--track-height: calc(var(--thumb-size) / 2);
|
| 449 |
-
--min-max-font: 12px Arial;
|
| 450 |
-
--min-max-opacity: 0.5;
|
| 451 |
-
--min-max-x-offset: 50%;
|
| 452 |
-
--thumb-size: 20px;
|
| 453 |
-
--thumb-color: white;
|
| 454 |
-
--thumb-shadow: 0 0 3px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.5) inset,
|
| 455 |
-
0 0 0 99px var(--thumb-color) inset;
|
| 456 |
-
--thumb-shadow-active: 0 0 0 calc(var(--thumb-size) / 4) inset var(--thumb-color),
|
| 457 |
-
0 0 0 99px var(--primary-color) inset, 0 0 3px rgba(0, 0, 0, 0.4);
|
| 458 |
-
--thumb-shadow-hover: var(--thumb-shadow);
|
| 459 |
-
--ticks-thickness: 1px;
|
| 460 |
-
--ticks-height: 5px;
|
| 461 |
-
--ticks-gap: var(
|
| 462 |
-
--ticks-height,
|
| 463 |
-
0
|
| 464 |
-
);
|
| 465 |
-
--ticks-color: silver;
|
| 466 |
-
--step: 1;
|
| 467 |
-
--ticks-count: Calc(var(--max) - var(--min)) / var(--step);
|
| 468 |
-
--maxTicksAllowed: 30;
|
| 469 |
-
--too-many-ticks: Min(1, Max(var(--ticks-count) - var(--maxTicksAllowed), 0));
|
| 470 |
-
--x-step: Max(
|
| 471 |
-
var(--step),
|
| 472 |
-
var(--too-many-ticks) * (var(--max) - var(--min))
|
| 473 |
-
);
|
| 474 |
-
--tickInterval: 100/ ((var(--max) - var(--min)) / var(--step)) * var(--tickEvery, 1);
|
| 475 |
-
--tickIntervalPerc: calc(
|
| 476 |
-
(100% - var(--thumb-size)) / ((var(--max) - var(--min)) / var(--x-step)) *
|
| 477 |
-
var(--tickEvery, 1)
|
| 478 |
-
);
|
| 479 |
-
--value-a: Clamp(
|
| 480 |
-
var(--min),
|
| 481 |
-
var(--value, 0),
|
| 482 |
-
var(--max)
|
| 483 |
-
);
|
| 484 |
-
--value-b: var(--value, 0);
|
| 485 |
-
--text-value-a: var(--text-value, "");
|
| 486 |
-
--completed-a: calc(
|
| 487 |
-
(var(--value-a) - var(--min)) / (var(--max) - var(--min)) * 100
|
| 488 |
-
);
|
| 489 |
-
--completed-b: calc(
|
| 490 |
-
(var(--value-b) - var(--min)) / (var(--max) - var(--min)) * 100
|
| 491 |
-
);
|
| 492 |
-
--ca: Min(var(--completed-a), var(--completed-b));
|
| 493 |
-
--cb: Max(var(--completed-a), var(--completed-b));
|
| 494 |
-
--thumbs-too-close: Clamp(
|
| 495 |
-
-1,
|
| 496 |
-
1000 * (Min(1, Max(var(--cb) - var(--ca) - 5, -1)) + 0.001),
|
| 497 |
-
1
|
| 498 |
-
);
|
| 499 |
-
display: inline-block;
|
| 500 |
-
height: max(var(--track-height), var(--thumb-size));
|
| 501 |
-
background: linear-gradient(to right, var(--ticks-color) var(--ticks-thickness), transparent 1px) repeat-x;
|
| 502 |
-
background-size: var(--tickIntervalPerc) var(--ticks-height);
|
| 503 |
-
background-position-x: calc(var(--thumb-size) / 2 - var(--ticks-thickness) / 2);
|
| 504 |
-
background-position-y: var(--flip-y, bottom);
|
| 505 |
-
padding-bottom: var(--flip-y, var(--ticks-gap));
|
| 506 |
-
padding-top: calc(var(--flip-y) * var(--ticks-gap));
|
| 507 |
-
margin-top: 1rem;
|
| 508 |
-
margin-bottom: 2rem;
|
| 509 |
position: relative;
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 514 |
}
|
| 515 |
-
.
|
| 516 |
-
--offset: calc(var(--thumb-size) / 2);
|
| 517 |
content: counter(x);
|
| 518 |
-
display: var(--show-min-max, block);
|
| 519 |
-
font: var(--min-max-font);
|
| 520 |
position: absolute;
|
| 521 |
-
bottom:
|
| 522 |
-
top: calc(
|
| 523 |
-
opacity:
|
| 524 |
-
transform: translateX(calc(
|
| 525 |
pointer-events: none;
|
| 526 |
}
|
| 527 |
-
.
|
| 528 |
--before: 1;
|
| 529 |
counter-reset: x var(--min);
|
| 530 |
-
left:
|
| 531 |
}
|
| 532 |
-
.
|
| 533 |
counter-reset: x var(--max);
|
| 534 |
-
right:
|
| 535 |
}
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
|
|
|
| 542 |
pointer-events: none;
|
| 543 |
-
margin: 0 auto;
|
| 544 |
-
z-index: 5;
|
| 545 |
}
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 552 |
}
|
| 553 |
-
|
| 554 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 555 |
--clip-end: calc(100% - (var(--cb)) * 1%);
|
| 556 |
-
--clip
|
| 557 |
-
--clip: inset(-20px var(--clip-end) -20px var(--clip-start));
|
| 558 |
position: absolute;
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
background: var(--progress-background, #eee);
|
| 564 |
-
pointer-events: none;
|
| 565 |
z-index: -1;
|
| 566 |
-
border-radius: var(--progress-radius);
|
| 567 |
}
|
| 568 |
-
.
|
| 569 |
content: "";
|
| 570 |
position: absolute;
|
| 571 |
left: 0;
|
|
@@ -573,126 +512,59 @@ h2 {
|
|
| 573 |
clip-path: var(--clip);
|
| 574 |
top: 0;
|
| 575 |
bottom: 0;
|
| 576 |
-
background: var(--
|
| 577 |
-
box-shadow: var(--progress-flll-shadow);
|
| 578 |
z-index: 1;
|
| 579 |
border-radius: inherit;
|
| 580 |
}
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
top: 0;
|
| 585 |
-
right: 0;
|
| 586 |
-
bottom: 0;
|
| 587 |
-
left: 0;
|
| 588 |
-
box-shadow: var(--progress-shadow);
|
| 589 |
-
pointer-events: none;
|
| 590 |
-
border-radius: inherit;
|
| 591 |
-
}
|
| 592 |
-
._rangeSlider_1trvf_1 > input {
|
| 593 |
-webkit-appearance: none;
|
| 594 |
width: 100%;
|
| 595 |
-
height:
|
| 596 |
margin: 0;
|
| 597 |
position: absolute;
|
| 598 |
left: 0;
|
| 599 |
-
top: calc(50% - max(var(--track-height), var(--thumb-size)) / 2 + var(--ticks-gap) / 2 * var(--flip-y, -1));
|
| 600 |
-
cursor: -webkit-grab;
|
| 601 |
cursor: grab;
|
| 602 |
outline: none;
|
| 603 |
background: none;
|
| 604 |
}
|
| 605 |
-
.
|
| 606 |
-
pointer-events: none;
|
| 607 |
-
}
|
| 608 |
-
._rangeSlider_1trvf_1 > input::-webkit-slider-thumb {
|
| 609 |
appearance: none;
|
| 610 |
-
height:
|
| 611 |
-
width:
|
| 612 |
-
transform: translateY(-
|
| 613 |
-
border-radius:
|
| 614 |
-
background: var(--
|
| 615 |
box-shadow: var(--thumb-shadow);
|
| 616 |
border: none;
|
| 617 |
pointer-events: auto;
|
| 618 |
-
transition: 0.1s;
|
| 619 |
}
|
| 620 |
-
.
|
| 621 |
appearance: none;
|
| 622 |
-
height:
|
| 623 |
-
width:
|
| 624 |
-
transform: translateY(-
|
| 625 |
-
border-radius:
|
| 626 |
-
background: var(--
|
| 627 |
box-shadow: var(--thumb-shadow);
|
| 628 |
border: none;
|
| 629 |
pointer-events: auto;
|
| 630 |
-
transition: 0.1s;
|
| 631 |
}
|
| 632 |
-
.
|
| 633 |
appearance: none;
|
| 634 |
-
height:
|
| 635 |
-
width:
|
| 636 |
-
transform: translateY(-
|
| 637 |
-
border-radius:
|
| 638 |
-
background: var(--
|
| 639 |
box-shadow: var(--thumb-shadow);
|
| 640 |
border: none;
|
| 641 |
pointer-events: auto;
|
| 642 |
-
transition: 0.1s;
|
| 643 |
-
}
|
| 644 |
-
._rangeSlider_1trvf_1 > input:hover {
|
| 645 |
-
--thumb-shadow: var(--thumb-shadow-hover);
|
| 646 |
}
|
| 647 |
-
.
|
| 648 |
-
--thumb-shadow: var(--
|
| 649 |
cursor: grabbing;
|
| 650 |
-
z-index: 2;
|
| 651 |
-
}
|
| 652 |
-
._rangeSlider_1trvf_1 > input:active + output {
|
| 653 |
-
transition: 0s;
|
| 654 |
-
}
|
| 655 |
-
._rangeSlider_1trvf_1 > input:nth-of-type(1) {
|
| 656 |
-
--is-left-most: Clamp(0, (var(--value-a) - var(--value-b)) * 99999, 1);
|
| 657 |
-
}
|
| 658 |
-
._rangeSlider_1trvf_1 > input:nth-of-type(1) + output {
|
| 659 |
-
--value: var(--value-a);
|
| 660 |
-
--x-offset: calc(var(--completed-a) * -1%);
|
| 661 |
-
}
|
| 662 |
-
._rangeSlider_1trvf_1 > input:nth-of-type(1) + output:not(:only-of-type) {
|
| 663 |
-
--flip: calc(var(--thumbs-too-close) * -1);
|
| 664 |
-
}
|
| 665 |
-
._rangeSlider_1trvf_1 > input:nth-of-type(1) + output::after {
|
| 666 |
-
content: var(--prefix, "") var(--text-value-a) var(--suffix, "");
|
| 667 |
-
}
|
| 668 |
-
._rangeSlider_1trvf_1 > input:nth-of-type(2) {
|
| 669 |
-
--is-left-most: Clamp(0, (var(--value-b) - var(--value-a)) * 99999, 1);
|
| 670 |
-
}
|
| 671 |
-
._rangeSlider_1trvf_1 > input:nth-of-type(2) + output {
|
| 672 |
-
--value: var(--value-b);
|
| 673 |
-
}
|
| 674 |
-
._rangeSlider_1trvf_1 > input:only-of-type ~ ._progress_1trvf_116 {
|
| 675 |
-
--clip-start: 0;
|
| 676 |
-
}
|
| 677 |
-
._rangeSlider_1trvf_1 > input + output {
|
| 678 |
-
--flip: -1;
|
| 679 |
-
--x-offset: calc(var(--completed-b) * -1%);
|
| 680 |
-
--pos: calc(
|
| 681 |
-
((var(--value) - var(--min)) / (var(--max) - var(--min))) * 100%
|
| 682 |
-
);
|
| 683 |
-
pointer-events: none;
|
| 684 |
-
position: absolute;
|
| 685 |
-
z-index: 5;
|
| 686 |
-
background: var(--value-background);
|
| 687 |
-
border-radius: 10px;
|
| 688 |
-
padding: 0 4px;
|
| 689 |
-
left: var(--pos);
|
| 690 |
-
transform: translate(var(--x-offset), calc(150% * var(--flip) - (var(--y-offset, 0px) + var(--value-offset-y)) * var(--flip)));
|
| 691 |
-
transition: all 0.12s ease-out, left 0s;
|
| 692 |
-
}
|
| 693 |
-
._rangeSlider_1trvf_1 > input + output::after {
|
| 694 |
-
content: var(--prefix, "") var(--text-value-b) var(--suffix, "");
|
| 695 |
-
font: var(--value-font);
|
| 696 |
}._post_uuidr_1 {
|
| 697 |
margin-bottom: 0.9375rem;
|
| 698 |
font-size: 0.9375rem;
|
|
|
|
| 435 |
._formGroup_b3g81_1 label {
|
| 436 |
font-size: 1rem;
|
| 437 |
margin-bottom: 1rem;
|
| 438 |
+
}._slider_1hlzr_1 {
|
| 439 |
+
--ticks-count: calc(var(--max) - var(--min)) / var(--step);
|
| 440 |
+
--too-many-ticks: min(1, Max(var(--ticks-count) - 30, 0));
|
| 441 |
+
--x-step: max(var(--step), var(--too-many-ticks) * (var(--max) - var(--min)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
position: relative;
|
| 443 |
+
background: linear-gradient(to right, var(--text-muted-color) 1px, transparent 1px) repeat-x;
|
| 444 |
+
background-size: calc((100% - 20px) / ((var(--max) - var(--min)) / var(--x-step))) 5px;
|
| 445 |
+
background-position-x: calc(10px - 0.5px);
|
| 446 |
+
background-position-y: bottom;
|
| 447 |
+
font-weight: 700;
|
| 448 |
+
color: var(--text-muted-color);
|
| 449 |
+
font-size: 0.8125rem;
|
| 450 |
+
height: 22px;
|
| 451 |
+
margin-top: 2.5ch;
|
| 452 |
+
margin-bottom: 2.5ch;
|
| 453 |
}
|
| 454 |
+
._slider_1hlzr_1::before, ._slider_1hlzr_1::after {
|
|
|
|
| 455 |
content: counter(x);
|
|
|
|
|
|
|
| 456 |
position: absolute;
|
| 457 |
+
bottom: calc(-2.5ch - 2px);
|
| 458 |
+
top: calc(2.5ch + 2px);
|
| 459 |
+
opacity: 0.5;
|
| 460 |
+
transform: translateX(calc(50% * var(--before, -1) * -1));
|
| 461 |
pointer-events: none;
|
| 462 |
}
|
| 463 |
+
._slider_1hlzr_1::before {
|
| 464 |
--before: 1;
|
| 465 |
counter-reset: x var(--min);
|
| 466 |
+
left: 10px;
|
| 467 |
}
|
| 468 |
+
._slider_1hlzr_1::after {
|
| 469 |
counter-reset: x var(--max);
|
| 470 |
+
right: 10px;
|
| 471 |
}
|
| 472 |
+
|
| 473 |
+
._outputContainer_1hlzr_36 {
|
| 474 |
+
position: absolute;
|
| 475 |
+
top: 0;
|
| 476 |
+
left: 10px;
|
| 477 |
+
right: 10px;
|
| 478 |
+
height: 10px;
|
| 479 |
pointer-events: none;
|
|
|
|
|
|
|
| 480 |
}
|
| 481 |
+
|
| 482 |
+
._output_1hlzr_36 {
|
| 483 |
+
pointer-events: none;
|
| 484 |
+
position: absolute;
|
| 485 |
+
z-index: 5;
|
| 486 |
+
width: 20px;
|
| 487 |
+
height: 20px;
|
| 488 |
+
left: calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100% - 10px);
|
| 489 |
+
bottom: 16px;
|
| 490 |
+
text-align: center;
|
| 491 |
}
|
| 492 |
+
|
| 493 |
+
._progress_1hlzr_56 {
|
| 494 |
+
--completed-a: calc((clamp(var(--min), var(--value, 0), var(--max)) - var(--min)) / (var(--max) - var(--min)) * 100);
|
| 495 |
+
--completed-b: calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100);
|
| 496 |
+
--cb: max(var(--completed-a), var(--completed-b));
|
| 497 |
+
--start-end: 10px;
|
| 498 |
--clip-end: calc(100% - (var(--cb)) * 1%);
|
| 499 |
+
--clip: inset(-20px var(--clip-end) -20px 0);
|
|
|
|
| 500 |
position: absolute;
|
| 501 |
+
width: 100%;
|
| 502 |
+
height: 10px;
|
| 503 |
+
background: var(--text-color);
|
| 504 |
+
border-radius: 10px;
|
|
|
|
|
|
|
| 505 |
z-index: -1;
|
|
|
|
| 506 |
}
|
| 507 |
+
._progress_1hlzr_56::before {
|
| 508 |
content: "";
|
| 509 |
position: absolute;
|
| 510 |
left: 0;
|
|
|
|
| 512 |
clip-path: var(--clip);
|
| 513 |
top: 0;
|
| 514 |
bottom: 0;
|
| 515 |
+
background: var(--text-secondary);
|
|
|
|
| 516 |
z-index: 1;
|
| 517 |
border-radius: inherit;
|
| 518 |
}
|
| 519 |
+
|
| 520 |
+
._input_1hlzr_83 {
|
| 521 |
+
--thumb-shadow: 0 0 3px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 0 0 99px var(--text-color) inset;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 522 |
-webkit-appearance: none;
|
| 523 |
width: 100%;
|
| 524 |
+
height: 20px;
|
| 525 |
margin: 0;
|
| 526 |
position: absolute;
|
| 527 |
left: 0;
|
|
|
|
|
|
|
| 528 |
cursor: grab;
|
| 529 |
outline: none;
|
| 530 |
background: none;
|
| 531 |
}
|
| 532 |
+
._input_1hlzr_83::-webkit-slider-thumb {
|
|
|
|
|
|
|
|
|
|
| 533 |
appearance: none;
|
| 534 |
+
height: 20px;
|
| 535 |
+
width: 20px;
|
| 536 |
+
transform: translateY(-5px);
|
| 537 |
+
border-radius: 50%;
|
| 538 |
+
background: var(--text-color);
|
| 539 |
box-shadow: var(--thumb-shadow);
|
| 540 |
border: none;
|
| 541 |
pointer-events: auto;
|
|
|
|
| 542 |
}
|
| 543 |
+
._input_1hlzr_83::-moz-range-thumb {
|
| 544 |
appearance: none;
|
| 545 |
+
height: 20px;
|
| 546 |
+
width: 20px;
|
| 547 |
+
transform: translateY(-5px);
|
| 548 |
+
border-radius: 50%;
|
| 549 |
+
background: var(--text-color);
|
| 550 |
box-shadow: var(--thumb-shadow);
|
| 551 |
border: none;
|
| 552 |
pointer-events: auto;
|
|
|
|
| 553 |
}
|
| 554 |
+
._input_1hlzr_83::-ms-thumb {
|
| 555 |
appearance: none;
|
| 556 |
+
height: 20px;
|
| 557 |
+
width: 20px;
|
| 558 |
+
transform: translateY(-5px);
|
| 559 |
+
border-radius: 50%;
|
| 560 |
+
background: var(--text-color);
|
| 561 |
box-shadow: var(--thumb-shadow);
|
| 562 |
border: none;
|
| 563 |
pointer-events: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
}
|
| 565 |
+
._input_1hlzr_83:active {
|
| 566 |
+
--thumb-shadow: 0 0 0 5px inset var(--text-color), 0 0 0 99px var(--text-secondary) inset, 0 0 3px rgba(0, 0, 0, 0.4);
|
| 567 |
cursor: grabbing;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 568 |
}._post_uuidr_1 {
|
| 569 |
margin-bottom: 0.9375rem;
|
| 570 |
font-size: 0.9375rem;
|
dist/assets/{index-C9o3CIT4.js → index-NR4DZ1UN.js}
RENAMED
|
@@ -620,31 +620,48 @@ const style$5 = {
|
|
| 620 |
function FormGroup(props) {
|
| 621 |
return /* @__PURE__ */ u$1("div", { className: style$5.formGroup, children: props.children });
|
| 622 |
}
|
| 623 |
-
const
|
| 624 |
-
const
|
| 625 |
-
const
|
|
|
|
|
|
|
| 626 |
const style$4 = {
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
|
|
|
|
|
|
| 630 |
};
|
| 631 |
function Slider(props) {
|
| 632 |
-
return /* @__PURE__ */ u$1(
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
min: props.min,
|
| 639 |
-
max: props.max,
|
| 640 |
-
step: props.step
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
}
|
| 649 |
function Topics(props) {
|
| 650 |
const sortedTopics = T(() => {
|
|
|
|
| 620 |
function FormGroup(props) {
|
| 621 |
return /* @__PURE__ */ u$1("div", { className: style$5.formGroup, children: props.children });
|
| 622 |
}
|
| 623 |
+
const slider = "_slider_1hlzr_1";
|
| 624 |
+
const outputContainer = "_outputContainer_1hlzr_36";
|
| 625 |
+
const output = "_output_1hlzr_36";
|
| 626 |
+
const progress = "_progress_1hlzr_56";
|
| 627 |
+
const input$1 = "_input_1hlzr_83";
|
| 628 |
const style$4 = {
|
| 629 |
+
slider,
|
| 630 |
+
outputContainer,
|
| 631 |
+
output,
|
| 632 |
+
progress,
|
| 633 |
+
input: input$1
|
| 634 |
};
|
| 635 |
function Slider(props) {
|
| 636 |
+
return /* @__PURE__ */ u$1(
|
| 637 |
+
"div",
|
| 638 |
+
{
|
| 639 |
+
className: cn(style$4.slider, props.className),
|
| 640 |
+
style: {
|
| 641 |
+
"--value": props.value,
|
| 642 |
+
"--min": props.min,
|
| 643 |
+
"--max": props.max,
|
| 644 |
+
"--step": props.step
|
| 645 |
+
},
|
| 646 |
+
children: [
|
| 647 |
+
/* @__PURE__ */ u$1(
|
| 648 |
+
"input",
|
| 649 |
+
{
|
| 650 |
+
type: "range",
|
| 651 |
+
className: style$4.input,
|
| 652 |
+
name: props.name,
|
| 653 |
+
min: props.min,
|
| 654 |
+
max: props.max,
|
| 655 |
+
step: props.step,
|
| 656 |
+
value: props.value,
|
| 657 |
+
onInput: (e2) => props.onChange(Number(e2.target.value))
|
| 658 |
+
}
|
| 659 |
+
),
|
| 660 |
+
/* @__PURE__ */ u$1("div", { className: style$4.progress }),
|
| 661 |
+
/* @__PURE__ */ u$1("div", { className: style$4.outputContainer, children: /* @__PURE__ */ u$1("output", { className: style$4.output, children: props.value }) })
|
| 662 |
+
]
|
| 663 |
+
}
|
| 664 |
+
);
|
| 665 |
}
|
| 666 |
function Topics(props) {
|
| 667 |
const sortedTopics = T(() => {
|
dist/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 7 |
<meta name="color-scheme" content="dark"/>
|
| 8 |
<title>JVCGPT</title>
|
| 9 |
-
<script type="module" crossorigin src="./assets/index-
|
| 10 |
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
<div id="app"></div>
|
|
|
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 7 |
<meta name="color-scheme" content="dark"/>
|
| 8 |
<title>JVCGPT</title>
|
| 9 |
+
<script type="module" crossorigin src="./assets/index-NR4DZ1UN.js"></script>
|
| 10 |
+
<link rel="stylesheet" crossorigin href="./assets/index-BhbZavTP.css">
|
| 11 |
</head>
|
| 12 |
<body>
|
| 13 |
<div id="app"></div>
|
package-lock.json
CHANGED
|
@@ -1060,6 +1060,330 @@
|
|
| 1060 |
"node": ">= 8"
|
| 1061 |
}
|
| 1062 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1063 |
"node_modules/@preact/preset-vite": {
|
| 1064 |
"version": "2.9.4",
|
| 1065 |
"resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.9.4.tgz",
|
|
@@ -1691,6 +2015,21 @@
|
|
| 1691 |
"concat-map": "0.0.1"
|
| 1692 |
}
|
| 1693 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1694 |
"node_modules/browserslist": {
|
| 1695 |
"version": "4.24.4",
|
| 1696 |
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
|
|
@@ -1829,6 +2168,24 @@
|
|
| 1829 |
"url": "https://github.com/chalk/chalk?sponsor=1"
|
| 1830 |
}
|
| 1831 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1832 |
"node_modules/classnames": {
|
| 1833 |
"version": "2.5.1",
|
| 1834 |
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
|
|
@@ -2036,6 +2393,21 @@
|
|
| 2036 |
"url": "https://github.com/sponsors/ljharb"
|
| 2037 |
}
|
| 2038 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2039 |
"node_modules/doctrine": {
|
| 2040 |
"version": "3.0.0",
|
| 2041 |
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
|
|
@@ -2709,6 +3081,21 @@
|
|
| 2709 |
"node": "^10.12.0 || >=12.0.0"
|
| 2710 |
}
|
| 2711 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2712 |
"node_modules/find-up": {
|
| 2713 |
"version": "5.0.0",
|
| 2714 |
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
|
@@ -3357,6 +3744,18 @@
|
|
| 3357 |
"url": "https://github.com/sponsors/ljharb"
|
| 3358 |
}
|
| 3359 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3360 |
"node_modules/is-number-object": {
|
| 3361 |
"version": "1.1.1",
|
| 3362 |
"resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
|
|
@@ -3751,6 +4150,22 @@
|
|
| 3751 |
"node": ">= 0.4"
|
| 3752 |
}
|
| 3753 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3754 |
"node_modules/minimatch": {
|
| 3755 |
"version": "3.1.2",
|
| 3756 |
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
|
@@ -3797,6 +4212,15 @@
|
|
| 3797 |
"dev": true,
|
| 3798 |
"license": "MIT"
|
| 3799 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3800 |
"node_modules/node-html-parser": {
|
| 3801 |
"version": "6.1.13",
|
| 3802 |
"resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz",
|
|
@@ -4201,6 +4625,22 @@
|
|
| 4201 |
"dev": true,
|
| 4202 |
"license": "MIT"
|
| 4203 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4204 |
"node_modules/reflect.getprototypeof": {
|
| 4205 |
"version": "1.0.10",
|
| 4206 |
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
|
|
@@ -4429,6 +4869,29 @@
|
|
| 4429 |
"url": "https://github.com/sponsors/ljharb"
|
| 4430 |
}
|
| 4431 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4432 |
"node_modules/sass-embedded": {
|
| 4433 |
"version": "1.83.4",
|
| 4434 |
"resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.83.4.tgz",
|
|
@@ -5198,6 +5661,21 @@
|
|
| 5198 |
"dev": true,
|
| 5199 |
"license": "MIT"
|
| 5200 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5201 |
"node_modules/tslib": {
|
| 5202 |
"version": "2.8.1",
|
| 5203 |
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
|
|
|
| 1060 |
"node": ">= 8"
|
| 1061 |
}
|
| 1062 |
},
|
| 1063 |
+
"node_modules/@parcel/watcher": {
|
| 1064 |
+
"version": "2.5.0",
|
| 1065 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz",
|
| 1066 |
+
"integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==",
|
| 1067 |
+
"dev": true,
|
| 1068 |
+
"hasInstallScript": true,
|
| 1069 |
+
"license": "MIT",
|
| 1070 |
+
"optional": true,
|
| 1071 |
+
"peer": true,
|
| 1072 |
+
"dependencies": {
|
| 1073 |
+
"detect-libc": "^1.0.3",
|
| 1074 |
+
"is-glob": "^4.0.3",
|
| 1075 |
+
"micromatch": "^4.0.5",
|
| 1076 |
+
"node-addon-api": "^7.0.0"
|
| 1077 |
+
},
|
| 1078 |
+
"engines": {
|
| 1079 |
+
"node": ">= 10.0.0"
|
| 1080 |
+
},
|
| 1081 |
+
"funding": {
|
| 1082 |
+
"type": "opencollective",
|
| 1083 |
+
"url": "https://opencollective.com/parcel"
|
| 1084 |
+
},
|
| 1085 |
+
"optionalDependencies": {
|
| 1086 |
+
"@parcel/watcher-android-arm64": "2.5.0",
|
| 1087 |
+
"@parcel/watcher-darwin-arm64": "2.5.0",
|
| 1088 |
+
"@parcel/watcher-darwin-x64": "2.5.0",
|
| 1089 |
+
"@parcel/watcher-freebsd-x64": "2.5.0",
|
| 1090 |
+
"@parcel/watcher-linux-arm-glibc": "2.5.0",
|
| 1091 |
+
"@parcel/watcher-linux-arm-musl": "2.5.0",
|
| 1092 |
+
"@parcel/watcher-linux-arm64-glibc": "2.5.0",
|
| 1093 |
+
"@parcel/watcher-linux-arm64-musl": "2.5.0",
|
| 1094 |
+
"@parcel/watcher-linux-x64-glibc": "2.5.0",
|
| 1095 |
+
"@parcel/watcher-linux-x64-musl": "2.5.0",
|
| 1096 |
+
"@parcel/watcher-win32-arm64": "2.5.0",
|
| 1097 |
+
"@parcel/watcher-win32-ia32": "2.5.0",
|
| 1098 |
+
"@parcel/watcher-win32-x64": "2.5.0"
|
| 1099 |
+
}
|
| 1100 |
+
},
|
| 1101 |
+
"node_modules/@parcel/watcher-android-arm64": {
|
| 1102 |
+
"version": "2.5.0",
|
| 1103 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz",
|
| 1104 |
+
"integrity": "sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==",
|
| 1105 |
+
"cpu": [
|
| 1106 |
+
"arm64"
|
| 1107 |
+
],
|
| 1108 |
+
"dev": true,
|
| 1109 |
+
"license": "MIT",
|
| 1110 |
+
"optional": true,
|
| 1111 |
+
"os": [
|
| 1112 |
+
"android"
|
| 1113 |
+
],
|
| 1114 |
+
"peer": true,
|
| 1115 |
+
"engines": {
|
| 1116 |
+
"node": ">= 10.0.0"
|
| 1117 |
+
},
|
| 1118 |
+
"funding": {
|
| 1119 |
+
"type": "opencollective",
|
| 1120 |
+
"url": "https://opencollective.com/parcel"
|
| 1121 |
+
}
|
| 1122 |
+
},
|
| 1123 |
+
"node_modules/@parcel/watcher-darwin-arm64": {
|
| 1124 |
+
"version": "2.5.0",
|
| 1125 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz",
|
| 1126 |
+
"integrity": "sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==",
|
| 1127 |
+
"cpu": [
|
| 1128 |
+
"arm64"
|
| 1129 |
+
],
|
| 1130 |
+
"dev": true,
|
| 1131 |
+
"license": "MIT",
|
| 1132 |
+
"optional": true,
|
| 1133 |
+
"os": [
|
| 1134 |
+
"darwin"
|
| 1135 |
+
],
|
| 1136 |
+
"peer": true,
|
| 1137 |
+
"engines": {
|
| 1138 |
+
"node": ">= 10.0.0"
|
| 1139 |
+
},
|
| 1140 |
+
"funding": {
|
| 1141 |
+
"type": "opencollective",
|
| 1142 |
+
"url": "https://opencollective.com/parcel"
|
| 1143 |
+
}
|
| 1144 |
+
},
|
| 1145 |
+
"node_modules/@parcel/watcher-darwin-x64": {
|
| 1146 |
+
"version": "2.5.0",
|
| 1147 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.0.tgz",
|
| 1148 |
+
"integrity": "sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==",
|
| 1149 |
+
"cpu": [
|
| 1150 |
+
"x64"
|
| 1151 |
+
],
|
| 1152 |
+
"dev": true,
|
| 1153 |
+
"license": "MIT",
|
| 1154 |
+
"optional": true,
|
| 1155 |
+
"os": [
|
| 1156 |
+
"darwin"
|
| 1157 |
+
],
|
| 1158 |
+
"peer": true,
|
| 1159 |
+
"engines": {
|
| 1160 |
+
"node": ">= 10.0.0"
|
| 1161 |
+
},
|
| 1162 |
+
"funding": {
|
| 1163 |
+
"type": "opencollective",
|
| 1164 |
+
"url": "https://opencollective.com/parcel"
|
| 1165 |
+
}
|
| 1166 |
+
},
|
| 1167 |
+
"node_modules/@parcel/watcher-freebsd-x64": {
|
| 1168 |
+
"version": "2.5.0",
|
| 1169 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.0.tgz",
|
| 1170 |
+
"integrity": "sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==",
|
| 1171 |
+
"cpu": [
|
| 1172 |
+
"x64"
|
| 1173 |
+
],
|
| 1174 |
+
"dev": true,
|
| 1175 |
+
"license": "MIT",
|
| 1176 |
+
"optional": true,
|
| 1177 |
+
"os": [
|
| 1178 |
+
"freebsd"
|
| 1179 |
+
],
|
| 1180 |
+
"peer": true,
|
| 1181 |
+
"engines": {
|
| 1182 |
+
"node": ">= 10.0.0"
|
| 1183 |
+
},
|
| 1184 |
+
"funding": {
|
| 1185 |
+
"type": "opencollective",
|
| 1186 |
+
"url": "https://opencollective.com/parcel"
|
| 1187 |
+
}
|
| 1188 |
+
},
|
| 1189 |
+
"node_modules/@parcel/watcher-linux-arm-glibc": {
|
| 1190 |
+
"version": "2.5.0",
|
| 1191 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.0.tgz",
|
| 1192 |
+
"integrity": "sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==",
|
| 1193 |
+
"cpu": [
|
| 1194 |
+
"arm"
|
| 1195 |
+
],
|
| 1196 |
+
"dev": true,
|
| 1197 |
+
"license": "MIT",
|
| 1198 |
+
"optional": true,
|
| 1199 |
+
"os": [
|
| 1200 |
+
"linux"
|
| 1201 |
+
],
|
| 1202 |
+
"peer": true,
|
| 1203 |
+
"engines": {
|
| 1204 |
+
"node": ">= 10.0.0"
|
| 1205 |
+
},
|
| 1206 |
+
"funding": {
|
| 1207 |
+
"type": "opencollective",
|
| 1208 |
+
"url": "https://opencollective.com/parcel"
|
| 1209 |
+
}
|
| 1210 |
+
},
|
| 1211 |
+
"node_modules/@parcel/watcher-linux-arm-musl": {
|
| 1212 |
+
"version": "2.5.0",
|
| 1213 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.0.tgz",
|
| 1214 |
+
"integrity": "sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==",
|
| 1215 |
+
"cpu": [
|
| 1216 |
+
"arm"
|
| 1217 |
+
],
|
| 1218 |
+
"dev": true,
|
| 1219 |
+
"license": "MIT",
|
| 1220 |
+
"optional": true,
|
| 1221 |
+
"os": [
|
| 1222 |
+
"linux"
|
| 1223 |
+
],
|
| 1224 |
+
"peer": true,
|
| 1225 |
+
"engines": {
|
| 1226 |
+
"node": ">= 10.0.0"
|
| 1227 |
+
},
|
| 1228 |
+
"funding": {
|
| 1229 |
+
"type": "opencollective",
|
| 1230 |
+
"url": "https://opencollective.com/parcel"
|
| 1231 |
+
}
|
| 1232 |
+
},
|
| 1233 |
+
"node_modules/@parcel/watcher-linux-arm64-glibc": {
|
| 1234 |
+
"version": "2.5.0",
|
| 1235 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.0.tgz",
|
| 1236 |
+
"integrity": "sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==",
|
| 1237 |
+
"cpu": [
|
| 1238 |
+
"arm64"
|
| 1239 |
+
],
|
| 1240 |
+
"dev": true,
|
| 1241 |
+
"license": "MIT",
|
| 1242 |
+
"optional": true,
|
| 1243 |
+
"os": [
|
| 1244 |
+
"linux"
|
| 1245 |
+
],
|
| 1246 |
+
"peer": true,
|
| 1247 |
+
"engines": {
|
| 1248 |
+
"node": ">= 10.0.0"
|
| 1249 |
+
},
|
| 1250 |
+
"funding": {
|
| 1251 |
+
"type": "opencollective",
|
| 1252 |
+
"url": "https://opencollective.com/parcel"
|
| 1253 |
+
}
|
| 1254 |
+
},
|
| 1255 |
+
"node_modules/@parcel/watcher-linux-arm64-musl": {
|
| 1256 |
+
"version": "2.5.0",
|
| 1257 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.0.tgz",
|
| 1258 |
+
"integrity": "sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==",
|
| 1259 |
+
"cpu": [
|
| 1260 |
+
"arm64"
|
| 1261 |
+
],
|
| 1262 |
+
"dev": true,
|
| 1263 |
+
"license": "MIT",
|
| 1264 |
+
"optional": true,
|
| 1265 |
+
"os": [
|
| 1266 |
+
"linux"
|
| 1267 |
+
],
|
| 1268 |
+
"peer": true,
|
| 1269 |
+
"engines": {
|
| 1270 |
+
"node": ">= 10.0.0"
|
| 1271 |
+
},
|
| 1272 |
+
"funding": {
|
| 1273 |
+
"type": "opencollective",
|
| 1274 |
+
"url": "https://opencollective.com/parcel"
|
| 1275 |
+
}
|
| 1276 |
+
},
|
| 1277 |
+
"node_modules/@parcel/watcher-linux-x64-glibc": {
|
| 1278 |
+
"version": "2.5.0",
|
| 1279 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz",
|
| 1280 |
+
"integrity": "sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==",
|
| 1281 |
+
"cpu": [
|
| 1282 |
+
"x64"
|
| 1283 |
+
],
|
| 1284 |
+
"dev": true,
|
| 1285 |
+
"license": "MIT",
|
| 1286 |
+
"optional": true,
|
| 1287 |
+
"os": [
|
| 1288 |
+
"linux"
|
| 1289 |
+
],
|
| 1290 |
+
"peer": true,
|
| 1291 |
+
"engines": {
|
| 1292 |
+
"node": ">= 10.0.0"
|
| 1293 |
+
},
|
| 1294 |
+
"funding": {
|
| 1295 |
+
"type": "opencollective",
|
| 1296 |
+
"url": "https://opencollective.com/parcel"
|
| 1297 |
+
}
|
| 1298 |
+
},
|
| 1299 |
+
"node_modules/@parcel/watcher-linux-x64-musl": {
|
| 1300 |
+
"version": "2.5.0",
|
| 1301 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz",
|
| 1302 |
+
"integrity": "sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==",
|
| 1303 |
+
"cpu": [
|
| 1304 |
+
"x64"
|
| 1305 |
+
],
|
| 1306 |
+
"dev": true,
|
| 1307 |
+
"license": "MIT",
|
| 1308 |
+
"optional": true,
|
| 1309 |
+
"os": [
|
| 1310 |
+
"linux"
|
| 1311 |
+
],
|
| 1312 |
+
"peer": true,
|
| 1313 |
+
"engines": {
|
| 1314 |
+
"node": ">= 10.0.0"
|
| 1315 |
+
},
|
| 1316 |
+
"funding": {
|
| 1317 |
+
"type": "opencollective",
|
| 1318 |
+
"url": "https://opencollective.com/parcel"
|
| 1319 |
+
}
|
| 1320 |
+
},
|
| 1321 |
+
"node_modules/@parcel/watcher-win32-arm64": {
|
| 1322 |
+
"version": "2.5.0",
|
| 1323 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.0.tgz",
|
| 1324 |
+
"integrity": "sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==",
|
| 1325 |
+
"cpu": [
|
| 1326 |
+
"arm64"
|
| 1327 |
+
],
|
| 1328 |
+
"dev": true,
|
| 1329 |
+
"license": "MIT",
|
| 1330 |
+
"optional": true,
|
| 1331 |
+
"os": [
|
| 1332 |
+
"win32"
|
| 1333 |
+
],
|
| 1334 |
+
"peer": true,
|
| 1335 |
+
"engines": {
|
| 1336 |
+
"node": ">= 10.0.0"
|
| 1337 |
+
},
|
| 1338 |
+
"funding": {
|
| 1339 |
+
"type": "opencollective",
|
| 1340 |
+
"url": "https://opencollective.com/parcel"
|
| 1341 |
+
}
|
| 1342 |
+
},
|
| 1343 |
+
"node_modules/@parcel/watcher-win32-ia32": {
|
| 1344 |
+
"version": "2.5.0",
|
| 1345 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.0.tgz",
|
| 1346 |
+
"integrity": "sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==",
|
| 1347 |
+
"cpu": [
|
| 1348 |
+
"ia32"
|
| 1349 |
+
],
|
| 1350 |
+
"dev": true,
|
| 1351 |
+
"license": "MIT",
|
| 1352 |
+
"optional": true,
|
| 1353 |
+
"os": [
|
| 1354 |
+
"win32"
|
| 1355 |
+
],
|
| 1356 |
+
"peer": true,
|
| 1357 |
+
"engines": {
|
| 1358 |
+
"node": ">= 10.0.0"
|
| 1359 |
+
},
|
| 1360 |
+
"funding": {
|
| 1361 |
+
"type": "opencollective",
|
| 1362 |
+
"url": "https://opencollective.com/parcel"
|
| 1363 |
+
}
|
| 1364 |
+
},
|
| 1365 |
+
"node_modules/@parcel/watcher-win32-x64": {
|
| 1366 |
+
"version": "2.5.0",
|
| 1367 |
+
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.0.tgz",
|
| 1368 |
+
"integrity": "sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==",
|
| 1369 |
+
"cpu": [
|
| 1370 |
+
"x64"
|
| 1371 |
+
],
|
| 1372 |
+
"dev": true,
|
| 1373 |
+
"license": "MIT",
|
| 1374 |
+
"optional": true,
|
| 1375 |
+
"os": [
|
| 1376 |
+
"win32"
|
| 1377 |
+
],
|
| 1378 |
+
"peer": true,
|
| 1379 |
+
"engines": {
|
| 1380 |
+
"node": ">= 10.0.0"
|
| 1381 |
+
},
|
| 1382 |
+
"funding": {
|
| 1383 |
+
"type": "opencollective",
|
| 1384 |
+
"url": "https://opencollective.com/parcel"
|
| 1385 |
+
}
|
| 1386 |
+
},
|
| 1387 |
"node_modules/@preact/preset-vite": {
|
| 1388 |
"version": "2.9.4",
|
| 1389 |
"resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.9.4.tgz",
|
|
|
|
| 2015 |
"concat-map": "0.0.1"
|
| 2016 |
}
|
| 2017 |
},
|
| 2018 |
+
"node_modules/braces": {
|
| 2019 |
+
"version": "3.0.3",
|
| 2020 |
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
| 2021 |
+
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
| 2022 |
+
"dev": true,
|
| 2023 |
+
"license": "MIT",
|
| 2024 |
+
"optional": true,
|
| 2025 |
+
"peer": true,
|
| 2026 |
+
"dependencies": {
|
| 2027 |
+
"fill-range": "^7.1.1"
|
| 2028 |
+
},
|
| 2029 |
+
"engines": {
|
| 2030 |
+
"node": ">=8"
|
| 2031 |
+
}
|
| 2032 |
+
},
|
| 2033 |
"node_modules/browserslist": {
|
| 2034 |
"version": "4.24.4",
|
| 2035 |
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
|
|
|
|
| 2168 |
"url": "https://github.com/chalk/chalk?sponsor=1"
|
| 2169 |
}
|
| 2170 |
},
|
| 2171 |
+
"node_modules/chokidar": {
|
| 2172 |
+
"version": "4.0.3",
|
| 2173 |
+
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
|
| 2174 |
+
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
| 2175 |
+
"dev": true,
|
| 2176 |
+
"license": "MIT",
|
| 2177 |
+
"optional": true,
|
| 2178 |
+
"peer": true,
|
| 2179 |
+
"dependencies": {
|
| 2180 |
+
"readdirp": "^4.0.1"
|
| 2181 |
+
},
|
| 2182 |
+
"engines": {
|
| 2183 |
+
"node": ">= 14.16.0"
|
| 2184 |
+
},
|
| 2185 |
+
"funding": {
|
| 2186 |
+
"url": "https://paulmillr.com/funding/"
|
| 2187 |
+
}
|
| 2188 |
+
},
|
| 2189 |
"node_modules/classnames": {
|
| 2190 |
"version": "2.5.1",
|
| 2191 |
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
|
|
|
|
| 2393 |
"url": "https://github.com/sponsors/ljharb"
|
| 2394 |
}
|
| 2395 |
},
|
| 2396 |
+
"node_modules/detect-libc": {
|
| 2397 |
+
"version": "1.0.3",
|
| 2398 |
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
| 2399 |
+
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
|
| 2400 |
+
"dev": true,
|
| 2401 |
+
"license": "Apache-2.0",
|
| 2402 |
+
"optional": true,
|
| 2403 |
+
"peer": true,
|
| 2404 |
+
"bin": {
|
| 2405 |
+
"detect-libc": "bin/detect-libc.js"
|
| 2406 |
+
},
|
| 2407 |
+
"engines": {
|
| 2408 |
+
"node": ">=0.10"
|
| 2409 |
+
}
|
| 2410 |
+
},
|
| 2411 |
"node_modules/doctrine": {
|
| 2412 |
"version": "3.0.0",
|
| 2413 |
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
|
|
|
|
| 3081 |
"node": "^10.12.0 || >=12.0.0"
|
| 3082 |
}
|
| 3083 |
},
|
| 3084 |
+
"node_modules/fill-range": {
|
| 3085 |
+
"version": "7.1.1",
|
| 3086 |
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
| 3087 |
+
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
| 3088 |
+
"dev": true,
|
| 3089 |
+
"license": "MIT",
|
| 3090 |
+
"optional": true,
|
| 3091 |
+
"peer": true,
|
| 3092 |
+
"dependencies": {
|
| 3093 |
+
"to-regex-range": "^5.0.1"
|
| 3094 |
+
},
|
| 3095 |
+
"engines": {
|
| 3096 |
+
"node": ">=8"
|
| 3097 |
+
}
|
| 3098 |
+
},
|
| 3099 |
"node_modules/find-up": {
|
| 3100 |
"version": "5.0.0",
|
| 3101 |
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
|
|
|
| 3744 |
"url": "https://github.com/sponsors/ljharb"
|
| 3745 |
}
|
| 3746 |
},
|
| 3747 |
+
"node_modules/is-number": {
|
| 3748 |
+
"version": "7.0.0",
|
| 3749 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
| 3750 |
+
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
| 3751 |
+
"dev": true,
|
| 3752 |
+
"license": "MIT",
|
| 3753 |
+
"optional": true,
|
| 3754 |
+
"peer": true,
|
| 3755 |
+
"engines": {
|
| 3756 |
+
"node": ">=0.12.0"
|
| 3757 |
+
}
|
| 3758 |
+
},
|
| 3759 |
"node_modules/is-number-object": {
|
| 3760 |
"version": "1.1.1",
|
| 3761 |
"resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
|
|
|
|
| 4150 |
"node": ">= 0.4"
|
| 4151 |
}
|
| 4152 |
},
|
| 4153 |
+
"node_modules/micromatch": {
|
| 4154 |
+
"version": "4.0.8",
|
| 4155 |
+
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
| 4156 |
+
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
| 4157 |
+
"dev": true,
|
| 4158 |
+
"license": "MIT",
|
| 4159 |
+
"optional": true,
|
| 4160 |
+
"peer": true,
|
| 4161 |
+
"dependencies": {
|
| 4162 |
+
"braces": "^3.0.3",
|
| 4163 |
+
"picomatch": "^2.3.1"
|
| 4164 |
+
},
|
| 4165 |
+
"engines": {
|
| 4166 |
+
"node": ">=8.6"
|
| 4167 |
+
}
|
| 4168 |
+
},
|
| 4169 |
"node_modules/minimatch": {
|
| 4170 |
"version": "3.1.2",
|
| 4171 |
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
|
|
|
| 4212 |
"dev": true,
|
| 4213 |
"license": "MIT"
|
| 4214 |
},
|
| 4215 |
+
"node_modules/node-addon-api": {
|
| 4216 |
+
"version": "7.1.1",
|
| 4217 |
+
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
|
| 4218 |
+
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
|
| 4219 |
+
"dev": true,
|
| 4220 |
+
"license": "MIT",
|
| 4221 |
+
"optional": true,
|
| 4222 |
+
"peer": true
|
| 4223 |
+
},
|
| 4224 |
"node_modules/node-html-parser": {
|
| 4225 |
"version": "6.1.13",
|
| 4226 |
"resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz",
|
|
|
|
| 4625 |
"dev": true,
|
| 4626 |
"license": "MIT"
|
| 4627 |
},
|
| 4628 |
+
"node_modules/readdirp": {
|
| 4629 |
+
"version": "4.1.1",
|
| 4630 |
+
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.1.tgz",
|
| 4631 |
+
"integrity": "sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==",
|
| 4632 |
+
"dev": true,
|
| 4633 |
+
"license": "MIT",
|
| 4634 |
+
"optional": true,
|
| 4635 |
+
"peer": true,
|
| 4636 |
+
"engines": {
|
| 4637 |
+
"node": ">= 14.18.0"
|
| 4638 |
+
},
|
| 4639 |
+
"funding": {
|
| 4640 |
+
"type": "individual",
|
| 4641 |
+
"url": "https://paulmillr.com/funding/"
|
| 4642 |
+
}
|
| 4643 |
+
},
|
| 4644 |
"node_modules/reflect.getprototypeof": {
|
| 4645 |
"version": "1.0.10",
|
| 4646 |
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
|
|
|
|
| 4869 |
"url": "https://github.com/sponsors/ljharb"
|
| 4870 |
}
|
| 4871 |
},
|
| 4872 |
+
"node_modules/sass": {
|
| 4873 |
+
"version": "1.83.4",
|
| 4874 |
+
"resolved": "https://registry.npmjs.org/sass/-/sass-1.83.4.tgz",
|
| 4875 |
+
"integrity": "sha512-B1bozCeNQiOgDcLd33e2Cs2U60wZwjUUXzh900ZyQF5qUasvMdDZYbQ566LJu7cqR+sAHlAfO6RMkaID5s6qpA==",
|
| 4876 |
+
"dev": true,
|
| 4877 |
+
"license": "MIT",
|
| 4878 |
+
"optional": true,
|
| 4879 |
+
"peer": true,
|
| 4880 |
+
"dependencies": {
|
| 4881 |
+
"chokidar": "^4.0.0",
|
| 4882 |
+
"immutable": "^5.0.2",
|
| 4883 |
+
"source-map-js": ">=0.6.2 <2.0.0"
|
| 4884 |
+
},
|
| 4885 |
+
"bin": {
|
| 4886 |
+
"sass": "sass.js"
|
| 4887 |
+
},
|
| 4888 |
+
"engines": {
|
| 4889 |
+
"node": ">=14.0.0"
|
| 4890 |
+
},
|
| 4891 |
+
"optionalDependencies": {
|
| 4892 |
+
"@parcel/watcher": "^2.4.1"
|
| 4893 |
+
}
|
| 4894 |
+
},
|
| 4895 |
"node_modules/sass-embedded": {
|
| 4896 |
"version": "1.83.4",
|
| 4897 |
"resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.83.4.tgz",
|
|
|
|
| 5661 |
"dev": true,
|
| 5662 |
"license": "MIT"
|
| 5663 |
},
|
| 5664 |
+
"node_modules/to-regex-range": {
|
| 5665 |
+
"version": "5.0.1",
|
| 5666 |
+
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
| 5667 |
+
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
| 5668 |
+
"dev": true,
|
| 5669 |
+
"license": "MIT",
|
| 5670 |
+
"optional": true,
|
| 5671 |
+
"peer": true,
|
| 5672 |
+
"dependencies": {
|
| 5673 |
+
"is-number": "^7.0.0"
|
| 5674 |
+
},
|
| 5675 |
+
"engines": {
|
| 5676 |
+
"node": ">=8.0"
|
| 5677 |
+
}
|
| 5678 |
+
},
|
| 5679 |
"node_modules/tslib": {
|
| 5680 |
"version": "2.8.1",
|
| 5681 |
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
src/components/slider/index.tsx
CHANGED
|
@@ -1,60 +1,40 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
step: number,
|
| 41 |
-
onChange: (value: number) => void,
|
| 42 |
-
className?: string,
|
| 43 |
-
disabled?: boolean,
|
| 44 |
-
}) {
|
| 45 |
-
return (
|
| 46 |
-
<div className={style.rangeSlider} style={`--min:${props.min}; --max:${props.max}; --step:${props.step}; --value:${props.value}; --text-value:"${props.value}";`}>
|
| 47 |
-
<input
|
| 48 |
-
name={props.name}
|
| 49 |
-
type="range"
|
| 50 |
-
min={props.min}
|
| 51 |
-
max={props.max}
|
| 52 |
-
step={props.step}
|
| 53 |
-
value={props.value}
|
| 54 |
-
onInput={(e) => props.onChange(Number((e.target as HTMLInputElement).value))}
|
| 55 |
-
/>
|
| 56 |
-
<output></output>
|
| 57 |
-
<div className={style.progress}></div>
|
| 58 |
-
</div>
|
| 59 |
-
)
|
| 60 |
}
|
|
|
|
| 1 |
+
import cn from "classnames";
|
| 2 |
+
import style from "./style.module.scss";
|
| 3 |
+
|
| 4 |
+
export function Slider(props: {
|
| 5 |
+
value: number,
|
| 6 |
+
onChange: (value: number) => void,
|
| 7 |
+
name: string,
|
| 8 |
+
min: number,
|
| 9 |
+
max: number,
|
| 10 |
+
step: number,
|
| 11 |
+
className?: string,
|
| 12 |
+
disabled?: boolean,
|
| 13 |
+
}) {
|
| 14 |
+
return (
|
| 15 |
+
<div
|
| 16 |
+
className={cn(style.slider, props.className)}
|
| 17 |
+
style={{
|
| 18 |
+
"--value": props.value,
|
| 19 |
+
"--min": props.min,
|
| 20 |
+
"--max": props.max,
|
| 21 |
+
"--step": props.step,
|
| 22 |
+
}}
|
| 23 |
+
>
|
| 24 |
+
<input
|
| 25 |
+
type="range"
|
| 26 |
+
className={style.input}
|
| 27 |
+
name={props.name}
|
| 28 |
+
min={props.min}
|
| 29 |
+
max={props.max}
|
| 30 |
+
step={props.step}
|
| 31 |
+
value={props.value}
|
| 32 |
+
onInput={(e) => props.onChange(Number((e.target as HTMLInputElement).value))}
|
| 33 |
+
/>
|
| 34 |
+
<div className={style.progress}></div>
|
| 35 |
+
<div className={style.outputContainer}>
|
| 36 |
+
<output className={style.output}>{props.value}</output>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
}
|
src/components/slider/style.module.scss
CHANGED
|
@@ -1,330 +1,146 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
--
|
| 10 |
-
--
|
| 11 |
-
--
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
--progress-background: #eee;
|
| 15 |
-
--progress-radius: 20px;
|
| 16 |
-
--track-height: calc(var(--thumb-size) / 2);
|
| 17 |
-
|
| 18 |
-
--min-max-font: 12px Arial;
|
| 19 |
-
--min-max-opacity: 0.5;
|
| 20 |
-
--min-max-x-offset: 50%;
|
| 21 |
-
|
| 22 |
-
--thumb-size: 20px;
|
| 23 |
-
--thumb-color: white;
|
| 24 |
-
--thumb-shadow: 0 0 3px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.5) inset,
|
| 25 |
-
0 0 0 99px var(--thumb-color) inset;
|
| 26 |
-
|
| 27 |
-
--thumb-shadow-active: 0 0 0 calc(var(--thumb-size) / 4) inset var(--thumb-color),
|
| 28 |
-
0 0 0 99px var(--primary-color) inset, 0 0 3px rgba(0, 0, 0, 0.4);
|
| 29 |
-
|
| 30 |
-
--thumb-shadow-hover: var(--thumb-shadow);
|
| 31 |
-
|
| 32 |
-
--ticks-thickness: 1px;
|
| 33 |
-
--ticks-height: 5px;
|
| 34 |
-
--ticks-gap: var(
|
| 35 |
-
--ticks-height,
|
| 36 |
-
0
|
| 37 |
-
); // vertical space between the ticks and the progress bar
|
| 38 |
-
--ticks-color: silver;
|
| 39 |
-
|
| 40 |
-
// ⚠️ BELOW VARIABLES SHOULD NOT BE CHANGED
|
| 41 |
-
--step: 1;
|
| 42 |
-
--ticks-count: Calc(var(--max) - var(--min)) / var(--step);
|
| 43 |
-
--maxTicksAllowed: 30;
|
| 44 |
-
--too-many-ticks: Min(1, Max(var(--ticks-count) - var(--maxTicksAllowed), 0));
|
| 45 |
-
--x-step: Max(
|
| 46 |
-
var(--step),
|
| 47 |
-
var(--too-many-ticks) * (var(--max) - var(--min))
|
| 48 |
-
); // manipulate the number of steps if too many ticks exist, so there would only be 2
|
| 49 |
-
--tickInterval: 100/ ((var(--max) - var(--min)) / var(--step)) * var(--tickEvery, 1);
|
| 50 |
-
--tickIntervalPerc: calc(
|
| 51 |
-
(100% - var(--thumb-size)) / ((var(--max) - var(--min)) / var(--x-step)) *
|
| 52 |
-
var(--tickEvery, 1)
|
| 53 |
-
);
|
| 54 |
-
|
| 55 |
-
--value-a: Clamp(
|
| 56 |
-
var(--min),
|
| 57 |
-
var(--value, 0),
|
| 58 |
-
var(--max)
|
| 59 |
-
); // default value ("--value" is used in single-range markup)
|
| 60 |
-
--value-b: var(--value, 0); // default value
|
| 61 |
-
--text-value-a: var(--text-value, "");
|
| 62 |
-
|
| 63 |
-
--completed-a: calc(
|
| 64 |
-
(var(--value-a) - var(--min)) / (var(--max) - var(--min)) * 100
|
| 65 |
-
);
|
| 66 |
-
--completed-b: calc(
|
| 67 |
-
(var(--value-b) - var(--min)) / (var(--max) - var(--min)) * 100
|
| 68 |
-
);
|
| 69 |
-
--ca: Min(var(--completed-a), var(--completed-b));
|
| 70 |
-
--cb: Max(var(--completed-a), var(--completed-b));
|
| 71 |
-
|
| 72 |
-
// breakdown of the below super-complex brain-breaking CSS math:
|
| 73 |
-
// "clamp" is used to ensure either "-1" or "1"
|
| 74 |
-
// "calc" is used to inflat the outcome into a huge number, to get rid of any value between -1 & 1
|
| 75 |
-
// if absolute diff of both completed % is above "5" (%)
|
| 76 |
-
// ".001" bumps the value just a bit, to avoid a scenario where calc resulted in "0" (then clamp will also be "0")
|
| 77 |
-
--thumbs-too-close: Clamp(
|
| 78 |
-
-1,
|
| 79 |
-
1000 * (Min(1, Max(var(--cb) - var(--ca) - 5, -1)) + 0.001),
|
| 80 |
-
1
|
| 81 |
-
);
|
| 82 |
-
|
| 83 |
-
@mixin thumb {
|
| 84 |
-
appearance: none;
|
| 85 |
-
height: var(--thumb-size);
|
| 86 |
-
width: var(--thumb-size);
|
| 87 |
-
//transform: var(--thumb-transform);
|
| 88 |
-
transform: translateY(-4px);
|
| 89 |
-
border-radius: var(--thumb-radius, 50%);
|
| 90 |
-
background: var(--thumb-color);
|
| 91 |
-
box-shadow: var(--thumb-shadow);
|
| 92 |
-
border: none;
|
| 93 |
-
pointer-events: auto;
|
| 94 |
-
transition: 0.1s;
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
display: inline-block;
|
| 98 |
-
height: Max(var(--track-height), var(--thumb-size));
|
| 99 |
-
// margin: calc((var(--thumb-size) - var(--track-height)) * -.25) var(--thumb-size) 0;
|
| 100 |
-
background: linear-gradient(
|
| 101 |
-
to right,
|
| 102 |
-
var(--ticks-color) var(--ticks-thickness),
|
| 103 |
-
transparent 1px
|
| 104 |
-
) repeat-x;
|
| 105 |
-
background-size: var(--tickIntervalPerc) var(--ticks-height);
|
| 106 |
-
background-position-x: calc(
|
| 107 |
-
var(--thumb-size) / 2 - var(--ticks-thickness) / 2
|
| 108 |
-
);
|
| 109 |
-
background-position-y: var(--flip-y, bottom);
|
| 110 |
-
|
| 111 |
-
padding-bottom: var(--flip-y, var(--ticks-gap));
|
| 112 |
-
padding-top: calc(var(--flip-y) * var(--ticks-gap));
|
| 113 |
-
margin-top: 1rem;
|
| 114 |
-
margin-bottom: 2rem;
|
| 115 |
-
|
| 116 |
position: relative;
|
| 117 |
-
z-index: 1;
|
| 118 |
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
// mix/max texts
|
| 124 |
&::before,
|
| 125 |
&::after {
|
| 126 |
-
--offset: calc(var(--thumb-size) / 2);
|
| 127 |
content: counter(x);
|
| 128 |
-
display: var(--show-min-max, block);
|
| 129 |
-
font: var(--min-max-font);
|
| 130 |
position: absolute;
|
| 131 |
-
bottom:
|
| 132 |
-
top: calc(
|
| 133 |
-
opacity:
|
| 134 |
-
|
| 135 |
-
transform: translateX(calc(var(--min-max-x-offset) * var(--before, -1) * -1));
|
| 136 |
pointer-events: none;
|
| 137 |
}
|
| 138 |
|
| 139 |
&::before {
|
| 140 |
--before: 1;
|
| 141 |
counter-reset: x var(--min);
|
| 142 |
-
left:
|
| 143 |
}
|
| 144 |
|
| 145 |
&::after {
|
| 146 |
counter-reset: x var(--max);
|
| 147 |
-
right:
|
| 148 |
}
|
|
|
|
| 149 |
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
z-index: 5;
|
| 159 |
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
|
|
|
| 169 |
|
| 170 |
-
.progress {
|
| 171 |
-
--start-end: calc(var(--thumb-size) / 2);
|
| 172 |
-
--clip-end: calc(100% - (var(--cb)) * 1%);
|
| 173 |
-
--clip-start: calc(var(--ca) * 1%);
|
| 174 |
-
--clip: inset(-20px var(--clip-end) -20px var(--clip-start));
|
| 175 |
-
position: absolute;
|
| 176 |
-
left: calc(var(--start-end) - 10px);
|
| 177 |
-
right: calc(var(--start-end) - 10px);
|
| 178 |
-
top: calc(
|
| 179 |
-
var(--ticks-gap) * var(--flip-y, 0) + var(--thumb-size) / 2 -
|
| 180 |
-
var(--track-height)
|
| 181 |
-
);
|
| 182 |
-
// transform: var(--flip-y, translateY(-50%) translateZ(0));
|
| 183 |
-
height: calc(var(--track-height));
|
| 184 |
-
background: var(--progress-background, #eee);
|
| 185 |
-
pointer-events: none;
|
| 186 |
-
z-index: -1;
|
| 187 |
-
border-radius: var(--progress-radius);
|
| 188 |
|
| 189 |
-
// fill area
|
| 190 |
-
&::before {
|
| 191 |
-
content: "";
|
| 192 |
-
position: absolute;
|
| 193 |
-
// left: Clamp(0%, calc(var(--ca) * 1%), 100%); // confine to 0 or above
|
| 194 |
-
// width: Min(100%, calc((var(--cb) - var(--ca)) * 1%)); // confine to maximum 100%
|
| 195 |
-
left: 0;
|
| 196 |
-
right: 0;
|
| 197 |
-
clip-path: var(--clip);
|
| 198 |
-
top: 0;
|
| 199 |
-
bottom: 0;
|
| 200 |
-
background: var(--fill-color, black);
|
| 201 |
-
box-shadow: var(--progress-flll-shadow);
|
| 202 |
-
z-index: 1;
|
| 203 |
-
border-radius: inherit;
|
| 204 |
-
}
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
}
|
|
|
|
| 219 |
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
height: var(--thumb-size);
|
| 224 |
-
margin: 0;
|
| 225 |
position: absolute;
|
| 226 |
left: 0;
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
&:not(:only-of-type) {
|
| 237 |
-
pointer-events: none;
|
| 238 |
-
}
|
| 239 |
-
|
| 240 |
-
&::-webkit-slider-thumb {
|
| 241 |
-
@include thumb;
|
| 242 |
-
}
|
| 243 |
-
|
| 244 |
-
&::-moz-range-thumb {
|
| 245 |
-
@include thumb;
|
| 246 |
-
}
|
| 247 |
-
|
| 248 |
-
&::-ms-thumb {
|
| 249 |
-
@include thumb;
|
| 250 |
-
}
|
| 251 |
-
|
| 252 |
-
&:hover {
|
| 253 |
-
--thumb-shadow: var(--thumb-shadow-hover);
|
| 254 |
-
|
| 255 |
-
//& + output {
|
| 256 |
-
// --value-background: var(--value-background-hover);
|
| 257 |
-
// --y-offset: -8px;
|
| 258 |
-
// color: var(--value-active-color);
|
| 259 |
-
// box-shadow: 0 0 0 3px var(--value-background);
|
| 260 |
-
//}
|
| 261 |
-
}
|
| 262 |
-
|
| 263 |
-
&:active {
|
| 264 |
-
--thumb-shadow: var(--thumb-shadow-active);
|
| 265 |
-
cursor: grabbing;
|
| 266 |
-
z-index: 2; // when sliding left thumb over the right or vice-versa, make sure the moved thumb is on top
|
| 267 |
-
+ output {
|
| 268 |
-
transition: 0s;
|
| 269 |
-
}
|
| 270 |
-
}
|
| 271 |
-
|
| 272 |
-
&:nth-of-type(1) {
|
| 273 |
-
--is-left-most: Clamp(0, (var(--value-a) - var(--value-b)) * 99999, 1);
|
| 274 |
-
|
| 275 |
-
& + output {
|
| 276 |
-
&:not(:only-of-type) {
|
| 277 |
-
--flip: calc(var(--thumbs-too-close) * -1);
|
| 278 |
-
}
|
| 279 |
-
|
| 280 |
-
--value: var(--value-a);
|
| 281 |
-
--x-offset: calc(var(--completed-a) * -1%);
|
| 282 |
-
|
| 283 |
-
&::after {
|
| 284 |
-
content: var(--prefix, "") var(--text-value-a) var(--suffix, "");
|
| 285 |
-
}
|
| 286 |
-
}
|
| 287 |
-
}
|
| 288 |
-
|
| 289 |
-
&:nth-of-type(2) {
|
| 290 |
-
--is-left-most: Clamp(0, (var(--value-b) - var(--value-a)) * 99999, 1);
|
| 291 |
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
}
|
| 295 |
-
}
|
| 296 |
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
|
|
|
|
|
|
|
|
|
| 303 |
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
background: var(--value-background);
|
| 315 |
-
border-radius: 10px;
|
| 316 |
-
//padding: 2px 4px;
|
| 317 |
-
padding: 0 4px;
|
| 318 |
-
left: var(--pos);
|
| 319 |
-
transform: translate(var(--x-offset), calc(150% * var(--flip) - (var(--y-offset, 0px) + var(--value-offset-y)) * var(--flip)));
|
| 320 |
-
transition: all 0.12s ease-out, left 0s;
|
| 321 |
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
font: var(--value-font);
|
| 325 |
-
}
|
| 326 |
-
}
|
| 327 |
}
|
| 328 |
-
}
|
| 329 |
|
|
|
|
|
|
|
|
|
|
| 330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
$ticks-height: 5px;
|
| 2 |
+
$ticks-thickness: 1px;
|
| 3 |
+
$max-ticks-allowed: 30;
|
| 4 |
+
$thumb-size: 20px;
|
| 5 |
+
$track-height: #{calc($thumb-size / 2)};
|
| 6 |
+
|
| 7 |
+
.slider {
|
| 8 |
+
// Define css variables
|
| 9 |
+
--ticks-count: calc(var(--max) - var(--min)) / var(--step);
|
| 10 |
+
--too-many-ticks: min(1, Max(var(--ticks-count) - #{$max-ticks-allowed}, 0));
|
| 11 |
+
--x-step: max(var(--step), var(--too-many-ticks) * (var(--max) - var(--min)));
|
| 12 |
+
|
| 13 |
+
// Define properties
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
position: relative;
|
|
|
|
| 15 |
|
| 16 |
+
// Draw the steps
|
| 17 |
+
background: linear-gradient(to right, var(--text-muted-color) $ticks-thickness, transparent 1px) repeat-x;
|
| 18 |
+
background-size: calc((100% - #{$thumb-size}) / ((var(--max) - var(--min)) / var(--x-step))) #{$ticks-height};
|
| 19 |
+
background-position-x: #{calc($track-height - $ticks-thickness / 2)};
|
| 20 |
+
background-position-y: bottom;
|
| 21 |
+
|
| 22 |
+
font-weight: 700;
|
| 23 |
+
color: var(--text-muted-color);
|
| 24 |
+
font-size: 0.8125rem;
|
| 25 |
+
height: 22px;
|
| 26 |
+
margin-top: 2.5ch;
|
| 27 |
+
margin-bottom: 2.5ch;
|
| 28 |
|
| 29 |
// mix/max texts
|
| 30 |
&::before,
|
| 31 |
&::after {
|
|
|
|
| 32 |
content: counter(x);
|
|
|
|
|
|
|
| 33 |
position: absolute;
|
| 34 |
+
bottom: calc(-2.5ch - 2px);
|
| 35 |
+
top: calc(2.5ch + 2px);
|
| 36 |
+
opacity: .5;
|
| 37 |
+
transform: translateX(calc(50% * var(--before, -1) * -1));
|
|
|
|
| 38 |
pointer-events: none;
|
| 39 |
}
|
| 40 |
|
| 41 |
&::before {
|
| 42 |
--before: 1;
|
| 43 |
counter-reset: x var(--min);
|
| 44 |
+
left: #{$track-height};
|
| 45 |
}
|
| 46 |
|
| 47 |
&::after {
|
| 48 |
counter-reset: x var(--max);
|
| 49 |
+
right: #{$track-height};
|
| 50 |
}
|
| 51 |
+
}
|
| 52 |
|
| 53 |
+
.outputContainer {
|
| 54 |
+
position: absolute;
|
| 55 |
+
top: 0;
|
| 56 |
+
left: #{$track-height};
|
| 57 |
+
right: #{$track-height};
|
| 58 |
+
height: #{$track-height};
|
| 59 |
+
pointer-events: none;
|
| 60 |
+
}
|
|
|
|
| 61 |
|
| 62 |
+
.output {
|
| 63 |
+
pointer-events: none;
|
| 64 |
+
position: absolute;
|
| 65 |
+
z-index: 5;
|
| 66 |
+
width: #{$thumb-size};
|
| 67 |
+
height: #{$thumb-size};
|
| 68 |
+
left: calc((((var(--value) - var(--min)) / (var(--max) - var(--min))) * 100%) - #{calc($thumb-size / 2)});
|
| 69 |
+
bottom: #{calc($thumb-size / 2 + 6px)};
|
| 70 |
+
text-align: center;
|
| 71 |
+
}
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
.progress {
|
| 76 |
+
--completed-a: calc((clamp(var(--min), var(--value, 0), var(--max)) - var(--min)) / (var(--max) - var(--min)) * 100);
|
| 77 |
+
--completed-b: calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100);
|
| 78 |
+
--cb: max(var(--completed-a), var(--completed-b));
|
| 79 |
+
--start-end: #{$track-height};
|
| 80 |
+
--clip-end: calc(100% - (var(--cb)) * 1%);
|
| 81 |
+
--clip: inset(-20px var(--clip-end) -20px 0);
|
| 82 |
+
|
| 83 |
+
position: absolute;
|
| 84 |
+
width: 100%;
|
| 85 |
+
height: #{$track-height};
|
| 86 |
+
background: var(--text-color);
|
| 87 |
+
border-radius: #{$track-height};
|
| 88 |
+
z-index: -1;
|
| 89 |
|
| 90 |
+
// fill area
|
| 91 |
+
&::before {
|
| 92 |
+
content: "";
|
|
|
|
|
|
|
| 93 |
position: absolute;
|
| 94 |
left: 0;
|
| 95 |
+
right: 0;
|
| 96 |
+
clip-path: var(--clip);
|
| 97 |
+
top: 0;
|
| 98 |
+
bottom: 0;
|
| 99 |
+
background: var(--text-secondary);
|
| 100 |
+
z-index: 1;
|
| 101 |
+
border-radius: inherit;
|
| 102 |
+
}
|
| 103 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
+
.input {
|
| 106 |
+
--thumb-shadow: 0 0 3px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 0 0 99px var(--text-color) inset;
|
|
|
|
|
|
|
| 107 |
|
| 108 |
+
-webkit-appearance: none;
|
| 109 |
+
width: 100%;
|
| 110 |
+
height: #{$thumb-size};
|
| 111 |
+
margin: 0;
|
| 112 |
+
position: absolute;
|
| 113 |
+
left: 0;
|
| 114 |
+
cursor: grab;
|
| 115 |
+
outline: none;
|
| 116 |
+
background: none;
|
| 117 |
|
| 118 |
+
@mixin thumb {
|
| 119 |
+
appearance: none;
|
| 120 |
+
height: #{$thumb-size};
|
| 121 |
+
width: #{$thumb-size};
|
| 122 |
+
transform: translateY(-5px);
|
| 123 |
+
border-radius: 50%;
|
| 124 |
+
background: var(--text-color);
|
| 125 |
+
box-shadow: var(--thumb-shadow);
|
| 126 |
+
border: none;
|
| 127 |
+
pointer-events: auto;
|
| 128 |
+
}
|
| 129 |
|
| 130 |
+
&::-webkit-slider-thumb {
|
| 131 |
+
@include thumb;
|
| 132 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
+
&::-moz-range-thumb {
|
| 135 |
+
@include thumb;
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
|
|
|
| 137 |
|
| 138 |
+
&::-ms-thumb {
|
| 139 |
+
@include thumb;
|
| 140 |
+
}
|
| 141 |
|
| 142 |
+
&:active {
|
| 143 |
+
--thumb-shadow: 0 0 0 #{calc($thumb-size / 4)} inset var(--text-color), 0 0 0 99px var(--text-secondary) inset, 0 0 3px rgba(0, 0, 0, 0.4);
|
| 144 |
+
cursor: grabbing;
|
| 145 |
+
}
|
| 146 |
+
}
|
src/components/topics/index.tsx
CHANGED
|
@@ -53,8 +53,6 @@ export function Topics(props: {
|
|
| 53 |
<Slider
|
| 54 |
name="postCount"
|
| 55 |
value={props.settings.postCount}
|
| 56 |
-
// onChange={(v) => props.setSettings({...props.settings, temperature: v as number})}
|
| 57 |
-
// onChange={setGenerationPostCount}
|
| 58 |
onChange={(v) => props.setSettings({...props.settings, postCount: v})}
|
| 59 |
min={1}
|
| 60 |
max={10}
|
|
|
|
| 53 |
<Slider
|
| 54 |
name="postCount"
|
| 55 |
value={props.settings.postCount}
|
|
|
|
|
|
|
| 56 |
onChange={(v) => props.setSettings({...props.settings, postCount: v})}
|
| 57 |
min={1}
|
| 58 |
max={10}
|