@raylang/elements 0.5.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/check/check.d.ts +2 -0
- package/check/check.js +27 -6
- package/check/cli.js +10 -6
- package/components/accordion/accordion.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/attachment/attachment.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/bottom-nav/bottom-nav.js +2 -0
- package/components/breadcrumbs/breadcrumbs.js +1 -1
- package/components/button/button.js +17 -0
- package/components/carousel/carousel.js +4 -4
- package/components/checkbox/checkbox.js +1 -1
- package/components/code/code.js +1 -1
- package/components/color-picker/color-picker.js +1 -1
- package/components/combobox/combobox.js +3 -3
- package/components/command-palette/command-palette.js +1 -1
- package/components/date-picker/date-picker.js +4 -4
- package/components/dialog/dialog.js +1 -1
- package/components/drawer/drawer.js +1 -1
- package/components/file-upload/file-upload.js +1 -1
- package/components/icon/icon.js +6 -1
- package/components/nav-link/nav-link.js +1 -1
- package/components/notification/notification.js +1 -1
- package/components/number-input/number-input.js +55 -9
- package/components/pagination/pagination.js +4 -4
- package/components/password-input/password-input.js +2 -2
- package/components/radio/radio.js +68 -5
- package/components/ring-progress/ring-progress.js +127 -0
- package/components/search/search.js +2 -2
- package/components/select/select.js +2 -2
- package/components/stat/stat.js +1 -1
- package/components/step-dots/step-dots.js +95 -0
- package/components/stepper/stepper.js +1 -1
- package/components/table/table.js +1 -1
- package/components/theme-toggle/theme-toggle.js +2 -2
- package/core/core.js +4 -3
- package/core/icons.js +95 -8
- package/custom-elements.json +700 -43
- package/index.js +3 -1
- package/llms-full.txt +117 -21
- package/llms.txt +18 -5
- package/package.json +9 -1
- package/ray-elements.d.ts +77 -19
- package/vscode.html-custom-data.json +1203 -73
package/index.js
CHANGED
|
@@ -19,7 +19,7 @@ export { RayInput } from "./components/input/input.js";
|
|
|
19
19
|
export { RayNumberInput, parseNumber, formatNumber } from "./components/number-input/number-input.js";
|
|
20
20
|
export { RayPasswordInput } from "./components/password-input/password-input.js";
|
|
21
21
|
export { RayPathInput, dirName, baseName } from "./components/path-input/path-input.js";
|
|
22
|
-
export { RayRadioGroup, RayRadio } from "./components/radio/radio.js";
|
|
22
|
+
export { RayRadioGroup, RayRadio, RayRadioCard } from "./components/radio/radio.js";
|
|
23
23
|
export { RaySearch } from "./components/search/search.js";
|
|
24
24
|
export { RaySegmentedControl } from "./components/segmented-control/segmented-control.js";
|
|
25
25
|
export { RaySelect } from "./components/select/select.js";
|
|
@@ -56,8 +56,10 @@ export { RayAlert } from "./components/alert/alert.js";
|
|
|
56
56
|
export { RayEmptyState } from "./components/empty-state/empty-state.js";
|
|
57
57
|
export { RayNotification, RayToaster, notify, updateNotification, hideNotification, clearNotifications, statusIcon } from "./components/notification/notification.js";
|
|
58
58
|
export { RayProgress } from "./components/progress/progress.js";
|
|
59
|
+
export { RayRingProgress } from "./components/ring-progress/ring-progress.js";
|
|
59
60
|
export { RaySkeleton } from "./components/skeleton/skeleton.js";
|
|
60
61
|
export { RaySpinner } from "./components/spinner/spinner.js";
|
|
62
|
+
export { RayStepDots } from "./components/step-dots/step-dots.js";
|
|
61
63
|
export { RayAppBar } from "./components/app-bar/app-bar.js";
|
|
62
64
|
export { RayAppShell } from "./components/app-shell/app-shell.js";
|
|
63
65
|
export { RayAspectRatio, parseRatio } from "./components/aspect-ratio/aspect-ratio.js";
|
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.
|
|
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.
|
|
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,14 @@ 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).
|
|
79
86
|
- **Overlays are in the top layer**: `ray-dialog` is a native modal
|
|
80
87
|
`<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
|
|
81
88
|
elements. Never fight them with `z-index` or `overflow`.
|
|
@@ -292,7 +299,7 @@ Properties:
|
|
|
292
299
|
- `variant`: `filled` | `light` | `outline` | `subtle` | `default` | `transparent` | `gradient` | `raised`, default `filled`, reflects. Visual style. raised: a physical key on a darker edge that sinks when pressed (mouse, touch or keyboard).
|
|
293
300
|
- `gradient`: string, reflects. With variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
|
|
294
301
|
- `color`: string. A palette color (blue, red…) or any CSS color. Default: the primary color.
|
|
295
|
-
- `size`: `xs
|
|
302
|
+
- `size`: `"xs" | "sm" | "md" | "lg" | "xl" | (string & {})`, default `sm`, reflects. Height, padding and font size: xs…xl or any CSS length (the padding and the font follow).
|
|
296
303
|
- `radius`: `xs` | `sm` | `md` | `lg` | `xl` | `full`. Corner radius. Default: --ray-radius-default.
|
|
297
304
|
- `type`: `button` | `submit` | `reset`, default `button`. submit/reset act on the enclosing form.
|
|
298
305
|
- `disabled`: boolean. Not interactive (also when inside a disabled fieldset).
|
|
@@ -354,7 +361,7 @@ Properties:
|
|
|
354
361
|
- `variant`: `filled` | `light` | `outline` | `subtle` | `default` | `transparent` | `gradient` | `raised`, default `subtle`, reflects. Visual style.
|
|
355
362
|
- `gradient`: string, reflects. With variant=gradient: "from to [deg]", palette colors or CSS colors ("teal blue 90"). Default: the --ray-gradient-* tokens.
|
|
356
363
|
- `color`: string. A palette color or any CSS color.
|
|
357
|
-
- `size`: `xs
|
|
364
|
+
- `size`: `"xs" | "sm" | "md" | "lg" | "xl" | (string & {})`, default `sm`, reflects. Width and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it.
|
|
358
365
|
- `disabled`: boolean. Not interactive.
|
|
359
366
|
- `loading`: boolean. Shows a spinner instead of the icon.
|
|
360
367
|
|
|
@@ -911,7 +918,7 @@ Vue `v-model`: `value` (updated on input).
|
|
|
911
918
|
|
|
912
919
|
### Number input
|
|
913
920
|
|
|
914
|
-
A number field (Mantine's NumberInput): + and − buttons (hold to repeat), arrow keys, min, max and step, fixed decimals, a prefix and a suffix, a thousands separator. An ARIA spinbutton.
|
|
921
|
+
A number field (Mantine's NumberInput): + and − buttons (hold to repeat), arrow keys, min, max and step, fixed decimals, a prefix and a suffix, a thousands separator, or a duration (m:ss). An ARIA spinbutton.
|
|
915
922
|
|
|
916
923
|
Import: `import "@raylang/elements/number-input";` · Category: Inputs
|
|
917
924
|
|
|
@@ -931,6 +938,7 @@ Properties:
|
|
|
931
938
|
- `thousandsSeparator` (attribute `thousands-separator`): string. Groups thousands in the shown text (",", ".", " ").
|
|
932
939
|
- `decimalSeparator` (attribute `decimal-separator`): string, default `.`. The decimal mark shown and typed ("," in many locales).
|
|
933
940
|
- `clamp`: `blur` | `strict` | `none`, default `blur`. When out-of-range input is clamped: on blur, while typing, or never (then it is invalid).
|
|
941
|
+
- `format`: `number` | `duration`, default `number`, reflects. duration: the value is seconds, shown and typed as m:ss (h:mm:ss when min or max reaches an hour; a plain number is seconds); aria-valuetext says "3 minutes, 15 seconds" in the page's language. decimals, prefix, suffix and the separators do not apply.
|
|
934
942
|
- `hideControls` (attribute `hide-controls`): boolean, reflects. No + and − buttons (the keys still step).
|
|
935
943
|
- `placeholder`: string. Shown while empty.
|
|
936
944
|
- `readonly`: boolean, reflects. Not editable, still submitted.
|
|
@@ -1052,7 +1060,7 @@ for e in ui.events() {
|
|
|
1052
1060
|
|
|
1053
1061
|
### Radio group
|
|
1054
1062
|
|
|
1055
|
-
One choice among options: ray-radio elements inside a ray-radio-group, which is the form control.
|
|
1063
|
+
One choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control.
|
|
1056
1064
|
|
|
1057
1065
|
Import: `import "@raylang/elements/radio";` · Category: Inputs
|
|
1058
1066
|
|
|
@@ -1082,11 +1090,11 @@ Events:
|
|
|
1082
1090
|
|
|
1083
1091
|
Slots:
|
|
1084
1092
|
|
|
1085
|
-
- (default): ray-radio elements (may be wrapped in layout elements).
|
|
1093
|
+
- (default): ray-radio or ray-radio-card elements (may be wrapped in layout elements: a ray-grid of cards).
|
|
1086
1094
|
|
|
1087
1095
|
Methods and properties:
|
|
1088
1096
|
|
|
1089
|
-
- `readonly radios: RayRadio[]`: The radios of the group.
|
|
1097
|
+
- `readonly radios: RayRadio[]`: The radios (and radio cards) of the group.
|
|
1090
1098
|
|
|
1091
1099
|
Vue `v-model`: `value` (updated on change).
|
|
1092
1100
|
|
|
@@ -1112,6 +1120,26 @@ Parts (`::part()`):
|
|
|
1112
1120
|
- `indicator`: The circle.
|
|
1113
1121
|
- `label`: The label.
|
|
1114
1122
|
|
|
1123
|
+
#### `<ray-radio-card>` (RayRadioCard, extends RayRadio)
|
|
1124
|
+
|
|
1125
|
+
A radio drawn as a card: a title (label), a detail (description), an icon, more content; checked, it takes the color's border and light background. Inside a ray-radio-group like a ray-radio (arrow keys, the form, required, disabled); put the cards in a ray-grid for columns.
|
|
1126
|
+
|
|
1127
|
+
Properties:
|
|
1128
|
+
|
|
1129
|
+
- `hideIndicator` (attribute `hide-indicator`): boolean, reflects. No radio circle: the card's border and background alone show the choice.
|
|
1130
|
+
|
|
1131
|
+
Also the properties of RayRadio (`<ray-radio>`): `value`, `checked`, `label`, `description`, `disabled`, `color`, `size`, `variant`.
|
|
1132
|
+
|
|
1133
|
+
Slots:
|
|
1134
|
+
|
|
1135
|
+
- (default): More content under the description.
|
|
1136
|
+
- `icon`: An icon before the title.
|
|
1137
|
+
|
|
1138
|
+
Parts (`::part()`):
|
|
1139
|
+
|
|
1140
|
+
- `root`: The card.
|
|
1141
|
+
- `icon`: Around the icon slot.
|
|
1142
|
+
|
|
1115
1143
|
### Search
|
|
1116
1144
|
|
|
1117
1145
|
A search box: icon, clear button, an optional shortcut that focuses it, and a debounced ray-search event. A RayInput, so it has a label and takes part in forms.
|
|
@@ -1427,7 +1455,7 @@ Properties:
|
|
|
1427
1455
|
|
|
1428
1456
|
- `value`: string, reflects. Its value (default: its href, else its label).
|
|
1429
1457
|
- `label`: string. The label.
|
|
1430
|
-
- `icon`:
|
|
1458
|
+
- `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).
|
|
1431
1459
|
- `href`: string, reflects. Makes it a link.
|
|
1432
1460
|
- `badge`: string. A count or a short text on the icon.
|
|
1433
1461
|
- `dot`: boolean, reflects. A dot on the icon (something new).
|
|
@@ -2313,7 +2341,7 @@ Properties:
|
|
|
2313
2341
|
- `href`: string. URL of the source: the inner blockquote's cite attribute.
|
|
2314
2342
|
- `color`: string, reflects. A palette color or any CSS color, for the edge, the mark and the tint. Default: the primary.
|
|
2315
2343
|
- `variant`: `light` | `outline` | `filled`, default `light`, reflects. light: tinted background; outline: border and edge only; filled: solid color (a pull quote).
|
|
2316
|
-
- `icon`:
|
|
2344
|
+
- `icon`: `IconName`, default `quote`. Registry icon of the mark, or none. The icon slot replaces it.
|
|
2317
2345
|
- `size`: `sm` | `md` | `lg`, default `md`, reflects. Text size (lg for a pull quote).
|
|
2318
2346
|
- `padding`: string, reflects. Inner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md.
|
|
2319
2347
|
- `hideEdge` (attribute `hide-edge`): boolean, reflects. No colored edge on the start side (the tint, border and mark stay).
|
|
@@ -2440,11 +2468,12 @@ Import: `import "@raylang/elements/icon";` · Category: Data display
|
|
|
2440
2468
|
|
|
2441
2469
|
#### `<ray-icon>` (RayIcon, extends RayElement)
|
|
2442
2470
|
|
|
2443
|
-
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.
|
|
2471
|
+
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.
|
|
2444
2472
|
|
|
2445
2473
|
Properties:
|
|
2446
2474
|
|
|
2447
|
-
- `name`:
|
|
2475
|
+
- `name`: `IconName`, reflects. Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check).
|
|
2476
|
+
- `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.
|
|
2448
2477
|
- `size`: string, reflects. xs…xl or any CSS length. Default: 1em.
|
|
2449
2478
|
- `label`: string. Accessible name; without it the icon is decorative (hidden from screen readers).
|
|
2450
2479
|
- `color`: string, reflects. A palette color or any CSS color. Default: the text color.
|
|
@@ -2454,6 +2483,10 @@ Parts (`::part()`):
|
|
|
2454
2483
|
|
|
2455
2484
|
- `icon`: The icon box.
|
|
2456
2485
|
|
|
2486
|
+
Types:
|
|
2487
|
+
|
|
2488
|
+
- `"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().
|
|
2489
|
+
|
|
2457
2490
|
### Indicator
|
|
2458
2491
|
|
|
2459
2492
|
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.
|
|
@@ -2616,7 +2649,7 @@ Properties:
|
|
|
2616
2649
|
|
|
2617
2650
|
- `label`: string. The title of the event.
|
|
2618
2651
|
- `time`: string. When ("2 h ago", a date).
|
|
2619
|
-
- `icon`:
|
|
2652
|
+
- `icon`: `IconName`. An icon of the registry in the bullet.
|
|
2620
2653
|
- `color`: string, reflects. Its own color (a failed step in red).
|
|
2621
2654
|
- `lineVariant` (attribute `line-variant`): `solid` | `dashed` | `dotted`, default `solid`, reflects. The line to the next item (dashed: not happened yet).
|
|
2622
2655
|
|
|
@@ -2649,7 +2682,7 @@ Properties:
|
|
|
2649
2682
|
- `color`: string, reflects. A palette color or any CSS color.
|
|
2650
2683
|
- `variant`: `light` | `filled` | `outline` | `default` | `transparent`, default `light`, reflects. Visual style.
|
|
2651
2684
|
- `radius`: `xs` | `sm` | `md` | `lg` | `xl`. Corner radius.
|
|
2652
|
-
- `icon`:
|
|
2685
|
+
- `icon`: `IconName`, reflects. A registered icon name, or none.
|
|
2653
2686
|
- `closable`: boolean, reflects. A close button; closing hides the alert (cancel ray-close to keep it).
|
|
2654
2687
|
- `closeLabel` (attribute `close-label`): string, default `Dismiss`. Accessible name of the close button.
|
|
2655
2688
|
|
|
@@ -2701,7 +2734,7 @@ Properties:
|
|
|
2701
2734
|
|
|
2702
2735
|
- `label`: string. Title.
|
|
2703
2736
|
- `color`: string, reflects. Status color: tints the status icon (and a slotted icon's circle).
|
|
2704
|
-
- `icon`:
|
|
2737
|
+
- `icon`: `IconName`. Status icon from the registry (default: from the color); "none" for no icon.
|
|
2705
2738
|
- `loading`: boolean, reflects. Shows a spinner (notify() does not auto-close it).
|
|
2706
2739
|
- `hideClose` (attribute `hide-close`): boolean, reflects. No close button.
|
|
2707
2740
|
- `withBorder` (attribute `with-border`): boolean, reflects. Draws a border.
|
|
@@ -2777,6 +2810,37 @@ Parts (`::part()`):
|
|
|
2777
2810
|
- `bar`: The filled bar.
|
|
2778
2811
|
- `value`: The percentage beside the bar (show-value on xs, sm, md).
|
|
2779
2812
|
|
|
2813
|
+
### Ring progress
|
|
2814
|
+
|
|
2815
|
+
Progress as a ring (Mantine's RingProgress), with content in the middle: a countdown, a goal, an upload. Announced as a progressbar.
|
|
2816
|
+
|
|
2817
|
+
Import: `import "@raylang/elements/ring-progress";` · Category: Feedback
|
|
2818
|
+
|
|
2819
|
+
#### `<ray-ring-progress>` (RayRingProgress, extends RayElement)
|
|
2820
|
+
|
|
2821
|
+
The arc starts at 12 o'clock and runs clockwise; a countdown is a value that goes down. Without value it spins (indeterminate). The middle holds the default slot (a clock), or the percentage with show-value.
|
|
2822
|
+
|
|
2823
|
+
Properties:
|
|
2824
|
+
|
|
2825
|
+
- `value`: number. Progress, from 0 to max. Unset: indeterminate (a spinning arc).
|
|
2826
|
+
- `max`: number, default `100`. The value of a full ring.
|
|
2827
|
+
- `color`: string, reflects. A palette color or any CSS color. Default: the primary color.
|
|
2828
|
+
- `size`: `"xs" | "sm" | "md" | "lg" | "xl" | (string & {})`, default `md`, reflects. Diameter: xs…xl (3, 5, 7.5, 10, 12.5rem) or any CSS length.
|
|
2829
|
+
- `thickness`: string, reflects. Width of the ring: a CSS length (a bare number is px). Default: a tenth of the diameter.
|
|
2830
|
+
- `roundCaps` (attribute `round-caps`): boolean, reflects. Rounded ends of the arc.
|
|
2831
|
+
- `showValue` (attribute `show-value`): boolean, reflects. Shows the percentage in the middle (when the default slot is empty).
|
|
2832
|
+
- `label`: string. Accessible name (default: Progress).
|
|
2833
|
+
|
|
2834
|
+
Slots:
|
|
2835
|
+
|
|
2836
|
+
- (default): The middle of the ring (a clock, a figure, an icon); its font scales with size.
|
|
2837
|
+
|
|
2838
|
+
Parts (`::part()`):
|
|
2839
|
+
|
|
2840
|
+
- `track`: The background circle.
|
|
2841
|
+
- `bar`: The arc.
|
|
2842
|
+
- `center`: The middle, around the default slot.
|
|
2843
|
+
|
|
2780
2844
|
### Skeleton
|
|
2781
2845
|
|
|
2782
2846
|
A placeholder while content loads: a shimmering block, a circle or text lines; with loaded it shows its content.
|
|
@@ -2824,6 +2888,32 @@ Parts (`::part()`):
|
|
|
2824
2888
|
|
|
2825
2889
|
- `spinner`: The ring.
|
|
2826
2890
|
|
|
2891
|
+
### Step dots
|
|
2892
|
+
|
|
2893
|
+
A row of dots, one per step: done, current, to do. A compact progress for rounds, onboarding pages or a quiz; announced as a progressbar ("Round 4 of 12").
|
|
2894
|
+
|
|
2895
|
+
Import: `import "@raylang/elements/step-dots";` · Category: Feedback
|
|
2896
|
+
|
|
2897
|
+
#### `<ray-step-dots>` (RayStepDots, extends RayElement)
|
|
2898
|
+
|
|
2899
|
+
Dots before value are done (filled), the one at value is current (a filled pill), the rest are to do (empty). Not interactive: for steps the user picks, use ray-stepper (or the dots of ray-carousel). Many dots wrap onto more lines.
|
|
2900
|
+
|
|
2901
|
+
Properties:
|
|
2902
|
+
|
|
2903
|
+
- `count`: number, default `0`. Number of steps (dots).
|
|
2904
|
+
- `value`: number, default `0`. The current step, 0-based; count means every step is done.
|
|
2905
|
+
- `color`: string, reflects. A palette color or any CSS color for done and current dots. Default: the primary color.
|
|
2906
|
+
- `size`: `xs` | `sm` | `md` | `lg` | `xl`, default `sm`, reflects. Size of a dot.
|
|
2907
|
+
- `align`: `start` | `center` | `end`, default `center`, reflects. Where the row sits in its width.
|
|
2908
|
+
- `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.
|
|
2909
|
+
- `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}".
|
|
2910
|
+
- `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".
|
|
2911
|
+
|
|
2912
|
+
Parts (`::part()`):
|
|
2913
|
+
|
|
2914
|
+
- `dots`: The row.
|
|
2915
|
+
- `dot`: Each dot ([data-state] done, current or todo).
|
|
2916
|
+
|
|
2827
2917
|
### App bar
|
|
2828
2918
|
|
|
2829
2919
|
The top bar of a phone screen (Material's top app bar, the iOS navigation bar): back or menu, a title and subtitle, actions, and an optional row under it. It elevates once the content scrolls, or hides while scrolling down.
|
|
@@ -3447,7 +3537,11 @@ breakpoint:
|
|
|
3447
3537
|
|
|
3448
3538
|
The names `<ray-icon name>` and `setIcons()` know (more with `setIcons`):
|
|
3449
3539
|
|
|
3450
|
-
`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`
|
|
3540
|
+
`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`
|
|
3541
|
+
|
|
3542
|
+
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`
|
|
3543
|
+
|
|
3544
|
+
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)
|
|
3451
3545
|
|
|
3452
3546
|
## Core API
|
|
3453
3547
|
|
|
@@ -3508,12 +3602,14 @@ export declare function getCustomPrimary(el?: Element): string | null;
|
|
|
3508
3602
|
|
|
3509
3603
|
// --- icons -------------------------------------------------------------------
|
|
3510
3604
|
|
|
3511
|
-
/** Replaces or adds icons (SVG markup or an SVGElement); repaints every component. */
|
|
3605
|
+
/** Replaces or adds icons (SVG markup or an SVGElement); repaints every component. "<name>:filled" is an icon's filled version. */
|
|
3512
3606
|
export declare function setIcons(icons: Record<string, string | SVGElement>): void;
|
|
3513
|
-
/** The SVG markup of a registered icon ("" if unknown). */
|
|
3514
|
-
export declare function getIcon(name: string): string;
|
|
3515
|
-
/** The registered icon names. */
|
|
3516
|
-
export declare function iconNames(): string[];
|
|
3607
|
+
/** The SVG markup of a registered icon ("" if unknown); with filled, its filled version (the outline one without it). */
|
|
3608
|
+
export declare function getIcon(name: string, options?: { filled?: boolean }): string;
|
|
3609
|
+
/** The registered icon names; with filled, those that have a filled version. */
|
|
3610
|
+
export declare function iconNames(options?: { filled?: boolean }): string[];
|
|
3611
|
+
/** The roles the components draw ("ui.close", "ui.remove", "ui.expand"…) and the glyph each one uses unless the app registers the role. */
|
|
3612
|
+
export declare function iconAliases(): Record<string, string>;
|
|
3517
3613
|
|
|
3518
3614
|
// --- base classes ------------------------------------------------------------
|
|
3519
3615
|
|
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.
|
|
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.
|
|
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,14 @@ 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).
|
|
79
86
|
- **Overlays are in the top layer**: `ray-dialog` is a native modal
|
|
80
87
|
`<dialog>`; popovers, menus, tooltips and notifications are `[popover]`
|
|
81
88
|
elements. Never fight them with `z-index` or `overflow`.
|
|
@@ -268,10 +275,10 @@ Members whose name starts with `_` are internal.
|
|
|
268
275
|
- [Date picker](https://elements.raylang.dev/components/date-picker.md): `<ray-date-picker>`, `<ray-calendar>` (Inputs). A date field with a calendar dropdown, and the calendar on its own.
|
|
269
276
|
- [File upload](https://elements.raylang.dev/components/file-upload.md): `<ray-file-upload>` (Inputs). A drop zone to pick files: drag, click, keyboard or paste.
|
|
270
277
|
- [Input](https://elements.raylang.dev/components/input.md): `<ray-input>` (Inputs). A text field with label, description and error (Mantine's TextInput).
|
|
271
|
-
- [Number input](https://elements.raylang.dev/components/number-input.md): `<ray-number-input>` (Inputs). A number field (Mantine's NumberInput): + and − buttons (hold to repeat), arrow keys, min, max and step, fixed decimals, a prefix and a suffix, a thousands separator.
|
|
278
|
+
- [Number input](https://elements.raylang.dev/components/number-input.md): `<ray-number-input>` (Inputs). A number field (Mantine's NumberInput): + and − buttons (hold to repeat), arrow keys, min, max and step, fixed decimals, a prefix and a suffix, a thousands separator, or a duration (m:ss).
|
|
272
279
|
- [Password input](https://elements.raylang.dev/components/password-input.md): `<ray-password-input>` (Inputs). A password field with a button that shows or hides what was typed (Mantine's PasswordInput).
|
|
273
280
|
- [Path input](https://elements.raylang.dev/components/path-input.md): `<ray-path-input>` (Inputs). A field for a path on disk: a file to open, a folder, or where to save.
|
|
274
|
-
- [Radio group](https://elements.raylang.dev/components/radio.md): `<ray-radio-group>`, `<ray-radio>` (Inputs). One choice among options: ray-radio elements inside a ray-radio-group, which is the form control.
|
|
281
|
+
- [Radio group](https://elements.raylang.dev/components/radio.md): `<ray-radio-group>`, `<ray-radio>`, `<ray-radio-card>` (Inputs). One choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control.
|
|
275
282
|
- [Search](https://elements.raylang.dev/components/search.md): `<ray-search>` (Inputs). A search box: icon, clear button, an optional shortcut that focuses it, and a debounced ray-search event.
|
|
276
283
|
- [Segmented control](https://elements.raylang.dev/components/segmented-control.md): `<ray-segmented-control>` (Inputs). One choice among a few, as a segmented row with a sliding indicator.
|
|
277
284
|
- [Select](https://elements.raylang.dev/components/select.md): `<ray-select>` (Inputs). A select with its own dropdown (keyboard, typeahead, groups); options from child <option> elements or the data property.
|
|
@@ -308,8 +315,10 @@ Members whose name starts with `_` are internal.
|
|
|
308
315
|
- [Empty state](https://elements.raylang.dev/components/empty-state.md): `<ray-empty-state>` (Feedback). What a list, table or pane shows when it is empty: icon, title, text and the action that fills it.
|
|
309
316
|
- [Notification](https://elements.raylang.dev/components/notification.md): `<ray-notification>`, `<ray-toaster>` (Feedback). Toasts: notify(), updateNotification(), hideNotification(), clearNotifications(); shown in a ray-toaster (a polite live region in the top layer).
|
|
310
317
|
- [Progress](https://elements.raylang.dev/components/progress.md): `<ray-progress>` (Feedback). A determinate or (without value) indeterminate progress bar, announced as a progressbar.
|
|
318
|
+
- [Ring progress](https://elements.raylang.dev/components/ring-progress.md): `<ray-ring-progress>` (Feedback). Progress as a ring (Mantine's RingProgress), with content in the middle: a countdown, a goal, an upload.
|
|
311
319
|
- [Skeleton](https://elements.raylang.dev/components/skeleton.md): `<ray-skeleton>` (Feedback). A placeholder while content loads: a shimmering block, a circle or text lines; with loaded it shows its content.
|
|
312
320
|
- [Spinner](https://elements.raylang.dev/components/spinner.md): `<ray-spinner>` (Feedback). An indeterminate loading indicator, announced as a status.
|
|
321
|
+
- [Step dots](https://elements.raylang.dev/components/step-dots.md): `<ray-step-dots>` (Feedback). A row of dots, one per step: done, current, to do.
|
|
313
322
|
- [App bar](https://elements.raylang.dev/components/app-bar.md): `<ray-app-bar>` (Layout). The top bar of a phone screen (Material's top app bar, the iOS navigation bar): back or menu, a title and subtitle, actions, and an optional row under it.
|
|
314
323
|
- [App shell](https://elements.raylang.dev/components/app-shell.md): `<ray-app-shell>` (Layout). The frame of an app (Mantine's AppShell): header, navbar, main, aside and footer on wide screens; on phones one column with a bottom bar.
|
|
315
324
|
- [Aspect ratio](https://elements.raylang.dev/components/aspect-ratio.md): `<ray-aspect-ratio>` (Layout). A box with a fixed width/height ratio; its image, video or iframe fills it.
|
|
@@ -327,7 +336,11 @@ Members whose name starts with `_` are internal.
|
|
|
327
336
|
|
|
328
337
|
## Icons
|
|
329
338
|
|
|
330
|
-
`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`
|
|
339
|
+
`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`
|
|
340
|
+
|
|
341
|
+
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`
|
|
342
|
+
|
|
343
|
+
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)
|
|
331
344
|
|
|
332
345
|
## Reference
|
|
333
346
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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"],
|
|
@@ -244,6 +244,10 @@
|
|
|
244
244
|
"types": "./ray-elements.d.ts",
|
|
245
245
|
"default": "./components/progress/progress.js"
|
|
246
246
|
},
|
|
247
|
+
"./ring-progress": {
|
|
248
|
+
"types": "./ray-elements.d.ts",
|
|
249
|
+
"default": "./components/ring-progress/ring-progress.js"
|
|
250
|
+
},
|
|
247
251
|
"./skeleton": {
|
|
248
252
|
"types": "./ray-elements.d.ts",
|
|
249
253
|
"default": "./components/skeleton/skeleton.js"
|
|
@@ -252,6 +256,10 @@
|
|
|
252
256
|
"types": "./ray-elements.d.ts",
|
|
253
257
|
"default": "./components/spinner/spinner.js"
|
|
254
258
|
},
|
|
259
|
+
"./step-dots": {
|
|
260
|
+
"types": "./ray-elements.d.ts",
|
|
261
|
+
"default": "./components/step-dots/step-dots.js"
|
|
262
|
+
},
|
|
255
263
|
"./app-bar": {
|
|
256
264
|
"types": "./ray-elements.d.ts",
|
|
257
265
|
"default": "./components/app-bar/app-bar.js"
|
package/ray-elements.d.ts
CHANGED
|
@@ -54,12 +54,14 @@ export declare function getCustomPrimary(el?: Element): string | null;
|
|
|
54
54
|
|
|
55
55
|
// --- icons -------------------------------------------------------------------
|
|
56
56
|
|
|
57
|
-
/** Replaces or adds icons (SVG markup or an SVGElement); repaints every component. */
|
|
57
|
+
/** Replaces or adds icons (SVG markup or an SVGElement); repaints every component. "<name>:filled" is an icon's filled version. */
|
|
58
58
|
export declare function setIcons(icons: Record<string, string | SVGElement>): void;
|
|
59
|
-
/** The SVG markup of a registered icon ("" if unknown). */
|
|
60
|
-
export declare function getIcon(name: string): string;
|
|
61
|
-
/** The registered icon names. */
|
|
62
|
-
export declare function iconNames(): string[];
|
|
59
|
+
/** The SVG markup of a registered icon ("" if unknown); with filled, its filled version (the outline one without it). */
|
|
60
|
+
export declare function getIcon(name: string, options?: { filled?: boolean }): string;
|
|
61
|
+
/** The registered icon names; with filled, those that have a filled version. */
|
|
62
|
+
export declare function iconNames(options?: { filled?: boolean }): string[];
|
|
63
|
+
/** The roles the components draw ("ui.close", "ui.remove", "ui.expand"…) and the glyph each one uses unless the app registers the role. */
|
|
64
|
+
export declare function iconAliases(): Record<string, string>;
|
|
63
65
|
|
|
64
66
|
// --- base classes ------------------------------------------------------------
|
|
65
67
|
|
|
@@ -361,8 +363,8 @@ export declare class RayButton extends RayElement {
|
|
|
361
363
|
gradient: string | undefined;
|
|
362
364
|
/** A palette color (blue, red…) or any CSS color. Default: the primary color. */
|
|
363
365
|
color: string | undefined;
|
|
364
|
-
/** Height, padding and font size. */
|
|
365
|
-
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
366
|
+
/** Height, padding and font size: xs…xl or any CSS length (the padding and the font follow). */
|
|
367
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
366
368
|
/** Corner radius. Default: --ray-radius-default. */
|
|
367
369
|
radius: "xs" | "sm" | "md" | "lg" | "xl" | "full" | undefined;
|
|
368
370
|
/** submit/reset act on the enclosing form. */
|
|
@@ -407,8 +409,8 @@ export declare class RayIconButton extends RayButton {
|
|
|
407
409
|
gradient: string | undefined;
|
|
408
410
|
/** A palette color or any CSS color. */
|
|
409
411
|
color: string | undefined;
|
|
410
|
-
/** Width and height. */
|
|
411
|
-
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
412
|
+
/** Width and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it. */
|
|
413
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
412
414
|
/** Not interactive. */
|
|
413
415
|
disabled: boolean | undefined;
|
|
414
416
|
/** Shows a spinner instead of the icon. */
|
|
@@ -865,6 +867,8 @@ export declare class RayNumberInput extends FieldControl {
|
|
|
865
867
|
decimalSeparator: string;
|
|
866
868
|
/** When out-of-range input is clamped: on blur, while typing, or never (then it is invalid). */
|
|
867
869
|
clamp: "blur" | "strict" | "none";
|
|
870
|
+
/** duration: the value is seconds, shown and typed as m:ss (h:mm:ss when min or max reaches an hour; a plain number is seconds); aria-valuetext says "3 minutes, 15 seconds" in the page's language. decimals, prefix, suffix and the separators do not apply. */
|
|
871
|
+
format: "number" | "duration";
|
|
868
872
|
/** No + and − buttons (the keys still step). */
|
|
869
873
|
hideControls: boolean | undefined;
|
|
870
874
|
/** Shown while empty. */
|
|
@@ -950,10 +954,10 @@ export declare class RayRadioGroup extends FormControl {
|
|
|
950
954
|
color: string | undefined;
|
|
951
955
|
/** Checked look of every radio: filled circle, or colored ring and dot. */
|
|
952
956
|
variant: "filled" | "outline";
|
|
953
|
-
/** The radios of the group. */
|
|
957
|
+
/** The radios (and radio cards) of the group. */
|
|
954
958
|
readonly radios: RayRadio[];
|
|
955
959
|
}
|
|
956
|
-
/** <ray-radio> One choice among options: ray-radio elements inside a ray-radio-group, which is the form control. */
|
|
960
|
+
/** <ray-radio> One choice among options: ray-radio (or ray-radio-card) elements inside a ray-radio-group, which is the form control. */
|
|
957
961
|
export declare class RayRadio extends RayElement {
|
|
958
962
|
/** Value given to the group when chosen. */
|
|
959
963
|
value: string | undefined;
|
|
@@ -972,6 +976,11 @@ export declare class RayRadio extends RayElement {
|
|
|
972
976
|
/** Overrides the group variant. */
|
|
973
977
|
variant: "filled" | "outline" | undefined;
|
|
974
978
|
}
|
|
979
|
+
/** <ray-radio-card> A radio drawn as a card: a title (label), a detail (description), an icon, more content; checked, it takes the color's border and light background. Inside a ray-radio-group like a ray-radio (arrow keys, the form, required, disabled); put the cards in a ray-grid for columns. */
|
|
980
|
+
export declare class RayRadioCard extends RayRadio {
|
|
981
|
+
/** No radio circle: the card's border and background alone show the choice. */
|
|
982
|
+
hideIndicator: boolean | undefined;
|
|
983
|
+
}
|
|
975
984
|
|
|
976
985
|
// --- Search (search)
|
|
977
986
|
/** <ray-search> Escape clears it (when it has text); Enter fires ray-search at once. JS: clear(), focus(). */
|
|
@@ -1209,8 +1218,8 @@ export declare class RayBottomNavItem extends RayElement {
|
|
|
1209
1218
|
value: string | undefined;
|
|
1210
1219
|
/** The label. */
|
|
1211
1220
|
label: string | undefined;
|
|
1212
|
-
/** An icon of the registry (or put one in the icon slot). */
|
|
1213
|
-
icon:
|
|
1221
|
+
/** 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). */
|
|
1222
|
+
icon: IconName | undefined;
|
|
1214
1223
|
/** Makes it a link. */
|
|
1215
1224
|
href: string | undefined;
|
|
1216
1225
|
/** A count or a short text on the icon. */
|
|
@@ -1825,7 +1834,7 @@ export declare class RayBlockquote extends RayElement {
|
|
|
1825
1834
|
/** light: tinted background; outline: border and edge only; filled: solid color (a pull quote). */
|
|
1826
1835
|
variant: "light" | "outline" | "filled";
|
|
1827
1836
|
/** Registry icon of the mark, or none. The icon slot replaces it. */
|
|
1828
|
-
icon:
|
|
1837
|
+
icon: IconName;
|
|
1829
1838
|
/** Text size (lg for a pull quote). */
|
|
1830
1839
|
size: "sm" | "md" | "lg";
|
|
1831
1840
|
/** Inner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md. */
|
|
@@ -1921,10 +1930,14 @@ export interface RayCodeEventMap extends HTMLElementEventMap {
|
|
|
1921
1930
|
}
|
|
1922
1931
|
|
|
1923
1932
|
// --- Icon (icon)
|
|
1924
|
-
/**
|
|
1933
|
+
/** An icon name: one of the default set, or any name an app registers with setIcons(). */
|
|
1934
|
+
export type IconName = "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 & {});
|
|
1935
|
+
/** <ray-icon> 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. */
|
|
1925
1936
|
export declare class RayIcon extends RayElement {
|
|
1926
1937
|
/** Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check). */
|
|
1927
|
-
name:
|
|
1938
|
+
name: IconName | undefined;
|
|
1939
|
+
/** 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
|
+
filled: boolean | undefined;
|
|
1928
1941
|
/** xs…xl or any CSS length. Default: 1em. */
|
|
1929
1942
|
size: string | undefined;
|
|
1930
1943
|
/** Accessible name; without it the icon is decorative (hidden from screen readers). */
|
|
@@ -2070,7 +2083,7 @@ export declare class RayTimelineItem extends RayElement {
|
|
|
2070
2083
|
/** When ("2 h ago", a date). */
|
|
2071
2084
|
time: string | undefined;
|
|
2072
2085
|
/** An icon of the registry in the bullet. */
|
|
2073
|
-
icon:
|
|
2086
|
+
icon: IconName | undefined;
|
|
2074
2087
|
/** Its own color (a failed step in red). */
|
|
2075
2088
|
color: string | undefined;
|
|
2076
2089
|
/** The line to the next item (dashed: not happened yet). */
|
|
@@ -2089,7 +2102,7 @@ export declare class RayAlert extends RayElement {
|
|
|
2089
2102
|
/** Corner radius. */
|
|
2090
2103
|
radius: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
2091
2104
|
/** A registered icon name, or none. */
|
|
2092
|
-
icon:
|
|
2105
|
+
icon: IconName | undefined;
|
|
2093
2106
|
/** A close button; closing hides the alert (cancel ray-close to keep it). */
|
|
2094
2107
|
closable: boolean | undefined;
|
|
2095
2108
|
/** Accessible name of the close button. */
|
|
@@ -2135,7 +2148,7 @@ export declare class RayNotification extends RayElement {
|
|
|
2135
2148
|
/** Status color: tints the status icon (and a slotted icon's circle). */
|
|
2136
2149
|
color: string | undefined;
|
|
2137
2150
|
/** Status icon from the registry (default: from the color); "none" for no icon. */
|
|
2138
|
-
icon:
|
|
2151
|
+
icon: IconName | undefined;
|
|
2139
2152
|
/** Shows a spinner (notify() does not auto-close it). */
|
|
2140
2153
|
loading: boolean | undefined;
|
|
2141
2154
|
/** No close button. */
|
|
@@ -2198,6 +2211,27 @@ export declare class RayProgress extends RayElement {
|
|
|
2198
2211
|
label: string | undefined;
|
|
2199
2212
|
}
|
|
2200
2213
|
|
|
2214
|
+
// --- Ring progress (ring-progress)
|
|
2215
|
+
/** <ray-ring-progress> The arc starts at 12 o'clock and runs clockwise; a countdown is a value that goes down. Without value it spins (indeterminate). The middle holds the default slot (a clock), or the percentage with show-value. */
|
|
2216
|
+
export declare class RayRingProgress extends RayElement {
|
|
2217
|
+
/** Progress, from 0 to max. Unset: indeterminate (a spinning arc). */
|
|
2218
|
+
value: number | undefined;
|
|
2219
|
+
/** The value of a full ring. */
|
|
2220
|
+
max: number;
|
|
2221
|
+
/** A palette color or any CSS color. Default: the primary color. */
|
|
2222
|
+
color: string | undefined;
|
|
2223
|
+
/** Diameter: xs…xl (3, 5, 7.5, 10, 12.5rem) or any CSS length. */
|
|
2224
|
+
size: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
2225
|
+
/** Width of the ring: a CSS length (a bare number is px). Default: a tenth of the diameter. */
|
|
2226
|
+
thickness: string | undefined;
|
|
2227
|
+
/** Rounded ends of the arc. */
|
|
2228
|
+
roundCaps: boolean | undefined;
|
|
2229
|
+
/** Shows the percentage in the middle (when the default slot is empty). */
|
|
2230
|
+
showValue: boolean | undefined;
|
|
2231
|
+
/** Accessible name (default: Progress). */
|
|
2232
|
+
label: string | undefined;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2201
2235
|
// --- Skeleton (skeleton)
|
|
2202
2236
|
/** <ray-skeleton> aria-busy="true" on the host while loading; the placeholder is aria-hidden. */
|
|
2203
2237
|
export declare class RaySkeleton extends RayElement {
|
|
@@ -2228,6 +2262,27 @@ export declare class RaySpinner extends RayElement {
|
|
|
2228
2262
|
label: string;
|
|
2229
2263
|
}
|
|
2230
2264
|
|
|
2265
|
+
// --- Step dots (step-dots)
|
|
2266
|
+
/** <ray-step-dots> Dots before value are done (filled), the one at value is current (a filled pill), the rest are to do (empty). Not interactive: for steps the user picks, use ray-stepper (or the dots of ray-carousel). Many dots wrap onto more lines. */
|
|
2267
|
+
export declare class RayStepDots extends RayElement {
|
|
2268
|
+
/** Number of steps (dots). */
|
|
2269
|
+
count: number;
|
|
2270
|
+
/** The current step, 0-based; count means every step is done. */
|
|
2271
|
+
value: number;
|
|
2272
|
+
/** A palette color or any CSS color for done and current dots. Default: the primary color. */
|
|
2273
|
+
color: string | undefined;
|
|
2274
|
+
/** Size of a dot. */
|
|
2275
|
+
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
2276
|
+
/** Where the row sits in its width. */
|
|
2277
|
+
align: "start" | "center" | "end";
|
|
2278
|
+
/** 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. */
|
|
2279
|
+
label: string | undefined;
|
|
2280
|
+
/** 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}". */
|
|
2281
|
+
valueText: string | undefined;
|
|
2282
|
+
/** The announced text once every step is done (value = count), with {count}. Default: value-text, else "{count} of {count}, done". */
|
|
2283
|
+
doneText: string | undefined;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2231
2286
|
// --- App bar (app-bar)
|
|
2232
2287
|
/** <ray-app-bar> It follows the scroller of its ray-app-shell, else scroll-target, else the window; clear of the notch (safe-area inset). The title is plain text: put a heading in the default slot when the page needs one. */
|
|
2233
2288
|
export declare class RayAppBar extends RayElement {
|
|
@@ -2500,6 +2555,7 @@ declare global {
|
|
|
2500
2555
|
"ray-path-input": RayPathInput;
|
|
2501
2556
|
"ray-radio-group": RayRadioGroup;
|
|
2502
2557
|
"ray-radio": RayRadio;
|
|
2558
|
+
"ray-radio-card": RayRadioCard;
|
|
2503
2559
|
"ray-search": RaySearch;
|
|
2504
2560
|
"ray-segmented-control": RaySegmentedControl;
|
|
2505
2561
|
"ray-select": RaySelect;
|
|
@@ -2549,8 +2605,10 @@ declare global {
|
|
|
2549
2605
|
"ray-notification": RayNotification;
|
|
2550
2606
|
"ray-toaster": RayToaster;
|
|
2551
2607
|
"ray-progress": RayProgress;
|
|
2608
|
+
"ray-ring-progress": RayRingProgress;
|
|
2552
2609
|
"ray-skeleton": RaySkeleton;
|
|
2553
2610
|
"ray-spinner": RaySpinner;
|
|
2611
|
+
"ray-step-dots": RayStepDots;
|
|
2554
2612
|
"ray-app-bar": RayAppBar;
|
|
2555
2613
|
"ray-app-shell": RayAppShell;
|
|
2556
2614
|
"ray-aspect-ratio": RayAspectRatio;
|