@raylang/react 0.0.0-stage → 0.4.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/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +13 -2
- package/components/accordion.js +15 -0
- package/components/alert.js +10 -0
- package/components/app-bar.js +10 -0
- package/components/app-shell.js +10 -0
- package/components/aspect-ratio.js +10 -0
- package/components/attachment.js +15 -0
- package/components/avatar.js +10 -0
- package/components/badge.js +10 -0
- package/components/blockquote.js +10 -0
- package/components/bottom-nav.js +15 -0
- package/components/breadcrumbs.js +15 -0
- package/components/button-group.js +10 -0
- package/components/button.js +10 -0
- package/components/card.js +10 -0
- package/components/carousel.js +10 -0
- package/components/center.js +10 -0
- package/components/checkbox-group.js +10 -0
- package/components/checkbox.js +10 -0
- package/components/code.js +10 -0
- package/components/color-picker.js +15 -0
- package/components/combobox.js +10 -0
- package/components/command-palette.js +10 -0
- package/components/container.js +10 -0
- package/components/date-picker.js +15 -0
- package/components/dialog.js +10 -0
- package/components/drawer.js +10 -0
- package/components/empty-state.js +10 -0
- package/components/file-upload.js +10 -0
- package/components/grid.js +10 -0
- package/components/group.js +10 -0
- package/components/icon-button.js +10 -0
- package/components/icon.js +10 -0
- package/components/indicator.js +10 -0
- package/components/input.js +10 -0
- package/components/kbd.js +10 -0
- package/components/menu.js +25 -0
- package/components/nav-link.js +10 -0
- package/components/notification.js +15 -0
- package/components/number-input.js +10 -0
- package/components/pagination.js +10 -0
- package/components/password-input.js +10 -0
- package/components/path-input.js +10 -0
- package/components/popover.js +10 -0
- package/components/progress.js +10 -0
- package/components/radio.js +15 -0
- package/components/scroll-area.js +10 -0
- package/components/search.js +10 -0
- package/components/segmented-control.js +10 -0
- package/components/select.js +10 -0
- package/components/separator.js +10 -0
- package/components/sidebar.js +15 -0
- package/components/skeleton.js +10 -0
- package/components/slider.js +10 -0
- package/components/spinner.js +10 -0
- package/components/split.js +10 -0
- package/components/stack.js +10 -0
- package/components/stat.js +10 -0
- package/components/statusbar.js +15 -0
- package/components/stepper.js +15 -0
- package/components/switch.js +10 -0
- package/components/table.js +10 -0
- package/components/tabs.js +20 -0
- package/components/textarea.js +10 -0
- package/components/theme-toggle.js +10 -0
- package/components/timeline.js +15 -0
- package/components/toggle-group.js +10 -0
- package/components/toggle.js +10 -0
- package/components/tooltip.js +10 -0
- package/create.js +64 -0
- package/index.d.ts +2180 -0
- package/index.js +74 -0
- package/package.json +32 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/indicator";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayIndicator = /*#__PURE__*/ createComponent("ray-indicator", {
|
|
7
|
+
displayName: "RayIndicator",
|
|
8
|
+
properties: ["label", "position", "offset", "color", "size", "radius", "max", "inline", "withBorder", "processing", "disabled"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/input";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayInput = /*#__PURE__*/ createComponent("ray-input", {
|
|
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" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/kbd";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayKbd = /*#__PURE__*/ createComponent("ray-kbd", {
|
|
7
|
+
displayName: "RayKbd",
|
|
8
|
+
properties: ["size", "variant"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/menu";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayMenu = /*#__PURE__*/ createComponent("ray-menu", {
|
|
7
|
+
displayName: "RayMenu",
|
|
8
|
+
properties: ["open", "placement", "context", "keepOpen", "native", "offset"],
|
|
9
|
+
events: { onRaySelect: "ray-select", onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
|
+
});
|
|
11
|
+
export const RayMenuItem = /*#__PURE__*/ createComponent("ray-menu-item", {
|
|
12
|
+
displayName: "RayMenuItem",
|
|
13
|
+
properties: ["value", "disabled", "color"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
16
|
+
export const RayMenuLabel = /*#__PURE__*/ createComponent("ray-menu-label", {
|
|
17
|
+
displayName: "RayMenuLabel",
|
|
18
|
+
properties: [],
|
|
19
|
+
events: { },
|
|
20
|
+
});
|
|
21
|
+
export const RayMenuDivider = /*#__PURE__*/ createComponent("ray-menu-divider", {
|
|
22
|
+
displayName: "RayMenuDivider",
|
|
23
|
+
properties: [],
|
|
24
|
+
events: { },
|
|
25
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/nav-link";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayNavLink = /*#__PURE__*/ createComponent("ray-nav-link", {
|
|
7
|
+
displayName: "RayNavLink",
|
|
8
|
+
properties: ["label", "description", "href", "active", "opened", "disabled", "variant", "color", "iconOnly"],
|
|
9
|
+
events: { onRayToggle: "ray-toggle" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/notification";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayNotification = /*#__PURE__*/ createComponent("ray-notification", {
|
|
7
|
+
displayName: "RayNotification",
|
|
8
|
+
properties: ["label", "color", "icon", "loading", "hideClose", "withBorder", "actionLabel"],
|
|
9
|
+
events: { onRayClose: "ray-close", onRayAction: "ray-action" },
|
|
10
|
+
});
|
|
11
|
+
export const RayToaster = /*#__PURE__*/ createComponent("ray-toaster", {
|
|
12
|
+
displayName: "RayToaster",
|
|
13
|
+
properties: ["position", "limit", "visible", "expand", "gap"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/number-input";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayNumberInput = /*#__PURE__*/ createComponent("ray-number-input", {
|
|
7
|
+
displayName: "RayNumberInput",
|
|
8
|
+
properties: ["value", "min", "max", "step", "decimals", "prefix", "suffix", "thousandsSeparator", "decimalSeparator", "clamp", "hideControls", "placeholder", "readonly", "name", "label", "description", "error", "required", "disabled", "size", "radius", "variant", "descriptionPosition"],
|
|
9
|
+
events: { onInput: "input", onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/pagination";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayPagination = /*#__PURE__*/ createComponent("ray-pagination", {
|
|
7
|
+
displayName: "RayPagination",
|
|
8
|
+
properties: ["total", "value", "siblings", "boundaries", "withEdges", "hideControls", "color", "size", "radius", "disabled", "label"],
|
|
9
|
+
events: { onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/password-input";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayPasswordInput = /*#__PURE__*/ createComponent("ray-password-input", {
|
|
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" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/path-input";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayPathInput = /*#__PURE__*/ createComponent("ray-path-input", {
|
|
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" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/popover";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayPopover = /*#__PURE__*/ createComponent("ray-popover", {
|
|
7
|
+
displayName: "RayPopover",
|
|
8
|
+
properties: ["open", "placement", "offset", "width", "matchWidth", "padding", "trapFocus"],
|
|
9
|
+
events: { onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/progress";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayProgress = /*#__PURE__*/ createComponent("ray-progress", {
|
|
7
|
+
displayName: "RayProgress",
|
|
8
|
+
properties: ["value", "max", "color", "size", "radius", "striped", "animated", "showValue", "label"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/radio";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayRadioGroup = /*#__PURE__*/ createComponent("ray-radio-group", {
|
|
7
|
+
displayName: "RayRadioGroup",
|
|
8
|
+
properties: ["value", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "orientation", "size", "color", "variant"],
|
|
9
|
+
events: { onInput: "input", onChange: "change" },
|
|
10
|
+
});
|
|
11
|
+
export const RayRadio = /*#__PURE__*/ createComponent("ray-radio", {
|
|
12
|
+
displayName: "RayRadio",
|
|
13
|
+
properties: ["value", "label", "description", "disabled", "color", "size", "variant"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/scroll-area";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayScrollArea = /*#__PURE__*/ createComponent("ray-scroll-area", {
|
|
7
|
+
displayName: "RayScrollArea",
|
|
8
|
+
properties: ["height", "maxHeight", "orientation", "type", "noShadows", "threshold", "label"],
|
|
9
|
+
events: { onRayReachEnd: "ray-reach-end" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/search";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySearch = /*#__PURE__*/ createComponent("ray-search", {
|
|
7
|
+
displayName: "RaySearch",
|
|
8
|
+
properties: ["value", "placeholder", "shortcut", "debounce", "name", "label", "disabled", "size", "radius", "variant", "description", "error", "required", "descriptionPosition"],
|
|
9
|
+
events: { onInput: "input", onRaySearch: "ray-search" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/segmented-control";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySegmentedControl = /*#__PURE__*/ createComponent("ray-segmented-control", {
|
|
7
|
+
displayName: "RaySegmentedControl",
|
|
8
|
+
properties: ["value", "data", "name", "color", "size", "radius", "fullWidth", "orientation", "disabled"],
|
|
9
|
+
events: { onInput: "input", onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/select";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySelect = /*#__PURE__*/ createComponent("ray-select", {
|
|
7
|
+
displayName: "RaySelect",
|
|
8
|
+
properties: ["value", "data", "placeholder", "open", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "size", "variant", "radius"],
|
|
9
|
+
events: { onInput: "input", onChange: "change", onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/separator";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySeparator = /*#__PURE__*/ createComponent("ray-separator", {
|
|
7
|
+
displayName: "RaySeparator",
|
|
8
|
+
properties: ["orientation", "label", "labelPosition", "size", "variant"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/sidebar";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySidebar = /*#__PURE__*/ createComponent("ray-sidebar", {
|
|
7
|
+
displayName: "RaySidebar",
|
|
8
|
+
properties: ["collapsed", "open", "side", "variant", "width", "collapsedWidth", "breakpoint", "label"],
|
|
9
|
+
events: { onRayToggle: "ray-toggle", onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
|
+
});
|
|
11
|
+
export const RaySidebarGroup = /*#__PURE__*/ createComponent("ray-sidebar-group", {
|
|
12
|
+
displayName: "RaySidebarGroup",
|
|
13
|
+
properties: ["label"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/skeleton";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySkeleton = /*#__PURE__*/ createComponent("ray-skeleton", {
|
|
7
|
+
displayName: "RaySkeleton",
|
|
8
|
+
properties: ["width", "height", "circle", "lines", "radius", "animation", "loaded"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/slider";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySlider = /*#__PURE__*/ createComponent("ray-slider", {
|
|
7
|
+
displayName: "RaySlider",
|
|
8
|
+
properties: ["value", "min", "max", "step", "name", "label", "description", "descriptionPosition", "error", "disabled", "color", "size", "showValue", "unit", "marks", "required", "radius", "variant"],
|
|
9
|
+
events: { onInput: "input", onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/spinner";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySpinner = /*#__PURE__*/ createComponent("ray-spinner", {
|
|
7
|
+
displayName: "RaySpinner",
|
|
8
|
+
properties: ["color", "size", "label"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/split";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySplit = /*#__PURE__*/ createComponent("ray-split", {
|
|
7
|
+
displayName: "RaySplit",
|
|
8
|
+
properties: ["orientation", "position", "min", "max", "collapsed", "disabled", "autosave"],
|
|
9
|
+
events: { onRayResize: "ray-resize" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/stack";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayStack = /*#__PURE__*/ createComponent("ray-stack", {
|
|
7
|
+
displayName: "RayStack",
|
|
8
|
+
properties: ["gap", "align", "justify"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/stat";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayStat = /*#__PURE__*/ createComponent("ray-stat", {
|
|
7
|
+
displayName: "RayStat",
|
|
8
|
+
properties: ["label", "value", "diff", "diffUnit", "note", "inverse", "plain"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/statusbar";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayStatusbar = /*#__PURE__*/ createComponent("ray-statusbar", {
|
|
7
|
+
displayName: "RayStatusbar",
|
|
8
|
+
properties: ["variant"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
11
|
+
export const RayStatusbarItem = /*#__PURE__*/ createComponent("ray-statusbar-item", {
|
|
12
|
+
displayName: "RayStatusbarItem",
|
|
13
|
+
properties: ["action", "color", "label"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/stepper";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayStepper = /*#__PURE__*/ createComponent("ray-stepper", {
|
|
7
|
+
displayName: "RayStepper",
|
|
8
|
+
properties: ["active", "orientation", "iconPosition", "allowStepSelect", "linear", "size", "color", "label"],
|
|
9
|
+
events: { onChange: "change" },
|
|
10
|
+
});
|
|
11
|
+
export const RayStep = /*#__PURE__*/ createComponent("ray-step", {
|
|
12
|
+
displayName: "RayStep",
|
|
13
|
+
properties: ["label", "description", "icon", "completedIcon", "loading", "error", "disabled"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/switch";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RaySwitch = /*#__PURE__*/ createComponent("ray-switch", {
|
|
7
|
+
displayName: "RaySwitch",
|
|
8
|
+
properties: ["checked", "value", "name", "label", "description", "error", "labelPosition", "color", "size", "disabled", "indeterminate", "required", "variant", "radius", "descriptionPosition"],
|
|
9
|
+
events: { onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/table";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayTable = /*#__PURE__*/ createComponent("ray-table", {
|
|
7
|
+
displayName: "RayTable",
|
|
8
|
+
properties: ["columns", "data", "rowKey", "selectable", "selection", "sort", "manualSort", "clickableRows", "striped", "withBorder", "withColumnBorders", "stickyHeader", "noHover", "density", "label", "emptyLabel"],
|
|
9
|
+
events: { onRaySort: "ray-sort", onRaySelectionChange: "ray-selection-change", onRayRowClick: "ray-row-click" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/tabs";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayTabs = /*#__PURE__*/ createComponent("ray-tabs", {
|
|
7
|
+
displayName: "RayTabs",
|
|
8
|
+
properties: ["value", "variant", "orientation", "color", "activation", "grow"],
|
|
9
|
+
events: { onChange: "change" },
|
|
10
|
+
});
|
|
11
|
+
export const RayTab = /*#__PURE__*/ createComponent("ray-tab", {
|
|
12
|
+
displayName: "RayTab",
|
|
13
|
+
properties: ["value", "disabled"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
16
|
+
export const RayTabPanel = /*#__PURE__*/ createComponent("ray-tab-panel", {
|
|
17
|
+
displayName: "RayTabPanel",
|
|
18
|
+
properties: ["value"],
|
|
19
|
+
events: { },
|
|
20
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/textarea";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayTextarea = /*#__PURE__*/ createComponent("ray-textarea", {
|
|
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" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/theme-toggle";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayThemeToggle = /*#__PURE__*/ createComponent("ray-theme-toggle", {
|
|
7
|
+
displayName: "RayThemeToggle",
|
|
8
|
+
properties: ["size"],
|
|
9
|
+
events: { onRayThemeChange: "ray-theme-change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/timeline";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayTimeline = /*#__PURE__*/ createComponent("ray-timeline", {
|
|
7
|
+
displayName: "RayTimeline",
|
|
8
|
+
properties: ["active", "align", "bulletSize", "lineWidth", "color", "reverseActive"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
|
11
|
+
export const RayTimelineItem = /*#__PURE__*/ createComponent("ray-timeline-item", {
|
|
12
|
+
displayName: "RayTimelineItem",
|
|
13
|
+
properties: ["label", "time", "icon", "color", "lineVariant"],
|
|
14
|
+
events: { },
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/toggle-group";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayToggleGroup = /*#__PURE__*/ createComponent("ray-toggle-group", {
|
|
7
|
+
displayName: "RayToggleGroup",
|
|
8
|
+
properties: ["type", "value", "name", "required", "disabled", "spaced", "variant", "color", "size", "radius", "square", "orientation", "fullWidth", "label"],
|
|
9
|
+
events: { onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/toggle";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayToggle = /*#__PURE__*/ createComponent("ray-toggle", {
|
|
7
|
+
displayName: "RayToggle",
|
|
8
|
+
properties: ["pressed", "variant", "square", "label", "gradient", "color", "size", "radius", "type", "disabled", "loading", "fullWidth", "href", "target", "name", "value"],
|
|
9
|
+
events: { onChange: "change" },
|
|
10
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by ray-elements tools from component.toml files. Do not edit.
|
|
2
|
+
|
|
3
|
+
import "@raylang/elements/tooltip";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayTooltip = /*#__PURE__*/ createComponent("ray-tooltip", {
|
|
7
|
+
displayName: "RayTooltip",
|
|
8
|
+
properties: ["label", "placement", "openDelay", "closeDelay", "color", "disabled", "open", "offset"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
package/create.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// React wrapper factory for ray-elements custom elements (React 18 and 19).
|
|
2
|
+
//
|
|
3
|
+
// Declared properties are assigned as DOM properties (not attributes, so
|
|
4
|
+
// booleans, arrays and objects arrive intact) after every render; declared
|
|
5
|
+
// events (onRaySelect -> "ray-select") are attached with addEventListener.
|
|
6
|
+
// Everything else (className, style, id, slot, aria-*, data-*, onClick…)
|
|
7
|
+
// passes through to the element as usual.
|
|
8
|
+
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} tagName custom element tag
|
|
13
|
+
* @param {{ properties?: string[], events?: Record<string, string>, displayName?: string }} options
|
|
14
|
+
* events maps a React prop name to a DOM event name: { onRaySelect: "ray-select" }
|
|
15
|
+
*/
|
|
16
|
+
export function createComponent(tagName, { properties = [], events = {}, displayName } = {}) {
|
|
17
|
+
const propSet = new Set(properties);
|
|
18
|
+
const Component = React.forwardRef(function RayComponent(props, ref) {
|
|
19
|
+
const elRef = React.useRef(null);
|
|
20
|
+
const passthrough = {};
|
|
21
|
+
const values = {};
|
|
22
|
+
const handlers = {};
|
|
23
|
+
for (const key of Object.keys(props)) {
|
|
24
|
+
if (key === "children") continue;
|
|
25
|
+
if (key in events) handlers[events[key]] = props[key];
|
|
26
|
+
else if (propSet.has(key)) values[key] = props[key];
|
|
27
|
+
else passthrough[key] = props[key];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Properties: after each render, before paint.
|
|
31
|
+
React.useLayoutEffect(() => {
|
|
32
|
+
const el = elRef.current;
|
|
33
|
+
if (!el) return;
|
|
34
|
+
for (const key of Object.keys(values)) {
|
|
35
|
+
if (!Object.is(el[key], values[key])) el[key] = values[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Events: one stable listener per event type, calling the latest handler.
|
|
40
|
+
const handlersRef = React.useRef(handlers);
|
|
41
|
+
handlersRef.current = handlers;
|
|
42
|
+
const typesKey = Object.keys(handlers).sort().join(",");
|
|
43
|
+
React.useLayoutEffect(() => {
|
|
44
|
+
const el = elRef.current;
|
|
45
|
+
if (!el || !typesKey) return undefined;
|
|
46
|
+
const listeners = typesKey.split(",").map((type) => {
|
|
47
|
+
const listener = (event) => handlersRef.current[type]?.(event);
|
|
48
|
+
el.addEventListener(type, listener);
|
|
49
|
+
return [type, listener];
|
|
50
|
+
});
|
|
51
|
+
return () => listeners.forEach(([type, listener]) => el.removeEventListener(type, listener));
|
|
52
|
+
}, [typesKey]);
|
|
53
|
+
|
|
54
|
+
const setRef = React.useCallback((el) => {
|
|
55
|
+
elRef.current = el;
|
|
56
|
+
if (typeof ref === "function") ref(el);
|
|
57
|
+
else if (ref) ref.current = el;
|
|
58
|
+
}, [ref]);
|
|
59
|
+
|
|
60
|
+
return React.createElement(tagName, { ...passthrough, ref: setRef, suppressHydrationWarning: true }, props.children);
|
|
61
|
+
});
|
|
62
|
+
Component.displayName = displayName ?? tagName;
|
|
63
|
+
return Component;
|
|
64
|
+
}
|