@a2v2ai/uikit 0.0.20 → 0.0.22
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/Calendar/Calendar.js +1 -1
- package/Input/Input.js +2 -2
- package/Select/Select.js +1 -1
- package/index.css +9 -0
- package/package.json +1 -1
package/Calendar/Calendar.js
CHANGED
|
@@ -45,7 +45,7 @@ const Button_1 = require("../Button/Button");
|
|
|
45
45
|
const Typography_1 = require("../Typography/Typography");
|
|
46
46
|
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, error, ...props }) {
|
|
47
47
|
const defaultClassNames = (0, react_day_picker_1.getDefaultClassNames)();
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)(react_day_picker_1.DayPicker, { showOutsideDays: showOutsideDays, className: (0, utils_1.cn)("bg-white group/calendar p-3 rounded-lg border", error ? "border-error-500" : "border-grey-200", className), captionLayout: captionLayout, formatters: {
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-fit", children: [(0, jsx_runtime_1.jsx)(react_day_picker_1.DayPicker, { showOutsideDays: showOutsideDays, className: (0, utils_1.cn)("bg-white group/calendar p-3 rounded-lg border", error ? "border-error-500" : "border-grey-200", className), captionLayout: captionLayout, formatters: {
|
|
49
49
|
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
50
50
|
...formatters,
|
|
51
51
|
}, classNames: {
|
package/Input/Input.js
CHANGED
|
@@ -67,11 +67,11 @@ const Input = React.forwardRef(({ className, type = "text", size, roundness, var
|
|
|
67
67
|
const hasAddons = leftIcon || rightIcon || leftAddon || rightAddon || rightElement;
|
|
68
68
|
const computedVariant = error ? "error" : variant;
|
|
69
69
|
if (hasAddons) {
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors", "focus-within:ring-[3px]", computedVariant === "error"
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
|
|
71
71
|
? "border-error-500 focus-within:border-error-500 focus-within:ring-error-200"
|
|
72
72
|
: "border-grey-300 focus-within:border-grey-300 focus-within:ring-grey-300/50", size === "mini" && "h-6 pl-3 pr-0.5 text-xs rounded-md", size === "small" && "h-8 pl-3 pr-0.5 text-sm rounded-md", size === "regular" && "h-9 pl-3 pr-0.5 text-sm rounded-lg", size === "large" && "h-10 pl-3 pr-0.5 text-base rounded-lg", !size && "h-9 pl-3 pr-0.5 text-sm rounded-lg", !rightElement && "pr-3", roundness === "round" && "!rounded-full", props.disabled && "opacity-50 cursor-not-allowed bg-grey-50", className), children: [leftIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: leftIcon })), leftAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: leftAddon })), (0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)("flex-1 min-w-0 bg-transparent border-0 outline-none placeholder:text-grey-400", "disabled:cursor-not-allowed"), ref: ref, ...props }), rightAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: rightAddon })), rightIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: rightIcon })), rightElement && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: rightElement }))] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
73
73
|
}
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
75
75
|
});
|
|
76
76
|
exports.Input = Input;
|
|
77
77
|
Input.displayName = "Input";
|
package/Select/Select.js
CHANGED
|
@@ -67,7 +67,7 @@ const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full i
|
|
|
67
67
|
exports.selectTriggerVariants = selectTriggerVariants;
|
|
68
68
|
const SelectTrigger = React.forwardRef(({ className, size, variant, error, children, ...props }, ref) => {
|
|
69
69
|
const computedVariant = error ? "error" : variant;
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col w-full", children: [(0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
|
|
71
71
|
});
|
|
72
72
|
exports.SelectTrigger = SelectTrigger;
|
|
73
73
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
package/index.css
CHANGED
|
@@ -101,6 +101,15 @@
|
|
|
101
101
|
--radius-2xl: 1rem;
|
|
102
102
|
--radius-full: 9999px;
|
|
103
103
|
|
|
104
|
+
/* Shadows */
|
|
105
|
+
--shadow-2xs: 0 1px 0 0 rgba(0, 0, 0, 0.05);
|
|
106
|
+
--shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
107
|
+
--shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10);
|
|
108
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);
|
|
109
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10);
|
|
110
|
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10);
|
|
111
|
+
--shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
112
|
+
|
|
104
113
|
/* Typography styles (matching Typography component) */
|
|
105
114
|
/* Font sizes */
|
|
106
115
|
--font-size-h1: 64px;
|