@raylang/elements 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.
Files changed (61) hide show
  1. package/base.css +1 -1
  2. package/check/check.d.ts +2 -0
  3. package/check/check.js +18 -4
  4. package/check/cli.js +10 -6
  5. package/components/accordion/accordion.js +8 -5
  6. package/components/alert/alert.js +3 -2
  7. package/components/attachment/attachment.js +5 -6
  8. package/components/avatar/avatar.js +1 -1
  9. package/components/blockquote/blockquote.js +2 -2
  10. package/components/bottom-nav/bottom-nav.js +5 -3
  11. package/components/breadcrumbs/breadcrumbs.js +1 -1
  12. package/components/carousel/carousel.js +26 -14
  13. package/components/checkbox/checkbox.js +6 -3
  14. package/components/checkbox-group/checkbox-group.js +1 -1
  15. package/components/code/code.js +9 -7
  16. package/components/color-picker/color-picker.js +6 -6
  17. package/components/combobox/combobox.js +5 -4
  18. package/components/command-palette/command-palette.js +2 -2
  19. package/components/date-picker/date-picker.js +9 -7
  20. package/components/dialog/dialog.js +2 -2
  21. package/components/drawer/drawer.js +28 -10
  22. package/components/file-upload/file-upload.js +1 -1
  23. package/components/icon/icon.js +9 -1
  24. package/components/indicator/indicator.js +2 -1
  25. package/components/menu/menu.js +1 -1
  26. package/components/nav-link/nav-link.js +6 -3
  27. package/components/notification/notification.js +16 -13
  28. package/components/number-input/number-input.js +1 -1
  29. package/components/pagination/pagination.js +4 -4
  30. package/components/password-input/password-input.js +2 -2
  31. package/components/progress/progress.js +2 -2
  32. package/components/radio/radio.js +4 -2
  33. package/components/scroll-area/scroll-area.js +14 -11
  34. package/components/search/search.js +5 -5
  35. package/components/segmented-control/segmented-control.js +5 -3
  36. package/components/select/select.js +5 -5
  37. package/components/separator/separator.js +8 -3
  38. package/components/sidebar/sidebar.js +14 -6
  39. package/components/slider/slider.js +5 -2
  40. package/components/split/split.js +12 -6
  41. package/components/stat/stat.js +1 -1
  42. package/components/step-dots/step-dots.js +11 -2
  43. package/components/stepper/stepper.js +5 -5
  44. package/components/switch/switch.js +3 -3
  45. package/components/table/table.js +6 -6
  46. package/components/tabs/tabs.js +11 -8
  47. package/components/theme-toggle/theme-toggle.js +2 -2
  48. package/components/timeline/timeline.js +13 -8
  49. package/components/toggle-group/toggle-group.js +6 -4
  50. package/core/core.js +10 -4
  51. package/core/direction.js +19 -0
  52. package/core/icons.js +107 -8
  53. package/core/position.js +11 -3
  54. package/core/styles.js +1 -1
  55. package/core.js +1 -0
  56. package/custom-elements.json +151 -79
  57. package/llms-full.txt +75 -31
  58. package/llms.txt +32 -3
  59. package/package.json +1 -1
  60. package/ray-elements.d.ts +56 -39
  61. package/vscode.html-custom-data.json +1102 -39
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.6.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>`,
@@ -75,7 +75,17 @@ reference of every component follows them.
75
75
  (`label` is required: it is the accessible name). Add or replace icons with
76
76
  `setIcons({ inbox: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">…</svg>' })`
77
77
  (the style of the built-in set: 24×24, a 2px `currentColor` stroke) from
78
- your own code, never from user input.
78
+ your own code, never from user input. `filled` draws an icon's filled
79
+ version for a state (`<ray-icon name="star" filled>` when it is a favorite);
80
+ `"name:filled"` in `setIcons` adds one. An icon the set lacks (`trash`,
81
+ `save`): register it from Lucide, the same grid and stroke —
82
+ `import { Trash2 } from "lucide-static"; setIcons({ trash: Trash2 })` (or
83
+ its SVG pasted in, without a bundler); never draw your own paths. To change
84
+ one control's icon (only the chips' ×), register its role
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>`).
79
89
  - **Overlays are in the top layer**: `ray-dialog` is a native modal
80
90
  `<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
81
91
  elements. Never fight them with `z-index` or `overflow`.
@@ -157,6 +167,21 @@ green a check, red an error, yellow a warning, others info).
157
167
  - App-wide defaults for a component: `configure({ defaults: { "ray-button":
158
168
  { variant: "light" } } })`.
