linkedunion-design-kit 1.8.8 → 1.8.9
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/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/src/components/Avatar/Avatar/type.d.ts +2 -1
- package/dist/src/components/Button/Button/Button.d.ts +22 -0
- package/dist/src/components/Button/Button/Button.js +80 -0
- package/dist/src/components/Button/Button/Button.stories.d.ts +725 -0
- package/dist/src/components/Button/Button/Button.stories.js +295 -0
- package/dist/src/components/Button/Button/Button.test.d.ts +1 -0
- package/dist/src/components/Button/Button/Button.test.js +10 -0
- package/dist/src/components/Button/Button/index.d.ts +63 -0
- package/dist/src/components/Button/Button/index.js +64 -0
- package/dist/src/components/Button/Button.d.ts +4 -29
- package/dist/src/components/Button/Button.js +13 -30
- package/dist/src/components/Button/Button.stories.d.ts +601 -0
- package/dist/src/components/Button/Button.stories.js +41 -1
- package/dist/src/components/Button/IconButton/IconButton.d.ts +20 -0
- package/dist/src/components/Button/IconButton/IconButton.js +72 -0
- package/dist/src/components/Button/IconButton/IconButton.stories.d.ts +698 -0
- package/dist/src/components/Button/IconButton/IconButton.stories.js +131 -0
- package/dist/src/components/Button/IconButton/IconButton.test.d.ts +1 -0
- package/dist/src/components/Button/IconButton/IconButton.test.js +29 -0
- package/dist/src/components/Button/IconButton/index.d.ts +0 -0
- package/dist/src/components/Button/IconButton/index.js +1 -0
- package/dist/src/components/Button/IconButton.d.ts +1 -1
- package/dist/src/components/Button/index.d.ts +69 -0
- package/dist/src/components/Button/index.js +70 -0
- package/dist/src/components/Card/MultipleNews/MultiNews.js +1 -1
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.js +56 -6
- package/dist/src/components/Card/PostByCategory/PostByCategory.js +1 -1
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.d.ts +1 -0
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.js +58 -5
- package/dist/src/components/Card/SinglePost/SinglePost.js +2 -2
- package/dist/src/components/Card/SinglePost/SinglePost.stories.js +23 -1
- package/dist/src/components/Card/contactProfile/ContactProfile.js +1 -1
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.d.ts +1 -0
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.js +58 -5
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.js +1 -1
- package/dist/src/components/Card/photoGallery/PhotoGallery.stories.js +1 -1
- package/dist/src/components/Checkbox/checkbox.d.ts +9 -1
- package/dist/src/components/Checkbox/checkbox.js +25 -2
- package/dist/src/components/Checkbox/checkbox.stories.js +11 -2
- package/dist/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.js +5 -3
- package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +9 -1
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +57 -6
- package/dist/src/components/ColorPicker/index.d.ts +8 -0
- package/dist/src/components/ColorPicker/index.js +28 -0
- package/dist/src/components/ColorPicker/type.d.ts +2 -1
- package/dist/src/components/Icons/LUIcon.d.ts +1 -1
- package/dist/src/components/Icons/LUIcon.js +3 -4
- package/dist/src/components/Icons/LUIcon.test.d.ts +1 -0
- package/dist/src/components/Icons/LUIcon.test.js +255 -0
- package/dist/src/components/Icons/stories/IconDropdown.d.ts +8 -0
- package/dist/src/components/Icons/stories/IconDropdown.js +38 -0
- package/dist/src/components/Icons/stories/IconGallery.d.ts +2 -0
- package/dist/src/components/Icons/stories/IconGallery.js +31 -0
- package/dist/src/components/Icons/stories/InteractiveIconSelector.d.ts +2 -0
- package/dist/src/components/Icons/stories/InteractiveIconSelector.js +26 -0
- package/dist/src/components/Icons/stories/LUIcon.stories.d.ts +8 -0
- package/dist/src/components/Icons/stories/LUIcon.stories.js +108 -0
- package/dist/src/components/Icons/stories/index.d.ts +3 -0
- package/dist/src/components/Icons/stories/index.js +3 -0
- package/dist/src/components/Icons/type.d.ts +3 -1
- package/dist/src/components/ImageUploader/imageUploader.js +1 -1
- package/dist/src/components/Input/Input.stories.d.ts +8 -0
- package/dist/src/components/Input/Input.stories.js +89 -2
- package/dist/src/components/Input/index.d.ts +14 -0
- package/dist/src/components/Input/index.js +65 -0
- package/dist/src/components/Input/input.d.ts +35 -1
- package/dist/src/components/Input/input.js +87 -3
- package/dist/src/components/Input/type.d.ts +6 -0
- package/dist/src/components/RadioButton/RadioButton.stories.d.ts +1 -0
- package/dist/src/components/RadioButton/RadioButton.stories.js +47 -8
- package/dist/src/components/RadioButton/RadioGroup.stories.d.ts +10 -0
- package/dist/src/components/RadioButton/RadioGroup.stories.js +131 -0
- package/dist/src/components/RadioButton/radio-button.d.ts +12 -1
- package/dist/src/components/RadioButton/radio-button.js +29 -13
- package/dist/src/components/RadioButton/radio-group.d.ts +21 -0
- package/dist/src/components/RadioButton/radio-group.js +59 -0
- package/dist/src/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
- package/dist/src/components/RadioGroup/RadioGroup.stories.js +116 -0
- package/dist/src/components/RadioGroup/radio-group.d.ts +14 -0
- package/dist/src/components/RadioGroup/radio-group.js +57 -0
- package/dist/src/components/Switch/switch.d.ts +1 -1
- package/dist/src/components/ToolTip/Tooltip.stories.js +1 -1
- package/dist/src/components/Typography/Heading/Heading.stories.d.ts +1 -0
- package/dist/src/components/Typography/Heading/Heading.stories.js +13 -0
- package/dist/src/components/Typography/Heading/heading.d.ts +5 -8
- package/dist/src/components/Typography/Heading/heading.js +33 -40
- package/dist/src/components/Typography/Heading/heading.module.css +173 -0
- package/dist/src/components/ui/typography.d.ts +1 -1
- package/dist/src/utils/iconList.d.ts +166 -3
- package/dist/src/utils/iconList.js +168 -832
- package/dist/src/utils/index.d.ts +3 -4
- package/dist/styles/global.css +421 -185
- package/dist/tailwind.config.js +0 -3
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { default as Card } from "./src/components/Card/card";
|
|
|
3
3
|
export { default as LuImage } from "./src/components/Images/LuImage";
|
|
4
4
|
export { default as Avatar } from "./src/components/Avatar/Avatar/Avatar";
|
|
5
5
|
export { default as Title } from "./src/components/Title/Title";
|
|
6
|
-
export { IconButton } from "./src/components/Button/IconButton";
|
|
6
|
+
export { IconButton } from "./src/components/Button/IconButton/IconButton";
|
|
7
7
|
export { default as ColorPicker } from "./src/components/ColorPicker/ColorPicker";
|
|
8
8
|
export { Input } from "./src/components/Input/input";
|
|
9
9
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "./src/components/Accordion/accordion";
|
|
@@ -16,9 +16,9 @@ export { Body } from "./src/components/Typography/Body/body";
|
|
|
16
16
|
export { Display } from "./src/components/Typography/Display/display";
|
|
17
17
|
export { Caption } from "./src/components/Typography/Caption/caption";
|
|
18
18
|
export { default as Tooltip } from "./src/components/ToolTip/Tooltip";
|
|
19
|
-
export { Button } from "./src/components/Button/Button";
|
|
19
|
+
export { Button } from "./src/components/Button/Button/Button";
|
|
20
20
|
export { Label } from "./src/components/Label/Label";
|
|
21
21
|
export { Slider } from "./src/components/Slider/slider";
|
|
22
|
-
export {
|
|
22
|
+
export { RadioGroup, RadioGroupItem, } from "./src/components/RadioGroup/radio-group";
|
|
23
23
|
export { AppIcon } from "./src/components/AppIcons";
|
|
24
24
|
export { Tabs, TabsList, TabsTrigger, TabsContent, } from "./src/components/Tabs/tabs";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { default as Card } from "./src/components/Card/card";
|
|
|
3
3
|
export { default as LuImage } from "./src/components/Images/LuImage";
|
|
4
4
|
export { default as Avatar } from "./src/components/Avatar/Avatar/Avatar";
|
|
5
5
|
export { default as Title } from "./src/components/Title/Title";
|
|
6
|
-
export { IconButton } from "./src/components/Button/IconButton";
|
|
6
|
+
export { IconButton } from "./src/components/Button/IconButton/IconButton";
|
|
7
7
|
export { default as ColorPicker } from "./src/components/ColorPicker/ColorPicker";
|
|
8
8
|
export { Input } from "./src/components/Input/input";
|
|
9
9
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "./src/components/Accordion/accordion";
|
|
@@ -16,9 +16,9 @@ export { Body } from "./src/components/Typography/Body/body";
|
|
|
16
16
|
export { Display } from "./src/components/Typography/Display/display";
|
|
17
17
|
export { Caption } from "./src/components/Typography/Caption/caption";
|
|
18
18
|
export { default as Tooltip } from "./src/components/ToolTip/Tooltip";
|
|
19
|
-
export { Button } from "./src/components/Button/Button";
|
|
19
|
+
export { Button } from "./src/components/Button/Button/Button";
|
|
20
20
|
export { Label } from "./src/components/Label/Label";
|
|
21
21
|
export { Slider } from "./src/components/Slider/slider";
|
|
22
|
-
export {
|
|
22
|
+
export { RadioGroup, RadioGroupItem, } from "./src/components/RadioGroup/radio-group";
|
|
23
23
|
export { AppIcon } from "./src/components/AppIcons";
|
|
24
24
|
export { Tabs, TabsList, TabsTrigger, TabsContent, } from "./src/components/Tabs/tabs";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { avatarShape, avatarSize } from ".";
|
|
2
|
+
import { iconList } from "../../../utils/iconList";
|
|
2
3
|
type avatarSize = keyof typeof avatarSize;
|
|
3
4
|
type avatarShape = keyof typeof avatarShape;
|
|
4
5
|
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
6
|
image?: string;
|
|
6
|
-
icon?:
|
|
7
|
+
icon?: keyof typeof iconList;
|
|
7
8
|
shape?: avatarShape;
|
|
8
9
|
size?: avatarSize;
|
|
9
10
|
className?: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { iconList } from "../../../utils/iconList";
|
|
4
|
+
export declare const variant: {
|
|
5
|
+
fill: string;
|
|
6
|
+
link: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
ghost: string;
|
|
9
|
+
};
|
|
10
|
+
declare const buttonVariants: (props?: ({
|
|
11
|
+
color?: "blue" | "light-blue" | "green" | "light-green" | "yellow" | "light-yellow" | "red" | "light-red" | "indigo" | "light-indigo" | "gray" | "disabled" | "light-gray" | null | undefined;
|
|
12
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
13
|
+
shape?: "rounded-full" | "rounded-sm" | null | undefined;
|
|
14
|
+
variant?: "link" | "fill" | "outline" | "ghost" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
declare function Button({ className, color, size, shape, variant, asChild, startIcon, endIcon, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
17
|
+
asChild?: boolean;
|
|
18
|
+
startIcon?: keyof typeof iconList;
|
|
19
|
+
endIcon?: keyof typeof iconList;
|
|
20
|
+
variant?: "fill" | "link" | "outline" | "ghost";
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
25
|
+
import { cva } from "class-variance-authority";
|
|
26
|
+
import { cn } from "../../../lib/utils";
|
|
27
|
+
import LUIcon from "../../Icons/LUIcon";
|
|
28
|
+
import { buttonStyles } from "..";
|
|
29
|
+
export var variant = {
|
|
30
|
+
fill: "",
|
|
31
|
+
link: "bg-transparent hover:bg-transparent focus:bg-transparent active:bg-transparent !p-0 underline-offset-4 hover:underline border-none",
|
|
32
|
+
outline: "border bg-transparent",
|
|
33
|
+
ghost: "bg-transparent border-none",
|
|
34
|
+
};
|
|
35
|
+
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-blue-200 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer", {
|
|
36
|
+
variants: {
|
|
37
|
+
color: buttonStyles.fillColor,
|
|
38
|
+
size: buttonStyles.size,
|
|
39
|
+
shape: buttonStyles.shape,
|
|
40
|
+
variant: variant,
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
color: "blue",
|
|
44
|
+
size: "md",
|
|
45
|
+
shape: "rounded-sm",
|
|
46
|
+
variant: "fill",
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
function Button(_a) {
|
|
50
|
+
var className = _a.className, _b = _a.color, color = _b === void 0 ? "blue" : _b, size = _a.size, shape = _a.shape, _c = _a.variant, variant = _c === void 0 ? "fill" : _c, _d = _a.asChild, asChild = _d === void 0 ? false : _d, startIcon = _a.startIcon, endIcon = _a.endIcon, props = __rest(_a, ["className", "color", "size", "shape", "variant", "asChild", "startIcon", "endIcon"]);
|
|
51
|
+
var Comp = asChild ? Slot : "button";
|
|
52
|
+
// Map button size to appropriate icon sizes for start and end icons
|
|
53
|
+
var getIconSizes = function () {
|
|
54
|
+
if (size === "xl" || size === "lg" || size === "md") {
|
|
55
|
+
return {
|
|
56
|
+
startIcon: "md", // 16px (size-6) - matches iconSize.xl
|
|
57
|
+
endIcon: "xs", // 12px (size-3.5)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
startIcon: "sm", // 14px (size-4)
|
|
62
|
+
endIcon: "xs", // 12px (size-3.5)
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
// Get icon sizes based on button size
|
|
66
|
+
var iconSizes = getIconSizes();
|
|
67
|
+
// Use the calculated sizes based on button size
|
|
68
|
+
var startIconSizeValue = iconSizes.startIcon;
|
|
69
|
+
var endIconSizeValue = iconSizes.endIcon;
|
|
70
|
+
// Apply appropriate text color for link variant
|
|
71
|
+
var extraClasses = variant === "link" && color
|
|
72
|
+
? buttonStyles.linkColor[color]
|
|
73
|
+
: variant === "outline" && color
|
|
74
|
+
? buttonStyles.outlineColor[color]
|
|
75
|
+
: variant === "ghost" && color
|
|
76
|
+
? buttonStyles.ghostColor[color]
|
|
77
|
+
: "";
|
|
78
|
+
return (_jsxs(Comp, __assign({ "data-slot": "button", className: cn(buttonVariants({ variant: variant, color: color, size: size, shape: shape, className: className }), extraClasses) }, props, { children: [startIcon && (_jsx(LUIcon, { size: startIconSizeValue, "data-testid": "start-icon", icon: startIcon })), props.children, endIcon && (_jsx(LUIcon, { size: endIconSizeValue, "data-testid": "end-icon", icon: endIcon }))] })));
|
|
79
|
+
}
|
|
80
|
+
export { Button, buttonVariants };
|