@raylang/elements 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.
Files changed (49) hide show
  1. package/base.css +1 -1
  2. package/components/accordion/accordion.js +7 -4
  3. package/components/alert/alert.js +2 -1
  4. package/components/attachment/attachment.js +4 -5
  5. package/components/blockquote/blockquote.js +2 -2
  6. package/components/bottom-nav/bottom-nav.js +3 -3
  7. package/components/carousel/carousel.js +22 -10
  8. package/components/checkbox/checkbox.js +5 -2
  9. package/components/checkbox-group/checkbox-group.js +1 -1
  10. package/components/code/code.js +8 -6
  11. package/components/color-picker/color-picker.js +5 -5
  12. package/components/combobox/combobox.js +2 -1
  13. package/components/command-palette/command-palette.js +1 -1
  14. package/components/date-picker/date-picker.js +5 -3
  15. package/components/dialog/dialog.js +1 -1
  16. package/components/drawer/drawer.js +27 -9
  17. package/components/icon/icon.js +4 -1
  18. package/components/indicator/indicator.js +2 -1
  19. package/components/menu/menu.js +1 -1
  20. package/components/nav-link/nav-link.js +5 -2
  21. package/components/notification/notification.js +15 -12
  22. package/components/progress/progress.js +2 -2
  23. package/components/radio/radio.js +4 -2
  24. package/components/scroll-area/scroll-area.js +14 -11
  25. package/components/search/search.js +3 -3
  26. package/components/segmented-control/segmented-control.js +5 -3
  27. package/components/select/select.js +3 -3
  28. package/components/separator/separator.js +8 -3
  29. package/components/sidebar/sidebar.js +14 -6
  30. package/components/slider/slider.js +5 -2
  31. package/components/split/split.js +12 -6
  32. package/components/stepper/stepper.js +4 -4
  33. package/components/switch/switch.js +3 -3
  34. package/components/table/table.js +5 -5
  35. package/components/tabs/tabs.js +11 -8
  36. package/components/timeline/timeline.js +13 -8
  37. package/components/toggle-group/toggle-group.js +6 -4
  38. package/core/core.js +6 -1
  39. package/core/direction.js +19 -0
  40. package/core/icons.js +12 -0
  41. package/core/position.js +11 -3
  42. package/core/styles.js +1 -1
  43. package/core.js +1 -0
  44. package/custom-elements.json +80 -62
  45. package/llms-full.txt +41 -17
  46. package/llms.txt +20 -2
  47. package/package.json +1 -1
  48. package/ray-elements.d.ts +32 -25
  49. package/vscode.html-custom-data.json +80 -18
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # ray-elements
2
2
 
3
- > Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.7.0.
3
+ > Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.8.0.
4
4
 
5
5
  ray-elements is a design system of standard web components (custom elements
6
6
  with Shadow DOM, no dependencies): `<ray-button>`, `<ray-input>`,
@@ -82,7 +82,10 @@ reference of every component follows them.
82
82
  `import { Trash2 } from "lucide-static"; setIcons({ trash: Trash2 })` (or
83
83
  its SVG pasted in, without a bundler); never draw your own paths. To change
84
84
  one control's icon (only the chips' ×), register its role
85
- (`setIcons({ "ui.remove": … })`, roles listed in the reference).
85
+ (`setIcons({ "ui.remove": … })`, roles listed in the reference). Under
86
+ `dir="rtl"` the roles that point along the text (`ui.next`…) mirror by
87
+ themselves; an icon of yours that points (back, send) takes `mirror`
88
+ (`<ray-icon name="arrow-left" mirror>`).
86
89
  - **Overlays are in the top layer**: `ray-dialog` is a native modal
87
90
  `<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
88
91
  elements. Never fight them with `z-index` or `overflow`.
@@ -164,6 +167,21 @@ green a check, red an error, yellow a warning, others info).
164
167
  - App-wide defaults for a component: `configure({ defaults: { "ray-button":
165
168
  { variant: "light" } } })`.
166
169
 
170
+ ## Right to left
171
+
172
+ - `dir="rtl"` on `<html>` (with its `lang`) or a subtree mirrors the
173
+ components: layout, the icons that point along the text, arrow keys
174
+ (ArrowLeft is forward), sliders, carousels, splits and floating panels
175
+ (`bottom-start` lines up with the right edge). Nothing to configure.
176
+ - For a side, write `start`/`end` (they follow the direction):
177
+ `label-position="start"`, `<ray-drawer position="start">`,
178
+ `<ray-sidebar side="end">`, `<ray-toaster position="top-start">`.
179
+ `left`/`right` are sides of the screen whatever the direction; use them
180
+ only when the side is meant (a map's legend).
181
+ - Your own CSS: logical properties (`margin-inline-start`, `inset-inline-end`,
182
+ `text-align: start`), never `left`/`right`; an icon of yours that points
183
+ (back, send) takes `mirror`.
184
+
167
185
  ## React and Vue
168
186
 
169
187
  ```tsx
