@lindle/linoardo 1.0.38 → 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/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": { paddingNoIcon: "px-2 py-2", paddingWithIcon: "pl-8 pr-2 py-2", text: "text-xs" },
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
- paddingNoIcon: "px-2.5 py-2.5",
2325
- paddingWithIcon: "pl-9 pr-2.5 py-2.5",
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: { paddingNoIcon: "px-3 py-3", paddingWithIcon: "pl-10 pr-3 py-3", text: "text-base" },
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
- paddingNoIcon: "px-3.5 py-3.5",
2331
- paddingWithIcon: "pl-11 pr-3.5 py-3.5",
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": { paddingNoIcon: "px-4 py-4", paddingWithIcon: "pl-12 pr-4 py-4", text: "text-xl" }
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 sizeClass = [
2352
- prependIconClass ? sizeConfig.paddingWithIcon : sizeConfig.paddingNoIcon,
2353
- sizeConfig.text
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 = prependIconClass ? "left-10" : "left-3";
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
- prependIconClass && /* @__PURE__ */ jsxRuntime.jsx(
2372
- "i",
2373
- {
2374
- className: tailwindMerge.twMerge(
2375
- "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-500 dark:text-gray-400",
2376
- status?.tone && statusMessageClasses[status?.tone] || "",
2377
- prependIconClass
2378
- ),
2379
- "aria-hidden": true
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 left-1 peer-focus:left-7 -translate-y-2/3 text-xs px-1",
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
  ] });
@@ -2916,6 +2962,10 @@ var normalizeOption = (option) => {
2916
2962
  }
2917
2963
  return option;
2918
2964
  };
2965
+ var toIdSafe = (value) => {
2966
+ const sanitized = value.replace(/\s+/g, "-").replace(/[^A-Za-z0-9_-]/g, "");
2967
+ return sanitized || "opt";
2968
+ };
2919
2969
  var resolveIconClassName5 = (icon) => {
2920
2970
  if (!icon) {
2921
2971
  return void 0;
@@ -2941,7 +2991,7 @@ var resolveIconClassName5 = (icon) => {
2941
2991
  const classes = [...baseClasses, normalizedName];
2942
2992
  return Array.from(new Set(classes)).join(" ");
2943
2993
  };
2944
- var Select = ({
2994
+ var Select = React4__namespace.default.forwardRef(({
2945
2995
  options,
2946
2996
  label,
2947
2997
  placeholder,
@@ -2959,13 +3009,25 @@ var Select = ({
2959
3009
  disabled,
2960
3010
  required,
2961
3011
  onChange,
3012
+ onBlur,
2962
3013
  ...props
2963
- }) => {
3014
+ }, ref) => {
2964
3015
  const selectId = id || name || generateString();
3016
+ const inputName = name || selectId;
2965
3017
  const variantClass = variantClasses4[variant] ?? variantClasses4.outline;
2966
3018
  const sizeConfig = sizeClasses2[size] ?? sizeClasses2.medium;
2967
3019
  const sizeClass = `${sizeConfig.padding} ${sizeConfig.text}`;
2968
3020
  const normalizedOptions = options.map(normalizeOption);
3021
+ const selectedValueList = value !== void 0 ? (Array.isArray(value) ? value : [value]).map(String) : defaultValue !== void 0 ? (Array.isArray(defaultValue) ? defaultValue : [defaultValue]).map(String) : [];
3022
+ const selectedLabels = normalizedOptions.filter((option) => selectedValueList.includes(String(option.value))).map((option) => option.label);
3023
+ const hasSelection = selectedLabels.length > 0;
3024
+ const summaryText = hasSelection ? multiple ? selectedLabels.join(", ") : selectedLabels[0] : placeholder || "\xA0";
3025
+ const handleOptionChange = (event) => {
3026
+ onChange?.(event);
3027
+ if (multiple) return;
3028
+ const detailsEl = event.currentTarget.closest("details");
3029
+ detailsEl?.removeAttribute("open");
3030
+ };
2969
3031
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex flex-col gap-1", wrapperClassName), children: [
2970
3032
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
2971
3033
  /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group w-full", ...props, open: void 0, children: [
@@ -2984,7 +3046,7 @@ var Select = ({
2984
3046
  style: { minHeight: "2.75rem" },
2985
3047
  onClick: (e) => disabled && e.preventDefault(),
2986
3048
  children: [
2987
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("truncate", !value && !defaultValue && "text-gray-500 dark:text-gray-400"), children: label || placeholder || "\xA0" }),
3049
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("truncate", !hasSelection && "text-gray-500 dark:text-gray-400"), children: summaryText }),
2988
3050
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-y-0 right-3 flex items-center text-gray-500 dark:text-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-chevron-down text-base leading-none transition-transform duration-200 group-open:rotate-180", "aria-hidden": true }) })
2989
3051
  ]
2990
3052
  }
@@ -2994,7 +3056,7 @@ var Select = ({
2994
3056
  const isSelected = Array.isArray(value) ? value.map(String).includes(optionValueStr) : String(value) === optionValueStr;
2995
3057
  const isDefaultSelected = Array.isArray(defaultValue) ? defaultValue.map(String).includes(optionValueStr) : String(defaultValue) === optionValueStr;
2996
3058
  const iconClassName = resolveIconClassName5(option.icon);
2997
- const inputId = `-opt-`;
3059
+ const inputId = `${selectId}-${toIdSafe(optionValueStr)}-${index}`;
2998
3060
  return /* @__PURE__ */ jsxRuntime.jsxs(
2999
3061
  "label",
3000
3062
  {
@@ -3009,12 +3071,14 @@ var Select = ({
3009
3071
  {
3010
3072
  type: multiple ? "checkbox" : "radio",
3011
3073
  id: inputId,
3012
- name: name || selectId,
3074
+ name: inputName,
3013
3075
  value: option.value,
3014
3076
  disabled: option.disabled || disabled,
3015
3077
  checked: value !== void 0 ? isSelected : void 0,
3016
3078
  defaultChecked: defaultValue !== void 0 ? isDefaultSelected : void 0,
3017
- onChange,
3079
+ onChange: handleOptionChange,
3080
+ onBlur,
3081
+ ref,
3018
3082
  required: required && !multiple,
3019
3083
  className: "peer sr-only"
3020
3084
  }
@@ -3024,7 +3088,7 @@ var Select = ({
3024
3088
  /* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-check invisible ml-auto text-primary peer-checked:visible" })
3025
3089
  ]
3026
3090
  },
3027
- `${option.value}-`
3091
+ `${optionValueStr}-${index}`
3028
3092
  );
3029
3093
  }) })
3030
3094
  ] }),
@@ -3038,7 +3102,8 @@ var Select = ({
3038
3102
  ] }),
3039
3103
  helperText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("mt-1 text-xs text-gray-500", error && "text-red-500"), children: helperText })
3040
3104
  ] });
3041
- };
3105
+ });
3106
+ Select.displayName = "Select";
3042
3107
  var Select_default = Select;
3043
3108
  var paletteValues = {
3044
3109
  primary: {
@@ -3929,6 +3994,214 @@ var Progress = (props) => {
3929
3994
  );
3930
3995
  };
3931
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;
3932
4205
 
3933
4206
  exports.Alert = Alert_default;
3934
4207
  exports.AppBar = AppBar_default;
@@ -3954,6 +4227,8 @@ exports.Select = Select_default;
3954
4227
  exports.Slider = Slider_default;
3955
4228
  exports.Switch = Switch_default;
3956
4229
  exports.TextArea = TextArea_default;
4230
+ exports.TimeLine = TimeLine_default;
4231
+ exports.TimeLineItem = TimeLineItem;
3957
4232
  exports.ToolTip = ToolTip_default;
3958
4233
  exports.useNotification = useNotification_default;
3959
4234
  //# sourceMappingURL=index.cjs.map