@rvx/ui 0.3.8 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/events.d.ts +0 -40
- package/dist/common/events.d.ts.map +1 -1
- package/dist/common/theme.d.ts +3 -134
- package/dist/common/theme.d.ts.map +1 -1
- package/dist/common/theme.js +25 -2
- package/dist/common/theme.js.map +1 -1
- package/dist/common/writing-mode.d.ts +0 -58
- package/dist/common/writing-mode.d.ts.map +1 -1
- package/dist/components/breadcrumbs.d.ts.map +1 -1
- package/dist/components/breadcrumbs.js +3 -4
- package/dist/components/breadcrumbs.js.map +1 -1
- package/dist/components/button.d.ts +0 -18
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +3 -4
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +1 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +4 -5
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +4 -5
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapse.d.ts.map +1 -1
- package/dist/components/collapse.js +7 -10
- package/dist/components/collapse.js.map +1 -1
- package/dist/components/column.d.ts +0 -6
- package/dist/components/column.d.ts.map +1 -1
- package/dist/components/column.js +4 -5
- package/dist/components/column.js.map +1 -1
- package/dist/components/control-group.d.ts.map +1 -1
- package/dist/components/control-group.js +3 -4
- package/dist/components/control-group.js.map +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +14 -10
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown-input.d.ts +1 -1
- package/dist/components/dropdown-input.d.ts.map +1 -1
- package/dist/components/dropdown.d.ts +0 -88
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown.js +7 -8
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/error.d.ts.map +1 -1
- package/dist/components/error.js +2 -3
- package/dist/components/error.js.map +1 -1
- package/dist/components/flex-space.d.ts.map +1 -1
- package/dist/components/flex-space.js +3 -4
- package/dist/components/flex-space.js.map +1 -1
- package/dist/components/heading.d.ts +0 -3
- package/dist/components/heading.d.ts.map +1 -1
- package/dist/components/heading.js +2 -3
- package/dist/components/heading.js.map +1 -1
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +2 -3
- package/dist/components/label.js.map +1 -1
- package/dist/components/layer.d.ts +0 -63
- package/dist/components/layer.d.ts.map +1 -1
- package/dist/components/link.d.ts +0 -33
- package/dist/components/link.d.ts.map +1 -1
- package/dist/components/link.js +2 -3
- package/dist/components/link.js.map +1 -1
- package/dist/components/nav-list.d.ts +0 -8
- package/dist/components/nav-list.d.ts.map +1 -1
- package/dist/components/nav-list.js +4 -6
- package/dist/components/nav-list.js.map +1 -1
- package/dist/components/notifications.d.ts +4 -1
- package/dist/components/notifications.d.ts.map +1 -1
- package/dist/components/notifications.js +5 -11
- package/dist/components/notifications.js.map +1 -1
- package/dist/components/page.d.ts.map +1 -1
- package/dist/components/page.js +4 -5
- package/dist/components/page.js.map +1 -1
- package/dist/components/placeholder.d.ts.map +1 -1
- package/dist/components/placeholder.js +3 -4
- package/dist/components/placeholder.js.map +1 -1
- package/dist/components/popout.d.ts +0 -96
- package/dist/components/popout.d.ts.map +1 -1
- package/dist/components/popover.d.ts +0 -88
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +9 -9
- package/dist/components/popover.js.map +1 -1
- package/dist/components/radio-buttons.d.ts.map +1 -1
- package/dist/components/radio-buttons.js +4 -5
- package/dist/components/radio-buttons.js.map +1 -1
- package/dist/components/row.d.ts.map +1 -1
- package/dist/components/row.js +4 -5
- package/dist/components/row.js.map +1 -1
- package/dist/components/scroll-view.d.ts.map +1 -1
- package/dist/components/scroll-view.js +8 -9
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/secondary.d.ts.map +1 -1
- package/dist/components/secondary.js +2 -3
- package/dist/components/secondary.js.map +1 -1
- package/dist/components/separated.d.ts.map +1 -1
- package/dist/components/separated.js +2 -3
- package/dist/components/separated.js.map +1 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +2 -3
- package/dist/components/slider.js.map +1 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +8 -9
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text-input.d.ts +0 -31
- package/dist/components/text-input.d.ts.map +1 -1
- package/dist/components/text-input.js +2 -3
- package/dist/components/text-input.js.map +1 -1
- package/dist/components/text.d.ts.map +1 -1
- package/dist/components/text.js +2 -3
- package/dist/components/text.js.map +1 -1
- package/dist/components/validation-rules.d.ts +0 -2
- package/dist/components/validation-rules.d.ts.map +1 -1
- package/dist/components/validation.d.ts +0 -49
- package/dist/components/validation.d.ts.map +1 -1
- package/dist/components/value.d.ts.map +1 -1
- package/dist/components/value.js +2 -3
- package/dist/components/value.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -7
- package/src/common/theme.tsx +28 -163
- package/src/components/breadcrumbs.tsx +4 -5
- package/src/components/button.tsx +3 -4
- package/src/components/card.tsx +5 -6
- package/src/components/checkbox.tsx +5 -7
- package/src/components/collapse.tsx +9 -13
- package/src/components/column.tsx +4 -5
- package/src/components/control-group.tsx +3 -4
- package/src/components/dialog.tsx +14 -11
- package/src/components/dropdown-input.tsx +1 -1
- package/src/components/dropdown.tsx +7 -8
- package/src/components/error.tsx +2 -3
- package/src/components/flex-space.tsx +3 -4
- package/src/components/heading.tsx +2 -3
- package/src/components/label.tsx +2 -3
- package/src/components/link.tsx +2 -3
- package/src/components/nav-list.tsx +4 -6
- package/src/components/notifications.tsx +15 -17
- package/src/components/page.tsx +6 -7
- package/src/components/placeholder.tsx +5 -6
- package/src/components/popover.tsx +10 -10
- package/src/components/radio-buttons.tsx +6 -7
- package/src/components/row.tsx +4 -5
- package/src/components/scroll-view.tsx +8 -9
- package/src/components/secondary.tsx +2 -3
- package/src/components/separated.tsx +2 -3
- package/src/components/slider.tsx +2 -5
- package/src/components/tabs.tsx +8 -9
- package/src/components/text-input.tsx +2 -3
- package/src/components/text.tsx +2 -3
- package/src/components/value.tsx +2 -3
- package/src/index.tsx +2 -0
- package/src/types.d.ts +5 -0
- package/{src/theme/components/breadcrumbs.scss → theme/components/breadcrumbs.module.css} +12 -12
- package/theme/components/button.module.css +168 -0
- package/theme/components/card.module.css +50 -0
- package/{src/theme/components/checkbox.scss → theme/components/checkbox.module.css} +5 -5
- package/{src/theme/components/collapse.scss → theme/components/collapse.module.css} +19 -19
- package/{src/theme/components/column.scss → theme/components/column.module.css} +32 -10
- package/{src/theme/components/control-group.scss → theme/components/control-group.module.css} +2 -2
- package/theme/components/dialog.module.css +63 -0
- package/{src/theme/components/dropdown.scss → theme/components/dropdown.module.css} +9 -9
- package/theme/components/error.module.css +4 -0
- package/{src/theme/components/heading.scss → theme/components/heading.module.css} +8 -8
- package/{src/theme/components/label.scss → theme/components/label.module.css} +2 -10
- package/{src/theme/components/link.scss → theme/components/link.module.css} +0 -1
- package/theme/components/nav-list.module.css +76 -0
- package/theme/components/notifications.module.css +31 -0
- package/{src/theme/components/page.scss → theme/components/page.module.css} +6 -10
- package/{src/theme/components/placeholder.scss → theme/components/placeholder.module.css} +3 -3
- package/{src/theme/components/popover.scss → theme/components/popover.module.css} +9 -9
- package/theme/components/row.module.css +36 -0
- package/{src/theme/components/scroll-view.scss → theme/components/scroll-view.module.css} +19 -21
- package/theme/components/secondary.module.css +4 -0
- package/{src/theme/components/separated.scss → theme/components/separated.module.css} +2 -2
- package/{src/theme/components/slider.scss → theme/components/slider.module.css} +2 -1
- package/theme/components/tabs.module.css +71 -0
- package/theme/components/text-input.module.css +45 -0
- package/theme/global.css +118 -0
- package/dist/common/theme-test.d.ts +0 -8
- package/dist/common/theme-test.d.ts.map +0 -1
- package/dist/common/theme-test.js +0 -13
- package/dist/common/theme-test.js.map +0 -1
- package/dist/components/checkbox-test.d.ts +0 -4
- package/dist/components/checkbox-test.d.ts.map +0 -1
- package/dist/components/checkbox-test.js +0 -31
- package/dist/components/checkbox-test.js.map +0 -1
- package/dist/components/collapse-test.d.ts +0 -9
- package/dist/components/collapse-test.d.ts.map +0 -1
- package/dist/components/collapse-test.js +0 -15
- package/dist/components/collapse-test.js.map +0 -1
- package/dist/test.d.ts +0 -4
- package/dist/test.d.ts.map +0 -1
- package/dist/test.js +0 -4
- package/dist/test.js.map +0 -1
- package/dist/theme.module.css +0 -1290
- package/dist/theme.module.css.map +0 -1
- package/src/common/theme-test.tsx +0 -18
- package/src/components/checkbox-test.tsx +0 -35
- package/src/components/collapse-test.tsx +0 -23
- package/src/test.tsx +0 -3
- package/src/theme/base.scss +0 -121
- package/src/theme/common.scss +0 -42
- package/src/theme/components/button.scss +0 -164
- package/src/theme/components/card.scss +0 -41
- package/src/theme/components/dialog.scss +0 -65
- package/src/theme/components/error.scss +0 -12
- package/src/theme/components/nav-list.scss +0 -91
- package/src/theme/components/notifications.scss +0 -61
- package/src/theme/components/row.scss +0 -22
- package/src/theme/components/secondary.scss +0 -4
- package/src/theme/components/tabs.scss +0 -90
- package/src/theme/components/text-input.scss +0 -50
- package/src/theme/theme.scss +0 -31
- /package/{src/theme/components/flex-space.scss → theme/components/flex-space.module.css} +0 -0
- /package/{src/theme/components/radio-buttons.scss → theme/components/radio-buttons.module.css} +0 -0
- /package/{src/theme/components/text.scss → theme/components/text.module.css} +0 -0
- /package/{src/theme/components/value.scss → theme/components/value.module.css} +0 -0
|
@@ -8,49 +8,15 @@ export interface PopoverContent {
|
|
|
8
8
|
popout: Popout;
|
|
9
9
|
}): unknown;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Create a popover that is initially hidden.
|
|
13
|
-
*/
|
|
14
11
|
export declare function createPopover(props: {
|
|
15
|
-
/**
|
|
16
|
-
* Defines the direction in which the popover is placed in relation to the anchor.
|
|
17
|
-
*
|
|
18
|
-
* This expression is only evaluated when calculating the popover placement.
|
|
19
|
-
*
|
|
20
|
-
* See {@link PopoutPlacement}
|
|
21
|
-
*
|
|
22
|
-
* @default "block"
|
|
23
|
-
*/
|
|
24
12
|
placement?: Expression<PopoutPlacement | undefined>;
|
|
25
|
-
/**
|
|
26
|
-
* Defines which side of the anchor and popover are aligned orthogonally to the placement axis.
|
|
27
|
-
*
|
|
28
|
-
* This expression is only evaluated when calculating the popover placement.
|
|
29
|
-
*
|
|
30
|
-
* See {@link PopoutAlignment}
|
|
31
|
-
*
|
|
32
|
-
* @default "center"
|
|
33
|
-
*/
|
|
34
13
|
alignment?: Expression<PopoutAlignment | undefined>;
|
|
35
|
-
/**
|
|
36
|
-
* The content component.
|
|
37
|
-
*/
|
|
38
14
|
content: PopoverContent;
|
|
39
15
|
inlineSize?: Expression<string | null>;
|
|
40
16
|
maxInlineSize?: Expression<string | null>;
|
|
41
17
|
blockSize?: Expression<string | null>;
|
|
42
18
|
maxBlockSize?: Expression<string | null>;
|
|
43
|
-
/**
|
|
44
|
-
* An array of event names that cause the popover to hide automatically when dispatched outside of the current layer stack or the anchor.
|
|
45
|
-
*
|
|
46
|
-
* @default ["resize", "scroll", "mousedown", "touchstart", "focusin", "rvx-ui:passive-action"]
|
|
47
|
-
*/
|
|
48
19
|
foreignEvents?: string[];
|
|
49
|
-
/**
|
|
50
|
-
* The content role.
|
|
51
|
-
*
|
|
52
|
-
* @default "dialog"
|
|
53
|
-
*/
|
|
54
20
|
role?: PopoverRole;
|
|
55
21
|
id?: string;
|
|
56
22
|
class?: ClassValue;
|
|
@@ -67,77 +33,23 @@ export interface PopoverAnchorProps {
|
|
|
67
33
|
"aria-labelledby"?: Expression<string | undefined>;
|
|
68
34
|
}
|
|
69
35
|
export declare function Popover(props: {
|
|
70
|
-
/**
|
|
71
|
-
* A function to immediately render the anchor.
|
|
72
|
-
*/
|
|
73
36
|
anchor: (props: PopoverAnchorProps) => unknown;
|
|
74
37
|
anchorRect?: Expression<View | undefined>;
|
|
75
|
-
/**
|
|
76
|
-
* The anchor id.
|
|
77
|
-
*
|
|
78
|
-
* By default, a unique id is generated and linked to the attached popover.
|
|
79
|
-
*/
|
|
80
38
|
id?: Expression<string | undefined>;
|
|
81
|
-
/** Class for the popover. */
|
|
82
39
|
class?: ClassValue;
|
|
83
|
-
/** Style for the popover. */
|
|
84
40
|
style?: StyleValue;
|
|
85
41
|
raw?: Expression<boolean | undefined>;
|
|
86
|
-
/** The popover content component. */
|
|
87
42
|
children: PopoverContent;
|
|
88
43
|
inlineSize?: Expression<string | null>;
|
|
89
44
|
maxInlineSize?: Expression<string | null>;
|
|
90
45
|
blockSize?: Expression<string | null>;
|
|
91
46
|
maxBlockSize?: Expression<string | null>;
|
|
92
|
-
/**
|
|
93
|
-
* Defines the direction in which the popover is placed in relation to the anchor.
|
|
94
|
-
*
|
|
95
|
-
* This expression is only evaluated when calculating the popover placement.
|
|
96
|
-
*
|
|
97
|
-
* See {@link PopoutPlacement}^
|
|
98
|
-
*
|
|
99
|
-
* @default "block"
|
|
100
|
-
*/
|
|
101
47
|
placement?: Expression<PopoutPlacement | undefined>;
|
|
102
|
-
/**
|
|
103
|
-
* Defines which side of the anchor and popover are aligned orthogonally to the placement axis.
|
|
104
|
-
*
|
|
105
|
-
* This expression is only evaluated when calculating the popover placement.
|
|
106
|
-
*
|
|
107
|
-
* See {@link PopoutAlignment}
|
|
108
|
-
*
|
|
109
|
-
* @default "center"
|
|
110
|
-
*/
|
|
111
48
|
alignment?: Expression<PopoutAlignment | undefined>;
|
|
112
|
-
/**
|
|
113
|
-
* An array of event names that cause the popover to hide automatically when dispatched outside of the current layer stack or the anchor.
|
|
114
|
-
*
|
|
115
|
-
* @default ["resize", "scroll", "mousedown", "touchstart", "focusin", "rvx-ui:passive-action"]
|
|
116
|
-
*/
|
|
117
49
|
foreignEvents?: string[];
|
|
118
|
-
/**
|
|
119
|
-
* The popover role.
|
|
120
|
-
*
|
|
121
|
-
* @default "dialog"
|
|
122
|
-
*/
|
|
123
50
|
role?: PopoverRole;
|
|
124
|
-
/**
|
|
125
|
-
* The anchor and popover label.
|
|
126
|
-
*
|
|
127
|
-
* By default, the anchor itself is used a label for the popover.
|
|
128
|
-
*/
|
|
129
51
|
"aria-label"?: Expression<string | undefined>;
|
|
130
|
-
/**
|
|
131
|
-
* The anchor and popover label id.
|
|
132
|
-
*
|
|
133
|
-
* By default, the anchor itself is used a label for the popover.
|
|
134
|
-
*/
|
|
135
52
|
"aria-labelledby"?: Expression<string | undefined>;
|
|
136
|
-
/**
|
|
137
|
-
* An optional popover description id.
|
|
138
|
-
*
|
|
139
|
-
* If the popover contains a description, this should be set to it's id.
|
|
140
|
-
*/
|
|
141
53
|
"aria-describedby"?: Expression<string | undefined>;
|
|
142
54
|
}): unknown;
|
|
143
55
|
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAK,UAAU,EAAE,UAAU,EAA4B,UAAU,EAAiB,IAAI,EAAgB,MAAM,KAAK,CAAC;AACzH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC9B,CAAC,KAAK,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC;CACZ;AAKD,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAUp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/popover.module.css";
|
|
2
4
|
import { $, get, Inject, map, render, SVG, uniqueId, watch, XMLNS } from "rvx";
|
|
3
|
-
import { THEME } from "../common/theme.js";
|
|
4
5
|
import { DOWN, getSize, getXY, LEFT, RIGHT, UP } from "../common/writing-mode.js";
|
|
5
6
|
import { LAYER } from "./layer.js";
|
|
6
7
|
import { Popout } from "./popout.js";
|
|
@@ -9,7 +10,6 @@ export function createPopover(props) {
|
|
|
9
10
|
placement: map(props.placement, v => v ?? "block"),
|
|
10
11
|
alignment: map(props.alignment, v => v ?? "center"),
|
|
11
12
|
content: ({ popout, onPlacement, placement, setSizeReference }) => {
|
|
12
|
-
const theme = THEME.current;
|
|
13
13
|
const layer = LAYER.current;
|
|
14
14
|
const spikeTransform = $("");
|
|
15
15
|
layer.useHotkey("escape", () => {
|
|
@@ -40,18 +40,18 @@ export function createPopover(props) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
const spikeArea = _jsx("div", { class:
|
|
43
|
+
const spikeArea = _jsx("div", { class: styles.spike_area, children: _jsx("div", { class: styles.spike, style: { transform: spikeTransform }, children: _jsx(Inject, { context: XMLNS, value: SVG, children: () => {
|
|
44
44
|
return _jsx("svg", { viewBox: "0 0 16 16", preserveAspectRatio: "none", children: _jsx("path", { d: "M0,16 L8,0 L16,16 Z" }) });
|
|
45
45
|
} }) }) });
|
|
46
46
|
const content = _jsx("div", { class: [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
map(props.raw, raw => raw ?
|
|
47
|
+
columnStyles.column,
|
|
48
|
+
columnStyles.content,
|
|
49
|
+
styles.content,
|
|
50
|
+
map(props.raw, raw => raw ? styles.raw : undefined),
|
|
51
51
|
], children: props.content({ popout }) });
|
|
52
52
|
setSizeReference(content);
|
|
53
53
|
const root = _jsxs("div", { tabindex: "-1", role: map(props.role, v => v ?? "dialog"), id: props.id, class: [
|
|
54
|
-
|
|
54
|
+
styles.popover,
|
|
55
55
|
props.class,
|
|
56
56
|
], style: [
|
|
57
57
|
props.style,
|
|
@@ -61,7 +61,7 @@ export function createPopover(props) {
|
|
|
61
61
|
"block-size": props.blockSize,
|
|
62
62
|
"max-block-size": props.maxBlockSize,
|
|
63
63
|
},
|
|
64
|
-
], "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], "aria-describedby": props["aria-describedby"], children: [spikeArea, _jsx("div", { class:
|
|
64
|
+
], "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], "aria-describedby": props["aria-describedby"], children: [spikeArea, _jsx("div", { class: styles.scroll_area, children: content })] });
|
|
65
65
|
layer.useAutoFocusFallback(root);
|
|
66
66
|
return root;
|
|
67
67
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAA0B,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAc,GAAG,EAAE,QAAQ,EAAQ,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAEzH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,MAAM,MAAM,6CAA6C,CAAC;AACjE,OAAO,EAAE,CAAC,EAA0B,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAc,GAAG,EAAE,QAAQ,EAAQ,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAEzH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAElF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAoC,MAAM,aAAa,CAAC;AAavE,MAAM,UAAU,a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AS;QAC1B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,GAAG,EAAE,KAAK,CAAC,GAAG;QAEd,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;QACjC,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,KAAK,SAAS;YAC/D,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;YAC5C,CAAC,CAAC,SAAS,CAAC;QACb,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,CAAC;KAC7C,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;QAClC,MAAM,EAAE,KAAK,CAAC,EAAE;YACf,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,MAAM,EAAE,KAAK,CAAC,CAAC;QACxD,CAAC;QACD,EAAE;QACF,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;QACjC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC;KAC3C,CAAC,CAAC,CAAC;IAEJ,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-buttons.d.ts","sourceRoot":"","sources":["../../src/components/radio-buttons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-buttons.d.ts","sourceRoot":"","sources":["../../src/components/radio-buttons.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAyB,UAAU,EAAY,MAAM,KAAK,CAAC;AAO1F,MAAM,WAAW,WAAW,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE;IACtC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAClC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAEtC,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAE3C,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9C,iBAAiB,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEnD,QAAQ,CAAC,EAAE,KAAK,CAAC;CACjB,GAAG,OAAO,CAuDV"}
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/radio-buttons.module.css";
|
|
2
3
|
import { For, get, map, Signal, uniqueId } from "rvx";
|
|
3
4
|
import { isPending } from "rvx/async";
|
|
4
5
|
import { optionalString, string } from "rvx/convert";
|
|
5
6
|
import { ID_PAIR } from "../common/id-pairs.js";
|
|
6
|
-
import { THEME } from "../common/theme.js";
|
|
7
7
|
import { Text } from "./text.js";
|
|
8
8
|
import { closestValidator } from "./validation.js";
|
|
9
9
|
export function RadioButtons(props) {
|
|
10
10
|
const id = props.id ?? ID_PAIR.current.consume();
|
|
11
11
|
const group = uniqueId();
|
|
12
|
-
const theme = THEME.current;
|
|
13
12
|
const disabled = props.value instanceof Signal
|
|
14
13
|
? () => isPending() || get(props.disabled)
|
|
15
14
|
: true;
|
|
16
15
|
const validator = props.value instanceof Signal ? closestValidator(props.value) : undefined;
|
|
17
16
|
return _jsx("div", { role: "radiogroup", id: props.id, class: [
|
|
18
|
-
|
|
17
|
+
styles.radio_buttons,
|
|
19
18
|
props.class,
|
|
20
19
|
], style: props.style, "aria-readonly": string(!(props.options instanceof Signal)), "aria-invalid": validator ? optionalString(validator.invalid) : undefined, "aria-errormessage": validator ? validator.messageIds : undefined, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], children: _jsx(For, { each: props.options, children: (option, index) => {
|
|
21
20
|
const id = uniqueId();
|
|
22
|
-
const input = _jsx("input", { id: id, type: "radio", class:
|
|
21
|
+
const input = _jsx("input", { id: id, type: "radio", class: styles.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": () => {
|
|
23
22
|
if (props.value instanceof Signal) {
|
|
24
23
|
props.value.value = option.value;
|
|
25
24
|
}
|
|
26
25
|
} });
|
|
27
|
-
return _jsxs("label", { for: id, class:
|
|
26
|
+
return _jsxs("label", { for: id, class: styles.radio_button_label, children: [_jsx("div", { class: styles.radio_button_padding, children: input }), _jsx(Text, { class: styles.radio_button_content, children: option.label })] });
|
|
28
27
|
} }) });
|
|
29
28
|
}
|
|
30
29
|
//# sourceMappingURL=radio-buttons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-buttons.js","sourceRoot":"","sources":["../../src/components/radio-buttons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAc,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1F,OAAO,EAAE,SAAS,EAA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AI,IAAC,KAAK,EAAE,MAAM,CAAC,oBAAoB,YACtC,MAAM,CAAC,KAAK,GACP,IACA,CAAC;YACV,CAAC,GACI,GACD,CAAC;AACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../src/components/row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../src/components/row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAY,UAAU,EAAE,MAAM,KAAK,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvD,wBAAgB,GAAG,CAAC,KAAK,EAAE;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,UAAU,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAC7C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAwBV"}
|
package/dist/components/row.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/row.module.css";
|
|
2
3
|
import { get, map } from "rvx";
|
|
3
|
-
import { THEME } from "../common/theme.js";
|
|
4
4
|
export function Row(props) {
|
|
5
|
-
const theme = THEME.current;
|
|
6
5
|
return _jsx("div", { id: props.id, class: [
|
|
7
|
-
|
|
8
|
-
() =>
|
|
9
|
-
map(props.padded, padded => padded ?
|
|
6
|
+
styles.row,
|
|
7
|
+
() => styles[get(props.size) ?? "control"],
|
|
8
|
+
map(props.padded, padded => padded ? styles.padded : undefined),
|
|
10
9
|
props.class,
|
|
11
10
|
], style: [
|
|
12
11
|
props.style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../src/components/row.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../src/components/row.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,yCAAyC,CAAC;AAC7D,OAAO,EAA0B,GAAG,EAAE,GAAG,EAAc,MAAM,KAAK,CAAC;AAKnE,MAAM,UAAU,GAAG,CAAC,KAQnB;IACA,OAAO,cACN,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EAAE;YACN,MAAM,CAAC,GAAG;YACV,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;YAC1C,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC/D,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-view.d.ts","sourceRoot":"","sources":["../../src/components/scroll-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAK,UAAU,EAAE,UAAU,EAAY,MAAM,KAAK,CAAC;AAO1D,wBAAgB,UAAU,CAAC,KAAK,EAAE;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"scroll-view.d.ts","sourceRoot":"","sources":["../../src/components/scroll-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAK,UAAU,EAAE,UAAU,EAAY,MAAM,KAAK,CAAC;AAO1D,wBAAgB,UAAU,CAAC,KAAK,EAAE;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,OAAO,CA8FV"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
2
|
import { $, teardown } from "rvx";
|
|
3
3
|
import { debounceEvent } from "../common/events.js";
|
|
4
|
-
import
|
|
4
|
+
import styles from "@rvx/ui/theme/components/scroll-view.module.css";
|
|
5
5
|
import { axisEquals, DOWN, getBlockStart, getSize, RIGHT, UP } from "../common/writing-mode.js";
|
|
6
6
|
const DEBOUNCE_DELAY = 100;
|
|
7
7
|
export function ScrollView(props) {
|
|
8
|
-
const theme = THEME.current;
|
|
9
8
|
const vertical = $(undefined);
|
|
10
9
|
const scrollbarComp = props.scrollbarComp ? $(0) : undefined;
|
|
11
10
|
const startIndicator = $(false);
|
|
12
11
|
const endIndicator = $(false);
|
|
13
|
-
const content = _jsx("div", { class:
|
|
12
|
+
const content = _jsx("div", { class: styles.content, children: props.children });
|
|
14
13
|
const updateIndicators = (blockStart = getBlockStart(getComputedStyle(area).writingMode || "horizontal-tb")) => {
|
|
15
14
|
let start;
|
|
16
15
|
let end;
|
|
@@ -32,7 +31,7 @@ export function ScrollView(props) {
|
|
|
32
31
|
};
|
|
33
32
|
const area = _jsx("div", { class: [
|
|
34
33
|
props.contentClass,
|
|
35
|
-
|
|
34
|
+
styles.area,
|
|
36
35
|
], style: [
|
|
37
36
|
props.contentStyle,
|
|
38
37
|
{
|
|
@@ -41,18 +40,18 @@ export function ScrollView(props) {
|
|
|
41
40
|
], "on:scroll": [debounceEvent(DEBOUNCE_DELAY, () => updateIndicators()), { passive: true }], tabindex: "0", children: content });
|
|
42
41
|
const root = _jsxs("div", { class: [
|
|
43
42
|
props.class,
|
|
44
|
-
|
|
43
|
+
styles.scroll_view,
|
|
45
44
|
], style: [
|
|
46
45
|
props.style,
|
|
47
46
|
{
|
|
48
47
|
"--scrollbar-comp": scrollbarComp ? (() => `${scrollbarComp.value}px`) : "initial",
|
|
49
48
|
},
|
|
50
49
|
], children: [area, _jsx("div", { class: [
|
|
51
|
-
|
|
52
|
-
() => startIndicator.value &&
|
|
50
|
+
styles.indicator_start,
|
|
51
|
+
() => startIndicator.value && styles.indicator_visible,
|
|
53
52
|
] }), _jsx("div", { class: [
|
|
54
|
-
|
|
55
|
-
() => endIndicator.value &&
|
|
53
|
+
styles.indicator_end,
|
|
54
|
+
() => endIndicator.value && styles.indicator_visible,
|
|
56
55
|
] })] });
|
|
57
56
|
const rootObserver = new ResizeObserver(debounceEvent(DEBOUNCE_DELAY, () => {
|
|
58
57
|
const blockStart = getBlockStart(getComputedStyle(root).writingMode || "horizontal-tb");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-view.js","sourceRoot":"","sources":["../../src/components/scroll-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAA0B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"scroll-view.js","sourceRoot":"","sources":["../../src/components/scroll-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAA0B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,MAAM,MAAM,iDAAiD,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAe,MAAM,2BAA2B,CAAC;AAE7G,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,UAAU,UAAU,CAAC,KAO1B;IACA,MAAM,QAAQ,GAAG,CAAC,CAAsB,SAAS,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAE9B,MAAM,OAAO,GAAG,cAAK,KAAK,EAAE,MAAM,CAAC,OAAO,YACxC,KAAK,CAAC,QAAQ,GACK,CAAC;IAEtB,MAAM,gBAAgB,GAAG,CAAC,aAAa,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,WAA0B,IAAI,eAAe,CAAC,EAAE,EAAE;QAC7H,IAAI,KAAa,CAAC;QAClB,IAAI,GAAW,CAAC;QAChB,IAAI,UAAU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AI,CAAC,qBAAqB,EAAE,CAAC;YAC9C,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACpC,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;QACvF,CAAC;QACD,QAAQ,CAAC,KAAK,KAAK,UAAU,CAAC;QAC9B,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACvC,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondary.d.ts","sourceRoot":"","sources":["../../src/components/secondary.tsx"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"secondary.d.ts","sourceRoot":"","sources":["../../src/components/secondary.tsx"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAIV"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import styles from "@rvx/ui/theme/components/secondary.module.css";
|
|
3
3
|
export function Secondary(props) {
|
|
4
|
-
|
|
5
|
-
return _jsx("span", { class: [theme?.secondary], children: props.children });
|
|
4
|
+
return _jsx("span", { class: styles.secondary, children: props.children });
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=secondary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondary.js","sourceRoot":"","sources":["../../src/components/secondary.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"secondary.js","sourceRoot":"","sources":["../../src/components/secondary.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,+CAA+C,CAAC;AAEnE,MAAM,UAAU,SAAS,CAAC,KAEzB;IACA,OAAO,eAAM,KAAK,EAAE,MAAM,CAAC,SAAS,YAClC,KAAK,CAAC,QAAQ,GACT,CAAC;AACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separated.d.ts","sourceRoot":"","sources":["../../src/components/separated.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"separated.d.ts","sourceRoot":"","sources":["../../src/components/separated.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAO,UAAU,EAAE,MAAM,KAAK,CAAC;AAE9D,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACtC,WAWA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/separated.module.css";
|
|
2
3
|
import { map } from "rvx";
|
|
3
|
-
import { THEME } from "../common/theme.js";
|
|
4
4
|
export function Separated(props) {
|
|
5
|
-
const theme = THEME.current;
|
|
6
5
|
return _jsx("div", { class: [
|
|
7
6
|
props.class,
|
|
8
|
-
map(props.row, row => row ?
|
|
7
|
+
map(props.row, row => row ? styles.row : styles.column),
|
|
9
8
|
], style: props.style, id: props.id, children: props.children });
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=separated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separated.js","sourceRoot":"","sources":["../../src/components/separated.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"separated.js","sourceRoot":"","sources":["../../src/components/separated.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,+CAA+C,CAAC;AACnE,OAAO,EAA0B,GAAG,EAAc,MAAM,KAAK,CAAC;AAE9D,MAAM,UAAU,SAAS,CAAC,KAMzB;IACA,OAAO,cACN,KAAK,EAAE;YACN,KAAK,CAAC,KAAK;YACX,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;SACvD,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,EAAE,EAAE,KAAK,CAAC,EAAE,YAEX,KAAK,CAAC,QAAQ,GACV,CAAC;AACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA+B,MAAM,KAAK,CAAC;AAG9D,wBAAgB,MAAM,CAAC,KAAK,EAAE;IAC7B,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,WA8BA;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAS9E"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/slider.module.css";
|
|
2
3
|
import { map, Show, Signal, uniqueId } from "rvx";
|
|
3
4
|
import { ID_PAIR } from "../common/id-pairs.js";
|
|
4
|
-
import { THEME } from "../common/theme.js";
|
|
5
5
|
export function Slider(props) {
|
|
6
|
-
const theme = THEME.current;
|
|
7
6
|
const markerId = uniqueId();
|
|
8
7
|
const id = props.id ?? ID_PAIR.current.consume();
|
|
9
8
|
const input = _jsx("input", { id: id, type: "range", min: map(props.min, min => min ?? 0), max: map(props.max, max => max ?? 100), step: map(props.step, step => step ?? 1), "prop:value": map(props.value, value => value ?? "0"), "on:input": () => {
|
|
@@ -11,7 +10,7 @@ export function Slider(props) {
|
|
|
11
10
|
props.value.value = Number(input.value);
|
|
12
11
|
}
|
|
13
12
|
}, list: map(props.markers, markers => markers ? markerId : undefined) });
|
|
14
|
-
return _jsxs("div", { class:
|
|
13
|
+
return _jsxs("div", { class: styles.host, children: [input, _jsx(Show, { when: props.markers, children: markers => _jsx("datalist", { id: markerId, children: markers.map(marker => _jsx("option", { value: marker })) }) }), props.children] });
|
|
15
14
|
}
|
|
16
15
|
export function sliderMarkers(min, max, step) {
|
|
17
16
|
if (min > max) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,4CAA4C,CAAC;AAChE,OAAO,EAAc,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,UAAU,MAAM,CAAC,KAQtB;IACA,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAC5B,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAEjD,MAAM,KAAK,GAAG,gBACb,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EACpC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,EACtC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,gBAC5B,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,CAAC,cACzC,GAAG,EAAE;YACd,IAAI,KAAK,CAAC,KAAK,YAAY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CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB,WA8BA;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC/B,GAAG,CAAC,EAAE,UAAU,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC/B,WAiBA"}
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
|
+
import separatedStyles from "@rvx/ui/theme/components/separated.module.css";
|
|
3
|
+
import styles from "@rvx/ui/theme/components/tabs.module.css";
|
|
2
4
|
import { $, For, get, map, Show, uniqueIdFor, watch } from "rvx";
|
|
3
5
|
import { string } from "rvx/convert";
|
|
4
|
-
import { THEME } from "../common/theme.js";
|
|
5
6
|
export function Tabs(props) {
|
|
6
7
|
const selected = props.selected ?? $(undefined);
|
|
7
8
|
const List = props.list ?? TabList;
|
|
@@ -20,15 +21,14 @@ export function selectFallbackTab(tabs, selected) {
|
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
export function TabList(props) {
|
|
23
|
-
const theme = THEME.current;
|
|
24
24
|
return _jsx("div", { role: "tablist", class: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
map(props.padded, padded => padded ?
|
|
25
|
+
styles.list,
|
|
26
|
+
separatedStyles.has_separator,
|
|
27
|
+
map(props.padded, padded => padded ? styles.list_padded : undefined),
|
|
28
28
|
props.class,
|
|
29
29
|
], style: props.style, children: _jsx(For, { each: props.tabs, children: tab => _jsx("button", { role: "tab", class: [
|
|
30
|
-
|
|
31
|
-
() => props.selected.value === tab ?
|
|
30
|
+
styles.handle,
|
|
31
|
+
() => props.selected.value === tab ? styles.handle_current : undefined,
|
|
32
32
|
], "aria-selected": string(() => props.selected.value === tab), "aria-controls": uniqueIdFor(tab), "on:click": event => {
|
|
33
33
|
event.stopImmediatePropagation();
|
|
34
34
|
event.preventDefault();
|
|
@@ -36,9 +36,8 @@ export function TabList(props) {
|
|
|
36
36
|
}, children: tab.label() }) }) });
|
|
37
37
|
}
|
|
38
38
|
export function TabPanel(props) {
|
|
39
|
-
const theme = THEME.current;
|
|
40
39
|
return _jsx(Show, { when: props.tab, children: tab => _jsx("div", { role: "tabpanel", id: uniqueIdFor(tab), class: [
|
|
41
|
-
|
|
40
|
+
styles.panel,
|
|
42
41
|
props.class,
|
|
43
42
|
], style: props.style, children: props.content
|
|
44
43
|
? props.content(tab.content)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAqC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAsB,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACxH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,MAAM,+CAA+C,CAAC;AAC5E,OAAO,MAAM,MAAM,0CAA0C,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAqC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAsB,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACxH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAOrC,MAAM,UAAU,IAAI,CAAC,KAQpB;IACA,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;IAChD,MAAM,IAAI,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AAC,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;iBACtE,mBACc,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,KAAK,GAAG,CAAC,mBAC1C,WAAW,CAAC,GAAG,CAAC,cACrB,KAAK,CAAC,EAAE;oBACjB,KAAK,CAAC,wBAAwB,EAAE,CAAC;oBACjC,KAAK,CAAC,cAAc,EAAE,CAAC;oBACvB,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC;gBAC5B,CAAC,YAEA,GAAG,CAAC,KAAK,EAAE,GACJ,GACJ,GACD,CAAC;AACR,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAKxB;IACA,OAAO,KAAC,IAAI,IAAC,IAAI,EAAE,KAAK,CAAC,GAAG,YAC1B,GAAG,CAAC,EAAE,CAAC,cACP,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,WAAW,CAAC,GAAG,CAAC,EACpB,KAAK,EAAE;gBACN,MAAM,CAAC,KAAK;gBACZ,KAAK,CAAC,KAAK;aACX,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,YAEjB,KAAK,CAAC,OAAO;gBACb,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;gBAC5B,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAEX,GACA,CAAC;AACT,CAAC"}
|
|
@@ -2,45 +2,14 @@ import { ClassValue, Expression, StyleValue } from "rvx";
|
|
|
2
2
|
export type TextInputType = "text" | "password";
|
|
3
3
|
export type TextAreaWrap = "hard" | "soft";
|
|
4
4
|
export declare function TextInput(props: ({
|
|
5
|
-
/**
|
|
6
|
-
* If true, this component is rendered as a `<textarea>` element.
|
|
7
|
-
*/
|
|
8
5
|
multiline?: false;
|
|
9
|
-
/**
|
|
10
|
-
* The input type.
|
|
11
|
-
*
|
|
12
|
-
* @default "text"
|
|
13
|
-
*/
|
|
14
6
|
type?: Expression<TextInputType | undefined>;
|
|
15
7
|
} | {
|
|
16
|
-
/**
|
|
17
|
-
* If true, this component is rendered as a `<textarea>` element.
|
|
18
|
-
*/
|
|
19
8
|
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
9
|
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
10
|
wrap?: Expression<TextAreaWrap | undefined>;
|
|
32
11
|
}) & {
|
|
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
12
|
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
13
|
value: Expression<string>;
|
|
45
14
|
class?: ClassValue;
|
|
46
15
|
style?: StyleValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/components/text-input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/components/text-input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAe,UAAU,EAAE,MAAM,KAAK,CAAC;AAMtE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,CAAC;AAChD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,wBAAgB,SAAS,CAAC,KAAK,EAAE,CAAC;IAIjC,SAAS,CAAC,EAAE,KAAK,CAAC;IAOlB,IAAI,CAAC,EAAE,UAAU,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC7C,GAAG;IAIH,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAOtC,IAAI,CAAC,EAAE,UAAU,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;CAC5C,CAAC,GAAG;IAMJ,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAO3C,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAE1B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC7C,YAAY,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9C,iBAAiB,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD,GAAG,OAAO,CAqCV"}
|