@cupra/ui-react 1.0.0-canary.16 → 1.0.0-canary.17

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.
Files changed (106) hide show
  1. package/README.md +9 -3
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Accordion/Accordion.js +1 -1
  4. package/dist/components/Avatar/Avatar.d.ts +1 -1
  5. package/dist/components/Avatar/Avatar.js +8 -7
  6. package/dist/components/Bullets/Bullets.d.ts +1 -1
  7. package/dist/components/Bullets/Bullets.js +1 -1
  8. package/dist/components/Button/Button.d.ts +1 -1
  9. package/dist/components/Button/Button.js +7 -6
  10. package/dist/components/CarouselIndicator/CarouselIndicator.d.ts +1 -1
  11. package/dist/components/CarouselIndicator/CarouselIndicator.js +1 -1
  12. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  13. package/dist/components/Checkbox/Checkbox.js +7 -6
  14. package/dist/components/Chip/Chip.d.ts +1 -1
  15. package/dist/components/Chip/Chip.js +1 -1
  16. package/dist/components/Chips/Chips.d.ts +1 -1
  17. package/dist/components/Chips/Chips.js +7 -6
  18. package/dist/components/Currency/Currency.d.ts +1 -1
  19. package/dist/components/Currency/Currency.js +1 -1
  20. package/dist/components/Dialog/Dialog.d.ts +1 -1
  21. package/dist/components/Dialog/Dialog.js +4 -3
  22. package/dist/components/DialogBody/DialogBody.d.ts +1 -1
  23. package/dist/components/DialogBody/DialogBody.js +1 -1
  24. package/dist/components/DialogFooter/DialogFooter.d.ts +1 -1
  25. package/dist/components/DialogFooter/DialogFooter.js +1 -1
  26. package/dist/components/DialogHeader/DialogHeader.d.ts +1 -1
  27. package/dist/components/DialogHeader/DialogHeader.js +1 -1
  28. package/dist/components/Divider/Divider.d.ts +1 -1
  29. package/dist/components/Divider/Divider.js +1 -1
  30. package/dist/components/Hyperlink/Hyperlink.d.ts +1 -1
  31. package/dist/components/Hyperlink/Hyperlink.js +6 -5
  32. package/dist/components/Icon/Icon.d.ts +1 -1
  33. package/dist/components/Icon/Icon.js +1 -1
  34. package/dist/components/IconButton/IconButton.d.ts +1 -1
  35. package/dist/components/IconButton/IconButton.js +7 -6
  36. package/dist/components/Input/Input.d.ts +1 -1
  37. package/dist/components/Input/Input.js +1 -1
  38. package/dist/components/InteractiveCard/InteractiveCard.d.ts +1 -1
  39. package/dist/components/InteractiveCard/InteractiveCard.js +5 -4
  40. package/dist/components/LinkButton/LinkButton.d.ts +1 -1
  41. package/dist/components/LinkButton/LinkButton.js +4 -3
  42. package/dist/components/Loader/Loader.d.ts +4 -1
  43. package/dist/components/Loader/Loader.js +16 -13
  44. package/dist/components/Logo/Logo.d.ts +1 -1
  45. package/dist/components/Logo/Logo.js +1 -1
  46. package/dist/components/MapPin/MapPin.d.ts +1 -1
  47. package/dist/components/MapPin/MapPin.js +8 -7
  48. package/dist/components/Modal/Modal.d.ts +1 -1
  49. package/dist/components/Modal/Modal.js +2 -1
  50. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  51. package/dist/components/PasswordInput/PasswordInput.js +18 -17
  52. package/dist/components/PickerItem/PickerItem.d.ts +1 -1
  53. package/dist/components/PickerItem/PickerItem.js +1 -1
  54. package/dist/components/Radio/Radio.d.ts +1 -1
  55. package/dist/components/Radio/Radio.js +7 -6
  56. package/dist/components/RadioButton/RadioButton.d.ts +1 -1
  57. package/dist/components/RadioButton/RadioButton.js +1 -1
  58. package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  59. package/dist/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  60. package/dist/components/Search/Search.d.ts +1 -1
  61. package/dist/components/Search/Search.js +1 -1
  62. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  63. package/dist/components/SearchInput/SearchInput.js +8 -7
  64. package/dist/components/SecondaryNavigation/SecondaryNavigation.d.ts +1 -1
  65. package/dist/components/SecondaryNavigation/SecondaryNavigation.js +2 -1
  66. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  67. package/dist/components/SegmentedControl/SegmentedControl.js +8 -7
  68. package/dist/components/Select/Select.d.ts +1 -1
  69. package/dist/components/Select/Select.js +1 -1
  70. package/dist/components/Selection/Selection.d.ts +1 -1
  71. package/dist/components/Selection/Selection.js +1 -1
  72. package/dist/components/SidebarNavigation/SidebarNavigation.d.ts +1 -1
  73. package/dist/components/SidebarNavigation/SidebarNavigation.js +1 -1
  74. package/dist/components/Slider/Slider.d.ts +2 -2
  75. package/dist/components/Slider/Slider.js +1 -1
  76. package/dist/components/StaticBox/StaticBox.d.ts +1 -1
  77. package/dist/components/StaticBox/StaticBox.js +7 -6
  78. package/dist/components/Stepper/Stepper.d.ts +1 -1
  79. package/dist/components/Stepper/Stepper.js +1 -1
  80. package/dist/components/Tabs/Tabs.d.ts +1 -1
  81. package/dist/components/Tabs/Tabs.js +11 -10
  82. package/dist/components/Tag/Tag.d.ts +1 -1
  83. package/dist/components/Tag/Tag.js +8 -7
  84. package/dist/components/Text/Text.d.ts +1 -1
  85. package/dist/components/Text/Text.js +1 -1
  86. package/dist/components/TextInput/TextInput.d.ts +1 -1
  87. package/dist/components/TextInput/TextInput.js +15 -14
  88. package/dist/components/Textarea/Textarea.d.ts +1 -1
  89. package/dist/components/Textarea/Textarea.js +4 -3
  90. package/dist/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  91. package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
  92. package/dist/components/Toast/Toast.d.ts +1 -1
  93. package/dist/components/Toast/Toast.js +1 -1
  94. package/dist/components/ToastMessage/ToastMessage.d.ts +1 -1
  95. package/dist/components/ToastMessage/ToastMessage.js +7 -6
  96. package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
  97. package/dist/components/ToggleButton/ToggleButton.js +4 -3
  98. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
  99. package/dist/components/ToggleSwitch/ToggleSwitch.js +9 -8
  100. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  101. package/dist/components/Tooltip/Tooltip.js +6 -5
  102. package/dist/hooks/useBreakpoint.js +13 -13
  103. package/package.json +17 -5
  104. package/dist/packages/ui-kit/dist-react/index.js +0 -9226
  105. package/dist/packages/ui-kit/dist-react/utils/breakpoints.js +0 -11
  106. package/dist/packages/ui-kit/dist-react/utils/debounce.js +0 -11