159
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
+
160
185
  ## React and Vue
161
186
 
162
187
  ```tsx
@@ -456,7 +481,7 @@ Properties:
456
481
  - `variant`: `filled` | `outline`, default `filled`, reflects. Checked look: filled box, or colored border and mark.
457
482
  - `color`: string. A palette color or any CSS color for the checked state.
458
483
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Box and font size.
459
- - `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.
460
485
 
461
486
  Also the properties of FieldControl: `radius`, `descriptionPosition`.
462
487
 
@@ -1327,7 +1352,7 @@ Properties:
1327
1352
  - `label`: string. Label text (or the content).
1328
1353
  - `description`: string. Help text.
1329
1354
  - `error`: string. Error text.
1330
- - `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.
1331
1356
  - `color`: string. Track color when on.
1332
1357
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Track size.
1333
1358
  - `disabled`: boolean. Not interactive nor submitted.
@@ -1448,7 +1473,7 @@ Properties:
1448
1473
 
1449
1474
  - `value`: string, reflects. Its value (default: its href, else its label).
1450
1475
  - `label`: string. The label.
1451
- - `icon`: string. An icon of the registry (or put one in the icon slot).
1476
+ - `icon`: `IconName`. 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).
1452
1477
  - `href`: string, reflects. Makes it a link.
1453
1478
  - `badge`: string. A count or a short text on the icon.
1454
1479
  - `dot`: boolean, reflects. A dot on the icon (something new).
@@ -1627,7 +1652,7 @@ Properties:
1627
1652
 
1628
1653
  - `collapsed`: boolean, reflects. Wide screens: an icon rail instead of the full panel.
1629
1654
  - `open`: boolean, reflects. Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it).
1630
- - `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.
1631
1656
  - `variant`: `sidebar` | `floating`, default `sidebar`, reflects. A panel against the edge, or a floating card with a margin.
1632
1657
  - `width`: string. Width when expanded (CSS length). Default 16rem.
1633
1658
  - `collapsedWidth` (attribute `collapsed-width`): string. Width of the icon rail. Default 3.5rem.
@@ -1690,7 +1715,7 @@ Properties:
1690
1715
 
1691
1716
  - `active`: number, default `0`, reflects. Index of the active step (steps.length: completed).
1692
1717
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Steps in a row above the content, or in a column beside it.
1693
- - `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.
1694
1719
  - `allowStepSelect` (attribute `allow-step-select`): boolean, reflects. Completed steps are buttons that go back to them.
1695
1720
  - `linear`: boolean, default `true`. With allow-step-select off, false lets the user jump to any step.
1696
1721
  - `size`: `sm` | `md` | `lg`, default `md`, reflects. Size of the numbers.
@@ -1962,7 +1987,7 @@ Properties:
1962
1987
  - `open`: boolean, reflects. Shown.
1963
1988
  - `label`: string. Heading (also the accessible name).
1964
1989
  - `description`: string. A line under the title (the drawer's accessible description).
1965
- - `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.
1966
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.
1967
1992
  - `modeless`: boolean, reflects. No backdrop nor scroll lock: the page stays interactive (a side panel).
1968
1993
  - `floating`: boolean, reflects. Detached from the edge, with rounded corners.
@@ -2006,7 +2031,7 @@ Import: `import "@raylang/elements/menu";` · Category: Overlays
2006
2031
  Properties:
2007
2032
 
2008
2033
  - `open`: boolean, reflects. Shown.
