@raylang/react 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayCode = /*#__PURE__*/ createComponent("ray-code", {
7
7
  displayName: "RayCode",
8
- properties: ["code", "language", "filename", "lineNumbers", "highlight", "wrap", "maxHeight", "expanded", "hideCopy", "hideHeader", "size", "radius", "copyLabel", "copiedLabel"],
8
+ properties: ["code", "language", "filename", "lineNumbers", "highlight", "wrap", "verbatim", "maxHeight", "expanded", "hideCopy", "hideHeader", "size", "radius", "copyLabel", "copiedLabel"],
9
9
  events: { onRayCopy: "ray-copy" },
10
10
  });
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayCommandPalette = /*#__PURE__*/ createComponent("ray-command-palette", {
7
7
  displayName: "RayCommandPalette",
8
- properties: ["open", "actions", "query", "placeholder", "hotkey", "limit", "emptyLabel", "label", "hideHint", "nativeMenus", "overlayBlur"],
8
+ properties: ["open", "actions", "query", "placeholder", "hotkey", "limit", "emptyLabel", "label", "hideHint", "navigateLabel", "runLabel", "closeLabel", "nativeMenus", "overlayBlur"],
9
9
  events: { onRaySelect: "ray-select", onRayOpen: "ray-open", onRayClose: "ray-close" },
10
10
  });
