@youngonesworks/ui 0.1.31 → 0.1.34

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.
@@ -1,5 +1,5 @@
1
- import { type JSX, type ReactNode } from 'react';
2
- interface IFavouriteButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'size'> {
1
+ import { type ButtonHTMLAttributes, type JSX, type ReactNode, type Ref } from 'react';
2
+ interface IFavouriteButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'size'> {
3
3
  onClick: () => void;
4
4
  favourite: boolean;
5
5
  iconOutline?: ReactNode;
@@ -11,9 +11,9 @@ interface IFavouriteButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButt
11
11
  iconColor?: string;
12
12
  iconColorSelected?: string;
13
13
  styleVariant?: 'transparent' | 'small' | 'default' | 'round' | undefined;
14
- children?: React.ReactNode;
14
+ children?: ReactNode;
15
15
  }
16
16
  export declare const FavouriteButton: (props: IFavouriteButtonProps & {
17
- ref?: React.Ref<HTMLButtonElement>;
17
+ ref?: Ref<HTMLButtonElement>;
18
18
  }) => JSX.Element;
19
19
  export {};
@@ -1,3 +1,21 @@
1
- export declare const PasswordInput: ({ ...props }: {
2
- [x: string]: any;
3
- }) => import("react/jsx-runtime").JSX.Element;
1
+ import React from 'react';
2
+ export declare const PasswordInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
3
+ rightSection?: React.ReactNode;
4
+ leftSection?: React.ReactNode;
5
+ label?: React.ReactNode;
6
+ className?: string;
7
+ min?: string | undefined | number;
8
+ max?: string | undefined | number;
9
+ error?: string;
10
+ showRightSection?: boolean;
11
+ step?: string;
12
+ autoFocus?: boolean;
13
+ wrapperClassName?: string;
14
+ maxLength?: undefined | number;
15
+ password?: boolean;
16
+ autoComplete?: string;
17
+ enablePasswordManagerAutofill?: boolean;
18
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
19
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
20
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
21
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type AlignedPlacement, type Side } from '@floating-ui/react';
3
- interface ITooltipProps {
3
+ type ITooltipProps = {
4
4
  content: ReactNode;
5
5
  children: ReactNode;
6
6
  hoverEnabled?: boolean;
@@ -10,6 +10,11 @@ interface ITooltipProps {
10
10
  amountOfOffset?: number;
11
11
  className?: string;
12
12
  style?: 'minimal' | 'card';
13
- }
14
- export declare const Popover: import("react").ForwardRefExoticComponent<ITooltipProps & import("react").RefAttributes<unknown>>;
13
+ };
14
+ type PopoverRefType = {
15
+ closePopover: () => void;
16
+ openPopover: () => void;
17
+ togglePopover: () => void;
18
+ };
19
+ export declare const Popover: import("react").ForwardRefExoticComponent<ITooltipProps & import("react").RefAttributes<PopoverRefType>>;
15
20
  export {};
@@ -1,2 +1,3 @@
1
1
  export * from './Tab';
2
+ export * from './TabsBadge';
2
3
  export * from './TabsWrapper';
@@ -1,5 +1,6 @@
1
- import React, { type ChangeEvent, type FocusEvent, type InputHTMLAttributes, type KeyboardEvent, type ReactNode } from 'react';
2
- export interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
1
+ import React from 'react';
2
+ import { type ChangeEvent, type FocusEvent, type InputHTMLAttributes, type KeyboardEvent, type ReactNode } from 'react';
3
+ export type TextInputProps = InputHTMLAttributes<HTMLInputElement> & {
3
4
  rightSection?: ReactNode;
4
5
  leftSection?: ReactNode;
5
6
  label?: ReactNode;
@@ -18,5 +19,24 @@ export interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
18
19
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
19
20
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
20
21
  onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
21
- }
22
- export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
22
+ };
23
+ export declare const TextInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
24
+ rightSection?: ReactNode;
25
+ leftSection?: ReactNode;
26
+ label?: ReactNode;
27
+ className?: string;
28
+ min?: string | undefined | number;
29
+ max?: string | undefined | number;
30
+ error?: string;
31
+ showRightSection?: boolean;
32
+ step?: string;
33
+ autoFocus?: boolean;
34
+ wrapperClassName?: string;
35
+ maxLength?: undefined | number;
36
+ password?: boolean;
37
+ autoComplete?: string;
38
+ enablePasswordManagerAutofill?: boolean;
39
+ onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
40
+ onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
41
+ onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
42
+ } & React.RefAttributes<HTMLInputElement>>;
package/dist/index.cjs CHANGED
@@ -103137,7 +103137,7 @@ const AppleAppButtonIcon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs
103137
103137
 