2009
- - `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).
2010
2035
  - `context`: boolean, reflects. Opens on right click (contextmenu) over the trigger area, at the pointer.
2011
2036
  - `keepOpen` (attribute `keep-open`): boolean, reflects. Choosing an item does not close the menu.
2012
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.
@@ -2090,7 +2115,7 @@ Positioned in JS (flip + shift to stay in the viewport). JS: show(), hide(), tog
2090
2115
  Properties:
2091
2116
 
2092
2117
  - `open`: boolean, reflects. Shown.
2093
- - `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).
2094
2119
  - `offset`: number, default `8`. Gap to the trigger in px.
2095
2120
  - `width`: string. Panel width (px number or CSS length). Default: its content.
2096
2121
  - `matchWidth` (attribute `match-width`): boolean. At least as wide as the trigger.
@@ -2131,7 +2156,7 @@ Import: `import "@raylang/elements/tooltip";` · Category: Overlays
2131
2156
  Properties:
2132
2157
 
2133
2158
  - `label`: string. Tooltip text.
2134
- - `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.
2135
2160
  - `openDelay` (attribute `open-delay`): number, default `300`. ms before showing.
2136
2161
  - `closeDelay` (attribute `close-delay`): number, default `0`. ms before hiding.
2137
2162
  - `color`: string. A palette color or any CSS color. Default: inverted foreground/background.
@@ -2167,7 +2192,7 @@ Properties:
2167
2192
  - `value`: `string | string[] | undefined`. Open item's value; with multiple, an array (attribute: comma-separated).
2168
2193
  - `multiple`: boolean, reflects. Several items may be open.
2169
2194
  - `variant`: `default` | `contained` | `separated` | `filled`, default `default`, reflects. Visual style.
2170
- - `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.
2171
2196
 
2172
2197
  Events:
2173
2198
 
@@ -2334,7 +2359,7 @@ Properties:
2334
2359
  - `href`: string. URL of the source: the inner blockquote's cite attribute.
2335
2360
  - `color`: string, reflects. A palette color or any CSS color, for the edge, the mark and the tint. Default: the primary.
2336
2361
  - `variant`: `light` | `outline` | `filled`, default `light`, reflects. light: tinted background; outline: border and edge only; filled: solid color (a pull quote).
2337
- - `icon`: string, default `quote`. Registry icon of the mark, or none. The icon slot replaces it.
2362
+ - `icon`: `IconName`, default `quote`. Registry icon of the mark, or none. The icon slot replaces it.
2338
2363
  - `size`: `sm` | `md` | `lg`, default `md`, reflects. Text size (lg for a pull quote).
2339
2364
  - `padding`: string, reflects. Inner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md.
2340
2365
  - `hideEdge` (attribute `hide-edge`): boolean, reflects. No colored edge on the start side (the tint, border and mark stay).
@@ -2461,11 +2486,13 @@ Import: `import "@raylang/elements/icon";` · Category: Data display
2461
2486
 
2462
2487
  #### `<ray-icon>` (RayIcon, extends RayElement)
2463
2488
 
2464
- setIcons({ name: '<svg…>' }) replaces or adds icons (SVG markup or an SVGElement, drawn with currentColor); iconNames() lists them. Sizes follow the font unless size; --ray-icon-size and --ray-icon-stroke tune the whole system.
2489
+ setIcons({ name: '<svg…>' }) replaces or adds icons (SVG markup or an SVGElement, drawn with currentColor); iconNames() lists them. An icon may have a filled version for a state (filled; "<name>:filled" in setIcons; iconNames({ filled: true }) lists them). The components draw roles ("ui.close", "ui.remove", "ui.expand"…; iconAliases()), each its glyph until the app registers the role: setIcons({ "ui.remove": … }) changes only the chips' ×. Sizes follow the font unless size; --ray-icon-size and --ray-icon-stroke tune the whole system.
2465
2490
 
2466
2491
  Properties:
2467
2492
 
2468
- - `name`: string, reflects. Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
2493
+ - `name`: `IconName`, reflects. Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
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.
2469
2496
  - `size`: string, reflects. xs…xl or any CSS length. Default: 1em.
2470
2497
  - `label`: string. Accessible name; without it the icon is decorative (hidden from screen readers).
2471
2498
  - `color`: string, reflects. A palette color or any CSS color. Default: the text color.
