@youngonesworks/ui 0.1.16 → 0.1.18

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,17 +1,16 @@
1
- interface ActionIconProps {
2
- children?: React.ReactNode;
3
- }
4
- export interface IActionIcon extends Omit<ActionIconProps, 'classNames'> {
1
+ import type { MouseEvent, ReactNode } from 'react';
2
+ export interface ActionIconProps {
5
3
  'data-testid'?: string;
6
4
  title: string;
7
5
  disabled?: boolean;
8
6
  type?: 'button' | 'submit' | 'reset' | undefined;
9
7
  styleVariant?: 'default' | 'transparent' | 'small' | 'round';
10
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
- icon: React.ReactNode;
8
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
9
+ icon?: ReactNode;
12
10
  iconSize?: number;
13
11
  strokeWidth?: number;
14
12
  className?: string;
13
+ children?: ReactNode;
15
14
  /**
16
15
  * @deprecated Can be removed and replaced by iconSize
17
16
  */
@@ -21,5 +20,5 @@ export interface IActionIcon extends Omit<ActionIconProps, 'classNames'> {
21
20
  */
22
21
  height?: string;
23
22
  }
24
- export declare const ActionIcon: import("react").ForwardRefExoticComponent<IActionIcon & import("react").RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
25
- export {};
23
+ declare const ActionIcon: React.ForwardRefExoticComponent<ActionIconProps & React.RefAttributes<HTMLButtonElement>>;
24
+ export { ActionIcon };
@@ -1,8 +1,9 @@
1
+ import { type ReactNode } from 'react';
1
2
  interface IBreadCrumb {
2
- text: string;
3
+ children: ReactNode;
3
4
  }
4
5
  export declare const BreadCrumb: {
5
- ({ text }: IBreadCrumb): import("react/jsx-runtime").JSX.Element;
6
+ ({ children }: IBreadCrumb): import("react/jsx-runtime").JSX.Element;
6
7
  displayName: string;
7
8
  };
8
9
  export {};
package/dist/index.cjs CHANGED
@@ -102933,15 +102933,16 @@ const ActionIcon = (0, react.forwardRef)(({ title, disabled = false, styleVarian
102933
102933
  "data-tooltip-id": title,
102934
102934
  "data-tooltip-content": title,
102935
102935
  ...props,
102936
- children: formatIcon(icon, {
102936
+ children: icon ? formatIcon(icon, {
102937
102937
  stroke: strokeWidth,
102938
102938
  size: iconSize
102939
- })
102939
+ }) : props.children
102940
102940
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(M, {
102941
102941
  id: title,
102942
102942
  className: "z-[99]"
102943
102943
  })] });
102944
102944
  });
102945
+ ActionIcon.displayName = "ActionIcon";
102945
102946
 
102946
102947
  //#endregion
102947
102948
  //#region src/components/alert/index.tsx
@@ -103314,10 +103315,10 @@ LinkText.displayName = "LinkText";
103314
103315
 
103315
103316
  //#endregion
103316
103317
  //#region src/components/breadCrumb/index.tsx
103317
- const BreadCrumb = ({ text }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkText, {
103318
+ const BreadCrumb = ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkText, {
103318
103319
  "data-component": "BreadCrumb",
103319
103320
  classNames: "flex items-center",
103320
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowNarrowLeft, { size: 20 }), text] })
103321
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowNarrowLeft, { size: 20 }), children] })
103321
103322
  });
103322
103323
  BreadCrumb.displayName = "BreadCrumb";
103323
103324