@raylang/vue 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.
@@ -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/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). */
@@ -589,8 +593,8 @@ export interface RayModeInputProps {
589
593
  nativeMenu?: boolean;
590
594
  /** Current value. The value attribute is the initial value (restored on form reset). */
591
595
  value?: string;
592
- /** Input type. */
593
- 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";
594
598
  /** Form field name. */
595
599
  name?: string;
596
600
  /** Visible label (also the accessible name). */
@@ -726,8 +730,8 @@ export interface RayPasswordInputProps {
726
730
  hideLabel?: string;
727
731
  /** Current value. The value attribute is the initial value (restored on form reset). */
728
732
  value?: string;
729
- /** Input type. */
730
- 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";
731
735
  /** Form field name. */
732
736
  name?: string;
733
737
  /** Visible label (also the accessible name). */
@@ -805,8 +809,8 @@ export interface RayPathInputProps {
805
809
  dialogTitle?: string;
806
810
  /** Current value. The value attribute is the initial value (restored on form reset). */
807
811
  value?: string;
808
- /** Input type. */
809
- 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";
810
814
  /** Form field name. */
811
815
  name?: string;
812
816
  /** Visible label (also the accessible name). */
@@ -1602,8 +1606,8 @@ export interface RayDrawerProps {
1602
1606
  description?: string;
1603
1607
  /** The edge it slides from: start/end follow the writing direction; left/right are sides of the screen. */
1604
1608
  position?: "end" | "start" | "right" | "left" | "top" | "bottom";
1605
- /** Width (left/right) or height (top/bottom): xs…xl, full, or any CSS length. */
1606
- 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 & {});
1607
1611
  /** No backdrop nor scroll lock: the page stays interactive (a side panel). */
1608
1612
  modeless?: boolean;
1609
1613
  /** Detached from the edge, with rounded corners. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raylang/vue",
3
- "version": "0.12.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.12.0",
31
+ "@raylang/elements": "^0.13.0",
32
32
  "vue": ">=3.3"
33
33
  }
34
34
  }