@@ -2475,6 +2502,10 @@ Parts (`::part()`):
2475
2502
 
2476
2503
  - `icon`: The icon box.
2477
2504
 
2505
+ Types:
2506
+
2507
+ - `"close" | "check" | "minus" | "plus" | "chevron-down" | "chevron-up" | "chevron-right" | "chevron-left" | "chevrons-left" | "chevrons-right" | "search" | "arrow-up-right" | "arrow-down-right" | "sun" | "moon" | "monitor" | "user" | "info" | "circle-check" | "alert-triangle" | "circle-x" | "menu" | "more-horizontal" | "file" | "folder" | "pause" | "play" | "terminal" | "calendar" | "image" | "download" | "eye" | "eye-off" | "bell" | "copy" | "quote" | "pipette" | "star" | "upload" | "paperclip" | "panel-left" | "settings" | "home" | "arrow-left" | "message-circle" | "none" | (string & {})`: An icon name: one of the default set, or any name an app registers with setIcons().
2508
+
2478
2509
  ### Indicator
2479
2510
 
2480
2511
  A dot or a small label on the edge of any element (Mantine's Indicator): "New" on an avatar, an unread count on a bell, an online dot. Nine positions, an inward offset, palette or CSS colors, a border and a live pulse.
@@ -2617,7 +2648,7 @@ A list (role="list") of ray-timeline-item.
2617
2648
  Properties:
2618
2649
 
2619
2650
  - `active`: number, default `-1`, reflects. Index of the last reached item (-1: none).
2620
- - `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.
2621
2652
  - `bulletSize` (attribute `bullet-size`): string. Bullet size: px as a number or a CSS length (default 20px).
2622
2653
  - `lineWidth` (attribute `line-width`): number. Line width in px (default 2).
2623
2654
  - `color`: string, reflects. A palette color or any CSS color for what is reached (default: primary).
@@ -2637,7 +2668,7 @@ Properties:
2637
2668
 
2638
2669
  - `label`: string. The title of the event.
2639
2670
  - `time`: string. When ("2 h ago", a date).
2640
- - `icon`: string. An icon of the registry in the bullet.
2671
+ - `icon`: `IconName`. An icon of the registry in the bullet.
2641
2672
  - `color`: string, reflects. Its own color (a failed step in red).
2642
2673
  - `lineVariant` (attribute `line-variant`): `solid` | `dashed` | `dotted`, default `solid`, reflects. The line to the next item (dashed: not happened yet).
2643
2674
 
@@ -2670,7 +2701,7 @@ Properties:
2670
2701
  - `color`: string, reflects. A palette color or any CSS color.
2671
2702
  - `variant`: `light` | `filled` | `outline` | `default` | `transparent`, default `light`, reflects. Visual style.
2672
2703
  - `radius`: `xs` | `sm` | `md` | `lg` | `xl`. Corner radius.
2673
- - `icon`: string, reflects. A registered icon name, or none.
2704
+ - `icon`: `IconName`, reflects. A registered icon name, or none.
2674
2705
  - `closable`: boolean, reflects. A close button; closing hides the alert (cancel ray-close to keep it).
2675
2706
  - `closeLabel` (attribute `close-label`): string, default `Dismiss`. Accessible name of the close button.
2676
2707
 
@@ -2722,7 +2753,7 @@ Properties:
2722
2753
 
2723
2754
  - `label`: string. Title.
2724
2755
  - `color`: string, reflects. Status color: tints the status icon (and a slotted icon's circle).
2725
- - `icon`: string. Status icon from the registry (default: from the color); "none" for no icon.
2756
+ - `icon`: `IconName`. Status icon from the registry (default: from the color); "none" for no icon.
2726
2757
  - `loading`: boolean, reflects. Shows a spinner (notify() does not auto-close it).
2727
2758
  - `hideClose` (attribute `hide-close`): boolean, reflects. No close button.
2728
2759
  - `withBorder` (attribute `with-border`): boolean, reflects. Draws a border.
@@ -2748,7 +2779,7 @@ Created by notify() when missing; add one yourself to choose its position. A sta
2748
2779
 
2749
2780
  Properties:
2750
2781
 
2751
- - `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.
2752
2783
  - `limit`: number, default `5`. Maximum kept; the oldest go first.
2753
2784
  - `visible`: number, default `3`. Toasts shown in the collapsed stack (the rest wait, hidden).
2754
2785
  - `expand`: boolean, reflects. Always expanded: a list instead of a stack.
@@ -2893,7 +2924,9 @@ Properties:
2893
2924
  - `color`: string, reflects. A palette color or any CSS color for done and current dots. Default: the primary color.
2894
2925
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Size of a dot.
2895
2926
  - `align`: `start` | `center` | `end`, default `center`, reflects. Where the row sits in its width.
2896
- - `label`: string. What a step is called: "Round" is announced "Round 4 of 12" and names the element. Default: Step (named Steps).
2927
+ - `label`: string. 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.
2928
+ - `valueText` (attribute `value-text`): string. 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}".
2929
+ - `doneText` (attribute `done-text`): string. The announced text once every step is done (value = count), with {count}. Default: value-text, else "{count} of {count}, done".
2897
2930
 
