@raylang/react 0.12.0 → 0.13.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/date-picker.js +2 -2
- package/index.d.ts +14 -10
- package/package.json +2 -2
|
@@ -5,11 +5,11 @@ import { createComponent } from "../create.js";
|
|
|
5
5
|
|
|
6
6
|
export const RayDatePicker = /*#__PURE__*/ createComponent("ray-date-picker", {
|
|
7
7
|
displayName: "RayDatePicker",
|
|
8
|
-
properties: ["value", "min", "max", "placeholder", "format", "locale", "firstDay", "clearable", "open", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "size", "radius", "variant"],
|
|
8
|
+
properties: ["value", "min", "max", "placeholder", "format", "locale", "firstDay", "clearable", "open", "native", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "size", "radius", "variant"],
|
|
9
9
|
events: { onInput: "input", onChange: "change", onRayOpen: "ray-open", onRayClose: "ray-close" },
|
|
10
10
|
});
|
|
11
11
|
export const RayCalendar = /*#__PURE__*/ createComponent("ray-calendar", {
|
|
12
12
|
displayName: "RayCalendar",
|
|
13
|
-
properties: ["value", "min", "max", "locale", "firstDay", "size"],
|
|
13
|
+
properties: ["value", "min", "max", "locale", "firstDay", "size", "dayState"],
|
|
14
14
|
events: { onChange: "change" },
|
|
15
15
|
});
|
package/index.d.ts
CHANGED
|
@@ -388,6 +388,8 @@ export interface RayDatePickerOwnProps {
|
|
|
388
388
|
clearable?: boolean;
|
|
389
389
|
/** The calendar dropdown is shown. */
|
|
390
390
|
open?: boolean;
|
|
391
|
+
/** Which picker the trigger opens: the system's (the native date input's, the usual one on a phone) or the calendar dropdown. auto: the system's on a touch screen (pointer: coarse), else the calendar. A date picked in the system's picker is the value like one picked in the calendar. */
|
|
392
|
+
native?: "auto" | "always" | "never";
|
|
391
393
|
/** Form field name. */
|
|
392
394
|
name?: string;
|
|
393
395
|
/** Visible label (also the accessible name). */
|
|
@@ -434,6 +436,8 @@ export interface RayCalendarOwnProps {
|
|
|
434
436
|
firstDay?: number;
|
|
435
437
|
/** Day cell size and font size. */
|
|
436
438
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
439
|
+
/** Marks days: called with each day's ISO date on every render, it returns a state name (letters, digits, - and _) or nothing. The day button gets data-state and the part day-<state>, so ::part(day-taken) (or ::part(day-missed)::after for a dot) styles it from outside. Call refresh() when what it marks changed but the month did not. */
|
|
440
|
+
dayState?: ((date: string) => string | null | undefined) | null;
|
|
437
441
|
/** A day was selected (read `value`). */
|
|
438
442
|
onChange?: (event: Event) => void;
|
|
439
443
|
}
|
|
@@ -494,8 +498,8 @@ export declare const RayFileUpload: React.ForwardRefExoticComponent<RayFileUploa
|
|
|
494
498
|
export interface RayInputOwnProps {
|
|
495
499
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
496
500
|
value?: string;
|
|
497
|
-
/** Input type. */
|
|
498
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
501
|
+
/** Input type. time, date and datetime-local show the browser's picker (the native one on phones); value is what the input gives: "HH:MM", "YYYY-MM-DD", "YYYY-MM-DDTHH:MM". */
|
|
502
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
499
503
|
/** Form field name. */
|
|
500
504
|
name?: string;
|
|
501
505
|
/** Visible label (also the accessible name). */
|
|
@@ -576,8 +580,8 @@ export interface RayModeInputOwnProps {
|
|
|
576
580
|
nativeMenu?: boolean;
|
|
577
581
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
578
582
|
value?: string;
|
|
579
|
-
/** Input type. */
|
|
580
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
583
|
+
/** Input type. time, date and datetime-local show the browser's picker (the native one on phones); value is what the input gives: "HH:MM", "YYYY-MM-DD", "YYYY-MM-DDTHH:MM". */
|
|
584
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
581
585
|
/** Form field name. */
|
|
582
586
|
name?: string;
|
|
583
587
|
/** Visible label (also the accessible name). */
|
|
@@ -712,8 +716,8 @@ export interface RayPasswordInputOwnProps {
|
|
|
712
716
|
hideLabel?: string;
|
|
713
717
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
714
718
|
value?: string;
|
|
715
|
-
/** Input type. */
|
|
716
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
719
|
+
/** Input type. time, date and datetime-local show the browser's picker (the native one on phones); value is what the input gives: "HH:MM", "YYYY-MM-DD", "YYYY-MM-DDTHH:MM". */
|
|
720
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
717
721
|
/** Form field name. */
|
|
718
722
|
name?: string;
|
|
719
723
|
/** Visible label (also the accessible name). */
|
|
@@ -792,8 +796,8 @@ export interface RayPathInputOwnProps {
|
|
|
792
796
|
dialogTitle?: string;
|
|
793
797
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
794
798
|
value?: string;
|
|
795
|
-
/** Input type. */
|
|
796
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
799
|
+
/** Input type. time, date and datetime-local show the browser's picker (the native one on phones); value is what the input gives: "HH:MM", "YYYY-MM-DD", "YYYY-MM-DDTHH:MM". */
|
|
800
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
797
801
|
/** Form field name. */
|
|
798
802
|
name?: string;
|
|
799
803
|
/** Visible label (also the accessible name). */
|
|
@@ -1574,8 +1578,8 @@ export interface RayDrawerOwnProps {
|
|
|
1574
1578
|
description?: string;
|
|
1575
1579
|
/** The edge it slides from: start/end follow the writing direction; left/right are sides of the screen. */
|
|
1576
1580
|
position?: "end" | "start" | "right" | "left" | "top" | "bottom";
|
|
1577
|
-
/** Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length. */
|
|
1578
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {});
|
|
1581
|
+
/** Width (left/right) or height (top/bottom): xs…xl, full, content (as big as what it holds, up to the viewport: a bottom sheet) or any CSS length. */
|
|
1582
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "content" | (string & {});
|
|
1579
1583
|
/** No backdrop nor scroll lock: the page stays interactive (a side panel). */
|
|
1580
1584
|
modeless?: boolean;
|
|
1581
1585
|
/** Detached from the edge, with rounded corners. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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.13.0",
|
|
32
32
|
"react": ">=18"
|
|
33
33
|
}
|
|
34
34
|
}
|