@cupra/ui-react 1.0.0-canary.1 → 1.0.0-canary.11

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 <19`
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 19 may still install and use the library, but behaviour is not guaranteed until official support is released.
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@16.0.1
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 g, jsx as r } from "react/jsx-runtime";
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 x } from "../../hooks/useHandleEvent.js";
5
- function H(n) {
4
+ import { useHandleEvent as b } from "../../hooks/useHandleEvent.js";
5
+ function H(l) {
6
6
  const {
7
- className: t,
8
- children: b,
9
- onChange: o,
10
- onInput: s,
7
+ className: d,
8
+ children: w,
9
+ onChange: c,
10
+ onInput: u,
11
11
  inputId: e,
12
- placeHolder: a,
13
- value: p,
14
- label: l,
15
- required: i,
16
- disabled: d,
17
- pattern: c,
18
- maxLength: u,
19
- minLength: h,
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
- } = n, { ref: f } = x({ change: o, input: s });
22
- return /* @__PURE__ */ g("ds-password-input-react", { ref: f, class: t, ...m, children: [
23
- /* @__PURE__ */ r("label", { htmlFor: e, children: l }),
24
- /* @__PURE__ */ r(
25
- "input",
26
- {
27
- id: e,
28
- type: "password",
29
- placeholder: a,
30
- value: p,
31
- required: i,
32
- disabled: d,
33
- minLength: h,
34
- maxLength: u,
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 d, useEffect as f } from "react";
2
- function s(o) {
3
- const r = d(null);
4
- return f(() => {
5
- const n = {};
6
- return Object.keys(o).forEach((c) => {
7
- var l;
8
- const t = (E) => {
9
- var u;
10
- (u = o[c]) == null || u.call(o, E);
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
- n[c] = t, (l = r == null ? void 0 : r.current) == null || l.addEventListener(c, t);
15
+ c[r] = s, t.addEventListener(r, s);
13
16
  }), () => {
14
- Object.keys(n).forEach((c) => {
15
- var t;
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
- }, [r, o]), { ref: r };
21
+ }, []), { ref: o };
20
22
  }
21
23
  export {
22
- s as useHandleEvent
24
+ d as useHandleEvent
23
25
  };