2898
2931
  Parts (`::part()`):
2899
2932
 
@@ -3163,7 +3196,7 @@ Properties:
3163
3196
 
3164
3197
  Events:
3165
3198
 
3166
- - `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).
3167
3200
 
3168
3201
  Slots:
3169
3202
 
@@ -3177,8 +3210,8 @@ Parts (`::part()`):
3177
3210
  Methods and properties:
3178
3211
 
3179
3212
  - `readonly viewport: HTMLElement`: The scrolling element (scrollTop, scrollTo…).
3180
- - `scrollToStart(options?: { behavior?: ScrollBehavior }): void`: Scrolls to the top (left).
3181
- - `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).
3182
3215
 
3183
3216
  ### Separator
3184
3217
 
@@ -3192,7 +3225,7 @@ Properties:
3192
3225
 
3193
3226
  - `orientation`: `horizontal` | `vertical`, default `horizontal`, reflects. Direction of the rule.
3194
3227
  - `label`: string, reflects. Text in the middle of a horizontal rule.
3195
- - `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.
3196
3229
  - `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `xs`, reflects. Thickness (1–5px).
3197
3230
  - `variant`: `solid` | `dashed` | `dotted`, default `solid`, reflects. Line style.
3198
3231
 
@@ -3523,7 +3556,11 @@ breakpoint:
3523
3556
 
3524
3557
  The names `<ray-icon name>` and `setIcons()` know (more with `setIcons`):
3525
3558
 
3526
- `close`, `check`, `minus`, `plus`, `chevron-down`, `chevron-up`, `chevron-right`, `chevron-left`, `chevrons-left`, `chevrons-right`, `search`, `arrow-up-right`, `arrow-down-right`, `sun`, `moon`, `monitor`, `user`, `info`, `circle-check`, `alert-triangle`, `circle-x`, `menu`, `more-horizontal`, `file`, `folder`, `pause`, `play`, `terminal`, `calendar`, `image`, `download`, `eye`, `eye-off`, `bell`, `copy`, `pipette`, `star`, `upload`, `paperclip`, `panel-left`, `settings`, `home`, `arrow-left`, `message-circle`
3559
+ `close`, `check`, `minus`, `plus`, `chevron-down`, `chevron-up`, `chevron-right`, `chevron-left`, `chevrons-left`, `chevrons-right`, `search`, `arrow-up-right`, `arrow-down-right`, `sun`, `moon`, `monitor`, `user`, `info`, `circle-check`, `alert-triangle`, `circle-x`, `menu`, `more-horizontal`, `file`, `folder`, `pause`, `play`, `terminal`, `calendar`, `image`, `download`, `eye`, `eye-off`, `bell`, `copy`, `quote`, `pipette`, `star`, `upload`, `paperclip`, `panel-left`, `settings`, `home`, `arrow-left`, `message-circle`
3560
+
3561
+ With a filled version (`<ray-icon name="star" filled>`; the others draw their outline): `user`, `info`, `circle-check`, `alert-triangle`, `circle-x`, `folder`, `bell`, `star`, `settings`, `home`, `message-circle`
3562
+
3563
+ The roles the components draw, each with its default glyph; `setIcons({ "ui.remove": … })` changes one role only, `setIcons({ close: … })` every role that uses the glyph: `ui.close` (close), `ui.clear` (close), `ui.remove` (close), `ui.expand` (chevron-down), `ui.disclosure` (chevron-right), `ui.previous` (chevron-left), `ui.next` (chevron-right), `ui.first` (chevrons-left), `ui.last` (chevrons-right), `ui.separator` (chevron-right), `ui.increment` (chevron-up), `ui.decrement` (chevron-down), `ui.sort` (chevron-up), `ui.checked` (check), `ui.indeterminate` (minus), `ui.copy` (copy), `ui.copied` (check), `ui.show-password` (eye), `ui.hide-password` (eye-off), `ui.play` (play), `ui.pause` (pause), `ui.search` (search), `ui.calendar` (calendar), `ui.eyedropper` (pipette), `ui.upload` (upload), `ui.avatar` (user), `ui.theme-light` (sun), `ui.theme-dark` (moon), `ui.theme-system` (monitor), `ui.trend-up` (arrow-up-right), `ui.trend-down` (arrow-down-right), `ui.trend-flat` (minus)
3527
3564
 
