linkedunion-design-kit 1.6.4 → 1.6.6
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/package.json +1 -1
- package/dist/src/components/Button/index.d.ts +0 -32
- package/dist/src/components/Button/index.js +0 -32
- package/dist/src/components/Button/type.d.ts +0 -0
- package/dist/src/components/Button/type.js +0 -25
- package/dist/src/components/Input/Input.d.ts +0 -3
- package/dist/src/components/Input/Input.js +0 -29
- package/dist/src/components/Label/type.d.ts +0 -9
- package/dist/src/components/Label/type.js +0 -1
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.d.ts +0 -3
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.js +0 -13
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.stories.d.ts +0 -5
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.stories.js +0 -33
- package/dist/src/components/Switch/Switch.d.ts +0 -3
- package/dist/src/components/Switch/Switch.js +0 -7
- package/dist/src/components/Switch/type.d.ts +0 -5
- package/dist/src/components/Switch/type.js +0 -1
- package/dist/src/components/Typography/Heading.d.ts +0 -3
- package/dist/src/components/Typography/Heading.js +0 -29
- package/dist/src/components/Typography/Heading.stories.d.ts +0 -5
- package/dist/src/components/Typography/Heading.stories.js +0 -37
- package/dist/src/components/Typography/Typography.d.ts +0 -3
- package/dist/src/components/Typography/Typography.js +0 -29
- package/dist/src/components/Typography/Typography.stories.d.ts +0 -5
- package/dist/src/components/Typography/Typography.stories.js +0 -37
- package/dist/src/components/Typography/type.d.ts +0 -7
- package/dist/src/components/Typography/type.js +0 -1
- package/dist/src/components/ui/body.d.ts +0 -0
- package/dist/src/components/ui/body.js +0 -1
- package/dist/src/components/ui/button.d.ts +0 -10
- package/dist/src/components/ui/button.js +0 -54
- package/dist/src/components/ui/display.d.ts +0 -15
- package/dist/src/components/ui/display.js +0 -48
- package/dist/src/components/ui/heading.d.ts +0 -36
- package/dist/src/components/ui/heading.js +0 -69
- package/dist/src/components/ui/imageUploader.d.ts +0 -3
- package/dist/src/components/ui/imageUploader.js +0 -68
- package/dist/src/components/ui/label.d.ts +0 -12
- package/dist/src/components/ui/label.js +0 -41
package/package.json
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare const buttonColors: {
|
|
2
|
-
primary: string;
|
|
3
|
-
"primary-light": string;
|
|
4
|
-
success: string;
|
|
5
|
-
warning: string;
|
|
6
|
-
danger: string;
|
|
7
|
-
info: string;
|
|
8
|
-
gray: string;
|
|
9
|
-
"primary-outline": string;
|
|
10
|
-
"success-outline": string;
|
|
11
|
-
"warning-outline": string;
|
|
12
|
-
"danger-outline": string;
|
|
13
|
-
"info-outline": string;
|
|
14
|
-
"gray-outline": string;
|
|
15
|
-
};
|
|
16
|
-
export declare const buttonShapes: {
|
|
17
|
-
"rounded-sm": string;
|
|
18
|
-
"rounded-full": string;
|
|
19
|
-
};
|
|
20
|
-
export declare const buttonSizes: {
|
|
21
|
-
sm: string;
|
|
22
|
-
md: string;
|
|
23
|
-
lg: string;
|
|
24
|
-
xl: string;
|
|
25
|
-
};
|
|
26
|
-
export declare const iconButtonSize: {
|
|
27
|
-
xs: string;
|
|
28
|
-
sm: string;
|
|
29
|
-
md: string;
|
|
30
|
-
lg: string;
|
|
31
|
-
xl: string;
|
|
32
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export var buttonColors = {
|
|
2
|
-
primary: "text-blue-50 bg-blue-600 hover:bg-blue-700 focus:bg-blue-600 active:bg-blue-800",
|
|
3
|
-
"primary-light": "text-blue-600 bg-blue-100 hover:bg-blue-600 hover:text-blue-100",
|
|
4
|
-
success: "text-green-50 bg-green-600 hover:bg-green-700 focus:bg-green-600 active:bg-green-800",
|
|
5
|
-
warning: "text-yellow-950 bg-yellow-500 hover:bg-yellow-600 focus:bg-yellow-500 active:bg-yellow-700",
|
|
6
|
-
danger: "text-red-50 bg-red-600 hover:bg-red-700 focus:bg-red-600 active:bg-red-800",
|
|
7
|
-
info: "text-indigo-50 bg-indigo-600 hover:bg-indigo-700 focus:bg-indigo-600 active:bg-indigo-800",
|
|
8
|
-
gray: "text-gray-950 bg-gray-50 hover:bg-gray-100 focus:bg-gray-50 active:bg-gray-300",
|
|
9
|
-
"primary-outline": "text-blue-600 border-2 border-blue-600 bg-white hover:border-blue-700 hover:text-blue-700 focus:border-blue-600 focus:text-blue-600 active:border-blue-800 active:text-blue-800",
|
|
10
|
-
"success-outline": "text-green-600 border-2 border-green-600 bg-white hover:border-green-700 hover:text-green-700 focus:border-green-600 focus:text-green-600 active:border-green-800 active:text-green-800",
|
|
11
|
-
"warning-outline": "text-yellow-500 border-2 border-yellow-500 hover:border-yellow-600 hover:text-yellow-600 focus:border-yellow-500 focus:text-yellow-500 active:border-yellow-700 active:text-yellow-700",
|
|
12
|
-
"danger-outline": "text-red-600 border-2 border-red-600 bg-white hover:border-red-700 hover:text-red-700 focus:border-red-600 focus:text-red-600 active:border-red-800 active:text-red-800",
|
|
13
|
-
"info-outline": "text-indigo-600 border-2 border-indigo-600 bg-white hover:border-indigo-700 hover:text-indigo-700 focus:border-indigo-600 focus:text-indigo-600 active:border-indigo-800 active:text-indigo-800",
|
|
14
|
-
"gray-outline": "text-gray-50 border-2 border-gray-50 bg-white hover:border-gray-100 hover:text-gray-100 focus:border-gray-50 focus:text-gray-50 active:border-gray-300 active:text-gray-300",
|
|
15
|
-
};
|
|
16
|
-
export var buttonShapes = {
|
|
17
|
-
"rounded-sm": "!rounded-sm",
|
|
18
|
-
"rounded-full": "!rounded-full",
|
|
19
|
-
};
|
|
20
|
-
export var buttonSizes = {
|
|
21
|
-
sm: "!py-2 !px-3 text-sm font-normal leading-5",
|
|
22
|
-
md: "!py-2.5 !px-5 text-sm font-normal leading-5",
|
|
23
|
-
lg: "!py-3 !px-5 text-base font-normal leading-normal",
|
|
24
|
-
xl: "!py-3.5 !px-6 text-base font-normal leading-normal",
|
|
25
|
-
};
|
|
26
|
-
export var iconButtonSize = {
|
|
27
|
-
xs: "!p-1",
|
|
28
|
-
sm: "!p-2",
|
|
29
|
-
md: "!p-2",
|
|
30
|
-
lg: "!p-3",
|
|
31
|
-
xl: "!p-5",
|
|
32
|
-
};
|
|
File without changes
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import React from "react";
|
|
3
|
-
// import { buttonShapes, buttonSizes, buttonColors, iconButtonSize } from ".";
|
|
4
|
-
// type colors = keyof typeof buttonColors;
|
|
5
|
-
// type buttonShapes = keyof typeof buttonShapes;
|
|
6
|
-
// type buttonSizes = keyof typeof buttonSizes;
|
|
7
|
-
// type iconButtonSize = keyof typeof iconButtonSize;
|
|
8
|
-
// export interface ButtonProps
|
|
9
|
-
// extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
10
|
-
// color?: colors;
|
|
11
|
-
// size?: buttonSizes;
|
|
12
|
-
// startIcon?: string;
|
|
13
|
-
// endIcon?: string;
|
|
14
|
-
// shape?: buttonShapes;
|
|
15
|
-
// variant?: "default" | "link";
|
|
16
|
-
// className?: string;
|
|
17
|
-
// children: React.ReactNode;
|
|
18
|
-
// }
|
|
19
|
-
// export interface IconButtonProps
|
|
20
|
-
// extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
21
|
-
// color?: colors;
|
|
22
|
-
// size?: iconButtonSize;
|
|
23
|
-
// shape?: buttonShapes;
|
|
24
|
-
// icon: React.ReactNode;
|
|
25
|
-
// }
|
|
@@ -1,29 +0,0 @@
|
|
|
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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
-
import { Input as ShadInput } from "../../components/ui/input";
|
|
25
|
-
var Input = function (_a) {
|
|
26
|
-
var _b = _a.type, type = _b === void 0 ? "text" : _b, _c = _a.placeholder, placeholder = _c === void 0 ? "Type Placeholder here" : _c, className = _a.className, props = __rest(_a, ["type", "placeholder", "className"]);
|
|
27
|
-
return (_jsx(_Fragment, { children: _jsx(ShadInput, __assign({ type: type, placeholder: placeholder, className: className }, props)) }));
|
|
28
|
-
};
|
|
29
|
-
export default Input;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "class-variance-authority";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { labelVariants } from "../ui/label";
|
|
4
|
-
export interface LabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
|
5
|
-
htmlFor?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
variant?: VariantProps<typeof labelVariants>["variant"];
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Button from "../../../components/Button/Button";
|
|
3
|
-
import LUIcon from "../../../components/Icons/LUIcon";
|
|
4
|
-
import LuImage from "../../../components/Images/LuImage";
|
|
5
|
-
import Typography from "../../../components/Typography/Typography";
|
|
6
|
-
import Link from "next/link";
|
|
7
|
-
import { getCardImageSrc } from "..";
|
|
8
|
-
var VerticalCard = function (_a) {
|
|
9
|
-
var item = _a.item, footer_logo = _a.footer_logo, _b = _a.href, href = _b === void 0 ? "https://www.google.com/" : _b, _c = _a.btnLabel, btnLabel = _c === void 0 ? "View More" : _c, editor = _a.editor;
|
|
10
|
-
var imageSrc = getCardImageSrc(item === null || item === void 0 ? void 0 : item.image, footer_logo);
|
|
11
|
-
return (_jsxs("div", { className: "p-8 bg-white rounded-xl flex flex-col items-center w-full shadow-xl ".concat(editor === null || editor === void 0 ? void 0 : editor.card, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardBg), children: [_jsx("div", { className: "w-full max-w-[240px] overflow-hidden aspect-square ".concat(editor === null || editor === void 0 ? void 0 : editor.cardImage), children: _jsx(LuImage, { src: imageSrc, width: 240, height: 240, className: "w-full h-full object-cover", alt: "Image" }) }), _jsxs("div", { className: "flex flex-col items-center flex-grow m-5 text-center h-[100px]", children: [_jsx(Typography, { variant: "h4", className: "".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle), children: item === null || item === void 0 ? void 0 : item.title }), _jsx(Typography, { variant: "b3", className: "font-extralight line-clamp-2 max-xs:line-clamp-1 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText), children: item === null || item === void 0 ? void 0 : item.description })] }), _jsx(Link, { href: href, passHref: true, className: "w-full no-underline", children: _jsx(Button, { endIcon: _jsx(LUIcon, { icon: "angle-right", size: "sm" }), size: "lg", className: "rounded justify-between w-full bg-gray-50 text-gray-950 hover:bg-gray-50 hover:text-gray-950 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn), children: btnLabel }) })] }));
|
|
12
|
-
};
|
|
13
|
-
export default VerticalCard;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import { CardInterface } from "../type";
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const _VerticalCard: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, CardInterface>;
|
|
@@ -1,33 +0,0 @@
|
|
|
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 VerticalCard from "./VerticalCard";
|
|
14
|
-
export default {
|
|
15
|
-
title: "Components/VerticalCard",
|
|
16
|
-
component: VerticalCard,
|
|
17
|
-
};
|
|
18
|
-
var Template = function (args) { return _jsx(VerticalCard, __assign({}, args)); };
|
|
19
|
-
export var _VerticalCard = Template.bind({});
|
|
20
|
-
_VerticalCard.args = {
|
|
21
|
-
// image: "/images/demo-image.jpg",
|
|
22
|
-
// title: "Heading Text",
|
|
23
|
-
// short_description: "The quick brown fox jumps over the lazy dog.",
|
|
24
|
-
item: {
|
|
25
|
-
image: "/images/demo-image.jpg",
|
|
26
|
-
title: "Heading Text",
|
|
27
|
-
description: "The quick brown fox jumps over the lazy dog.",
|
|
28
|
-
},
|
|
29
|
-
footer_logo: "/images/demo-image.jpg",
|
|
30
|
-
href: "https://www.google.com/",
|
|
31
|
-
btnLabel: "View More",
|
|
32
|
-
editor: {},
|
|
33
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Switch as ShadSwitch } from "../ui/switch";
|
|
3
|
-
var Switch = function (_a) {
|
|
4
|
-
var size = _a.size, variant = _a.variant;
|
|
5
|
-
return _jsx(ShadSwitch, { size: size, variant: variant });
|
|
6
|
-
};
|
|
7
|
-
export default Switch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
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;
|
|
@@ -1,5 +0,0 @@
|
|
|
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>;
|
|
@@ -1,37 +0,0 @@
|
|
|
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,29 +0,0 @@
|
|
|
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 { Typography as ShadTypography } from "../ui/typography";
|
|
25
|
-
var Typography = function (_a) {
|
|
26
|
-
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
27
|
-
return (_jsx(ShadTypography, __assign({ className: className }, props, { children: children })));
|
|
28
|
-
};
|
|
29
|
-
export default Typography;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import { TypographyInterface } from "./type";
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const _Typography: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, TypographyInterface>;
|
|
@@ -1,37 +0,0 @@
|
|
|
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 Typography from "./Typography";
|
|
14
|
-
import { variant } from "../ui/typography";
|
|
15
|
-
import { Dummy_Para } from "../../utils/constants";
|
|
16
|
-
export default {
|
|
17
|
-
title: "Components/Typography",
|
|
18
|
-
component: Typography,
|
|
19
|
-
tags: ["autodocs"],
|
|
20
|
-
};
|
|
21
|
-
var Template = function (args) { return (_jsx(Typography, __assign({}, args))); };
|
|
22
|
-
export var _Typography = Template.bind({});
|
|
23
|
-
_Typography.args = {
|
|
24
|
-
children: Dummy_Para,
|
|
25
|
-
variant: "b4",
|
|
26
|
-
};
|
|
27
|
-
_Typography.argTypes = {
|
|
28
|
-
variant: {
|
|
29
|
-
control: { type: "select" },
|
|
30
|
-
options: Object.keys(variant),
|
|
31
|
-
description: "Typography Variant",
|
|
32
|
-
table: {
|
|
33
|
-
defaultValue: { summary: "b4" },
|
|
34
|
-
type: { summary: "string" },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "class-variance-authority";
|
|
2
|
-
import { headingVariants } from "../ui/heading";
|
|
3
|
-
export interface HeadingInterface {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
variant?: Exclude<VariantProps<typeof headingVariants>["variant"], null>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "icon" | "sm" | "lg" | "default" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export { Button, buttonVariants };
|
|
@@ -1,54 +0,0 @@
|
|
|
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 { Slot } from "@radix-ui/react-slot";
|
|
25
|
-
import { cva } from "class-variance-authority";
|
|
26
|
-
import { cn } from "../../lib/utils";
|
|
27
|
-
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 [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
28
|
-
variants: {
|
|
29
|
-
variant: {
|
|
30
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
31
|
-
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
32
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
33
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
34
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
35
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
36
|
-
},
|
|
37
|
-
size: {
|
|
38
|
-
default: "h-9 !px-4 !py-2 has-[>svg]:px-3",
|
|
39
|
-
sm: "h-8 rounded-md gap-1.5 !px-3 has-[>svg]:px-2.5",
|
|
40
|
-
lg: "h-10 rounded-md !px-6 has-[>svg]:px-4",
|
|
41
|
-
icon: "size-9",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
variant: "default",
|
|
46
|
-
size: "default",
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
function Button(_a) {
|
|
50
|
-
var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
51
|
-
var Comp = asChild ? Slot : "button";
|
|
52
|
-
return (_jsx(Comp, __assign({ "data-slot": "button", className: cn(buttonVariants({ variant: variant, size: size, className: className })) }, props)));
|
|
53
|
-
}
|
|
54
|
-
export { Button, buttonVariants };
|
|
@@ -1,15 +0,0 @@
|
|
|
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 };
|
|
@@ -1,48 +0,0 @@
|
|
|
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 };
|
|
@@ -1,36 +0,0 @@
|
|
|
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 };
|
|
@@ -1,69 +0,0 @@
|
|
|
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 };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { useState, useEffect } from "react";
|
|
15
|
-
import { useDropzone } from "react-dropzone";
|
|
16
|
-
import { cn } from "../../lib/utils";
|
|
17
|
-
import LUIcon from "../Icons/LUIcon";
|
|
18
|
-
import LuImage from "../Images/LuImage";
|
|
19
|
-
import { Body } from "../Typography/Body/body";
|
|
20
|
-
import { Button } from "../Button/Button";
|
|
21
|
-
var ImageUploader = function (_a) {
|
|
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
|
-
var _d = useState(null), preview = _d[0], setPreview = _d[1];
|
|
24
|
-
var _e = useState(""), fileError = _e[0], setFileError = _e[1];
|
|
25
|
-
useEffect(function () {
|
|
26
|
-
if (value && typeof value === "string") {
|
|
27
|
-
setPreview(value);
|
|
28
|
-
}
|
|
29
|
-
else if (value instanceof File) {
|
|
30
|
-
setPreview(URL.createObjectURL(value));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
setPreview(null);
|
|
34
|
-
}
|
|
35
|
-
}, [value]);
|
|
36
|
-
var onDrop = function (acceptedFiles) {
|
|
37
|
-
var file = acceptedFiles[0];
|
|
38
|
-
if (!file)
|
|
39
|
-
return;
|
|
40
|
-
if (!acceptedTypes.includes(file.type)) {
|
|
41
|
-
setFileError("Only JPEG, PNG, JPG, and SVG files are supported.");
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
var sizeMB = file.size / 1024 / 1024;
|
|
45
|
-
if (sizeMB > maxFileSizeMB) {
|
|
46
|
-
setFileError("File size exceeds ".concat(maxFileSizeMB, "MB."));
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
var previewUrl = URL.createObjectURL(file);
|
|
50
|
-
setPreview(previewUrl);
|
|
51
|
-
setFileError("");
|
|
52
|
-
onChange(previewUrl, file);
|
|
53
|
-
};
|
|
54
|
-
var removeFile = function () {
|
|
55
|
-
setPreview(null);
|
|
56
|
-
setFileError("");
|
|
57
|
-
onChange(null, null);
|
|
58
|
-
};
|
|
59
|
-
var _f = useDropzone({
|
|
60
|
-
onDrop: onDrop,
|
|
61
|
-
multiple: false,
|
|
62
|
-
accept: {
|
|
63
|
-
"image/*": acceptedTypes,
|
|
64
|
-
},
|
|
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(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, { onClick: removeFile, className: "!mt-2 text-sm text-gray-700", children: "Remove Image" }))] }));
|
|
67
|
-
};
|
|
68
|
-
export default ImageUploader;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import { type VariantProps } from "class-variance-authority";
|
|
4
|
-
export declare const variant: {
|
|
5
|
-
default: string;
|
|
6
|
-
editorLabel: string;
|
|
7
|
-
};
|
|
8
|
-
declare const labelVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "editorLabel" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
-
declare function Label({ className, variant, ...props }: React.ComponentProps<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { Label, labelVariants };
|
|
@@ -1,41 +0,0 @@
|
|
|
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 * as LabelPrimitive from "@radix-ui/react-label";
|
|
25
|
-
import { cva } from "class-variance-authority";
|
|
26
|
-
import { cn } from "../../lib/utils";
|
|
27
|
-
export var variant = {
|
|
28
|
-
default: "!text-base leading-none !font-medium",
|
|
29
|
-
editorLabel: "!text-lg !font-medium leading-[1.5] !mb-1",
|
|
30
|
-
};
|
|
31
|
-
var labelVariants = cva("flex items-center !gap-2 select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", {
|
|
32
|
-
variants: { variant: variant },
|
|
33
|
-
defaultVariants: {
|
|
34
|
-
variant: "default",
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
function Label(_a) {
|
|
38
|
-
var className = _a.className, variant = _a.variant, props = __rest(_a, ["className", "variant"]);
|
|
39
|
-
return (_jsx(LabelPrimitive.Root, __assign({ "data-slot": "label", className: cn(labelVariants({ variant: variant, className: className })) }, props)));
|
|
40
|
-
}
|
|
41
|
-
export { Label, labelVariants };
|