@@ -463,7 +481,7 @@ Properties:
463
481
  - `variant`: `filled` | `outline`, default `filled`, reflects. Checked look: filled box, or colored border and mark.
464
482
  - `color`: string. A palette color or any CSS color for the checked state.
465
483
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Box and font size.
466
- - `labelPosition` (attribute `label-position`): `right` | `left`, default `right`, reflects. Side of the label.
484
+ - `labelPosition` (attribute `label-position`): `end` | `start` | `right` | `left`, default `end`, reflects. Side of the label: start/end follow the writing direction; left/right are sides of the screen.
467
485
 
468
486
  Also the properties of FieldControl: `radius`, `descriptionPosition`.
469
487
 
@@ -1334,7 +1352,7 @@ Properties:
1334
1352
  - `label`: string. Label text (or the content).
1335
1353
  - `description`: string. Help text.
1336
1354
  - `error`: string. Error text.
1337
- - `labelPosition` (attribute `label-position`): `right` | `left`, default `right`, reflects. Side of the label.
1355
+ - `labelPosition` (attribute `label-position`): `end` | `start` | `right` | `left`, default `end`, reflects. Side of the label: start/end follow the writing direction; left/right are sides of the screen.
1338
1356
  - `color`: string. Track color when on.
1339
1357
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Track size.
1340
1358
  - `disabled`: boolean. Not interactive nor submitted.
@@ -1634,7 +1652,7 @@ Properties:
1634
1652
 
1635
1653
  - `collapsed`: boolean, reflects. Wide screens: an icon rail instead of the full panel.
1636
1654
  - `open`: boolean, reflects. Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it).
1637
- - `side`: `left` | `right`, default `left`, reflects. The edge it sits on.
1655
+ - `side`: `start` | `end` | `left` | `right`, default `start`, reflects. 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.
1638
1656
  - `variant`: `sidebar` | `floating`, default `sidebar`, reflects. A panel against the edge, or a floating card with a margin.
1639
1657
  - `width`: string. Width when expanded (CSS length). Default 16rem.
1640
1658
  - `collapsedWidth` (attribute `collapsed-width`): string. Width of the icon rail. Default 3.5rem.
@@ -1697,7 +1715,7 @@ Properties:
1697
1715
 
1698
1716
  - `active`: number, default `0`, reflects. Index of the active step (steps.length: completed).
1699
1717
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Steps in a row above the content, or in a column beside it.
1700
- - `iconPosition` (attribute `icon-position`): `left` | `top`, default `left`, reflects. Label beside the number, or under it (narrow screens, many steps).
1718
+ - `iconPosition` (attribute `icon-position`): `start` | `top` | `left`, default `start`, reflects. Label beside the number (after it in the reading direction), or under it (narrow screens, many steps). "left", its former name, still works.
1701
1719
  - `allowStepSelect` (attribute `allow-step-select`): boolean, reflects. Completed steps are buttons that go back to them.
1702
1720
  - `linear`: boolean, default `true`. With allow-step-select off, false lets the user jump to any step.
1703
1721
  - `size`: `sm` | `md` | `lg`, default `md`, reflects. Size of the numbers.
@@ -1969,7 +1987,7 @@ Properties:
1969
1987
  - `open`: boolean, reflects. Shown.
1970
1988
  - `label`: string. Heading (also the accessible name).
1971
1989
  - `description`: string. A line under the title (the drawer's accessible description).
1972
- - `position`: `right` | `left` | `top` | `bottom`, default `right`, reflects. The edge it slides from.
1990
+ - `position`: `end` | `start` | `right` | `left` | `top` | `bottom`, default `end`, reflects. The edge it slides from: start/end follow the writing direction; left/right are sides of the screen.
1973
1991
  - `size`: `"xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {})`, default `md`, reflects. Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length.
1974
1992
  - `modeless`: boolean, reflects. No backdrop nor scroll lock: the page stays interactive (a side panel).
1975
1993
  - `floating`: boolean, reflects. Detached from the edge, with rounded corners.
@@ -2013,7 +2031,7 @@ Import: `import "@raylang/elements/menu";` · Category: Overlays
2013
2031
  Properties:
2014
2032
 
2015
2033
  - `open`: boolean, reflects. Shown.
2016
- - `placement`: `bottom-start` | `bottom` | `bottom-end` | `top-start` | `top` | `top-end` | `right-start` | `left-start`, default `bottom-start`, reflects. Preferred side and alignment.
2034
+ - `placement`: `bottom-start` | `bottom` | `bottom-end` | `top-start` | `top` | `top-end` | `right-start` | `left-start`, default `bottom-start`, reflects. 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).
2017
2035
  - `context`: boolean, reflects. Opens on right click (contextmenu) over the trigger area, at the pointer.