103138
103138
  //#endregion
103139
103139
  //#region src/components/textInput/index.tsx
103140
- const TextInput = (0, react.forwardRef)(({ rightSection, leftSection, className, error: error$1, autoFocus, label, maxLength, enablePasswordManagerAutofill = false, onBlur, disabled, onKeyDown, min: min$2 = "0", max: max$2, autoComplete, showRightSection = true, step, wrapperClassName, password = false,...props }, ref) => {
103140
+ const TextInput = react.default.forwardRef(({ rightSection, leftSection, className, error: error$1, autoFocus, label, maxLength, enablePasswordManagerAutofill = false, onBlur, disabled, onKeyDown, min: min$2 = "0", max: max$2, autoComplete, showRightSection = true, step, wrapperClassName, password = false,...props }, ref) => {
103141
103141
  const [showPassword, setShowPassword] = react.default.useState(false);
103142
103142
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
103143
103143
  "data-component": "TextInput",
@@ -104009,7 +104009,10 @@ const Modal = ({ title, children, withCloseButton = true, opened, additionalClas
104009
104009
  })
104010
104010
  }),
104011
104011
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children }),
104012
- gradient && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className: "bg-gradient-blue-pink absolute bottom-0 left-0 mt-8 mb-0 h-2! w-full border-none" })
104012
+ gradient && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", {
104013
+ className: "absolute bottom-0 left-0 mt-8 mb-0 h-2! w-full border-none",
104014
+ style: { backgroundImage: "linear-gradient(90deg, var(--color-light-blue) 0%, var(--color-primary) 50.52%, var(--color-pink) 100%)" }
104015
+ })
104013
104016
  ]
104014
104017
  })
104015
104018
  })]
@@ -104117,12 +104120,14 @@ const PageUnavailable = ({ notAvailableButton, notAvailableDescription, notAvail
104117
104120
 
104118
104121
  //#endregion
104119
104122
  //#region src/components/passwordInput/index.tsx
104120
- const PasswordInput = ({ ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInput, {
104123
+ const PasswordInput = react.default.forwardRef((props, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInput, {
104121
104124
  password: true,
104122
104125
  enablePasswordManagerAutofill: true,
104123
104126
  type: "password",
104124
- ...props
104125
- });
104127
+ ...props,
104128
+ ref
104129
+ }));
104130
+ PasswordInput.displayName = "PasswordInput";
104126
104131
 
104127
104132
  //#endregion
104128
104133
  //#region node_modules/tabbable/dist/index.esm.js
@@ -115929,6 +115934,21 @@ const Tab = (0, react.forwardRef)(({ tabId, activeTab, tabContent, clickFnc, rig
115929
115934
  })]
115930
115935
  }));
115931
115936
 
115937
+ //#endregion
115938
+ //#region src/components/tabs/TabsBadge.tsx
115939
+ const TabsBadge = ({ children }) => {
115940
+ const isCircular = typeof children === "number" && children <= 9 || typeof children === "string" && children.length === 1 || false;
115941
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
115942
+ "data-testid": "tabs-badge",
115943
+ className: clsx_default("bg-pink h-5 rounded-full text-xs leading-5 font-medium text-white", {
115944
+ "w-5 text-center": isCircular,
115945
+ "px-2": !isCircular
115946
+ }),
115947
+ children
115948
+ });
115949
+ };
115950
+ TabsBadge.displayName = "TabsBadge";
115951
+
115932
115952
  //#endregion
115933
115953
  //#region src/components/tabs/TabsWrapper.tsx
115934
115954
  const TabsWrapper = ({ setActiveTab, activeTab, tabs }) => {
@@ -115994,21 +116014,6 @@ const TabContent = (0, react.forwardRef)(({ tab, setActiveTab, activeTab }, ref)
115994
116014
  }));
115995
116015
  TabContent.displayName = "TabContent";
115996
116016
 
115997
- //#endregion
115998
- //#region src/components/tabs/TabsBadge.tsx
115999
- const TabsBadge = ({ children }) => {
116000
- const isCircular = typeof children === "number" && children <= 9 || typeof children === "string" && children.length === 1 || false;
116001
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
116002
- "data-testid": "tabs-badge",
116003
- className: clsx_default("bg-pink h-5 rounded-full text-xs leading-5 font-medium text-white", {
116004
- "w-5 text-center": isCircular,
116005
- "px-2": !isCircular
116006
- }),
116007
- children
116008
- });
116009
- };
116010
- TabsBadge.displayName = "TabsBadge";
116011
-
116012
116017
  //#endregion
116013
116018
  //#region src/components/textArea/index.tsx
116014
116019
  const Textarea = (0, react.forwardRef)(({ className, label, error: error$1, rows = 8,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {