@raylang/react 0.6.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.
@@ -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", "size", "label", "color", "stroke"],
8
+ properties: ["name", "filled", "mirror", "size", "label", "color", "stroke"],
9
9
  events: { },
10
10
  });
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayStepDots = /*#__PURE__*/ createComponent("ray-step-dots", {
7
7
  displayName: "RayStepDots",
8
- properties: ["count", "value", "color", "size", "align", "label"],
8
+ properties: ["count", "value", "color", "size", "align", "label", "valueText", "doneText"],
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. */
@@ -1102,8 +1102,8 @@ export interface RayBottomNavItemOwnProps {
1102
1102
  value?: string;
1103
1103
  /** The label. */
1104
1104
  label?: string;
1105
- /** An icon of the registry (or put one in the icon slot). */
1106
- icon?: string;
1105
+ /** An icon of the registry, drawn filled on the current item when it has a filled version (or put one in the icon slot: yours, as it is). */
1106
+ icon?: Ray.IconName;
1107
1107
  /** Makes it a link. */
1108
1108
  href?: string;
1109
1109
  /** A count or a short text on the icon. */
@@ -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?: "left" | "top";
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
  }
@@ -1629,7 +1629,7 @@ export interface RayBlockquoteOwnProps {
1629
1629
  /** light: tinted background; outline: border and edge only; filled: solid color (a pull quote). */
1630
1630
  variant?: "light" | "outline" | "filled";
1631
1631
  /** Registry icon of the mark, or none. The icon slot replaces it. */
1632
- icon?: string;
1632
+ icon?: Ray.IconName;
1633
1633
  /** Text size (lg for a pull quote). */
1634
1634
  size?: "sm" | "md" | "lg";
1635
1635
  /** Inner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md. */
@@ -1709,7 +1709,11 @@ export declare const RayCode: React.ForwardRefExoticComponent<RayCodeProps & Rea
1709
1709
 
1710
1710
  export interface RayIconOwnProps {
1711
1711
  /** Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check). */
1712
- name?: string;
1712
+ name?: Ray.IconName;
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
+ 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;
1713
1717
  /** xs…xl or any CSS length. Default: 1em. */
1714
1718
  size?: string;
1715
1719
  /** Accessible name; without it the icon is decorative (hidden from screen readers). */
@@ -1828,8 +1832,8 @@ export declare const RayTable: React.ForwardRefExoticComponent<RayTableProps & R
1828
1832
  export interface RayTimelineOwnProps {
1829
1833
  /** Index of the last reached item (-1: none). */
1830
1834
  active?: number;
1831
- /** Side of the line. */
1832
- 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";
1833
1837
  /** Bullet size: px as a number or a CSS length (default 20px). */
1834
1838
  bulletSize?: string;
1835
1839
  /** Line width in px (default 2). */
@@ -1849,7 +1853,7 @@ export interface RayTimelineItemOwnProps {
1849
1853
  /** When ("2 h ago", a date). */
1850
1854
  time?: string;
1851
1855
  /** An icon of the registry in the bullet. */
1852
- icon?: string;
1856
+ icon?: Ray.IconName;
1853
1857
  /** Its own color (a failed step in red). */
1854
1858
  color?: string;
1855
1859
  /** The line to the next item (dashed: not happened yet). */
@@ -1869,7 +1873,7 @@ export interface RayAlertOwnProps {
1869
1873
  /** Corner radius. */
1870
1874
  radius?: "xs" | "sm" | "md" | "lg" | "xl";
1871
1875
  /** A registered icon name, or none. */
1872
- icon?: string;
1876
+ icon?: Ray.IconName;
1873
1877
  /** A close button; closing hides the alert (cancel ray-close to keep it). */
1874
1878
  closable?: boolean;
1875
1879
  /** Accessible name of the close button. */
@@ -1899,7 +1903,7 @@ export interface RayNotificationOwnProps {
1899
1903
  /** Status color: tints the status icon (and a slotted icon's circle). */
1900
1904
  color?: string;
1901
1905
  /** Status icon from the registry (default: from the color); "none" for no icon. */
1902
- icon?: string;
1906
+ icon?: Ray.IconName;
1903
1907
  /** Shows a spinner (notify() does not auto-close it). */
1904
1908
  loading?: boolean;
1905
1909
  /** No close button. */
@@ -1918,8 +1922,8 @@ export type RayNotificationProps = RayNotificationOwnProps & Omit<React.HTMLAttr
1918
1922
  export declare const RayNotification: React.ForwardRefExoticComponent<RayNotificationProps & React.RefAttributes<Ray.RayNotification>>;
1919
1923
 
1920
1924
  export interface RayToasterOwnProps {
1921
- /** Corner of the stack. */
1922
- position?: "bottom-right" | "bottom-left" | "bottom-center" | "top-right" | "top-left" | "top-center";
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";
1923
1927
  /** Maximum kept; the oldest go first. */
1924
1928
  limit?: number;
1925
1929
  /** Toasts shown in the collapsed stack (the rest wait, hidden). */
@@ -2022,8 +2026,12 @@ export interface RayStepDotsOwnProps {
2022
2026
  size?: "xs" | "sm" | "md" | "lg" | "xl";
2023
2027
  /** Where the row sits in its width. */
2024
2028
  align?: "start" | "center" | "end";
2025
- /** What a step is called: "Round" is announced "Round 4 of 12" and names the element. Default: Step (named Steps). */
2029
+ /** What a step is called: "Round" is announced "Round 4 of 12" and names the element. Default: Step (named Steps). In another language, use value-text. */
2026
2030
  label?: string;
2031
+ /** The announced text, {step} (the current one, from 1) and {count} replaced, numbers in the page's language: value-text="Asalto {step} de {count}". Default: "<label> {step} of {count}". */
2032
+ valueText?: string;
2033
+ /** The announced text once every step is done (value = count), with {count}. Default: value-text, else "{count} of {count}, done". */
2034
+ doneText?: string;
2027
2035
  }
2028
2036
  export type RayStepDotsProps = RayStepDotsOwnProps & Omit<React.HTMLAttributes<Ray.RayStepDots>, keyof RayStepDotsOwnProps> & { children?: React.ReactNode };
2029
2037
  /** <ray-step-dots> as a React component. */
@@ -2160,8 +2168,8 @@ export interface RayScrollAreaOwnProps {
2160
2168
  threshold?: number;
2161
2169
  /** Accessible name: makes the scrolling box a named region. */
2162
2170
  label?: string;
2163
- /** The end came within threshold (once per arrival). */
2164
- 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;
2165
2173
  }
2166
2174
  export type RayScrollAreaProps = RayScrollAreaOwnProps & Omit<React.HTMLAttributes<Ray.RayScrollArea>, keyof RayScrollAreaOwnProps> & { children?: React.ReactNode };
2167
2175
  /** <ray-scroll-area> as a React component. */
@@ -2172,8 +2180,8 @@ export interface RaySeparatorOwnProps {
2172
2180
  orientation?: "horizontal" | "vertical";
2173
2181
  /** Text in the middle of a horizontal rule. */
2174
2182
  label?: string;
2175
- /** Where the label sits. */
2176
- labelPosition?: "left" | "center" | "right";
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";
2177
2185
  /** Thickness (1–5px). */
2178
2186
  size?: "xs" | "sm" | "md" | "lg" | "xl";
2179
2187
  /** Line style. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raylang/react",
3
- "version": "0.6.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.6.0",
31
+ "@raylang/elements": "^0.8.0",
32
32
  "react": ">=18"
33
33
  }
34
34
  }