@cupra/ui-react 1.0.0-canary.8 → 1.0.0

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 (119) hide show
  1. package/README.md +11 -5
  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/Badge/Badge.d.ts +7 -0
  7. package/dist/components/Badge/Badge.js +8 -0
  8. package/dist/components/Badge/stories/CupraDiagonal.stories.d.ts +8 -0
  9. package/dist/components/Bullets/Bullets.d.ts +1 -1
  10. package/dist/components/Bullets/Bullets.js +1 -1
  11. package/dist/components/Button/Button.d.ts +1 -1
  12. package/dist/components/Button/Button.js +7 -6
  13. package/dist/components/CarouselIndicator/CarouselIndicator.d.ts +1 -1
  14. package/dist/components/CarouselIndicator/CarouselIndicator.js +1 -1
  15. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  16. package/dist/components/Checkbox/Checkbox.js +7 -6
  17. package/dist/components/Chip/Chip.d.ts +1 -1
  18. package/dist/components/Chip/Chip.js +1 -1
  19. package/dist/components/Chips/Chips.d.ts +1 -1
  20. package/dist/components/Chips/Chips.js +7 -6
  21. package/dist/components/Currency/Currency.d.ts +1 -1
  22. package/dist/components/Currency/Currency.js +1 -1
  23. package/dist/components/Dialog/Dialog.d.ts +1 -1
  24. package/dist/components/Dialog/Dialog.js +10 -10
  25. package/dist/components/DialogBody/DialogBody.d.ts +1 -1
  26. package/dist/components/DialogBody/DialogBody.js +1 -1
  27. package/dist/components/DialogFooter/DialogFooter.d.ts +1 -1
  28. package/dist/components/DialogFooter/DialogFooter.js +1 -1
  29. package/dist/components/DialogHeader/DialogHeader.d.ts +1 -1
  30. package/dist/components/DialogHeader/DialogHeader.js +1 -1
  31. package/dist/components/Divider/Divider.d.ts +1 -1
  32. package/dist/components/Divider/Divider.js +1 -1
  33. package/dist/components/Hyperlink/Hyperlink.d.ts +1 -1
  34. package/dist/components/Hyperlink/Hyperlink.js +6 -5
  35. package/dist/components/Icon/Icon.d.ts +1 -1
  36. package/dist/components/Icon/Icon.js +1 -1
  37. package/dist/components/IconButton/IconButton.d.ts +2 -3
  38. package/dist/components/IconButton/IconButton.js +7 -6
  39. package/dist/components/Input/Input.d.ts +1 -1
  40. package/dist/components/Input/Input.js +1 -1
  41. package/dist/components/InteractiveCard/InteractiveCard.d.ts +1 -1
  42. package/dist/components/InteractiveCard/InteractiveCard.js +5 -4
  43. package/dist/components/LinkButton/LinkButton.d.ts +1 -1
  44. package/dist/components/LinkButton/LinkButton.js +4 -3
  45. package/dist/components/Loader/Loader.d.ts +4 -1
  46. package/dist/components/Loader/Loader.js +16 -13
  47. package/dist/components/Logo/Logo.d.ts +1 -1
  48. package/dist/components/Logo/Logo.js +1 -1
  49. package/dist/components/MainTitle/MainTitle.d.ts +17 -0
  50. package/dist/components/MainTitle/MainTitle.js +19 -0
  51. package/dist/components/MainTitle/stories/CupraDiagonal.stories.d.ts +9 -0
  52. package/dist/components/MapPin/MapPin.d.ts +1 -1
  53. package/dist/components/MapPin/MapPin.js +8 -7
  54. package/dist/components/Modal/Modal.d.ts +1 -1
  55. package/dist/components/Modal/Modal.js +15 -13
  56. package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
  57. package/dist/components/PasswordInput/PasswordInput.js +18 -17
  58. package/dist/components/PickerItem/PickerItem.d.ts +1 -1
  59. package/dist/components/PickerItem/PickerItem.js +1 -1
  60. package/dist/components/Radio/Radio.d.ts +1 -1
  61. package/dist/components/Radio/Radio.js +7 -6
  62. package/dist/components/RadioButton/RadioButton.d.ts +1 -1
  63. package/dist/components/RadioButton/RadioButton.js +1 -1
  64. package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  65. package/dist/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  66. package/dist/components/Rating/Rating.d.ts +8 -0
  67. package/dist/components/Rating/Rating.js +9 -0
  68. package/dist/components/Rating/stories/CupraDiagonal.stories.d.ts +10 -0
  69. package/dist/components/Search/Search.d.ts +1 -1
  70. package/dist/components/Search/Search.js +1 -1
  71. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  72. package/dist/components/SearchInput/SearchInput.js +8 -7
  73. package/dist/components/SecondaryNavigation/SecondaryNavigation.d.ts +6 -5
  74. package/dist/components/SecondaryNavigation/SecondaryNavigation.js +11 -10
  75. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  76. package/dist/components/SegmentedControl/SegmentedControl.js +8 -7
  77. package/dist/components/Select/Select.d.ts +1 -1
  78. package/dist/components/Select/Select.js +1 -1
  79. package/dist/components/Selection/Selection.d.ts +1 -1
  80. package/dist/components/Selection/Selection.js +1 -1
  81. package/dist/components/SidebarNavigation/SidebarNavigation.d.ts +1 -1
  82. package/dist/components/SidebarNavigation/SidebarNavigation.js +1 -1
  83. package/dist/components/Slider/Slider.d.ts +2 -2
  84. package/dist/components/Slider/Slider.js +1 -1
  85. package/dist/components/StaticBox/StaticBox.d.ts +1 -1
  86. package/dist/components/StaticBox/StaticBox.js +7 -6
  87. package/dist/components/Stepper/Stepper.d.ts +1 -1
  88. package/dist/components/Stepper/Stepper.js +1 -1
  89. package/dist/components/Tabs/Tabs.d.ts +1 -1
  90. package/dist/components/Tabs/Tabs.js +11 -10
  91. package/dist/components/Tag/Tag.d.ts +1 -1
  92. package/dist/components/Tag/Tag.js +8 -7
  93. package/dist/components/Text/Text.d.ts +1 -1
  94. package/dist/components/Text/Text.js +1 -1
  95. package/dist/components/TextInput/TextInput.d.ts +1 -1
  96. package/dist/components/TextInput/TextInput.js +15 -14
  97. package/dist/components/Textarea/Textarea.d.ts +1 -1
  98. package/dist/components/Textarea/Textarea.js +4 -3
  99. package/dist/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  100. package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
  101. package/dist/components/Toast/Toast.d.ts +1 -1
  102. package/dist/components/Toast/Toast.js +1 -1
  103. package/dist/components/ToastMessage/ToastMessage.d.ts +1 -1
  104. package/dist/components/ToastMessage/ToastMessage.js +7 -6
  105. package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
  106. package/dist/components/ToggleButton/ToggleButton.js +4 -3
  107. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
  108. package/dist/components/ToggleSwitch/ToggleSwitch.js +9 -8
  109. package/dist/components/Tooltip/Tooltip.d.ts +30 -10
  110. package/dist/components/Tooltip/Tooltip.js +13 -22
  111. package/dist/components/Tooltip/stories/CupraDiagonal.stories.d.ts +5 -0
  112. package/dist/components/index.d.ts +3 -0
  113. package/dist/hooks/useBreakpoint.js +13 -13
  114. package/dist/hooks/useHandleEvent.js +16 -16
  115. package/dist/index.js +109 -103
  116. package/package.json +17 -5
  117. package/dist/packages/ui-kit/dist-react/index.js +0 -9226
  118. package/dist/packages/ui-kit/dist-react/utils/breakpoints.js +0 -11
  119. package/dist/packages/ui-kit/dist-react/utils/debounce.js +0 -11
