@raylang/react 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/components/icon.js +1 -1
- package/components/number-input.js +1 -1
- package/components/radio.js +5 -0
- package/components/ring-progress.js +10 -0
- package/components/step-dots.js +10 -0
- package/index.d.ts +85 -13
- package/index.js +3 -1
- package/package.json +2 -2
package/components/icon.js
CHANGED
|
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
|
|
|
5
5
|
|
|
6
6
|
export const RayIcon = /*#__PURE__*/ createComponent("ray-icon", {
|
|
7
7
|
displayName: "RayIcon",
|
|
8
|
-
properties: ["name", "size", "label", "color", "stroke"],
|
|
8
|
+
properties: ["name", "filled", "size", "label", "color", "stroke"],
|
|
9
9
|
events: { },
|
|
10
10
|
});
|
|
@@ -5,6 +5,6 @@ import { createComponent } from "../create.js";
|
|
|
5
5
|
|
|
6
6
|
export const RayNumberInput = /*#__PURE__*/ createComponent("ray-number-input", {
|
|
7
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"],
|
|
8
|
+
properties: ["value", "min", "max", "step", "decimals", "prefix", "suffix", "thousandsSeparator", "decimalSeparator", "clamp", "format", "hideControls", "placeholder", "readonly", "name", "label", "description", "error", "required", "disabled", "size", "radius", "variant", "descriptionPosition"],
|
|
9
9
|
events: { onInput: "input", onChange: "change" },
|
|
10
10
|
});
|
package/components/radio.js
CHANGED
|
@@ -13,3 +13,8 @@ export const RayRadio = /*#__PURE__*/ createComponent("ray-radio", {
|
|
|
13
13
|
properties: ["value", "checked", "label", "description", "disabled", "color", "size", "variant"],
|
|
14
14
|
events: { },
|
|
15
15
|
});
|
|
16
|
+
export const RayRadioCard = /*#__PURE__*/ createComponent("ray-radio-card", {
|
|
17
|
+
displayName: "RayRadioCard",
|
|
18
|
+
properties: ["hideIndicator", "value", "checked", "label", "description", "disabled", "color", "size", "variant"],
|
|
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/ring-progress";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayRingProgress = /*#__PURE__*/ createComponent("ray-ring-progress", {
|
|
7
|
+
displayName: "RayRingProgress",
|
|
8
|
+
properties: ["value", "max", "color", "size", "thickness", "roundCaps", "showValue", "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/step-dots";
|
|
4
|
+
import { createComponent } from "../create.js";
|
|
5
|
+
|
|
6
|
+
export const RayStepDots = /*#__PURE__*/ createComponent("ray-step-dots", {
|
|
7
|
+
displayName: "RayStepDots",
|
|
8
|
+
properties: ["count", "value", "color", "size", "align", "label", "valueText", "doneText"],
|
|
9
|
+
events: { },
|
|
10
|
+
});
|
package/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export interface RayButtonOwnProps {
|
|
|
16
16
|
gradient?: string;
|
|
17
17
|
/** A palette color (blue, red…) or any CSS color. Default: the primary color. */
|
|
18
18
|
color?: string;
|
|
19
|
-
/** Height, padding and font size. */
|
|
20
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
19
|
+
/** Height, padding and font size: xs…xl or any CSS length (the padding and the font follow). */
|
|
20
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
21
21
|
/** Corner radius. Default: --ray-radius-default. */
|
|
22
22
|
radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
23
23
|
/** submit/reset act on the enclosing form. */
|
|
@@ -62,8 +62,8 @@ export interface RayIconButtonOwnProps {
|
|
|
62
62
|
gradient?: string;
|
|
63
63
|
/** A palette color or any CSS color. */
|
|
64
64
|
color?: string;
|
|
65
|
-
/** Width and height. */
|
|
66
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
65
|
+
/** Width and height: xs…xl or any CSS length ("5.5rem": a big main action, round with radius=full); the icon scales with it. */
|
|
66
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
67
67
|
/** Not interactive. */
|
|
68
68
|
disabled?: boolean;
|
|
69
69
|
/** Shows a spinner instead of the icon. */
|
|
@@ -100,8 +100,8 @@ export interface RayToggleOwnProps {
|
|
|
100
100
|
gradient?: string;
|
|
101
101
|
/** A palette color (blue, red…) or any CSS color. Default: the primary color. */
|
|
102
102
|
color?: string;
|
|
103
|
-
/** Height, padding and font size. */
|
|
104
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
103
|
+
/** Height, padding and font size: xs…xl or any CSS length (the padding and the font follow). */
|
|
104
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
105
105
|
/** Corner radius. Default: --ray-radius-default. */
|
|
106
106
|
radius?: "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
107
107
|
/** submit/reset act on the enclosing form. */
|
|
@@ -572,6 +572,8 @@ export interface RayNumberInputOwnProps {
|
|
|
572
572
|
decimalSeparator?: string;
|
|
573
573
|
/** When out-of-range input is clamped: on blur, while typing, or never (then it is invalid). */
|
|
574
574
|
clamp?: "blur" | "strict" | "none";
|
|
575
|
+
/** 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. */
|
|
576
|
+
format?: "number" | "duration";
|
|
575
577
|
/** No + and − buttons (the keys still step). */
|
|
576
578
|
hideControls?: boolean;
|
|
577
579
|
/** Shown while empty. */
|
|
@@ -801,6 +803,30 @@ export type RayRadioProps = RayRadioOwnProps & Omit<React.HTMLAttributes<Ray.Ray
|
|
|
801
803
|
/** <ray-radio> as a React component. */
|
|
802
804
|
export declare const RayRadio: React.ForwardRefExoticComponent<RayRadioProps & React.RefAttributes<Ray.RayRadio>>;
|
|
803
805
|
|
|
806
|
+
export interface RayRadioCardOwnProps {
|
|
807
|
+
/** No radio circle: the card's border and background alone show the choice. */
|
|
808
|
+
hideIndicator?: boolean;
|
|
809
|
+
/** Value given to the group when chosen. */
|
|
810
|
+
value?: string;
|
|
811
|
+
/** Whether this radio is the group's value; setting it sets the group's value. The checked attribute marks the group's initial value (when the group has no value attribute). */
|
|
812
|
+
checked?: boolean;
|
|
813
|
+
/** Label text (or the content). */
|
|
814
|
+
label?: string;
|
|
815
|
+
/** Help text under the label. */
|
|
816
|
+
description?: string;
|
|
817
|
+
/** Cannot be chosen. */
|
|
818
|
+
disabled?: boolean;
|
|
819
|
+
/** Overrides the group color. */
|
|
820
|
+
color?: string;
|
|
821
|
+
/** Overrides the group size. */
|
|
822
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
823
|
+
/** Overrides the group variant. */
|
|
824
|
+
variant?: "filled" | "outline";
|
|
825
|
+
}
|
|
826
|
+
export type RayRadioCardProps = RayRadioCardOwnProps & Omit<React.HTMLAttributes<Ray.RayRadioCard>, keyof RayRadioCardOwnProps> & { children?: React.ReactNode };
|
|
827
|
+
/** <ray-radio-card> as a React component. */
|
|
828
|
+
export declare const RayRadioCard: React.ForwardRefExoticComponent<RayRadioCardProps & React.RefAttributes<Ray.RayRadioCard>>;
|
|
829
|
+
|
|
804
830
|
export interface RaySearchOwnProps {
|
|
805
831
|
/** Current text. */
|
|
806
832
|
value?: string;
|
|
@@ -1076,8 +1102,8 @@ export interface RayBottomNavItemOwnProps {
|
|
|
1076
1102
|
value?: string;
|
|
1077
1103
|
/** The label. */
|
|
1078
1104
|
label?: string;
|
|
1079
|
-
/** An icon of the registry (or put one in the icon slot). */
|
|
1080
|
-
icon?:
|
|
1105
|
+
/** 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). */
|
|
1106
|
+
icon?: Ray.IconName;
|
|
1081
1107
|
/** Makes it a link. */
|
|
1082
1108
|
href?: string;
|
|
1083
1109
|
/** A count or a short text on the icon. */
|
|
@@ -1603,7 +1629,7 @@ export interface RayBlockquoteOwnProps {
|
|
|
1603
1629
|
/** light: tinted background; outline: border and edge only; filled: solid color (a pull quote). */
|
|
1604
1630
|
variant?: "light" | "outline" | "filled";
|
|
1605
1631
|
/** Registry icon of the mark, or none. The icon slot replaces it. */
|
|
1606
|
-
icon?:
|
|
1632
|
+
icon?: Ray.IconName;
|
|
1607
1633
|
/** Text size (lg for a pull quote). */
|
|
1608
1634
|
size?: "sm" | "md" | "lg";
|
|
1609
1635
|
/** Inner spacing: xs…xl (the spacing scale), px as a number, or a CSS length. Default: md. */
|
|
@@ -1683,7 +1709,9 @@ export declare const RayCode: React.ForwardRefExoticComponent<RayCodeProps & Rea
|
|
|
1683
1709
|
|
|
1684
1710
|
export interface RayIconOwnProps {
|
|
1685
1711
|
/** Registered icon name (iconNames()); "none" draws nothing, a blank that keeps the alignment (a menu item without its check). */
|
|
1686
|
-
name?:
|
|
1712
|
+
name?: Ray.IconName;
|
|
1713
|
+
/** 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. */
|
|
1714
|
+
filled?: boolean;
|
|
1687
1715
|
/** xs…xl or any CSS length. Default: 1em. */
|
|
1688
1716
|
size?: string;
|
|
1689
1717
|
/** Accessible name; without it the icon is decorative (hidden from screen readers). */
|
|
@@ -1823,7 +1851,7 @@ export interface RayTimelineItemOwnProps {
|
|
|
1823
1851
|
/** When ("2 h ago", a date). */
|
|
1824
1852
|
time?: string;
|
|
1825
1853
|
/** An icon of the registry in the bullet. */
|
|
1826
|
-
icon?:
|
|
1854
|
+
icon?: Ray.IconName;
|
|
1827
1855
|
/** Its own color (a failed step in red). */
|
|
1828
1856
|
color?: string;
|
|
1829
1857
|
/** The line to the next item (dashed: not happened yet). */
|
|
@@ -1843,7 +1871,7 @@ export interface RayAlertOwnProps {
|
|
|
1843
1871
|
/** Corner radius. */
|
|
1844
1872
|
radius?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
1845
1873
|
/** A registered icon name, or none. */
|
|
1846
|
-
icon?:
|
|
1874
|
+
icon?: Ray.IconName;
|
|
1847
1875
|
/** A close button; closing hides the alert (cancel ray-close to keep it). */
|
|
1848
1876
|
closable?: boolean;
|
|
1849
1877
|
/** Accessible name of the close button. */
|
|
@@ -1873,7 +1901,7 @@ export interface RayNotificationOwnProps {
|
|
|
1873
1901
|
/** Status color: tints the status icon (and a slotted icon's circle). */
|
|
1874
1902
|
color?: string;
|
|
1875
1903
|
/** Status icon from the registry (default: from the color); "none" for no icon. */
|
|
1876
|
-
icon?:
|
|
1904
|
+
icon?: Ray.IconName;
|
|
1877
1905
|
/** Shows a spinner (notify() does not auto-close it). */
|
|
1878
1906
|
loading?: boolean;
|
|
1879
1907
|
/** No close button. */
|
|
@@ -1931,6 +1959,28 @@ export type RayProgressProps = RayProgressOwnProps & Omit<React.HTMLAttributes<R
|
|
|
1931
1959
|
/** <ray-progress> as a React component. */
|
|
1932
1960
|
export declare const RayProgress: React.ForwardRefExoticComponent<RayProgressProps & React.RefAttributes<Ray.RayProgress>>;
|
|
1933
1961
|
|
|
1962
|
+
export interface RayRingProgressOwnProps {
|
|
1963
|
+
/** Progress, from 0 to max. Unset: indeterminate (a spinning arc). */
|
|
1964
|
+
value?: number;
|
|
1965
|
+
/** The value of a full ring. */
|
|
1966
|
+
max?: number;
|
|
1967
|
+
/** A palette color or any CSS color. Default: the primary color. */
|
|
1968
|
+
color?: string;
|
|
1969
|
+
/** Diameter: xs…xl (3, 5, 7.5, 10, 12.5rem) or any CSS length. */
|
|
1970
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
|
|
1971
|
+
/** Width of the ring: a CSS length (a bare number is px). Default: a tenth of the diameter. */
|
|
1972
|
+
thickness?: string;
|
|
1973
|
+
/** Rounded ends of the arc. */
|
|
1974
|
+
roundCaps?: boolean;
|
|
1975
|
+
/** Shows the percentage in the middle (when the default slot is empty). */
|
|
1976
|
+
showValue?: boolean;
|
|
1977
|
+
/** Accessible name (default: Progress). */
|
|
1978
|
+
label?: string;
|
|
1979
|
+
}
|
|
1980
|
+
export type RayRingProgressProps = RayRingProgressOwnProps & Omit<React.HTMLAttributes<Ray.RayRingProgress>, keyof RayRingProgressOwnProps> & { children?: React.ReactNode };
|
|
1981
|
+
/** <ray-ring-progress> as a React component. */
|
|
1982
|
+
export declare const RayRingProgress: React.ForwardRefExoticComponent<RayRingProgressProps & React.RefAttributes<Ray.RayRingProgress>>;
|
|
1983
|
+
|
|
1934
1984
|
export interface RaySkeletonOwnProps {
|
|
1935
1985
|
/** Width (CSS length, a number is px). Default: 100% (a circle: 2.5rem). */
|
|
1936
1986
|
width?: string;
|
|
@@ -1963,6 +2013,28 @@ export type RaySpinnerProps = RaySpinnerOwnProps & Omit<React.HTMLAttributes<Ray
|
|
|
1963
2013
|
/** <ray-spinner> as a React component. */
|
|
1964
2014
|
export declare const RaySpinner: React.ForwardRefExoticComponent<RaySpinnerProps & React.RefAttributes<Ray.RaySpinner>>;
|
|
1965
2015
|
|
|
2016
|
+
export interface RayStepDotsOwnProps {
|
|
2017
|
+
/** Number of steps (dots). */
|
|
2018
|
+
count?: number;
|
|
2019
|
+
/** The current step, 0-based; count means every step is done. */
|
|
2020
|
+
value?: number;
|
|
2021
|
+
/** A palette color or any CSS color for done and current dots. Default: the primary color. */
|
|
2022
|
+
color?: string;
|
|
2023
|
+
/** Size of a dot. */
|
|
2024
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
2025
|
+
/** Where the row sits in its width. */
|
|
2026
|
+
align?: "start" | "center" | "end";
|
|
2027
|
+
/** 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. */
|
|
2028
|
+
label?: string;
|
|
2029
|
+
/** 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}". */
|
|
2030
|
+
valueText?: string;
|
|
2031
|
+
/** The announced text once every step is done (value = count), with {count}. Default: value-text, else "{count} of {count}, done". */
|
|
2032
|
+
doneText?: string;
|
|
2033
|
+
}
|
|
2034
|
+
export type RayStepDotsProps = RayStepDotsOwnProps & Omit<React.HTMLAttributes<Ray.RayStepDots>, keyof RayStepDotsOwnProps> & { children?: React.ReactNode };
|
|
2035
|
+
/** <ray-step-dots> as a React component. */
|
|
2036
|
+
export declare const RayStepDots: React.ForwardRefExoticComponent<RayStepDotsProps & React.RefAttributes<Ray.RayStepDots>>;
|
|
2037
|
+
|
|
1966
2038
|
export interface RayAppBarOwnProps {
|
|
1967
2039
|
/** The title. */
|
|
1968
2040
|
label?: string;
|
package/index.js
CHANGED
|
@@ -19,7 +19,7 @@ export { RayInput } from "./components/input.js";
|
|
|
19
19
|
export { RayNumberInput } from "./components/number-input.js";
|
|
20
20
|
export { RayPasswordInput } from "./components/password-input.js";
|
|
21
21
|
export { RayPathInput } from "./components/path-input.js";
|
|
22
|
-
export { RayRadioGroup, RayRadio } from "./components/radio.js";
|
|
22
|
+
export { RayRadioGroup, RayRadio, RayRadioCard } from "./components/radio.js";
|
|
23
23
|
export { RaySearch } from "./components/search.js";
|
|
24
24
|
export { RaySegmentedControl } from "./components/segmented-control.js";
|
|
25
25
|
export { RaySelect } from "./components/select.js";
|
|
@@ -56,8 +56,10 @@ export { RayAlert } from "./components/alert.js";
|
|
|
56
56
|
export { RayEmptyState } from "./components/empty-state.js";
|
|
57
57
|
export { RayNotification, RayToaster } from "./components/notification.js";
|
|
58
58
|
export { RayProgress } from "./components/progress.js";
|
|
59
|
+
export { RayRingProgress } from "./components/ring-progress.js";
|
|
59
60
|
export { RaySkeleton } from "./components/skeleton.js";
|
|
60
61
|
export { RaySpinner } from "./components/spinner.js";
|
|
62
|
+
export { RayStepDots } from "./components/step-dots.js";
|
|
61
63
|
export { RayAppBar } from "./components/app-bar.js";
|
|
62
64
|
export { RayAppShell } from "./components/app-shell.js";
|
|
63
65
|
export { RayAspectRatio } from "./components/aspect-ratio.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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.
|
|
31
|
+
"@raylang/elements": "^0.7.0",
|
|
32
32
|
"react": ">=18"
|
|
33
33
|
}
|
|
34
34
|
}
|