@cupra/ui-react 1.0.0-canary.1 → 1.0.0-canary.10
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/README.md
CHANGED
|
@@ -18,10 +18,9 @@ If you need a **framework-agnostic** solution, consider `@cupra/ui-kit` (Web Com
|
|
|
18
18
|
|
|
19
19
|
This library currently provides **official support for React 18**.
|
|
20
20
|
|
|
21
|
-
- **Supported React versions:** `>=18.3.1 <
|
|
22
|
-
- **React 19:** not officially supported yet. Work is in progress to add full support.
|
|
21
|
+
- **Supported React versions:** `>=18.3.1 <20`
|
|
23
22
|
|
|
24
|
-
Projects using React
|
|
23
|
+
Projects using other React versions may still install and use the library, but behaviour is not guaranteed until official support is released.
|
|
25
24
|
|
|
26
25
|
## Installation
|
|
27
26
|
|
|
@@ -48,6 +47,14 @@ npmRegistryServer: "https://registry.npmjs.org"
|
|
|
48
47
|
|
|
49
48
|
---
|
|
50
49
|
|
|
50
|
+
## Documentation & Live Playground
|
|
51
|
+
|
|
52
|
+
You can explore all `ui-react` Components, their APIs, theming options and live examples in the online documentation and playground:
|
|
53
|
+
|
|
54
|
+
[https://diagonal.cupra.com/ui-react/index.html](https://diagonal.cupra.com/ui-react/index.html)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
51
58
|
## Versioning and Release Channels
|
|
52
59
|
|
|
53
60
|
This package is distributed through npm using **two release channels**.
|
|
@@ -3,13 +3,13 @@ https://www.npmjs.com/package/generate-license-file
|
|
|
3
3
|
|
|
4
4
|
The following npm package may be included in this product:
|
|
5
5
|
|
|
6
|
-
- @cupra/ui-kit@
|
|
6
|
+
- @cupra/ui-kit@1.0.0-canary.3
|
|
7
7
|
|
|
8
8
|
This package contains the following license:
|
|
9
9
|
|
|
10
|
-
# SEAT, S.A. Library EULA
|
|
10
|
+
# SEAT, S.A. Library EULA 1.0
|
|
11
11
|
|
|
12
|
-
SEAT, S.A.U. (hereinafter, “SEAT”) is a Spanish entity domiciled in Martorell (Barcelona), Autovía A-2, Km. 585, with a Tax Identification Number (C.I.F.) A-28.049.161, duly registered in the Mercantile Registry of Barcelona in Volume 23.662, folio 1, page number B-56.855 and whose contact email is
|
|
12
|
+
SEAT, S.A.U. (hereinafter, “SEAT”) is a Spanish entity domiciled in Martorell (Barcelona), Autovía A-2, Km. 585, with a Tax Identification Number (C.I.F.) A-28.049.161, duly registered in the Mercantile Registry of Barcelona in Volume 23.662, folio 1, page number B-56.855 and whose contact email is **ds.support@seat.es**
|
|
13
13
|
SEAT releases this End-User License Agreement (“EULA”) to specify the rights and obligations when using a library or package applicable to this EULA (“Library”).
|
|
14
14
|
|
|
15
15
|
## Library Specification
|
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as x, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import "../../packages/ui-kit/dist-react/index.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { useHandleEvent as
|
|
5
|
-
function H(
|
|
4
|
+
import { useHandleEvent as b } from "../../hooks/useHandleEvent.js";
|
|
5
|
+
function H(l) {
|
|
6
6
|
const {
|
|
7
|
-
className:
|
|
8
|
-
children:
|
|
9
|
-
onChange:
|
|
10
|
-
onInput:
|
|
7
|
+
className: d,
|
|
8
|
+
children: w,
|
|
9
|
+
onChange: c,
|
|
10
|
+
onInput: u,
|
|
11
11
|
inputId: e,
|
|
12
|
-
placeHolder:
|
|
13
|
-
value:
|
|
14
|
-
label:
|
|
15
|
-
required:
|
|
16
|
-
disabled:
|
|
17
|
-
pattern:
|
|
18
|
-
maxLength:
|
|
19
|
-
minLength:
|
|
12
|
+
placeHolder: n,
|
|
13
|
+
value: r,
|
|
14
|
+
label: h,
|
|
15
|
+
required: t,
|
|
16
|
+
disabled: o,
|
|
17
|
+
pattern: s,
|
|
18
|
+
maxLength: p,
|
|
19
|
+
minLength: a,
|
|
20
20
|
...m
|
|
21
|
-
} =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
pattern: c
|
|
36
|
-
}
|
|
37
|
-
)
|
|
21
|
+
} = l, { ref: f } = b({ change: c, input: u }), g = {
|
|
22
|
+
type: "password",
|
|
23
|
+
...!!e && { id: e },
|
|
24
|
+
...!!n && { placeholder: n },
|
|
25
|
+
...!!r && { value: r },
|
|
26
|
+
...!!t && { required: t },
|
|
27
|
+
...!!o && { disabled: o },
|
|
28
|
+
...!!a && { minLength: a },
|
|
29
|
+
...!!p && { maxLength: p },
|
|
30
|
+
...!!s && { pattern: s }
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ x("ds-password-input-react", { ref: f, class: d, ...m, children: [
|
|
33
|
+
/* @__PURE__ */ i("label", { htmlFor: e, children: h }),
|
|
34
|
+
/* @__PURE__ */ i("input", { ...g })
|
|
38
35
|
] });
|
|
39
36
|
}
|
|
40
37
|
export {
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { useRef as u, useEffect as l } from "react";
|
|
2
|
+
function d(e) {
|
|
3
|
+
const o = u(null), n = u(e);
|
|
4
|
+
return l(() => {
|
|
5
|
+
n.current = e;
|
|
6
|
+
}, [e]), l(() => {
|
|
7
|
+
const t = o.current;
|
|
8
|
+
if (!t) return;
|
|
9
|
+
const c = {};
|
|
10
|
+
return Object.keys(n.current).forEach((r) => {
|
|
11
|
+
const s = (i) => {
|
|
12
|
+
const f = n.current[r];
|
|
13
|
+
f && f(i);
|
|
11
14
|
};
|
|
12
|
-
|
|
15
|
+
c[r] = s, t.addEventListener(r, s);
|
|
13
16
|
}), () => {
|
|
14
|
-
Object.keys(
|
|
15
|
-
|
|
16
|
-
(t = r == null ? void 0 : r.current) == null || t.removeEventListener(c, n[c]);
|
|
17
|
+
Object.keys(c).forEach((r) => {
|
|
18
|
+
t.removeEventListener(r, c[r]);
|
|
17
19
|
});
|
|
18
20
|
};
|
|
19
|
-
}, [
|
|
21
|
+
}, []), { ref: o };
|
|
20
22
|
}
|
|
21
23
|
export {
|
|
22
|
-
|
|
24
|
+
d as useHandleEvent
|
|
23
25
|
};
|