@rvx/ui 0.1.11 → 0.1.13
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/dist/common/coupling.d.ts +2 -0
- package/dist/common/coupling.js +18 -0
- package/dist/common/coupling.js.map +1 -0
- package/dist/common/debounce.js +2 -2
- package/dist/common/debounce.js.map +1 -1
- package/dist/common/parsers.d.ts +1 -1
- package/dist/common/parsers.js +3 -3
- package/dist/common/parsers.js.map +1 -1
- package/dist/common/theme.d.ts +4 -0
- package/dist/common/trim.js +2 -2
- package/dist/common/trim.js.map +1 -1
- package/dist/components/collapse.js +3 -3
- package/dist/components/collapse.js.map +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown.js +2 -2
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/layer.js +4 -4
- package/dist/components/layer.js.map +1 -1
- package/dist/components/nav-list.d.ts +26 -0
- package/dist/components/nav-list.js +36 -0
- package/dist/components/nav-list.js.map +1 -0
- package/dist/components/popout.js +3 -3
- package/dist/components/popout.js.map +1 -1
- package/dist/components/popover.js +2 -2
- package/dist/components/popover.js.map +1 -1
- package/dist/components/scroll-view.js +5 -5
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/slider.d.ts +11 -0
- package/dist/components/slider.js +25 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/validation.js +4 -4
- package/dist/components/validation.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/theme.module.css +69 -0
- package/dist/theme.module.css.map +1 -1
- package/package.json +2 -2
- package/src/common/coupling.tsx +18 -0
- package/src/common/debounce.tsx +2 -2
- package/src/common/parsers.tsx +4 -4
- package/src/common/theme.tsx +6 -0
- package/src/common/trim.tsx +2 -2
- package/src/components/collapse.tsx +3 -3
- package/src/components/dialog.tsx +2 -2
- package/src/components/dropdown.tsx +2 -2
- package/src/components/layer.tsx +4 -4
- package/src/components/nav-list.tsx +80 -0
- package/src/components/popout.tsx +3 -3
- package/src/components/popover.tsx +2 -2
- package/src/components/scroll-view.tsx +5 -5
- package/src/components/slider.tsx +56 -0
- package/src/components/validation.tsx +4 -4
- package/src/index.tsx +3 -0
- package/src/theme/components/nav-list.scss +82 -0
- package/src/theme/components/slider.scss +14 -0
- package/src/theme/theme.scss +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/components/validation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,OAAO,EAAc,GAAG,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/components/validation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAc,OAAO,EAAc,GAAG,EAAE,GAAG,EAAsB,QAAQ,EAAE,OAAO,EAAe,OAAO,EAAE,MAAM,KAAK,CAAC;AAChI,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAS,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,GAAG,IAAI,OAAO,EAAqB,CAAC;AAKpD,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,OAAO,EAAiC,CAAC;AAevE,MAAM,OAAO,SAAS;IACrB,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;IACrB,cAAc,CAA0B;IACxC,MAAM,GAAG,CAAC,CAAwB,EAAE,CAAC,CAAC;IACtC,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAEpB;QACC,MAAM,OAAO,GAAG,UAAU,CAAC,OA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AAE,YACrF,IAAI,CAAC,OAAO,GACM,GACf,CAAC;AACR,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./common/coupling.js";
|
|
1
2
|
export * from "./common/debounce.js";
|
|
2
3
|
export * from "./common/events.js";
|
|
3
4
|
export * from "./common/parsers.js";
|
|
@@ -19,12 +20,14 @@ export * from "./components/heading.js";
|
|
|
19
20
|
export * from "./components/label.js";
|
|
20
21
|
export * from "./components/layer.js";
|
|
21
22
|
export * from "./components/link.js";
|
|
23
|
+
export * from "./components/nav-list.js";
|
|
22
24
|
export * from "./components/page.js";
|
|
23
25
|
export * from "./components/popout.js";
|
|
24
26
|
export * from "./components/popover.js";
|
|
25
27
|
export * from "./components/radio-buttons.js";
|
|
26
28
|
export * from "./components/row.js";
|
|
27
29
|
export * from "./components/scroll-view.js";
|
|
30
|
+
export * from "./components/slider.js";
|
|
28
31
|
export * from "./components/text-input.js";
|
|
29
32
|
export * from "./components/text.js";
|
|
30
33
|
export * from "./components/validation.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./common/coupling.js";
|
|
1
2
|
export * from "./common/debounce.js";
|
|
2
3
|
export * from "./common/events.js";
|
|
3
4
|
export * from "./common/parsers.js";
|
|
@@ -19,12 +20,14 @@ export * from "./components/heading.js";
|
|
|
19
20
|
export * from "./components/label.js";
|
|
20
21
|
export * from "./components/layer.js";
|
|
21
22
|
export * from "./components/link.js";
|
|
23
|
+
export * from "./components/nav-list.js";
|
|
22
24
|
export * from "./components/page.js";
|
|
23
25
|
export * from "./components/popout.js";
|
|
24
26
|
export * from "./components/popover.js";
|
|
25
27
|
export * from "./components/radio-buttons.js";
|
|
26
28
|
export * from "./components/row.js";
|
|
27
29
|
export * from "./components/scroll-view.js";
|
|
30
|
+
export * from "./components/slider.js";
|
|
28
31
|
export * from "./components/text-input.js";
|
|
29
32
|
export * from "./components/text.js";
|
|
30
33
|
export * from "./components/validation.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC"}
|
package/dist/theme.module.css
CHANGED
|
@@ -575,6 +575,63 @@ h6.heading {
|
|
|
575
575
|
text-decoration: underline;
|
|
576
576
|
}
|
|
577
577
|
|
|
578
|
+
@media (prefers-color-scheme: dark) {
|
|
579
|
+
:root {
|
|
580
|
+
--nav-list-item-bg: transparent;
|
|
581
|
+
--nav-list-item-bg-hover: rgba(255, 255, 255, 0.1);
|
|
582
|
+
--nav-list-item-bg-active: rgba(255, 255, 255, 0.08);
|
|
583
|
+
--nav-list-item-bg-current: rgba(255, 255, 255, 0.1);
|
|
584
|
+
--nav-list-item-fg: rgb(172, 172, 172);
|
|
585
|
+
--nav-list-item-fg-hover: var(--fg);
|
|
586
|
+
--nav-list-item-fg-active: var(--fg);
|
|
587
|
+
--nav-list-item-fg-current: var(--fg);
|
|
588
|
+
--nav-list-item-border: transparent;
|
|
589
|
+
color-scheme: dark;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
.nav_list {
|
|
593
|
+
display: flex;
|
|
594
|
+
flex-direction: column;
|
|
595
|
+
position: relative;
|
|
596
|
+
z-index: 0;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.nav_list_item {
|
|
600
|
+
font-family: inherit;
|
|
601
|
+
font-size: inherit;
|
|
602
|
+
font-weight: 600;
|
|
603
|
+
line-height: 1;
|
|
604
|
+
text-align: left;
|
|
605
|
+
background-color: var(--nav-list-item-bg);
|
|
606
|
+
color: var(--nav-list-item-fg);
|
|
607
|
+
border: var(--nav-list-item-border) solid var(--control-border);
|
|
608
|
+
cursor: pointer;
|
|
609
|
+
outline: none;
|
|
610
|
+
padding-block: calc(var(--control-pad-block-start) - var(--control-border)) calc(var(--control-pad-block-end) - var(--control-border));
|
|
611
|
+
padding-inline: calc(var(--control-pad-inline-start) - var(--control-border)) calc(var(--control-pad-inline-end) - var(--control-border));
|
|
612
|
+
border-radius: var(--control-radius);
|
|
613
|
+
transition: var(--color-transition) background-color, var(--color-transition) border-color;
|
|
614
|
+
}
|
|
615
|
+
.nav_list_item[disabled] {
|
|
616
|
+
cursor: default;
|
|
617
|
+
filter: var(--control-disabled);
|
|
618
|
+
}
|
|
619
|
+
.nav_list_item:hover:not(:active):not([disabled]), .nav_list_item:focus-visible {
|
|
620
|
+
color: var(--nav-list-item-fg-hover);
|
|
621
|
+
background-color: var(--nav-list-item-bg-hover);
|
|
622
|
+
}
|
|
623
|
+
.nav_list_item:active {
|
|
624
|
+
color: var(--nav-list-item-fg-active);
|
|
625
|
+
background-color: var(--nav-list-item-bg-active);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.nav_list_item_current {
|
|
629
|
+
color: var(--nav-list-item-fg-current);
|
|
630
|
+
background-color: var(--nav-list-item-bg-current);
|
|
631
|
+
box-shadow: var(--control-shadow);
|
|
632
|
+
z-index: 1;
|
|
633
|
+
}
|
|
634
|
+
|
|
578
635
|
.page {
|
|
579
636
|
margin: 2rem;
|
|
580
637
|
display: flex;
|
|
@@ -749,6 +806,18 @@ h6.heading {
|
|
|
749
806
|
opacity: 1;
|
|
750
807
|
}
|
|
751
808
|
|
|
809
|
+
.slider_host {
|
|
810
|
+
display: flex;
|
|
811
|
+
flex-direction: column;
|
|
812
|
+
row-gap: var(--control-row-gap);
|
|
813
|
+
}
|
|
814
|
+
.slider_host > input {
|
|
815
|
+
outline: none;
|
|
816
|
+
}
|
|
817
|
+
.slider_host > input:focus-visible {
|
|
818
|
+
outline: var(--focus-outline);
|
|
819
|
+
}
|
|
820
|
+
|
|
752
821
|
@media (prefers-color-scheme: dark) {
|
|
753
822
|
:root {
|
|
754
823
|
--text-input-bg: rgb(16, 16, 16);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/theme/base.scss","../src/theme/common.scss","../src/theme/components/button.scss","../src/theme/components/card.scss","../src/theme/components/checkbox.scss","../src/theme/components/collapse.scss","../src/theme/components/column.scss","../src/theme/components/control-group.scss","../src/theme/components/dialog.scss","../src/theme/components/dropdown.scss","../src/theme/components/flex-space.scss","../src/theme/components/heading.scss","../src/theme/components/label.scss","../src/theme/components/link.scss","../src/theme/components/page.scss","../src/theme/components/popover.scss","../src/theme/components/radio-buttons.scss","../src/theme/components/row.scss","../src/theme/components/scroll-view.scss","../src/theme/components/text-input.scss","../src/theme/components/text.scss","../src/theme/components/validation.scss","../src/theme/components/value.scss"],"names":[],"mappings":"AASA;EACC;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EACA;ECOA;EACA;EACA;EACA;EDPA;EACA;EACA;EACA;EACA;EACA;ECDA;EACA;EACA;EACA;EDCA;EAEA;EAEA;EACA;EAEA;EACA;EAEA;;;AC7BC;EAFD;IANE;IAAA;IAAA;IAUA;;;AD0CH;EACC;EACA;EAEA;;AACA;EALD;IAME;;;;AAIF;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AC9DC;EAFD;IANE;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAUA;;;ACgFH;EACC;EACA;EACA;EACA;EAEA;EAEA;EDnEC,eACC;EAED,gBACC;ECkEF;EACA;;AAGA;EACC;;AAGD;EACC;EACA;;;AAKD;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAKH;EACC;;;ADhIC;EAFD;IANE;IAAA;IAAA;IAAA;IAAA;IAUA;;;AEKH;EACC;EACA;EFcC,eACC;EAED,gBACC;;;AEbF;EACC;;;AADD;EACC;;;AADD;EACC;;;AADD;EACC;;;AADD;EACC;;;AC3BF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;EACA;;;AAIF;EACC;EACA;EACA;;;ACtBD;EACC;EACA;EACA;;;AAGD;EACC,YACC;;;AAIF;EACC;IAAO;;EACP;IAAM;;EACN;IAAM;;EACN;IAAK;;;AAGN;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;AAEA;EACC,YACC;;AAIF;EACC;EACA;;;AAIF;EACC;EACA;EACA;EACA;;AAEA;EACC,YACC;;AAKF;EACC;EACA;EACA;;;AC5DF;EACC;EACA;;AAEA;EACC;;AAMD;EACC;;AAGD;EACC;;AAMD;EACC;;;AAKD;EACC;;AACA;EACC;;;AAHF;EACC;;AACA;EACC;;;AC/BH;EACC;EACA;EAEA;;AACA;EACC;;AAGD;EACC;EACA;;AAED;EACC;EACA;;;ANHA;EAFD;IANE;IAAA;IAAA;IAAA;IAUA;;;AOEH;EACC;EACA;EAEA;EAEA;EACA;EACA;EAEA;EAEA;EACA;;;AAGD;EACC;;AACA;EACC;;;AAIF;EACC;EACA;;AACA;EACC;;;AAIF;EACC;IACC;;;AAIF;EACC;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EP5BC,eACC;EAED,gBACC;;;AO4BH;EACC;;;APxDC;EAFD;IANE;IAAA;IAAA;IAAA;IAUA;;;AQEH;EACC;EACA;;AAEA;EACC;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;ERPC,eACC;EAED,gBACC;;AQMF;EACC;;;AC9CF;EACC;EACA;EACA;;;ACHD;EACC;EACA;;AAEA;EAEC;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;AAAA;AAAA;EAGC;EACA;EACA;;;AVxBC;EAFD;IANE;IAUA;;;AWPH;EACC;EACA;EAEA;EACA;EACA;;AAEA;EAEC;EACA;EACA;EACA;;;AXRA;EAFD;IANE;IAUA;;;AYPH;EACC;EACA;EAEA;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/theme/base.scss","../src/theme/common.scss","../src/theme/components/button.scss","../src/theme/components/card.scss","../src/theme/components/checkbox.scss","../src/theme/components/collapse.scss","../src/theme/components/column.scss","../src/theme/components/control-group.scss","../src/theme/components/dialog.scss","../src/theme/components/dropdown.scss","../src/theme/components/flex-space.scss","../src/theme/components/heading.scss","../src/theme/components/label.scss","../src/theme/components/link.scss","../src/theme/components/nav-list.scss","../src/theme/components/page.scss","../src/theme/components/popover.scss","../src/theme/components/radio-buttons.scss","../src/theme/components/row.scss","../src/theme/components/scroll-view.scss","../src/theme/components/slider.scss","../src/theme/components/text-input.scss","../src/theme/components/text.scss","../src/theme/components/validation.scss","../src/theme/components/value.scss"],"names":[],"mappings":"AASA;EACC;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EACA;ECOA;EACA;EACA;EACA;EDPA;EACA;EACA;EACA;EACA;EACA;ECDA;EACA;EACA;EACA;EDCA;EAEA;EAEA;EACA;EAEA;EACA;EAEA;;;AC7BC;EAFD;IANE;IAAA;IAAA;IAUA;;;AD0CH;EACC;EACA;EAEA;;AACA;EALD;IAME;;;;AAIF;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AC9DC;EAFD;IANE;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAUA;;;ACgFH;EACC;EACA;EACA;EACA;EAEA;EAEA;EDnEC,eACC;EAED,gBACC;ECkEF;EACA;;AAGA;EACC;;AAGD;EACC;EACA;;;AAKD;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAdF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAKH;EACC;;;ADhIC;EAFD;IANE;IAAA;IAAA;IAAA;IAAA;IAUA;;;AEKH;EACC;EACA;EFcC,eACC;EAED,gBACC;;;AEbF;EACC;;;AADD;EACC;;;AADD;EACC;;;AADD;EACC;;;AADD;EACC;;;AC3BF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;EACA;;;AAIF;EACC;EACA;EACA;;;ACtBD;EACC;EACA;EACA;;;AAGD;EACC,YACC;;;AAIF;EACC;IAAO;;EACP;IAAM;;EACN;IAAM;;EACN;IAAK;;;AAGN;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;AAEA;EACC,YACC;;AAIF;EACC;EACA;;;AAIF;EACC;EACA;EACA;EACA;;AAEA;EACC,YACC;;AAKF;EACC;EACA;EACA;;;AC5DF;EACC;EACA;;AAEA;EACC;;AAMD;EACC;;AAGD;EACC;;AAMD;EACC;;;AAKD;EACC;;AACA;EACC;;;AAHF;EACC;;AACA;EACC;;;AC/BH;EACC;EACA;EAEA;;AACA;EACC;;AAGD;EACC;EACA;;AAED;EACC;EACA;;;ANHA;EAFD;IANE;IAAA;IAAA;IAAA;IAUA;;;AOEH;EACC;EACA;EAEA;EAEA;EACA;EACA;EAEA;EAEA;EACA;;;AAGD;EACC;;AACA;EACC;;;AAIF;EACC;EACA;;AACA;EACC;;;AAIF;EACC;IACC;;;AAIF;EACC;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EP5BC,eACC;EAED,gBACC;;;AO4BH;EACC;;;APxDC;EAFD;IANE;IAAA;IAAA;IAAA;IAUA;;;AQEH;EACC;EACA;;AAEA;EACC;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;ERPC,eACC;EAED,gBACC;;AQMF;EACC;;;AC9CF;EACC;EACA;EACA;;;ACHD;EACC;EACA;;AAEA;EAEC;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;AAAA;AAAA;EAGC;EACA;EACA;;;AVxBC;EAFD;IANE;IAUA;;;AWPH;EACC;EACA;EAEA;EACA;EACA;;AAEA;EAEC;EACA;EACA;EACA;;;AXRA;EAFD;IANE;IAUA;;;AYPH;EACC;EACA;EAEA;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;;AZTA;EAFD;IANE;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAUA;;;AaiBH;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EAEA;EAEA;EbhBC,eACC;EAED,gBACC;EaeF;EACA;;AAGA;EACC;EACA;;AAGD;EAEC;EACA;;AAGD;EACC;EACA;;;AAIF;EACC;EACA;EACA;EACA;;;AC/ED;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;;;AdPC;EAFD;IANE;IAAA;IAAA;IAUA;;;AeDH;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EAEA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EfnBC,eACC;EAED,gBACC;;;AgBvCH;EACC;EACA;EACA;;AAEA;EACC;EACA;;;AAIF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;;AAIF;EACC;EACA;EACA;;;AC5BD;EACC;EACA;EACA;;;AAIA;EACC;EACA;;AACA;EACC;EACA;;;AALF;EACC;EACA;;AACA;EACC;EACA;;;AjBAD;EAFD;IANE;IAAA;IAUA;;;AkBJH;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AChDD;EACC;EACA;EACA;;AAEA;EACC;;AAEA;EACC;;;AnBGD;EAFD;IANE;IAAA;IAAA;IAAA;IAUA;;;AoBEH;EACC;EACA;EACA;EAEA;EAEA;EpBmBC,eACC;EAED,gBACC;EoBrBF;EACA;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;EACA;;;AAIF;EACC;;;AC1CD;EACC;;AAEA;EAEC;EACA;EACA;EACA;;;ArBIA;EAFD;IANE;IAUA;;;AsBPH;EACC;;;AAGD;EACC;;;ACZD;EACC","file":"theme.module.css"}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"rvx"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"version": "0.1.
|
|
15
|
+
"version": "0.1.13",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"main": "./dist/index.js",
|
|
18
18
|
"sideEffects": false,
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"./dist/": "./dist/"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"rvx": "^
|
|
31
|
+
"rvx": "^19.5.1"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Expression, Signal, watch } from "rvx";
|
|
2
|
+
|
|
3
|
+
export function coupleMinMax<T extends number | bigint>(min: Expression<T>, max: Expression<T>) {
|
|
4
|
+
if (min instanceof Signal) {
|
|
5
|
+
watch(max, max => {
|
|
6
|
+
if (min.value > max) {
|
|
7
|
+
min.value = max;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (max instanceof Signal) {
|
|
12
|
+
watch(min, min => {
|
|
13
|
+
if (max.value < min) {
|
|
14
|
+
max.value = min;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/common/debounce.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $, Signal, teardown, watchUpdates } from "rvx";
|
|
2
2
|
import { validatorFor } from "../components/validation.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ import { validatorFor } from "../components/validation.js";
|
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
export function debounce<T>(source: Signal<T>, delay: number): Signal<T> {
|
|
15
|
-
const input =
|
|
15
|
+
const input = $(source.value);
|
|
16
16
|
let timer: number | undefined;
|
|
17
17
|
|
|
18
18
|
watchUpdates(input, value => {
|
package/src/common/parsers.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $, Signal, watchUpdates } from "rvx";
|
|
2
2
|
|
|
3
3
|
import { Validator } from "../components/validation.js";
|
|
4
4
|
|
|
@@ -67,7 +67,7 @@ export type ParserMessages<P extends Parser<any, any, any>> = P extends Parser<a
|
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* ```tsx
|
|
70
|
-
* const value =
|
|
70
|
+
* const value = $(0);
|
|
71
71
|
*
|
|
72
72
|
* // Format the current value as initial value:
|
|
73
73
|
* <TextInput value={
|
|
@@ -79,10 +79,10 @@ export type ParserMessages<P extends Parser<any, any, any>> = P extends Parser<a
|
|
|
79
79
|
*/
|
|
80
80
|
export function parse<S, P extends Parser<S, any, any>>(source: Signal<S>, parser: P, input?: Signal<ParserInput<P>>): Signal<ParserInput<P>> {
|
|
81
81
|
if (input === undefined) {
|
|
82
|
-
input =
|
|
82
|
+
input = $(parser.format(source.value));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
const invalid =
|
|
85
|
+
const invalid = $<undefined | ParserMessages<P>>(undefined);
|
|
86
86
|
|
|
87
87
|
watchUpdates(source, value => {
|
|
88
88
|
try {
|
package/src/common/theme.tsx
CHANGED
|
@@ -78,6 +78,10 @@ export interface Theme {
|
|
|
78
78
|
|
|
79
79
|
link?: string;
|
|
80
80
|
|
|
81
|
+
nav_list?: string;
|
|
82
|
+
nav_list_item?: string;
|
|
83
|
+
nav_list_item_current?: string;
|
|
84
|
+
|
|
81
85
|
page?: string;
|
|
82
86
|
page_scrollbar_comp?: string;
|
|
83
87
|
page_content_col?: string;
|
|
@@ -105,6 +109,8 @@ export interface Theme {
|
|
|
105
109
|
scroll_view_indicator_end?: string;
|
|
106
110
|
scroll_view_indicator_visible?: string;
|
|
107
111
|
|
|
112
|
+
slider_host?: string;
|
|
113
|
+
|
|
108
114
|
text_input?: string;
|
|
109
115
|
|
|
110
116
|
text?: string;
|
package/src/common/trim.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $, Signal, watchUpdates } from "rvx";
|
|
2
2
|
|
|
3
3
|
import { validatorFor } from "../components/validation.js";
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ import { validatorFor } from "../components/validation.js";
|
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
export function trim(source: Signal<string>): Signal<string> {
|
|
16
|
-
const input =
|
|
16
|
+
const input = $(source.value);
|
|
17
17
|
|
|
18
18
|
watchUpdates(input, value => {
|
|
19
19
|
source.value = value.trim();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassValue, Expression, get, map, optionalString,
|
|
1
|
+
import { $, ClassValue, Expression, get, map, optionalString, StyleValue, teardown } from "rvx";
|
|
2
2
|
import { Event } from "rvx/event";
|
|
3
3
|
import { THEME } from "../common/theme.js";
|
|
4
4
|
import { AriaLive, AriaRelevant } from "../common/types.js";
|
|
@@ -16,8 +16,8 @@ export function Collapse(props: {
|
|
|
16
16
|
}): unknown {
|
|
17
17
|
const theme = THEME.current;
|
|
18
18
|
const visible = map(props.visible, v => v ?? false);
|
|
19
|
-
const alert =
|
|
20
|
-
const size =
|
|
19
|
+
const alert = $(false);
|
|
20
|
+
const size = $<number | undefined>(undefined);
|
|
21
21
|
|
|
22
22
|
const content = <div class={theme?.collapse_content}>
|
|
23
23
|
{props.children}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { captureSelf, ClassValue, Context, created, Expression, map, render,
|
|
1
|
+
import { $, captureSelf, ClassValue, Context, created, Expression, map, render, StyleValue, teardown } from "rvx";
|
|
2
2
|
import { TASKS, Tasks } from "rvx/async";
|
|
3
3
|
import { Emitter, Event } from "rvx/event";
|
|
4
4
|
import { uniqueId } from "rvx/id";
|
|
@@ -23,7 +23,7 @@ export const DIALOG_FADEOUT = new Context<Event<[tasks: Promise<void>[]]> | unde
|
|
|
23
23
|
export function showDialog<T = void>(init: DialogInit<T>, options?: DialogOptions): Promise<T> {
|
|
24
24
|
return new Promise<T>((resolve, reject) => {
|
|
25
25
|
captureSelf(dispose => {
|
|
26
|
-
const enabled =
|
|
26
|
+
const enabled = $(true);
|
|
27
27
|
const fadeout = new Emitter<[tasks: Promise<void>[]]>();
|
|
28
28
|
const view = render(
|
|
29
29
|
<Layer modal enabled={enabled}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassValue, Expression, For, get, map, memo, optionalString, render,
|
|
1
|
+
import { $, ClassValue, Expression, For, get, map, memo, optionalString, render, StyleValue, View, watch } from "rvx";
|
|
2
2
|
import { uniqueId } from "rvx/id";
|
|
3
3
|
import { Action, createPassiveActionEvent, handleActionEvent, keyFor, startDelayedHoverOnMouseenter } from "../common/events.js";
|
|
4
4
|
import { THEME } from "../common/theme.js";
|
|
@@ -92,7 +92,7 @@ export function createDropdown(props: {
|
|
|
92
92
|
const theme = THEME.current;
|
|
93
93
|
const layer = LAYER.current!;
|
|
94
94
|
|
|
95
|
-
const activeItem =
|
|
95
|
+
const activeItem = $<DropdownItem | undefined>(undefined);
|
|
96
96
|
const instances = new WeakMap<DropdownItem, {
|
|
97
97
|
id: string;
|
|
98
98
|
children: Popout | undefined;
|
package/src/components/layer.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, Expression, get, Inject, memo,
|
|
1
|
+
import { $, Context, Expression, get, Inject, memo, Signal, teardown, uncapture, untrack, watch } from "rvx";
|
|
2
2
|
|
|
3
3
|
import { Action, handleActionEvent, keyFor } from "../common/events.js";
|
|
4
4
|
|
|
@@ -15,11 +15,11 @@ interface LayerInstance {
|
|
|
15
15
|
|
|
16
16
|
export const LAYER = new Context<LayerHandle | undefined>();
|
|
17
17
|
|
|
18
|
-
const LAYERS =
|
|
18
|
+
const LAYERS = $<LayerInstance[]>([
|
|
19
19
|
{
|
|
20
20
|
roots: [],
|
|
21
21
|
modal: false,
|
|
22
|
-
inert:
|
|
22
|
+
inert: $(false),
|
|
23
23
|
autoFocusFallback: undefined,
|
|
24
24
|
},
|
|
25
25
|
]);
|
|
@@ -79,7 +79,7 @@ export function Layer(props: {
|
|
|
79
79
|
const layer: LayerInstance = {
|
|
80
80
|
roots: [],
|
|
81
81
|
modal: props.modal ?? false,
|
|
82
|
-
inert:
|
|
82
|
+
inert: $(false),
|
|
83
83
|
autoFocusFallback: undefined,
|
|
84
84
|
};
|
|
85
85
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ClassValue, Expression, get, map, optionalString, StyleValue } from "rvx";
|
|
2
|
+
import { isPending } from "rvx/async";
|
|
3
|
+
import { Action, handleActionEvent, keyFor } from "../common/events.js";
|
|
4
|
+
import { THEME } from "../common/theme.js";
|
|
5
|
+
|
|
6
|
+
export function NavList(props: {
|
|
7
|
+
/**
|
|
8
|
+
* The element role or `false` to disable.
|
|
9
|
+
*
|
|
10
|
+
* @default "navigation"
|
|
11
|
+
*/
|
|
12
|
+
role?: Expression<string | false | undefined>;
|
|
13
|
+
|
|
14
|
+
class?: ClassValue;
|
|
15
|
+
style?: StyleValue;
|
|
16
|
+
id?: Expression<string | undefined>;
|
|
17
|
+
children?: unknown;
|
|
18
|
+
}): unknown {
|
|
19
|
+
const theme = THEME.current;
|
|
20
|
+
return <div
|
|
21
|
+
class={[
|
|
22
|
+
theme?.nav_list,
|
|
23
|
+
props.class,
|
|
24
|
+
]}
|
|
25
|
+
style={[
|
|
26
|
+
{ "--nav-list-depth": String(0) },
|
|
27
|
+
props.style,
|
|
28
|
+
]}
|
|
29
|
+
id={props.id}
|
|
30
|
+
role={map(props.role, role => role ?? "navigation")}
|
|
31
|
+
>
|
|
32
|
+
{props.children}
|
|
33
|
+
</div>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function NavListButton(props: {
|
|
37
|
+
/**
|
|
38
|
+
* True if this is the currently selected item.
|
|
39
|
+
*/
|
|
40
|
+
current?: Expression<boolean | undefined>;
|
|
41
|
+
|
|
42
|
+
disabled?: Expression<boolean | undefined>;
|
|
43
|
+
class?: ClassValue;
|
|
44
|
+
style?: StyleValue;
|
|
45
|
+
id?: Expression<string | undefined>;
|
|
46
|
+
action?: Action;
|
|
47
|
+
children?: unknown;
|
|
48
|
+
}): unknown {
|
|
49
|
+
const theme = THEME.current;
|
|
50
|
+
const disabled = () => isPending() || get(props.disabled);
|
|
51
|
+
|
|
52
|
+
function action(event: Event) {
|
|
53
|
+
if (disabled() || !props.action) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
handleActionEvent(event, props.action);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return <button
|
|
60
|
+
type="button"
|
|
61
|
+
disabled={disabled}
|
|
62
|
+
class={[
|
|
63
|
+
theme?.nav_list_item,
|
|
64
|
+
map(props.current, current => current && theme?.nav_list_item_current),
|
|
65
|
+
props.class,
|
|
66
|
+
]}
|
|
67
|
+
style={props.style}
|
|
68
|
+
id={props.id}
|
|
69
|
+
on:click={action}
|
|
70
|
+
on:keydown={event => {
|
|
71
|
+
const key = keyFor(event);
|
|
72
|
+
if (key === "enter" || key === "space") {
|
|
73
|
+
action(event);
|
|
74
|
+
}
|
|
75
|
+
}}
|
|
76
|
+
aria-current={optionalString(props.current)}
|
|
77
|
+
>
|
|
78
|
+
{props.children}
|
|
79
|
+
</button>;
|
|
80
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { captureSelf, Context, Expression, get, render,
|
|
1
|
+
import { $, captureSelf, Context, Expression, get, render, teardown, TeardownHook, untrack, View, viewNodes } from "rvx";
|
|
2
2
|
import { Emitter, Event as RvxEvent } from "rvx/event";
|
|
3
3
|
import { PASSIVE_ACTION_EVENT } from "../common/events.js";
|
|
4
4
|
import { axisEquals, Direction, DOWN, flip, getBlockStart, getInlineStart, getSize, getWindowSize, getWindowSpaceAround, INSET, LEFT, RIGHT, ScriptDirection, UP, WritingMode } from "../common/writing-mode.js";
|
|
@@ -138,9 +138,9 @@ export class Popout {
|
|
|
138
138
|
#foreignEvents: string[];
|
|
139
139
|
#instance?: Instance;
|
|
140
140
|
#instanceArgs?: InstanceArgs;
|
|
141
|
-
#visible =
|
|
141
|
+
#visible = $(false);
|
|
142
142
|
#onPlacement = new Emitter<[PopoutPlacementArgs]>();
|
|
143
|
-
#placementState =
|
|
143
|
+
#placementState = $<PopoutPlacementInfo | undefined>(undefined);
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Create a new popout.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassValue, Expression, get, Inject, map, render,
|
|
1
|
+
import { $, ClassValue, Expression, get, Inject, map, render, StyleValue, SVG, watch, XMLNS } from "rvx";
|
|
2
2
|
import { uniqueId } from "rvx/id";
|
|
3
3
|
import { Action } from "../common/events.js";
|
|
4
4
|
import { THEME } from "../common/theme.js";
|
|
@@ -78,7 +78,7 @@ export function createPopover(props: {
|
|
|
78
78
|
content: ({ popout, onPlacement, placement, setSizeReference }) => {
|
|
79
79
|
const theme = THEME.current;
|
|
80
80
|
const layer = LAYER.current!;
|
|
81
|
-
const spikeTransform =
|
|
81
|
+
const spikeTransform = $("");
|
|
82
82
|
|
|
83
83
|
layer.useHotkey("escape", () => {
|
|
84
84
|
popout.hide();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassValue,
|
|
1
|
+
import { $, ClassValue, StyleValue, teardown } from "rvx";
|
|
2
2
|
import { debounceEvent } from "../common/events.js";
|
|
3
3
|
import { THEME } from "../common/theme.js";
|
|
4
4
|
import { axisEquals, DOWN, getBlockStart, getSize, RIGHT, UP, WritingMode } from "../common/writing-mode.js";
|
|
@@ -9,10 +9,10 @@ export function ScrollView(props: {
|
|
|
9
9
|
children?: unknown;
|
|
10
10
|
}): unknown {
|
|
11
11
|
const theme = THEME.current;
|
|
12
|
-
const vertical =
|
|
13
|
-
const scrollbarComp =
|
|
14
|
-
const startIndicator =
|
|
15
|
-
const endIndicator =
|
|
12
|
+
const vertical = $<boolean | undefined>(undefined);
|
|
13
|
+
const scrollbarComp = $(0);
|
|
14
|
+
const startIndicator = $(false);
|
|
15
|
+
const endIndicator = $(false);
|
|
16
16
|
|
|
17
17
|
const content = <div class={theme?.scroll_view_content}>
|
|
18
18
|
{props.children}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Expression, map, Show, Signal } from "rvx";
|
|
2
|
+
import { uniqueId } from "rvx/id";
|
|
3
|
+
import { THEME } from "../common/theme.js";
|
|
4
|
+
|
|
5
|
+
export function Slider(props: {
|
|
6
|
+
id?: Expression<string | undefined>;
|
|
7
|
+
value?: Expression<number | undefined>;
|
|
8
|
+
min?: Expression<number | undefined>;
|
|
9
|
+
max?: Expression<number | undefined>;
|
|
10
|
+
step?: Expression<number | "any" | undefined>;
|
|
11
|
+
markers?: Expression<number[] | undefined>;
|
|
12
|
+
children?: unknown;
|
|
13
|
+
}) {
|
|
14
|
+
const theme = THEME.current;
|
|
15
|
+
const markerId = uniqueId();
|
|
16
|
+
|
|
17
|
+
const input = <input
|
|
18
|
+
id={props.id}
|
|
19
|
+
type="range"
|
|
20
|
+
min={map(props.min, min => min ?? 0)}
|
|
21
|
+
max={map(props.max, max => max ?? 100)}
|
|
22
|
+
step={map(props.step, step => step ?? 1)}
|
|
23
|
+
prop:value={map(props.value, value => value ?? "0")}
|
|
24
|
+
on:input={() => {
|
|
25
|
+
if (props.value instanceof Signal) {
|
|
26
|
+
props.value.value = Number(input.value);
|
|
27
|
+
}
|
|
28
|
+
}}
|
|
29
|
+
list={map(props.markers, markers => markers ? markerId : undefined)}
|
|
30
|
+
/> as HTMLInputElement;
|
|
31
|
+
|
|
32
|
+
return <div
|
|
33
|
+
class={theme?.slider_host}
|
|
34
|
+
>
|
|
35
|
+
{input}
|
|
36
|
+
|
|
37
|
+
<Show when={props.markers}>
|
|
38
|
+
{markers => <datalist id={markerId}>
|
|
39
|
+
{markers.map(marker => <option value={marker} />)}
|
|
40
|
+
</datalist>}
|
|
41
|
+
</Show>
|
|
42
|
+
|
|
43
|
+
{props.children}
|
|
44
|
+
</div>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function sliderMarkers(min: number, max: number, step: number): number[] {
|
|
48
|
+
if (min > max) {
|
|
49
|
+
[min, max] = [max, min];
|
|
50
|
+
}
|
|
51
|
+
const markers: number[] = [];
|
|
52
|
+
for (let i = min; i <= max; i += step) {
|
|
53
|
+
markers.push(i > max ? max : i);
|
|
54
|
+
}
|
|
55
|
+
return markers;
|
|
56
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassValue, Context, Expression, For, map,
|
|
1
|
+
import { $, ClassValue, Context, Expression, For, map, Signal, StyleValue, teardown, trigger, TriggerPipe, untrack } from "rvx";
|
|
2
2
|
import { Queue } from "rvx/async";
|
|
3
3
|
import { Emitter, Event } from "rvx/event";
|
|
4
4
|
import { uniqueId } from "rvx/id";
|
|
@@ -29,8 +29,8 @@ export interface ValidationOptions {
|
|
|
29
29
|
export class Validator {
|
|
30
30
|
#queue = new Queue();
|
|
31
31
|
#signalTrigger: ValidationSignalTrigger;
|
|
32
|
-
#rules =
|
|
33
|
-
#invalid =
|
|
32
|
+
#rules = $<ValidationRuleEntry[]>([]);
|
|
33
|
+
#invalid = $(false);
|
|
34
34
|
|
|
35
35
|
constructor() {
|
|
36
36
|
const options = VALIDATION.current;
|
|
@@ -176,7 +176,7 @@ export interface ValidationRule {
|
|
|
176
176
|
|
|
177
177
|
export class ValidationRuleEntry {
|
|
178
178
|
readonly id = uniqueId();
|
|
179
|
-
readonly visible =
|
|
179
|
+
readonly visible = $(false);
|
|
180
180
|
readonly alert = new Emitter<[]>();
|
|
181
181
|
readonly message: unknown;
|
|
182
182
|
readonly validate: ValidationRule["validate"];
|
package/src/index.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./common/coupling.js";
|
|
1
2
|
export * from "./common/debounce.js";
|
|
2
3
|
export * from "./common/events.js";
|
|
3
4
|
export * from "./common/parsers.js";
|
|
@@ -19,12 +20,14 @@ export * from "./components/heading.js";
|
|
|
19
20
|
export * from "./components/label.js";
|
|
20
21
|
export * from "./components/layer.js";
|
|
21
22
|
export * from "./components/link.js";
|
|
23
|
+
export * from "./components/nav-list.js";
|
|
22
24
|
export * from "./components/page.js";
|
|
23
25
|
export * from "./components/popout.js";
|
|
24
26
|
export * from "./components/popover.js";
|
|
25
27
|
export * from "./components/radio-buttons.js";
|
|
26
28
|
export * from "./components/row.js";
|
|
27
29
|
export * from "./components/scroll-view.js";
|
|
30
|
+
export * from "./components/slider.js";
|
|
28
31
|
export * from "./components/text-input.js";
|
|
29
32
|
export * from "./components/text.js";
|
|
30
33
|
export * from "./components/validation.js";
|