@yusr_systems/ui 6.0.7 → 6.0.8

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/dist/index.d.ts CHANGED
@@ -523,7 +523,7 @@ declare interface DateFieldProps extends DateInputProps {
523
523
  required?: boolean;
524
524
  }
525
525
 
526
- export declare function DateInput({ value, onChange, isInvalid, placeholder, locale }: DateInputProps): JSX.Element;
526
+ export declare function DateInput({ value, onChange, isInvalid, placeholder, locale, startYear, endYear, }: DateInputProps): JSX.Element;
527
527
 
528
528
  export declare interface DateInputProps {
529
529
  value?: Date;
@@ -531,6 +531,8 @@ export declare interface DateInputProps {
531
531
  isInvalid?: boolean;
532
532
  placeholder?: string;
533
533
  locale?: any;
534
+ startYear?: number;
535
+ endYear?: number;
534
536
  }
535
537
 
536
538
  export declare function DateTimeField({ label, error, isInvalid, required, ...props }: DateTimeFieldProps): JSX.Element;
package/dist/yusr-ui.js CHANGED
@@ -1100,23 +1100,34 @@ function Bt({ className: e, ...t }) {
1100
1100
  }
1101
1101
  //#endregion
1102
1102
  //#region src/components/custom/inputs/dateInput.tsx
1103
- function Vt({ value: e, onChange: t, isInvalid: n, placeholder: r = "اختر تاريخا", locale: i = jt }) {
1104
- return /* @__PURE__ */ o(Pt, { children: [/* @__PURE__ */ a(Ft, {
1105
- asChild: !0,
1106
- children: /* @__PURE__ */ o(F, {
1107
- variant: "outline",
1108
- className: P("w-full justify-between text-left font-normal", !e && "text-muted-foreground", n && "border-red-600 ring-red-600 text-red-900"),
1109
- children: [e ? Fe(e, "PPP", { locale: i }) : /* @__PURE__ */ a("span", { children: r }), /* @__PURE__ */ a(l, { className: "h-4 w-4 opacity-50" })]
1110
- })
1111
- }), /* @__PURE__ */ a(It, {
1112
- className: "w-auto p-0",
1113
- children: /* @__PURE__ */ a(Mt, {
1114
- mode: "single",
1115
- selected: e,
1116
- onSelect: t,
1117
- locale: i
1118
- })
1119
- })] });
1103
+ function Vt({ value: e, onChange: t, isInvalid: n, placeholder: r = "اختر تاريخا", locale: i = jt, startYear: s = (/* @__PURE__ */ new Date()).getFullYear() - 100, endYear: c = (/* @__PURE__ */ new Date()).getFullYear() + 10 }) {
1104
+ let [u, d] = x(!1);
1105
+ return /* @__PURE__ */ o(Pt, {
1106
+ open: u,
1107
+ onOpenChange: d,
1108
+ children: [/* @__PURE__ */ a(Ft, {
1109
+ asChild: !0,
1110
+ children: /* @__PURE__ */ o(F, {
1111
+ variant: "outline",
1112
+ className: P("w-full justify-between text-left font-normal", !e && "text-muted-foreground", n && "border-red-600 ring-red-600 text-red-900"),
1113
+ children: [e ? Fe(e, "PPP", { locale: i }) : /* @__PURE__ */ a("span", { children: r }), /* @__PURE__ */ a(l, { className: "h-4 w-4 opacity-50" })]
1114
+ })
1115
+ }), /* @__PURE__ */ a(It, {
1116
+ className: "w-auto p-0",
1117
+ align: "start",
1118
+ children: /* @__PURE__ */ a(Mt, {
1119
+ mode: "single",
1120
+ selected: e,
1121
+ onSelect: (e) => {
1122
+ t(e), d(!1);
1123
+ },
1124
+ locale: i,
1125
+ captionLayout: "dropdown",
1126
+ startMonth: new Date(s, 0),
1127
+ endMonth: new Date(c, 11)
1128
+ })
1129
+ })]
1130
+ });
1120
1131
  }
1121
1132
  //#endregion
1122
1133
  //#region src/components/pure/label.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yusr_systems/ui",
3
- "version": "6.0.7",
3
+ "version": "6.0.8",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@radix-ui/react-toggle-group": "^1.1.11",
42
42
  "@radix-ui/react-tooltip": "^1.2.8",
43
43
  "@reduxjs/toolkit": "^2.0.0",
44
- "@yusr_systems/core": "^6.0.7",
44
+ "@yusr_systems/core": "^6.0.8",
45
45
  "class-variance-authority": "^0.7.1",
46
46
  "clsx": "^2.1.1",
47
47
  "cmdk": "^1.1.1",