@raylang/react 0.10.0 → 0.12.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/components/input.js +1 -1
- package/components/menu.js +1 -1
- package/components/mode-input.js +1 -1
- package/components/password-input.js +1 -1
- package/components/path-input.js +1 -1
- package/components/popover.js +1 -1
- package/components/pulse.js +10 -0
- package/components/textarea.js +1 -1
- package/index.d.ts +36 -0
- package/index.js +1 -0
- package/package.json +2 -2
package/components/input.js
CHANGED
|
@@ -6,5 +6,5 @@ import { createComponent } from "../create.js";
|
|
|
6
6
|
export const RayInput = /*#__PURE__*/ createComponent("ray-input", {
|
|
7
7
|
displayName: "RayInput",
|
|
8
8
|
properties: ["value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
|
|
9
|
-
events: { onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
|
|
9
|
+
events: { onRayComplete: "ray-complete", onRayHighlightHover: "ray-highlight-hover", onInput: "input", onChange: "change" },
|
|
10
10
|
});
|
package/components/menu.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createComponent } from "../create.js";
|
|
|
5
5
|
|
|
6
6
|
export const RayMenu = /*#__PURE__*/ createComponent("ray-menu", {
|
|
7
7
|
displayName: "RayMenu",
|
|
8
|
-
properties: ["open", "placement", "context", "keepOpen", "native", "offset"],
|
|
8
|
+
properties: ["open", "placement", "context", "keepOpen", "native", "anchor", "offset"],
|
|
9
9
|
events: { onRaySelect: "ray-select", onRayRequestOpen: "ray-request-open", onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
10
|
});
|
|
11
11
|
export const RayMenuItem = /*#__PURE__*/ createComponent("ray-menu-item", {
|
package/components/mode-input.js
CHANGED
|
@@ -6,5 +6,5 @@ import { createComponent } from "../create.js";
|
|
|
6
6
|
export const RayModeInput = /*#__PURE__*/ createComponent("ray-mode-input", {
|
|
7
7
|
displayName: "RayModeInput",
|
|
8
8
|
properties: ["mode", "options", "display", "position", "menuLabel", "nativeMenu", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
|
|
9
|
-
events: { onRayModeChange: "ray-mode-change", onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
|
|
9
|
+
events: { onRayModeChange: "ray-mode-change", onRayComplete: "ray-complete", onRayHighlightHover: "ray-highlight-hover", onInput: "input", onChange: "change" },
|
|
10
10
|
});
|
|
@@ -6,5 +6,5 @@ import { createComponent } from "../create.js";
|
|
|
6
6
|
export const RayPasswordInput = /*#__PURE__*/ createComponent("ray-password-input", {
|
|
7
7
|
displayName: "RayPasswordInput",
|
|
8
8
|
properties: ["visible", "showLabel", "hideLabel", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
|
|
9
|
-
events: { onRayVisibilityChange: "ray-visibility-change", onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
|
|
9
|
+
events: { onRayVisibilityChange: "ray-visibility-change", onRayComplete: "ray-complete", onRayHighlightHover: "ray-highlight-hover", onInput: "input", onChange: "change" },
|
|
10
10
|
});
|
package/components/path-input.js
CHANGED
|
@@ -6,5 +6,5 @@ import { createComponent } from "../create.js";
|
|
|
6
6
|
export const RayPathInput = /*#__PURE__*/ createComponent("ray-path-input", {
|
|
7
7
|
displayName: "RayPathInput",
|
|
8
8
|
properties: ["mode", "accept", "browseLabel", "dialogTitle", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
|
|
9
|
-
events: { onChange: "change", onRayError: "ray-error", onRayComplete: "ray-complete", onInput: "input" },
|
|
9
|
+
events: { onChange: "change", onRayError: "ray-error", onRayComplete: "ray-complete", onRayHighlightHover: "ray-highlight-hover", onInput: "input" },
|
|
10
10
|
});
|
package/components/popover.js
CHANGED
|
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
|
|
|
5
5
|
|
|
6
6
|
export const RayPopover = /*#__PURE__*/ createComponent("ray-popover", {
|
|
7
7
|
displayName: "RayPopover",
|
|
8
|
-
properties: ["open", "placement", "offset", "width", "matchWidth", "padding", "trapFocus"],
|
|
8
|
+
properties: ["open", "placement", "offset", "anchor", "width", "matchWidth", "padding", "trapFocus"],
|
|
9
9
|
events: { onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
10
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/pulse";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayPulse = /*#__PURE__*/ createComponent("ray-pulse", {
|
|
7
|
+
displayName: "RayPulse",
|
|
8
|
+
properties: ["variant", "count", "shape", "fade", "direction", "color", "size", "label"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
package/components/textarea.js
CHANGED
|
@@ -6,5 +6,5 @@ import { createComponent } from "../create.js";
|
|
|
6
6
|
export const RayTextarea = /*#__PURE__*/ createComponent("ray-textarea", {
|
|
7
7
|
displayName: "RayTextarea",
|
|
8
8
|
properties: ["value", "rows", "autosize", "maxRows", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "readonly", "size", "variant", "highlight", "complete", "suggestionsLabel", "radius"],
|
|
9
|
-
events: { onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
|
|
9
|
+
events: { onRayComplete: "ray-complete", onRayHighlightHover: "ray-highlight-hover", onInput: "input", onChange: "change" },
|
|
10
10
|
});
|
package/index.d.ts
CHANGED
|
@@ -550,6 +550,8 @@ export interface RayInputOwnProps {
|
|
|
550
550
|
list?: string;
|
|
551
551
|
/** A suggestion was accepted (the text already has it). */
|
|
552
552
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
553
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
554
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
553
555
|
/** On every edit (value already updated). */
|
|
554
556
|
onInput?: (event: Event) => void;
|
|
555
557
|
/** When an edit is committed (blur, Enter). */
|
|
@@ -632,6 +634,8 @@ export interface RayModeInputOwnProps {
|
|
|
632
634
|
onRayModeChange?: (event: CustomEvent<{ mode: string; previous: string | null; option: Ray.ModeOption }>) => void;
|
|
633
635
|
/** A suggestion was accepted (the text already has it). */
|
|
634
636
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
637
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
638
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
635
639
|
/** On every edit (value already updated). */
|
|
636
640
|
onInput?: (event: Event) => void;
|
|
637
641
|
/** When an edit is committed (blur, Enter). */
|
|
@@ -766,6 +770,8 @@ export interface RayPasswordInputOwnProps {
|
|
|
766
770
|
onRayVisibilityChange?: (event: CustomEvent<{ visible: boolean }>) => void;
|
|
767
771
|
/** A suggestion was accepted (the text already has it). */
|
|
768
772
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
773
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
774
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
769
775
|
/** On every edit (value already updated). */
|
|
770
776
|
onInput?: (event: Event) => void;
|
|
771
777
|
/** When an edit is committed (blur, Enter). */
|
|
@@ -846,6 +852,8 @@ export interface RayPathInputOwnProps {
|
|
|
846
852
|
onRayError?: (event: CustomEvent<{ error: Error }>) => void;
|
|
847
853
|
/** A suggestion was accepted (the text already has it). */
|
|
848
854
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
855
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
856
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
849
857
|
/** On every edit (value already updated). */
|
|
850
858
|
onInput?: (event: Event) => void;
|
|
851
859
|
}
|
|
@@ -1174,6 +1182,8 @@ export interface RayTextareaOwnProps {
|
|
|
1174
1182
|
wrap?: string;
|
|
1175
1183
|
/** A suggestion was accepted (the text already has it). */
|
|
1176
1184
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
1185
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
1186
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
1177
1187
|
/** On every edit. */
|
|
1178
1188
|
onInput?: (event: Event) => void;
|
|
1179
1189
|
/** When an edit is committed. */
|
|
@@ -1598,6 +1608,8 @@ export interface RayMenuOwnProps {
|
|
|
1598
1608
|
keepOpen?: boolean;
|
|
1599
1609
|
/** With a native host (ray-elements/core/raylang.js in a std/ui window), opens as the system's context menu at the pointer: items and dividers, same ray-select. */
|
|
1600
1610
|
native?: boolean;
|
|
1611
|
+
/** What the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it. */
|
|
1612
|
+
anchor?: Element | DOMRect | (() => DOMRect) | null;
|
|
1601
1613
|
/** Gap to the anchor in px. */
|
|
1602
1614
|
offset?: number;
|
|
1603
1615
|
/** An item was chosen; detail: { value, item }. */
|
|
@@ -1650,6 +1662,8 @@ export interface RayPopoverOwnProps {
|
|
|
1650
1662
|
placement?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
1651
1663
|
/** Gap to the trigger in px. */
|
|
1652
1664
|
offset?: number;
|
|
1665
|
+
/** What the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it. */
|
|
1666
|
+
anchor?: Element | DOMRect | (() => DOMRect) | null;
|
|
1653
1667
|
/** Panel width (px number or CSS length). Default: its content. */
|
|
1654
1668
|
width?: string;
|
|
1655
1669
|
/** At least as wide as the trigger. */
|
|
@@ -2141,6 +2155,28 @@ export type RayProgressProps = RayProgressOwnProps & Omit<React.HTMLAttributes<R
|
|
|
2141
2155
|
/** <ray-progress> as a React component. */
|
|
2142
2156
|
export declare const RayProgress: React.ForwardRefExoticComponent<RayProgressProps & React.RefAttributes<Ray.RayProgress>>;
|
|
2143
2157
|
|
|
2158
|
+
export interface RayPulseOwnProps {
|
|
2159
|
+
/** The figure: cluster (three concentric circles breathing out of phase), breathe (one dot over a halo), ripple (rings expanding from a dot) or dots (three in a row, in sequence). */
|
|
2160
|
+
variant?: "cluster" | "breathe" | "ripple" | "dots";
|
|
2161
|
+
/** Number of circles, 1 to 5 (more are clamped). Default: the variant's. */
|
|
2162
|
+
count?: number;
|
|
2163
|
+
/** Filled discs (concentric ones fade with size, see --ray-pulse-floor) or outlined rings. Default: the variant's. */
|
|
2164
|
+
shape?: "filled" | "ring";
|
|
2165
|
+
/** Whether a cycle ends transparent; the bare attribute means out. Default: the variant's (ripple and dots fade). */
|
|
2166
|
+
fade?: "out" | "none";
|
|
2167
|
+
/** alternate goes there and back; normal goes one way and restarts (with fade: the ripple). Default: the variant's. */
|
|
2168
|
+
direction?: "alternate" | "normal";
|
|
2169
|
+
/** A palette color or any CSS color. Default: the primary color. */
|
|
2170
|
+
color?: string;
|
|
2171
|
+
/** Height of the figure (the dots variant is wider). */
|
|
2172
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
2173
|
+
/** Text read by screen readers. */
|
|
2174
|
+
label?: string;
|
|
2175
|
+
}
|
|
2176
|
+
export type RayPulseProps = RayPulseOwnProps & Omit<React.HTMLAttributes<Ray.RayPulse>, keyof RayPulseOwnProps> & { children?: React.ReactNode };
|
|
2177
|
+
/** <ray-pulse> as a React component. */
|
|
2178
|
+
export declare const RayPulse: React.ForwardRefExoticComponent<RayPulseProps & React.RefAttributes<Ray.RayPulse>>;
|
|
2179
|
+
|
|
2144
2180
|
export interface RayRingProgressOwnProps {
|
|
2145
2181
|
/** Progress, from 0 to max. Unset: indeterminate (a spinning arc). */
|
|
2146
2182
|
value?: number;
|
package/index.js
CHANGED
|
@@ -58,6 +58,7 @@ export { RayAlert } from "./components/alert.js";
|
|
|
58
58
|
export { RayEmptyState } from "./components/empty-state.js";
|
|
59
59
|
export { RayNotification, RayToaster } from "./components/notification.js";
|
|
60
60
|
export { RayProgress } from "./components/progress.js";
|
|
61
|
+
export { RayPulse } from "./components/pulse.js";
|
|
61
62
|
export { RayRingProgress } from "./components/ring-progress.js";
|
|
62
63
|
export { RaySkeleton } from "./components/skeleton.js";
|
|
63
64
|
export { RaySpinner } from "./components/spinner.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "React wrappers of the ray-elements web components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": ["web-components", "design-system", "ui", "raylang", "react"],
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@raylang/elements": "^0.
|
|
31
|
+
"@raylang/elements": "^0.12.0",
|
|
32
32
|
"react": ">=18"
|
|
33
33
|
}
|
|
34
34
|
}
|