2018
2036
  - `keepOpen` (attribute `keep-open`): boolean, reflects. Choosing an item does not close the menu.
2019
2037
  - `native`: boolean, reflects. 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.
@@ -2097,7 +2115,7 @@ Positioned in JS (flip + shift to stay in the viewport). JS: show(), hide(), tog
2097
2115
  Properties:
2098
2116
 
2099
2117
  - `open`: boolean, reflects. Shown.
2100
- - `placement`: `bottom` | `bottom-start` | `bottom-end` | `top` | `top-start` | `top-end` | `left` | `left-start` | `left-end` | `right` | `right-start` | `right-end`, default `bottom`, reflects. Preferred side and alignment.
2118
+ - `placement`: `bottom` | `bottom-start` | `bottom-end` | `top` | `top-start` | `top-end` | `left` | `left-start` | `left-end` | `right` | `right-start` | `right-end`, default `bottom`, reflects. 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).
2101
2119
  - `offset`: number, default `8`. Gap to the trigger in px.
2102
2120
  - `width`: string. Panel width (px number or CSS length). Default: its content.
2103
2121
  - `matchWidth` (attribute `match-width`): boolean. At least as wide as the trigger.
@@ -2138,7 +2156,7 @@ Import: `import "@raylang/elements/tooltip";` · Category: Overlays
2138
2156
  Properties:
2139
2157
 
2140
2158
  - `label`: string. Tooltip text.
2141
- - `placement`: `top` | `bottom` | `left` | `right` | `top-start` | `top-end` | `bottom-start` | `bottom-end`, default `top`, reflects. Preferred side.
2159
+ - `placement`: `top` | `bottom` | `left` | `right` | `top-start` | `top-end` | `bottom-start` | `bottom-end`, default `top`, reflects. Preferred side; -start/-end follow the writing direction.
2142
2160
  - `openDelay` (attribute `open-delay`): number, default `300`. ms before showing.
2143
2161
  - `closeDelay` (attribute `close-delay`): number, default `0`. ms before hiding.
2144
2162
  - `color`: string. A palette color or any CSS color. Default: inverted foreground/background.
@@ -2174,7 +2192,7 @@ Properties:
2174
2192
  - `value`: `string | string[] | undefined`. Open item's value; with multiple, an array (attribute: comma-separated).
2175
2193
  - `multiple`: boolean, reflects. Several items may be open.
2176
2194
  - `variant`: `default` | `contained` | `separated` | `filled`, default `default`, reflects. Visual style.
2177
- - `chevronPosition` (attribute `chevron-position`): `right` | `left`, default `right`, reflects. Side of the chevron.
2195
+ - `chevronPosition` (attribute `chevron-position`): `end` | `start` | `right` | `left`, default `end`, reflects. Side of the chevron: start/end follow the writing direction; left/right are sides of the screen.
2178
2196
 
2179
2197
  Events:
2180
2198
 
@@ -2474,6 +2492,7 @@ Properties:
2474
2492
 
2475
2493
  - `name`: `IconName`, reflects. Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
2476
2494
  - `filled`: boolean, reflects. 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.
2495
+ - `mirror`: boolean, reflects. 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.
2477
2496
  - `size`: string, reflects. xs…xl or any CSS length. Default: 1em.
2478
2497
  - `label`: string. Accessible name; without it the icon is decorative (hidden from screen readers).
2479
2498
  - `color`: string, reflects. A palette color or any CSS color. Default: the text color.
@@ -2629,7 +2648,7 @@ A list (role="list") of ray-timeline-item.
2629
2648
  Properties:
2630
2649
 
2631
2650
  - `active`: number, default `-1`, reflects. Index of the last reached item (-1: none).
2632
- - `align`: `left` | `right`, default `left`, reflects. Side of the line.
2651
+ - `align`: `start` | `end` | `left` | `right`, default `start`, reflects. Side of the line: start/end follow the writing direction; left/right are sides of the screen.
2633
2652
  - `bulletSize` (attribute `bullet-size`): string. Bullet size: px as a number or a CSS length (default 20px).
2634
2653
  - `lineWidth` (attribute `line-width`): number. Line width in px (default 2).
2635
2654
  - `color`: string, reflects. A palette color or any CSS color for what is reached (default: primary).
@@ -2760,7 +2779,7 @@ Created by notify() when missing; add one yourself to choose its position. A sta
2760
2779
 
2761
2780
  Properties:
2762
2781
 
2763
- - `position`: `bottom-right` | `bottom-left` | `bottom-center` | `top-right` | `top-left` | `top-center`, default `bottom-right`, reflects. Corner of the stack.
2782
+ - `position`: `bottom-end` | `bottom-start` | `bottom-center` | `top-end` | `top-start` | `top-center` | `bottom-right` | `bottom-left` | `top-right` | `top-left`, default `bottom-end`, reflects. Corner of the stack: -start/-end follow the writing direction; -left/-right are sides of the screen.
2764
2783
  - `limit`: number, default `5`. Maximum kept; the oldest go first.
