@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
package/dist/common/events.d.ts
CHANGED
|
@@ -7,15 +7,7 @@ export interface Key {
|
|
|
7
7
|
ctrl?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare function isKey(event: KeyboardEvent, key: string | Key): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* A function to run an optionally async user action.
|
|
12
|
-
*
|
|
13
|
-
* Returning false indicates, that no action has been performed and that another action or the browser default behavior can be run.
|
|
14
|
-
*/
|
|
15
10
|
export type Action<T extends unknown[] = [], E = Event> = (event: E, ...args: T) => void | boolean | Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Call an action that was triggered by the specified event.
|
|
18
|
-
*/
|
|
19
11
|
export declare function handleActionEvent<T extends unknown[], E extends Event = Event>(event: E, action: Action<T, E>, ...args: T): boolean;
|
|
20
12
|
export declare function handleKeyActionEvent<T extends unknown[]>(event: KeyboardEvent, key: string | Key, action: Action<T, KeyboardEvent>, ...args: T): boolean;
|
|
21
13
|
export declare function WithAction(props: {
|
|
@@ -23,40 +15,8 @@ export declare function WithAction(props: {
|
|
|
23
15
|
action: Action<[], KeyboardEvent>;
|
|
24
16
|
key?: Expression<string | Key | undefined>;
|
|
25
17
|
}): unknown;
|
|
26
|
-
/**
|
|
27
|
-
* Run an action of the event target is hovered for a minimum duration.
|
|
28
|
-
*
|
|
29
|
-
* @param event The "mouseenter" event.
|
|
30
|
-
* @param action The action to run.
|
|
31
|
-
* @param delay The delay to wait for.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```tsx
|
|
35
|
-
* <button on:mouseenter={event => {
|
|
36
|
-
* startDelayedHoverOnMouseenter(event, () => {
|
|
37
|
-
* // Close things like popovers or dropdowns in the same context
|
|
38
|
-
* // when this button was hovered for some time:
|
|
39
|
-
* event.target.dispatchEvent(createPassiveActionEvent());
|
|
40
|
-
* });
|
|
41
|
-
* }}>Hover me!</button>
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
18
|
export declare function startDelayedHoverOnMouseenter(event: MouseEvent, action: () => void, delay?: number): void;
|
|
45
|
-
/**
|
|
46
|
-
* Rvx-ui's passive action event name.
|
|
47
|
-
*
|
|
48
|
-
* + This can be dispatched from an element to indicate that the user is likely no longer interested in interacting with other elements in the same context.
|
|
49
|
-
* + This is currently used to close nested dropdowns when the user hovers another dropdown item in the parent for some time.
|
|
50
|
-
*/
|
|
51
19
|
export declare const PASSIVE_ACTION_EVENT = "rvx-ui:passive-action";
|
|
52
|
-
/**
|
|
53
|
-
* Create a {@link PASSIVE_ACTION_EVENT} custom event.
|
|
54
|
-
*
|
|
55
|
-
* This event does not bubble.
|
|
56
|
-
*/
|
|
57
20
|
export declare function createPassiveActionEvent(): Event;
|
|
58
|
-
/**
|
|
59
|
-
* Debounce an event handler.
|
|
60
|
-
*/
|
|
61
21
|
export declare function debounceEvent<T>(delayMs: number, handler: (event: T) => void): (event: T) => void;
|
|
62
22
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/common/events.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGjD,MAAM,WAAW,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,WAS5D;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/common/events.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AAGjD,MAAM,WAAW,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,WAS5D;AAOD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ANGED
|
@@ -1,135 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
* A collection of class names that is used as the theme.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* import { mount, Inject } from "rvx";
|
|
9
|
-
* import { THEME, Button } from "@rvx/ui";
|
|
10
|
-
*
|
|
11
|
-
* import theme from "./theme.module.css";
|
|
12
|
-
*
|
|
13
|
-
* mount(
|
|
14
|
-
* document.body,
|
|
15
|
-
* <Inject key={THEME} value={theme}>
|
|
16
|
-
* {() => <>
|
|
17
|
-
* <Button>Click me!</Button>
|
|
18
|
-
* </>}
|
|
19
|
-
* </Inject>
|
|
20
|
-
* );
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export interface Theme {
|
|
24
|
-
breadcrumbs?: string;
|
|
25
|
-
breadcrumb_item?: string;
|
|
26
|
-
breadcrumb_separator?: string;
|
|
27
|
-
button?: string;
|
|
28
|
-
button_default?: string;
|
|
29
|
-
button_primary?: string;
|
|
30
|
-
button_success?: string;
|
|
31
|
-
button_danger?: string;
|
|
32
|
-
button_warning?: string;
|
|
33
|
-
button_input?: string;
|
|
34
|
-
button_item?: string;
|
|
35
|
-
card?: string;
|
|
36
|
-
card_raw?: string;
|
|
37
|
-
card_default?: string;
|
|
38
|
-
card_info?: string;
|
|
39
|
-
card_success?: string;
|
|
40
|
-
card_warning?: string;
|
|
41
|
-
card_danger?: string;
|
|
42
|
-
checkbox_label?: string;
|
|
43
|
-
checkbox_padding?: string;
|
|
44
|
-
checkbox_input?: string;
|
|
45
|
-
checkbox_content?: string;
|
|
46
|
-
collapse?: string;
|
|
47
|
-
collapse_sized?: string;
|
|
48
|
-
collapse_view?: string;
|
|
49
|
-
collapse_alert?: string;
|
|
50
|
-
collapse_visible?: string;
|
|
51
|
-
collapse_content?: string;
|
|
52
|
-
column?: string;
|
|
53
|
-
column_padded?: string;
|
|
54
|
-
column_content?: string;
|
|
55
|
-
column_group?: string;
|
|
56
|
-
column_control?: string;
|
|
57
|
-
control_group?: string;
|
|
58
|
-
control_group_row?: string;
|
|
59
|
-
control_group_column?: string;
|
|
60
|
-
dialog_container?: string;
|
|
61
|
-
dialog_body?: string;
|
|
62
|
-
dialog_fadein?: string;
|
|
63
|
-
dialog_fadeout?: string;
|
|
64
|
-
dialog_scroll_view?: string;
|
|
65
|
-
dialog_scroll_view_content?: string;
|
|
66
|
-
dialog_footer?: string;
|
|
67
|
-
dropdown?: string;
|
|
68
|
-
dropdown_expansion?: string;
|
|
69
|
-
dropdown_scroll_area?: string;
|
|
70
|
-
dropdown_content?: string;
|
|
71
|
-
dropdown_item?: string;
|
|
72
|
-
dropdown_item_active?: string;
|
|
73
|
-
flex_space?: string;
|
|
74
|
-
heading?: string;
|
|
75
|
-
label?: string;
|
|
76
|
-
link?: string;
|
|
77
|
-
nav_list?: string;
|
|
78
|
-
nav_list_item?: string;
|
|
79
|
-
nav_list_item_current?: string;
|
|
80
|
-
notification_host?: string;
|
|
81
|
-
notification_area?: string;
|
|
82
|
-
notification?: string;
|
|
83
|
-
notification_raw?: string;
|
|
84
|
-
notification_default?: string;
|
|
85
|
-
notification_info?: string;
|
|
86
|
-
notification_success?: string;
|
|
87
|
-
notification_warning?: string;
|
|
88
|
-
notification_danger?: string;
|
|
89
|
-
page?: string;
|
|
90
|
-
page_center_block?: string;
|
|
91
|
-
page_scrollbar_comp?: string;
|
|
92
|
-
page_content_col?: string;
|
|
93
|
-
page_content?: string;
|
|
94
|
-
placeholder_area?: string;
|
|
95
|
-
placeholder_content?: string;
|
|
96
|
-
placeholder_message?: string;
|
|
97
|
-
placeholder?: string;
|
|
98
|
-
popover?: string;
|
|
99
|
-
popover_raw?: string;
|
|
100
|
-
popover_spike_area?: string;
|
|
101
|
-
popover_scroll_area?: string;
|
|
102
|
-
popover_spike?: string;
|
|
103
|
-
popover_content?: string;
|
|
104
|
-
radio_buttons?: string;
|
|
105
|
-
radio_button_label?: string;
|
|
106
|
-
radio_button_padding?: string;
|
|
107
|
-
radio_button_input?: string;
|
|
108
|
-
radio_button_content?: string;
|
|
109
|
-
row?: string;
|
|
110
|
-
row_padded?: string;
|
|
111
|
-
row_content?: string;
|
|
112
|
-
row_group?: string;
|
|
113
|
-
row_control?: string;
|
|
114
|
-
scroll_view?: string;
|
|
115
|
-
scroll_view_area?: string;
|
|
116
|
-
scroll_view_content?: string;
|
|
117
|
-
scroll_view_indicator_start?: string;
|
|
118
|
-
scroll_view_indicator_end?: string;
|
|
119
|
-
scroll_view_indicator_visible?: string;
|
|
120
|
-
secondary?: string;
|
|
121
|
-
separated_column?: string;
|
|
122
|
-
separated_row?: string;
|
|
123
|
-
has_separator?: string;
|
|
124
|
-
slider_host?: string;
|
|
125
|
-
tab_handle?: string;
|
|
126
|
-
tab_handle_current?: string;
|
|
127
|
-
tab_list?: string;
|
|
128
|
-
tab_list_padded?: string;
|
|
129
|
-
tab_panel?: string;
|
|
130
|
-
text_input?: string;
|
|
131
|
-
text?: string;
|
|
132
|
-
error_message?: string;
|
|
133
|
-
value?: string;
|
|
134
|
-
}
|
|
1
|
+
import { Expression } from "rvx";
|
|
2
|
+
export type Theme = "dark" | "light";
|
|
3
|
+
export declare function watchTheme(value?: Expression<Theme | undefined>): void;
|
|
135
4
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/common/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/common/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAK,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGrD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAErC,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,QAuB/D"}
|
package/dist/common/theme.js
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { $, teardown, watch } from "rvx";
|
|
2
|
+
import { useAbortSignal } from "rvx/async";
|
|
3
|
+
export function watchTheme(value) {
|
|
4
|
+
const theme = $(undefined);
|
|
5
|
+
watch(value, expr => {
|
|
6
|
+
if (expr === undefined) {
|
|
7
|
+
const dark = window.matchMedia("(prefers-color-scheme: dark)");
|
|
8
|
+
const update = () => {
|
|
9
|
+
theme.value = dark.matches ? "dark" : "light";
|
|
10
|
+
};
|
|
11
|
+
dark.addEventListener("change", update, { signal: useAbortSignal() });
|
|
12
|
+
update();
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
theme.value = expr;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
watch(theme, theme => {
|
|
19
|
+
const className = `rvx-${theme}`;
|
|
20
|
+
document.body.classList.add(className);
|
|
21
|
+
teardown(() => {
|
|
22
|
+
document.body.classList.remove(className);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
3
26
|
//# sourceMappingURL=theme.js.map
|
package/dist/common/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/common/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/common/theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAc,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,UAAU,UAAU,CAAC,KAAqC;IAC/D,MAAM,KAAK,GAAG,CAAC,CAAQ,SAAU,CAAC,CAAC;IAEnC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;QACnB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;YAC/D,MAAM,MAAM,GAAG,GAAG,EAAE;gBACnB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;YAC/C,CAAC,CAAC;YACF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;YACtE,MAAM,EAAE,CAAC;QACV,CAAC;aAAM,CAAC;YACP,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC;QACpB,CAAC;IACF,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;QACpB,MAAM,SAAS,GAAG,OAAO,KAAK,EAAE,CAAC;QACjC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvC,QAAQ,CAAC,GAAG,EAAE;YACb,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,83 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A CSS writing mode property value.
|
|
3
|
-
*/
|
|
4
1
|
export type WritingMode = "horizontal-tb" | "vertical-rl" | "vertical-lr" | "sideways-rl" | "sideways-lr";
|
|
5
|
-
/**
|
|
6
|
-
* A CSS script direction property value.
|
|
7
|
-
*/
|
|
8
2
|
export type ScriptDirection = "ltr" | "rtl";
|
|
9
|
-
/** The up {@link Direction}. */
|
|
10
3
|
export declare const UP = 0;
|
|
11
|
-
/** The right {@link Direction}. */
|
|
12
4
|
export declare const RIGHT = 1;
|
|
13
|
-
/** The down {@link Direction}. */
|
|
14
5
|
export declare const DOWN = 2;
|
|
15
|
-
/** The left {@link Direction}. */
|
|
16
6
|
export declare const LEFT = 3;
|
|
17
|
-
/**
|
|
18
|
-
* Represents a direction ({@link UP}, {@link RIGHT}, {@link DOWN}, {@link LEFT}).
|
|
19
|
-
*/
|
|
20
7
|
export type Direction = typeof UP | typeof RIGHT | typeof DOWN | typeof LEFT;
|
|
21
|
-
/**
|
|
22
|
-
* Can be indexed by a {@link Direction} to get the respective css inset property.
|
|
23
|
-
*/
|
|
24
8
|
export declare const INSET: Record<Direction, "top" | "right" | "bottom" | "left">;
|
|
25
|
-
/**
|
|
26
|
-
* Flip a direction.
|
|
27
|
-
*/
|
|
28
9
|
export declare function flip(dir: Direction): Direction;
|
|
29
|
-
/**
|
|
30
|
-
* Check if the specified directions are along the same axis.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```tsx
|
|
34
|
-
* axisEquals(UP, UP) // true
|
|
35
|
-
* axisEquals(UP, DOWN) // true
|
|
36
|
-
* axisEquals(UP, RIGHT) // false
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
10
|
export declare function axisEquals(a: Direction, b: Direction): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Get the window size in CSS pixels along the axis of the specified direction.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```tsx
|
|
45
|
-
* getWindowSize(UP) === window.innerHeight // true
|
|
46
|
-
* getWindowSize(DOWN) === window.innerHeight // true
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
11
|
export declare function getWindowSize(dir: Direction): number;
|
|
50
12
|
export interface DOMRectSize {
|
|
51
13
|
width: number;
|
|
52
14
|
height: number;
|
|
53
15
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Get the size in CSS pixels of a DOM rect along the axis of the specified direction.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```tsx
|
|
59
|
-
* getSize(button.getBoundingClientRect(), RIGHT) // 234.5
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
16
|
export declare function getSize(rect: DOMRectSize, dir: Direction): number;
|
|
63
17
|
export interface DOMRectXY {
|
|
64
18
|
x: number;
|
|
65
19
|
y: number;
|
|
66
20
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Get the X/Y coordinate start in CSS pixels of the specified DOM rect along the axis of the specified direction.
|
|
69
|
-
*/
|
|
70
21
|
export declare function getXY(rect: DOMRectXY, dir: Direction): number;
|
|
71
|
-
/**
|
|
72
|
-
* Get the block start direction with respect to the specified writing mode.
|
|
73
|
-
*/
|
|
74
22
|
export declare function getBlockStart(writingMode: WritingMode): Direction;
|
|
75
|
-
/**
|
|
76
|
-
* Get the inline start direction with respect to the specified writing mode and script direction.
|
|
77
|
-
*/
|
|
78
23
|
export declare function getInlineStart(writingMode: WritingMode, scriptDir: ScriptDirection): Direction;
|
|
79
|
-
/**
|
|
80
|
-
* Get the space in CSS pixels between a DOM rect and the window in the specified direction.
|
|
81
|
-
*/
|
|
82
24
|
export declare function getWindowSpaceAround(rect: DOMRect, dir: Direction): number;
|
|
83
25
|
//# sourceMappingURL=writing-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writing-mode.d.ts","sourceRoot":"","sources":["../../src/common/writing-mode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"writing-mode.d.ts","sourceRoot":"","sources":["../../src/common/writing-mode.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC;AAK1G,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,CAAC;AAG5C,eAAO,MAAM,EAAE,IAAI,CAAC;AAEpB,eAAO,MAAM,KAAK,IAAI,CAAC;AAEvB,eAAO,MAAM,IAAI,IAAI,CAAC;AAEtB,eAAO,MAAM,IAAI,IAAI,CAAC;AAKtB,MAAM,MAAM,SAAS,GAAG,OAAO,EAAE,GAAG,OAAO,KAAK,GAAG,OAAO,IAAI,GAAG,OAAO,IAAI,CAAC;AAK7E,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAsC,CAAC;AAKhH,wBAAgB,IAAI,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAE9C;AAYD,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAE9D;AAWD,wBAAgB,aAAa,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAEpD;AAED,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAUD,wBAAgB,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,CAEjE;AAED,MAAM,WAAW,SAAS;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAKD,wBAAgB,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,CAE7D;AAKD,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,CAajE;AAKD,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,GAAG,SAAS,CAuB9F;AAKD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,CAO1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumbs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAqB,UAAU,EAAc,MAAM,KAAK,CAAC;AACxF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE;IAClC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB,WAgCA"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/breadcrumbs.module.css";
|
|
2
3
|
import { For, Inject, Show, SVG, XMLNS } from "rvx";
|
|
3
|
-
import { THEME } from "../common/theme.js";
|
|
4
4
|
import { Link } from "./link.js";
|
|
5
5
|
export function Breadcrumbs(props) {
|
|
6
|
-
const theme = THEME.current;
|
|
7
6
|
return _jsx("div", { class: [
|
|
8
|
-
|
|
7
|
+
styles.breadcrumbs,
|
|
9
8
|
props.class,
|
|
10
9
|
], style: props.style, children: _jsx(For, { each: props.items, children: (item, index) => {
|
|
11
|
-
return _jsxs("div", { class:
|
|
10
|
+
return _jsxs("div", { class: styles.item, children: [_jsx(Show, { when: () => index() !== 0, children: () => _jsx("span", { class: styles.separator, children: _jsx(Inject, { context: XMLNS, value: SVG, children: () => _jsx("svg", { viewBox: "0 0 8 16", preserveAspectRatio: "none", children: _jsx("path", { d: "M2,14 L6,2", "stroke-width": "1.75", "stroke-linecap": "round" }) }) }) }) }), item.action
|
|
12
11
|
? _jsx(Link, { action: item.action, children: item.label })
|
|
13
12
|
: _jsx("span", { children: item.label })] });
|
|
14
13
|
} }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../src/components/breadcrumbs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,GAAG,EAAE,MAAM,EAAE,IAAI,EAAc,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAExF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../src/components/breadcrumbs.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iDAAiD,CAAC;AACrE,OAAO,EAA0B,GAAG,EAAE,MAAM,EAAE,IAAI,EAAc,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAExF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAOjC,MAAM,UAAU,WAAW,CAAC,KAI3B;IACA,OAAO,cACN,KAAK,EAAE;YACN,MAAM,CAAC,WAAW;YAClB,KAAK,CAAC,KAAK;SACX,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,YAElB,KAAC,GAAG,IAAC,IAAI,EAAE,KAAK,CAAC,KAAK,YACpB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBAChB,OAAO,eAAK,KAAK,EAAE,MAAM,CAAC,IAAI,aAC7B,KAAC,IAAI,IAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,YAC7B,GAAG,EAAE,CAAC,eAAM,KAAK,EAAE,MAAM,CAAC,SAAS,YACnC,KAAC,MAAM,IAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAChC,GAAG,EAAE,CAAC,cAAK,OAAO,EAAC,UAAU,EAAC,mBAAmB,EAAC,MAAM,YACxD,eAAM,CAAC,EAAC,YAAY,kBAAc,MAAM,oBAAgB,OAAO,GAAG,GAC7D,GACE,GACH,GACD,EACN,IAAI,CAAC,MAAM;4BACX,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,YACzB,IAAI,CAAC,KAAK,GACL;4BACP,CAAC,CAAC,yBACA,IAAI,CAAC,KAAK,GACL,IAEH,CAAC;YACR,CAAC,GACI,GACD,CAAC;AACR,CAAC"}
|
|
@@ -4,27 +4,9 @@ import { Validator } from "./validation.js";
|
|
|
4
4
|
export type ButtonType = "button" | "submit" | "reset" | "menu";
|
|
5
5
|
export type ButtonVariant = "default" | "primary" | "success" | "danger" | "warning" | "input" | "item";
|
|
6
6
|
export declare function Button(props: {
|
|
7
|
-
/**
|
|
8
|
-
* The button type.
|
|
9
|
-
*
|
|
10
|
-
* @default "button"
|
|
11
|
-
*/
|
|
12
7
|
type?: Expression<ButtonType | undefined>;
|
|
13
|
-
/**
|
|
14
|
-
* The theme variant.
|
|
15
|
-
*
|
|
16
|
-
* @default "default"
|
|
17
|
-
*/
|
|
18
8
|
variant?: Expression<ButtonVariant | undefined>;
|
|
19
|
-
/**
|
|
20
|
-
* Set when the button is disabled.
|
|
21
|
-
*
|
|
22
|
-
* The button is automatically disabled when there are any pending tasks.
|
|
23
|
-
*/
|
|
24
9
|
disabled?: Expression<boolean | undefined>;
|
|
25
|
-
/**
|
|
26
|
-
* The action to run when the button is clicked.
|
|
27
|
-
*/
|
|
28
10
|
action?: Action;
|
|
29
11
|
class?: ClassValue;
|
|
30
12
|
style?: StyleValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAO,UAAU,EAAE,MAAM,KAAK,CAAC;AAG9D,OAAO,EAAE,MAAM,EAA4B,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,S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/ui/theme/components/button.module.css";
|
|
2
3
|
import { get } from "rvx";
|
|
3
4
|
import { isPending } from "rvx/async";
|
|
4
5
|
import { optionalString } from "rvx/convert";
|
|
5
6
|
import { handleActionEvent, isKey } from "../common/events.js";
|
|
6
|
-
import { THEME } from "../common/theme.js";
|
|
7
7
|
export function Button(props) {
|
|
8
|
-
const theme = THEME.current;
|
|
9
8
|
const disabled = () => isPending() || get(props.disabled);
|
|
10
9
|
function action(event) {
|
|
11
10
|
if (disabled() || !props.action) {
|
|
@@ -14,8 +13,8 @@ export function Button(props) {
|
|
|
14
13
|
handleActionEvent(event, props.action);
|
|
15
14
|
}
|
|
16
15
|
return _jsx("button", { type: () => get(props.type) ?? "button", disabled: disabled, class: [
|
|
17
|
-
|
|
18
|
-
() =>
|
|
16
|
+
styles.button,
|
|
17
|
+
() => styles[get(props.variant) ?? "default"],
|
|
19
18
|
props.class,
|
|
20
19
|
], style: props.style, id: props.id, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], "aria-expanded": optionalString(props["aria-expanded"]), "aria-haspopup": props["aria-haspopup"], "aria-controls": props["aria-controls"], "aria-invalid": props.validator ? optionalString(props.validator.invalid) : undefined, "aria-errormessage": props.validator ? props.validator.messageIds : undefined, autofocus: props.autofocus, "on:click": action, "on:keydown": event => {
|
|
21
20
|
if (isKey(event, "enter") || isKey(event, " ")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,GAAG,EAAc,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAU,iBAAiB,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"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,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,uBAChE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC3E,SAAS,EAAE,KAAK,CAAC,SAAS,cAEhB,MAAM,gBACJ,KAAK,CAAC,EAAE;YACnB,IAAI,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;gBAChD,MAAM,CAAC,KAAK,CAAC,CAAC;YACf,CAAC;QACF,CAAC,YAEA,KAAK,CAAC,QAAQ,GACP,CAAC;AACX,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { SizeContext } from "../common/types.js";
|
|
|
3
3
|
export type CardVariant = "default" | "info" | "success" | "warning" | "danger";
|
|
4
4
|
export declare function Card(props: {
|
|
5
5
|
variant?: Expression<CardVariant | undefined>;
|
|
6
|
-
size?: SizeContext
|
|
6
|
+
size?: Expression<SizeContext | undefined>;
|
|
7
7
|
raw?: boolean;
|
|
8
8
|
class?: ClassValue;
|
|
9
9
|
style?: StyleValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAO,UAAU,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhF,wBAAgB,IAAI,CAAC,KAAK,EAAE;IAC3B,OAAO,CAAC,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC9C,IAAI,CAAC,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC3C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CAiBV"}
|
package/dist/components/card.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/card.module.css";
|
|
2
3
|
import { map } from "rvx";
|
|
3
|
-
import { THEME } from "../common/theme.js";
|
|
4
4
|
import { Column } from "./column.js";
|
|
5
5
|
export function Card(props) {
|
|
6
|
-
const theme = THEME.current;
|
|
7
6
|
return _jsx("div", { class: [
|
|
8
7
|
props.class,
|
|
9
|
-
|
|
10
|
-
props.raw ?
|
|
11
|
-
map(props.variant, variant =>
|
|
8
|
+
styles.card,
|
|
9
|
+
props.raw ? styles.raw : undefined,
|
|
10
|
+
map(props.variant, variant => styles[variant ?? "default"]),
|
|
12
11
|
], style: props.style, children: props.raw
|
|
13
12
|
? props.children
|
|
14
13
|
: _jsx(Column, { size: map(props.size, s => s ?? "group"), children: props.children }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,0CAA0C,CAAC;AAC9D,OAAO,EAA0B,GAAG,EAAc,MAAM,KAAK,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,MAAM,UAAU,IAAI,CAAC,KAOpB;IACA,OAAO,cACN,KAAK,EAAE;YACN,KAAK,CAAC,KAAK;YACX,MAAM,CAAC,IAAI;YACX,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;YAClC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC;SAC3D,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,YAEjB,KAAK,CAAC,GAAG;YACT,CAAC,CAAC,KAAK,CAAC,QAAQ;YAChB,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,YAChD,KAAK,CAAC,QAAQ,GACP,GAEL,CAAC;AACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAe,UAAU,EAAmB,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAe,UAAU,EAAmB,MAAM,KAAK,CAAC;AAQvF,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAE1C,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAE3C,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CA4CV"}
|
|
@@ -3,18 +3,17 @@ import { get, Signal, uniqueId, watch } from "rvx";
|
|
|
3
3
|
import { isPending } from "rvx/async";
|
|
4
4
|
import { optionalString, string } from "rvx/convert";
|
|
5
5
|
import { ID_PAIR } from "../common/id-pairs.js";
|
|
6
|
-
import { THEME } from "../common/theme.js";
|
|
7
6
|
import { Text } from "./text.js";
|
|
8
7
|
import { closestValidator } from "./validation.js";
|
|
8
|
+
import styles from "@rvx/ui/theme/components/checkbox.module.css";
|
|
9
9
|
export function Checkbox(props) {
|
|
10
10
|
const pairId = ID_PAIR.current.consume();
|
|
11
11
|
const id = props.children === undefined ? pairId : uniqueId();
|
|
12
|
-
const theme = THEME.current;
|
|
13
12
|
const disabled = props.checked instanceof Signal
|
|
14
13
|
? () => isPending() || get(props.disabled)
|
|
15
14
|
: () => true;
|
|
16
15
|
const validator = props.checked instanceof Signal ? closestValidator(props.checked) : undefined;
|
|
17
|
-
const input = _jsx("input", { id: id, type: "checkbox", class:
|
|
16
|
+
const input = _jsx("input", { id: id, type: "checkbox", class: styles.input, "on:input": () => {
|
|
18
17
|
if (props.checked instanceof Signal) {
|
|
19
18
|
props.checked.value = input.checked;
|
|
20
19
|
}
|
|
@@ -24,8 +23,8 @@ export function Checkbox(props) {
|
|
|
24
23
|
input.checked = checked === true;
|
|
25
24
|
});
|
|
26
25
|
return _jsxs("label", { for: id, class: [
|
|
27
|
-
|
|
26
|
+
styles.label,
|
|
28
27
|
props.class,
|
|
29
|
-
], style: props.style, children: [
|
|
28
|
+
], style: props.style, children: [_jsx("div", { class: styles.padding, children: input }), _jsx(Text, { class: styles.content, children: props.children })] });
|
|
30
29
|
}
|
|
31
30
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,GAAG,EAAE,MAAM,EAAc,QAAQ,EAAE,KAAK,EA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AK,CAAC,OAAO,YAAY,MAAM,EAAE,CAAC;gBACrC,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC;YACrC,CAAC;QACF,CAAC,mBACc,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,MAAM,CAAC,CAAC,kBAC3C,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,uBACpD,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC/D,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,QAAQ,GACG,CAAC;IAEvB,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE;QAC9B,KAAK,CAAC,aAAa,GAAG,OAAO,KAAK,SAAS,CAAC;QAC5C,KAAK,CAAC,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,OAAO,iBACN,GAAG,EAAE,EAAE,EACP,KAAK,EAAE;YACN,MAAM,CAAC,KAAK;YACZ,KAAK,CAAC,KAAK;SACX,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,cAAK,KAAK,EAAE,MAAM,CAAC,OAAO,YAAG,KAAK,GAAO,EACzC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,YACzB,KAAK,CAAC,QAAQ,GACT,IACA,CAAC;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse.d.ts","sourceRoot":"","sources":["../../src/components/collapse.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collapse.d.ts","sourceRoot":"","sources":["../../src/components/collapse.tsx"],"names":[],"mappings":"AACA,OAAO,EAAK,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAyB,UAAU,EAAmB,MAAM,KAAK,CAAC;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U,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACvB,GAAG,OAAO,CAqFV"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "rvx/jsx-runtime";
|
|
2
|
+
import styles from "@rvx/ui/theme/components/collapse.module.css";
|
|
2
3
|
import { $, For, get, map, teardown, watch } from "rvx";
|
|
3
4
|
import { useMicrotask, useTimeout } from "rvx/async";
|
|
4
5
|
import { optionalString } from "rvx/convert";
|
|
5
|
-
import { THEME } from "../common/theme.js";
|
|
6
6
|
export function Collapse(props) {
|
|
7
|
-
const theme = THEME.current;
|
|
8
7
|
const alert = $(false);
|
|
9
8
|
const size = $(undefined);
|
|
10
|
-
const content = _jsx("div", { class:
|
|
9
|
+
const content = _jsx("div", { class: styles.content, children: props.children });
|
|
11
10
|
const observer = new ResizeObserver(entries => {
|
|
12
11
|
const entry = entries[entries.length - 1];
|
|
13
12
|
const boxSize = entry?.borderBoxSize[entry.borderBoxSize.length - 1];
|
|
@@ -47,19 +46,17 @@ export function Collapse(props) {
|
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
const root = _jsx("div", { inert: map(props.visible, v => !v), class: [
|
|
50
|
-
|
|
51
|
-
() => size.value === undefined || !transition.value ? undefined :
|
|
52
|
-
() => alert.value ?
|
|
53
|
-
map(visible, v => v ?
|
|
49
|
+
styles.collapse,
|
|
50
|
+
() => size.value === undefined || !transition.value ? undefined : styles.sized,
|
|
51
|
+
() => alert.value ? styles.alert : undefined,
|
|
52
|
+
map(visible, v => v ? styles.visible : undefined),
|
|
54
53
|
props.class,
|
|
55
54
|
], style: [
|
|
56
55
|
{
|
|
57
56
|
"--collapse-size": () => size.value === undefined ? null : `${size.value}px`,
|
|
58
57
|
},
|
|
59
58
|
props.style,
|
|
60
|
-
], id: props.id, "aria-live": map(props["aria-live"], v => v ?? "polite"), "aria-relevant": props["aria-relevant"], "aria-atomic": optionalString(props["aria-atomic"]), children:
|
|
61
|
-
? _jsx("div", { class: theme.collapse_view, children: content })
|
|
62
|
-
: content });
|
|
59
|
+
], id: props.id, "aria-live": map(props["aria-live"], v => v ?? "polite"), "aria-relevant": props["aria-relevant"], "aria-atomic": optionalString(props["aria-atomic"]), children: _jsx("div", { class: styles.view, children: content }) });
|
|
63
60
|
watch(visible, () => {
|
|
64
61
|
transition.value = true;
|
|
65
62
|
useMicrotask(() => {
|