@lindle/linoardo 1.0.39 → 1.0.40
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/chip.js +2 -1
- package/dist/chunk-4J3SRVOS.js +217 -0
- package/dist/chunk-4J3SRVOS.js.map +1 -0
- package/dist/chunk-HT5XBHWN.js +119 -0
- package/dist/chunk-HT5XBHWN.js.map +1 -0
- package/dist/{chunk-BDN4EDJQ.js → chunk-LULQOD2K.js} +12 -6
- package/dist/chunk-LULQOD2K.js.map +1 -0
- package/dist/{chunk-P3ESW6KM.js → chunk-OBGYXMZ3.js} +74 -28
- package/dist/chunk-OBGYXMZ3.js.map +1 -0
- package/dist/{chunk-HJFHZNOV.js → chunk-PSMGRUU5.js} +3 -116
- package/dist/chunk-PSMGRUU5.js.map +1 -0
- package/dist/index.cjs +290 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +71 -25
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.cts +2 -0
- package/dist/input.d.ts +2 -0
- package/dist/input.js +1 -1
- package/dist/select.cjs +14 -4
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +3 -2
- package/dist/select.d.ts +3 -2
- package/dist/select.js +1 -1
- package/dist/styles.css +132 -5
- package/dist/timeline.cjs +274 -0
- package/dist/timeline.cjs.map +1 -0
- package/dist/timeline.d.cts +54 -0
- package/dist/timeline.d.ts +54 -0
- package/dist/timeline.js +5 -0
- package/dist/timeline.js.map +1 -0
- package/package.json +7 -1
- package/dist/chunk-BDN4EDJQ.js.map +0 -1
- package/dist/chunk-HJFHZNOV.js.map +0 -1
- package/dist/chunk-P3ESW6KM.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2299,6 +2299,8 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2299
2299
|
className,
|
|
2300
2300
|
wrapperClassName,
|
|
2301
2301
|
label,
|
|
2302
|
+
prefix,
|
|
2303
|
+
suffix,
|
|
2302
2304
|
...props
|
|
2303
2305
|
}, ref) => {
|
|
2304
2306
|
const { placeholder, onFocus, onBlur, ...inputProps } = props;
|
|
@@ -2319,19 +2321,51 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2319
2321
|
rounded: "rounded-full px-4 border border-gray-300 bg-white focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 shadow-sm dark:border-gray-600 dark:bg-slate-900 dark:focus-visible:border-primary/70 dark:focus-visible:ring-primary/30 dark:shadow-black/20"
|
|
2320
2322
|
};
|
|
2321
2323
|
const sizeClasses4 = {
|
|
2322
|
-
"x-small": {
|
|
2324
|
+
"x-small": {
|
|
2325
|
+
paddingY: "py-2",
|
|
2326
|
+
paddingLeft: "pl-2",
|
|
2327
|
+
paddingRight: "pr-2",
|
|
2328
|
+
paddingLeftLeading: "pl-8",
|
|
2329
|
+
paddingLeftLeadingDouble: "pl-12",
|
|
2330
|
+
paddingRightTrailing: "pr-8",
|
|
2331
|
+
text: "text-xs"
|
|
2332
|
+
},
|
|
2323
2333
|
small: {
|
|
2324
|
-
|
|
2325
|
-
|
|
2334
|
+
paddingY: "py-2.5",
|
|
2335
|
+
paddingLeft: "pl-2.5",
|
|
2336
|
+
paddingRight: "pr-2.5",
|
|
2337
|
+
paddingLeftLeading: "pl-9",
|
|
2338
|
+
paddingLeftLeadingDouble: "pl-12",
|
|
2339
|
+
paddingRightTrailing: "pr-9",
|
|
2326
2340
|
text: "text-sm"
|
|
2327
2341
|
},
|
|
2328
|
-
medium: {
|
|
2342
|
+
medium: {
|
|
2343
|
+
paddingY: "py-3",
|
|
2344
|
+
paddingLeft: "pl-3",
|
|
2345
|
+
paddingRight: "pr-3",
|
|
2346
|
+
paddingLeftLeading: "pl-10",
|
|
2347
|
+
paddingLeftLeadingDouble: "pl-14",
|
|
2348
|
+
paddingRightTrailing: "pr-10",
|
|
2349
|
+
text: "text-base"
|
|
2350
|
+
},
|
|
2329
2351
|
large: {
|
|
2330
|
-
|
|
2331
|
-
|
|
2352
|
+
paddingY: "py-3.5",
|
|
2353
|
+
paddingLeft: "pl-3.5",
|
|
2354
|
+
paddingRight: "pr-3.5",
|
|
2355
|
+
paddingLeftLeading: "pl-11",
|
|
2356
|
+
paddingLeftLeadingDouble: "pl-14",
|
|
2357
|
+
paddingRightTrailing: "pr-11",
|
|
2332
2358
|
text: "text-lg"
|
|
2333
2359
|
},
|
|
2334
|
-
"x-large": {
|
|
2360
|
+
"x-large": {
|
|
2361
|
+
paddingY: "py-4",
|
|
2362
|
+
paddingLeft: "pl-4",
|
|
2363
|
+
paddingRight: "pr-4",
|
|
2364
|
+
paddingLeftLeading: "pl-12",
|
|
2365
|
+
paddingLeftLeadingDouble: "pl-16",
|
|
2366
|
+
paddingRightTrailing: "pr-12",
|
|
2367
|
+
text: "text-xl"
|
|
2368
|
+
}
|
|
2335
2369
|
};
|
|
2336
2370
|
const status = error ? { tone: "error", message: error } : warn ? { tone: "warn", message: warn } : success ? { tone: "success", message: success } : void 0;
|
|
2337
2371
|
const statusClasses = {
|
|
@@ -2347,16 +2381,23 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2347
2381
|
const variantClass = variantClasses5[variant] ?? variantClasses5.outline;
|
|
2348
2382
|
const toneClass = status ? statusClasses[status.tone] : void 0;
|
|
2349
2383
|
let prependIconClass = resolveIconClassName4(icon);
|
|
2384
|
+
const hasPrefix = typeof prefix === "string" ? prefix.trim().length > 0 : Boolean(prefix);
|
|
2385
|
+
const hasSuffix = typeof suffix === "string" ? suffix.trim().length > 0 : Boolean(suffix);
|
|
2386
|
+
const hasLeadingIcon = Boolean(prependIconClass);
|
|
2387
|
+
const hasLeadingAdornment = hasLeadingIcon || hasPrefix;
|
|
2388
|
+
const hasTrailingAdornment = hasSuffix;
|
|
2350
2389
|
const sizeConfig = sizeClasses4[size] ?? sizeClasses4.medium;
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
].join(" ");
|
|
2390
|
+
const leftPaddingClass = hasPrefix ? sizeConfig.paddingLeftLeadingDouble : hasLeadingAdornment ? sizeConfig.paddingLeftLeading : sizeConfig.paddingLeft;
|
|
2391
|
+
const rightPaddingClass = hasTrailingAdornment ? sizeConfig.paddingRightTrailing : sizeConfig.paddingRight;
|
|
2392
|
+
const sizeClass = [sizeConfig.paddingY, leftPaddingClass, rightPaddingClass, sizeConfig.text].join(" ");
|
|
2355
2393
|
const inputName = inputProps.name || reactId;
|
|
2356
2394
|
const basePlaceholder = placeholder ?? (hasLabel ? " " : void 0);
|
|
2357
2395
|
const placeholderValue = hidePlaceholderUntilFocus ? isFocused ? placeholder : " " : basePlaceholder;
|
|
2358
2396
|
const placeholderClass = hidePlaceholderUntilFocus ? "placeholder-transparent focus:placeholder-gray-500 focus:dark:placeholder-gray-400" : void 0;
|
|
2359
|
-
const labelLeftClass =
|
|
2397
|
+
const labelLeftClass = hasLeadingAdornment ? "left-10" : "left-3";
|
|
2398
|
+
const labelFocusLeftClass = hasLeadingAdornment ? "peer-focus:left-10" : "peer-focus:left-3";
|
|
2399
|
+
const renderPrefix = hasPrefix ? typeof prefix === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: prefix }) : prefix : null;
|
|
2400
|
+
const renderSuffix = hasSuffix ? typeof suffix === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-gray-500 dark:text-gray-400", sizeConfig.text), children: suffix }) : suffix : null;
|
|
2360
2401
|
const labelBgDefault = ["outline", "text", "underlined"].includes(variant) ? "bg-transparent" : "bg-white/90 dark:bg-slate-900";
|
|
2361
2402
|
const handleFocus = (event) => {
|
|
2362
2403
|
if (hidePlaceholderUntilFocus) setIsFocused(true);
|
|
@@ -2368,17 +2409,20 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2368
2409
|
};
|
|
2369
2410
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex flex-col gap-1", wrapperClassName), children: [
|
|
2370
2411
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2412
|
+
hasLeadingAdornment && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "absolute left-3 inset-y-0 flex items-center gap-2", children: [
|
|
2413
|
+
prependIconClass && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2414
|
+
"i",
|
|
2415
|
+
{
|
|
2416
|
+
className: tailwindMerge.twMerge(
|
|
2417
|
+
"text-gray-500 dark:text-gray-400",
|
|
2418
|
+
status?.tone && statusMessageClasses[status?.tone] || "",
|
|
2419
|
+
prependIconClass
|
|
2420
|
+
),
|
|
2421
|
+
"aria-hidden": true
|
|
2422
|
+
}
|
|
2423
|
+
),
|
|
2424
|
+
renderPrefix
|
|
2425
|
+
] }),
|
|
2382
2426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2383
2427
|
"input",
|
|
2384
2428
|
{
|
|
@@ -2408,16 +2452,18 @@ var Input = React4__namespace.default.forwardRef(
|
|
|
2408
2452
|
"absolute transition-all duration-150 pointer-events-none text-gray-700 rounded dark:text-gray-200",
|
|
2409
2453
|
labelLeftClass,
|
|
2410
2454
|
// Floated state: center label's vertical middle on the top border line
|
|
2411
|
-
"-top-1.5
|
|
2455
|
+
"-top-1.5 -translate-y-2/3 text-xs px-1",
|
|
2412
2456
|
labelBgDefault,
|
|
2413
2457
|
// focus state mirrors floated state (keeps center on border)
|
|
2458
|
+
labelFocusLeftClass,
|
|
2414
2459
|
"peer-focus:top-0 peer-focus:-translate-y-1/2 peer-focus:text-xs peer-focus:px-1 peer-focus:bg-white peer-focus:text-gray-600 dark:peer-focus:bg-slate-900 dark:peer-focus:text-gray-300",
|
|
2415
2460
|
// when input is empty (placeholder shown) -> center label inside input
|
|
2416
2461
|
"peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-sm peer-placeholder-shown:bg-transparent peer-placeholder-shown:text-gray-500 dark:peer-placeholder-shown:text-gray-400"
|
|
2417
2462
|
),
|
|
2418
2463
|
children: label
|
|
2419
2464
|
}
|
|
2420
|
-
)
|
|
2465
|
+
),
|
|
2466
|
+
hasTrailingAdornment && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-3 inset-y-0 flex items-center", children: renderSuffix })
|
|
2421
2467
|
] }),
|
|
2422
2468
|
status?.message && /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("text-sm", statusMessageClasses[status.tone]), children: status.message })
|
|
2423
2469
|
] });
|
|
@@ -2945,7 +2991,7 @@ var resolveIconClassName5 = (icon) => {
|
|
|
2945
2991
|
const classes = [...baseClasses, normalizedName];
|
|
2946
2992
|
return Array.from(new Set(classes)).join(" ");
|
|
2947
2993
|
};
|
|
2948
|
-
var Select = ({
|
|
2994
|
+
var Select = React4__namespace.default.forwardRef(({
|
|
2949
2995
|
options,
|
|
2950
2996
|
label,
|
|
2951
2997
|
placeholder,
|
|
@@ -2963,9 +3009,11 @@ var Select = ({
|
|
|
2963
3009
|
disabled,
|
|
2964
3010
|
required,
|
|
2965
3011
|
onChange,
|
|
3012
|
+
onBlur,
|
|
2966
3013
|
...props
|
|
2967
|
-
}) => {
|
|
3014
|
+
}, ref) => {
|
|
2968
3015
|
const selectId = id || name || generateString();
|
|
3016
|
+
const inputName = name || selectId;
|
|
2969
3017
|
const variantClass = variantClasses4[variant] ?? variantClasses4.outline;
|
|
2970
3018
|
const sizeConfig = sizeClasses2[size] ?? sizeClasses2.medium;
|
|
2971
3019
|
const sizeClass = `${sizeConfig.padding} ${sizeConfig.text}`;
|
|
@@ -3023,12 +3071,14 @@ var Select = ({
|
|
|
3023
3071
|
{
|
|
3024
3072
|
type: multiple ? "checkbox" : "radio",
|
|
3025
3073
|
id: inputId,
|
|
3026
|
-
name:
|
|
3074
|
+
name: inputName,
|
|
3027
3075
|
value: option.value,
|
|
3028
3076
|
disabled: option.disabled || disabled,
|
|
3029
3077
|
checked: value !== void 0 ? isSelected : void 0,
|
|
3030
3078
|
defaultChecked: defaultValue !== void 0 ? isDefaultSelected : void 0,
|
|
3031
3079
|
onChange: handleOptionChange,
|
|
3080
|
+
onBlur,
|
|
3081
|
+
ref,
|
|
3032
3082
|
required: required && !multiple,
|
|
3033
3083
|
className: "peer sr-only"
|
|
3034
3084
|
}
|
|
@@ -3052,7 +3102,8 @@ var Select = ({
|
|
|
3052
3102
|
] }),
|
|
3053
3103
|
helperText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("mt-1 text-xs text-gray-500", error && "text-red-500"), children: helperText })
|
|
3054
3104
|
] });
|
|
3055
|
-
};
|
|
3105
|
+
});
|
|
3106
|
+
Select.displayName = "Select";
|
|
3056
3107
|
var Select_default = Select;
|
|
3057
3108
|
var paletteValues = {
|
|
3058
3109
|
primary: {
|
|
@@ -3943,6 +3994,214 @@ var Progress = (props) => {
|
|
|
3943
3994
|
);
|
|
3944
3995
|
};
|
|
3945
3996
|
var Progress_default = Progress;
|
|
3997
|
+
var densityGapClasses = {
|
|
3998
|
+
default: "gap-6",
|
|
3999
|
+
compact: "gap-4"
|
|
4000
|
+
};
|
|
4001
|
+
var alignClasses = {
|
|
4002
|
+
start: "items-start",
|
|
4003
|
+
center: "items-center",
|
|
4004
|
+
end: "items-end"
|
|
4005
|
+
};
|
|
4006
|
+
var dotSizeClasses = {
|
|
4007
|
+
sm: "h-6 w-6 text-xs",
|
|
4008
|
+
md: "h-8 w-8 text-sm",
|
|
4009
|
+
lg: "h-10 w-10 text-base"
|
|
4010
|
+
};
|
|
4011
|
+
var paletteDotClasses = {
|
|
4012
|
+
primary: {
|
|
4013
|
+
filled: { dot: "bg-primary text-white border border-primary", ring: "ring-primary/30" },
|
|
4014
|
+
outlined: { dot: "bg-white text-primary border border-primary", ring: "ring-primary/20" },
|
|
4015
|
+
tonal: { dot: "bg-primary/15 text-primary border border-primary/20", ring: "ring-primary/20" }
|
|
4016
|
+
},
|
|
4017
|
+
neutral: {
|
|
4018
|
+
filled: { dot: "bg-gray-900 text-white border border-gray-900", ring: "ring-gray-900/20" },
|
|
4019
|
+
outlined: { dot: "bg-white text-gray-900 border border-gray-900", ring: "ring-gray-900/15" },
|
|
4020
|
+
tonal: { dot: "bg-gray-100 text-gray-800 border border-gray-200", ring: "ring-gray-900/10" }
|
|
4021
|
+
},
|
|
4022
|
+
info: {
|
|
4023
|
+
filled: { dot: "bg-sky-500 text-white border border-sky-500", ring: "ring-sky-500/30" },
|
|
4024
|
+
outlined: { dot: "bg-white text-sky-600 border border-sky-500", ring: "ring-sky-500/20" },
|
|
4025
|
+
tonal: { dot: "bg-sky-100 text-sky-700 border border-sky-200", ring: "ring-sky-500/20" }
|
|
4026
|
+
},
|
|
4027
|
+
success: {
|
|
4028
|
+
filled: { dot: "bg-emerald-500 text-white border border-emerald-500", ring: "ring-emerald-500/30" },
|
|
4029
|
+
outlined: { dot: "bg-white text-emerald-600 border border-emerald-500", ring: "ring-emerald-500/20" },
|
|
4030
|
+
tonal: { dot: "bg-emerald-100 text-emerald-700 border border-emerald-200", ring: "ring-emerald-500/20" }
|
|
4031
|
+
},
|
|
4032
|
+
warning: {
|
|
4033
|
+
filled: { dot: "bg-amber-500 text-white border border-amber-500", ring: "ring-amber-500/30" },
|
|
4034
|
+
outlined: { dot: "bg-white text-amber-700 border border-amber-500", ring: "ring-amber-500/20" },
|
|
4035
|
+
tonal: { dot: "bg-amber-100 text-amber-800 border border-amber-200", ring: "ring-amber-500/20" }
|
|
4036
|
+
},
|
|
4037
|
+
danger: {
|
|
4038
|
+
filled: { dot: "bg-red-500 text-white border border-red-500", ring: "ring-red-500/30" },
|
|
4039
|
+
outlined: { dot: "bg-white text-red-600 border border-red-500", ring: "ring-red-500/20" },
|
|
4040
|
+
tonal: { dot: "bg-red-100 text-red-700 border border-red-200", ring: "ring-red-500/20" }
|
|
4041
|
+
},
|
|
4042
|
+
surface: {
|
|
4043
|
+
filled: { dot: "bg-white text-gray-900 border border-gray-200", ring: "ring-gray-300/30" },
|
|
4044
|
+
outlined: { dot: "bg-white text-gray-900 border border-gray-300", ring: "ring-gray-300/20" },
|
|
4045
|
+
tonal: { dot: "bg-gray-50 text-gray-800 border border-gray-200", ring: "ring-gray-300/20" }
|
|
4046
|
+
},
|
|
4047
|
+
bw: {
|
|
4048
|
+
filled: { dot: "bg-black text-white border border-black", ring: "ring-black/30" },
|
|
4049
|
+
outlined: { dot: "bg-white text-black border border-black", ring: "ring-black/20" },
|
|
4050
|
+
tonal: { dot: "bg-black/10 text-black border border-black/20", ring: "ring-black/20" }
|
|
4051
|
+
}
|
|
4052
|
+
};
|
|
4053
|
+
var resolveDotPalette = (color, variant) => {
|
|
4054
|
+
const palette = paletteDotClasses[color] ?? paletteDotClasses.primary;
|
|
4055
|
+
return palette[variant] ?? palette.filled;
|
|
4056
|
+
};
|
|
4057
|
+
var resolveSide = (side, index) => {
|
|
4058
|
+
if (side === "alternate") {
|
|
4059
|
+
return index % 2 === 0 ? "left" : "right";
|
|
4060
|
+
}
|
|
4061
|
+
return side;
|
|
4062
|
+
};
|
|
4063
|
+
var resolveIconNode2 = (icon) => {
|
|
4064
|
+
if (!icon) return null;
|
|
4065
|
+
const iconClass = resolveIconClassName2(icon);
|
|
4066
|
+
return iconClass ? /* @__PURE__ */ jsxRuntime.jsx("i", { className: iconClass, "aria-hidden": true }) : null;
|
|
4067
|
+
};
|
|
4068
|
+
var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
4069
|
+
const {
|
|
4070
|
+
title,
|
|
4071
|
+
subtitle,
|
|
4072
|
+
opposite,
|
|
4073
|
+
icon,
|
|
4074
|
+
dot,
|
|
4075
|
+
color,
|
|
4076
|
+
variant = "filled",
|
|
4077
|
+
side,
|
|
4078
|
+
align,
|
|
4079
|
+
hideLine,
|
|
4080
|
+
dotClassName,
|
|
4081
|
+
contentClassName,
|
|
4082
|
+
oppositeClassName,
|
|
4083
|
+
lineClassName,
|
|
4084
|
+
className,
|
|
4085
|
+
children,
|
|
4086
|
+
__timelineSide = "right",
|
|
4087
|
+
__timelineAlign = "center",
|
|
4088
|
+
__timelineDensity = "default",
|
|
4089
|
+
__timelineColor = "primary",
|
|
4090
|
+
__timelineDotSize = "md",
|
|
4091
|
+
__timelineLineColor,
|
|
4092
|
+
__timelineLineWidth = 2,
|
|
4093
|
+
__timelineIndex = 0,
|
|
4094
|
+
__timelineCount = 1,
|
|
4095
|
+
...rest
|
|
4096
|
+
} = props;
|
|
4097
|
+
const resolvedAlign = align ?? __timelineAlign;
|
|
4098
|
+
const resolvedSide = resolveSide(side ?? __timelineSide, __timelineIndex);
|
|
4099
|
+
const resolvedColor = color ?? __timelineColor;
|
|
4100
|
+
const dotSizeClass = dotSizeClasses[__timelineDotSize] ?? dotSizeClasses.md;
|
|
4101
|
+
const dotPalette = resolveDotPalette(resolvedColor, variant);
|
|
4102
|
+
const iconNode = resolveIconNode2(icon);
|
|
4103
|
+
const isLast = __timelineIndex >= __timelineCount - 1;
|
|
4104
|
+
const showLine = !hideLine && !isLast;
|
|
4105
|
+
const lineStyle = {
|
|
4106
|
+
width: __timelineLineWidth,
|
|
4107
|
+
backgroundColor: __timelineLineColor
|
|
4108
|
+
};
|
|
4109
|
+
const baseItemClass = tailwindMerge.twMerge(
|
|
4110
|
+
"timeline-item grid grid-cols-[1fr_auto_1fr] gap-4",
|
|
4111
|
+
alignClasses[resolvedAlign] ?? alignClasses.center,
|
|
4112
|
+
className
|
|
4113
|
+
);
|
|
4114
|
+
const contentNode = children ?? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
4115
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-gray-900", children: title }),
|
|
4116
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: subtitle })
|
|
4117
|
+
] });
|
|
4118
|
+
const leftContent = resolvedSide === "left" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-right", contentClassName), children: contentNode }) : opposite ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-right text-sm text-gray-500", oppositeClassName), children: opposite }) : /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
4119
|
+
const rightContent = resolvedSide === "right" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-left", contentClassName), children: contentNode }) : opposite ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-left text-sm text-gray-500", oppositeClassName), children: opposite }) : /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
4120
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, ref, className: baseItemClass, children: [
|
|
4121
|
+
leftContent,
|
|
4122
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-full flex-col items-center", children: [
|
|
4123
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4124
|
+
"span",
|
|
4125
|
+
{
|
|
4126
|
+
className: tailwindMerge.twMerge(
|
|
4127
|
+
"flex items-center justify-center rounded-full ring-4 ring-white",
|
|
4128
|
+
dotSizeClass,
|
|
4129
|
+
dotPalette.dot,
|
|
4130
|
+
dotPalette.ring,
|
|
4131
|
+
dotClassName
|
|
4132
|
+
),
|
|
4133
|
+
children: dot ?? iconNode
|
|
4134
|
+
}
|
|
4135
|
+
),
|
|
4136
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4137
|
+
"span",
|
|
4138
|
+
{
|
|
4139
|
+
className: tailwindMerge.twMerge(
|
|
4140
|
+
"mt-3 flex-1 bg-gray-200 dark:bg-gray-700",
|
|
4141
|
+
showLine ? void 0 : "invisible",
|
|
4142
|
+
lineClassName
|
|
4143
|
+
),
|
|
4144
|
+
style: lineStyle,
|
|
4145
|
+
"aria-hidden": true
|
|
4146
|
+
}
|
|
4147
|
+
)
|
|
4148
|
+
] }),
|
|
4149
|
+
rightContent
|
|
4150
|
+
] });
|
|
4151
|
+
});
|
|
4152
|
+
TimeLineItem.displayName = "TimeLine.Item";
|
|
4153
|
+
var isTimeLineItem = (child) => {
|
|
4154
|
+
if (!React4__namespace.isValidElement(child)) {
|
|
4155
|
+
return false;
|
|
4156
|
+
}
|
|
4157
|
+
const elementType = child.type;
|
|
4158
|
+
return child.type === TimeLineItem || elementType.displayName === TimeLineItem.displayName;
|
|
4159
|
+
};
|
|
4160
|
+
var TimeLine = React4__namespace.forwardRef((props, ref) => {
|
|
4161
|
+
const {
|
|
4162
|
+
side = "right",
|
|
4163
|
+
align = "center",
|
|
4164
|
+
density = "default",
|
|
4165
|
+
color = "primary",
|
|
4166
|
+
lineColor,
|
|
4167
|
+
lineWidth = 2,
|
|
4168
|
+
dotSize = "md",
|
|
4169
|
+
className,
|
|
4170
|
+
children,
|
|
4171
|
+
...rest
|
|
4172
|
+
} = props;
|
|
4173
|
+
const resolvedGap = densityGapClasses[density] ?? densityGapClasses.default;
|
|
4174
|
+
const childArray = React4__namespace.Children.toArray(children);
|
|
4175
|
+
const resolvedChildren = childArray.map((child, index) => {
|
|
4176
|
+
if (!isTimeLineItem(child)) {
|
|
4177
|
+
return child;
|
|
4178
|
+
}
|
|
4179
|
+
return React4__namespace.cloneElement(child, {
|
|
4180
|
+
__timelineSide: side,
|
|
4181
|
+
__timelineAlign: align,
|
|
4182
|
+
__timelineDensity: density,
|
|
4183
|
+
__timelineColor: color,
|
|
4184
|
+
__timelineDotSize: dotSize,
|
|
4185
|
+
__timelineLineColor: lineColor,
|
|
4186
|
+
__timelineLineWidth: lineWidth,
|
|
4187
|
+
__timelineIndex: index,
|
|
4188
|
+
__timelineCount: childArray.length
|
|
4189
|
+
});
|
|
4190
|
+
});
|
|
4191
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4192
|
+
"div",
|
|
4193
|
+
{
|
|
4194
|
+
...rest,
|
|
4195
|
+
ref,
|
|
4196
|
+
className: tailwindMerge.twMerge("timeline flex flex-col", resolvedGap, className),
|
|
4197
|
+
children: resolvedChildren
|
|
4198
|
+
}
|
|
4199
|
+
);
|
|
4200
|
+
});
|
|
4201
|
+
TimeLine.displayName = "TimeLine";
|
|
4202
|
+
var TimeLineWithItem = TimeLine;
|
|
4203
|
+
TimeLineWithItem.Item = TimeLineItem;
|
|
4204
|
+
var TimeLine_default = TimeLineWithItem;
|
|
3946
4205
|
|
|
3947
4206
|
exports.Alert = Alert_default;
|
|
3948
4207
|
exports.AppBar = AppBar_default;
|
|
@@ -3968,6 +4227,8 @@ exports.Select = Select_default;
|
|
|
3968
4227
|
exports.Slider = Slider_default;
|
|
3969
4228
|
exports.Switch = Switch_default;
|
|
3970
4229
|
exports.TextArea = TextArea_default;
|
|
4230
|
+
exports.TimeLine = TimeLine_default;
|
|
4231
|
+
exports.TimeLineItem = TimeLineItem;
|
|
3971
4232
|
exports.ToolTip = ToolTip_default;
|
|
3972
4233
|
exports.useNotification = useNotification_default;
|
|
3973
4234
|
//# sourceMappingURL=index.cjs.map
|