@@ -1,13 +1,14 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import "../../packages/ui-kit/dist-react/index.js";
2
+ import "@cupra/ui-kit/react/ds-toast-message";
3
+ import "@cupra/ui-kit/react/utils/breakpoints";
3
4
  import "react";
4
5
  import { useHandleEvent as n } from "../../hooks/useHandleEvent.js";
5
- function f(o) {
6
- const { className: s, children: e, onClose: t, ...r } = o, { ref: a } = n({
7
- "toast:remove": t
6
+ function d(o) {
7
+ const { className: s, children: t, onClose: e, ...r } = o, { ref: a } = n({
8
+ "toast:remove": e
8
9
  });
9
- return /* @__PURE__ */ m("ds-toast-message-react", { ref: a, class: s, ...r, children: e });
10
+ return /* @__PURE__ */ m("ds-toast-message-react", { ref: a, class: s, ...r, children: t });
10
11
  }
11
12
  export {
12
- f as ToastMessage
13
+ d as ToastMessage
13
14
  };
@@ -1,5 +1,5 @@
1
1
  import { type ReactElement } from 'react';
2
- import '@cupra/ui-kit/react';
2
+ import '@cupra/ui-kit/react/ds-toggle-button';
3
3
  import { type DsToggleButtonAttrs } from '@cupra/ui-kit/react/types/ds-toggle-button';
4
4
  type ToggleButtonProps = DsToggleButtonAttrs & {
5
5
  onChange?: (event: CustomEvent) => void;
@@ -1,11 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/utils/breakpoints";
2
3
  import "react";
3
4
  import { useHandleEvent as n } from "../../hooks/useHandleEvent.js";
4
- import "../../packages/ui-kit/dist-react/index.js";
5
- function u({ onChange: t, ...o }) {
5
+ import "@cupra/ui-kit/react/ds-toggle-button";
6
+ function c({ onChange: t, ...o }) {
6
7
  const { ref: r } = n({ change: t });
7
8
  return /* @__PURE__ */ e("ds-toggle-button-react", { ref: r, ...o });
8
9
  }
9
10
  export {
10
- u as ToggleButton
11
+ c as ToggleButton
11
12
  };
@@ -1,5 +1,5 @@
1
1
  import { type ChangeEvent, type ReactElement } from 'react';
2
- import '@cupra/ui-kit/react';
2
+ import '@cupra/ui-kit/react/ds-toggle-switch';
3
3
  import { DsToggleSwitchAttrs } from '@cupra/ui-kit/react/types/ds-toggle-switch';
4
4
  type Children = JSX.Element | JSX.Element[] | string;
5
5
  interface ToggleSwitchProps extends DsToggleSwitchAttrs {
@@ -1,19 +1,20 @@
1
- import { jsxs as f, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as n } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/utils/breakpoints";
2
3
  import "react";
3
4
  import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
4
- import "../../packages/ui-kit/dist-react/index.js";
5
- function r({ label: n, onChange: i, ...o }) {
5
+ import "@cupra/ui-kit/react/ds-toggle-switch";
6
+ function r({ label: t, onChange: i, ...o }) {
6
7
  const { ref: e } = c({ change: i });
7
8
  return /* @__PURE__ */ f("ds-toggle-switch-react", { ref: e, ...o, children: [
8
- n && /* @__PURE__ */ t("div", { slot: "label", children: n }),
9
+ t && /* @__PURE__ */ n("div", { slot: "label", children: t }),
9
10
  o.children
10
11
  ] });
11
12
  }
12
- function l({ children: n }) {
13
- return /* @__PURE__ */ t("div", { slot: "off", children: n });
13
+ function l({ children: t }) {
14
+ return /* @__PURE__ */ n("div", { slot: "off", children: t });
14
15
  }
15
- function s({ children: n }) {
16
- return /* @__PURE__ */ t("div", { slot: "on", children: n });
16
+ function s({ children: t }) {
17
+ return /* @__PURE__ */ n("div", { slot: "on", children: t });
17
18
  }
18
19
  r.Off = l;
19
20
  r.On = s;
@@ -1,5 +1,5 @@
1
1
  import { type ReactElement } from 'react';
2
- import '@cupra/ui-kit/react';
2
+ import '@cupra/ui-kit/react/ds-tooltip';
3
3
  import { DsTooltipAttrs } from '@cupra/ui-kit/react/types/ds-tooltip';
4
4
  type Children = JSX.Element | JSX.Element[] | string;
5
5
  interface TooltipProps extends DsTooltipAttrs {
@@ -1,13 +1,14 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/utils/breakpoints";
2
3
  import "react";
3
4
  import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
4
5
  import p from "../../node_modules/.pnpm/styled-components@6.1.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/styled-components/dist/styled-components.browser.esm.js";
5
- import "../../packages/ui-kit/dist-react/index.js";
6
- const l = p.div`
6
+ import "@cupra/ui-kit/react/ds-tooltip";
7
+ const m = p.div`
7
8
  display: flex;
8
9
  align-items: center;
9
10
  `;
10
- function u({
11
+ function x({
11
12
  children: o,
12
13
  onClickCancelButton: r,
13
14
  onClickConfirmButton: i,
@@ -17,8 +18,8 @@ function u({
17
18
  "click-cancel-button": r,
18
19
  "click-confirm-button": i
19
20
  });
20
- return /* @__PURE__ */ t("ds-tooltip-react", { ref: n, ...e, children: /* @__PURE__ */ t(l, { children: o }) });
21
+ return /* @__PURE__ */ t("ds-tooltip-react", { ref: n, ...e, children: /* @__PURE__ */ t(m, { children: o }) });
21
22
  }
22
23
  export {
23
- u as Tooltip
24
+ x as Tooltip
24
25
  };
@@ -1,20 +1,20 @@
1
- import { breakpoints as o } from "../packages/ui-kit/dist-react/utils/breakpoints.js";
1
+ import { breakpoints as a } from "@cupra/ui-kit/react/utils/breakpoints";
2
2
  import { useState as m, useLayoutEffect as d } from "react";
3
- const a = ["xs", "s", "m", "l", "xl", "xxl"];
3
+ const o = ["xs", "s", "m", "l", "xl", "xxl"];
4
4
  function c() {
5
- const s = {};
6
- return a.forEach((n, t) => {
7
- const r = `(min-width: ${o[n]}px)`;
5
+ const n = {};
6
+ return o.forEach((s, t) => {
7
+ const r = `(min-width: ${a[s]}px)`;
8
8
  let e = "";
9
- if (t < a.length - 1) {
10
- const i = a[t + 1];
11
- e = ` and (max-width: ${o[i] - 1}px)`;
9
+ if (t < o.length - 1) {
10
+ const i = o[t + 1];
11
+ e = ` and (max-width: ${a[i] - 1}px)`;
12
12
  }
13
- s[n] = window.matchMedia(r + e);
14
- }), s;
13
+ n[s] = window.matchMedia(r + e);
14
+ }), n;
15
15
  }
16
16
  const p = () => {
17
- const [s, n] = m(() => {
17
+ const [n, s] = m(() => {
18
18
  const t = c();
19
19
  let r = "";
20
20
  return Object.keys(t).forEach((e) => {
@@ -24,7 +24,7 @@ const p = () => {
24
24
  return d(() => {
25
25
  const t = c(), r = Object.keys(t).map((e) => {
26
26
  const i = (u) => {
27
- u.matches && n(e);
27
+ u.matches && s(e);
28
28
  };
29
29
  return t[e].addListener(i), () => {
30
30
  t[e].removeListener(i);
@@ -35,7 +35,7 @@ const p = () => {
35
35
  e();
36
36
  });
37
37
  };
38
- }, []), s;
38
+ }, []), n;
39
39
  };
40
40
  export {
41
41
  p as useBreakpoint
package/package.json CHANGED
@@ -1,12 +1,23 @@
1
1
  {
2
2
  "name": "@cupra/ui-react",
3
- "version": "1.0.0-canary.16",
3
+ "version": "1.0.0-canary.17",
4
4
  "description": "React components library",
5
5
  "author": "SEAT S.A.",
6
6
  "license": "SEAT S.A. Library EULA 1.0",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./*": {
16
+ "import": "./dist/components/*/*.js",
17
+ "types": "./dist/components/*/*.d.ts"
18
+ },
19
+ "./hooks/*": "./dist/hooks/*.js"
20
+ },
10
21
  "files": [
11
22
  "LICENSE",
12
23
  "THIRD_PARTY_LICENSES.MD",
@@ -32,11 +43,11 @@
32
43
  ],
33
44
  "peerDependencies": {
34
45
  "react": ">= 18.3.1 < 20",
35
- "react-dom": ">= 18.3.1 < 20"
46
+ "react-dom": ">= 18.3.1 < 20",
47
+ "@cupra/ui-kit": "1.0.0-canary.10"
36
48
  },
37
49
  "dependencies": {
38
- "styled-components": "^6.1.16",
39
- "@cupra/ui-kit": "1.0.0-canary.9"
50
+ "styled-components": "^6.1.16"
40
51
  },
41
52
  "devDependencies": {
42
53
  "@storybook/addon-docs": "^8.6.14",
@@ -54,7 +65,8 @@
54
65
  "shadow-dom-testing-library": "^1.0.0",
55
66
  "storybook": "^8.6.14",
56
67
  "typescript": "^5.8.2",
57
- "vite": "^6.4.1"
68
+ "vite": "^6.4.1",
69
+ "@cupra/ui-kit": "1.0.0-canary.10"
58
70
  },
59
71
  "scripts": {
60
72
  "build": "rm -rf dist && tsc --declaration --emitDeclarationOnly && vite build --emptyOutDir false",