@raylang/react 0.7.0 → 0.8.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/icon.js +1 -1
- package/index.d.ts +25 -23
- package/package.json +2 -2
package/components/icon.js
CHANGED
|
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
|
|
|
5
5
|
|
|
6
6
|
export const RayIcon = /*#__PURE__*/ createComponent("ray-icon", {
|
|
7
7
|
displayName: "RayIcon",
|
|
8
|
-
properties: ["name", "filled", "size", "label", "color", "stroke"],
|
|
8
|
+
properties: ["name", "filled", "mirror", "size", "label", "color", "stroke"],
|
|
9
9
|
events: { },
|
|
10
10
|
});
|
package/index.d.ts
CHANGED
|
@@ -188,8 +188,8 @@ export interface RayCheckboxOwnProps {
|
|
|
188
188
|
color?: string;
|
|
189
189
|
/** Box and font size. */
|
|
190
190
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
191
|
-
/** Side of the label. */
|
|
192
|
-
labelPosition?: "right" | "left";
|
|
191
|
+
/** Side of the label: start/end follow the writing direction; left/right are sides of the screen. */
|
|
192
|
+
labelPosition?: "end" | "start" | "right" | "left";
|
|
193
193
|
/** Corner radius. */
|
|
194
194
|
radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
195
195
|
/** Description before or after the control. */
|
|
@@ -994,8 +994,8 @@ export interface RaySwitchOwnProps {
|
|
|
994
994
|
description?: string;
|
|
995
995
|
/** Error text. */
|
|
996
996
|
error?: string;
|
|
997
|
-
/** Side of the label. */
|
|
998
|
-
labelPosition?: "right" | "left";
|
|
997
|
+
/** Side of the label: start/end follow the writing direction; left/right are sides of the screen. */
|
|
998
|
+
labelPosition?: "end" | "start" | "right" | "left";
|
|
999
999
|
/** Track color when on. */
|
|
1000
1000
|
color?: string;
|
|
1001
1001
|
/** Track size. */
|
|
@@ -1206,8 +1206,8 @@ export interface RaySidebarOwnProps {
|
|
|
1206
1206
|
collapsed?: boolean;
|
|
1207
1207
|
/** Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it). */
|
|
1208
1208
|
open?: boolean;
|
|
1209
|
-
/** The edge it sits on. */
|
|
1210
|
-
side?: "left" | "right";
|
|
1209
|
+
/** The edge it sits on (its border faces the content, its narrow-screen drawer slides from there): start/end follow the writing direction; left/right are sides of the screen. */
|
|
1210
|
+
side?: "start" | "end" | "left" | "right";
|
|
1211
1211
|
/** A panel against the edge, or a floating card with a margin. */
|
|
1212
1212
|
variant?: "sidebar" | "floating";
|
|
1213
1213
|
/** Width when expanded (CSS length). Default 16rem. */
|
|
@@ -1242,8 +1242,8 @@ export interface RayStepperOwnProps {
|
|
|
1242
1242
|
active?: number;
|
|
1243
1243
|
/** Steps in a row above the content, or in a column beside it. */
|
|
1244
1244
|
orientation?: "horizontal" | "vertical";
|
|
1245
|
-
/** Label beside the number, or under it (narrow screens, many steps). */
|
|
1246
|
-
iconPosition?: "
|
|
1245
|
+
/** Label beside the number (after it in the reading direction), or under it (narrow screens, many steps). "left", its former name, still works. */
|
|
1246
|
+
iconPosition?: "start" | "top" | "left";
|
|
1247
1247
|
/** Completed steps are buttons that go back to them. */
|
|
1248
1248
|
allowStepSelect?: boolean;
|
|
1249
1249
|
/** With allow-step-select off, false lets the user jump to any step. */
|
|
@@ -1392,8 +1392,8 @@ export interface RayDrawerOwnProps {
|
|
|
1392
1392
|
label?: string;
|
|
1393
1393
|
/** A line under the title (the drawer's accessible description). */
|
|
1394
1394
|
description?: string;
|
|
1395
|
-
/** The edge it slides from. */
|
|
1396
|
-
position?: "right" | "left" | "top" | "bottom";
|
|
1395
|
+
/** The edge it slides from: start/end follow the writing direction; left/right are sides of the screen. */
|
|
1396
|
+
position?: "end" | "start" | "right" | "left" | "top" | "bottom";
|
|
1397
1397
|
/** Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length. */
|
|
1398
1398
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {});
|
|
1399
1399
|
/** No backdrop nor scroll lock: the page stays interactive (a side panel). */
|
|
@@ -1420,7 +1420,7 @@ export declare const RayDrawer: React.ForwardRefExoticComponent<RayDrawerProps &
|
|
|
1420
1420
|
export interface RayMenuOwnProps {
|
|
1421
1421
|
/** Shown. */
|
|
1422
1422
|
open?: boolean;
|
|
1423
|
-
/** Preferred side and alignment. */
|
|
1423
|
+
/** Preferred side and alignment: top/bottom/left/right are sides of the screen; on top and bottom, -start/-end follow the writing direction (right to left, "bottom-start" lines up the right edges). */
|
|
1424
1424
|
placement?: "bottom-start" | "bottom" | "bottom-end" | "top-start" | "top" | "top-end" | "right-start" | "left-start";
|
|
1425
1425
|
/** Opens on right click (contextmenu) over the trigger area, at the pointer. */
|
|
1426
1426
|
context?: boolean;
|
|
@@ -1468,7 +1468,7 @@ export declare const RayMenuDivider: React.ForwardRefExoticComponent<RayMenuDivi
|
|
|
1468
1468
|
export interface RayPopoverOwnProps {
|
|
1469
1469
|
/** Shown. */
|
|
1470
1470
|
open?: boolean;
|
|
1471
|
-
/** Preferred side and alignment. */
|
|
1471
|
+
/** Preferred side and alignment: top/bottom/left/right are sides of the screen; on top and bottom, -start/-end follow the writing direction (right to left, "bottom-start" lines up the right edges). */
|
|
1472
1472
|
placement?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
1473
1473
|
/** Gap to the trigger in px. */
|
|
1474
1474
|
offset?: number;
|
|
@@ -1492,7 +1492,7 @@ export declare const RayPopover: React.ForwardRefExoticComponent<RayPopoverProps
|
|
|
1492
1492
|
export interface RayTooltipOwnProps {
|
|
1493
1493
|
/** Tooltip text. */
|
|
1494
1494
|
label?: string;
|
|
1495
|
-
/** Preferred side. */
|
|
1495
|
+
/** Preferred side; -start/-end follow the writing direction. */
|
|
1496
1496
|
placement?: "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
|
|
1497
1497
|
/** ms before showing. */
|
|
1498
1498
|
openDelay?: number;
|
|
@@ -1518,8 +1518,8 @@ export interface RayAccordionOwnProps {
|
|
|
1518
1518
|
multiple?: boolean;
|
|
1519
1519
|
/** Visual style. */
|
|
1520
1520
|
variant?: "default" | "contained" | "separated" | "filled";
|
|
1521
|
-
/** Side of the chevron. */
|
|
1522
|
-
chevronPosition?: "right" | "left";
|
|
1521
|
+
/** Side of the chevron: start/end follow the writing direction; left/right are sides of the screen. */
|
|
1522
|
+
chevronPosition?: "end" | "start" | "right" | "left";
|
|
1523
1523
|
/** The user opened or closed an item. */
|
|
1524
1524
|
onChange?: (event: Event) => void;
|
|
1525
1525
|
}
|
|
@@ -1712,6 +1712,8 @@ export interface RayIconOwnProps {
|
|
|
1712
1712
|
name?: Ray.IconName;
|
|
1713
1713
|
/** The filled version, for a state (active, selected, favorite, unread); the outline icon when there is none. Built in: user, info, circle-check, alert-triangle, circle-x, folder, bell, star, settings, home, message-circle. */
|
|
1714
1714
|
filled?: boolean;
|
|
1715
|
+
/** Mirrored in a right-to-left context (dir="rtl"), for an icon that points along the text: back, forward, send, undo. The roles that do (ui.next, ui.previous, ui.first, ui.last, ui.disclosure, ui.separator) mirror by themselves. */
|
|
1716
|
+
mirror?: boolean;
|
|
1715
1717
|
/** xs…xl or any CSS length. Default: 1em. */
|
|
1716
1718
|
size?: string;
|
|
1717
1719
|
/** Accessible name; without it the icon is decorative (hidden from screen readers). */
|
|
@@ -1830,8 +1832,8 @@ export declare const RayTable: React.ForwardRefExoticComponent<RayTableProps & R
|
|
|
1830
1832
|
export interface RayTimelineOwnProps {
|
|
1831
1833
|
/** Index of the last reached item (-1: none). */
|
|
1832
1834
|
active?: number;
|
|
1833
|
-
/** Side of the line. */
|
|
1834
|
-
align?: "left" | "right";
|
|
1835
|
+
/** Side of the line: start/end follow the writing direction; left/right are sides of the screen. */
|
|
1836
|
+
align?: "start" | "end" | "left" | "right";
|
|
1835
1837
|
/** Bullet size: px as a number or a CSS length (default 20px). */
|
|
1836
1838
|
bulletSize?: string;
|
|
1837
1839
|
/** Line width in px (default 2). */
|
|
@@ -1920,8 +1922,8 @@ export type RayNotificationProps = RayNotificationOwnProps & Omit<React.HTMLAttr
|
|
|
1920
1922
|
export declare const RayNotification: React.ForwardRefExoticComponent<RayNotificationProps & React.RefAttributes<Ray.RayNotification>>;
|
|
1921
1923
|
|
|
1922
1924
|
export interface RayToasterOwnProps {
|
|
1923
|
-
/** Corner of the stack. */
|
|
1924
|
-
position?: "bottom-
|
|
1925
|
+
/** Corner of the stack: -start/-end follow the writing direction; -left/-right are sides of the screen. */
|
|
1926
|
+
position?: "bottom-end" | "bottom-start" | "bottom-center" | "top-end" | "top-start" | "top-center" | "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
1925
1927
|
/** Maximum kept; the oldest go first. */
|
|
1926
1928
|
limit?: number;
|
|
1927
1929
|
/** Toasts shown in the collapsed stack (the rest wait, hidden). */
|
|
@@ -2166,8 +2168,8 @@ export interface RayScrollAreaOwnProps {
|
|
|
2166
2168
|
threshold?: number;
|
|
2167
2169
|
/** Accessible name: makes the scrolling box a named region. */
|
|
2168
2170
|
label?: string;
|
|
2169
|
-
/** The end came within threshold (once per arrival). */
|
|
2170
|
-
onRayReachEnd?: (event: CustomEvent<{ edge: "bottom" | "right" }>) => void;
|
|
2171
|
+
/** The end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left). */
|
|
2172
|
+
onRayReachEnd?: (event: CustomEvent<{ edge: "bottom" | "right" | "left" }>) => void;
|
|
2171
2173
|
}
|
|
2172
2174
|
export type RayScrollAreaProps = RayScrollAreaOwnProps & Omit<React.HTMLAttributes<Ray.RayScrollArea>, keyof RayScrollAreaOwnProps> & { children?: React.ReactNode };
|
|
2173
2175
|
/** <ray-scroll-area> as a React component. */
|
|
@@ -2178,8 +2180,8 @@ export interface RaySeparatorOwnProps {
|
|
|
2178
2180
|
orientation?: "horizontal" | "vertical";
|
|
2179
2181
|
/** Text in the middle of a horizontal rule. */
|
|
2180
2182
|
label?: string;
|
|
2181
|
-
/** Where the label sits. */
|
|
2182
|
-
labelPosition?: "
|
|
2183
|
+
/** Where the label sits: start/end follow the writing direction; left/right are sides of the screen. */
|
|
2184
|
+
labelPosition?: "start" | "center" | "end" | "left" | "right";
|
|
2183
2185
|
/** Thickness (1–5px). */
|
|
2184
2186
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
2185
2187
|
/** Line style. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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.8.0",
|
|
32
32
|
"react": ">=18"
|
|
33
33
|
}
|
|
34
34
|
}
|