qlu-20-ui-library 1.2.2 → 1.2.3
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/dist/build/index.css +1 -1
- package/dist/build/qlu-20-ui-library.cjs +2 -2
- package/dist/build/qlu-20-ui-library.js +8 -8
- package/dist/components/PrimaryButton/index.d.ts +3 -4
- package/dist/components/SecondaryButton/index.d.ts +3 -4
- package/dist/types/components/PrimaryButton/index.d.ts +3 -4
- package/dist/types/components/PrimaryButton/index.js +2 -2
- package/dist/types/components/SecondaryButton/index.d.ts +3 -4
- package/dist/types/components/SecondaryButton/index.js +2 -2
- package/package.json +1 -1
|
@@ -21817,8 +21817,8 @@ const ia = ({
|
|
|
21817
21817
|
sizeVariant: r = "xs",
|
|
21818
21818
|
colorVariant: a = "orange",
|
|
21819
21819
|
isDisabled: i = !1,
|
|
21820
|
-
|
|
21821
|
-
|
|
21820
|
+
children: o,
|
|
21821
|
+
...s
|
|
21822
21822
|
}) => {
|
|
21823
21823
|
const l = bt({
|
|
21824
21824
|
primaryButtonGeneric: !0,
|
|
@@ -21828,11 +21828,11 @@ const ia = ({
|
|
|
21828
21828
|
return /* @__PURE__ */ d.jsx(
|
|
21829
21829
|
"button",
|
|
21830
21830
|
{
|
|
21831
|
+
...s,
|
|
21831
21832
|
type: e,
|
|
21832
21833
|
className: `${l} ${n}`,
|
|
21833
21834
|
disabled: i,
|
|
21834
|
-
|
|
21835
|
-
children: s || t
|
|
21835
|
+
children: o || t
|
|
21836
21836
|
}
|
|
21837
21837
|
);
|
|
21838
21838
|
};
|
|
@@ -38246,8 +38246,8 @@ const c7 = ({
|
|
|
38246
38246
|
sizeVariant: n = "xs",
|
|
38247
38247
|
colorVariant: r = "orange",
|
|
38248
38248
|
isDisabled: a = !1,
|
|
38249
|
-
|
|
38250
|
-
|
|
38249
|
+
children: i,
|
|
38250
|
+
...o
|
|
38251
38251
|
}) => {
|
|
38252
38252
|
const s = bt({
|
|
38253
38253
|
secondaryButtonGeneric: !0,
|
|
@@ -38257,11 +38257,11 @@ const c7 = ({
|
|
|
38257
38257
|
return /* @__PURE__ */ d.jsx(
|
|
38258
38258
|
"button",
|
|
38259
38259
|
{
|
|
38260
|
+
...o,
|
|
38260
38261
|
type: "button",
|
|
38261
38262
|
className: `${s} ${t}`,
|
|
38262
38263
|
disabled: a,
|
|
38263
|
-
|
|
38264
|
-
children: o || e
|
|
38264
|
+
children: i || e
|
|
38265
38265
|
}
|
|
38266
38266
|
);
|
|
38267
38267
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
interface PrimaryButtonProps {
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
interface PrimaryButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
3
3
|
type?: "button" | "submit" | "reset";
|
|
4
4
|
text?: string;
|
|
5
5
|
primaryButtonClassName?: string;
|
|
@@ -7,8 +7,7 @@ interface PrimaryButtonProps {
|
|
|
7
7
|
colorVariant: "orange" | "black" | "gray" | "lightGray";
|
|
8
8
|
isDisabled?: boolean;
|
|
9
9
|
width?: string;
|
|
10
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
10
|
children?: ReactNode;
|
|
12
11
|
}
|
|
13
|
-
declare const PrimaryButton: ({ type, text, primaryButtonClassName, sizeVariant, colorVariant, isDisabled,
|
|
12
|
+
declare const PrimaryButton: ({ type, text, primaryButtonClassName, sizeVariant, colorVariant, isDisabled, children, ...props }: PrimaryButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default PrimaryButton;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
interface SecondaryButtonProps {
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
interface SecondaryButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
3
3
|
text?: string;
|
|
4
4
|
secondaryButtonClassName?: string;
|
|
5
5
|
sizeVariant?: "xs" | "sm" | "base";
|
|
6
6
|
colorVariant: "red" | "orange" | "black" | "gray" | "lightGray";
|
|
7
7
|
isDisabled?: boolean;
|
|
8
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
9
8
|
children?: ReactNode;
|
|
10
9
|
}
|
|
11
|
-
declare const SecondaryButton: ({ text, secondaryButtonClassName, sizeVariant, colorVariant, isDisabled,
|
|
10
|
+
declare const SecondaryButton: ({ text, secondaryButtonClassName, sizeVariant, colorVariant, isDisabled, children, ...props }: SecondaryButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export default SecondaryButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.scss";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
interface PrimaryButtonProps {
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
3
|
+
interface PrimaryButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
4
4
|
type?: "button" | "submit" | "reset";
|
|
5
5
|
text?: string;
|
|
6
6
|
primaryButtonClassName?: string;
|
|
@@ -8,8 +8,7 @@ interface PrimaryButtonProps {
|
|
|
8
8
|
colorVariant: "orange" | "black" | "gray" | "lightGray";
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
width?: string;
|
|
11
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
11
|
children?: ReactNode;
|
|
13
12
|
}
|
|
14
|
-
declare const PrimaryButton: ({ type, text, primaryButtonClassName, sizeVariant, colorVariant, isDisabled,
|
|
13
|
+
declare const PrimaryButton: ({ type, text, primaryButtonClassName, sizeVariant, colorVariant, isDisabled, children, ...props }: PrimaryButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default PrimaryButton;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import "./style.scss";
|
|
4
|
-
const PrimaryButton = ({ type = "button", text = "Button text", primaryButtonClassName = "", sizeVariant = "xs", colorVariant = "orange", isDisabled = false,
|
|
4
|
+
const PrimaryButton = ({ type = "button", text = "Button text", primaryButtonClassName = "", sizeVariant = "xs", colorVariant = "orange", isDisabled = false, children, ...props }) => {
|
|
5
5
|
const className = clsx({
|
|
6
6
|
primaryButtonGeneric: true,
|
|
7
7
|
[`${sizeVariant}Size--PrimaryButton`]: true,
|
|
8
8
|
[`${colorVariant}--PrimaryButton`]: true,
|
|
9
9
|
});
|
|
10
|
-
return (_jsx("button", { type: type, className: `${className} ${primaryButtonClassName}`, disabled: isDisabled,
|
|
10
|
+
return (_jsx("button", { ...props, type: type, className: `${className} ${primaryButtonClassName}`, disabled: isDisabled, children: children ? children : text }));
|
|
11
11
|
};
|
|
12
12
|
export default PrimaryButton;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import "./style.scss";
|
|
2
2
|
import "./style.scss";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
interface SecondaryButtonProps {
|
|
3
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
4
|
+
interface SecondaryButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
5
5
|
text?: string;
|
|
6
6
|
secondaryButtonClassName?: string;
|
|
7
7
|
sizeVariant?: "xs" | "sm" | "base";
|
|
8
8
|
colorVariant: "red" | "orange" | "black" | "gray" | "lightGray";
|
|
9
9
|
isDisabled?: boolean;
|
|
10
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
10
|
children?: ReactNode;
|
|
12
11
|
}
|
|
13
|
-
declare const SecondaryButton: ({ text, secondaryButtonClassName, sizeVariant, colorVariant, isDisabled,
|
|
12
|
+
declare const SecondaryButton: ({ text, secondaryButtonClassName, sizeVariant, colorVariant, isDisabled, children, ...props }: SecondaryButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default SecondaryButton;
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "./style.scss";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import "./style.scss";
|
|
5
|
-
const SecondaryButton = ({ text = "", secondaryButtonClassName = "", sizeVariant = "xs", colorVariant = "orange", isDisabled = false,
|
|
5
|
+
const SecondaryButton = ({ text = "", secondaryButtonClassName = "", sizeVariant = "xs", colorVariant = "orange", isDisabled = false, children, ...props }) => {
|
|
6
6
|
const className = clsx({
|
|
7
7
|
secondaryButtonGeneric: true,
|
|
8
8
|
[`${sizeVariant}Size--SecondaryButton`]: true,
|
|
9
9
|
[`${colorVariant}--SecondaryButton`]: true,
|
|
10
10
|
});
|
|
11
|
-
return (_jsx("button", { type: "button", className: `${className} ${secondaryButtonClassName}`, disabled: isDisabled,
|
|
11
|
+
return (_jsx("button", { ...props, type: "button", className: `${className} ${secondaryButtonClassName}`, disabled: isDisabled, children: children ? children : text }));
|
|
12
12
|
};
|
|
13
13
|
export default SecondaryButton;
|