2765
2784
  - `visible`: number, default `3`. Toasts shown in the collapsed stack (the rest wait, hidden).
2766
2785
  - `expand`: boolean, reflects. Always expanded: a list instead of a stack.
@@ -3177,7 +3196,7 @@ Properties:
3177
3196
 
3178
3197
  Events:
3179
3198
 
3180
- - `ray-reach-end` (detail `{ edge: "bottom" | "right" }`): The end came within threshold (once per arrival).
3199
+ - `ray-reach-end` (detail `{ edge: "bottom" | "right" | "left" }`): The end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left).
3181
3200
 
3182
3201
  Slots:
3183
3202
 
@@ -3191,8 +3210,8 @@ Parts (`::part()`):
3191
3210
  Methods and properties:
3192
3211
 
3193
3212
  - `readonly viewport: HTMLElement`: The scrolling element (scrollTop, scrollTo…).
3194
- - `scrollToStart(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the top (left).
3195
- - `scrollToEnd(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the bottom (right when horizontal).
3213
+ - `scrollToStart(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the start: the top, or the left when horizontal (the right right to left).
3214
+ - `scrollToEnd(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the end: the bottom, or the right when horizontal (the left right to left).
3196
3215
 
3197
3216
  ### Separator
3198
3217
 
@@ -3206,7 +3225,7 @@ Properties:
3206
3225
 
3207
3226
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Direction of the rule.
3208
3227
  - `label`: string, reflects. Text in the middle of a horizontal rule.
3209
- - `labelPosition` (attribute `label-position`): `left` | `center` | `right`, default `center`, reflects. Where the label sits.
3228
+ - `labelPosition` (attribute `label-position`): `start` | `center` | `end` | `left` | `right`, default `center`, reflects. Where the label sits: start/end follow the writing direction; left/right are sides of the screen.
3210
3229
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `xs`, reflects. Thickness (1–5px).
3211
3230
  - `variant`: `solid` | `dashed` | `dotted`, default `solid`, reflects. Line style.
3212
3231
 
@@ -3777,6 +3796,7 @@ export declare const srOnlyStyles: CSSStyleSheet;
3777
3796
  // --- positioning and focus ---------------------------------------------------
3778
3797
 
3779
3798
  export interface PlaceOptions {
3799
+ /** side[-align]: top|bottom|left|right, -start|-end; on top/bottom, -start/-end follow the writing direction. */
3780
3800
  placement?: string;
3781
3801
  offset?: number;
3782
3802
  padding?: number;
@@ -3794,6 +3814,10 @@ export declare function autoUpdate(anchor: Element | object, floating: HTMLEleme
3794
3814
  export declare function tabbables(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): HTMLElement[];
3795
3815
  /** Focuses the first [autofocus] or tabbable element; whether something got focus. */
3796
3816
  export declare function focusFirst(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): boolean;
3817
+ /** Whether the element lays out right to left (dir="rtl" on it or an ancestor). */
3818
+ export declare function isRtl(el: Element): boolean;
3819
+ /** An arrow key as the reading direction sees it: right to left, ArrowLeft comes back as "ArrowRight" and the reverse. */
3820
+ export declare function inlineKey(key: string, el: Element): string;
3797
3821
 
3798
3822
  // --- charts (core/charts.js) -----------------------------------------------------
3799
3823
 
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # ray-elements
2
2
 
3
- > Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.7.0.
3
+ > Web components (custom elements, Shadow DOM, no dependencies) for any web app: plain HTML, React, Vue or a raylang app. npm: `@raylang/elements`, `@raylang/react`, `@raylang/vue`; raylang: the `elements` package. This file describes version 0.8.0.
4
4
 
5
5
  ray-elements is a design system of standard web components (custom elements
6
6
  with Shadow DOM, no dependencies): `<ray-button>`, `<ray-input>`,
@@ -82,7 +82,10 @@ reference of every component follows them.
82
82
  `import { Trash2 } from "lucide-static"; setIcons({ trash: Trash2 })` (or
83
83
  its SVG pasted in, without a bundler); never draw your own paths. To change
84
84
  one control's icon (only the chips' ×), register its role
85
- (`setIcons({ "ui.remove": … })`, roles listed in the reference).
85
+ (`setIcons({ "ui.remove": … })`, roles listed in the reference). Under
86
+ `dir="rtl"` the roles that point along the text (`ui.next`…) mirror by
87
+ themselves; an icon of yours that points (back, send) takes `mirror`
88
+ (`<ray-icon name="arrow-left" mirror>`).
86
89
  - **Overlays are in the top layer**: `ray-dialog` is a native modal
87
90
  `<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
88
91
  elements. Never fight them with `z-index` or `overflow`.
@@ -164,6 +167,21 @@ green a check, red an error, yellow a warning, others info).
164
167
  - App-wide defaults for a component: `configure({ defaults: { "ray-button":
165
168
  { variant: "light" } } })`.
166
169
 
170
+ ## Right to left
171
+
172
+ - `dir="rtl"` on `<html>` (with its `lang`) or a subtree mirrors the
173
+ components: layout, the icons that point along the text, arrow keys
174
+ (ArrowLeft is forward), sliders, carousels, splits and floating panels
175
+ (`bottom-start` lines up with the right edge). Nothing to configure.
176
+ - For a side, write `start`/`end` (they follow the direction):
177
+ `label-position="start"`, `<ray-drawer position="start">`,
178
+ `<ray-sidebar side="end">`, `<ray-toaster position="top-start">`.
179
+ `left`/`right` are sides of the screen whatever the direction; use them
180
+ only when the side is meant (a map's legend).
181
+ - Your own CSS: logical properties (`margin-inline-start`, `inset-inline-end`,
182
+ `text-align: start`), never `left`/`right`; an icon of yours that points
183
+ (back, send) takes `mirror`.
184
+
167
185
  ## React and Vue
168
186
 
169
187
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raylang/elements",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Web components for any app, with raylang extras (shadcn/ui + Mantine inspired)",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": ["web-components", "custom-elements", "design-system", "ui", "raylang"],
package/ray-elements.d.ts CHANGED
@@ -229,6 +229,7 @@ export declare const srOnlyStyles: CSSStyleSheet;
229
229
  // --- positioning and focus ---------------------------------------------------
230
230
 
231
231
  export interface PlaceOptions {
232
+ /** side[-align]: top|bottom|left|right, -start|-end; on top/bottom, -start/-end follow the writing direction. */
232
233
  placement?: string;
233
234
  offset?: number;
234
235
  padding?: number;
@@ -246,6 +247,10 @@ export declare function autoUpdate(anchor: Element | object, floating: HTMLEleme
246
247
  export declare function tabbables(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): HTMLElement[];
247
248
  /** Focuses the first [autofocus] or tabbable element; whether something got focus. */
248
249
  export declare function focusFirst(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): boolean;
250
+ /** Whether the element lays out right to left (dir="rtl" on it or an ancestor). */
251
+ export declare function isRtl(el: Element): boolean;
252
+ /** An arrow key as the reading direction sees it: right to left, ArrowLeft comes back as "ArrowRight" and the reverse. */
253
+ export declare function inlineKey(key: string, el: Element): string;
249
254
 
250
255
  // --- charts (core/charts.js) -----------------------------------------------------
251
256
 
@@ -488,8 +493,8 @@ export declare class RayCheckbox extends FieldControl {
488
493
  color: string | undefined;
489
494
  /** Box and font size. */
490
495
  size: "xs" | "sm" | "md" | "lg" | "xl";
491
- /** Side of the label. */
492
- labelPosition: "right" | "left";
496
+ /** Side of the label: start/end follow the writing direction; left/right are sides of the screen. */
497
+ labelPosition: "end" | "start" | "right" | "left";
493
498
  }
494
499
 
495
500
  // --- Checkbox group (checkbox-group)
@@ -1137,8 +1142,8 @@ export declare class RaySwitch extends RayCheckbox {
1137
1142
  description: string | undefined;
1138
1143
  /** Error text. */
1139
1144
  error: string | undefined;
1140
- /** Side of the label. */
1141
- labelPosition: "right" | "left";
1145
+ /** Side of the label: start/end follow the writing direction; left/right are sides of the screen. */
1146
+ labelPosition: "end" | "start" | "right" | "left";
1142
1147
  /** Track color when on. */
1143
1148
  color: string | undefined;
1144
1149
  /** Track size. */
@@ -1339,8 +1344,8 @@ export declare class RaySidebar extends RayElement {
1339
1344
  collapsed: boolean | undefined;
1340
1345
  /** Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it). */
1341
1346
  open: boolean | undefined;
1342
- /** The edge it sits on. */
1343
- side: "left" | "right";
1347
+ /** 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. */
1348
+ side: "start" | "end" | "left" | "right";
1344
1349
  /** A panel against the edge, or a floating card with a margin. */
1345
1350
  variant: "sidebar" | "floating";
1346
1351
  /** Width when expanded (CSS length). Default 16rem. */
@@ -1381,8 +1386,8 @@ export declare class RayStepper extends RayElement {
1381
1386
  active: number;
1382
1387
  /** Steps in a row above the content, or in a column beside it. */
1383
1388
  orientation: "horizontal" | "vertical";
1384
- /** Label beside the number, or under it (narrow screens, many steps). */
1385
- iconPosition: "left" | "top";
1389
+ /** Label beside the number (after it in the reading direction), or under it (narrow screens, many steps). "left", its former name, still works. */
1390
+ iconPosition: "start" | "top" | "left";
1386
1391
  /** Completed steps are buttons that go back to them. */
1387
1392
  allowStepSelect: boolean | undefined;
1388
1393
  /** With allow-step-select off, false lets the user jump to any step. */
@@ -1558,8 +1563,8 @@ export declare class RayDrawer extends RayElement {
1558
1563
  label: string | undefined;
1559
1564
  /** A line under the title (the drawer's accessible description). */
1560
1565
  description: string | undefined;
1561
- /** The edge it slides from. */
1562
- position: "right" | "left" | "top" | "bottom";
1566
+ /** The edge it slides from: start/end follow the writing direction; left/right are sides of the screen. */
1567
+ position: "end" | "start" | "right" | "left" | "top" | "bottom";
1563
1568
  /** Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length. */
1564
1569
  size: "xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {});
1565
1570
  /** No backdrop nor scroll lock: the page stays interactive (a side panel). */
@@ -1597,7 +1602,7 @@ export interface RayDrawerEventMap extends HTMLElementEventMap {
1597
1602
  export declare class RayMenu extends Floating {
1598
1603
  /** Shown. */
1599
1604
  open: boolean | undefined;
1600
- /** Preferred side and alignment. */
1605
+ /** 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). */
1601
1606
  placement: "bottom-start" | "bottom" | "bottom-end" | "top-start" | "top" | "top-end" | "right-start" | "left-start";
1602
1607
  /** Opens on right click (contextmenu) over the trigger area, at the pointer. */
1603
1608
  context: boolean | undefined;
@@ -1651,7 +1656,7 @@ export declare class RayMenuDivider extends RayElement {
1651
1656
  export declare class RayPopover extends Floating {
1652
1657
  /** Shown. */
1653
1658
  open: boolean | undefined;
1654
- /** Preferred side and alignment. */
1659
+ /** 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). */
1655
1660
  placement: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
1656
1661
  /** Gap to the trigger in px. */
1657
1662
  offset: number;
@@ -1688,7 +1693,7 @@ export interface RayPopoverEventMap extends HTMLElementEventMap {
1688
1693
  export declare class RayTooltip extends Floating {
1689
1694
  /** Tooltip text. */
1690
1695
  label: string | undefined;
1691
- /** Preferred side. */
1696
+ /** Preferred side; -start/-end follow the writing direction. */
1692
1697
  placement: "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
1693
1698
  /** ms before showing. */
1694
1699
  openDelay: number;
@@ -1717,8 +1722,8 @@ export declare class RayAccordion extends RayElement {
1717
1722
  multiple: boolean | undefined;
1718
1723
  /** Visual style. */
1719
1724
  variant: "default" | "contained" | "separated" | "filled";
1720
- /** Side of the chevron. */
1721
- chevronPosition: "right" | "left";
1725
+ /** Side of the chevron: start/end follow the writing direction; left/right are sides of the screen. */
1726
+ chevronPosition: "end" | "start" | "right" | "left";
1722
1727
  /** The items. */
1723
1728
  readonly items: RayAccordionItem[];
1724
1729
  /** The open values as an array, whatever the mode. */
@@ -1938,6 +1943,8 @@ export declare class RayIcon extends RayElement {
1938
1943
  name: IconName | undefined;
1939
1944
  /** 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. */
1940
1945
  filled: boolean | undefined;
1946
+ /** 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. */
1947
+ mirror: boolean | undefined;
1941
1948
  /** xs…xl or any CSS length. Default: 1em. */
1942
1949
  size: string | undefined;
1943
1950
  /** Accessible name; without it the icon is decorative (hidden from screen readers). */
@@ -2063,8 +2070,8 @@ export interface RayTableEventMap extends HTMLElementEventMap {
2063
2070
  export declare class RayTimeline extends RayElement {
2064
2071
  /** Index of the last reached item (-1: none). */
2065
2072
  active: number;
2066
- /** Side of the line. */
2067
- align: "left" | "right";
2073
+ /** Side of the line: start/end follow the writing direction; left/right are sides of the screen. */
2074
+ align: "start" | "end" | "left" | "right";
2068
2075
  /** Bullet size: px as a number or a CSS length (default 20px). */
2069
2076
  bulletSize: string | undefined;
2070
2077
  /** Line width in px (default 2). */
@@ -2170,8 +2177,8 @@ export interface RayNotificationEventMap extends HTMLElementEventMap {
2170
2177
  }
2171
2178
  /** <ray-toaster> Created by notify() when missing; add one yourself to choose its position. A stack (newest in front, older ones peeking behind) that spreads into a list on hover or keyboard focus; on touch screens a tap expands it, a tap outside collapses it, and a sideways swipe dismisses a toast. Auto-close pauses while expanded. Full width on phones. */
2172
2179
  export declare class RayToaster extends RayElement {
2173
- /** Corner of the stack. */
2174
- position: "bottom-right" | "bottom-left" | "bottom-center" | "top-right" | "top-left" | "top-center";
2180
+ /** Corner of the stack: -start/-end follow the writing direction; -left/-right are sides of the screen. */
2181
+ position: "bottom-end" | "bottom-start" | "bottom-center" | "top-end" | "top-start" | "top-center" | "bottom-right" | "bottom-left" | "top-right" | "top-left";
2175
2182
  /** Maximum kept; the oldest go first. */
2176
2183
  limit: number;
2177
2184
  /** Toasts shown in the collapsed stack (the rest wait, hidden). */
@@ -2430,9 +2437,9 @@ export declare class RayScrollArea extends RayElement {
2430
2437
  label: string | undefined;
2431
2438
  /** The scrolling element (scrollTop, scrollTo…). */
2432
2439
  readonly viewport: HTMLElement;
2433
- /** Scrolls to the top (left). */
2440
+ /** Scrolls to the start: the top, or the left when horizontal (the right right to left). */
2434
2441
  scrollToStart(options?: { behavior?: ScrollBehavior }): void;
2435
- /** Scrolls to the bottom (right when horizontal). */
2442
+ /** Scrolls to the end: the bottom, or the right when horizontal (the left right to left). */
2436
2443
  scrollToEnd(options?: { behavior?: ScrollBehavior }): void;
2437
2444
  addEventListener<K extends keyof RayScrollAreaEventMap>(type: K, listener: (this: RayScrollArea, ev: RayScrollAreaEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
2438
2445
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -2440,8 +2447,8 @@ export declare class RayScrollArea extends RayElement {
2440
2447
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2441
2448
  }
2442
2449
  export interface RayScrollAreaEventMap extends HTMLElementEventMap {
2443
- /** The end came within threshold (once per arrival). */
2444
- "ray-reach-end": CustomEvent<{ edge: "bottom" | "right" }>;
2450
+ /** The end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left). */
2451
+ "ray-reach-end": CustomEvent<{ edge: "bottom" | "right" | "left" }>;
2445
2452
  }
2446
2453
 
2447
2454
  // --- Separator (separator)
@@ -2451,8 +2458,8 @@ export declare class RaySeparator extends RayElement {
2451
2458
  orientation: "horizontal" | "vertical";
2452
2459
  /** Text in the middle of a horizontal rule. */
2453
2460
  label: string | undefined;
2454
- /** Where the label sits. */
2455
- labelPosition: "left" | "center" | "right";
2461
+ /** Where the label sits: start/end follow the writing direction; left/right are sides of the screen. */
2462
+ labelPosition: "start" | "center" | "end" | "left" | "right";
2456
2463
  /** Thickness (1–5px). */
2457
2464
  size: "xs" | "sm" | "md" | "lg" | "xl";
2458
2465
  /** Line style. */
@@ -642,8 +642,14 @@
642
642
  },
643
643
  {
644
644
  "name": "label-position",
645
- "description": "Side of the label.",
645
+ "description": "Side of the label: start/end follow the writing direction; left/right are sides of the screen.",
646
646
  "values": [
647
+ {
648
+ "name": "end"
649
+ },
650
+ {
651
+ "name": "start"
652
+ },
647
653
  {
648
654
  "name": "right"
649
655
  },
@@ -2954,8 +2960,14 @@
2954
2960
  },
2955
2961
  {
2956
2962
  "name": "label-position",
2957
- "description": "Side of the label.",
2963
+ "description": "Side of the label: start/end follow the writing direction; left/right are sides of the screen.",
2958
2964
  "values": [
2965
+ {
2966
+ "name": "end"
2967
+ },
2968
+ {
2969
+ "name": "start"
2970
+ },
2959
2971
  {
2960
2972
  "name": "right"
2961
2973
  },
@@ -3674,8 +3686,14 @@
3674
3686
  },
3675
3687
  {
3676
3688
  "name": "side",
3677
- "description": "The edge it sits on.",
3689
+ "description": "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.",
3678
3690
  "values": [
3691
+ {
3692
+ "name": "start"
3693
+ },
3694
+ {
3695
+ "name": "end"
3696
+ },
3679
3697
  {
3680
3698
  "name": "left"
3681
3699
  },
@@ -3746,13 +3764,16 @@
3746
3764
  },
3747
3765
  {
3748
3766
  "name": "icon-position",
3749
- "description": "Label beside the number, or under it (narrow screens, many steps).",
3767
+ "description": "Label beside the number (after it in the reading direction), or under it (narrow screens, many steps). \"left\", its former name, still works.",
3750
3768
  "values": [
3751
3769
  {
3752
- "name": "left"
3770
+ "name": "start"
3753
3771
  },
3754
3772
  {
3755
3773
  "name": "top"
3774
+ },
3775
+ {
3776
+ "name": "left"
3756
3777
  }
3757
3778
  ]
3758
3779
  },
@@ -4055,8 +4076,14 @@
4055
4076
  },
4056
4077
  {
4057
4078
  "name": "position",
4058
- "description": "The edge it slides from.",
4079
+ "description": "The edge it slides from: start/end follow the writing direction; left/right are sides of the screen.",
4059
4080
  "values": [
4081
+ {
4082
+ "name": "end"
4083
+ },
4084
+ {
4085
+ "name": "start"
4086
+ },
4060
4087
  {
4061
4088
  "name": "right"
4062
4089
  },
@@ -4132,7 +4159,7 @@
4132
4159
  },
4133
4160
  {
4134
4161
  "name": "placement",
4135
- "description": "Preferred side and alignment.",
4162
+ "description": "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).",
4136
4163
  "values": [
4137
4164
  {
4138
4165
  "name": "bottom-start"
@@ -4221,7 +4248,7 @@
4221
4248
  },
4222
4249
  {
4223
4250
  "name": "placement",
4224
- "description": "Preferred side and alignment.",
4251
+ "description": "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).",
4225
4252
  "values": [
4226
4253
  {
4227
4254
  "name": "bottom"
@@ -4312,7 +4339,7 @@
4312
4339
  },
4313
4340
  {
4314
4341
  "name": "placement",
4315
- "description": "Preferred side.",
4342
+ "description": "Preferred side; -start/-end follow the writing direction.",
4316
4343
  "values": [
4317
4344
  {
4318
4345
  "name": "top"
@@ -4401,8 +4428,14 @@
4401
4428
  },
4402
4429
  {
4403
4430
  "name": "chevron-position",
4404
- "description": "Side of the chevron.",
4431
+ "description": "Side of the chevron: start/end follow the writing direction; left/right are sides of the screen.",
4405
4432
  "values": [
4433
+ {
4434
+ "name": "end"
4435
+ },
4436
+ {
4437
+ "name": "start"
4438
+ },
4406
4439
  {
4407
4440
  "name": "right"
4408
4441
  },
@@ -5190,6 +5223,11 @@
5190
5223
  "description": "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.",
5191
5224
  "valueSet": "v"
5192
5225
  },
5226
+ {
5227
+ "name": "mirror",
5228
+ "description": "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.",
5229
+ "valueSet": "v"
5230
+ },
5193
5231
  {
5194
5232
  "name": "size",
5195
5233
  "description": "xs…xl or any CSS length. Default: 1em."
@@ -5455,8 +5493,14 @@
5455
5493
  },
5456
5494
  {
5457
5495
  "name": "align",
5458
- "description": "Side of the line.",
5496
+ "description": "Side of the line: start/end follow the writing direction; left/right are sides of the screen.",
5459
5497
  "values": [
5498
+ {
5499
+ "name": "start"
5500
+ },
5501
+ {
5502
+ "name": "end"
5503
+ },
5460
5504
  {
5461
5505
  "name": "left"
5462
5506
  },
@@ -6073,25 +6117,37 @@
6073
6117
  "attributes": [
6074
6118
  {
6075
6119
  "name": "position",
6076
- "description": "Corner of the stack.",
6120
+ "description": "Corner of the stack: -start/-end follow the writing direction; -left/-right are sides of the screen.",
6077
6121
  "values": [
6078
6122
  {
6079
- "name": "bottom-right"
6123
+ "name": "bottom-end"
6080
6124
  },
6081
6125
  {
6082
- "name": "bottom-left"
6126
+ "name": "bottom-start"
6083
6127
  },
6084
6128
  {
6085
6129
  "name": "bottom-center"
6086
6130
  },
6087
6131
  {
6088
- "name": "top-right"
6132
+ "name": "top-end"
6089
6133
  },
6090
6134
  {
6091
- "name": "top-left"
6135
+ "name": "top-start"
6092
6136
  },
6093
6137
  {
6094
6138
  "name": "top-center"
6139
+ },
6140
+ {
6141
+ "name": "bottom-right"
6142
+ },
6143
+ {
6144
+ "name": "bottom-left"
6145
+ },
6146
+ {
6147
+ "name": "top-right"
6148
+ },
6149
+ {
6150
+ "name": "top-left"
6095
6151
  }
6096
6152
  ]
6097
6153
  },
@@ -6832,14 +6888,20 @@
6832
6888
  },
6833
6889
  {
6834
6890
  "name": "label-position",
6835
- "description": "Where the label sits.",
6891
+ "description": "Where the label sits: start/end follow the writing direction; left/right are sides of the screen.",
6836
6892
  "values": [
6837
6893
  {
6838
- "name": "left"
6894
+ "name": "start"
6839
6895
  },
6840
6896
  {
6841
6897
  "name": "center"
6842
6898
  },
6899
+ {
6900
+ "name": "end"
6901
+ },
6902
+ {
6903
+ "name": "left"
6904
+ },
6843
6905
  {
6844
6906
  "name": "right"
6845
6907
  }