3528
3565
  ## Core API
3529
3566
 
@@ -3584,12 +3621,14 @@ export declare function getCustomPrimary(el?: Element): string | null;
3584
3621
 
3585
3622
  // --- icons -------------------------------------------------------------------
3586
3623
 
3587
- /** Replaces or adds icons (SVG markup or an SVGElement); repaints every component. */
3624
+ /** Replaces or adds icons (SVG markup or an SVGElement); repaints every component. "<name>:filled" is an icon's filled version. */
3588
3625
  export declare function setIcons(icons: Record<string, string | SVGElement>): void;
3589
- /** The SVG markup of a registered icon ("" if unknown). */
3590
- export declare function getIcon(name: string): string;
3591
- /** The registered icon names. */
3592
- export declare function iconNames(): string[];
3626
+ /** The SVG markup of a registered icon ("" if unknown); with filled, its filled version (the outline one without it). */
3627
+ export declare function getIcon(name: string, options?: { filled?: boolean }): string;
3628
+ /** The registered icon names; with filled, those that have a filled version. */
3629
+ export declare function iconNames(options?: { filled?: boolean }): string[];
3630
+ /** The roles the components draw ("ui.close", "ui.remove", "ui.expand"…) and the glyph each one uses unless the app registers the role. */
3631
+ export declare function iconAliases(): Record<string, string>;
3593
3632
 
3594
3633
  // --- base classes ------------------------------------------------------------
3595
3634
 
@@ -3757,6 +3796,7 @@ export declare const srOnlyStyles: CSSStyleSheet;
3757
3796
  // --- positioning and focus ---------------------------------------------------
3758
3797
 
