linkedunion-design-kit 1.6.0 → 1.6.2
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 +1 -0
- package/dist/index.js +1 -0
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Button/Button.js +24 -2
- package/dist/src/components/Button/Button.stories.js +7 -0
- package/dist/src/components/Button/type.d.ts +1 -2
- package/dist/src/components/Checkbox/checkbox.stories.d.ts +10 -0
- package/dist/src/components/Checkbox/checkbox.stories.js +61 -0
- package/dist/src/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/src/components/ColorPicker/ColorPicker.js +50 -10
- package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +2 -2
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +4 -2
- package/dist/src/components/ColorPicker/type.d.ts +2 -2
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.d.ts +2 -1
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.js +4 -1
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.stories.d.ts +2 -1
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.stories.js +15 -1
- package/dist/src/components/Title/Title.module.css +1 -1
- package/dist/src/components/ui/checkbox.d.ts +4 -0
- package/dist/src/components/ui/checkbox.js +31 -0
- package/dist/styles/global.css +103 -30
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export { default as EditorTooltip } from "./src/components/EditorTooltip/EditorT
|
|
|
12
12
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "./src/components/ui/accordion";
|
|
13
13
|
export { default as ImageUploader } from "./src/components/ui/imageUploader";
|
|
14
14
|
export { Typography } from "./src/components/ui/typography";
|
|
15
|
+
export { Checkbox } from "./src/components/ui/checkbox";
|
|
15
16
|
export { Switch } from "./src/components/ui/switch";
|
package/dist/index.js
CHANGED
|
@@ -12,4 +12,5 @@ export { default as EditorTooltip } from "./src/components/EditorTooltip/EditorT
|
|
|
12
12
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from "./src/components/ui/accordion";
|
|
13
13
|
export { default as ImageUploader } from "./src/components/ui/imageUploader";
|
|
14
14
|
export { Typography } from "./src/components/ui/typography";
|
|
15
|
+
export { Checkbox } from "./src/components/ui/checkbox";
|
|
15
16
|
export { Switch } from "./src/components/ui/switch";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ButtonProps } from "./type";
|
|
2
|
-
declare const Button: ({ color, startIcon, endIcon, onClick, shape, size, className, children, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Button: ({ color, startIcon, endIcon, onClick, shape, size, className, children, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Button;
|
|
@@ -1,7 +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
|
+
};
|
|
1
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
24
|
import { buttonShapes, buttonSizes, buttonColors } from "./index";
|
|
3
25
|
var Button = function (_a) {
|
|
4
|
-
var _b = _a.color, color = _b === void 0 ? "primary" : _b, startIcon = _a.startIcon, endIcon = _a.endIcon, onClick = _a.onClick, _c = _a.shape, shape = _c === void 0 ? "rounded-none" : _c, _d = _a.size, size = _d === void 0 ? "sm" : _d, className = _a.className, children = _a.children;
|
|
5
|
-
return (_jsxs("button", { className: "flex items-center ".concat(buttonShapes[shape], " ").concat(buttonColors[color], " ").concat(className, " ").concat(buttonSizes[size]), onClick: onClick, children: [startIcon && _jsxs("span", { "data-testid": "start-icon", children: [" ", startIcon, " "] }), children, endIcon && _jsxs("span", { "data-testid": "end-icon", children: [" ", endIcon, " "] })] }));
|
|
26
|
+
var _b = _a.color, color = _b === void 0 ? "primary" : _b, startIcon = _a.startIcon, endIcon = _a.endIcon, onClick = _a.onClick, _c = _a.shape, shape = _c === void 0 ? "rounded-none" : _c, _d = _a.size, size = _d === void 0 ? "sm" : _d, className = _a.className, children = _a.children, rest = __rest(_a, ["color", "startIcon", "endIcon", "onClick", "shape", "size", "className", "children"]);
|
|
27
|
+
return (_jsxs("button", __assign({ className: "flex items-center ".concat(buttonShapes[shape], " ").concat(buttonColors[color], " ").concat(className || "", " ").concat(buttonSizes[size]), onClick: onClick }, rest, { children: [startIcon && _jsxs("span", { "data-testid": "start-icon", children: [" ", startIcon, " "] }), children, endIcon && _jsxs("span", { "data-testid": "end-icon", children: [" ", endIcon, " "] })] })));
|
|
6
28
|
};
|
|
7
29
|
export default Button;
|
|
@@ -21,6 +21,9 @@ var Template = function (args) { return _jsx(Button, __assign({}, args)); };
|
|
|
21
21
|
export var _Button = Template.bind({});
|
|
22
22
|
_Button.args = {
|
|
23
23
|
children: "Button Text",
|
|
24
|
+
onClick: function () {
|
|
25
|
+
alert("Button clicked!");
|
|
26
|
+
},
|
|
24
27
|
};
|
|
25
28
|
_Button.argTypes = {
|
|
26
29
|
color: {
|
|
@@ -53,4 +56,8 @@ _Button.argTypes = {
|
|
|
53
56
|
options: Object.keys(buttonSizes),
|
|
54
57
|
description: "Select the size of the button",
|
|
55
58
|
},
|
|
59
|
+
onClick: {
|
|
60
|
+
action: "clicked",
|
|
61
|
+
description: "Function to call when button is clicked",
|
|
62
|
+
},
|
|
56
63
|
};
|
|
@@ -4,9 +4,8 @@ type colors = keyof typeof buttonColors;
|
|
|
4
4
|
type buttonShapes = keyof typeof buttonShapes;
|
|
5
5
|
type buttonSizes = keyof typeof buttonSizes;
|
|
6
6
|
type iconButtonSize = keyof typeof iconButtonSize;
|
|
7
|
-
export interface ButtonProps extends React.
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
8
|
color?: colors;
|
|
9
|
-
onClick?: () => void;
|
|
10
9
|
size?: buttonSizes;
|
|
11
10
|
startIcon?: React.ReactNode;
|
|
12
11
|
endIcon?: React.ReactNode;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Checkbox } from "../ui/checkbox";
|
|
3
|
+
declare const meta: Meta<typeof Checkbox>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Checkbox>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Checked: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const DisabledChecked: Story;
|
|
10
|
+
export declare const Form: Story;
|
|
@@ -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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Checkbox } from "../ui/checkbox";
|
|
14
|
+
import { Label } from "../ui/label";
|
|
15
|
+
import Button from "../Button/Button";
|
|
16
|
+
var meta = {
|
|
17
|
+
title: "components/Checkbox",
|
|
18
|
+
component: Checkbox,
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: "centered",
|
|
21
|
+
},
|
|
22
|
+
tags: ["autodocs"],
|
|
23
|
+
argTypes: {
|
|
24
|
+
checked: { control: "boolean" },
|
|
25
|
+
defaultChecked: { control: "boolean" },
|
|
26
|
+
disabled: { control: "boolean" },
|
|
27
|
+
onCheckedChange: { action: "checked changed" },
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
export var Default = {
|
|
32
|
+
args: {
|
|
33
|
+
id: "default",
|
|
34
|
+
},
|
|
35
|
+
render: function (args) { return (_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, __assign({}, args)), _jsx(Label, { htmlFor: "default", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Accept terms and conditions" })] })); },
|
|
36
|
+
};
|
|
37
|
+
export var Checked = {
|
|
38
|
+
args: {
|
|
39
|
+
id: "checked",
|
|
40
|
+
defaultChecked: true,
|
|
41
|
+
},
|
|
42
|
+
render: function (args) { return (_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, __assign({}, args)), _jsx(Label, { htmlFor: "checked", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Checked option" })] })); },
|
|
43
|
+
};
|
|
44
|
+
export var Disabled = {
|
|
45
|
+
args: {
|
|
46
|
+
id: "disabled",
|
|
47
|
+
disabled: true,
|
|
48
|
+
},
|
|
49
|
+
render: function (args) { return (_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, __assign({}, args)), _jsx(Label, { htmlFor: "disabled", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Disabled option" })] })); },
|
|
50
|
+
};
|
|
51
|
+
export var DisabledChecked = {
|
|
52
|
+
args: {
|
|
53
|
+
id: "disabled-checked",
|
|
54
|
+
disabled: true,
|
|
55
|
+
defaultChecked: true,
|
|
56
|
+
},
|
|
57
|
+
render: function (args) { return (_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, __assign({}, args)), _jsx(Label, { htmlFor: "disabled-checked", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Disabled checked option" })] })); },
|
|
58
|
+
};
|
|
59
|
+
export var Form = {
|
|
60
|
+
render: function () { return (_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-medium", children: "Terms of Service" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Please read and accept our terms of service to continue." }), _jsxs("form", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, { id: "terms1" }), _jsx("label", { htmlFor: "terms1", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "I accept the terms and conditions" })] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, { id: "terms2" }), _jsx(Label, { htmlFor: "terms2", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "I agree to receive marketing emails" })] }), _jsx(Button, { type: "submit", className: "mt-4 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700", children: "Submit" })] })] })); },
|
|
61
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const ColorPicker: ({ onChange, value }:
|
|
1
|
+
import { ColorPickerProps } from "./type";
|
|
2
|
+
declare const ColorPicker: ({ onChange, value, ...props }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -1,27 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import { useState, useEffect } from "react";
|
|
3
26
|
import { Input } from "../ui/input";
|
|
27
|
+
var useDebounce = function (value, delay) {
|
|
28
|
+
var _a = useState(value), debouncedValue = _a[0], setDebouncedValue = _a[1];
|
|
29
|
+
useEffect(function () {
|
|
30
|
+
var handler = setTimeout(function () {
|
|
31
|
+
setDebouncedValue(value);
|
|
32
|
+
}, delay);
|
|
33
|
+
return function () {
|
|
34
|
+
clearTimeout(handler);
|
|
35
|
+
};
|
|
36
|
+
}, [value, delay]);
|
|
37
|
+
return debouncedValue;
|
|
38
|
+
};
|
|
4
39
|
var ColorPicker = function (_a) {
|
|
5
|
-
var onChange = _a.onChange, _b = _a.value, value = _b === void 0 ? "#000000" : _b;
|
|
40
|
+
var onChange = _a.onChange, _b = _a.value, value = _b === void 0 ? "#000000" : _b, props = __rest(_a, ["onChange", "value"]);
|
|
6
41
|
var _c = useState(value), hexColor = _c[0], setHexColor = _c[1];
|
|
42
|
+
var debouncedHexColor = useDebounce(hexColor, 200); // Use prop or default
|
|
7
43
|
// Handle input changes (color picker or text field)
|
|
8
44
|
var handleColorChange = function (newColor) {
|
|
9
|
-
|
|
10
|
-
|
|
45
|
+
var formattedColor = newColor.startsWith("#") ? newColor : "#".concat(newColor);
|
|
46
|
+
setHexColor(formattedColor); // Set the local state immediately
|
|
11
47
|
};
|
|
48
|
+
// Trigger onChange callback only when debounced value updates
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
onChange(debouncedHexColor); // Trigger onChange with debounced value
|
|
51
|
+
}, [debouncedHexColor, onChange]);
|
|
12
52
|
// Handle hex input change
|
|
13
53
|
var handleHexChange = function (e) {
|
|
14
54
|
var inputValue = e.target.value;
|
|
15
55
|
// Ensure it starts with #
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
handleColorChange(
|
|
56
|
+
if (inputValue.length > 7) {
|
|
57
|
+
inputValue = inputValue.slice(0, 7); // Limit the input to 7 characters
|
|
58
|
+
}
|
|
59
|
+
handleColorChange(inputValue);
|
|
20
60
|
};
|
|
21
61
|
// Handle color input change (from native color picker)
|
|
22
62
|
var handleColorInputChange = function (e) {
|
|
23
63
|
handleColorChange(e.target.value);
|
|
24
64
|
};
|
|
25
|
-
return (
|
|
65
|
+
return (_jsxs("div", { className: "relative", children: [_jsx("div", { className: "size-9 left-1 top-1/2 -translate-y-1/2 absolute border rounded", style: { backgroundColor: hexColor }, children: _jsx(Input, { type: "color", value: hexColor, onChange: handleColorInputChange, className: "h-full w-full opacity-0 cursor-pointer", "aria-label": "Select color" }) }), _jsx(Input, __assign({ type: "text", value: hexColor, onChange: handleHexChange, maxLength: 7, "aria-label": "Hex color input" }, props, { className: "rounded border min-w-25 !ps-12 ".concat(props.className) }))] }));
|
|
26
66
|
};
|
|
27
67
|
export default ColorPicker;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta } from "@storybook/react";
|
|
2
|
-
import {
|
|
2
|
+
import { ColorPickerProps } from "./type";
|
|
3
3
|
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const _ColorPicker: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer,
|
|
5
|
+
export declare const _ColorPicker: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorPickerProps>;
|
|
@@ -16,9 +16,11 @@ export default {
|
|
|
16
16
|
component: ColorPicker,
|
|
17
17
|
tags: ["autodocs"],
|
|
18
18
|
};
|
|
19
|
-
var Template = function (args) { return
|
|
19
|
+
var Template = function (args) { return _jsx(ColorPicker, __assign({}, args)); };
|
|
20
20
|
export var _ColorPicker = Template.bind({});
|
|
21
21
|
_ColorPicker.args = {
|
|
22
22
|
value: "#000000", // Default color
|
|
23
|
-
onChange: function () {
|
|
23
|
+
onChange: function (e) {
|
|
24
|
+
console.log("color -->", e);
|
|
25
|
+
},
|
|
24
26
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { CardInterface } from "../type";
|
|
2
|
+
declare const VerticalCard: ({ item, footer_logo, href, btnLabel, editor, }: CardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
2
3
|
export default VerticalCard;
|
|
@@ -4,7 +4,10 @@ import LUIcon from "../../../components/Icons/LUIcon";
|
|
|
4
4
|
import LuImage from "../../../components/Images/LuImage";
|
|
5
5
|
import Typography from "../../../components/Typography/Typography";
|
|
6
6
|
import Link from "next/link";
|
|
7
|
+
import { getCardImageSrc } from "..";
|
|
7
8
|
var VerticalCard = function (_a) {
|
|
8
|
-
|
|
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 }) })] }));
|
|
9
12
|
};
|
|
10
13
|
export default VerticalCard;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Meta } from "@storybook/react";
|
|
2
|
+
import { CardInterface } from "../type";
|
|
2
3
|
declare const _default: Meta;
|
|
3
4
|
export default _default;
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const _VerticalCard: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, CardInterface>;
|
|
@@ -16,4 +16,18 @@ export default {
|
|
|
16
16
|
component: VerticalCard,
|
|
17
17
|
};
|
|
18
18
|
var Template = function (args) { return _jsx(VerticalCard, __assign({}, args)); };
|
|
19
|
-
export var
|
|
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
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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 CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
25
|
+
import { CheckIcon } from "lucide-react";
|
|
26
|
+
import { cn } from "../../lib/utils";
|
|
27
|
+
function Checkbox(_a) {
|
|
28
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
29
|
+
return (_jsx(CheckboxPrimitive.Root, __assign({ "data-slot": "checkbox", className: cn("peer border-input dark:bg-input/30 data-[state=checked]:bg-blue-600 data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-blue-600 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4.5 shrink-0 !rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className) }, props, { children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) })));
|
|
30
|
+
}
|
|
31
|
+
export { Checkbox };
|
package/dist/styles/global.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.5 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -209,18 +209,21 @@
|
|
|
209
209
|
.relative {
|
|
210
210
|
position: relative;
|
|
211
211
|
}
|
|
212
|
-
.inset-0 {
|
|
213
|
-
inset: calc(var(--spacing) * 0);
|
|
214
|
-
}
|
|
215
212
|
.top-0 {
|
|
216
213
|
top: calc(var(--spacing) * 0);
|
|
217
214
|
}
|
|
215
|
+
.top-1\/2 {
|
|
216
|
+
top: calc(1/2 * 100%);
|
|
217
|
+
}
|
|
218
218
|
.bottom-0 {
|
|
219
219
|
bottom: calc(var(--spacing) * 0);
|
|
220
220
|
}
|
|
221
221
|
.left-0 {
|
|
222
222
|
left: calc(var(--spacing) * 0);
|
|
223
223
|
}
|
|
224
|
+
.left-1 {
|
|
225
|
+
left: calc(var(--spacing) * 1);
|
|
226
|
+
}
|
|
224
227
|
.z-10 {
|
|
225
228
|
z-index: 10;
|
|
226
229
|
}
|
|
@@ -380,10 +383,18 @@
|
|
|
380
383
|
width: calc(var(--spacing) * 3);
|
|
381
384
|
height: calc(var(--spacing) * 3);
|
|
382
385
|
}
|
|
386
|
+
.size-3\.5 {
|
|
387
|
+
width: calc(var(--spacing) * 3.5);
|
|
388
|
+
height: calc(var(--spacing) * 3.5);
|
|
389
|
+
}
|
|
383
390
|
.size-4 {
|
|
384
391
|
width: calc(var(--spacing) * 4);
|
|
385
392
|
height: calc(var(--spacing) * 4);
|
|
386
393
|
}
|
|
394
|
+
.size-4\.5 {
|
|
395
|
+
width: calc(var(--spacing) * 4.5);
|
|
396
|
+
height: calc(var(--spacing) * 4.5);
|
|
397
|
+
}
|
|
387
398
|
.size-5 {
|
|
388
399
|
width: calc(var(--spacing) * 5);
|
|
389
400
|
height: calc(var(--spacing) * 5);
|
|
@@ -596,6 +607,10 @@
|
|
|
596
607
|
.origin-\(--radix-tooltip-content-transform-origin\) {
|
|
597
608
|
transform-origin: var(--radix-tooltip-content-transform-origin);
|
|
598
609
|
}
|
|
610
|
+
.-translate-y-1\/2 {
|
|
611
|
+
--tw-translate-y: calc(calc(1/2 * 100%) * -1);
|
|
612
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
613
|
+
}
|
|
599
614
|
.translate-y-0\.5 {
|
|
600
615
|
--tw-translate-y: calc(var(--spacing) * 0.5);
|
|
601
616
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -655,18 +670,42 @@
|
|
|
655
670
|
.gap-6 {
|
|
656
671
|
gap: calc(var(--spacing) * 6);
|
|
657
672
|
}
|
|
673
|
+
.space-y-2 {
|
|
674
|
+
:where(& > :not(:last-child)) {
|
|
675
|
+
--tw-space-y-reverse: 0;
|
|
676
|
+
margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
|
|
677
|
+
margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
.space-y-4 {
|
|
681
|
+
:where(& > :not(:last-child)) {
|
|
682
|
+
--tw-space-y-reverse: 0;
|
|
683
|
+
margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));
|
|
684
|
+
margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));
|
|
685
|
+
}
|
|
686
|
+
}
|
|
658
687
|
.gap-x-5 {
|
|
659
688
|
column-gap: calc(var(--spacing) * 5);
|
|
660
689
|
}
|
|
661
690
|
.gap-x-\[20px\] {
|
|
662
691
|
column-gap: 20px;
|
|
663
692
|
}
|
|
693
|
+
.space-x-2 {
|
|
694
|
+
:where(& > :not(:last-child)) {
|
|
695
|
+
--tw-space-x-reverse: 0;
|
|
696
|
+
margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));
|
|
697
|
+
margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
|
|
698
|
+
}
|
|
699
|
+
}
|
|
664
700
|
.overflow-hidden {
|
|
665
701
|
overflow: hidden;
|
|
666
702
|
}
|
|
667
703
|
.\!rounded-\[2px\] {
|
|
668
704
|
border-radius: 2px !important;
|
|
669
705
|
}
|
|
706
|
+
.\!rounded-\[4px\] {
|
|
707
|
+
border-radius: 4px !important;
|
|
708
|
+
}
|
|
670
709
|
.\!rounded-full {
|
|
671
710
|
border-radius: calc(infinity * 1px) !important;
|
|
672
711
|
}
|
|
@@ -706,14 +745,6 @@
|
|
|
706
745
|
.rounded-xs {
|
|
707
746
|
border-radius: var(--radius-xs);
|
|
708
747
|
}
|
|
709
|
-
.rounded-l-sm {
|
|
710
|
-
border-top-left-radius: calc(var(--radius) - 4px);
|
|
711
|
-
border-bottom-left-radius: calc(var(--radius) - 4px);
|
|
712
|
-
}
|
|
713
|
-
.rounded-r-sm {
|
|
714
|
-
border-top-right-radius: calc(var(--radius) - 4px);
|
|
715
|
-
border-bottom-right-radius: calc(var(--radius) - 4px);
|
|
716
|
-
}
|
|
717
748
|
.\!border {
|
|
718
749
|
border-style: var(--tw-border-style) !important;
|
|
719
750
|
border-width: 1px !important;
|
|
@@ -1091,6 +1122,9 @@
|
|
|
1091
1122
|
.py-4 {
|
|
1092
1123
|
padding-block: calc(var(--spacing) * 4);
|
|
1093
1124
|
}
|
|
1125
|
+
.\!ps-12 {
|
|
1126
|
+
padding-inline-start: calc(var(--spacing) * 12) !important;
|
|
1127
|
+
}
|
|
1094
1128
|
.pt-0 {
|
|
1095
1129
|
padding-top: calc(var(--spacing) * 0);
|
|
1096
1130
|
}
|
|
@@ -1257,6 +1291,9 @@
|
|
|
1257
1291
|
.text-blue-950 {
|
|
1258
1292
|
color: #03080d;
|
|
1259
1293
|
}
|
|
1294
|
+
.text-current {
|
|
1295
|
+
color: currentcolor;
|
|
1296
|
+
}
|
|
1260
1297
|
.text-gray-50 {
|
|
1261
1298
|
color: #fafafa;
|
|
1262
1299
|
}
|
|
@@ -1502,15 +1539,27 @@
|
|
|
1502
1539
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1503
1540
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1504
1541
|
}
|
|
1542
|
+
.transition-shadow {
|
|
1543
|
+
transition-property: box-shadow;
|
|
1544
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1545
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1546
|
+
}
|
|
1505
1547
|
.transition-transform {
|
|
1506
1548
|
transition-property: transform, translate, scale, rotate;
|
|
1507
1549
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1508
1550
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1509
1551
|
}
|
|
1552
|
+
.transition-none {
|
|
1553
|
+
transition-property: none;
|
|
1554
|
+
}
|
|
1510
1555
|
.duration-200 {
|
|
1511
1556
|
--tw-duration: 200ms;
|
|
1512
1557
|
transition-duration: 200ms;
|
|
1513
1558
|
}
|
|
1559
|
+
.fade-in-0 {
|
|
1560
|
+
--tw-enter-opacity: calc(0/100);
|
|
1561
|
+
--tw-enter-opacity: 0;
|
|
1562
|
+
}
|
|
1514
1563
|
.outline-none {
|
|
1515
1564
|
--tw-outline-style: none;
|
|
1516
1565
|
outline-style: none;
|
|
@@ -1522,9 +1571,6 @@
|
|
|
1522
1571
|
.\!zoom-in-95 {
|
|
1523
1572
|
--tw-enter-scale: .95 !important;
|
|
1524
1573
|
}
|
|
1525
|
-
.fade-in-0 {
|
|
1526
|
-
--tw-enter-opacity: 0;
|
|
1527
|
-
}
|
|
1528
1574
|
.running {
|
|
1529
1575
|
animation-play-state: running;
|
|
1530
1576
|
}
|
|
@@ -1556,6 +1602,11 @@
|
|
|
1556
1602
|
opacity: 50%;
|
|
1557
1603
|
}
|
|
1558
1604
|
}
|
|
1605
|
+
.peer-disabled\:opacity-70 {
|
|
1606
|
+
&:is(:where(.peer):disabled ~ *) {
|
|
1607
|
+
opacity: 70%;
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1559
1610
|
.selection\:bg-primary {
|
|
1560
1611
|
& *::selection {
|
|
1561
1612
|
background-color: var(--primary);
|
|
@@ -3079,11 +3130,21 @@
|
|
|
3079
3130
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3080
3131
|
}
|
|
3081
3132
|
}
|
|
3133
|
+
.data-\[state\=checked\]\:border-blue-600 {
|
|
3134
|
+
&[data-state="checked"] {
|
|
3135
|
+
border-color: #276ab3;
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3082
3138
|
.data-\[state\=checked\]\:bg-blue-500 {
|
|
3083
3139
|
&[data-state="checked"] {
|
|
3084
3140
|
background-color: #3a84d4;
|
|
3085
3141
|
}
|
|
3086
3142
|
}
|
|
3143
|
+
.data-\[state\=checked\]\:bg-blue-600 {
|
|
3144
|
+
&[data-state="checked"] {
|
|
3145
|
+
background-color: #276ab3;
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3087
3148
|
.data-\[state\=checked\]\:bg-green-500 {
|
|
3088
3149
|
&[data-state="checked"] {
|
|
3089
3150
|
background-color: #479f76;
|
|
@@ -3094,6 +3155,11 @@
|
|
|
3094
3155
|
background-color: #fa4f5f;
|
|
3095
3156
|
}
|
|
3096
3157
|
}
|
|
3158
|
+
.data-\[state\=checked\]\:text-primary-foreground {
|
|
3159
|
+
&[data-state="checked"] {
|
|
3160
|
+
color: var(--primary-foreground);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3097
3163
|
.data-\[state\=closed\]\:animate-accordion-up {
|
|
3098
3164
|
&[data-state="closed"] {
|
|
3099
3165
|
animation: accordion-up var(--tw-duration,.2s)ease-out;
|
|
@@ -3106,6 +3172,7 @@
|
|
|
3106
3172
|
}
|
|
3107
3173
|
.data-\[state\=closed\]\:fade-out-0 {
|
|
3108
3174
|
&[data-state="closed"] {
|
|
3175
|
+
--tw-exit-opacity: calc(0/100);
|
|
3109
3176
|
--tw-exit-opacity: 0;
|
|
3110
3177
|
}
|
|
3111
3178
|
}
|
|
@@ -3446,6 +3513,13 @@
|
|
|
3446
3513
|
}
|
|
3447
3514
|
}
|
|
3448
3515
|
}
|
|
3516
|
+
.dark\:data-\[state\=checked\]\:bg-primary {
|
|
3517
|
+
&:is(.dark *) {
|
|
3518
|
+
&[data-state="checked"] {
|
|
3519
|
+
background-color: var(--primary);
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3449
3523
|
.dark\:data-\[state\=checked\]\:bg-primary-foreground {
|
|
3450
3524
|
&:is(.dark *) {
|
|
3451
3525
|
&[data-state="checked"] {
|
|
@@ -3528,19 +3602,6 @@
|
|
|
3528
3602
|
--sidebar-border: oklch(0.922 0 0);
|
|
3529
3603
|
--sidebar-ring: oklch(0.708 0 0);
|
|
3530
3604
|
}
|
|
3531
|
-
@layer base {
|
|
3532
|
-
* {
|
|
3533
|
-
border-color: var(--border);
|
|
3534
|
-
outline-color: var(--ring);
|
|
3535
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3536
|
-
outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
|
|
3537
|
-
}
|
|
3538
|
-
}
|
|
3539
|
-
body {
|
|
3540
|
-
background-color: var(--background);
|
|
3541
|
-
color: var(--foreground);
|
|
3542
|
-
}
|
|
3543
|
-
}
|
|
3544
3605
|
@property --tw-translate-x {
|
|
3545
3606
|
syntax: "*";
|
|
3546
3607
|
inherits: false;
|
|
@@ -3556,6 +3617,16 @@
|
|
|
3556
3617
|
inherits: false;
|
|
3557
3618
|
initial-value: 0;
|
|
3558
3619
|
}
|
|
3620
|
+
@property --tw-space-y-reverse {
|
|
3621
|
+
syntax: "*";
|
|
3622
|
+
inherits: false;
|
|
3623
|
+
initial-value: 0;
|
|
3624
|
+
}
|
|
3625
|
+
@property --tw-space-x-reverse {
|
|
3626
|
+
syntax: "*";
|
|
3627
|
+
inherits: false;
|
|
3628
|
+
initial-value: 0;
|
|
3629
|
+
}
|
|
3559
3630
|
@property --tw-border-style {
|
|
3560
3631
|
syntax: "*";
|
|
3561
3632
|
inherits: false;
|
|
@@ -3796,12 +3867,12 @@
|
|
|
3796
3867
|
height: 0;
|
|
3797
3868
|
}
|
|
3798
3869
|
to {
|
|
3799
|
-
height: var(--radix-accordion-content-height,var(--bits-accordion-content-height));
|
|
3870
|
+
height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,auto)));
|
|
3800
3871
|
}
|
|
3801
3872
|
}
|
|
3802
3873
|
@keyframes accordion-up {
|
|
3803
3874
|
from {
|
|
3804
|
-
height: var(--radix-accordion-content-height,var(--bits-accordion-content-height));
|
|
3875
|
+
height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,auto)));
|
|
3805
3876
|
}
|
|
3806
3877
|
to {
|
|
3807
3878
|
height: 0;
|
|
@@ -3813,6 +3884,8 @@
|
|
|
3813
3884
|
--tw-translate-x: 0;
|
|
3814
3885
|
--tw-translate-y: 0;
|
|
3815
3886
|
--tw-translate-z: 0;
|
|
3887
|
+
--tw-space-y-reverse: 0;
|
|
3888
|
+
--tw-space-x-reverse: 0;
|
|
3816
3889
|
--tw-border-style: solid;
|
|
3817
3890
|
--tw-gradient-position: initial;
|
|
3818
3891
|
--tw-gradient-from: #0000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linkedunion-design-kit",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@radix-ui/react-accordion": "^1.2.8",
|
|
45
|
+
"@radix-ui/react-checkbox": "^1.3.1",
|
|
45
46
|
"@radix-ui/react-label": "^2.1.3",
|
|
46
47
|
"@radix-ui/react-switch": "^1.1.4",
|
|
47
48
|
"@radix-ui/react-tooltip": "^1.2.3",
|