linkedunion-design-kit 1.10.3 → 1.10.4
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 +0 -1
- package/dist/index.js +0 -1
- package/dist/src/components/Button/Button/Button.module.css +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +1 -1
- package/dist/src/components/ColorPicker/index.d.ts +1 -1
- package/dist/src/components/Input/Input.stories.d.ts +1 -2
- package/dist/src/components/Input/Input.stories.js +2 -7
- package/dist/src/components/Input/index.d.ts +17 -90
- package/dist/src/components/Input/index.js +8 -83
- package/dist/src/components/Input/input.d.ts +27 -8
- package/dist/src/components/Input/input.js +29 -7
- package/dist/src/components/Input/type.d.ts +10 -18
- package/dist/src/components/Label/Label.d.ts +1 -1
- package/dist/src/components/Title/Title.module.css +1 -1
- package/dist/src/components/Typography/Heading/heading.module.css +1 -1
- package/dist/styles/global.css +3 -49
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -31,4 +31,3 @@ export { default as Combobox } from "./src/components/Dropdown/Combobox/Combobox
|
|
|
31
31
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./src/components/Pagination/pagination";
|
|
32
32
|
export { Skeleton } from "./src/components/Skeleton/skeleton";
|
|
33
33
|
export { Tabs as VerticalTabs, TabsContent as VerticalTabsContent, TabsList as VerticalTabsList, tabSizes as verticalTabsSize, TabsTrigger as VerticalTabsTrigger, TabsHeading as VerticalTabsHeading, } from "./src/components/VerticalTabs/VerticalTabs";
|
|
34
|
-
export { DatePicker } from "./src/components/Input/DatePicker";
|
package/dist/index.js
CHANGED
|
@@ -31,4 +31,3 @@ export { default as Combobox } from "./src/components/Dropdown/Combobox/Combobox
|
|
|
31
31
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./src/components/Pagination/pagination";
|
|
32
32
|
export { Skeleton } from "./src/components/Skeleton/skeleton";
|
|
33
33
|
export { Tabs as VerticalTabs, TabsContent as VerticalTabsContent, TabsList as VerticalTabsList, tabSizes as verticalTabsSize, TabsTrigger as VerticalTabsTrigger, TabsHeading as VerticalTabsHeading, } from "./src/components/VerticalTabs/VerticalTabs";
|
|
34
|
-
export { DatePicker } from "./src/components/Input/DatePicker";
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import ColorPicker from "./ColorPicker";
|
|
14
14
|
import { Label } from "../Label/Label";
|
|
15
|
-
import { inputVariantConfig } from "../Input";
|
|
15
|
+
import { inputVariantConfig } from "../Input/input";
|
|
16
16
|
export default {
|
|
17
17
|
title: "Components/ColorPicker",
|
|
18
18
|
component: ColorPicker,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta } from "@storybook/react";
|
|
2
|
-
import { InputFieldProps } from "
|
|
2
|
+
import { InputFieldProps } from "./type";
|
|
3
3
|
declare const _default: Meta<InputFieldProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, InputFieldProps>;
|
|
@@ -11,4 +11,3 @@ export declare const VariantsWithIcons: () => import("react/jsx-runtime").JSX.El
|
|
|
11
11
|
export declare const ErrorValidation: () => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const SuccessValidation: () => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export declare const WarningValidation: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const DatePickerExample: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,9 +11,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import React from "react";
|
|
14
|
-
import { Input } from "./input";
|
|
15
|
-
import {
|
|
16
|
-
import { inputType, inputVariantConfig } from ".";
|
|
14
|
+
import { Input, inputVariantConfig } from "./input";
|
|
15
|
+
import { inputType } from "."; // Ensure this exports an object like { text: 'text', email: 'email', ... }
|
|
17
16
|
import { Label } from "../Label/Label";
|
|
18
17
|
import LUIcon from "../Icons/LUIcon";
|
|
19
18
|
import Tooltip from "../ToolTip/Tooltip";
|
|
@@ -132,7 +131,3 @@ export var WarningValidation = function () {
|
|
|
132
131
|
? "Password is weak. Consider using 8+ characters"
|
|
133
132
|
: "Enter a secure password" })] }) }));
|
|
134
133
|
};
|
|
135
|
-
export var DatePickerExample = function () {
|
|
136
|
-
var _a = React.useState(null), selectedDate = _a[0], setSelectedDate = _a[1];
|
|
137
|
-
return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { children: [_jsx(Label, { variant: "label-md", children: "Select Date" }), _jsx(DatePicker, { placeholder: "Pick a date", value: selectedDate, onChange: setSelectedDate }), _jsx(Caption, { variant: "md", className: "mt-1 text-gray-500", children: "For full DatePicker documentation, see Components/Input/DatePicker" })] }) }));
|
|
138
|
-
};
|
|
@@ -1,97 +1,24 @@
|
|
|
1
1
|
export declare const inputType: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly date: "date";
|
|
2
|
+
text: string;
|
|
3
|
+
password: string;
|
|
4
|
+
email: string;
|
|
5
|
+
file: string;
|
|
6
|
+
number: string;
|
|
7
|
+
search: string;
|
|
8
|
+
tel: string;
|
|
9
|
+
url: string;
|
|
11
10
|
};
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
readonly md: "h-10 text-normal";
|
|
22
|
-
readonly lg: "h-12 text-base";
|
|
23
|
-
};
|
|
24
|
-
readonly color: {
|
|
25
|
-
readonly default: "";
|
|
26
|
-
readonly danger: "border-red-600 focus-visible:border-red-600 focus-visible:ring-red-600";
|
|
27
|
-
readonly warning: "border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500";
|
|
28
|
-
readonly success: "border-green-600 focus-visible:border-green-600 focus-visible:ring-green-600";
|
|
29
|
-
};
|
|
30
|
-
readonly shape: {
|
|
31
|
-
readonly rounded: "rounded-full";
|
|
32
|
-
readonly square: "rounded-sm";
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export declare const datePickerStyles: {
|
|
36
|
-
readonly dayConfig: {
|
|
37
|
-
readonly sm: {
|
|
38
|
-
readonly buttonSize: "h-8 w-8 text-xs";
|
|
39
|
-
readonly fontSize: "text-xs";
|
|
40
|
-
};
|
|
41
|
-
readonly md: {
|
|
42
|
-
readonly buttonSize: "h-9 w-9 text-sm";
|
|
43
|
-
readonly fontSize: "text-xs";
|
|
44
|
-
};
|
|
45
|
-
readonly lg: {
|
|
46
|
-
readonly buttonSize: "h-10 w-10 text-base";
|
|
47
|
-
readonly fontSize: "text-sm";
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
readonly monthConfig: {
|
|
51
|
-
readonly sm: {
|
|
52
|
-
readonly buttonSize: "py-2 px-2 text-xs";
|
|
53
|
-
};
|
|
54
|
-
readonly md: {
|
|
55
|
-
readonly buttonSize: "py-2.5 px-2 text-sm";
|
|
56
|
-
};
|
|
57
|
-
readonly lg: {
|
|
58
|
-
readonly buttonSize: "py-3 px-2 text-base";
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
readonly yearConfig: {
|
|
62
|
-
readonly sm: {
|
|
63
|
-
readonly buttonSize: "py-2 px-2 text-xs";
|
|
64
|
-
};
|
|
65
|
-
readonly md: {
|
|
66
|
-
readonly buttonSize: "py-2.5 px-2 text-sm";
|
|
67
|
-
};
|
|
68
|
-
readonly lg: {
|
|
69
|
-
readonly buttonSize: "py-3 px-2 text-base";
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
readonly headerText: {
|
|
73
|
-
readonly sm: "text-xs";
|
|
74
|
-
readonly md: "text-sm";
|
|
75
|
-
readonly lg: "text-base";
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export type InputSize = keyof typeof inputVariantConfig.size;
|
|
79
|
-
export type InputVariant = keyof typeof inputVariantConfig.variant;
|
|
80
|
-
export type InputColor = keyof typeof inputVariantConfig.color;
|
|
81
|
-
export type InputShape = keyof typeof inputVariantConfig.shape;
|
|
82
|
-
export declare const DEFAULT_INPUT_SIZE: InputSize;
|
|
83
|
-
export declare const DEFAULT_INPUT_VARIANT: InputVariant;
|
|
84
|
-
export declare const DEFAULT_INPUT_COLOR: InputColor;
|
|
85
|
-
export declare const DEFAULT_INPUT_SHAPE: InputShape;
|
|
86
|
-
export declare const getLabelVariant: (size: InputSize) => "label-sm" | "label-md" | "label-lg";
|
|
87
|
-
export declare const getIconSize: (size: InputSize) => "sm" | "lg";
|
|
88
|
-
export declare const getPadding: (size: InputSize, hasStartIcon: boolean, hasEndIcon: boolean) => string;
|
|
89
|
-
export declare const getIconPosition: (size: InputSize) => {
|
|
11
|
+
export declare const getIconSize: (size: "sm" | "md" | "lg" | null | undefined) => "sm" | "lg";
|
|
12
|
+
export declare const getPadding: (size: "sm" | "md" | "lg" | null | undefined, hasStartIcon: boolean, hasEndIcon: boolean) => string;
|
|
13
|
+
export declare const getIconPosition: (size: "sm" | "md" | "lg") => {
|
|
14
|
+
left: string;
|
|
15
|
+
right: string;
|
|
16
|
+
} | {
|
|
17
|
+
left: string;
|
|
18
|
+
right: string;
|
|
19
|
+
} | {
|
|
90
20
|
left: string;
|
|
91
21
|
right: string;
|
|
92
22
|
};
|
|
93
23
|
export { Input } from "./input";
|
|
94
24
|
export type { InputProps } from "./input";
|
|
95
|
-
export { DatePicker } from "./DatePicker";
|
|
96
|
-
export type { InputFieldProps } from "./type";
|
|
97
|
-
export type { DatePickerProps } from "./type";
|
|
@@ -7,89 +7,15 @@ export var inputType = {
|
|
|
7
7
|
search: "search",
|
|
8
8
|
tel: "tel",
|
|
9
9
|
url: "url",
|
|
10
|
-
date: "date",
|
|
11
|
-
};
|
|
12
|
-
export var MONTHS = [
|
|
13
|
-
"January",
|
|
14
|
-
"February",
|
|
15
|
-
"March",
|
|
16
|
-
"April",
|
|
17
|
-
"May",
|
|
18
|
-
"June",
|
|
19
|
-
"July",
|
|
20
|
-
"August",
|
|
21
|
-
"September",
|
|
22
|
-
"October",
|
|
23
|
-
"November",
|
|
24
|
-
"December",
|
|
25
|
-
];
|
|
26
|
-
export var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
27
|
-
// Input variant configurations
|
|
28
|
-
export var inputVariantConfig = {
|
|
29
|
-
variant: {
|
|
30
|
-
filled: "focus-visible:bg-white focus-visible:border-blue-600 focus-visible:ring-blue-600",
|
|
31
|
-
outlined: "border border-gray-200 bg-transparent focus-visible:border-blue-600 focus-visible:ring-blue-600",
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
sm: "h-9 text-sm",
|
|
35
|
-
md: "h-10 text-normal",
|
|
36
|
-
lg: "h-12 text-base",
|
|
37
|
-
},
|
|
38
|
-
color: {
|
|
39
|
-
default: "",
|
|
40
|
-
danger: "border-red-600 focus-visible:border-red-600 focus-visible:ring-red-600",
|
|
41
|
-
warning: "border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500",
|
|
42
|
-
success: "border-green-600 focus-visible:border-green-600 focus-visible:ring-green-600",
|
|
43
|
-
},
|
|
44
|
-
shape: {
|
|
45
|
-
rounded: "rounded-full",
|
|
46
|
-
square: "rounded-sm",
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
// DatePicker and Input styles configuration
|
|
50
|
-
export var datePickerStyles = {
|
|
51
|
-
dayConfig: {
|
|
52
|
-
sm: { buttonSize: "h-8 w-8 text-xs", fontSize: "text-xs" },
|
|
53
|
-
md: { buttonSize: "h-9 w-9 text-sm", fontSize: "text-xs" },
|
|
54
|
-
lg: { buttonSize: "h-10 w-10 text-base", fontSize: "text-sm" },
|
|
55
|
-
},
|
|
56
|
-
monthConfig: {
|
|
57
|
-
sm: { buttonSize: "py-2 px-2 text-xs" },
|
|
58
|
-
md: { buttonSize: "py-2.5 px-2 text-sm" },
|
|
59
|
-
lg: { buttonSize: "py-3 px-2 text-base" },
|
|
60
|
-
},
|
|
61
|
-
yearConfig: {
|
|
62
|
-
sm: { buttonSize: "py-2 px-2 text-xs" },
|
|
63
|
-
md: { buttonSize: "py-2.5 px-2 text-sm" },
|
|
64
|
-
lg: { buttonSize: "py-3 px-2 text-base" },
|
|
65
|
-
},
|
|
66
|
-
headerText: {
|
|
67
|
-
sm: "text-xs",
|
|
68
|
-
md: "text-sm",
|
|
69
|
-
lg: "text-base",
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
// Default values for Input components
|
|
73
|
-
export var DEFAULT_INPUT_SIZE = "md";
|
|
74
|
-
export var DEFAULT_INPUT_VARIANT = "filled";
|
|
75
|
-
export var DEFAULT_INPUT_COLOR = "default";
|
|
76
|
-
export var DEFAULT_INPUT_SHAPE = "square";
|
|
77
|
-
// Label variant mapping for Input sizes
|
|
78
|
-
export var getLabelVariant = function (size) {
|
|
79
|
-
var variantMap = {
|
|
80
|
-
sm: "label-sm",
|
|
81
|
-
md: "label-md",
|
|
82
|
-
lg: "label-lg",
|
|
83
|
-
};
|
|
84
|
-
return variantMap[size];
|
|
85
10
|
};
|
|
11
|
+
// Icon size mapping for Input component
|
|
86
12
|
export var getIconSize = function (size) {
|
|
87
13
|
var sizeMap = {
|
|
88
14
|
sm: "sm",
|
|
89
15
|
md: "sm",
|
|
90
16
|
lg: "lg",
|
|
91
17
|
};
|
|
92
|
-
return sizeMap[size];
|
|
18
|
+
return sizeMap[size || "lg"];
|
|
93
19
|
};
|
|
94
20
|
// Padding calculation for Input component
|
|
95
21
|
export var getPadding = function (size, hasStartIcon, hasEndIcon) {
|
|
@@ -119,19 +45,20 @@ export var getPadding = function (size, hasStartIcon, hasEndIcon) {
|
|
|
119
45
|
withBothIcons: { left: "pl-11", right: "pr-11" },
|
|
120
46
|
},
|
|
121
47
|
};
|
|
122
|
-
var
|
|
48
|
+
var currentSize = size || "lg";
|
|
49
|
+
var verticalPadding = basePadding[currentSize];
|
|
123
50
|
var horizontalClass;
|
|
124
51
|
if (hasStartIcon && hasEndIcon) {
|
|
125
|
-
horizontalClass = "".concat(horizontalPadding[
|
|
52
|
+
horizontalClass = "".concat(horizontalPadding[currentSize].withBothIcons.left, " ").concat(horizontalPadding[currentSize].withBothIcons.right);
|
|
126
53
|
}
|
|
127
54
|
else if (hasStartIcon) {
|
|
128
|
-
horizontalClass = "".concat(horizontalPadding[
|
|
55
|
+
horizontalClass = "".concat(horizontalPadding[currentSize].withStartIcon.left, " ").concat(horizontalPadding[currentSize].withStartIcon.right);
|
|
129
56
|
}
|
|
130
57
|
else if (hasEndIcon) {
|
|
131
|
-
horizontalClass = "".concat(horizontalPadding[
|
|
58
|
+
horizontalClass = "".concat(horizontalPadding[currentSize].withEndIcon.left, " ").concat(horizontalPadding[currentSize].withEndIcon.right);
|
|
132
59
|
}
|
|
133
60
|
else {
|
|
134
|
-
horizontalClass = "".concat(horizontalPadding[
|
|
61
|
+
horizontalClass = "".concat(horizontalPadding[currentSize].normal.left, " ").concat(horizontalPadding[currentSize].normal.right);
|
|
135
62
|
}
|
|
136
63
|
return "".concat(verticalPadding, " ").concat(horizontalClass);
|
|
137
64
|
};
|
|
@@ -146,5 +73,3 @@ export var getIconPosition = function (size) {
|
|
|
146
73
|
};
|
|
147
74
|
// Re-export Input component
|
|
148
75
|
export { Input } from "./input";
|
|
149
|
-
// Re-export DatePicker component
|
|
150
|
-
export { DatePicker } from "./DatePicker";
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
import { type InputSize, type InputShape } from "./";
|
|
4
3
|
import { iconList } from "../../utils/iconList";
|
|
4
|
+
export declare const inputVariantConfig: {
|
|
5
|
+
variant: {
|
|
6
|
+
filled: string;
|
|
7
|
+
outlined: string;
|
|
8
|
+
};
|
|
9
|
+
size: {
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
};
|
|
14
|
+
color: {
|
|
15
|
+
default: string;
|
|
16
|
+
danger: string;
|
|
17
|
+
warning: string;
|
|
18
|
+
success: string;
|
|
19
|
+
};
|
|
20
|
+
shape: {
|
|
21
|
+
rounded: string;
|
|
22
|
+
square: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
5
25
|
export declare const inputVariants: (props?: ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
26
|
+
variant?: "filled" | "outlined" | null | undefined;
|
|
27
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
28
|
+
color?: "default" | "danger" | "warning" | "success" | null | undefined;
|
|
29
|
+
shape?: "square" | "rounded" | null | undefined;
|
|
10
30
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
-
export interface InputProps extends Omit<React.ComponentProps<"input">, "size" | "color">,
|
|
12
|
-
size?: InputSize;
|
|
31
|
+
export interface InputProps extends Omit<React.ComponentProps<"input">, "size" | "color">, VariantProps<typeof inputVariants> {
|
|
13
32
|
startIcon?: keyof typeof iconList;
|
|
14
33
|
endIcon?: keyof typeof iconList;
|
|
15
|
-
shape?:
|
|
34
|
+
shape?: "rounded" | "square";
|
|
16
35
|
}
|
|
17
36
|
declare function Input({ className, variant, size, type, startIcon, endIcon, shape, color, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
18
37
|
export { Input };
|
|
@@ -24,7 +24,29 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
import { cva } from "class-variance-authority";
|
|
25
25
|
import { cn } from "../../lib/utils";
|
|
26
26
|
import LUIcon from "../Icons/LUIcon";
|
|
27
|
-
import { getIconSize, getPadding, getIconPosition
|
|
27
|
+
import { getIconSize, getPadding, getIconPosition } from "./";
|
|
28
|
+
// Export variant configurations for reuse in stories
|
|
29
|
+
export var inputVariantConfig = {
|
|
30
|
+
variant: {
|
|
31
|
+
filled: "focus-visible:bg-white focus-visible:border-blue-600 focus-visible:ring-blue-600",
|
|
32
|
+
outlined: "border border-gray-200 bg-transparent focus-visible:border-blue-600 focus-visible:ring-blue-600",
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
sm: "h-9 text-sm",
|
|
36
|
+
md: "h-10 text-normal",
|
|
37
|
+
lg: "h-12 text-base",
|
|
38
|
+
},
|
|
39
|
+
color: {
|
|
40
|
+
default: "",
|
|
41
|
+
danger: "border-red-600 focus-visible:border-red-600 focus-visible:ring-red-600",
|
|
42
|
+
warning: "border-yellow-500 focus-visible:border-yellow-500 focus-visible:ring-yellow-500",
|
|
43
|
+
success: "border-green-600 focus-visible:border-green-600 focus-visible:ring-green-600",
|
|
44
|
+
},
|
|
45
|
+
shape: {
|
|
46
|
+
rounded: "rounded-full",
|
|
47
|
+
square: "rounded-sm",
|
|
48
|
+
},
|
|
49
|
+
};
|
|
28
50
|
export var inputVariants = cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary text-gray-900 selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 !border bg-transparent text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
29
51
|
variants: inputVariantConfig,
|
|
30
52
|
compoundVariants: [
|
|
@@ -75,17 +97,17 @@ export var inputVariants = cva("file:text-foreground placeholder:text-muted-fore
|
|
|
75
97
|
},
|
|
76
98
|
],
|
|
77
99
|
defaultVariants: {
|
|
78
|
-
variant:
|
|
79
|
-
size:
|
|
80
|
-
color:
|
|
81
|
-
shape:
|
|
100
|
+
variant: "filled",
|
|
101
|
+
size: "md",
|
|
102
|
+
color: "default",
|
|
103
|
+
shape: "square",
|
|
82
104
|
},
|
|
83
105
|
});
|
|
84
106
|
function Input(_a) {
|
|
85
|
-
var className = _a.className, variant = _a.variant, _b = _a.size, size = _b === void 0 ?
|
|
107
|
+
var className = _a.className, variant = _a.variant, _b = _a.size, size = _b === void 0 ? "md" : _b, type = _a.type, startIcon = _a.startIcon, endIcon = _a.endIcon, _c = _a.shape, shape = _c === void 0 ? "square" : _c, color = _a.color, props = __rest(_a, ["className", "variant", "size", "type", "startIcon", "endIcon", "shape", "color"]);
|
|
86
108
|
var iconSizeClass = getIconSize(size);
|
|
87
109
|
var paddingClass = getPadding(size, !!startIcon, !!endIcon);
|
|
88
|
-
var iconPosition = getIconPosition(size);
|
|
110
|
+
var iconPosition = getIconPosition(size || "md");
|
|
89
111
|
return (_jsxs("div", { className: "relative", children: [startIcon && (_jsx("div", { className: "absolute ".concat(iconPosition.left, " top-1/2 -translate-y-1/2 pointer-events-none z-10"), children: _jsx(LUIcon, { icon: startIcon, size: iconSizeClass }) })), _jsx("input", __assign({ type: type, "data-slot": "input", className: cn(inputVariants({ variant: variant, size: size, color: color, shape: shape }), paddingClass, className) }, props)), endIcon && (_jsx("div", { className: "absolute ".concat(iconPosition.right, " top-1/2 -translate-y-1/2 pointer-events-none z-10"), children: _jsx(LUIcon, { icon: endIcon, size: iconSizeClass }) }))] }));
|
|
90
112
|
}
|
|
91
113
|
export { Input };
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import { iconList } from "../../utils/iconList";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export interface InputFieldProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
3
|
+
type: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
value?: string;
|
|
9
|
+
variant?: "filled" | "outlined";
|
|
10
|
+
size?: "sm" | "md" | "lg";
|
|
6
11
|
startIcon?: keyof typeof iconList;
|
|
7
12
|
endIcon?: keyof typeof iconList;
|
|
8
|
-
color?:
|
|
9
|
-
shape?: InputShape;
|
|
10
|
-
}
|
|
11
|
-
export interface DatePickerProps extends Omit<React.ComponentProps<"input">, "size" | "color" | "value" | "onChange" | "variant" | "shape"> {
|
|
12
|
-
startIcon?: keyof typeof iconList;
|
|
13
|
-
endIcon?: keyof typeof iconList;
|
|
14
|
-
variant?: InputVariant;
|
|
15
|
-
size?: InputSize;
|
|
16
|
-
color?: InputColor;
|
|
17
|
-
shape?: InputShape;
|
|
18
|
-
value?: Date | null;
|
|
19
|
-
onChange?: (date: Date | null) => void;
|
|
20
|
-
minDate?: Date;
|
|
21
|
-
maxDate?: Date;
|
|
13
|
+
color?: "default" | "danger" | "warning" | "success";
|
|
22
14
|
}
|
|
@@ -8,7 +8,7 @@ export declare const variant: {
|
|
|
8
8
|
"label-sm": string;
|
|
9
9
|
};
|
|
10
10
|
declare const labelVariants: (props?: ({
|
|
11
|
-
variant?: "label-sm" | "label-
|
|
11
|
+
variant?: "label-sm" | "label-xl" | "label-lg" | "label-md" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
declare function Label({ className, variant, ...props }: React.ComponentProps<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export { Label, labelVariants };
|
package/dist/styles/global.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -191,9 +191,6 @@
|
|
|
191
191
|
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
192
192
|
padding-block: 0;
|
|
193
193
|
}
|
|
194
|
-
::-webkit-calendar-picker-indicator {
|
|
195
|
-
line-height: 1;
|
|
196
|
-
}
|
|
197
194
|
:-moz-ui-invalid {
|
|
198
195
|
box-shadow: none;
|
|
199
196
|
}
|
|
@@ -224,7 +221,7 @@
|
|
|
224
221
|
padding: 0;
|
|
225
222
|
margin: -1px;
|
|
226
223
|
overflow: hidden;
|
|
227
|
-
clip
|
|
224
|
+
clip: rect(0, 0, 0, 0);
|
|
228
225
|
white-space: nowrap;
|
|
229
226
|
border-width: 0;
|
|
230
227
|
}
|
|
@@ -321,9 +318,6 @@
|
|
|
321
318
|
.z-\[1000\] {
|
|
322
319
|
z-index: 1000;
|
|
323
320
|
}
|
|
324
|
-
.z-\[9999\] {
|
|
325
|
-
z-index: 9999;
|
|
326
|
-
}
|
|
327
321
|
.order-1 {
|
|
328
322
|
order: 1;
|
|
329
323
|
}
|
|
@@ -710,9 +704,6 @@
|
|
|
710
704
|
.max-h-\[300px\] {
|
|
711
705
|
max-height: 300px;
|
|
712
706
|
}
|
|
713
|
-
.max-h-\[400px\] {
|
|
714
|
-
max-height: 400px;
|
|
715
|
-
}
|
|
716
707
|
.max-h-\[500px\] {
|
|
717
708
|
max-height: 500px;
|
|
718
709
|
}
|
|
@@ -839,9 +830,6 @@
|
|
|
839
830
|
.w-\[52px\] {
|
|
840
831
|
width: 52px;
|
|
841
832
|
}
|
|
842
|
-
.w-auto {
|
|
843
|
-
width: auto;
|
|
844
|
-
}
|
|
845
833
|
.w-fit {
|
|
846
834
|
width: fit-content;
|
|
847
835
|
}
|
|
@@ -986,12 +974,6 @@
|
|
|
986
974
|
.grid-cols-1 {
|
|
987
975
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
988
976
|
}
|
|
989
|
-
.grid-cols-3 {
|
|
990
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
991
|
-
}
|
|
992
|
-
.grid-cols-7 {
|
|
993
|
-
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
994
|
-
}
|
|
995
977
|
.grid-cols-\[repeat\(auto-fill\,minmax\(180px\,1fr\)\)\] {
|
|
996
978
|
grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
|
|
997
979
|
}
|
|
@@ -1326,9 +1308,6 @@
|
|
|
1326
1308
|
.\!bg-black {
|
|
1327
1309
|
background-color: #030404 !important;
|
|
1328
1310
|
}
|
|
1329
|
-
.\!bg-blue-600 {
|
|
1330
|
-
background-color: #276ab3 !important;
|
|
1331
|
-
}
|
|
1332
1311
|
.\!bg-primary {
|
|
1333
1312
|
background-color: var(--primary) !important;
|
|
1334
1313
|
}
|
|
@@ -1680,9 +1659,6 @@
|
|
|
1680
1659
|
.\!px-6 {
|
|
1681
1660
|
padding-inline: calc(var(--spacing) * 6) !important;
|
|
1682
1661
|
}
|
|
1683
|
-
.px-1 {
|
|
1684
|
-
padding-inline: calc(var(--spacing) * 1);
|
|
1685
|
-
}
|
|
1686
1662
|
.px-2 {
|
|
1687
1663
|
padding-inline: calc(var(--spacing) * 2);
|
|
1688
1664
|
}
|
|
@@ -1990,9 +1966,6 @@
|
|
|
1990
1966
|
.text-current {
|
|
1991
1967
|
color: currentcolor;
|
|
1992
1968
|
}
|
|
1993
|
-
.text-destructive {
|
|
1994
|
-
color: var(--destructive);
|
|
1995
|
-
}
|
|
1996
1969
|
.text-foreground {
|
|
1997
1970
|
color: var(--foreground);
|
|
1998
1971
|
}
|
|
@@ -2185,9 +2158,6 @@
|
|
|
2185
2158
|
.opacity-0 {
|
|
2186
2159
|
opacity: 0%;
|
|
2187
2160
|
}
|
|
2188
|
-
.opacity-40 {
|
|
2189
|
-
opacity: 40%;
|
|
2190
|
-
}
|
|
2191
2161
|
.opacity-50 {
|
|
2192
2162
|
opacity: 50%;
|
|
2193
2163
|
}
|
|
@@ -2229,10 +2199,6 @@
|
|
|
2229
2199
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2230
2200
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2231
2201
|
}
|
|
2232
|
-
.shadow-xl {
|
|
2233
|
-
--tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2234
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2235
|
-
}
|
|
2236
2202
|
.shadow-xs {
|
|
2237
2203
|
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));
|
|
2238
2204
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2270,7 +2236,7 @@
|
|
|
2270
2236
|
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
2271
2237
|
}
|
|
2272
2238
|
.transition {
|
|
2273
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
2239
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;
|
|
2274
2240
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2275
2241
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2276
2242
|
}
|
|
@@ -2911,13 +2877,6 @@
|
|
|
2911
2877
|
}
|
|
2912
2878
|
}
|
|
2913
2879
|
}
|
|
2914
|
-
.hover\:bg-transparent {
|
|
2915
|
-
&:hover {
|
|
2916
|
-
@media (hover: hover) {
|
|
2917
|
-
background-color: transparent;
|
|
2918
|
-
}
|
|
2919
|
-
}
|
|
2920
|
-
}
|
|
2921
2880
|
.hover\:bg-yellow-50 {
|
|
2922
2881
|
&:hover {
|
|
2923
2882
|
@media (hover: hover) {
|
|
@@ -3512,11 +3471,6 @@
|
|
|
3512
3471
|
--tw-ring-color: #3a84d4;
|
|
3513
3472
|
}
|
|
3514
3473
|
}
|
|
3515
|
-
.focus\:ring-blue-600 {
|
|
3516
|
-
&:focus {
|
|
3517
|
-
--tw-ring-color: #276ab3;
|
|
3518
|
-
}
|
|
3519
|
-
}
|
|
3520
3474
|
.focus\:ring-ring {
|
|
3521
3475
|
&:focus {
|
|
3522
3476
|
--tw-ring-color: var(--ring);
|