@cupra/ui-react 2.0.0-canary.234 → 2.0.0-canary.236

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.
@@ -1 +1 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-date-picker");var a=`ds-date-picker${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,inputId:s,value:c,label:l,required:u,disabled:d,readOnly:f,...p}=e,{ref:m}=t.useHandleEvent({change:o});return(0,i.jsxs)(a,{ref:m,class:n,...p,children:[(0,i.jsx)(`label`,{htmlFor:s,children:l}),(0,i.jsx)(`input`,{id:s,type:`date`,value:c,required:u,disabled:d,readOnly:f}),r]})}exports.DatePicker=o;
1
+ const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("@cupra/ui-kit/react/utils/version"),r=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-date-picker");var i=`ds-date-picker${n.VERSION_TAG_SUFFIX}`;function a(e){let{className:t,children:n,onChange:a,inputId:o,value:s,defaultValue:c,max:l=`9999-12-31`,label:u,required:d,disabled:f,readOnly:p,...m}=e,h=s===void 0?{defaultValue:c}:{value:s};return(0,r.jsxs)(i,{class:t,...m,children:[(0,r.jsx)(`label`,{htmlFor:o,children:u}),(0,r.jsx)(`input`,{id:o,type:`date`,...h,max:l,onChange:a,required:d,disabled:f,readOnly:p}),n]})}exports.DatePicker=a;
@@ -1,32 +1,32 @@
1
- import { useHandleEvent as e } from "../../hooks/useHandleEvent.js";
2
1
  import "react";
3
- import { VERSION_TAG_SUFFIX as t } from "@cupra/ui-kit/react/utils/version";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
2
+ import { VERSION_TAG_SUFFIX as e } from "@cupra/ui-kit/react/utils/version";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
4
  import "@cupra/ui-kit/react/ds-date-picker";
6
5
  //#region src/components/DatePicker/DatePicker.tsx
7
- var i = `ds-date-picker${t}`;
8
- function a(t) {
9
- let { className: a, children: o, onChange: s, inputId: c, value: l, label: u, required: d, disabled: f, readOnly: p, ...m } = t, { ref: h } = e({ change: s });
10
- return /* @__PURE__ */ r(i, {
11
- ref: h,
12
- class: a,
13
- ...m,
6
+ var r = `ds-date-picker${e}`;
7
+ function i(e) {
8
+ let { className: i, children: a, onChange: o, inputId: s, value: c, defaultValue: l, max: u = "9999-12-31", label: d, required: f, disabled: p, readOnly: m, ...h } = e, g = c === void 0 ? { defaultValue: l } : { value: c };
9
+ return /* @__PURE__ */ n(r, {
10
+ class: i,
11
+ ...h,
14
12
  children: [
15
- /* @__PURE__ */ n("label", {
16
- htmlFor: c,
17
- children: u
13
+ /* @__PURE__ */ t("label", {
14
+ htmlFor: s,
15
+ children: d
18
16
  }),
19
- /* @__PURE__ */ n("input", {
20
- id: c,
17
+ /* @__PURE__ */ t("input", {
18
+ id: s,
21
19
  type: "date",
22
- value: l,
23
- required: d,
24
- disabled: f,
25
- readOnly: p
20
+ ...g,
21
+ max: u,
22
+ onChange: o,
23
+ required: f,
24
+ disabled: p,
25
+ readOnly: m
26
26
  }),
27
- o
27
+ a
28
28
  ]
29
29
  });
30
30
  }
31
31
  //#endregion
32
- export { a as DatePicker };
32
+ export { i as DatePicker };
@@ -7,6 +7,8 @@ type DatePickerProps = {
7
7
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
8
8
  inputId: string;
9
9
  value?: string;
10
+ defaultValue?: string;
11
+ max?: string;
10
12
  label: string;
11
13
  required?: boolean;
12
14
  disabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cupra/ui-react",
3
- "version": "2.0.0-canary.234",
3
+ "version": "2.0.0-canary.236",
4
4
  "description": "React components library",
5
5
  "author": "SEAT S.A.",
6
6
  "license": "SEAT S.A. Library EULA 1.0",
@@ -50,7 +50,7 @@
50
50
  }
51
51
  ],
52
52
  "peerDependencies": {
53
- "@cupra/ui-kit": "2.0.0-canary.220",
53
+ "@cupra/ui-kit": "2.0.0-canary.221",
54
54
  "react": ">= 18.3.1 < 20",
55
55
  "react-dom": ">= 18.3.1 < 20",
56
56
  "typescript": ">=5.0.0"
@@ -74,7 +74,7 @@
74
74
  "storybook": "^10.6.0",
75
75
  "typescript": "^5.9.3",
76
76
  "vite": "^8.2.2",
77
- "@cupra/ui-kit": "2.0.0-canary.220"
77
+ "@cupra/ui-kit": "2.0.0-canary.221"
78
78
  },
79
79
  "scripts": {
80
80
  "build": "rm -rf dist && pnpm --filter @cupra/ui-kit build:react && tsc --declaration --emitDeclarationOnly && BUILD_FORMAT=esm vite build --emptyOutDir false && BUILD_FORMAT=cjs vite build --emptyOutDir false",