@powered-by-array/ui 1.102.0 → 1.103.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.
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +3 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.types.d.ts +3 -0
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarProductMenu/SidebarProductMenu.variants.js +1 -1
- package/dist/components/Sidebar/SidebarProductMenu/SidebarProductMenu.variants.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ButtonProps } from "./Button.types.js";
|
|
2
|
-
export declare function Button({ className, variant, size, type, loading, disabled, children, ref, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Button({ className, variant, size, type, loading, disabled, children, icon: Icon, iconPosition, ref, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAe,EACf,OAAe,EACf,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAe,EACf,OAAe,EACf,QAAQ,EACR,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,YAAqB,EACrB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,2CAkCb"}
|
|
@@ -2,7 +2,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { Loader2 } from "lucide-react";
|
|
3
3
|
import { cn } from "../../lib/cn.js";
|
|
4
4
|
import { buttonVariants } from "./Button.variants.js";
|
|
5
|
-
export function Button({ className, variant, size, type = "button", loading = false, disabled, children, ref, ...props }) {
|
|
6
|
-
|
|
5
|
+
export function Button({ className, variant, size, type = "button", loading = false, disabled, children, icon: Icon, iconPosition = "left", ref, ...props }) {
|
|
6
|
+
const content = (_jsxs(_Fragment, { children: [Icon && iconPosition === "left" ? _jsx(Icon, { "aria-hidden": "true" }) : null, children, Icon && iconPosition === "right" ? _jsx(Icon, { "aria-hidden": "true" }) : null] }));
|
|
7
|
+
return (_jsx("button", { ref: ref, "data-slot": "button", type: type, disabled: disabled || loading, "aria-busy": loading || undefined, className: cn(buttonVariants({ variant, size }), "relative", className), ...props, children: loading ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { "aria-hidden": "true", className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 animate-spin" }), _jsx("span", { "aria-hidden": "true", className: "invisible", children: content })] })) : (content) }));
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,UAAU,MAAM,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ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C;IAEF,OAAO,CACL,iBACE,GAAG,EAAE,GAAG,eACE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,IAAI,OAAO,eAClB,OAAO,IAAI,SAAS,EAC/B,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,KACnE,KAAK,YAER,OAAO,CAAC,CAAC,CAAC,CACT,8BACE,KAAC,OAAO,mBACM,MAAM,EAClB,SAAS,EAAC,0EAA0E,GACpF,EACF,8BAAkB,MAAM,EAAC,SAAS,EAAC,WAAW,YAC3C,OAAO,GACH,IACN,CACJ,CAAC,CAAC,CAAC,CACF,OAAO,CACR,GACM,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
3
|
import type { ButtonVariants } from "./Button.variants.js";
|
|
3
4
|
export type ButtonProps = ComponentProps<"button"> & ButtonVariants & {
|
|
4
5
|
loading?: boolean;
|
|
6
|
+
icon?: LucideIcon;
|
|
7
|
+
iconPosition?: "left" | "right";
|
|
5
8
|
};
|
|
6
9
|
export type { ButtonVariants };
|
|
7
10
|
//# sourceMappingURL=Button.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,QAAQ,CAAC,GAChD,cAAc,GAAG;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,CAAC;AAEJ,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
2
|
export const sidebarProductMenuVariants = cva([
|
|
3
|
-
"group/sidebar-product-menu relative flex h-9 items-center gap-[6px] rounded-xl text-left text-sm
|
|
3
|
+
"group/sidebar-product-menu relative flex h-9 items-center gap-[6px] rounded-xl text-left text-sm outline-none",
|
|
4
4
|
"w-full min-w-[200px] justify-start",
|
|
5
5
|
"transition-[background] duration-200 ease-out",
|
|
6
6
|
"focus-visible:ring-[var(--color-semantic-sidebar-product-focus)] focus-visible:ring-2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarProductMenu.variants.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/SidebarProductMenu/SidebarProductMenu.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C;IACE
|
|
1
|
+
{"version":3,"file":"SidebarProductMenu.variants.js","sourceRoot":"","sources":["../../../../src/components/Sidebar/SidebarProductMenu/SidebarProductMenu.variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAC3C;IACE,+GAA+G;IAC/G,oCAAoC;IACpC,+CAA+C;IAC/C,uFAAuF;IACvF,iDAAiD;IACjD,+LAA+L;CAChM,EACD;IACE,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,IAAI,EAAE,gEAAgE;YACtE,KAAK,EACH,oFAAoF;SACvF;KACF;IACD,eAAe,EAAE;QACf,MAAM,EAAE,KAAK;KACd;CACF,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,MAAM,EAAE;QACN,+EAA+E;QAC/E,+CAA+C;QAC/C,wFAAwF;KACzF;IACD,YAAY,EACV,mHAAmH;IACrH,cAAc,EACZ,sEAAsE;IACxE,KAAK,EACH,+DAA+D;CACzD,CAAC"}
|