@@ -1,19 +1,20 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/utils/breakpoints";
2
3
  import "react";
3
4
  import { useHandleEvent as i } from "../../hooks/useHandleEvent.js";
4
- import "../../packages/ui-kit/dist-react/index.js";
5
- function r({ children: t, onChange: e, ...o }) {
5
+ import "@cupra/ui-kit/react/ds-tabs";
6
+ function n({ children: t, onChange: e, ...o }) {
6
7
  const { ref: a } = i({ change: e });
7
- return /* @__PURE__ */ n("ds-tabs-react", { ref: a, ...o, children: t });
8
+ return /* @__PURE__ */ r("ds-tabs-react", { ref: a, ...o, children: t });
8
9
  }
9
10
  function l({ children: t }) {
10
- return /* @__PURE__ */ n("div", { role: "tab", slot: "tab", children: t });
11
+ return /* @__PURE__ */ r("div", { role: "tab", slot: "tab", children: t });
11
12
  }
12
- function s({ children: t }) {
13
- return /* @__PURE__ */ n("div", { role: "tabpanel", slot: "panel", children: t });
13
+ function p({ children: t }) {
14
+ return /* @__PURE__ */ r("div", { role: "tabpanel", slot: "panel", children: t });
14
15
  }
15
- r.Tab = l;
16
- r.Panel = s;
16
+ n.Tab = l;
17
+ n.Panel = p;
17
18
  export {
18
- r as Tabs
19
+ n as Tabs
19
20
  };
@@ -1,5 +1,5 @@
1
1
  import { type ReactElement } from 'react';
2
- import '@cupra/ui-kit/react';
2
+ import '@cupra/ui-kit/react/ds-tag';
3
3
  import { DsTagAttrs } from '@cupra/ui-kit/react/types/ds-tag';
4
4
  type Children = JSX.Element | JSX.Element[] | string;
5
5
  interface TabsProps extends DsTagAttrs {
@@ -1,11 +1,12 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/utils/breakpoints";
2
3
  import "react";
3
- import { useHandleEvent as i } from "../../hooks/useHandleEvent.js";
4
- import "../../packages/ui-kit/dist-react/index.js";
5
- function f(o) {
6
- const { children: r, onClickIcon: t, className: c, ...n } = o, { ref: e } = i({ clickicon: t });
7
- return /* @__PURE__ */ s("ds-tag-react", { ref: e, class: c, ...n, children: r });
4
+ import { useHandleEvent as s } from "../../hooks/useHandleEvent.js";
5
+ import "@cupra/ui-kit/react/ds-tag";
6
+ function d(o) {
7
+ const { children: r, onClickIcon: t, className: c, ...n } = o, { ref: e } = s({ clickicon: t });
8
+ return /* @__PURE__ */ i("ds-tag-react", { ref: e, class: c, ...n, children: r });
8
9
  }
9
10
  export {
10
- f as Tag
11
+ d as Tag
11
12
  };
@@ -1,6 +1,6 @@
1
1
  import { DsTextAttrs } from '@cupra/ui-kit/react/types/ds-text';
2
2
  import { type ReactElement } from 'react';
3
- import '@cupra/ui-kit/react';
3
+ import '@cupra/ui-kit/react/ds-text';
4
4
  type TextProps = DsTextAttrs & {
5
5
  className?: string;
6
6
  children: JSX.Element | JSX.Element[] | string;
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import "../../packages/ui-kit/dist-react/index.js";
2
+ import "@cupra/ui-kit/react/ds-text";
3
3
  function a(t) {
4
4
  const { className: r, children: e, ...o } = t;
5
5
  return /* @__PURE__ */ s("ds-text-react", { class: r, ...o, children: e });
@@ -1,6 +1,6 @@
1
1
  import { DsTextInputAttrs } from '@cupra/ui-kit/react/types/ds-text-input';
2
2
  import { ChangeEvent, FormEvent, KeyboardEvent, type ReactElement } from 'react';
3
- import '@cupra/ui-kit/react';
3
+ import '@cupra/ui-kit/react/ds-text-input';
4
4
  type TextInputProps = DsTextInputAttrs & {
5
5
  type?: 'text' | 'email' | 'number' | 'url' | 'tel';
6
6
  className?: string;
@@ -1,26 +1,27 @@
1
1
  import { jsxs as y, jsx as t } from "react/jsx-runtime";
2
- import "../../packages/ui-kit/dist-react/index.js";
2
+ import "@cupra/ui-kit/react/ds-text-input";
3
+ import "@cupra/ui-kit/react/utils/breakpoints";
3
4
  import "react";
4
5
  import { useHandleEvent as b } from "../../hooks/useHandleEvent.js";
5
- function L(n) {
6
+ function k(n) {
6
7
  const {
7
8
  className: r,
8
9
  children: I,
9
10
  onChange: o,
10
- onInput: l,
11
- onKeyDown: p,
11
+ onInput: p,
12
+ onKeyDown: i,
12
13
  inputId: e,
13
- placeHolder: i,
14
+ placeHolder: l,
14
15
  type: a,
15
16
  value: d,
16
17
  label: s,
17
18
  required: c,
18
- disabled: u,
19
- pattern: h,
20
- maxLength: m,
19
+ disabled: m,
20
+ pattern: u,
21
+ maxLength: h,
21
22
  minLength: x,
22
23
  ...f
23
- } = n, { ref: g } = b({ change: o, input: l, keydown: p });
24
+ } = n, { ref: g } = b({ change: o, input: p, keydown: i });
24
25
  return /* @__PURE__ */ y("ds-text-input-react", { ref: g, class: r, ...f, children: [
25
26
  /* @__PURE__ */ t("label", { htmlFor: e, children: s }),
26
27
  /* @__PURE__ */ t(
@@ -28,17 +29,17 @@ function L(n) {
28
29
  {
29
30
  id: e,
30
31
  type: a || "text",
31
- placeholder: i,
32
+ placeholder: l,
32
33
  value: d,
33
34
  required: c,
34
- disabled: u,
35
+ disabled: m,
35
36
  minLength: x,
36
- maxLength: m,
37
- pattern: h
37
+ maxLength: h,
38
+ pattern: u
38
39
  }
39
40
  )
40
41
  ] });
41
42
  }
42
43
  export {
43
- L as TextInput
44
+ k as TextInput
44
45
  };
@@ -1,6 +1,6 @@
1
1
  import { DsTextareaAttrs } from '@cupra/ui-kit/react/types/ds-textarea';
2
2
  import { type ReactElement } from 'react';
3
- import '@cupra/ui-kit/react';
3
+ import '@cupra/ui-kit/react/ds-textarea';
4
4
  type TextareaProps = DsTextareaAttrs & {
5
5
  className?: string;
6
6
  onChange?: (event: typeof InputEvent) => void;
@@ -1,8 +1,9 @@
1
1
  import { jsxs as E, jsx as r } from "react/jsx-runtime";
2
- import "../../packages/ui-kit/dist-react/index.js";
2
+ import "@cupra/ui-kit/react/ds-textarea";
3
+ import "@cupra/ui-kit/react/utils/breakpoints";
3
4
  import "react";
4
5
  import { useHandleEvent as j } from "../../hooks/useHandleEvent.js";
5
- function C(t) {
6
+ function F(t) {
6
7
  const {
7
8
  className: o,
8
9
  children: I,
@@ -53,5 +54,5 @@ function C(t) {
53
54
  );
54
55
  }
55
56
  export {
56
- C as Textarea
57
+ F as Textarea
57
58
  };
@@ -1,4 +1,4 @@
1
- import '@cupra/ui-kit/react';
1
+ import '@cupra/ui-kit/react/ds-theme-provider';
2
2
  import { DsThemeProviderAttrs } from '@cupra/ui-kit/react/types/ds-theme-provider';
3
3
  import { type ReactElement } from 'react';
4
4
  type Children = JSX.Element | JSX.Element[] | string;
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import "../../packages/ui-kit/dist-react/index.js";
2
+ import "@cupra/ui-kit/react/ds-theme-provider";
3
3
  const i = ({ children: r, ...e }) => /* @__PURE__ */ o("ds-theme-provider-react", { ...e, children: r });
4
4
  export {
5
5
  i as ThemeProvider
@@ -1,6 +1,6 @@
1
1
  import type { DsToastAttrs, ToastOptions } from '@cupra/ui-kit/react/types/ds-toast';
2
2
  import { type ReactNode } from 'react';
3
- import '@cupra/ui-kit/react';
3
+ import '@cupra/ui-kit/react/ds-toast';
4
4
  type ToastProps = DsToastAttrs & {
5
5
  className?: string;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import "../../packages/ui-kit/dist-react/index.js";
2
+ import "@cupra/ui-kit/react/ds-toast";
3
3
  function e(t) {
4
4
  const { className: o, ...s } = t;
5
5
  return /* @__PURE__ */ a("ds-toast-react", { class: o, ...s });
@@ -1,6 +1,6 @@
1
1
  import { DsToastMessageAttrs } from '@cupra/ui-kit/react/types/ds-toast-message';
2
2
  import { type ReactNode } from 'react';
3
- import '@cupra/ui-kit/react';
3
+ import '@cupra/ui-kit/react/ds-toast-message';
4
4
  export type ToastMessageProps = DsToastMessageAttrs & {
5
5
  className?: string;
6
6
  children?: ReactNode;
@@ -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,11 +1,31 @@
1
- import { type ReactElement } from 'react';
2
- import '@cupra/ui-kit/react';
1
+ import { type HTMLAttributes, type ImgHTMLAttributes, type ReactElement, type ReactNode } from 'react';
2
+ import '@cupra/ui-kit/react/ds-tooltip';
3
3
  import { DsTooltipAttrs } from '@cupra/ui-kit/react/types/ds-tooltip';
4
- type Children = JSX.Element | JSX.Element[] | string;
5
- interface TooltipProps extends DsTooltipAttrs {
6
- children: Children;
7
- onClickCancelButton?: (event: CustomEvent) => void;
8
- onClickConfirmButton?: (event: CustomEvent) => void;
9
- }
10
- export declare function Tooltip({ children, onClickCancelButton, onClickConfirmButton, ...restProps }: TooltipProps): ReactElement;
11
- export {};
4
+ import { type IconButtonProps } from '../IconButton/IconButton';
5
+ export type TooltipProps = DsTooltipAttrs & {
6
+ children: ReactNode;
7
+ };
8
+ export type CloseButtonProps = Omit<IconButtonProps, 'icon-name'>;
9
+ export declare const Tooltip: {
10
+ ({ children, ...restProps }: TooltipProps): ReactElement;
11
+ Header: {
12
+ ({ children, ...props }: {
13
+ children?: ReactNode;
14
+ } & HTMLAttributes<HTMLDivElement>): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ CloseButton: {
18
+ (props: CloseButtonProps): ReactElement;
19
+ displayName: string;
20
+ };
21
+ Content: {
22
+ ({ children, ...props }: {
23
+ children?: ReactNode;
24
+ } & HTMLAttributes<HTMLDivElement>): JSX.Element;
25
+ displayName: string;
26
+ };
27
+ Img: {
28
+ ({ alt, ...props }: ImgHTMLAttributes<HTMLImageElement>): ReactElement;
29
+ displayName: string;
30
+ };
31
+ };
@@ -1,24 +1,15 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import "react";
3
- import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
4
- 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`
7
- display: flex;
8
- align-items: center;
9
- `;
10
- function u({
11
- children: o,
12
- onClickCancelButton: r,
13
- onClickConfirmButton: i,
14
- ...e
15
- }) {
16
- const { ref: n } = c({
17
- "click-cancel-button": r,
18
- "click-confirm-button": i
19
- });
20
- return /* @__PURE__ */ t("ds-tooltip-react", { ref: n, ...e, children: /* @__PURE__ */ t(l, { children: o }) });
21
- }
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/ds-tooltip";
3
+ import { IconButton as a } from "../IconButton/IconButton.js";
4
+ const n = ({ children: t, ...o }) => /* @__PURE__ */ e("ds-tooltip-react", { ...o, children: t }), r = ({ children: t, ...o }) => /* @__PURE__ */ e("div", { slot: "header", ...o, children: t }), s = (t) => /* @__PURE__ */ e(a, { slot: "close-button", "icon-name": "cross", ...t }), l = ({ children: t, ...o }) => /* @__PURE__ */ e("div", { slot: "content", ...o, children: t }), i = ({ alt: t, ...o }) => /* @__PURE__ */ e("img", { alt: t ?? "", slot: "image", ...o });
5
+ n.Header = r;
6
+ n.CloseButton = s;
7
+ n.Content = l;
8
+ n.Img = i;
9
+ r.displayName = "Tooltip.Header";
10
+ s.displayName = "Tooltip.CloseButton";
11
+ l.displayName = "Tooltip.Content";
12
+ i.displayName = "Tooltip.Img";
22
13
  export {
23
- u as Tooltip
14
+ n as Tooltip
24
15
  };
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Primary: Story;
@@ -1,4 +1,5 @@
1
1
  export * from './Accordion/Accordion';
2
+ export * from './Badge/Badge';
2
3
  export * from './Bullets/Bullets';
3
4
  export * from './Button/Button';
4
5
  export * from './CarouselIndicator/CarouselIndicator';
@@ -18,6 +19,7 @@ export * from './Input/Input';
18
19
  export * from './LinkButton/LinkButton';
19
20
  export * from './Loader/Loader';
20
21
  export * from './Logo/Logo';
22
+ export * from './MainTitle/MainTitle';
21
23
  export * from './MapPin/MapPin';
22
24
  export * from './Modal/Modal';
23
25
  export * from './PasswordInput/PasswordInput';
@@ -25,6 +27,7 @@ export * from './PickerItem/PickerItem';
25
27
  export * from './Radio/Radio';
26
28
  export * from './RadioButton/RadioButton';
27
29
  export * from './RadioButtonGroup/RadioButtonGroup';
30
+ export * from './Rating/Rating';
28
31
  export * from './Search/Search';
29
32
  export * from './SearchInput/SearchInput';
30
33
  export * from './SecondaryNavigation/SecondaryNavigation';
@@ -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
@@ -1,24 +1,24 @@
1
- import { useRef as u, useEffect as l } from "react";
2
- function d(e) {
3
- const o = u(null), n = u(e);
1
+ import { useRef as f, useEffect as l } from "react";
2
+ function d(n) {
3
+ const t = f(null), e = f(n);
4
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);
5
+ e.current = n;
6
+ }, [n]), l(() => {
7
+ const c = t.current;
8
+ if (!c) return;
9
+ const o = {};
10
+ return Object.keys(e.current).forEach((r) => {
11
+ const u = (i) => {
12
+ const s = e.current[r];
13
+ s && s(i);
14
14
  };
15
- c[r] = s, t.addEventListener(r, s);
15
+ o[r] = u, c.addEventListener(r, u);
16
16
  }), () => {
17
- Object.keys(c).forEach((r) => {
18
- t.removeEventListener(r, c[r]);
17
+ Object.keys(o).forEach((r) => {
18
+ c.removeEventListener(r, o[r]);
19
19
  });
20
20
  };
21
- }, []), { ref: o };
21
+ }, [t.current, e.current]), { ref: t };
22
22
  }
23
23
  export {
24
24
  d as useHandleEvent