linkedunion-design-kit 1.6.2 → 1.6.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/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/src/components/Button/index.js +3 -3
- package/dist/src/components/ToolTip/Tooltip.d.ts +3 -0
- package/dist/src/components/ToolTip/Tooltip.js +8 -0
- package/dist/src/components/ToolTip/Tooltip.stories.d.ts +5 -0
- package/dist/src/components/ToolTip/Tooltip.stories.js +38 -0
- package/dist/src/components/ToolTip/type.d.ts +5 -0
- package/dist/src/components/ToolTip/type.js +1 -0
- package/dist/src/components/Typography/Body/Body.stories.d.ts +4 -0
- package/dist/src/components/Typography/Body/Body.stories.js +46 -0
- package/dist/src/components/Typography/Body/body.d.ts +35 -0
- package/dist/src/components/Typography/Body/body.js +61 -0
- package/dist/src/components/Typography/Caption/Caption.stories.d.ts +4 -0
- package/dist/src/components/Typography/Caption/Caption.stories.js +24 -0
- package/dist/src/components/Typography/Display/Display.stories.d.ts +4 -0
- package/dist/src/components/Typography/Display/Display.stories.js +36 -0
- package/dist/src/components/Typography/Display/display.d.ts +15 -0
- package/dist/src/components/Typography/Display/display.js +48 -0
- package/dist/src/components/Typography/Heading/Heading.stories.d.ts +4 -0
- package/dist/src/components/Typography/Heading/Heading.stories.js +36 -0
- package/dist/src/components/Typography/Heading/heading.d.ts +36 -0
- package/dist/src/components/Typography/Heading/heading.js +69 -0
- package/dist/src/components/Typography/Heading.d.ts +3 -0
- package/dist/src/components/Typography/Heading.js +29 -0
- package/dist/src/components/Typography/Heading.stories.d.ts +5 -0
- package/dist/src/components/Typography/Heading.stories.js +37 -0
- package/dist/src/components/Typography/type.d.ts +3 -3
- package/dist/src/components/ui/body.d.ts +35 -0
- package/dist/src/components/ui/body.js +61 -0
- package/dist/src/components/ui/caption.d.ts +4 -0
- package/dist/src/components/ui/caption.js +29 -0
- package/dist/src/components/ui/display.d.ts +15 -0
- package/dist/src/components/ui/display.js +48 -0
- package/dist/src/components/ui/heading.d.ts +36 -0
- package/dist/src/components/ui/heading.js +69 -0
- package/dist/src/components/ui/imageUploader.js +2 -2
- package/dist/src/components/ui/switch.js +2 -2
- package/dist/styles/global.css +7 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export { Input } from "./src/components/ui/input";
|
|
|
11
11
|
export { default as EditorTooltip } from "./src/components/EditorTooltip/EditorTooltip";
|
|
12
12
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "./src/components/ui/accordion";
|
|
13
13
|
export { default as ImageUploader } from "./src/components/ui/imageUploader";
|
|
14
|
-
export { Typography } from "./src/components/ui/typography";
|
|
15
14
|
export { Checkbox } from "./src/components/ui/checkbox";
|
|
16
15
|
export { Switch } from "./src/components/ui/switch";
|
|
16
|
+
export { Typography } from "./src/components/ui/typography";
|
|
17
|
+
export { Heading } from "./src/components/Typography/Heading/heading";
|
|
18
|
+
export { Body } from "./src/components/Typography/Body/body";
|
|
19
|
+
export { Display } from "./src/components/Typography/Display/display";
|
|
20
|
+
export { Caption } from "./src/components/ui/caption";
|
|
21
|
+
export { default as Tooltip } from "./src/components/ToolTip/Tooltip";
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,11 @@ export { Input } from "./src/components/ui/input";
|
|
|
11
11
|
export { default as EditorTooltip } from "./src/components/EditorTooltip/EditorTooltip";
|
|
12
12
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "./src/components/ui/accordion";
|
|
13
13
|
export { default as ImageUploader } from "./src/components/ui/imageUploader";
|
|
14
|
-
export { Typography } from "./src/components/ui/typography";
|
|
15
14
|
export { Checkbox } from "./src/components/ui/checkbox";
|
|
16
15
|
export { Switch } from "./src/components/ui/switch";
|
|
16
|
+
export { Typography } from "./src/components/ui/typography";
|
|
17
|
+
export { Heading } from "./src/components/Typography/Heading/heading";
|
|
18
|
+
export { Body } from "./src/components/Typography/Body/body";
|
|
19
|
+
export { Display } from "./src/components/Typography/Display/display";
|
|
20
|
+
export { Caption } from "./src/components/ui/caption";
|
|
21
|
+
export { default as Tooltip } from "./src/components/ToolTip/Tooltip";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as ShadTooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip";
|
|
3
|
+
import { Body } from "../Typography/Body/body";
|
|
4
|
+
var Tooltip = function (_a) {
|
|
5
|
+
var title = _a.title, className = _a.className, children = _a.children;
|
|
6
|
+
return (_jsx(TooltipProvider, { children: _jsxs(ShadTooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: className, children: children }), _jsx(TooltipContent, { children: _jsx(Body, { variant: "body-base", className: "text-center", children: title }) })] }) }));
|
|
7
|
+
};
|
|
8
|
+
export default Tooltip;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { ToolTipInterface } from "./type";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const _ToolTip: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ToolTipInterface>;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import Tooltip from "./Tooltip";
|
|
14
|
+
import IconButton from "../Button/IconButton";
|
|
15
|
+
import LUIcon from "../Icons/LUIcon";
|
|
16
|
+
export default {
|
|
17
|
+
title: "Components/Tooltip",
|
|
18
|
+
component: Tooltip,
|
|
19
|
+
tags: ["autodocs"],
|
|
20
|
+
};
|
|
21
|
+
var Template = function (args) { return (_jsx(Tooltip, __assign({}, args))); };
|
|
22
|
+
export var _ToolTip = Template.bind({});
|
|
23
|
+
_ToolTip.args = {
|
|
24
|
+
children: (_jsx(IconButton, { icon: _jsx(LUIcon, { icon: "volume-high", size: "sm" }), shape: "rounded-full" })),
|
|
25
|
+
title: "Tooltip",
|
|
26
|
+
};
|
|
27
|
+
_ToolTip.argTypes = {
|
|
28
|
+
children: {
|
|
29
|
+
description: "React component to be wrapped",
|
|
30
|
+
control: false,
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: "string" },
|
|
33
|
+
defaultValue: {
|
|
34
|
+
summary: '<IconButton icon={<LUIcon icon="volume-high" size="sm"/>} shape="rounded-full"/>',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Dummy_Para } from "../../../utils/constants";
|
|
14
|
+
import { Body, variant } from "../../../components/Typography/Body/body";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Typography/Body",
|
|
17
|
+
component: Body,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
};
|
|
20
|
+
var Template = function (args) { return _jsx(Body, __assign({}, args)); };
|
|
21
|
+
export var _Body = Template.bind({});
|
|
22
|
+
_Body.args = {
|
|
23
|
+
children: Dummy_Para,
|
|
24
|
+
variant: "body-base",
|
|
25
|
+
as: "p",
|
|
26
|
+
};
|
|
27
|
+
_Body.argTypes = {
|
|
28
|
+
variant: {
|
|
29
|
+
control: { type: "select" },
|
|
30
|
+
options: Object.keys(variant),
|
|
31
|
+
description: "Body Variant",
|
|
32
|
+
table: {
|
|
33
|
+
defaultValue: { summary: "body-base" },
|
|
34
|
+
type: { summary: "string" },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
as: {
|
|
38
|
+
control: { type: "select" },
|
|
39
|
+
options: ["p", "span"],
|
|
40
|
+
description: "HTML tag to render",
|
|
41
|
+
table: {
|
|
42
|
+
defaultValue: { summary: "p" },
|
|
43
|
+
type: { summary: '"p" | "span"' },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const variant: {
|
|
4
|
+
"body-xl": string;
|
|
5
|
+
"body-xl-500": string;
|
|
6
|
+
"body-xl-600": string;
|
|
7
|
+
"body-xl-700": string;
|
|
8
|
+
"body-lg": string;
|
|
9
|
+
"body-lg-500": string;
|
|
10
|
+
"body-lg-600": string;
|
|
11
|
+
"body-lg-700": string;
|
|
12
|
+
"body-base": string;
|
|
13
|
+
"body-base-500": string;
|
|
14
|
+
"body-base-600": string;
|
|
15
|
+
"body-base-700": string;
|
|
16
|
+
"body-sm": string;
|
|
17
|
+
"body-sm-500": string;
|
|
18
|
+
"body-sm-600": string;
|
|
19
|
+
"body-sm-700": string;
|
|
20
|
+
"body-xs": string;
|
|
21
|
+
"body-xs-500": string;
|
|
22
|
+
"body-xs-600": string;
|
|
23
|
+
"body-xs-700": string;
|
|
24
|
+
};
|
|
25
|
+
declare const bodyVariants: (props?: ({
|
|
26
|
+
variant?: "body-base" | "body-xl" | "body-xl-500" | "body-xl-600" | "body-xl-700" | "body-lg" | "body-lg-500" | "body-lg-600" | "body-lg-700" | "body-base-500" | "body-base-600" | "body-base-700" | "body-sm" | "body-sm-500" | "body-sm-600" | "body-sm-700" | "body-xs" | "body-xs-500" | "body-xs-600" | "body-xs-700" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
type AllowedTags = "p" | "span";
|
|
29
|
+
type BodyProps<T extends AllowedTags = "p"> = {
|
|
30
|
+
as?: T;
|
|
31
|
+
className?: string;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className"> & VariantProps<typeof bodyVariants>;
|
|
34
|
+
declare function Body<T extends AllowedTags = "p">({ as, className, variant, children, ...props }: BodyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { Body, bodyVariants };
|
|
@@ -0,0 +1,61 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../../lib/utils";
|
|
26
|
+
export var variant = {
|
|
27
|
+
"body-xl": "text-xl font-normal",
|
|
28
|
+
"body-xl-500": "text-xl font-medium",
|
|
29
|
+
"body-xl-600": "text-xl font-semibold",
|
|
30
|
+
"body-xl-700": "text-xl font-bold",
|
|
31
|
+
"body-lg": "text-lg font-normal",
|
|
32
|
+
"body-lg-500": "text-lg font-medium",
|
|
33
|
+
"body-lg-600": "text-lg font-semibold",
|
|
34
|
+
"body-lg-700": "text-lg font-bold",
|
|
35
|
+
"body-base": "text-base font-normal",
|
|
36
|
+
"body-base-500": "text-base font-medium",
|
|
37
|
+
"body-base-600": "text-base font-semibold",
|
|
38
|
+
"body-base-700": "text-base font-bold",
|
|
39
|
+
"body-sm": "text-sm font-normal",
|
|
40
|
+
"body-sm-500": "text-sm font-medium",
|
|
41
|
+
"body-sm-600": "text-sm font-semibold",
|
|
42
|
+
"body-sm-700": "text-sm font-bold",
|
|
43
|
+
"body-xs": "text-xs font-normal",
|
|
44
|
+
"body-xs-500": "text-xs font-medium",
|
|
45
|
+
"body-xs-600": "text-xs font-semibold",
|
|
46
|
+
"body-xs-700": "text-xs font-bold",
|
|
47
|
+
};
|
|
48
|
+
var bodyVariants = cva("!leading-normal m-0", {
|
|
49
|
+
variants: {
|
|
50
|
+
variant: variant,
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
variant: "body-base",
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
function Body(_a) {
|
|
57
|
+
var as = _a.as, className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["as", "className", "variant", "children"]);
|
|
58
|
+
var Tag = as || "p";
|
|
59
|
+
return (_jsx(Tag, __assign({ className: cn(bodyVariants({ variant: variant }), className) }, props, { children: children })));
|
|
60
|
+
}
|
|
61
|
+
export { Body, bodyVariants };
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Dummy_Para } from "../../../utils/constants";
|
|
14
|
+
import { Caption } from "../../../components/ui/caption";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Typography/Caption",
|
|
17
|
+
component: Caption,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
};
|
|
20
|
+
var Template = function (args) { return _jsx(Caption, __assign({}, args)); };
|
|
21
|
+
export var _Caption = Template.bind({});
|
|
22
|
+
_Caption.args = {
|
|
23
|
+
children: Dummy_Para,
|
|
24
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Dummy_Para } from "../../../utils/constants";
|
|
14
|
+
import { Display, variant } from "../../../components/Typography/Display/display";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Typography/Display",
|
|
17
|
+
component: Display,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
};
|
|
20
|
+
var Template = function (args) { return _jsx(Display, __assign({}, args)); };
|
|
21
|
+
export var _Display = Template.bind({});
|
|
22
|
+
_Display.args = {
|
|
23
|
+
children: Dummy_Para,
|
|
24
|
+
variant: "display-md",
|
|
25
|
+
};
|
|
26
|
+
_Display.argTypes = {
|
|
27
|
+
variant: {
|
|
28
|
+
control: { type: "select" },
|
|
29
|
+
options: Object.keys(variant),
|
|
30
|
+
description: "Display Variant",
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: "display-md" },
|
|
33
|
+
type: { summary: "string" },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const variant: {
|
|
4
|
+
"display-lg": string;
|
|
5
|
+
"display-md": string;
|
|
6
|
+
"display-sm": string;
|
|
7
|
+
};
|
|
8
|
+
declare const displayVariants: (props?: ({
|
|
9
|
+
variant?: "display-md" | "display-lg" | "display-sm" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
type DisplayProps = React.HTMLProps<HTMLDivElement> & VariantProps<typeof displayVariants> & {
|
|
12
|
+
variant?: keyof typeof variant;
|
|
13
|
+
};
|
|
14
|
+
declare function Display({ className, variant, children, ...props }: DisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Display, displayVariants };
|
|
@@ -0,0 +1,48 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../../lib/utils";
|
|
26
|
+
export var variant = {
|
|
27
|
+
"display-lg": "text-7xl font-bold",
|
|
28
|
+
"display-md": "text-6xl font-bold",
|
|
29
|
+
"display-sm": "text-5xl font-bold",
|
|
30
|
+
};
|
|
31
|
+
var displayVariants = cva("!leading-normal", // Default base class
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
variant: variant,
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "display-md",
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
function Display(_a) {
|
|
41
|
+
var className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["className", "variant", "children"]);
|
|
42
|
+
var Tag = "div";
|
|
43
|
+
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("display")) {
|
|
44
|
+
Tag = "div";
|
|
45
|
+
}
|
|
46
|
+
return (_jsx(Tag, __assign({ className: cn(displayVariants({ variant: variant, className: className })) }, props, { children: children })));
|
|
47
|
+
}
|
|
48
|
+
export { Display, displayVariants };
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Dummy_Para } from "../../../utils/constants";
|
|
14
|
+
import { Heading, variant } from "./heading";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Typography/Heading",
|
|
17
|
+
component: Heading,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
};
|
|
20
|
+
var Template = function (args) { return _jsx(Heading, __assign({}, args)); };
|
|
21
|
+
export var _Heading = Template.bind({});
|
|
22
|
+
_Heading.args = {
|
|
23
|
+
children: Dummy_Para,
|
|
24
|
+
variant: "h2",
|
|
25
|
+
};
|
|
26
|
+
_Heading.argTypes = {
|
|
27
|
+
variant: {
|
|
28
|
+
control: { type: "select" },
|
|
29
|
+
options: Object.keys(variant),
|
|
30
|
+
description: "Heading Variant",
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: "h2" },
|
|
33
|
+
type: { summary: "string" },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const variant: {
|
|
4
|
+
h1: string;
|
|
5
|
+
"h1-500": string;
|
|
6
|
+
"h1-600": string;
|
|
7
|
+
"h1-700": string;
|
|
8
|
+
h2: string;
|
|
9
|
+
"h2-500": string;
|
|
10
|
+
"h2-600": string;
|
|
11
|
+
"h2-700": string;
|
|
12
|
+
h3: string;
|
|
13
|
+
"h3-500": string;
|
|
14
|
+
"h3-600": string;
|
|
15
|
+
"h3-700": string;
|
|
16
|
+
h4: string;
|
|
17
|
+
"h4-500": string;
|
|
18
|
+
"h4-600": string;
|
|
19
|
+
"h4-700": string;
|
|
20
|
+
h5: string;
|
|
21
|
+
"h5-500": string;
|
|
22
|
+
"h5-600": string;
|
|
23
|
+
"h5-700": string;
|
|
24
|
+
h6: string;
|
|
25
|
+
"h6-500": string;
|
|
26
|
+
"h6-600": string;
|
|
27
|
+
"h6-700": string;
|
|
28
|
+
};
|
|
29
|
+
declare const headingVariants: (props?: ({
|
|
30
|
+
variant?: "h2" | "h1" | "h3" | "h4" | "h5" | "h6" | "h1-500" | "h1-600" | "h1-700" | "h2-500" | "h2-600" | "h2-700" | "h3-500" | "h3-600" | "h3-700" | "h4-500" | "h4-600" | "h4-700" | "h5-500" | "h5-600" | "h5-700" | "h6-500" | "h6-600" | "h6-700" | null | undefined;
|
|
31
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
32
|
+
type HeadingProps = React.HTMLProps<HTMLElement> & VariantProps<typeof headingVariants> & {
|
|
33
|
+
variant?: keyof typeof variant;
|
|
34
|
+
};
|
|
35
|
+
declare function Heading({ className, variant, children, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export { Heading, headingVariants };
|
|
@@ -0,0 +1,69 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../../lib/utils";
|
|
26
|
+
export var variant = {
|
|
27
|
+
h1: "text-5xl font-normal",
|
|
28
|
+
"h1-500": "text-5xl font-medium",
|
|
29
|
+
"h1-600": "text-5xl font-semibold",
|
|
30
|
+
"h1-700": "text-5xl font-bold",
|
|
31
|
+
h2: "text-4xl font-normal",
|
|
32
|
+
"h2-500": "text-4xl font-medium",
|
|
33
|
+
"h2-600": "text-4xl font-semibold",
|
|
34
|
+
"h2-700": "text-4xl font-bold",
|
|
35
|
+
h3: "text-3xl font-normal",
|
|
36
|
+
"h3-500": "text-3xl font-medium",
|
|
37
|
+
"h3-600": "text-3xl font-semibold",
|
|
38
|
+
"h3-700": "text-3xl font-bold",
|
|
39
|
+
h4: "text-2xl font-normal",
|
|
40
|
+
"h4-500": "text-2xl font-medium",
|
|
41
|
+
"h4-600": "text-2xl font-semibold",
|
|
42
|
+
"h4-700": "text-2xl font-bold",
|
|
43
|
+
h5: "text-xl font-normal",
|
|
44
|
+
"h5-500": "text-xl font-medium",
|
|
45
|
+
"h5-600": "text-xl font-semibold",
|
|
46
|
+
"h5-700": "text-xl font-bold",
|
|
47
|
+
h6: "text-lg font-normal",
|
|
48
|
+
"h6-500": "text-lg font-medium",
|
|
49
|
+
"h6-600": "text-lg font-semibold",
|
|
50
|
+
"h6-700": "text-lg font-bold",
|
|
51
|
+
};
|
|
52
|
+
var headingVariants = cva("!leading-normal", // Default base class
|
|
53
|
+
{
|
|
54
|
+
variants: {
|
|
55
|
+
variant: variant,
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
variant: "h2",
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
function Heading(_a) {
|
|
62
|
+
var className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["className", "variant", "children"]);
|
|
63
|
+
var Tag = "span";
|
|
64
|
+
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("h")) {
|
|
65
|
+
Tag = variant.split("-")[0];
|
|
66
|
+
}
|
|
67
|
+
return (_jsx(Tag, __assign({ className: cn(headingVariants({ variant: variant, className: className })) }, props, { children: children })));
|
|
68
|
+
}
|
|
69
|
+
export { Heading, headingVariants };
|
|
@@ -0,0 +1,29 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { Heading as ShadHeading } from "../ui/heading";
|
|
25
|
+
var Heading = function (_a) {
|
|
26
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
27
|
+
return (_jsx(ShadHeading, __assign({ className: className }, props, { children: children })));
|
|
28
|
+
};
|
|
29
|
+
export default Heading;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { HeadingInterface } from "./type";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const _Heading: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, HeadingInterface>;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Dummy_Para } from "../../utils/constants";
|
|
14
|
+
import Heading from "./Heading";
|
|
15
|
+
import { variant } from "../ui/heading";
|
|
16
|
+
export default {
|
|
17
|
+
title: "Components/Typography/Heading",
|
|
18
|
+
component: Heading,
|
|
19
|
+
tags: ["autodocs"],
|
|
20
|
+
};
|
|
21
|
+
var Template = function (args) { return (_jsx(Heading, __assign({}, args))); };
|
|
22
|
+
export var _Heading = Template.bind({});
|
|
23
|
+
_Heading.args = {
|
|
24
|
+
children: Dummy_Para,
|
|
25
|
+
variant: "h6-700",
|
|
26
|
+
};
|
|
27
|
+
_Heading.argTypes = {
|
|
28
|
+
variant: {
|
|
29
|
+
control: { type: "select" },
|
|
30
|
+
options: Object.keys(variant),
|
|
31
|
+
description: "Heading Variant",
|
|
32
|
+
table: {
|
|
33
|
+
defaultValue: { summary: "h6-700" },
|
|
34
|
+
type: { summary: "string" },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from "class-variance-authority";
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { headingVariants } from "../ui/heading";
|
|
3
|
+
export interface HeadingInterface {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
-
variant?: Exclude<VariantProps<typeof
|
|
6
|
+
variant?: Exclude<VariantProps<typeof headingVariants>["variant"], null>;
|
|
7
7
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const variant: {
|
|
4
|
+
"body-xl": string;
|
|
5
|
+
"body-xl-500": string;
|
|
6
|
+
"body-xl-600": string;
|
|
7
|
+
"body-xl-700": string;
|
|
8
|
+
"body-lg": string;
|
|
9
|
+
"body-lg-500": string;
|
|
10
|
+
"body-lg-600": string;
|
|
11
|
+
"body-lg-700": string;
|
|
12
|
+
"body-base": string;
|
|
13
|
+
"body-base-500": string;
|
|
14
|
+
"body-base-600": string;
|
|
15
|
+
"body-base-700": string;
|
|
16
|
+
"body-sm": string;
|
|
17
|
+
"body-sm-500": string;
|
|
18
|
+
"body-sm-600": string;
|
|
19
|
+
"body-sm-700": string;
|
|
20
|
+
"body-xs": string;
|
|
21
|
+
"body-xs-500": string;
|
|
22
|
+
"body-xs-600": string;
|
|
23
|
+
"body-xs-700": string;
|
|
24
|
+
};
|
|
25
|
+
declare const bodyVariants: (props?: ({
|
|
26
|
+
variant?: "body-base" | "body-xl" | "body-xl-500" | "body-xl-600" | "body-xl-700" | "body-lg" | "body-lg-500" | "body-lg-600" | "body-lg-700" | "body-base-500" | "body-base-600" | "body-base-700" | "body-sm" | "body-sm-500" | "body-sm-600" | "body-sm-700" | "body-xs" | "body-xs-500" | "body-xs-600" | "body-xs-700" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
type AllowedTags = "p" | "span";
|
|
29
|
+
type BodyProps<T extends AllowedTags = "p"> = {
|
|
30
|
+
as?: T;
|
|
31
|
+
className?: string;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, "as" | "className"> & VariantProps<typeof bodyVariants>;
|
|
34
|
+
declare function Body<T extends AllowedTags = "p">({ as, className, variant, children, ...props }: BodyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export { Body, bodyVariants };
|
|
@@ -0,0 +1,61 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../lib/utils";
|
|
26
|
+
export var variant = {
|
|
27
|
+
"body-xl": "text-xl font-normal",
|
|
28
|
+
"body-xl-500": "text-xl font-medium",
|
|
29
|
+
"body-xl-600": "text-xl font-semibold",
|
|
30
|
+
"body-xl-700": "text-xl font-bold",
|
|
31
|
+
"body-lg": "text-lg font-normal",
|
|
32
|
+
"body-lg-500": "text-lg font-medium",
|
|
33
|
+
"body-lg-600": "text-lg font-semibold",
|
|
34
|
+
"body-lg-700": "text-lg font-bold",
|
|
35
|
+
"body-base": "text-base font-normal",
|
|
36
|
+
"body-base-500": "text-base font-medium",
|
|
37
|
+
"body-base-600": "text-base font-semibold",
|
|
38
|
+
"body-base-700": "text-base font-bold",
|
|
39
|
+
"body-sm": "text-sm font-normal",
|
|
40
|
+
"body-sm-500": "text-sm font-medium",
|
|
41
|
+
"body-sm-600": "text-sm font-semibold",
|
|
42
|
+
"body-sm-700": "text-sm font-bold",
|
|
43
|
+
"body-xs": "text-xs font-normal",
|
|
44
|
+
"body-xs-500": "text-xs font-medium",
|
|
45
|
+
"body-xs-600": "text-xs font-semibold",
|
|
46
|
+
"body-xs-700": "text-xs font-bold",
|
|
47
|
+
};
|
|
48
|
+
var bodyVariants = cva("!leading-normal m-0", {
|
|
49
|
+
variants: {
|
|
50
|
+
variant: variant,
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
variant: "body-base",
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
function Body(_a) {
|
|
57
|
+
var as = _a.as, className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["as", "className", "variant", "children"]);
|
|
58
|
+
var Tag = as || "p";
|
|
59
|
+
return (_jsx(Tag, __assign({ className: cn(bodyVariants({ variant: variant }), className) }, props, { children: children })));
|
|
60
|
+
}
|
|
61
|
+
export { Body, bodyVariants };
|
|
@@ -0,0 +1,29 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cn } from "../../lib/utils";
|
|
25
|
+
function Caption(_a) {
|
|
26
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
27
|
+
return (_jsx("caption", __assign({ className: cn("text-xs font-normal leading-normal inline", className) }, props, { children: children })));
|
|
28
|
+
}
|
|
29
|
+
export { Caption };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const variant: {
|
|
4
|
+
"display-lg": string;
|
|
5
|
+
"display-md": string;
|
|
6
|
+
"display-sm": string;
|
|
7
|
+
};
|
|
8
|
+
declare const displayVariants: (props?: ({
|
|
9
|
+
variant?: "display-md" | "display-lg" | "display-sm" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
type DisplayProps = React.HTMLProps<HTMLDivElement> & VariantProps<typeof displayVariants> & {
|
|
12
|
+
variant?: keyof typeof variant;
|
|
13
|
+
};
|
|
14
|
+
declare function Display({ className, variant, children, ...props }: DisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Display, displayVariants };
|
|
@@ -0,0 +1,48 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../lib/utils";
|
|
26
|
+
export var variant = {
|
|
27
|
+
"display-lg": "text-7xl font-bold",
|
|
28
|
+
"display-md": "text-6xl font-bold",
|
|
29
|
+
"display-sm": "text-5xl font-bold",
|
|
30
|
+
};
|
|
31
|
+
var displayVariants = cva("!leading-normal", // Default base class
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
variant: variant,
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "display-md",
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
function Display(_a) {
|
|
41
|
+
var className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["className", "variant", "children"]);
|
|
42
|
+
var Tag = "div";
|
|
43
|
+
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("display")) {
|
|
44
|
+
Tag = "div";
|
|
45
|
+
}
|
|
46
|
+
return (_jsx(Tag, __assign({ className: cn(displayVariants({ variant: variant, className: className })) }, props, { children: children })));
|
|
47
|
+
}
|
|
48
|
+
export { Display, displayVariants };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
export declare const variant: {
|
|
4
|
+
h1: string;
|
|
5
|
+
"h1-500": string;
|
|
6
|
+
"h1-600": string;
|
|
7
|
+
"h1-700": string;
|
|
8
|
+
h2: string;
|
|
9
|
+
"h2-500": string;
|
|
10
|
+
"h2-600": string;
|
|
11
|
+
"h2-700": string;
|
|
12
|
+
h3: string;
|
|
13
|
+
"h3-500": string;
|
|
14
|
+
"h3-600": string;
|
|
15
|
+
"h3-700": string;
|
|
16
|
+
h4: string;
|
|
17
|
+
"h4-500": string;
|
|
18
|
+
"h4-600": string;
|
|
19
|
+
"h4-700": string;
|
|
20
|
+
h5: string;
|
|
21
|
+
"h5-500": string;
|
|
22
|
+
"h5-600": string;
|
|
23
|
+
"h5-700": string;
|
|
24
|
+
h6: string;
|
|
25
|
+
"h6-500": string;
|
|
26
|
+
"h6-600": string;
|
|
27
|
+
"h6-700": string;
|
|
28
|
+
};
|
|
29
|
+
declare const headingVariants: (props?: ({
|
|
30
|
+
variant?: "h2" | "h1" | "h3" | "h4" | "h5" | "h6" | "h1-500" | "h1-600" | "h1-700" | "h2-500" | "h2-600" | "h2-700" | "h3-500" | "h3-600" | "h3-700" | "h4-500" | "h4-600" | "h4-700" | "h5-500" | "h5-600" | "h5-700" | "h6-500" | "h6-600" | "h6-700" | null | undefined;
|
|
31
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
32
|
+
type HeadingProps = React.HTMLProps<HTMLElement> & VariantProps<typeof headingVariants> & {
|
|
33
|
+
variant?: keyof typeof variant;
|
|
34
|
+
};
|
|
35
|
+
declare function Heading({ className, variant, children, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export { Heading, headingVariants };
|
|
@@ -0,0 +1,69 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import { cva } from "class-variance-authority";
|
|
25
|
+
import { cn } from "../../lib/utils";
|
|
26
|
+
export var variant = {
|
|
27
|
+
h1: "text-5xl font-normal",
|
|
28
|
+
"h1-500": "text-5xl font-medium",
|
|
29
|
+
"h1-600": "text-5xl font-semibold",
|
|
30
|
+
"h1-700": "text-5xl font-bold",
|
|
31
|
+
h2: "text-4xl font-normal",
|
|
32
|
+
"h2-500": "text-4xl font-medium",
|
|
33
|
+
"h2-600": "text-4xl font-semibold",
|
|
34
|
+
"h2-700": "text-4xl font-bold",
|
|
35
|
+
h3: "text-3xl font-normal",
|
|
36
|
+
"h3-500": "text-3xl font-medium",
|
|
37
|
+
"h3-600": "text-3xl font-semibold",
|
|
38
|
+
"h3-700": "text-3xl font-bold",
|
|
39
|
+
h4: "text-2xl font-normal",
|
|
40
|
+
"h4-500": "text-2xl font-medium",
|
|
41
|
+
"h4-600": "text-2xl font-semibold",
|
|
42
|
+
"h4-700": "text-2xl font-bold",
|
|
43
|
+
h5: "text-xl font-normal",
|
|
44
|
+
"h5-500": "text-xl font-medium",
|
|
45
|
+
"h5-600": "text-xl font-semibold",
|
|
46
|
+
"h5-700": "text-xl font-bold",
|
|
47
|
+
h6: "text-lg font-normal",
|
|
48
|
+
"h6-500": "text-lg font-medium",
|
|
49
|
+
"h6-600": "text-lg font-semibold",
|
|
50
|
+
"h6-700": "text-lg font-bold",
|
|
51
|
+
};
|
|
52
|
+
var headingVariants = cva("!leading-normal", // Default base class
|
|
53
|
+
{
|
|
54
|
+
variants: {
|
|
55
|
+
variant: variant,
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
variant: "h2",
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
function Heading(_a) {
|
|
62
|
+
var className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["className", "variant", "children"]);
|
|
63
|
+
var Tag = "span";
|
|
64
|
+
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("h")) {
|
|
65
|
+
Tag = variant.split("-")[0];
|
|
66
|
+
}
|
|
67
|
+
return (_jsx(Tag, __assign({ className: cn(headingVariants({ variant: variant, className: className })) }, props, { children: children })));
|
|
68
|
+
}
|
|
69
|
+
export { Heading, headingVariants };
|
|
@@ -16,8 +16,8 @@ import { useDropzone } from "react-dropzone";
|
|
|
16
16
|
import { Button } from "../../components/ui/button";
|
|
17
17
|
import { cn } from "../../lib/utils";
|
|
18
18
|
import LUIcon from "../Icons/LUIcon";
|
|
19
|
-
import Typography from "../Typography/Typography";
|
|
20
19
|
import LuImage from "../Images/LuImage";
|
|
20
|
+
import { Body } from "../Typography/Body/body";
|
|
21
21
|
var ImageUploader = function (_a) {
|
|
22
22
|
var value = _a.value, onChange = _a.onChange, required = _a.required, className = _a.className, _b = _a.maxFileSizeMB, maxFileSizeMB = _b === void 0 ? 6 : _b, _c = _a.acceptedTypes, acceptedTypes = _c === void 0 ? ["image/png", "image/jpeg", "image/jpg", "image/svg+xml"] : _c;
|
|
23
23
|
var _d = useState(null), preview = _d[0], setPreview = _d[1];
|
|
@@ -63,6 +63,6 @@ var ImageUploader = function (_a) {
|
|
|
63
63
|
"image/*": acceptedTypes,
|
|
64
64
|
},
|
|
65
65
|
}), getRootProps = _f.getRootProps, getInputProps = _f.getInputProps;
|
|
66
|
-
return (_jsxs("div", { className: cn("flex flex-col items-center", className), children: [_jsx("div", __assign({}, getRootProps(), { className: cn("!border !border-dashed !border-gray-300 !rounded-lg cursor-pointer w-64 !p-2"), children: _jsxs("div", { className: "min-h-40 flex items-center justify-center bg-gray-100 !rounded-lg", children: [_jsx("input", __assign({}, getInputProps())), preview ? (_jsx("div", { className: "relative w-full h-40 !mx-auto overflow-hidden", children: _jsx(LuImage, { src: preview, alt: "Uploaded", className: "aspect-square object-contain", fill: true }) })) : (_jsxs("div", { className: "text-center text-sm text-muted-foreground", children: [_jsx(LUIcon, { icon: "upload", size: "lg", className: "!mx-auto !mb-4" }), _jsx(
|
|
66
|
+
return (_jsxs("div", { className: cn("flex flex-col items-center", className), children: [_jsx("div", __assign({}, getRootProps(), { className: cn("!border !border-dashed !border-gray-300 !rounded-lg cursor-pointer w-64 !p-2"), children: _jsxs("div", { className: "min-h-40 flex items-center justify-center bg-gray-100 !rounded-lg", children: [_jsx("input", __assign({}, getInputProps())), preview ? (_jsx("div", { className: "relative w-full h-40 !mx-auto overflow-hidden", children: _jsx(LuImage, { src: preview, alt: "Uploaded", className: "aspect-square object-contain", fill: true }) })) : (_jsxs("div", { className: "text-center text-sm text-muted-foreground", children: [_jsx(LUIcon, { icon: "upload", size: "lg", className: "!mx-auto !mb-4" }), _jsx(Body, { variant: "body-xs-600", className: "!px-1", children: "Choose a file or drag & drop it here" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "JPEG, PNG, and SVG formats" })] }))] }) })), fileError && (_jsx("p", { className: "text-sm text-red-500 text-center mt-2", children: fileError })), required && !preview && !fileError && (_jsx("p", { className: "text-sm text-red-500 text-center", children: "Image is required." })), preview && (_jsx(Button, { variant: "link", onClick: removeFile, className: "!mt-2 text-sm text-gray-700", children: "Remove Image" }))] }));
|
|
67
67
|
};
|
|
68
68
|
export default ImageUploader;
|
|
@@ -30,8 +30,8 @@ export var size = {
|
|
|
30
30
|
lg: "h-6 w-14",
|
|
31
31
|
};
|
|
32
32
|
export var variant = {
|
|
33
|
-
default: "data-[state=checked]:bg-blue-
|
|
34
|
-
primary: "data-[state=checked]:bg-blue-
|
|
33
|
+
default: "data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 focus-visible:ring-ring/50 focus-visible:border-ring",
|
|
34
|
+
primary: "data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 focus-visible:ring-ring/50 focus-visible:border-ring",
|
|
35
35
|
success: "data-[state=checked]:bg-green-500 data-[state=unchecked]:bg-input focus-visible:ring-green-500",
|
|
36
36
|
danger: "data-[state=checked]:bg-red-500 data-[state=unchecked]:bg-input focus-visible:ring-red-500",
|
|
37
37
|
};
|
package/dist/styles/global.css
CHANGED
|
@@ -311,6 +311,9 @@
|
|
|
311
311
|
.grid {
|
|
312
312
|
display: grid;
|
|
313
313
|
}
|
|
314
|
+
.inline {
|
|
315
|
+
display: inline;
|
|
316
|
+
}
|
|
314
317
|
.inline-block {
|
|
315
318
|
display: inline-block;
|
|
316
319
|
}
|
|
@@ -1059,9 +1062,6 @@
|
|
|
1059
1062
|
.\!p-5 {
|
|
1060
1063
|
padding: calc(var(--spacing) * 5) !important;
|
|
1061
1064
|
}
|
|
1062
|
-
.p-2 {
|
|
1063
|
-
padding: calc(var(--spacing) * 2);
|
|
1064
|
-
}
|
|
1065
1065
|
.p-4 {
|
|
1066
1066
|
padding: calc(var(--spacing) * 4);
|
|
1067
1067
|
}
|
|
@@ -1222,6 +1222,10 @@
|
|
|
1222
1222
|
--tw-leading: 1;
|
|
1223
1223
|
line-height: 1;
|
|
1224
1224
|
}
|
|
1225
|
+
.leading-normal {
|
|
1226
|
+
--tw-leading: var(--leading-normal);
|
|
1227
|
+
line-height: var(--leading-normal);
|
|
1228
|
+
}
|
|
1225
1229
|
.\!font-medium {
|
|
1226
1230
|
--tw-font-weight: var(--font-weight-medium) !important;
|
|
1227
1231
|
font-weight: var(--font-weight-medium) !important;
|
|
@@ -3135,11 +3139,6 @@
|
|
|
3135
3139
|
border-color: #276ab3;
|
|
3136
3140
|
}
|
|
3137
3141
|
}
|
|
3138
|
-
.data-\[state\=checked\]\:bg-blue-500 {
|
|
3139
|
-
&[data-state="checked"] {
|
|
3140
|
-
background-color: #3a84d4;
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
3142
|
.data-\[state\=checked\]\:bg-blue-600 {
|
|
3144
3143
|
&[data-state="checked"] {
|
|
3145
3144
|
background-color: #276ab3;
|