@rvx/ui 0.1.6
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/LICENSE +21 -0
- package/dist/common/events.d.ts +72 -0
- package/dist/common/events.js +58 -0
- package/dist/common/events.js.map +1 -0
- package/dist/common/parsers.d.ts +88 -0
- package/dist/common/parsers.js +62 -0
- package/dist/common/parsers.js.map +1 -0
- package/dist/common/theme-test.d.ts +7 -0
- package/dist/common/theme-test.js +14 -0
- package/dist/common/theme-test.js.map +1 -0
- package/dist/common/theme.d.ts +144 -0
- package/dist/common/theme.js +2 -0
- package/dist/common/theme.js.map +1 -0
- package/dist/common/trim.d.ts +12 -0
- package/dist/common/trim.js +16 -0
- package/dist/common/trim.js.map +1 -0
- package/dist/common/types.d.ts +13 -0
- package/dist/common/types.js +10 -0
- package/dist/common/types.js.map +1 -0
- package/dist/common/writing-mode.d.ts +82 -0
- package/dist/common/writing-mode.js +61 -0
- package/dist/common/writing-mode.js.map +1 -0
- package/dist/components/button.d.ts +42 -0
- package/dist/components/button.js +26 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/checkbox.d.ts +9 -0
- package/dist/components/checkbox.js +32 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapse-test.d.ts +8 -0
- package/dist/components/collapse-test.js +15 -0
- package/dist/components/collapse-test.js.map +1 -0
- package/dist/components/collapse.d.ts +13 -0
- package/dist/components/collapse.js +44 -0
- package/dist/components/collapse.js.map +1 -0
- package/dist/components/column.d.ts +12 -0
- package/dist/components/column.js +12 -0
- package/dist/components/column.js.map +1 -0
- package/dist/components/control-group.d.ts +7 -0
- package/dist/components/control-group.js +11 -0
- package/dist/components/control-group.js.map +1 -0
- package/dist/components/dialog.d.ts +33 -0
- package/dist/components/dialog.js +67 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-input.d.ts +27 -0
- package/dist/components/dropdown-input.js +31 -0
- package/dist/components/dropdown-input.js.map +1 -0
- package/dist/components/dropdown.d.ts +123 -0
- package/dist/components/dropdown.js +176 -0
- package/dist/components/dropdown.js.map +1 -0
- package/dist/components/flex-space.d.ts +4 -0
- package/dist/components/flex-space.js +10 -0
- package/dist/components/flex-space.js.map +1 -0
- package/dist/components/heading.d.ts +9 -0
- package/dist/components/heading.js +14 -0
- package/dist/components/heading.js.map +1 -0
- package/dist/components/label.d.ts +14 -0
- package/dist/components/label.js +15 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/layer.d.ts +81 -0
- package/dist/components/layer.js +164 -0
- package/dist/components/layer.js.map +1 -0
- package/dist/components/link.d.ts +57 -0
- package/dist/components/link.js +26 -0
- package/dist/components/link.js.map +1 -0
- package/dist/components/page.d.ts +9 -0
- package/dist/components/page.js +17 -0
- package/dist/components/page.js.map +1 -0
- package/dist/components/popout.d.ts +134 -0
- package/dist/components/popout.js +259 -0
- package/dist/components/popout.js.map +1 -0
- package/dist/components/popover.d.ts +139 -0
- package/dist/components/popover.js +101 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/radio-buttons.d.ts +17 -0
- package/dist/components/radio-buttons.js +26 -0
- package/dist/components/radio-buttons.js.map +1 -0
- package/dist/components/row.d.ts +10 -0
- package/dist/components/row.js +23 -0
- package/dist/components/row.js.map +1 -0
- package/dist/components/scroll-view.d.ts +6 -0
- package/dist/components/scroll-view.js +72 -0
- package/dist/components/scroll-view.js.map +1 -0
- package/dist/components/text-input.d.ts +53 -0
- package/dist/components/text-input.js +35 -0
- package/dist/components/text-input.js.map +1 -0
- package/dist/components/text.d.ts +7 -0
- package/dist/components/text.js +11 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/validation.d.ts +109 -0
- package/dist/components/validation.js +151 -0
- package/dist/components/validation.js.map +1 -0
- package/dist/components/value.d.ts +7 -0
- package/dist/components/value.js +11 -0
- package/dist/components/value.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.js +3 -0
- package/dist/test.js.map +1 -0
- package/dist/theme.module.css +679 -0
- package/dist/theme.module.css.map +1 -0
- package/package.json +29 -0
- package/src/common/events.tsx +130 -0
- package/src/common/parsers.tsx +167 -0
- package/src/common/theme-test.tsx +20 -0
- package/src/common/theme.tsx +165 -0
- package/src/common/trim.tsx +30 -0
- package/src/common/types.tsx +23 -0
- package/src/common/writing-mode.tsx +150 -0
- package/src/components/button.tsx +94 -0
- package/src/components/checkbox.tsx +64 -0
- package/src/components/collapse-test.tsx +23 -0
- package/src/components/collapse.tsx +75 -0
- package/src/components/column.tsx +28 -0
- package/src/components/control-group.tsx +22 -0
- package/src/components/dialog.tsx +137 -0
- package/src/components/dropdown-input.tsx +82 -0
- package/src/components/dropdown.tsx +352 -0
- package/src/components/flex-space.tsx +15 -0
- package/src/components/heading.tsx +23 -0
- package/src/components/label.tsx +37 -0
- package/src/components/layer.tsx +299 -0
- package/src/components/link.tsx +118 -0
- package/src/components/page.tsx +36 -0
- package/src/components/popout.tsx +461 -0
- package/src/components/popover.tsx +292 -0
- package/src/components/radio-buttons.tsx +81 -0
- package/src/components/row.tsx +37 -0
- package/src/components/scroll-view.tsx +97 -0
- package/src/components/text-input.tsx +117 -0
- package/src/components/text.tsx +22 -0
- package/src/components/validation.tsx +272 -0
- package/src/components/value.tsx +22 -0
- package/src/index.tsx +29 -0
- package/src/test.tsx +2 -0
- package/src/theme/base.scss +69 -0
- package/src/theme/common.scss +51 -0
- package/src/theme/components/button.scss +116 -0
- package/src/theme/components/checkbox.scss +25 -0
- package/src/theme/components/collapse.scss +64 -0
- package/src/theme/components/column.scss +28 -0
- package/src/theme/components/control-group.scss +14 -0
- package/src/theme/components/dialog.scss +44 -0
- package/src/theme/components/dropdown.scss +50 -0
- package/src/theme/components/flex-space.scss +6 -0
- package/src/theme/components/heading.scss +39 -0
- package/src/theme/components/label.scss +24 -0
- package/src/theme/components/link.scss +25 -0
- package/src/theme/components/page.scss +22 -0
- package/src/theme/components/popover.scss +58 -0
- package/src/theme/components/radio-buttons.scss +31 -0
- package/src/theme/components/row.scss +17 -0
- package/src/theme/components/scroll-view.scss +51 -0
- package/src/theme/components/text-input.scss +45 -0
- package/src/theme/components/text.scss +12 -0
- package/src/theme/components/validation.scss +15 -0
- package/src/theme/components/value.scss +4 -0
- package/src/theme/theme.scss +22 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ClassValue, Expression, StyleValue } from "rvx";
|
|
2
|
+
export interface RadioOption<T> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare function RadioButtons<T>(props: {
|
|
7
|
+
value?: Expression<T | undefined>;
|
|
8
|
+
options: Expression<RadioOption<T>[]>;
|
|
9
|
+
disabled?: Expression<boolean | undefined>;
|
|
10
|
+
id?: Expression<string | undefined>;
|
|
11
|
+
class?: ClassValue;
|
|
12
|
+
style?: StyleValue;
|
|
13
|
+
autofocus?: Expression<boolean | undefined>;
|
|
14
|
+
"aria-label"?: Expression<string | undefined>;
|
|
15
|
+
"aria-labelledby"?: Expression<string | undefined>;
|
|
16
|
+
children?: never;
|
|
17
|
+
}): unknown;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
|
+
import { extract, For, get, map, optionalString, Signal, string, uniqueId } from "rvx";
|
|
3
|
+
import { isPending } from "rvx/async";
|
|
4
|
+
import { THEME } from "../common/theme.js";
|
|
5
|
+
import { Text } from "./text.js";
|
|
6
|
+
import { validatorFor } from "./validation.js";
|
|
7
|
+
export function RadioButtons(props) {
|
|
8
|
+
const group = uniqueId();
|
|
9
|
+
const theme = extract(THEME);
|
|
10
|
+
const disabled = props.value instanceof Signal
|
|
11
|
+
? () => isPending() || get(props.disabled)
|
|
12
|
+
: true;
|
|
13
|
+
const validator = props.value instanceof Signal ? validatorFor(props.value) : undefined;
|
|
14
|
+
return _jsx("div", { role: "radiogroup", id: props.id, class: [
|
|
15
|
+
theme?.radio_buttons,
|
|
16
|
+
props.class,
|
|
17
|
+
], style: props.style, "aria-readonly": string(!(props.options instanceof Signal)), "aria-invalid": validator ? optionalString(validator.invalid) : undefined, "aria-errormessage": validator ? validator.errorMessageIds : undefined, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], children: _jsx(For, { each: props.options, children: (option, index) => {
|
|
18
|
+
const id = uniqueId();
|
|
19
|
+
return _jsxs("label", { for: id, class: theme?.radio_button_label, children: [_jsx("input", { id: id, type: "radio", class: theme?.radio_button_input, name: group, value: id, disabled: disabled, autofocus: () => get(props.autofocus) && index() === 0, "prop:checked": map(props.value, x => x === option.value), "on:input": () => {
|
|
20
|
+
if (props.value instanceof Signal) {
|
|
21
|
+
props.value.value = option.value;
|
|
22
|
+
}
|
|
23
|
+
} }), _jsx(Text, { class: theme?.radio_button_content, children: option.label })] });
|
|
24
|
+
} }) });
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=radio-buttons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-buttons.js","sourceRoot":"","sources":["../../src/components/radio-buttons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAc,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC3H,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAO/C,MAAM,UAAU,YAAY,CAAI,KAc/B;IACA,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAE7B,MAA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,CAAC,IAAI,KAAK,EAAE,KAAK,CAAC,kBACxC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,cAC7C,GAAG,EAAE;gCACd,IAAI,KAAK,CAAC,KAAK,YAAY,MAAM,EAAE,CAAC;oCACnC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;gCAClC,CAAC;4BACF,CAAC,GACA,EACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,oBAAoB,YACtC,MAAM,CAAC,KAAK,GACP,IACA,CAAC;YACV,CAAC,GACI,GACD,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ClassValue, Expression, StyleValue } from "rvx";
|
|
2
|
+
import { SizeContext } from "../common/types.js";
|
|
3
|
+
export type RowAlignment = "top" | "center" | "bottom";
|
|
4
|
+
export declare function Row(props: {
|
|
5
|
+
size?: Expression<SizeContext | undefined>;
|
|
6
|
+
align?: Expression<RowAlignment | undefined>;
|
|
7
|
+
class?: ClassValue;
|
|
8
|
+
style?: StyleValue;
|
|
9
|
+
children?: unknown;
|
|
10
|
+
}): unknown;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import { extract, get } from "rvx";
|
|
3
|
+
import { THEME } from "../common/theme.js";
|
|
4
|
+
export function Row(props) {
|
|
5
|
+
const theme = extract(THEME);
|
|
6
|
+
return _jsx("div", { class: [
|
|
7
|
+
theme?.row,
|
|
8
|
+
() => theme?.[`row_${get(props.size) ?? "content"}`],
|
|
9
|
+
props.class,
|
|
10
|
+
], style: [
|
|
11
|
+
props.style,
|
|
12
|
+
{
|
|
13
|
+
"align-items": () => {
|
|
14
|
+
switch (get(props.align)) {
|
|
15
|
+
case "center": return "center";
|
|
16
|
+
case "bottom": return "end";
|
|
17
|
+
default: return "start";
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
], children: props.children });
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../src/components/row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,OAAO,EAAE,GAAG,EAAc,MAAM,KAAK,CAAC;AAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C,MAAM,UAAU,GAAG,CAAC,KAMnB;IACA,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,cACN,KAAK,EAAE;YACN,KAAK,EAAE,GAAG;YACV,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC;YACpD,KAAK,CAAC,KAAK;SACX,EACD,KAAK,EAAE;YACN,KAAK,CAAC,KAAK;YACX;gBACC,aAAa,EAAE,GAAG,EAAE;oBACnB,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC1B,KAAK,QAAQ,CAAC,CAAC,OAAO,QAAQ,CAAC;wBAC/B,KAAK,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAC;wBAC5B,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC;oBACzB,CAAC;gBACF,CAAC;aACD;SACD,YAEA,KAAK,CAAC,QAAQ,GACV,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
|
+
import { extract, sig, teardown } from "rvx";
|
|
3
|
+
import { debounceEvent } from "../common/events.js";
|
|
4
|
+
import { THEME } from "../common/theme.js";
|
|
5
|
+
import { axisEquals, DOWN, getBlockStart, getSize, RIGHT, UP } from "../common/writing-mode.js";
|
|
6
|
+
export function ScrollView(props) {
|
|
7
|
+
const theme = extract(THEME);
|
|
8
|
+
const vertical = sig(undefined);
|
|
9
|
+
const scrollbarComp = sig(0);
|
|
10
|
+
const startIndicator = sig(false);
|
|
11
|
+
const endIndicator = sig(false);
|
|
12
|
+
const content = _jsx("div", { class: theme?.scroll_view_content, children: props.children });
|
|
13
|
+
const updateIndicators = (blockStart = getBlockStart(getComputedStyle(area).writingMode || "horizontal-tb")) => {
|
|
14
|
+
const areaSize = getSize(area.getBoundingClientRect(), blockStart);
|
|
15
|
+
let start;
|
|
16
|
+
let end;
|
|
17
|
+
if (blockStart === UP || blockStart === DOWN) {
|
|
18
|
+
start = area.scrollTop;
|
|
19
|
+
end = area.scrollHeight - start - areaSize;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
start = area.scrollLeft;
|
|
23
|
+
end = area.scrollWidth - start - areaSize;
|
|
24
|
+
}
|
|
25
|
+
if (blockStart === DOWN || blockStart === RIGHT) {
|
|
26
|
+
const x = start;
|
|
27
|
+
start = end;
|
|
28
|
+
end = x;
|
|
29
|
+
}
|
|
30
|
+
startIndicator.value = start > .5;
|
|
31
|
+
endIndicator.value = end > .5;
|
|
32
|
+
};
|
|
33
|
+
const area = _jsx("div", { class: theme?.scroll_view_area, style: {
|
|
34
|
+
overflow: () => vertical.value ? "hidden auto" : "auto hidden",
|
|
35
|
+
}, "on:scroll": [debounceEvent(100, () => updateIndicators()), { passive: true }], children: content });
|
|
36
|
+
const root = _jsxs("div", { class: [
|
|
37
|
+
props.class,
|
|
38
|
+
theme?.scroll_view,
|
|
39
|
+
], style: [
|
|
40
|
+
props.style,
|
|
41
|
+
{
|
|
42
|
+
"--scrollbar-comp": () => `${scrollbarComp.value}px`,
|
|
43
|
+
},
|
|
44
|
+
], children: [area, _jsx("div", { class: [
|
|
45
|
+
theme?.scroll_view_indicator_start,
|
|
46
|
+
() => startIndicator.value && theme?.scroll_view_indicator_visible,
|
|
47
|
+
] }), _jsx("div", { class: [
|
|
48
|
+
theme?.scroll_view_indicator_end,
|
|
49
|
+
() => endIndicator.value && theme?.scroll_view_indicator_visible,
|
|
50
|
+
] })] });
|
|
51
|
+
const rootObserver = new ResizeObserver(() => {
|
|
52
|
+
const blockStart = getBlockStart(getComputedStyle(root).writingMode || "horizontal-tb");
|
|
53
|
+
vertical.value ??= axisEquals(blockStart, UP);
|
|
54
|
+
updateIndicators(blockStart);
|
|
55
|
+
});
|
|
56
|
+
rootObserver.observe(root);
|
|
57
|
+
teardown(() => rootObserver.disconnect());
|
|
58
|
+
const contentObserver = new IntersectionObserver(() => {
|
|
59
|
+
const rootRect = root.getBoundingClientRect();
|
|
60
|
+
const contentRect = content.getBoundingClientRect();
|
|
61
|
+
const blockStart = getBlockStart(getComputedStyle(root).writingMode || "horizontal-tb");
|
|
62
|
+
const isVertical = axisEquals(blockStart, UP);
|
|
63
|
+
const dir = isVertical ? RIGHT : UP;
|
|
64
|
+
scrollbarComp.value = Math.max(0, getSize(rootRect, dir) - getSize(contentRect, dir));
|
|
65
|
+
vertical.value ??= isVertical;
|
|
66
|
+
updateIndicators(blockStart);
|
|
67
|
+
}, { root, rootMargin: "0px 0px 0px 0px", threshold: 1 });
|
|
68
|
+
contentObserver.observe(content);
|
|
69
|
+
teardown(() => contentObserver.disconnect());
|
|
70
|
+
return root;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=scroll-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-view.js","sourceRoot":"","sources":["../../src/components/scroll-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,OAAO,EAAE,GAAG,EAAc,QAAQ,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,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;IACH,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;IAE1C,MAAM,eAAe,GAAG,IAAI,oBAAoB,CAAC,GAAG,EAAE;QACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC9C,MAAM,WAAW,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;QACpD,MAAM,UAAU,GAAG,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,WAA0B,IAAI,eAAe,CAAC,CAAC;QACvG,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC9C,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACpC,aAAa,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;QACtF,QAAQ,CAAC,KAAK,KAAK,UAAU,CAAC;QAC9B,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC9B,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1D,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;IAE7C,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ClassValue, Expression, StyleValue } from "rvx";
|
|
2
|
+
export type TextInputType = "text" | "password";
|
|
3
|
+
export type TextAreaWrap = "hard" | "soft";
|
|
4
|
+
export declare function TextInput(props: ({
|
|
5
|
+
/**
|
|
6
|
+
* If true, this component is rendered as a `<textarea>` element.
|
|
7
|
+
*/
|
|
8
|
+
multiline?: false;
|
|
9
|
+
/**
|
|
10
|
+
* The input type.
|
|
11
|
+
*
|
|
12
|
+
* @default "text"
|
|
13
|
+
*/
|
|
14
|
+
type?: Expression<TextInputType | undefined>;
|
|
15
|
+
} | {
|
|
16
|
+
/**
|
|
17
|
+
* If true, this component is rendered as a `<textarea>` element.
|
|
18
|
+
*/
|
|
19
|
+
multiline: true;
|
|
20
|
+
/**
|
|
21
|
+
* The number of visible rows if not overwritten via css.
|
|
22
|
+
*
|
|
23
|
+
* If not specified, the browser default is used.
|
|
24
|
+
*/
|
|
25
|
+
rows?: Expression<number | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Controls how the value is wrapped for form submission.
|
|
28
|
+
*
|
|
29
|
+
* This sets the standard `wrap` attribute.
|
|
30
|
+
*/
|
|
31
|
+
wrap?: Expression<TextAreaWrap | undefined>;
|
|
32
|
+
}) & {
|
|
33
|
+
/**
|
|
34
|
+
* Set when the input is disabled.
|
|
35
|
+
*
|
|
36
|
+
* The input is automatically disabled when there are any {@link isPending pending tasks}.
|
|
37
|
+
*/
|
|
38
|
+
disabled?: Expression<boolean | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* The current text value.
|
|
41
|
+
*
|
|
42
|
+
* If this isn't a signal, the text input is readonly.
|
|
43
|
+
*/
|
|
44
|
+
value: Expression<string>;
|
|
45
|
+
enterAction?: (event: Event) => void | boolean | Promise<void>;
|
|
46
|
+
class?: ClassValue;
|
|
47
|
+
style?: StyleValue;
|
|
48
|
+
id?: Expression<string | undefined>;
|
|
49
|
+
autofocus?: Expression<boolean | undefined>;
|
|
50
|
+
spellcheck?: Expression<boolean | undefined>;
|
|
51
|
+
"aria-label"?: Expression<string | undefined>;
|
|
52
|
+
"aria-labelledby"?: Expression<string | undefined>;
|
|
53
|
+
}): unknown;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import { extract, get, optionalString, Signal } from "rvx";
|
|
3
|
+
import { isPending, waitFor } from "rvx/async";
|
|
4
|
+
import { keyFor } from "../common/events.js";
|
|
5
|
+
import { THEME } from "../common/theme.js";
|
|
6
|
+
import { validatorFor } from "./validation.js";
|
|
7
|
+
export function TextInput(props) {
|
|
8
|
+
const theme = extract(THEME);
|
|
9
|
+
const disabled = () => isPending() || get(props.disabled);
|
|
10
|
+
const validator = props.value instanceof Signal ? validatorFor(props.value) : undefined;
|
|
11
|
+
const InputTag = props.multiline ? "textarea" : "input";
|
|
12
|
+
const input = _jsx(InputTag, { type: props.multiline ? undefined : (() => get(props.type) ?? "text"), rows: props.multiline ? props.rows : undefined, wrap: props.multiline ? props.wrap : undefined, disabled: disabled, class: [
|
|
13
|
+
theme?.text_input,
|
|
14
|
+
props.class,
|
|
15
|
+
], style: props.style, id: props.id, autofocus: props.autofocus, spellcheck: optionalString(props.spellcheck), readonly: !(props.value instanceof Signal), "prop:value": props.value, "on:input": () => {
|
|
16
|
+
if (props.value instanceof Signal) {
|
|
17
|
+
props.value.value = input.value;
|
|
18
|
+
}
|
|
19
|
+
}, "on:keydown": event => {
|
|
20
|
+
const key = keyFor(event);
|
|
21
|
+
if (key === "enter" && props.enterAction && !disabled()) {
|
|
22
|
+
const result = props.enterAction(event);
|
|
23
|
+
if (result === false) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
event.stopImmediatePropagation();
|
|
28
|
+
if (result instanceof Promise) {
|
|
29
|
+
waitFor(result);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], "aria-invalid": validator ? optionalString(validator.invalid) : undefined, "aria-errormessage": validator ? validator.errorMessageIds : undefined });
|
|
33
|
+
return input;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=text-input.js.map
|
|
@@ -0,0 +1 @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;IAEvB,OAAO,KAAK,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import { extract } from "rvx";
|
|
3
|
+
import { THEME } from "../common/theme.js";
|
|
4
|
+
export function Text(props) {
|
|
5
|
+
const theme = extract(THEME);
|
|
6
|
+
return _jsx("div", { class: [
|
|
7
|
+
theme?.text,
|
|
8
|
+
props.class,
|
|
9
|
+
], style: props.style, id: props.id, children: props.children });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/components/text.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,OAAO,EAAc,MAAM,KAAK,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,UAAU,IAAI,CAAC,KAKpB;IACA,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,cACN,KAAK,EAAE;YACN,KAAK,EAAE,IAAI;YACX,KAAK,CAAC,KAAK;SACX,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,EAAE,EAAE,KAAK,CAAC,EAAE,YAEX,KAAK,CAAC,QAAQ,GACV,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ClassValue, ContextKey, Emitter, Event, Expression, Signal, StyleValue, TriggerPipe } from "rvx";
|
|
2
|
+
/**
|
|
3
|
+
* Context key for validation options used by new validators.
|
|
4
|
+
*/
|
|
5
|
+
export declare const VALIDATION: ContextKey<ValidationOptions>;
|
|
6
|
+
/**
|
|
7
|
+
* Defines when accessed signals trigger automatic validation.
|
|
8
|
+
*
|
|
9
|
+
* + **if-validated** - **Default.** Validate if validation did run before.
|
|
10
|
+
* + **if-invalid** - Validate if currently invalid.
|
|
11
|
+
* + **never** - Never validate automatically.
|
|
12
|
+
*/
|
|
13
|
+
export type ValidationSignalTrigger = "if-validated" | "if-invalid" | "never";
|
|
14
|
+
export interface ValidationOptions {
|
|
15
|
+
signalTrigger?: ValidationSignalTrigger;
|
|
16
|
+
}
|
|
17
|
+
export declare class Validator {
|
|
18
|
+
#private;
|
|
19
|
+
constructor();
|
|
20
|
+
/**
|
|
21
|
+
* Reactively get all validation rule entries.
|
|
22
|
+
*/
|
|
23
|
+
rules: () => readonly ValidationRuleEntry[];
|
|
24
|
+
/**
|
|
25
|
+
* An expression to get a space separated list of error message ids.
|
|
26
|
+
*/
|
|
27
|
+
errorMessageIds: () => string;
|
|
28
|
+
/**
|
|
29
|
+
* An expression to check if this validator is in an invalid state.
|
|
30
|
+
*/
|
|
31
|
+
invalid: () => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Add a rule to be validated first until the current lifecycle is disposed.
|
|
34
|
+
*/
|
|
35
|
+
prependRule(rule: ValidationRule): void;
|
|
36
|
+
/**
|
|
37
|
+
* Add a rule to be validated last until the current lifecycle is disposed.
|
|
38
|
+
*/
|
|
39
|
+
appendRule(rule: ValidationRule): void;
|
|
40
|
+
/**
|
|
41
|
+
* Attach this validator to an object.
|
|
42
|
+
*/
|
|
43
|
+
attach(target: object): void;
|
|
44
|
+
/**
|
|
45
|
+
* Validate using the currently attached rules.
|
|
46
|
+
*/
|
|
47
|
+
validate(signal?: AbortSignal): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Trigger validation as a side effect.
|
|
50
|
+
*/
|
|
51
|
+
triggerValidation(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Reset this validator to it's initial state.
|
|
54
|
+
*/
|
|
55
|
+
reset(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Get or attach a validator to an object.
|
|
58
|
+
*/
|
|
59
|
+
static attach(target: object): Validator;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get the validator attached to the specified target.
|
|
63
|
+
*/
|
|
64
|
+
export declare function validatorFor(target: object): Validator | undefined;
|
|
65
|
+
export interface ValidationRule {
|
|
66
|
+
validate(signal?: AbortSignal): boolean | Promise<boolean>;
|
|
67
|
+
message: unknown;
|
|
68
|
+
}
|
|
69
|
+
export declare class ValidationRuleEntry {
|
|
70
|
+
readonly id: string;
|
|
71
|
+
readonly visible: Signal<boolean>;
|
|
72
|
+
readonly alert: Emitter<[]>;
|
|
73
|
+
readonly message: unknown;
|
|
74
|
+
readonly validate: ValidationRule["validate"];
|
|
75
|
+
readonly updated: TriggerPipe;
|
|
76
|
+
constructor(rule: ValidationRule, updated: TriggerPipe);
|
|
77
|
+
}
|
|
78
|
+
export interface ValidateFn<T> {
|
|
79
|
+
(value: T, signal?: AbortSignal): boolean | Promise<boolean>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Prepend a validation rule to the validator attached to the specified signal.
|
|
83
|
+
*
|
|
84
|
+
* This is a shorthand, meant to be used with `signal.pipe`.
|
|
85
|
+
*
|
|
86
|
+
* @param target The signal to attach the validator to.
|
|
87
|
+
* @param validate A function to validate the current value. Immediately accessed signals may trigger re-validation when updated.
|
|
88
|
+
* @param message The validation message to show when invalid.
|
|
89
|
+
* @returns The target itself.
|
|
90
|
+
*/
|
|
91
|
+
export declare function rule<T>(target: Signal<T>, validate: ValidateFn<T>, message: unknown): Signal<T>;
|
|
92
|
+
/**
|
|
93
|
+
* Validate all specified targets in parallel.
|
|
94
|
+
*/
|
|
95
|
+
export declare function validate(...targets: object[]): Promise<boolean>;
|
|
96
|
+
export declare function ValidationMessage(props: {
|
|
97
|
+
visible?: Expression<boolean | undefined>;
|
|
98
|
+
alert?: Event<[]>;
|
|
99
|
+
class?: ClassValue;
|
|
100
|
+
style?: StyleValue;
|
|
101
|
+
id?: Expression<string | undefined>;
|
|
102
|
+
children?: unknown;
|
|
103
|
+
}): unknown;
|
|
104
|
+
/**
|
|
105
|
+
* Render validation messages for the validator attached to a specific target.
|
|
106
|
+
*/
|
|
107
|
+
export declare function ValidationMessages(props: {
|
|
108
|
+
for: object;
|
|
109
|
+
}): unknown;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import { Emitter, extract, For, map, sig, teardown, trigger, uniqueId, untrack } from "rvx";
|
|
3
|
+
import { TaskSlot } from "rvx/async";
|
|
4
|
+
import { THEME } from "../common/theme.js";
|
|
5
|
+
import { Collapse } from "./collapse.js";
|
|
6
|
+
import { Text } from "./text.js";
|
|
7
|
+
const VALIDATORS = new WeakMap();
|
|
8
|
+
export const VALIDATION = Symbol.for("rvx-ui:validation");
|
|
9
|
+
export class Validator {
|
|
10
|
+
#slot = new TaskSlot();
|
|
11
|
+
#signalTrigger;
|
|
12
|
+
#rules = sig([]);
|
|
13
|
+
#invalid = sig(false);
|
|
14
|
+
#cycle = 0;
|
|
15
|
+
constructor() {
|
|
16
|
+
const options = extract(VALIDATION);
|
|
17
|
+
this.#signalTrigger = options?.signalTrigger ?? "if-validated";
|
|
18
|
+
}
|
|
19
|
+
rules = () => this.#rules.value;
|
|
20
|
+
errorMessageIds = () => this.#rules.value.map(r => r.id).join(" ");
|
|
21
|
+
invalid = () => this.#invalid.value;
|
|
22
|
+
#addRule(rule, add) {
|
|
23
|
+
const entry = new ValidationRuleEntry(rule, trigger(this.#ruleUpdated));
|
|
24
|
+
this.#rules.update(rules => {
|
|
25
|
+
add(rules, entry);
|
|
26
|
+
});
|
|
27
|
+
teardown(() => {
|
|
28
|
+
this.#rules.update(rules => {
|
|
29
|
+
const index = rules.indexOf(entry);
|
|
30
|
+
if (index < 0) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
rules.splice(index, 1);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
#ruleUpdated = () => {
|
|
38
|
+
const signalTrigger = this.#signalTrigger;
|
|
39
|
+
if (signalTrigger === "never" || (signalTrigger === "if-invalid" && !this.#invalid.value)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.triggerValidation();
|
|
43
|
+
};
|
|
44
|
+
prependRule(rule) {
|
|
45
|
+
this.#addRule(rule, (rules, entry) => rules.unshift(entry));
|
|
46
|
+
}
|
|
47
|
+
appendRule(rule) {
|
|
48
|
+
this.#addRule(rule, (rules, entry) => rules.push(entry));
|
|
49
|
+
}
|
|
50
|
+
attach(target) {
|
|
51
|
+
VALIDATORS.set(target, this);
|
|
52
|
+
}
|
|
53
|
+
async #validate(sideEffect, signal) {
|
|
54
|
+
this.#cycle++;
|
|
55
|
+
const rules = untrack(() => this.#rules.value);
|
|
56
|
+
for (let i = 0; i < rules.length; i++) {
|
|
57
|
+
if (signal?.aborted) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
const { validate, visible, alert, updated } = rules[i];
|
|
61
|
+
const valid = await updated(() => validate(signal));
|
|
62
|
+
if (valid) {
|
|
63
|
+
visible.value = false;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const wasVisible = visible.value;
|
|
67
|
+
visible.value = true;
|
|
68
|
+
for (let r = i + 1; r < rules.length; r++) {
|
|
69
|
+
rules[r].visible.value = false;
|
|
70
|
+
}
|
|
71
|
+
this.#invalid.value = true;
|
|
72
|
+
if (wasVisible && !sideEffect) {
|
|
73
|
+
alert.emit();
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
this.#invalid.value = false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
async validate(signal) {
|
|
82
|
+
return this.#slot.block(() => this.#validate(false, signal));
|
|
83
|
+
}
|
|
84
|
+
triggerValidation() {
|
|
85
|
+
this.#slot.sideEffect(signal => this.#validate(true, signal));
|
|
86
|
+
}
|
|
87
|
+
reset() {
|
|
88
|
+
this.#cycle++;
|
|
89
|
+
this.#invalid.value = false;
|
|
90
|
+
const rules = untrack(() => this.#rules.value);
|
|
91
|
+
for (let i = 0; i < rules.length; i++) {
|
|
92
|
+
rules[i].visible.value = false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
static attach(target) {
|
|
96
|
+
let validator = VALIDATORS.get(target);
|
|
97
|
+
if (!validator) {
|
|
98
|
+
validator = new Validator();
|
|
99
|
+
VALIDATORS.set(target, validator);
|
|
100
|
+
}
|
|
101
|
+
return validator;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export function validatorFor(target) {
|
|
105
|
+
return VALIDATORS.get(target);
|
|
106
|
+
}
|
|
107
|
+
export class ValidationRuleEntry {
|
|
108
|
+
id = uniqueId();
|
|
109
|
+
visible = sig(false);
|
|
110
|
+
alert = new Emitter();
|
|
111
|
+
message;
|
|
112
|
+
validate;
|
|
113
|
+
updated;
|
|
114
|
+
constructor(rule, updated) {
|
|
115
|
+
this.message = rule.message;
|
|
116
|
+
this.validate = rule.validate.bind(rule);
|
|
117
|
+
this.updated = updated;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export function rule(target, validate, message) {
|
|
121
|
+
Validator.attach(target).prependRule({
|
|
122
|
+
validate(signal) {
|
|
123
|
+
return validate(target.value, signal);
|
|
124
|
+
},
|
|
125
|
+
message,
|
|
126
|
+
});
|
|
127
|
+
return target;
|
|
128
|
+
}
|
|
129
|
+
export async function validate(...targets) {
|
|
130
|
+
const tasks = [];
|
|
131
|
+
for (const target of targets) {
|
|
132
|
+
const validator = validatorFor(target);
|
|
133
|
+
if (validator === undefined) {
|
|
134
|
+
throw new Error("target has no attached validator.");
|
|
135
|
+
}
|
|
136
|
+
tasks.push(validator.validate());
|
|
137
|
+
}
|
|
138
|
+
return !(await Promise.all(tasks)).includes(false);
|
|
139
|
+
}
|
|
140
|
+
export function ValidationMessage(props) {
|
|
141
|
+
const theme = extract(THEME);
|
|
142
|
+
return _jsx(Collapse, { visible: map(props.visible, v => v ?? true), alert: props.alert, class: [
|
|
143
|
+
props.class,
|
|
144
|
+
theme?.validation_message_container,
|
|
145
|
+
], style: props.style, id: props.id, children: _jsx("div", { class: theme?.validation_message, children: _jsx(Text, { children: props.children }) }) });
|
|
146
|
+
}
|
|
147
|
+
export function ValidationMessages(props) {
|
|
148
|
+
const validator = Validator.attach(props.for);
|
|
149
|
+
return _jsx(For, { each: validator.rules, children: rule => _jsx(ValidationMessage, { visible: rule.visible, alert: rule.alert.event, id: rule.id, children: rule.message }) });
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/components/validation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,OAAO,EAAqB,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAsB,QAAQ,EAAE,OAAO,EAAe,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACxK,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,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,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAkC,CAAC;AAe3F,MAAM,OAAO,SAAS;IACrB,KAAK,GAAG,IAAI,QAAQ,EAAE,CAAC;IACvB,cAAc,CAA0B;IACxC,MAAM,GAAG,GAAG,CAAwB,EAAE,CAAC,CAAC;IACxC,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,GAAG,CAAC,CAAC;IAEX;QACC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,cAAc,GAAG,OAAO,EAAE,aAAa,IAAI,cAAc,CAAC;IAChE,C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ACrF,IAAI,CAAC,OAAO,GACM,GACf,CAAC;AACR,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import { extract } from "rvx";
|
|
3
|
+
import { THEME } from "../common/theme.js";
|
|
4
|
+
export function Value(props) {
|
|
5
|
+
const theme = extract(THEME);
|
|
6
|
+
return _jsx("span", { class: [
|
|
7
|
+
theme?.value,
|
|
8
|
+
props.class,
|
|
9
|
+
], style: props.style, id: props.id, children: props.children });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../src/components/value.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,OAAO,EAAc,MAAM,KAAK,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,UAAU,KAAK,CAAC,KAKrB;IACA,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,eACN,KAAK,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,KAAK,CAAC,KAAK;SACX,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,EAAE,EAAE,KAAK,CAAC,EAAE,YAEX,KAAK,CAAC,QAAQ,GACT,CAAC;AACT,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from "./common/events.js";
|
|
2
|
+
export * from "./common/parsers.js";
|
|
3
|
+
export * from "./common/theme.js";
|
|
4
|
+
export * from "./common/trim.js";
|
|
5
|
+
export * from "./common/types.js";
|
|
6
|
+
export * from "./common/writing-mode.js";
|
|
7
|
+
export * from "./components/button.js";
|
|
8
|
+
export * from "./components/checkbox.js";
|
|
9
|
+
export * from "./components/collapse.js";
|
|
10
|
+
export * from "./components/column.js";
|
|
11
|
+
export * from "./components/control-group.js";
|
|
12
|
+
export * from "./components/dialog.js";
|
|
13
|
+
export * from "./components/dropdown.js";
|
|
14
|
+
export * from "./components/dropdown-input.js";
|
|
15
|
+
export * from "./components/flex-space.js";
|
|
16
|
+
export * from "./components/heading.js";
|
|
17
|
+
export * from "./components/label.js";
|
|
18
|
+
export * from "./components/layer.js";
|
|
19
|
+
export * from "./components/link.js";
|
|
20
|
+
export * from "./components/page.js";
|
|
21
|
+
export * from "./components/popout.js";
|
|
22
|
+
export * from "./components/popover.js";
|
|
23
|
+
export * from "./components/radio-buttons.js";
|
|
24
|
+
export * from "./components/row.js";
|
|
25
|
+
export * from "./components/scroll-view.js";
|
|
26
|
+
export * from "./components/text.js";
|
|
27
|
+
export * from "./components/text-input.js";
|
|
28
|
+
export * from "./components/validation.js";
|
|
29
|
+
export * from "./components/value.js";
|