@raylang/vue 0.11.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/components/menu.js +1 -1
- package/components/popover.js +1 -1
- package/index.d.ts +28 -10
- package/package.json +2 -2
|
@@ -4,12 +4,12 @@ import "@raylang/elements/date-picker";
|
|
|
4
4
|
import { createComponent } from "../create.js";
|
|
5
5
|
|
|
6
6
|
export const RayDatePicker = /*#__PURE__*/ createComponent("RayDatePicker", "ray-date-picker", {
|
|
7
|
-
properties: ["value", "min", "max", "placeholder", "format", "locale", "firstDay", "clearable", "open", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "size", "radius", "variant"],
|
|
7
|
+
properties: ["value", "min", "max", "placeholder", "format", "locale", "firstDay", "clearable", "open", "native", "name", "label", "description", "descriptionPosition", "error", "required", "disabled", "size", "radius", "variant"],
|
|
8
8
|
booleans: ["clearable", "open", "required", "disabled"],
|
|
9
9
|
model: { prop: "value", events: ["change"] },
|
|
10
10
|
});
|
|
11
11
|
export const RayCalendar = /*#__PURE__*/ createComponent("RayCalendar", "ray-calendar", {
|
|
12
|
-
properties: ["value", "min", "max", "locale", "firstDay", "size"],
|
|
12
|
+
properties: ["value", "min", "max", "locale", "firstDay", "size", "dayState"],
|
|
13
13
|
booleans: [],
|
|
14
14
|
model: { prop: "value", events: ["change"] },
|
|
15
15
|
});
|
package/components/menu.js
CHANGED
|
@@ -4,7 +4,7 @@ import "@raylang/elements/menu";
|
|
|
4
4
|
import { createComponent } from "../create.js";
|
|
5
5
|
|
|
6
6
|
export const RayMenu = /*#__PURE__*/ createComponent("RayMenu", "ray-menu", {
|
|
7
|
-
properties: ["open", "placement", "context", "keepOpen", "native", "offset"],
|
|
7
|
+
properties: ["open", "placement", "context", "keepOpen", "native", "anchor", "offset"],
|
|
8
8
|
booleans: ["open", "context", "keepOpen", "native"],
|
|
9
9
|
model: { prop: "open", events: ["ray-open", "ray-close"] },
|
|
10
10
|
});
|
package/components/popover.js
CHANGED
|
@@ -4,7 +4,7 @@ import "@raylang/elements/popover";
|
|
|
4
4
|
import { createComponent } from "../create.js";
|
|
5
5
|
|
|
6
6
|
export const RayPopover = /*#__PURE__*/ createComponent("RayPopover", "ray-popover", {
|
|
7
|
-
properties: ["open", "placement", "offset", "width", "matchWidth", "padding", "trapFocus"],
|
|
7
|
+
properties: ["open", "placement", "offset", "anchor", "width", "matchWidth", "padding", "trapFocus"],
|
|
8
8
|
booleans: ["open", "matchWidth", "trapFocus"],
|
|
9
9
|
model: { prop: "open", events: ["ray-open", "ray-close"] },
|
|
10
10
|
});
|
package/index.d.ts
CHANGED
|
@@ -396,6 +396,8 @@ export interface RayDatePickerProps {
|
|
|
396
396
|
clearable?: boolean;
|
|
397
397
|
/** The calendar dropdown is shown. */
|
|
398
398
|
open?: boolean;
|
|
399
|
+
/** 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. */
|
|
400
|
+
native?: "auto" | "always" | "never";
|
|
399
401
|
/** Form field name. */
|
|
400
402
|
name?: string;
|
|
401
403
|
/** Visible label (also the accessible name). */
|
|
@@ -444,6 +446,8 @@ export interface RayCalendarProps {
|
|
|
444
446
|
firstDay?: number;
|
|
445
447
|
/** Day cell size and font size. */
|
|
446
448
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
449
|
+
/** 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. */
|
|
450
|
+
dayState?: ((date: string) => string | null | undefined) | null;
|
|
447
451
|
/** v-model: the element's `value`. */
|
|
448
452
|
modelValue?: string;
|
|
449
453
|
"onUpdate:modelValue"?: (value: string) => void;
|
|
@@ -505,8 +509,8 @@ export declare const RayFileUpload: DefineComponent<RayFileUploadProps>;
|
|
|
505
509
|
export interface RayInputProps {
|
|
506
510
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
507
511
|
value?: string;
|
|
508
|
-
/** Input type. */
|
|
509
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
512
|
+
/** 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". */
|
|
513
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
510
514
|
/** Form field name. */
|
|
511
515
|
name?: string;
|
|
512
516
|
/** Visible label (also the accessible name). */
|
|
@@ -564,6 +568,8 @@ export interface RayInputProps {
|
|
|
564
568
|
list?: string;
|
|
565
569
|
/** A suggestion was accepted (the text already has it). */
|
|
566
570
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
571
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
572
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
567
573
|
/** On every edit (value already updated). */
|
|
568
574
|
onInput?: (event: Event) => void;
|
|
569
575
|
/** When an edit is committed (blur, Enter). */
|
|
@@ -587,8 +593,8 @@ export interface RayModeInputProps {
|
|
|
587
593
|
nativeMenu?: boolean;
|
|
588
594
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
589
595
|
value?: string;
|
|
590
|
-
/** Input type. */
|
|
591
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
596
|
+
/** 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". */
|
|
597
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
592
598
|
/** Form field name. */
|
|
593
599
|
name?: string;
|
|
594
600
|
/** Visible label (also the accessible name). */
|
|
@@ -645,6 +651,8 @@ export interface RayModeInputProps {
|
|
|
645
651
|
onRayModeChange?: (event: CustomEvent<{ mode: string; previous: string | null; option: Ray.ModeOption }>) => void;
|
|
646
652
|
/** A suggestion was accepted (the text already has it). */
|
|
647
653
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
654
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
655
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
648
656
|
/** On every edit (value already updated). */
|
|
649
657
|
onInput?: (event: Event) => void;
|
|
650
658
|
/** When an edit is committed (blur, Enter). */
|
|
@@ -722,8 +730,8 @@ export interface RayPasswordInputProps {
|
|
|
722
730
|
hideLabel?: string;
|
|
723
731
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
724
732
|
value?: string;
|
|
725
|
-
/** Input type. */
|
|
726
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
733
|
+
/** 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". */
|
|
734
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
727
735
|
/** Form field name. */
|
|
728
736
|
name?: string;
|
|
729
737
|
/** Visible label (also the accessible name). */
|
|
@@ -780,6 +788,8 @@ export interface RayPasswordInputProps {
|
|
|
780
788
|
onRayVisibilityChange?: (event: CustomEvent<{ visible: boolean }>) => void;
|
|
781
789
|
/** A suggestion was accepted (the text already has it). */
|
|
782
790
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
791
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
792
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
783
793
|
/** On every edit (value already updated). */
|
|
784
794
|
onInput?: (event: Event) => void;
|
|
785
795
|
/** When an edit is committed (blur, Enter). */
|
|
@@ -799,8 +809,8 @@ export interface RayPathInputProps {
|
|
|
799
809
|
dialogTitle?: string;
|
|
800
810
|
/** Current value. The value attribute is the initial value (restored on form reset). */
|
|
801
811
|
value?: string;
|
|
802
|
-
/** Input type. */
|
|
803
|
-
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel";
|
|
812
|
+
/** 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". */
|
|
813
|
+
type?: "text" | "email" | "password" | "search" | "number" | "url" | "tel" | "time" | "date" | "datetime-local";
|
|
804
814
|
/** Form field name. */
|
|
805
815
|
name?: string;
|
|
806
816
|
/** Visible label (also the accessible name). */
|
|
@@ -859,6 +869,8 @@ export interface RayPathInputProps {
|
|
|
859
869
|
onRayError?: (event: CustomEvent<{ error: Error }>) => void;
|
|
860
870
|
/** A suggestion was accepted (the text already has it). */
|
|
861
871
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
872
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
873
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
862
874
|
/** On every edit (value already updated). */
|
|
863
875
|
onInput?: (event: Event) => void;
|
|
864
876
|
}
|
|
@@ -1199,6 +1211,8 @@ export interface RayTextareaProps {
|
|
|
1199
1211
|
wrap?: string;
|
|
1200
1212
|
/** A suggestion was accepted (the text already has it). */
|
|
1201
1213
|
onRayComplete?: (event: CustomEvent<{ item: Ray.CompletionItem; from: number; to: number }>) => void;
|
|
1214
|
+
/** The highlight range under the pointer changed: the range and the box of the line of it the pointer is on, or null on leaving a range. Anchor a ray-popover to rect (its anchor property) to show more than the title. */
|
|
1215
|
+
onRayHighlightHover?: (event: CustomEvent<{ range: Ray.HighlightRange | null; rect: DOMRect | null }>) => void;
|
|
1202
1216
|
/** On every edit. */
|
|
1203
1217
|
onInput?: (event: Event) => void;
|
|
1204
1218
|
/** When an edit is committed. */
|
|
@@ -1592,8 +1606,8 @@ export interface RayDrawerProps {
|
|
|
1592
1606
|
description?: string;
|
|
1593
1607
|
/** The edge it slides from: start/end follow the writing direction; left/right are sides of the screen. */
|
|
1594
1608
|
position?: "end" | "start" | "right" | "left" | "top" | "bottom";
|
|
1595
|
-
/** Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length. */
|
|
1596
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | (string & {});
|
|
1609
|
+
/** 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. */
|
|
1610
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "content" | (string & {});
|
|
1597
1611
|
/** No backdrop nor scroll lock: the page stays interactive (a side panel). */
|
|
1598
1612
|
modeless?: boolean;
|
|
1599
1613
|
/** Detached from the edge, with rounded corners. */
|
|
@@ -1628,6 +1642,8 @@ export interface RayMenuProps {
|
|
|
1628
1642
|
keepOpen?: boolean;
|
|
1629
1643
|
/** With a native host (ray-elements/core/raylang.js in a std/ui window), opens as the system's context menu at the pointer: items and dividers, same ray-select. */
|
|
1630
1644
|
native?: boolean;
|
|
1645
|
+
/** What the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it. */
|
|
1646
|
+
anchor?: Element | DOMRect | (() => DOMRect) | null;
|
|
1631
1647
|
/** Gap to the anchor in px. */
|
|
1632
1648
|
offset?: number;
|
|
1633
1649
|
/** v-model: the element's `open`. */
|
|
@@ -1679,6 +1695,8 @@ export interface RayPopoverProps {
|
|
|
1679
1695
|
placement?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
1680
1696
|
/** Gap to the trigger in px. */
|
|
1681
1697
|
offset?: number;
|
|
1698
|
+
/** What the panel is placed against instead of the trigger: an element, a DOMRect or a function returning one (a text range, the pointer; read again on every reposition). The trigger still opens it. */
|
|
1699
|
+
anchor?: Element | DOMRect | (() => DOMRect) | null;
|
|
1682
1700
|
/** Panel width (px number or CSS length). Default: its content. */
|
|
1683
1701
|
width?: string;
|
|
1684
1702
|
/** At least as wide as the trigger. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raylang/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Vue 3 wrappers (with v-model) of the ray-elements web components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": ["web-components", "design-system", "ui", "raylang", "vue"],
|
|
@@ -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
|
"vue": ">=3.3"
|
|
33
33
|
}
|
|
34
34
|
}
|