@cupra/ui-react 2.0.0-canary.71 → 2.0.0-canary.72
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/cjs/components/Slider/Slider.cjs +1 -1
- package/dist/cjs/components/TextInput/TextInput.cjs +1 -1
- package/dist/cjs/components/Textarea/Textarea.cjs +1 -1
- package/dist/esm/components/Slider/Slider.js +11 -7
- package/dist/esm/components/TextInput/TextInput.js +19 -17
- package/dist/esm/components/Textarea/Textarea.js +24 -22
- package/dist/types/components/Slider/Slider.d.ts +4 -0
- package/dist/types/components/TextInput/TextInput.d.ts +1 -0
- package/dist/types/components/Textarea/Textarea.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-slider");require("@cupra/ui-kit/react/utils/breakpoints");require("react");const u=require("../../hooks/useHandleEvent.cjs");function c(r){const{className:s,children:l,size:e,onChange:n,...t}=r,{ref:i}=u.useHandleEvent({change:n});return o.jsx("ds-slider-react",{ref:i,size:typeof e=="string"?e:JSON.stringify(e),class:s,...t})}exports.Slider=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-text-input");require("@cupra/ui-kit/react/utils/breakpoints");require("react");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-text-input");require("@cupra/ui-kit/react/utils/breakpoints");require("react");const b=require("../../hooks/useHandleEvent.cjs");function j(n){const{className:r,children:v,onChange:l,onInput:u,onKeyDown:i,inputId:t,placeHolder:s,type:a,value:o,label:d,required:c,disabled:p,readOnly:h,pattern:x,maxLength:y,minLength:g,...m}=n,{ref:q}=b.useHandleEvent({change:l,input:u,keydown:i});return e.jsxs("ds-text-input-react",{ref:q,class:r,...m,children:[e.jsx("label",{htmlFor:t,children:d}),e.jsx("input",{id:t,type:a||"text",placeholder:s,value:o,required:c,disabled:p,readOnly:h,minLength:g,maxLength:y,pattern:x})]})}exports.TextInput=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-textarea");require("@cupra/ui-kit/react/utils/breakpoints");require("react");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-textarea");require("@cupra/ui-kit/react/utils/breakpoints");require("react");const j=require("../../hooks/useHandleEvent.cjs");function E(t){const{className:a,children:T,onChange:n,onInput:l,textareaId:r,placeholder:o,value:i,label:s,required:d,disabled:c,readOnly:u,minLength:h,maxLength:x,rows:p,cols:g,forcedError:m,helperText:q,invalidError:v,...b}=t,{ref:f}=j.useHandleEvent({change:n,input:l});return e.jsxs("ds-textarea-react",{ref:f,class:a,"forced-error":m,"helper-text":q,"invalid-error":v,...b,children:[e.jsx("label",{htmlFor:r,children:s}),e.jsx("textarea",{id:r,placeholder:o,value:i,required:d,disabled:c,readOnly:u,minLength:h,maxLength:x,rows:p,cols:g})]})}exports.Textarea=E;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "@cupra/ui-kit/react/ds-slider";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
4
|
+
import "react";
|
|
5
|
+
import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
|
|
6
|
+
function g(e) {
|
|
7
|
+
const { className: t, children: m, size: r, onChange: o, ...s } = e, { ref: i } = c({ change: o });
|
|
8
|
+
return /* @__PURE__ */ n(
|
|
6
9
|
"ds-slider-react",
|
|
7
10
|
{
|
|
11
|
+
ref: i,
|
|
8
12
|
size: typeof r == "string" ? r : JSON.stringify(r),
|
|
9
|
-
class:
|
|
10
|
-
...
|
|
13
|
+
class: t,
|
|
14
|
+
...s
|
|
11
15
|
}
|
|
12
16
|
);
|
|
13
17
|
}
|
|
14
18
|
export {
|
|
15
|
-
|
|
19
|
+
g as Slider
|
|
16
20
|
};
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "@cupra/ui-kit/react/ds-text-input";
|
|
3
3
|
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
4
4
|
import "react";
|
|
5
|
-
import { useHandleEvent as
|
|
6
|
-
function
|
|
5
|
+
import { useHandleEvent as I } from "../../hooks/useHandleEvent.js";
|
|
6
|
+
function q(n) {
|
|
7
7
|
const {
|
|
8
8
|
className: r,
|
|
9
|
-
children:
|
|
9
|
+
children: j,
|
|
10
10
|
onChange: o,
|
|
11
|
-
onInput:
|
|
12
|
-
onKeyDown:
|
|
11
|
+
onInput: l,
|
|
12
|
+
onKeyDown: p,
|
|
13
13
|
inputId: e,
|
|
14
|
-
placeHolder:
|
|
14
|
+
placeHolder: i,
|
|
15
15
|
type: a,
|
|
16
16
|
value: d,
|
|
17
17
|
label: s,
|
|
18
18
|
required: c,
|
|
19
19
|
disabled: m,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
readOnly: u,
|
|
21
|
+
pattern: h,
|
|
22
|
+
maxLength: x,
|
|
23
|
+
minLength: y,
|
|
23
24
|
...f
|
|
24
|
-
} = n, { ref: g } =
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
} = n, { ref: g } = I({ change: o, input: l, keydown: p });
|
|
26
|
+
return /* @__PURE__ */ b("ds-text-input-react", { ref: g, class: r, ...f, children: [
|
|
26
27
|
/* @__PURE__ */ t("label", { htmlFor: e, children: s }),
|
|
27
28
|
/* @__PURE__ */ t(
|
|
28
29
|
"input",
|
|
29
30
|
{
|
|
30
31
|
id: e,
|
|
31
32
|
type: a || "text",
|
|
32
|
-
placeholder:
|
|
33
|
+
placeholder: i,
|
|
33
34
|
value: d,
|
|
34
35
|
required: c,
|
|
35
36
|
disabled: m,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
readOnly: u,
|
|
38
|
+
minLength: y,
|
|
39
|
+
maxLength: x,
|
|
40
|
+
pattern: h
|
|
39
41
|
}
|
|
40
42
|
)
|
|
41
43
|
] });
|
|
42
44
|
}
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
q as TextInput
|
|
45
47
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as j, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "@cupra/ui-kit/react/ds-textarea";
|
|
3
3
|
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
4
4
|
import "react";
|
|
5
|
-
import { useHandleEvent as
|
|
5
|
+
import { useHandleEvent as I } from "../../hooks/useHandleEvent.js";
|
|
6
6
|
function F(t) {
|
|
7
7
|
const {
|
|
8
8
|
className: o,
|
|
9
|
-
children:
|
|
9
|
+
children: L,
|
|
10
10
|
onChange: a,
|
|
11
11
|
onInput: n,
|
|
12
12
|
textareaId: e,
|
|
@@ -15,24 +15,25 @@ function F(t) {
|
|
|
15
15
|
label: d,
|
|
16
16
|
required: s,
|
|
17
17
|
disabled: c,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
readOnly: h,
|
|
19
|
+
minLength: p,
|
|
20
|
+
maxLength: m,
|
|
21
|
+
rows: x,
|
|
22
|
+
cols: u,
|
|
23
|
+
forcedError: f,
|
|
24
|
+
helperText: g,
|
|
25
|
+
invalidError: v,
|
|
26
|
+
...b
|
|
27
|
+
} = t, { ref: E } = I({ change: a, input: n });
|
|
28
|
+
return /* @__PURE__ */ j(
|
|
28
29
|
"ds-textarea-react",
|
|
29
30
|
{
|
|
30
|
-
ref:
|
|
31
|
+
ref: E,
|
|
31
32
|
class: o,
|
|
32
|
-
"forced-error":
|
|
33
|
-
"helper-text":
|
|
34
|
-
"invalid-error":
|
|
35
|
-
...
|
|
33
|
+
"forced-error": f,
|
|
34
|
+
"helper-text": g,
|
|
35
|
+
"invalid-error": v,
|
|
36
|
+
...b,
|
|
36
37
|
children: [
|
|
37
38
|
/* @__PURE__ */ r("label", { htmlFor: e, children: d }),
|
|
38
39
|
/* @__PURE__ */ r(
|
|
@@ -43,10 +44,11 @@ function F(t) {
|
|
|
43
44
|
value: i,
|
|
44
45
|
required: s,
|
|
45
46
|
disabled: c,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
readOnly: h,
|
|
48
|
+
minLength: p,
|
|
49
|
+
maxLength: m,
|
|
50
|
+
rows: x,
|
|
51
|
+
cols: u
|
|
50
52
|
}
|
|
51
53
|
)
|
|
52
54
|
]
|
|
@@ -3,6 +3,10 @@ import '@cupra/ui-kit/react/ds-slider';
|
|
|
3
3
|
import { DsSliderAttrs } from '@cupra/ui-kit/react/types/ds-slider';
|
|
4
4
|
type SliderProps = DsSliderAttrs & {
|
|
5
5
|
className?: string;
|
|
6
|
+
onChange?: (event: CustomEvent<{
|
|
7
|
+
role: 'min' | 'max';
|
|
8
|
+
value: number;
|
|
9
|
+
}>) => void;
|
|
6
10
|
};
|
|
7
11
|
export declare function Slider(props: SliderProps): ReactElement;
|
|
8
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cupra/ui-react",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.72",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">= 18.3.1 < 20",
|
|
53
53
|
"react-dom": ">= 18.3.1 < 20",
|
|
54
|
-
"@cupra/ui-kit": "2.0.0-canary.
|
|
54
|
+
"@cupra/ui-kit": "2.0.0-canary.63",
|
|
55
55
|
"typescript": ">=5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"storybook": "^8.6.17",
|
|
76
76
|
"typescript": "^5.8.2",
|
|
77
77
|
"vite": "^6.4.1",
|
|
78
|
-
"@cupra/ui-kit": "2.0.0-canary.
|
|
78
|
+
"@cupra/ui-kit": "2.0.0-canary.63"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"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",
|