@@ -0,0 +1,15 @@
1
+ // Generated by ray-elements tools from component.toml files. Do not edit.
2
+
3
+ import "@raylang/elements/doc-tabs";
4
+ import { createComponent } from "../create.js";
5
+
6
+ export const RayDocTabs = /*#__PURE__*/ createComponent("ray-doc-tabs", {
7
+ displayName: "RayDocTabs",
8
+ properties: ["value", "panel", "label", "closeLabel", "dirtyLabel"],
9
+ events: { onChange: "change", onRayRequestClose: "ray-request-close" },
10
+ });
11
+ export const RayDocTab = /*#__PURE__*/ createComponent("ray-doc-tab", {
12
+ displayName: "RayDocTab",
13
+ properties: ["value", "dirty", "hideClose"],
14
+ events: { },
15
+ });
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayInput = /*#__PURE__*/ createComponent("ray-input", {
7
7
  displayName: "RayInput",
8
- properties: ["value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant"],
9
- events: { onInput: "input", onChange: "change" },
8
+ properties: ["value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
9
+ events: { onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
10
10
  });
@@ -6,11 +6,11 @@ import { createComponent } from "../create.js";
6
6
  export const RayMenu = /*#__PURE__*/ createComponent("ray-menu", {
7
7
  displayName: "RayMenu",
8
8
  properties: ["open", "placement", "context", "keepOpen", "native", "offset"],
9
- events: { onRaySelect: "ray-select", onRayOpen: "ray-open", onRayClose: "ray-close" },
9
+ events: { onRaySelect: "ray-select", onRayRequestOpen: "ray-request-open", onRayOpen: "ray-open", onRayClose: "ray-close" },
10
10
  });
11
11
  export const RayMenuItem = /*#__PURE__*/ createComponent("ray-menu-item", {
12
12
  displayName: "RayMenuItem",
13
- properties: ["value", "disabled", "color"],
13
+ properties: ["value", "disabled", "color", "type", "checked", "name"],
14
14
  events: { },
15
15
  });
16
16
  export const RayMenuLabel = /*#__PURE__*/ createComponent("ray-menu-label", {
@@ -0,0 +1,10 @@
1
+ // Generated by ray-elements tools from component.toml files. Do not edit.
2
+
3
+ import "@raylang/elements/mode-input";
4
+ import { createComponent } from "../create.js";
5
+
6
+ export const RayModeInput = /*#__PURE__*/ createComponent("ray-mode-input", {
7
+ displayName: "RayModeInput",
8
+ properties: ["mode", "options", "display", "position", "menuLabel", "nativeMenu", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
9
+ events: { onRayModeChange: "ray-mode-change", onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
10
+ });
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayPasswordInput = /*#__PURE__*/ createComponent("ray-password-input", {
7
7
  displayName: "RayPasswordInput",
8
- properties: ["visible", "showLabel", "hideLabel", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant"],
9
- events: { onRayVisibilityChange: "ray-visibility-change", onInput: "input", onChange: "change" },
8
+ properties: ["visible", "showLabel", "hideLabel", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
9
+ events: { onRayVisibilityChange: "ray-visibility-change", onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
10
10
  });
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayPathInput = /*#__PURE__*/ createComponent("ray-path-input", {
7
7
  displayName: "RayPathInput",
8
- properties: ["mode", "accept", "browseLabel", "dialogTitle", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant"],
9
- events: { onChange: "change", onRayError: "ray-error", onInput: "input" },
8
+ properties: ["mode", "accept", "browseLabel", "dialogTitle", "value", "type", "name", "label", "description", "descriptionPosition", "error", "placeholder", "required", "disabled", "readonly", "size", "radius", "variant", "highlight", "complete", "suggestionsLabel"],
9
+ events: { onChange: "change", onRayError: "ray-error", onRayComplete: "ray-complete", onInput: "input" },
10
10
  });
@@ -5,8 +5,8 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RaySidebar = /*#__PURE__*/ createComponent("ray-sidebar", {
7
7
  displayName: "RaySidebar",
8
- properties: ["collapsed", "open", "side", "variant", "width", "collapsedWidth", "breakpoint", "label"],
9
- events: { onRayToggle: "ray-toggle", onRayOpen: "ray-open", onRayClose: "ray-close" },
8
+ properties: ["collapsed", "collapse", "open", "side", "variant", "width", "collapsedWidth", "breakpoint", "label", "resizable", "minWidth", "maxWidth", "autosave", "resizeLabel"],
9
+ events: { onRayResize: "ray-resize", onRayToggle: "ray-toggle", onRayOpen: "ray-open", onRayClose: "ray-close" },
10
10
  });
11
11
  export const RaySidebarGroup = /*#__PURE__*/ createComponent("ray-sidebar-group", {
12
12
  displayName: "RaySidebarGroup",
@@ -5,12 +5,12 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayTabs = /*#__PURE__*/ createComponent("ray-tabs", {
7
7
  displayName: "RayTabs",
8
- properties: ["value", "variant", "orientation", "color", "activation", "grow"],
8
+ properties: ["value", "variant", "orientation", "color", "size", "activation", "grow"],
9
9
  events: { onChange: "change" },
10
10
  });
11
11
  export const RayTab = /*#__PURE__*/ createComponent("ray-tab", {
12
12
  displayName: "RayTab",
13
- properties: ["value", "disabled"],
13
+ properties: ["value", "disabled", "count"],
14
14
  events: { },
15
15
  });
16
16
  export const RayTabPanel = /*#__PURE__*/ createComponent("ray-tab-panel", {
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
5
5
 
6
6
  export const RayTextarea = /*#__PURE__*/ createComponent("ray-textarea", {
7
7
  displayName: "RayTextarea",
8
- properties: ["value", "rows", "autosize", "maxRows", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "readonly", "size", "variant", "radius"],
9
- events: { onInput: "input", onChange: "change" },
8
+ properties: ["value", "rows", "autosize", "maxRows", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "readonly", "size", "variant", "highlight", "complete", "suggestionsLabel", "radius"],
9
+ events: { onRayComplete: "ray-complete", onInput: "input", onChange: "change" },
10
10
  });
package/index.d.ts CHANGED
@@ -520,6 +520,12 @@ export interface RayInputOwnProps {
520
520
  radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
521
521
  /** Box style. */
522
522
  variant?: "default" | "filled" | "unstyled";
523
+ /** Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap. */
524
+ highlight?: ((text: string) => Ray.HighlightRange[]) | null;
525
+ /** Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant). */
526
+ complete?: ((text: string, caret: number) => Ray.CompletionResult | null | Promise<Ray.CompletionResult | null>) | null;
527
+ /** Accessible name of the suggestion list. */
528
+ suggestionsLabel?: string;
523
529
  /** Forwarded to the inner input. */
524
530
  autocomplete?: string;
525
531
  /** Virtual keyboard hint. */
@@ -542,6 +548,8 @@ export interface RayInputOwnProps {
542
548
  enterkeyhint?: string;
543
549
  /** Id of a <datalist> with suggestions. */
544
550
  list?: string;
551
+ /** A suggestion was accepted (the text already has it). */
552
+ onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
545
553
  /** On every edit (value already updated). */
546
554
  onInput?: (event: Event) => void;
547
555
  /** When an edit is committed (blur, Enter). */
@@ -551,6 +559,88 @@ export type RayInputProps = RayInputOwnProps & Omit<React.HTMLAttributes<Ray.Ray
551
559
  /** <ray-input> as a React component. */
552
560
  export declare const RayInput: React.ForwardRefExoticComponent<RayInputProps & React.RefAttributes<Ray.RayInput>>;
553
561
 
562
+ export interface RayModeInputOwnProps {
563
+ /** The chosen mode's value (default: the first). Setting it applies that mode without ray-mode-change. */
564
+ mode?: string;
565
+ /** The modes; when not set, the <option> children. */
566
+ options?: Ray.ModeOption[];
567
+ /** What the trigger shows: the mode's hint or label, its icon, or both. Default: the icon when the mode has one, else the label. */
568
+ display?: "label" | "icon" | "both";
569
+ /** The side of the field the trigger sits on. */
570
+ position?: "start" | "end";
571
+ /** The trigger's accessible name, read with the current mode ("Mode: File"). */
572
+ menuLabel?: string;
573
+ /** With a native host (a std/ui window with the bridge), the system's menu (no descriptions there). */
574
+ nativeMenu?: boolean;
575
+ /** Current value. The value attribute is the initial value (restored on form reset). */
576
+ value?: string;
577
+ /** Input type. */
578
+ type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
579
+ /** Form field name. */
580
+ name?: string;
581
+ /** Visible label (also the accessible name). */
582
+ label?: string;
583
+ /** Help text under the label. */
584
+ description?: string;
585
+ /** The description before the control (help first) or after it, with the error (fields in a row stay aligned). */
586
+ descriptionPosition?: "above" | "below";
587
+ /** Error text; marks the field invalid (display only — does not block submit). */
588
+ error?: string;
589
+ /** Placeholder text. */
590
+ placeholder?: string;
591
+ /** Required for form submission; shows an asterisk. */
592
+ required?: boolean;
593
+ /** Not editable nor submitted. */
594
+ disabled?: boolean;
595
+ /** Not editable, still submitted. */
596
+ readonly?: boolean;
597
+ /** Height and font size. */
598
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
599
+ /** Corner radius. */
600
+ radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
601
+ /** Box style. */
602
+ variant?: "default" | "filled" | "unstyled";
603
+ /** Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap. */
604
+ highlight?: ((text: string) => Ray.HighlightRange[]) | null;
605
+ /** Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant). */
606
+ complete?: ((text: string, caret: number) => Ray.CompletionResult | null | Promise<Ray.CompletionResult | null>) | null;
607
+ /** Accessible name of the suggestion list. */
608
+ suggestionsLabel?: string;
609
+ /** Forwarded to the inner input. */
610
+ autocomplete?: string;
611
+ /** Virtual keyboard hint. */
612
+ inputmode?: string;
613
+ /** Validation pattern (regular expression). */
614
+ pattern?: string;
615
+ /** Minimum (number/date types). */
616
+ min?: string;
617
+ /** Maximum (number/date types). */
618
+ max?: string;
619
+ /** Step (number types). */
620
+ step?: string;
621
+ /** Minimum length. */
622
+ minlength?: string;
623
+ /** Maximum length. */
624
+ maxlength?: string;
625
+ /** Mobile auto-capitalization. */
626
+ autocapitalize?: string;
627
+ /** Label of the Enter key on virtual keyboards. */
628
+ enterkeyhint?: string;
629
+ /** Id of a <datalist> with suggestions. */
630
+ list?: string;
631
+ /** The user chose a mode (mode is already the new one); cancelable: preventDefault keeps the previous mode. */
632
+ onRayModeChange?: (event: CustomEvent<{ mode: string; previous: string | null; option: Ray.ModeOption }>) => void;
633
+ /** A suggestion was accepted (the text already has it). */
634
+ onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
635
+ /** On every edit (value already updated). */
636
+ onInput?: (event: Event) => void;
637
+ /** When an edit is committed (blur, Enter). */
638
+ onChange?: (event: Event) => void;
639
+ }
640
+ export type RayModeInputProps = RayModeInputOwnProps & Omit<React.HTMLAttributes<Ray.RayModeInput>, keyof RayModeInputOwnProps> & { children?: React.ReactNode };
641
+ /** <ray-mode-input> as a React component. */
642
+ export declare const RayModeInput: React.ForwardRefExoticComponent<RayModeInputProps & React.RefAttributes<Ray.RayModeInput>>;
643
+
554
644
  export interface RayNumberInputOwnProps {
555
645
  /** The number (undefined when empty). */
556
646
  value?: number;
@@ -644,6 +734,12 @@ export interface RayPasswordInputOwnProps {
644
734
  radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
645
735
  /** Box style. */
646
736
  variant?: "default" | "filled" | "unstyled";
737
+ /** Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap. */
738
+ highlight?: ((text: string) => Ray.HighlightRange[]) | null;
739
+ /** Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant). */
740
+ complete?: ((text: string, caret: number) => Ray.CompletionResult | null | Promise<Ray.CompletionResult | null>) | null;
741
+ /** Accessible name of the suggestion list. */
742
+ suggestionsLabel?: string;
647
743
  /** Forwarded to the inner input. */
648
744
  autocomplete?: string;
649
745
  /** Virtual keyboard hint. */
@@ -668,6 +764,8 @@ export interface RayPasswordInputOwnProps {
668
764
  list?: string;
669
765
  /** The user showed or hid the password. */
670
766
  onRayVisibilityChange?: (event: CustomEvent<{ visible: boolean }>) => void;
767
+ /** A suggestion was accepted (the text already has it). */
768
+ onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
671
769
  /** On every edit (value already updated). */
672
770
  onInput?: (event: Event) => void;
673
771
  /** When an edit is committed (blur, Enter). */
@@ -714,6 +812,12 @@ export interface RayPathInputOwnProps {
714
812
  radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
715
813
  /** Box style. */
716
814
  variant?: "default" | "filled" | "unstyled";
815
+ /** Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap. */
816
+ highlight?: ((text: string) => Ray.HighlightRange[]) | null;
817
+ /** Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant). */
818
+ complete?: ((text: string, caret: number) => Ray.CompletionResult | null | Promise<Ray.CompletionResult | null>) | null;
819
+ /** Accessible name of the suggestion list. */
820
+ suggestionsLabel?: string;
717
821
  /** Forwarded to the inner input. */
718
822
  autocomplete?: string;
719
823
  /** Virtual keyboard hint. */
@@ -740,6 +844,8 @@ export interface RayPathInputOwnProps {
740
844
  onChange?: (event: Event) => void;
741
845
  /** The system dialog failed. */
742
846
  onRayError?: (event: CustomEvent<{ error: Error }>) => void;
847
+ /** A suggestion was accepted (the text already has it). */
848
+ onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
743
849
  /** On every edit (value already updated). */
744
850
  onInput?: (event: Event) => void;
745
851
  }
@@ -1048,6 +1154,12 @@ export interface RayTextareaOwnProps {
1048
1154
  size?: "xs" | "sm" | "md" | "lg" | "xl";
1049
1155
  /** Box style. */
1050
1156
  variant?: "default" | "filled" | "unstyled";
1157
+ /** Marks ranges of the text, painted behind it: called with the text on every change (typed or set), it returns { start, end, kind?, title? } offsets. kind "error" is red with a wavy underline; any other kind is styled with ::part(highlight-<kind>); title is the tooltip over the range. Ranges must not overlap. */
1158
+ highlight?: ((text: string) => Ray.HighlightRange[]) | null;
1159
+ /** Inline suggestions: called as the user types (and on Ctrl+Space) with the text and the caret, it returns the part of the text a suggestion would replace and the suggestions ({ from, to, items }), or null for none. A list opens under that part (ArrowUp/Down, Enter or Tab to accept, Escape to close); the chosen item's value replaces from–to as an undoable edit, then ray-complete fires. The field becomes a combobox (aria-autocomplete, aria-expanded, aria-activedescendant). */
1160
+ complete?: ((text: string, caret: number) => Ray.CompletionResult | null | Promise<Ray.CompletionResult | null>) | null;
1161
+ /** Accessible name of the suggestion list. */
1162
+ suggestionsLabel?: string;
1051
1163
  /** Corner radius. */
1052
1164
  radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
1053
1165
  /** Placeholder text. */
@@ -1060,6 +1172,8 @@ export interface RayTextareaOwnProps {
1060
1172
  maxlength?: string;
1061
1173
  /** soft or hard. */
1062
1174
  wrap?: string;
1175
+ /** A suggestion was accepted (the text already has it). */
1176
+ onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
1063
1177
  /** On every edit. */
1064
1178
  onInput?: (event: Event) => void;
1065
1179
  /** When an edit is committed. */
@@ -1145,6 +1259,38 @@ export type RayBreadcrumbProps = RayBreadcrumbOwnProps & Omit<React.HTMLAttribut
1145
1259
  /** <ray-breadcrumb> as a React component. */
1146
1260
  export declare const RayBreadcrumb: React.ForwardRefExoticComponent<RayBreadcrumbProps & React.RefAttributes<Ray.RayBreadcrumb>>;
1147
1261
 
1262
+ export interface RayDocTabsOwnProps {
1263
+ /** Value of the selected tab (default: the first). */
1264
+ value?: string;
1265
+ /** The id of the shared panel: it gets role=tabpanel and aria-labelledby the selected tab; the tabs get aria-controls. */
1266
+ panel?: string;
1267
+ /** Accessible name of the tab list ("Open requests"). */
1268
+ label?: string;
1269
+ /** Tooltip of the ×. */
1270
+ closeLabel?: string;
1271
+ /** What assistive technology hears after the name of a dirty tab. */
1272
+ dirtyLabel?: string;
1273
+ /** The selected tab changed: a click, the arrow keys, or the selected tab removed. */
1274
+ onChange?: (event: Event) => void;
1275
+ /** The × was clicked, the tab middle-clicked, or Delete/Backspace pressed on it: remove the tab to close it (not fired for hide-close tabs). */
1276
+ onRayRequestClose?: (event: CustomEvent<{ value: string; tab: Ray.RayDocTab; source: "button" | "middle" | "key" }>) => void;
1277
+ }
1278
+ export type RayDocTabsProps = RayDocTabsOwnProps & Omit<React.HTMLAttributes<Ray.RayDocTabs>, keyof RayDocTabsOwnProps> & { children?: React.ReactNode };
1279
+ /** <ray-doc-tabs> as a React component. */
1280
+ export declare const RayDocTabs: React.ForwardRefExoticComponent<RayDocTabsProps & React.RefAttributes<Ray.RayDocTabs>>;
1281
+
1282
+ export interface RayDocTabOwnProps {
1283
+ /** Identifies the document (ray-doc-tabs value). */
1284
+ value?: string;
1285
+ /** Unsaved changes: a dot in place of the ×, which comes back under the pointer. */
1286
+ dirty?: boolean;
1287
+ /** Cannot be closed: no ×, no middle click, no Delete. */
1288
+ hideClose?: boolean;
1289
+ }
1290
+ export type RayDocTabProps = RayDocTabOwnProps & Omit<React.HTMLAttributes<Ray.RayDocTab>, keyof RayDocTabOwnProps> & { children?: React.ReactNode };
1291
+ /** <ray-doc-tab> as a React component. */
1292
+ export declare const RayDocTab: React.ForwardRefExoticComponent<RayDocTabProps & React.RefAttributes<Ray.RayDocTab>>;
1293
+
1148
1294
  export interface RayNavLinkOwnProps {
1149
1295
  /** Text. */
1150
1296
  label?: string;
@@ -1202,8 +1348,10 @@ export type RayPaginationProps = RayPaginationOwnProps & Omit<React.HTMLAttribut
1202
1348
  export declare const RayPagination: React.ForwardRefExoticComponent<RayPaginationProps & React.RefAttributes<Ray.RayPagination>>;
1203
1349
 
1204
1350
  export interface RaySidebarOwnProps {
1205
- /** Wide screens: an icon rail instead of the full panel. */
1351
+ /** Wide screens: collapsed as collapse says (an icon rail, or out of view). */
1206
1352
  collapsed?: boolean;
1353
+ /** What collapsed does on wide screens: icon, a rail of the nav links' icons; offcanvas, hidden entirely (no width, out of the tab order). */
1354
+ collapse?: "icon" | "offcanvas";
1207
1355
  /** Narrow screens: the drawer is shown (modal, focus trapped; Escape, backdrop click or a followed link close it). */
1208
1356
  open?: boolean;
1209
1357
  /** 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. */
@@ -1218,6 +1366,18 @@ export interface RaySidebarOwnProps {
1218
1366
  breakpoint?: string;
1219
1367
  /** Accessible name of its navigation. */
1220
1368
  label?: string;
1369
+ /** Wide screens, expanded: its inner edge drags (or, focused, arrow-keys; Shift is faster, Home/End go to the limits) the width between min-width and max-width. */
1370
+ resizable?: boolean;
1371
+ /** Narrowest width when resizing, in px. */
1372
+ minWidth?: number;
1373
+ /** Widest width when resizing, in px. */
1374
+ maxWidth?: number;
1375
+ /** A key: the resized width is saved in localStorage and restored. A later change of width wins. */
1376
+ autosave?: string;
1377
+ /** Accessible name of the resize edge. */
1378
+ resizeLabel?: string;
1379
+ /** After a drag or a key resized it (resizable). */
1380
+ onRayResize?: (event: CustomEvent<{ width: number }>) => void;
1221
1381
  /** After toggle(). */
1222
1382
  onRayToggle?: (event: CustomEvent<{ collapsed: boolean; open: boolean; mobile: boolean }>) => void;
1223
1383
  /** The drawer opened (narrow screens). */
@@ -1290,6 +1450,8 @@ export interface RayTabsOwnProps {
1290
1450
  orientation?: "horizontal" | "vertical";
1291
1451
  /** Active indicator color. */
1292
1452
  color?: string;
1453
+ /** Height, font size and padding of the tabs (xs for a compact bar). */
1454
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
1293
1455
  /** manual: arrows move focus, Enter/Space activates. */
1294
1456
  activation?: "auto" | "manual";
1295
1457
  /** Tabs share the full width. */
@@ -1306,6 +1468,8 @@ export interface RayTabOwnProps {
1306
1468
  value?: string;
1307
1469
  /** Cannot be activated. */
1308
1470
  disabled?: boolean;
1471
+ /** A small number after the label ("3", "99+"), lighter than a badge; part of the tab's accessible name. Empty: none. */
1472
+ count?: string;
1309
1473
  }
1310
1474
  export type RayTabProps = RayTabOwnProps & Omit<React.HTMLAttributes<Ray.RayTab>, keyof RayTabOwnProps> & { children?: React.ReactNode };
1311
1475
  /** <ray-tab> as a React component. */
@@ -1338,6 +1502,12 @@ export interface RayCommandPaletteOwnProps {
1338
1502
  label?: string;
1339
1503
  /** No keyboard hint at the bottom. */
1340
1504
  hideHint?: boolean;
1505
+ /** The keyboard hint's word for ↑↓. */
1506
+ navigateLabel?: string;
1507
+ /** The keyboard hint's word for ↵. */
1508
+ runLabel?: string;
1509
+ /** The keyboard hint's word for esc. */
1510
+ closeLabel?: string;
1341
1511
  /** With a native host (ray-elements/core/raylang.js in a std/ui window, menus declared with elements/bridge), also lists the app's menu bar, grouped by menu with its shortcuts; running one gives the program the menu's own event. */
1342
1512
  nativeMenus?: boolean;
1343
1513
  /** Blur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml). */
@@ -1432,6 +1602,8 @@ export interface RayMenuOwnProps {
1432
1602
  offset?: number;
1433
1603
  /** An item was chosen; detail: { value, item }. */
1434
1604
  onRaySelect?: (event: CustomEvent<{ value: string; item: Ray.RayMenuItem }>) => void;
1605
+ /** Its trigger is about to open it (click, Arrow keys, right click), before the items are read, native menu included: fill items that depend on what was clicked here. Cancelable (preventDefault keeps it closed). Not fired by show() or open = true. detail: { event }. */
1606
+ onRayRequestOpen?: (event: CustomEvent<{ event: Event }>) => void;
1435
1607
  /** After it opened. */
1436
1608
  onRayOpen?: (event: CustomEvent<unknown>) => void;
1437
1609
  /** After it closed. */
@@ -1448,6 +1620,12 @@ export interface RayMenuItemOwnProps {
1448
1620
  disabled?: boolean;
1449
1621
  /** Text and hover color (e.g. red for destructive actions). */
1450
1622
  color?: string;
1623
+ /** checkbox: choosing it toggles checked (menuitemcheckbox); radio: choosing it checks it and unchecks the radio items of the menu with the same name (menuitemradio). Both show a check mark when checked, in the native menu too. */
1624
+ type?: "item" | "checkbox" | "radio";
1625
+ /** Checked (checkbox and radio items). Already updated when ray-select fires. */
1626
+ checked?: boolean;
1627
+ /** The group of a radio item: one checked per name in the menu. */
1628
+ name?: string;
1451
1629
  }
1452
1630
  export type RayMenuItemProps = RayMenuItemOwnProps & Omit<React.HTMLAttributes<Ray.RayMenuItem>, keyof RayMenuItemOwnProps> & { children?: React.ReactNode };
1453
1631
  /** <ray-menu-item> as a React component. */
@@ -1684,6 +1862,8 @@ export interface RayCodeOwnProps {
1684
1862
  highlight?: string;
1685
1863
  /** Wraps long lines instead of scrolling sideways. */
1686
1864
  wrap?: boolean;
1865
+ /** Shows and copies the text exactly as given: no common indentation or blank first and last lines removed. For data (a response body, a log) rather than code written in the page. */
1866
+ verbatim?: boolean;
1687
1867
  /** Height before it scrolls: px as a number, or a CSS length. A taller block gets a "Show all N lines" button. */
1688
1868
  maxHeight?: string;
1689
1869
  /** Shown whole, past max-height. */
@@ -2204,7 +2384,7 @@ export interface RaySplitOwnProps {
2204
2384
  collapsed?: boolean;
2205
2385
  /** The divider cannot be moved. */
2206
2386
  disabled?: boolean;
2207
- /** A key: the size is saved in localStorage and restored. */
2387
+ /** A key: the size and the collapsed state are saved in localStorage and restored (a saved state wins over the collapsed attribute). */
2208
2388
  autosave?: string;
2209
2389
  /** After a drag, a key or a collapse. */
2210
2390
  onRayResize?: (event: CustomEvent<{ size: number; collapsed: boolean }>) => void;
package/index.js CHANGED
@@ -16,6 +16,7 @@ export { RayCombobox } from "./components/combobox.js";
16
16
  export { RayDatePicker, RayCalendar } from "./components/date-picker.js";
17
17
  export { RayFileUpload } from "./components/file-upload.js";
18
18
  export { RayInput } from "./components/input.js";
19
+ export { RayModeInput } from "./components/mode-input.js";
19
20
  export { RayNumberInput } from "./components/number-input.js";
20
21
  export { RayPasswordInput } from "./components/password-input.js";
21
22
  export { RayPathInput } from "./components/path-input.js";
@@ -28,6 +29,7 @@ export { RaySwitch } from "./components/switch.js";
28
29
  export { RayTextarea } from "./components/textarea.js";
29
30
  export { RayBottomNav, RayBottomNavItem } from "./components/bottom-nav.js";
30
31
  export { RayBreadcrumbs, RayBreadcrumb } from "./components/breadcrumbs.js";
32
+ export { RayDocTabs, RayDocTab } from "./components/doc-tabs.js";
31
33
  export { RayNavLink } from "./components/nav-link.js";
32
34
  export { RayPagination } from "./components/pagination.js";
33
35
  export { RaySidebar, RaySidebarGroup } from "./components/sidebar.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raylang/react",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "React wrappers of the ray-elements web components",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": ["web-components", "design-system", "ui", "raylang", "react"],
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "sideEffects": false,
30
30
  "peerDependencies": {
31
- "@raylang/elements": "^0.8.0",
31
+ "@raylang/elements": "^0.9.0",
32
32
  "react": ">=18"
33
33
  }
34
34
  }