3759
3798
  export interface PlaceOptions {
3799
+ /** side[-align]: top|bottom|left|right, -start|-end; on top/bottom, -start/-end follow the writing direction. */
3760
3800
  placement?: string;
3761
3801
  offset?: number;
3762
3802
  padding?: number;
@@ -3774,6 +3814,10 @@ export declare function autoUpdate(anchor: Element | object, floating: HTMLEleme
3774
3814
  export declare function tabbables(root: Element | ShadowRoot, options?: { lightOnly?: boolean }): HTMLElement[];
3775
3815
  /** Focuses the first [autofocus] or tabbable element; whether something got focus. */
3776
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;
3777
3821
 
3778
3822
  // --- charts (core/charts.js) -----------------------------------------------------
3779
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.6.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>`,
@@ -75,7 +75,17 @@ reference of every component follows them.
75
75
  (`label` is required: it is the accessible name). Add or replace icons with
76
76
  `setIcons({ inbox: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">…</svg>' })`
77
77
  (the style of the built-in set: 24×24, a 2px `currentColor` stroke) from
78
- your own code, never from user input.
78
+ your own code, never from user input. `filled` draws an icon's filled
79
+ version for a state (`<ray-icon name="star" filled>` when it is a favorite);
80
+ `"name:filled"` in `setIcons` adds one. An icon the set lacks (`trash`,
81
+ `save`): register it from Lucide, the same grid and stroke —
82
+ `import { Trash2 } from "lucide-static"; setIcons({ trash: Trash2 })` (or
83
+ its SVG pasted in, without a bundler); never draw your own paths. To change
84
+ one control's icon (only the chips' ×), register its role
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>`).
79
89
  - **Overlays are in the top layer**: `ray-dialog` is a native modal
80
90
  `<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
81
91
  elements. Never fight them with `z-index` or `overflow`.
@@ -157,6 +167,21 @@ green a check, red an error, yellow a warning, others info).
157
167
  - App-wide defaults for a component: `configure({ defaults: { "ray-button":
158
168
  { variant: "light" } } })`.
159
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
+
160
185
  ## React and Vue
161
186
 
162
187
  ```tsx
@@ -329,7 +354,11 @@ Members whose name starts with `_` are internal.
329
354
 
330
355
  ## Icons
331
356
 
332
- `close`, `check`, `minus`, `plus`, `chevron-down`, `chevron-up`, `chevron-right`, `chevron-left`, `chevrons-left`, `chevrons-right`, `search`, `arrow-up-right`, `arrow-down-right`, `sun`, `moon`, `monitor`, `user`, `info`, `circle-check`, `alert-triangle`, `circle-x`, `menu`, `more-horizontal`, `file`, `folder`, `pause`, `play`, `terminal`, `calendar`, `image`, `download`, `eye`, `eye-off`, `bell`, `copy`, `pipette`, `star`, `upload`, `paperclip`, `panel-left`, `settings`, `home`, `arrow-left`, `message-circle`
357
+ `close`, `check`, `minus`, `plus`, `chevron-down`, `chevron-up`, `chevron-right`, `chevron-left`, `chevrons-left`, `chevrons-right`, `search`, `arrow-up-right`, `arrow-down-right`, `sun`, `moon`, `monitor`, `user`, `info`, `circle-check`, `alert-triangle`, `circle-x`, `menu`, `more-horizontal`, `file`, `folder`, `pause`, `play`, `terminal`, `calendar`, `image`, `download`, `eye`, `eye-off`, `bell`, `copy`, `quote`, `pipette`, `star`, `upload`, `paperclip`, `panel-left`, `settings`, `home`, `arrow-left`, `message-circle`
358
+
359
+ With a filled version (`<ray-icon name="star" filled>`; the others draw their outline): `user`, `info`, `circle-check`, `alert-triangle`, `circle-x`, `folder`, `bell`, `star`, `settings`, `home`, `message-circle`
360
+
361
+ The roles the components draw, each with its default glyph; `setIcons({ "ui.remove": … })` changes one role only, `setIcons({ close: … })` every role that uses the glyph: `ui.close` (close), `ui.clear` (close), `ui.remove` (close), `ui.expand` (chevron-down), `ui.disclosure` (chevron-right), `ui.previous` (chevron-left), `ui.next` (chevron-right), `ui.first` (chevrons-left), `ui.last` (chevrons-right), `ui.separator` (chevron-right), `ui.increment` (chevron-up), `ui.decrement` (chevron-down), `ui.sort` (chevron-up), `ui.checked` (check), `ui.indeterminate` (minus), `ui.copy` (copy), `ui.copied` (check), `ui.show-password` (eye), `ui.hide-password` (eye-off), `ui.play` (play), `ui.pause` (pause), `ui.search` (search), `ui.calendar` (calendar), `ui.eyedropper` (pipette), `ui.upload` (upload), `ui.avatar` (user), `ui.theme-light` (sun), `ui.theme-dark` (moon), `ui.theme-system` (monitor), `ui.trend-up` (arrow-up-right), `ui.trend-down` (arrow-down-right), `ui.trend-flat` (minus)
333
362
 
334
363
  ## Reference
335
364
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raylang/elements",
3
- "version": "0.6.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"],