@l3mpire/ui 2.5.3 → 2.6.0

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.mjs CHANGED
@@ -701,7 +701,7 @@ var TooltipContent = React4.forwardRef(({ className, type, hasArrow = true, side
701
701
  hasArrow && /* @__PURE__ */ jsx4(
702
702
  TooltipPrimitive.Arrow,
703
703
  {
704
- className: type === "invert" ? "fill-tooltip-invert-bg" : "fill-tooltip-default-bg"
704
+ className: type === "default" ? "fill-tooltip-default-bg" : "fill-tooltip-invert-bg"
705
705
  }
706
706
  )
707
707
  ]
@@ -1818,40 +1818,57 @@ var DropdownMenuItem = React15.forwardRef(
1818
1818
  action,
1819
1819
  isActive,
1820
1820
  children,
1821
+ onClick,
1821
1822
  ...props
1822
- }, ref) => /* @__PURE__ */ jsxs14(
1823
- "div",
1824
- {
1825
- ref,
1826
- role: "option",
1827
- "aria-selected": isActive,
1828
- className: cn(
1829
- itemStyle,
1830
- isActive && "bg-dropdown-item-hover",
1831
- className
1832
- ),
1833
- ...props,
1834
- children: [
1835
- children,
1836
- avatar,
1837
- flag,
1838
- icon && /* @__PURE__ */ jsx15(
1839
- Icon11,
1840
- {
1841
- icon,
1842
- size: "sm",
1843
- className: "shrink-0 text-dropdown-item-icon"
1844
- }
1823
+ }, ref) => {
1824
+ const handleClick = React15.useCallback(
1825
+ (e) => {
1826
+ const target = e.target;
1827
+ if (!target.closest("button[role='checkbox']")) {
1828
+ const checkbox = e.currentTarget.querySelector(
1829
+ "button[role='checkbox']"
1830
+ );
1831
+ checkbox?.click();
1832
+ }
1833
+ onClick?.(e);
1834
+ },
1835
+ [onClick]
1836
+ );
1837
+ return /* @__PURE__ */ jsxs14(
1838
+ "div",
1839
+ {
1840
+ ref,
1841
+ role: "option",
1842
+ "aria-selected": isActive,
1843
+ className: cn(
1844
+ itemStyle,
1845
+ isActive && "bg-dropdown-item-hover",
1846
+ className
1845
1847
  ),
1846
- /* @__PURE__ */ jsxs14("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
1847
- /* @__PURE__ */ jsx15("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
1848
- description && /* @__PURE__ */ jsx15("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
1849
- ] }),
1850
- badge,
1851
- action
1852
- ]
1853
- }
1854
- )
1848
+ onClick: handleClick,
1849
+ ...props,
1850
+ children: [
1851
+ children,
1852
+ avatar,
1853
+ flag,
1854
+ icon && /* @__PURE__ */ jsx15(
1855
+ Icon11,
1856
+ {
1857
+ icon,
1858
+ size: "sm",
1859
+ className: "shrink-0 text-dropdown-item-icon"
1860
+ }
1861
+ ),
1862
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
1863
+ /* @__PURE__ */ jsx15("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
1864
+ description && /* @__PURE__ */ jsx15("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
1865
+ ] }),
1866
+ badge,
1867
+ action
1868
+ ]
1869
+ }
1870
+ );
1871
+ }
1855
1872
  );
1856
1873
  DropdownMenuItem.displayName = "DropdownMenuItem";
1857
1874
  var DropdownMenuRadixItem = React15.forwardRef(
@@ -1919,7 +1936,7 @@ var clearStyle = [
1919
1936
  "sticky bottom-0 -mx-base -mb-base",
1920
1937
  "flex items-center justify-center",
1921
1938
  "h-10 min-w-[80px] px-md py-[10px]",
1922
- "bg-gradient-to-t from-[#fbfbfb] from-[10%] to-white",
1939
+ "bg-gradient-to-t from-dropdown-bg from-[10%] to-dropdown-bg",
1923
1940
  "border border-dropdown-border",
1924
1941
  "shadow-sm",
1925
1942
  "cursor-pointer"
@@ -2070,12 +2087,14 @@ SidebarItem.displayName = "SidebarItem";
2070
2087
  // src/components/ui/select.tsx
2071
2088
  import * as React18 from "react";
2072
2089
  import * as PopoverPrimitive from "@radix-ui/react-popover";
2090
+ import * as TooltipPrimitive2 from "@radix-ui/react-tooltip";
2073
2091
  import { cva as cva11 } from "class-variance-authority";
2074
2092
  import {
2075
2093
  Icon as Icon13,
2076
2094
  faChevronDownSolid as faChevronDownSolid3,
2077
2095
  faChevronUpSolid,
2078
- faCircleExclamationOutline
2096
+ faCircleExclamationOutline,
2097
+ faXmarkSolid as faXmarkSolid4
2079
2098
  } from "@l3mpire/icons";
2080
2099
  import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2081
2100
  var selectVariants = cva11(
@@ -2090,13 +2109,15 @@ var selectVariants = cva11(
2090
2109
  {
2091
2110
  variants: {
2092
2111
  size: {
2093
- sm: "px-base py-sm gap-base rounded-base min-w-[80px]",
2094
- md: "px-md py-[10px] gap-base rounded-md"
2112
+ sm: "px-base gap-base rounded-base min-w-[80px]",
2113
+ md: "px-md gap-base rounded-md"
2095
2114
  }
2096
2115
  },
2097
2116
  defaultVariants: { size: "md" }
2098
2117
  }
2099
2118
  );
2119
+ var selectHeight = { sm: 32, md: 40 };
2120
+ var chipHeight = { sm: 20, md: 24 };
2100
2121
  var triggerStates = {
2101
2122
  default: [
2102
2123
  "bg-gradient-to-t from-select-bg-default from-[10%] to-select-bg-gradient-to",
@@ -2133,6 +2154,126 @@ var errorGuidance = {
2133
2154
  icon: "shrink-0 text-select-error-icon",
2134
2155
  text: "text-xs font-medium leading-xs text-select-error-text"
2135
2156
  };
2157
+ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
2158
+ const containerRef = React18.useRef(null);
2159
+ const measureRef = React18.useRef(null);
2160
+ const [visibleCount, setVisibleCount] = React18.useState(tags.length);
2161
+ React18.useLayoutEffect(() => {
2162
+ const container = containerRef.current;
2163
+ const measureRow = measureRef.current;
2164
+ if (!container || !measureRow) return;
2165
+ const measure = () => {
2166
+ const containerWidth = container.getBoundingClientRect().width;
2167
+ const chips = Array.from(
2168
+ measureRow.children
2169
+ );
2170
+ const overflowChipWidth = 32;
2171
+ let usedWidth = 0;
2172
+ let count = 0;
2173
+ for (const chip of chips) {
2174
+ const chipWidth = chip.getBoundingClientRect().width;
2175
+ const gapWidth = count > 0 ? 4 : 0;
2176
+ const projectedWidth = usedWidth + gapWidth + chipWidth;
2177
+ const remaining = tags.length - (count + 1);
2178
+ const needsOverflow = remaining > 0;
2179
+ const totalNeeded = projectedWidth + (needsOverflow ? 4 + overflowChipWidth : 0);
2180
+ if (totalNeeded <= containerWidth) {
2181
+ usedWidth = projectedWidth;
2182
+ count++;
2183
+ } else {
2184
+ break;
2185
+ }
2186
+ }
2187
+ setVisibleCount(Math.max(1, count));
2188
+ };
2189
+ measure();
2190
+ const observer = new ResizeObserver(measure);
2191
+ observer.observe(container);
2192
+ return () => observer.disconnect();
2193
+ }, [tags]);
2194
+ const overflowCount = tags.length - visibleCount;
2195
+ const overflowTags = tags.slice(visibleCount);
2196
+ const chipClass = cn(
2197
+ "inline-flex items-center gap-xs shrink-0",
2198
+ "px-sm rounded-base",
2199
+ "bg-tag-neutral-bg text-tag-neutral-text",
2200
+ "text-xs font-medium leading-xs",
2201
+ "whitespace-nowrap"
2202
+ );
2203
+ return /* @__PURE__ */ jsxs16("div", { className: "flex flex-1 items-center gap-xs min-w-0 overflow-hidden relative", children: [
2204
+ /* @__PURE__ */ jsx18(
2205
+ "div",
2206
+ {
2207
+ ref: measureRef,
2208
+ "aria-hidden": true,
2209
+ className: "absolute flex items-center gap-xs pointer-events-none",
2210
+ style: { visibility: "hidden", whiteSpace: "nowrap", top: 0, left: 0 },
2211
+ children: tags.map((tag) => /* @__PURE__ */ jsxs16("span", { className: chipClass, style: { height: chipHeightPx }, children: [
2212
+ /* @__PURE__ */ jsx18("span", { className: "truncate max-w-[100px]", children: tag }),
2213
+ onTagRemove && /* @__PURE__ */ jsx18("span", { className: "inline-flex shrink-0 w-3 h-3" })
2214
+ ] }, tag))
2215
+ }
2216
+ ),
2217
+ /* @__PURE__ */ jsxs16("div", { ref: containerRef, className: "flex flex-1 items-center gap-xs overflow-hidden", children: [
2218
+ tags.slice(0, visibleCount).map((tag) => /* @__PURE__ */ jsxs16(
2219
+ "span",
2220
+ {
2221
+ className: chipClass,
2222
+ style: { height: chipHeightPx },
2223
+ children: [
2224
+ /* @__PURE__ */ jsx18("span", { className: "truncate max-w-[100px]", children: tag }),
2225
+ onTagRemove && /* @__PURE__ */ jsx18(
2226
+ "button",
2227
+ {
2228
+ type: "button",
2229
+ "aria-label": `Remove ${tag}`,
2230
+ className: "inline-flex shrink-0 items-center justify-center cursor-pointer rounded-sm hover:opacity-70",
2231
+ onClick: (e) => {
2232
+ e.stopPropagation();
2233
+ e.preventDefault();
2234
+ onTagRemove(tag);
2235
+ },
2236
+ children: /* @__PURE__ */ jsx18(Icon13, { icon: faXmarkSolid4, size: "xs" })
2237
+ }
2238
+ )
2239
+ ]
2240
+ },
2241
+ tag
2242
+ )),
2243
+ overflowCount > 0 && /* @__PURE__ */ jsx18(TooltipPrimitive2.Provider, { children: /* @__PURE__ */ jsxs16(TooltipPrimitive2.Root, { children: [
2244
+ /* @__PURE__ */ jsx18(TooltipPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
2245
+ "span",
2246
+ {
2247
+ className: cn(chipClass, "cursor-default"),
2248
+ style: { height: chipHeightPx },
2249
+ children: [
2250
+ "+",
2251
+ overflowCount
2252
+ ]
2253
+ }
2254
+ ) }),
2255
+ /* @__PURE__ */ jsx18(TooltipPrimitive2.Portal, { children: /* @__PURE__ */ jsxs16(
2256
+ TooltipPrimitive2.Content,
2257
+ {
2258
+ sideOffset: 4,
2259
+ className: cn(
2260
+ "z-50 px-base py-sm rounded-md shadow-lg",
2261
+ "bg-tooltip-default-bg text-tooltip-default-text",
2262
+ "text-xs font-regular leading-xs",
2263
+ "flex flex-col gap-xs",
2264
+ "data-[state=delayed-open]:animate-[tooltip-in_150ms_ease-out]",
2265
+ "data-[state=closed]:animate-[tooltip-out_100ms_ease-in]"
2266
+ ),
2267
+ children: [
2268
+ overflowTags.map((t) => /* @__PURE__ */ jsx18("span", { children: t }, t)),
2269
+ /* @__PURE__ */ jsx18(TooltipPrimitive2.Arrow, { className: "fill-tooltip-default-bg" })
2270
+ ]
2271
+ }
2272
+ ) })
2273
+ ] }) })
2274
+ ] })
2275
+ ] });
2276
+ }
2136
2277
  var Select = React18.forwardRef(
2137
2278
  ({
2138
2279
  className,
@@ -2142,6 +2283,8 @@ var Select = React18.forwardRef(
2142
2283
  placeholder = "Select...",
2143
2284
  value,
2144
2285
  multiCount,
2286
+ tags,
2287
+ onTagRemove,
2145
2288
  icon,
2146
2289
  avatar,
2147
2290
  flag,
@@ -2163,10 +2306,13 @@ var Select = React18.forwardRef(
2163
2306
  setInternalOpen(open);
2164
2307
  onOpenChange?.(open);
2165
2308
  };
2166
- const hasValue = value != null && value !== "";
2309
+ const resolvedSize = size ?? "md";
2310
+ const hasTags = tags != null && tags.length > 0;
2311
+ const hasValue = hasTags || value != null && value !== "";
2167
2312
  const isActive = isOpen && !error && !disabled;
2168
2313
  const icColor = iconColor[disabled ? "disabled" : "default"];
2169
2314
  const triggerState = disabled ? triggerStates.disabled : error ? triggerStates.error : triggerStates.default;
2315
+ const heightPx = selectHeight[resolvedSize];
2170
2316
  return /* @__PURE__ */ jsxs16(
2171
2317
  PopoverPrimitive.Root,
2172
2318
  {
@@ -2184,10 +2330,13 @@ var Select = React18.forwardRef(
2184
2330
  disabled,
2185
2331
  "aria-invalid": error || void 0,
2186
2332
  "aria-describedby": errorId,
2333
+ style: { height: heightPx },
2187
2334
  className: cn(
2188
2335
  selectVariants({ size }),
2189
2336
  triggerState,
2190
2337
  isActive && triggerStates.active,
2338
+ // Reduce vertical padding when tags are present
2339
+ hasTags ? "py-xs" : resolvedSize === "sm" ? "py-sm" : "py-[10px]",
2191
2340
  className
2192
2341
  ),
2193
2342
  ...props,
@@ -2195,7 +2344,14 @@ var Select = React18.forwardRef(
2195
2344
  avatar,
2196
2345
  flag,
2197
2346
  icon && /* @__PURE__ */ jsx18(Icon13, { icon, size: "sm", className: cn("shrink-0", icColor) }),
2198
- /* @__PURE__ */ jsx18(
2347
+ tags && tags.length > 0 ? /* @__PURE__ */ jsx18(
2348
+ SelectChips,
2349
+ {
2350
+ tags,
2351
+ onTagRemove,
2352
+ chipHeightPx: chipHeight[resolvedSize]
2353
+ }
2354
+ ) : /* @__PURE__ */ jsx18(
2199
2355
  "span",
2200
2356
  {
2201
2357
  className: cn(
@@ -2205,7 +2361,7 @@ var Select = React18.forwardRef(
2205
2361
  children: hasValue ? value : placeholder
2206
2362
  }
2207
2363
  ),
2208
- multiCount != null && multiCount > 0 && /* @__PURE__ */ jsxs16("span", { className: "shrink-0 text-xs leading-normal text-select-text-multi", children: [
2364
+ !hasTags && multiCount != null && multiCount > 0 && /* @__PURE__ */ jsxs16("span", { className: "shrink-0 text-xs leading-normal text-select-text-multi", children: [
2209
2365
  "+",
2210
2366
  multiCount,
2211
2367
  " others"
@@ -2318,7 +2474,7 @@ TabContent.displayName = "TabContent";
2318
2474
  // src/components/ui/tag.tsx
2319
2475
  import * as React20 from "react";
2320
2476
  import { cva as cva12 } from "class-variance-authority";
2321
- import { Icon as Icon14, faXmarkSolid as faXmarkSolid4 } from "@l3mpire/icons";
2477
+ import { Icon as Icon14, faXmarkSolid as faXmarkSolid5 } from "@l3mpire/icons";
2322
2478
  import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
2323
2479
  var tagVariants = cva12(
2324
2480
  [
@@ -2384,7 +2540,7 @@ var Tag = React20.forwardRef(
2384
2540
  size === "md" && "p-sm rounded-md"
2385
2541
  ),
2386
2542
  "aria-label": "Remove",
2387
- children: /* @__PURE__ */ jsx20(Icon14, { icon: faXmarkSolid4, size: iconSize })
2543
+ children: /* @__PURE__ */ jsx20(Icon14, { icon: faXmarkSolid5, size: iconSize })
2388
2544
  }
2389
2545
  )
2390
2546
  ]
@@ -2678,12 +2834,427 @@ var TextInput = React22.forwardRef(
2678
2834
  );
2679
2835
  TextInput.displayName = "TextInput";
2680
2836
 
2681
- // src/components/ui/typography.tsx
2837
+ // src/components/ui/chip-input.tsx
2682
2838
  import * as React23 from "react";
2683
2839
  import { cva as cva14 } from "class-variance-authority";
2840
+ import {
2841
+ Icon as Icon17,
2842
+ faCircleExclamationOutline as faCircleExclamationOutline4,
2843
+ faXmarkSolid as faXmarkSolid6
2844
+ } from "@l3mpire/icons";
2845
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2846
+ var chipInputVariants = cva14(
2847
+ [
2848
+ "flex flex-wrap items-center w-full border transition-colors",
2849
+ "text-sm",
2850
+ "font-regular",
2851
+ "leading-sm",
2852
+ "gap-xs"
2853
+ ],
2854
+ {
2855
+ variants: {
2856
+ size: {
2857
+ sm: "px-base py-sm rounded-base",
2858
+ md: "px-md py-[10px] rounded-md"
2859
+ }
2860
+ },
2861
+ defaultVariants: { size: "md" }
2862
+ }
2863
+ );
2864
+ var wrapperStates2 = {
2865
+ default: [
2866
+ "bg-text-input-bg-default",
2867
+ "border-text-input-border-default",
2868
+ "text-text-input-text-default",
2869
+ "hover:border-text-input-border-hover",
2870
+ "focus-within:border-text-input-border-hover",
2871
+ "focus-within:shadow-focus-ring"
2872
+ ],
2873
+ error: [
2874
+ "bg-text-input-bg-default",
2875
+ "border-text-input-border-error",
2876
+ "text-text-input-text-default"
2877
+ ],
2878
+ disabled: [
2879
+ "bg-text-input-bg-disabled",
2880
+ "border-text-input-border-disabled",
2881
+ "text-text-input-text-disabled",
2882
+ "cursor-not-allowed"
2883
+ ]
2884
+ };
2885
+ var chipStyle = [
2886
+ "inline-flex items-center gap-xs shrink-0",
2887
+ "h-6 px-sm rounded-base",
2888
+ "bg-tag-neutral-bg text-tag-neutral-text",
2889
+ "text-xs font-medium leading-xs",
2890
+ "whitespace-nowrap"
2891
+ ];
2892
+ var errorGuidance4 = {
2893
+ icon: "shrink-0 text-text-input-error-icon",
2894
+ text: "text-xs font-medium leading-xs text-text-input-error-text"
2895
+ };
2896
+ var ChipInput = React23.forwardRef(
2897
+ ({
2898
+ className,
2899
+ size,
2900
+ values,
2901
+ onChange,
2902
+ placeholder = "Type a value and press Enter",
2903
+ label,
2904
+ labelType,
2905
+ error,
2906
+ errorMessage,
2907
+ disabled,
2908
+ iconLeft,
2909
+ max = 0,
2910
+ ...props
2911
+ }, ref) => {
2912
+ const autoId = React23.useId();
2913
+ const inputId = props.id ?? autoId;
2914
+ const errorId = error && errorMessage ? `${inputId}-error` : void 0;
2915
+ const inputRef = React23.useRef(null);
2916
+ const [inputValue, setInputValue] = React23.useState("");
2917
+ const state = disabled ? "disabled" : error ? "error" : "default";
2918
+ const addChip = (val) => {
2919
+ const trimmed = val.trim();
2920
+ if (!trimmed) return;
2921
+ if (values.includes(trimmed)) return;
2922
+ if (max > 0 && values.length >= max) return;
2923
+ onChange([...values, trimmed]);
2924
+ setInputValue("");
2925
+ };
2926
+ const removeChip = (val) => {
2927
+ onChange(values.filter((v) => v !== val));
2928
+ };
2929
+ const handleKeyDown = (e) => {
2930
+ if (e.key === "Enter") {
2931
+ e.preventDefault();
2932
+ addChip(inputValue);
2933
+ } else if (e.key === "Backspace" && inputValue === "" && values.length > 0) {
2934
+ removeChip(values[values.length - 1]);
2935
+ }
2936
+ };
2937
+ const handleWrapperClick = () => {
2938
+ inputRef.current?.focus();
2939
+ };
2940
+ return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-xs", children: [
2941
+ label && /* @__PURE__ */ jsx23(InputLabel, { type: labelType, disabled, children: label }),
2942
+ /* @__PURE__ */ jsxs21(
2943
+ "div",
2944
+ {
2945
+ ref,
2946
+ role: "textbox",
2947
+ "aria-disabled": disabled || void 0,
2948
+ className: cn(
2949
+ chipInputVariants({ size }),
2950
+ wrapperStates2[state],
2951
+ "cursor-text",
2952
+ className
2953
+ ),
2954
+ onClick: handleWrapperClick,
2955
+ ...props,
2956
+ children: [
2957
+ iconLeft && /* @__PURE__ */ jsx23(
2958
+ Icon17,
2959
+ {
2960
+ icon: iconLeft,
2961
+ size: "sm",
2962
+ className: cn(
2963
+ "shrink-0",
2964
+ disabled ? "text-text-input-text-disabled" : "text-text-input-icon"
2965
+ )
2966
+ }
2967
+ ),
2968
+ values.map((val) => /* @__PURE__ */ jsxs21("span", { className: cn(chipStyle), children: [
2969
+ /* @__PURE__ */ jsx23("span", { className: "truncate max-w-[150px]", children: val }),
2970
+ !disabled && /* @__PURE__ */ jsx23(
2971
+ "button",
2972
+ {
2973
+ type: "button",
2974
+ "aria-label": `Remove ${val}`,
2975
+ className: "inline-flex shrink-0 items-center justify-center cursor-pointer rounded-sm hover:opacity-70",
2976
+ onClick: (e) => {
2977
+ e.stopPropagation();
2978
+ removeChip(val);
2979
+ },
2980
+ children: /* @__PURE__ */ jsx23(Icon17, { icon: faXmarkSolid6, size: "xs" })
2981
+ }
2982
+ )
2983
+ ] }, val)),
2984
+ /* @__PURE__ */ jsx23(
2985
+ "input",
2986
+ {
2987
+ ref: inputRef,
2988
+ id: inputId,
2989
+ type: "text",
2990
+ disabled,
2991
+ "aria-invalid": error || void 0,
2992
+ "aria-describedby": errorId,
2993
+ value: inputValue,
2994
+ onChange: (e) => setInputValue(e.target.value),
2995
+ onKeyDown: handleKeyDown,
2996
+ placeholder,
2997
+ className: cn(
2998
+ "flex-1 min-w-[120px] bg-transparent outline-none",
2999
+ "[font-size:inherit] font-[inherit] leading-[inherit] [color:inherit]",
3000
+ disabled ? "placeholder:text-text-input-text-disabled cursor-not-allowed" : "placeholder:text-text-input-text-placeholder"
3001
+ )
3002
+ }
3003
+ )
3004
+ ]
3005
+ }
3006
+ ),
3007
+ error && errorMessage && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-xs", children: [
3008
+ /* @__PURE__ */ jsx23(Icon17, { icon: faCircleExclamationOutline4, size: "xs", className: errorGuidance4.icon }),
3009
+ /* @__PURE__ */ jsx23("span", { id: errorId, className: errorGuidance4.text, children: errorMessage })
3010
+ ] })
3011
+ ] });
3012
+ }
3013
+ );
3014
+ ChipInput.displayName = "ChipInput";
3015
+
3016
+ // src/components/ui/number-input.tsx
3017
+ import * as React24 from "react";
3018
+ import { cva as cva15 } from "class-variance-authority";
3019
+ import {
3020
+ Icon as Icon18,
3021
+ faMinusOutline,
3022
+ faPlusOutline,
3023
+ faCircleExclamationOutline as faCircleExclamationOutline5
3024
+ } from "@l3mpire/icons";
3025
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
3026
+ var stepperButtonVariants = cva15(
3027
+ [
3028
+ "shrink-0 flex items-center justify-center",
3029
+ "border border-text-input-border-default",
3030
+ "cursor-pointer transition-colors"
3031
+ ],
3032
+ {
3033
+ variants: {
3034
+ size: {
3035
+ sm: "p-sm",
3036
+ md: "p-[10px]"
3037
+ }
3038
+ },
3039
+ defaultVariants: { size: "md" }
3040
+ }
3041
+ );
3042
+ var stepperButtonStates = {
3043
+ enabled: [
3044
+ "bg-gradient-to-t from-text-input-button-bg from-[10%] to-text-input-button-gradient-to",
3045
+ "hover:from-text-input-button-bg-hover hover:from-[0%] hover:to-text-input-button-gradient-to",
3046
+ "active:from-text-input-button-bg-hover active:from-[0%] active:to-text-input-button-gradient-to"
3047
+ ],
3048
+ disabled: [
3049
+ "bg-text-input-bg-disabled",
3050
+ "border-text-input-border-disabled",
3051
+ "cursor-not-allowed"
3052
+ ]
3053
+ };
3054
+ var inputVariants = cva15(
3055
+ [
3056
+ "min-w-[48px] text-center border-y border-text-input-border-default",
3057
+ "bg-text-input-bg-default",
3058
+ "text-sm font-regular leading-sm",
3059
+ "text-text-input-text-default",
3060
+ "outline-none",
3061
+ "[appearance:textfield]",
3062
+ "[&::-webkit-outer-spin-button]:appearance-none",
3063
+ "[&::-webkit-inner-spin-button]:appearance-none"
3064
+ ],
3065
+ {
3066
+ variants: {
3067
+ size: {
3068
+ sm: "px-base py-sm",
3069
+ md: "px-md py-[10px]"
3070
+ }
3071
+ },
3072
+ defaultVariants: { size: "md" }
3073
+ }
3074
+ );
3075
+ var wrapperStates3 = {
3076
+ default: [
3077
+ "focus-within:shadow-focus-ring",
3078
+ "focus-within:[&_button]:border-text-input-border-hover",
3079
+ "focus-within:[&_input]:border-text-input-border-hover"
3080
+ ],
3081
+ error: [
3082
+ "[&_button]:border-text-input-border-error",
3083
+ "[&_input]:border-text-input-border-error"
3084
+ ],
3085
+ disabled: []
3086
+ };
3087
+ var errorGuidance5 = {
3088
+ icon: "shrink-0 text-text-input-error-icon",
3089
+ text: "text-xs font-medium leading-xs text-text-input-error-text"
3090
+ };
3091
+ var NumberInput = React24.forwardRef(
3092
+ ({
3093
+ className,
3094
+ size,
3095
+ value: controlledValue,
3096
+ defaultValue = 0,
3097
+ onChange,
3098
+ min,
3099
+ max,
3100
+ step = 1,
3101
+ label,
3102
+ labelType,
3103
+ error,
3104
+ errorMessage,
3105
+ disabled,
3106
+ id,
3107
+ ...props
3108
+ }, ref) => {
3109
+ const autoId = React24.useId();
3110
+ const inputId = id ?? autoId;
3111
+ const errorId = error && errorMessage ? `${inputId}-error` : void 0;
3112
+ const isControlled = controlledValue !== void 0;
3113
+ const [internalValue, setInternalValue] = React24.useState(defaultValue);
3114
+ const currentValue = isControlled ? controlledValue : internalValue;
3115
+ const resolvedSize = size ?? "md";
3116
+ const state = disabled ? "disabled" : error ? "error" : "default";
3117
+ const clamp = (val) => {
3118
+ let clamped = val;
3119
+ if (min != null) clamped = Math.max(min, clamped);
3120
+ if (max != null) clamped = Math.min(max, clamped);
3121
+ return clamped;
3122
+ };
3123
+ const setValue = (val) => {
3124
+ const clamped = clamp(val);
3125
+ if (!isControlled) setInternalValue(clamped);
3126
+ onChange?.(clamped);
3127
+ };
3128
+ const handleInputChange = (e) => {
3129
+ const parsed = parseInt(e.target.value, 10);
3130
+ if (!isNaN(parsed)) {
3131
+ setValue(parsed);
3132
+ } else if (e.target.value === "" || e.target.value === "-") {
3133
+ if (!isControlled) setInternalValue(0);
3134
+ }
3135
+ };
3136
+ const handleBlur = () => {
3137
+ setValue(currentValue);
3138
+ };
3139
+ const decrement = () => {
3140
+ if (disabled) return;
3141
+ setValue(currentValue - step);
3142
+ };
3143
+ const increment = () => {
3144
+ if (disabled) return;
3145
+ setValue(currentValue + step);
3146
+ };
3147
+ const atMin = min != null && currentValue <= min;
3148
+ const atMax = max != null && currentValue >= max;
3149
+ const valueStr = String(currentValue);
3150
+ const charCount = valueStr.length;
3151
+ const inputWidth = charCount > 3 ? `${48 + (charCount - 3) * 9}px` : void 0;
3152
+ return /* @__PURE__ */ jsxs22("div", { className: cn("flex flex-col gap-xs", className), children: [
3153
+ label && /* @__PURE__ */ jsx24(InputLabel, { type: labelType, disabled, children: label }),
3154
+ /* @__PURE__ */ jsxs22(
3155
+ "div",
3156
+ {
3157
+ className: cn(
3158
+ "inline-flex w-fit rounded-md shadow-sm",
3159
+ wrapperStates3[state]
3160
+ ),
3161
+ children: [
3162
+ /* @__PURE__ */ jsx24(
3163
+ "button",
3164
+ {
3165
+ type: "button",
3166
+ disabled: disabled || atMin,
3167
+ onClick: decrement,
3168
+ "aria-label": "Decrease",
3169
+ className: cn(
3170
+ stepperButtonVariants({ size: resolvedSize }),
3171
+ "rounded-l-md -mr-px",
3172
+ stepperButtonStates[disabled || atMin ? "disabled" : "enabled"]
3173
+ ),
3174
+ children: /* @__PURE__ */ jsx24(
3175
+ Icon18,
3176
+ {
3177
+ icon: faMinusOutline,
3178
+ size: "sm",
3179
+ className: cn(
3180
+ disabled || atMin ? "text-text-input-text-disabled" : "text-text-input-text-default"
3181
+ )
3182
+ }
3183
+ )
3184
+ }
3185
+ ),
3186
+ /* @__PURE__ */ jsx24(
3187
+ "input",
3188
+ {
3189
+ ref,
3190
+ id: inputId,
3191
+ type: "number",
3192
+ disabled,
3193
+ "aria-invalid": error || void 0,
3194
+ "aria-describedby": errorId,
3195
+ value: currentValue,
3196
+ onChange: handleInputChange,
3197
+ onBlur: handleBlur,
3198
+ min,
3199
+ max,
3200
+ step,
3201
+ style: inputWidth ? { width: inputWidth } : void 0,
3202
+ className: cn(
3203
+ inputVariants({ size: resolvedSize }),
3204
+ "-mx-px",
3205
+ disabled && [
3206
+ "bg-text-input-bg-disabled",
3207
+ "border-text-input-border-disabled",
3208
+ "text-text-input-text-disabled",
3209
+ "cursor-not-allowed"
3210
+ ],
3211
+ error && "border-text-input-border-error"
3212
+ ),
3213
+ ...props
3214
+ }
3215
+ ),
3216
+ /* @__PURE__ */ jsx24(
3217
+ "button",
3218
+ {
3219
+ type: "button",
3220
+ disabled: disabled || atMax,
3221
+ onClick: increment,
3222
+ "aria-label": "Increase",
3223
+ className: cn(
3224
+ stepperButtonVariants({ size: resolvedSize }),
3225
+ "rounded-r-md -ml-px",
3226
+ stepperButtonStates[disabled || atMax ? "disabled" : "enabled"]
3227
+ ),
3228
+ children: /* @__PURE__ */ jsx24(
3229
+ Icon18,
3230
+ {
3231
+ icon: faPlusOutline,
3232
+ size: "sm",
3233
+ className: cn(
3234
+ disabled || atMax ? "text-text-input-text-disabled" : "text-text-input-text-default"
3235
+ )
3236
+ }
3237
+ )
3238
+ }
3239
+ )
3240
+ ]
3241
+ }
3242
+ ),
3243
+ error && errorMessage && /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-xs", children: [
3244
+ /* @__PURE__ */ jsx24(Icon18, { icon: faCircleExclamationOutline5, size: "xs", className: errorGuidance5.icon }),
3245
+ /* @__PURE__ */ jsx24("span", { id: errorId, className: errorGuidance5.text, children: errorMessage })
3246
+ ] })
3247
+ ] });
3248
+ }
3249
+ );
3250
+ NumberInput.displayName = "NumberInput";
3251
+
3252
+ // src/components/ui/typography.tsx
3253
+ import * as React25 from "react";
3254
+ import { cva as cva16 } from "class-variance-authority";
2684
3255
  import { Slot as Slot3 } from "@radix-ui/react-slot";
2685
- import { jsx as jsx23 } from "react/jsx-runtime";
2686
- var typographyVariants = cva14("", {
3256
+ import { jsx as jsx25 } from "react/jsx-runtime";
3257
+ var typographyVariants = cva16("", {
2687
3258
  variants: {
2688
3259
  variant: {
2689
3260
  h1: "text-xl leading-lg",
@@ -2714,10 +3285,10 @@ var defaultElementMap = {
2714
3285
  sm: "p",
2715
3286
  xs: "p"
2716
3287
  };
2717
- var Typography = React23.forwardRef(
3288
+ var Typography = React25.forwardRef(
2718
3289
  ({ className, variant = "md", weight, as, asChild = false, ...props }, ref) => {
2719
3290
  const Comp = asChild ? Slot3 : as ?? defaultElementMap[variant ?? "md"] ?? "p";
2720
- return /* @__PURE__ */ jsx23(
3291
+ return /* @__PURE__ */ jsx25(
2721
3292
  Comp,
2722
3293
  {
2723
3294
  ref,
@@ -2730,10 +3301,10 @@ var Typography = React23.forwardRef(
2730
3301
  Typography.displayName = "Typography";
2731
3302
 
2732
3303
  // src/components/ui/user-menu.tsx
2733
- import * as React24 from "react";
2734
- import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
2735
- var UserMenu = React24.forwardRef(
2736
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx24(
3304
+ import * as React26 from "react";
3305
+ import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
3306
+ var UserMenu = React26.forwardRef(
3307
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx26(
2737
3308
  "div",
2738
3309
  {
2739
3310
  ref,
@@ -2752,8 +3323,8 @@ var UserMenu = React24.forwardRef(
2752
3323
  )
2753
3324
  );
2754
3325
  UserMenu.displayName = "UserMenu";
2755
- var UserMenuInfoRow = React24.forwardRef(
2756
- ({ className, avatar, name, subtitle, action, ...props }, ref) => /* @__PURE__ */ jsxs21(
3326
+ var UserMenuInfoRow = React26.forwardRef(
3327
+ ({ className, avatar, name, subtitle, action, ...props }, ref) => /* @__PURE__ */ jsxs23(
2757
3328
  "div",
2758
3329
  {
2759
3330
  ref,
@@ -2761,9 +3332,9 @@ var UserMenuInfoRow = React24.forwardRef(
2761
3332
  ...props,
2762
3333
  children: [
2763
3334
  avatar,
2764
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-1 flex-col min-w-0", children: [
2765
- /* @__PURE__ */ jsx24("span", { className: "text-sm font-medium leading-sm text-user-menu-name truncate", children: name }),
2766
- subtitle && /* @__PURE__ */ jsx24("span", { className: "text-xs font-regular leading-xs text-user-menu-subtitle truncate", children: subtitle })
3335
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-1 flex-col min-w-0", children: [
3336
+ /* @__PURE__ */ jsx26("span", { className: "text-sm font-medium leading-sm text-user-menu-name truncate", children: name }),
3337
+ subtitle && /* @__PURE__ */ jsx26("span", { className: "text-xs font-regular leading-xs text-user-menu-subtitle truncate", children: subtitle })
2767
3338
  ] }),
2768
3339
  action
2769
3340
  ]
@@ -2771,8 +3342,8 @@ var UserMenuInfoRow = React24.forwardRef(
2771
3342
  )
2772
3343
  );
2773
3344
  UserMenuInfoRow.displayName = "UserMenuInfoRow";
2774
- var UserMenuSection = React24.forwardRef(
2775
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx24(
3345
+ var UserMenuSection = React26.forwardRef(
3346
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx26(
2776
3347
  "div",
2777
3348
  {
2778
3349
  ref,
@@ -2785,12 +3356,12 @@ var UserMenuSection = React24.forwardRef(
2785
3356
  UserMenuSection.displayName = "UserMenuSection";
2786
3357
 
2787
3358
  // src/components/ui/modal.tsx
2788
- import * as React25 from "react";
3359
+ import * as React27 from "react";
2789
3360
  import * as DialogPrimitive from "@radix-ui/react-dialog";
2790
- import { cva as cva15 } from "class-variance-authority";
2791
- import { Icon as Icon17, faXmarkSolid as faXmarkSolid5, faCircleInfoSolid as faCircleInfoSolid4 } from "@l3mpire/icons";
2792
- import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
2793
- var modalVariants = cva15(
3361
+ import { cva as cva17 } from "class-variance-authority";
3362
+ import { Icon as Icon19, faXmarkSolid as faXmarkSolid7, faCircleInfoSolid as faCircleInfoSolid4 } from "@l3mpire/icons";
3363
+ import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
3364
+ var modalVariants = cva17(
2794
3365
  [
2795
3366
  "fixed top-[50%] left-[50%] -translate-x-1/2 -translate-y-1/2 z-50",
2796
3367
  "flex flex-col",
@@ -2813,7 +3384,7 @@ var modalVariants = cva15(
2813
3384
  var Modal = DialogPrimitive.Root;
2814
3385
  var ModalTrigger = DialogPrimitive.Trigger;
2815
3386
  var ModalClose = DialogPrimitive.Close;
2816
- var ModalOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3387
+ var ModalOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
2817
3388
  DialogPrimitive.Overlay,
2818
3389
  {
2819
3390
  ref,
@@ -2826,9 +3397,9 @@ var ModalOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
2826
3397
  }
2827
3398
  ));
2828
3399
  ModalOverlay.displayName = "ModalOverlay";
2829
- var ModalContent = React25.forwardRef(({ className, size, children, ...props }, ref) => /* @__PURE__ */ jsxs22(DialogPrimitive.Portal, { children: [
2830
- /* @__PURE__ */ jsx25(ModalOverlay, {}),
2831
- /* @__PURE__ */ jsx25(
3400
+ var ModalContent = React27.forwardRef(({ className, size, children, ...props }, ref) => /* @__PURE__ */ jsxs24(DialogPrimitive.Portal, { children: [
3401
+ /* @__PURE__ */ jsx27(ModalOverlay, {}),
3402
+ /* @__PURE__ */ jsx27(
2832
3403
  DialogPrimitive.Content,
2833
3404
  {
2834
3405
  ref,
@@ -2839,8 +3410,8 @@ var ModalContent = React25.forwardRef(({ className, size, children, ...props },
2839
3410
  )
2840
3411
  ] }));
2841
3412
  ModalContent.displayName = "ModalContent";
2842
- var ModalHeader = React25.forwardRef(
2843
- ({ className, showBorder = true, onClose, children, ...props }, ref) => /* @__PURE__ */ jsxs22(
3413
+ var ModalHeader = React27.forwardRef(
3414
+ ({ className, showBorder = true, onClose, children, ...props }, ref) => /* @__PURE__ */ jsxs24(
2844
3415
  "div",
2845
3416
  {
2846
3417
  ref,
@@ -2851,15 +3422,15 @@ var ModalHeader = React25.forwardRef(
2851
3422
  ),
2852
3423
  ...props,
2853
3424
  children: [
2854
- /* @__PURE__ */ jsx25("div", { className: "flex flex-1 flex-col gap-2xs", children }),
2855
- onClose && /* @__PURE__ */ jsx25(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx25(
3425
+ /* @__PURE__ */ jsx27("div", { className: "flex flex-1 flex-col gap-2xs", children }),
3426
+ onClose && /* @__PURE__ */ jsx27(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx27(
2856
3427
  "button",
2857
3428
  {
2858
3429
  type: "button",
2859
3430
  onClick: onClose,
2860
3431
  className: "inline-flex shrink-0 items-center justify-center p-xs rounded-base text-modal-header-close hover:bg-black/5 transition-colors cursor-pointer",
2861
3432
  "aria-label": "Close",
2862
- children: /* @__PURE__ */ jsx25(Icon17, { icon: faXmarkSolid5, size: "sm" })
3433
+ children: /* @__PURE__ */ jsx27(Icon19, { icon: faXmarkSolid7, size: "sm" })
2863
3434
  }
2864
3435
  ) })
2865
3436
  ]
@@ -2867,7 +3438,7 @@ var ModalHeader = React25.forwardRef(
2867
3438
  )
2868
3439
  );
2869
3440
  ModalHeader.displayName = "ModalHeader";
2870
- var ModalTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3441
+ var ModalTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
2871
3442
  DialogPrimitive.Title,
2872
3443
  {
2873
3444
  ref,
@@ -2876,7 +3447,7 @@ var ModalTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE
2876
3447
  }
2877
3448
  ));
2878
3449
  ModalTitle.displayName = "ModalTitle";
2879
- var ModalDescription = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3450
+ var ModalDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
2880
3451
  DialogPrimitive.Description,
2881
3452
  {
2882
3453
  ref,
@@ -2885,7 +3456,7 @@ var ModalDescription = React25.forwardRef(({ className, ...props }, ref) => /* @
2885
3456
  }
2886
3457
  ));
2887
3458
  ModalDescription.displayName = "ModalDescription";
2888
- var ModalBody = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3459
+ var ModalBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
2889
3460
  "div",
2890
3461
  {
2891
3462
  ref,
@@ -2894,8 +3465,8 @@ var ModalBody = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE_
2894
3465
  }
2895
3466
  ));
2896
3467
  ModalBody.displayName = "ModalBody";
2897
- var ModalFooter = React25.forwardRef(
2898
- ({ className, showBorder = true, infoMessage, children, ...props }, ref) => /* @__PURE__ */ jsxs22(
3468
+ var ModalFooter = React27.forwardRef(
3469
+ ({ className, showBorder = true, infoMessage, children, ...props }, ref) => /* @__PURE__ */ jsxs24(
2899
3470
  "div",
2900
3471
  {
2901
3472
  ref,
@@ -2906,9 +3477,9 @@ var ModalFooter = React25.forwardRef(
2906
3477
  ),
2907
3478
  ...props,
2908
3479
  children: [
2909
- infoMessage && /* @__PURE__ */ jsxs22("div", { className: "flex flex-1 items-center gap-base", children: [
2910
- /* @__PURE__ */ jsx25(Icon17, { icon: faCircleInfoSolid4, size: "sm", className: "shrink-0 text-modal-footer-icon" }),
2911
- /* @__PURE__ */ jsx25("span", { className: "text-sm font-regular leading-sm text-modal-footer-text", children: infoMessage })
3480
+ infoMessage && /* @__PURE__ */ jsxs24("div", { className: "flex flex-1 items-center gap-base", children: [
3481
+ /* @__PURE__ */ jsx27(Icon19, { icon: faCircleInfoSolid4, size: "sm", className: "shrink-0 text-modal-footer-icon" }),
3482
+ /* @__PURE__ */ jsx27("span", { className: "text-sm font-regular leading-sm text-modal-footer-text", children: infoMessage })
2912
3483
  ] }),
2913
3484
  children
2914
3485
  ]
@@ -2918,9 +3489,9 @@ var ModalFooter = React25.forwardRef(
2918
3489
  ModalFooter.displayName = "ModalFooter";
2919
3490
 
2920
3491
  // src/components/ui/dialog.tsx
2921
- import * as React26 from "react";
2922
- import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
2923
- var Dialog = React26.forwardRef(
3492
+ import * as React28 from "react";
3493
+ import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
3494
+ var Dialog = React28.forwardRef(
2924
3495
  ({
2925
3496
  open,
2926
3497
  onOpenChange,
@@ -2937,16 +3508,16 @@ var Dialog = React26.forwardRef(
2937
3508
  className
2938
3509
  }, ref) => {
2939
3510
  const handleCancel = onCancel ?? (() => onOpenChange?.(false));
2940
- return /* @__PURE__ */ jsx26(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs23(ModalContent, { size: "sm", ref, className, children: [
2941
- /* @__PURE__ */ jsxs23(ModalHeader, { showBorder: false, onClose: handleCancel, children: [
2942
- /* @__PURE__ */ jsx26(ModalTitle, { children: title }),
2943
- description && /* @__PURE__ */ jsx26(ModalDescription, { children: description })
3511
+ return /* @__PURE__ */ jsx28(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs25(ModalContent, { size: "sm", ref, className, children: [
3512
+ /* @__PURE__ */ jsxs25(ModalHeader, { showBorder: false, onClose: handleCancel, children: [
3513
+ /* @__PURE__ */ jsx28(ModalTitle, { children: title }),
3514
+ description && /* @__PURE__ */ jsx28(ModalDescription, { children: description })
2944
3515
  ] }),
2945
- /* @__PURE__ */ jsxs23(ModalFooter, { children: [
2946
- /* @__PURE__ */ jsx26(ModalClose, { asChild: true, children: /* @__PURE__ */ jsx26(Button, { appearance: "ghost", intent: "brand", size: "md", onClick: handleCancel, children: cancelLabel }) }),
2947
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-md", children: [
2948
- secondaryLabel && /* @__PURE__ */ jsx26(Button, { appearance: "outlined", intent: "brand", size: "md", onClick: onSecondaryAction, children: secondaryLabel }),
2949
- /* @__PURE__ */ jsx26(
3516
+ /* @__PURE__ */ jsxs25(ModalFooter, { children: [
3517
+ /* @__PURE__ */ jsx28(ModalClose, { asChild: true, children: /* @__PURE__ */ jsx28(Button, { appearance: "ghost", intent: "brand", size: "md", onClick: handleCancel, children: cancelLabel }) }),
3518
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-md", children: [
3519
+ secondaryLabel && /* @__PURE__ */ jsx28(Button, { appearance: "outlined", intent: "brand", size: "md", onClick: onSecondaryAction, children: secondaryLabel }),
3520
+ /* @__PURE__ */ jsx28(
2950
3521
  Button,
2951
3522
  {
2952
3523
  appearance: "solid",
@@ -2965,11 +3536,11 @@ var Dialog = React26.forwardRef(
2965
3536
  Dialog.displayName = "Dialog";
2966
3537
 
2967
3538
  // src/components/ui/empty-state.tsx
2968
- import * as React27 from "react";
2969
- import { cva as cva16 } from "class-variance-authority";
2970
- import { Icon as Icon18 } from "@l3mpire/icons";
2971
- import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
2972
- var emptyStateVariants = cva16(
3539
+ import * as React29 from "react";
3540
+ import { cva as cva18 } from "class-variance-authority";
3541
+ import { Icon as Icon20 } from "@l3mpire/icons";
3542
+ import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
3543
+ var emptyStateVariants = cva18(
2973
3544
  "flex flex-col items-center text-center",
2974
3545
  {
2975
3546
  variants: {
@@ -2983,7 +3554,7 @@ var emptyStateVariants = cva16(
2983
3554
  }
2984
3555
  }
2985
3556
  );
2986
- var iconContainerVariants2 = cva16(
3557
+ var iconContainerVariants2 = cva18(
2987
3558
  [
2988
3559
  "flex items-center justify-center shrink-0",
2989
3560
  "bg-table-bg border border-table-border",
@@ -3001,7 +3572,7 @@ var iconContainerVariants2 = cva16(
3001
3572
  }
3002
3573
  }
3003
3574
  );
3004
- var EmptyState = React27.forwardRef(
3575
+ var EmptyState = React29.forwardRef(
3005
3576
  ({
3006
3577
  className,
3007
3578
  size = "md",
@@ -3013,23 +3584,23 @@ var EmptyState = React27.forwardRef(
3013
3584
  ...props
3014
3585
  }, ref) => {
3015
3586
  const isMd = size === "md";
3016
- return /* @__PURE__ */ jsxs24(
3587
+ return /* @__PURE__ */ jsxs26(
3017
3588
  "div",
3018
3589
  {
3019
3590
  ref,
3020
3591
  className: cn(emptyStateVariants({ size }), className),
3021
3592
  ...props,
3022
3593
  children: [
3023
- icon && /* @__PURE__ */ jsx27("div", { className: iconContainerVariants2({ size }), children: /* @__PURE__ */ jsx27(
3024
- Icon18,
3594
+ icon && /* @__PURE__ */ jsx29("div", { className: iconContainerVariants2({ size }), children: /* @__PURE__ */ jsx29(
3595
+ Icon20,
3025
3596
  {
3026
3597
  icon,
3027
3598
  size: isMd ? "md" : "sm",
3028
3599
  className: "text-table-cell-text-secondary"
3029
3600
  }
3030
3601
  ) }),
3031
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-xs w-full", children: [
3032
- /* @__PURE__ */ jsx27(
3602
+ /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-xs w-full", children: [
3603
+ /* @__PURE__ */ jsx29(
3033
3604
  "p",
3034
3605
  {
3035
3606
  className: cn(
@@ -3039,7 +3610,7 @@ var EmptyState = React27.forwardRef(
3039
3610
  children: title
3040
3611
  }
3041
3612
  ),
3042
- description && /* @__PURE__ */ jsx27(
3613
+ description && /* @__PURE__ */ jsx29(
3043
3614
  "p",
3044
3615
  {
3045
3616
  className: cn(
@@ -3050,7 +3621,7 @@ var EmptyState = React27.forwardRef(
3050
3621
  }
3051
3622
  )
3052
3623
  ] }),
3053
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs24(
3624
+ (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs26(
3054
3625
  "div",
3055
3626
  {
3056
3627
  className: cn(
@@ -3058,7 +3629,7 @@ var EmptyState = React27.forwardRef(
3058
3629
  isMd ? "gap-lg" : "gap-base"
3059
3630
  ),
3060
3631
  children: [
3061
- secondaryAction && /* @__PURE__ */ jsx27(
3632
+ secondaryAction && /* @__PURE__ */ jsx29(
3062
3633
  Button,
3063
3634
  {
3064
3635
  appearance: "outlined",
@@ -3068,7 +3639,7 @@ var EmptyState = React27.forwardRef(
3068
3639
  children: secondaryAction.label
3069
3640
  }
3070
3641
  ),
3071
- primaryAction && /* @__PURE__ */ jsx27(
3642
+ primaryAction && /* @__PURE__ */ jsx29(
3072
3643
  Button,
3073
3644
  {
3074
3645
  appearance: "solid",
@@ -3089,8 +3660,8 @@ var EmptyState = React27.forwardRef(
3089
3660
  EmptyState.displayName = "EmptyState";
3090
3661
 
3091
3662
  // src/components/ui/table-cells.tsx
3092
- import * as React28 from "react";
3093
- import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
3663
+ import * as React30 from "react";
3664
+ import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
3094
3665
  function getInitials(name) {
3095
3666
  return name.split(" ").map((part) => part[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
3096
3667
  }
@@ -3099,11 +3670,11 @@ var AvatarCell = ({
3099
3670
  subtitle,
3100
3671
  src,
3101
3672
  className
3102
- }) => /* @__PURE__ */ jsxs25("div", { className: cn("flex items-center gap-md", className), children: [
3103
- /* @__PURE__ */ jsx28(Avatar, { initials: getInitials(name), src, alt: name, size: "lg", shape: "rounded" }),
3104
- /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
3105
- /* @__PURE__ */ jsx28("span", { className: "text-sm font-medium text-table-cell-text-primary leading-sm", children: name }),
3106
- subtitle && /* @__PURE__ */ jsx28("span", { className: "text-xs font-regular text-table-cell-text-secondary leading-xs", children: subtitle })
3673
+ }) => /* @__PURE__ */ jsxs27("div", { className: cn("flex items-center gap-md", className), children: [
3674
+ /* @__PURE__ */ jsx30(Avatar, { initials: getInitials(name), src, alt: name, size: "lg", shape: "rounded" }),
3675
+ /* @__PURE__ */ jsxs27("div", { className: "flex flex-col", children: [
3676
+ /* @__PURE__ */ jsx30("span", { className: "text-sm font-medium text-table-cell-text-primary leading-sm", children: name }),
3677
+ subtitle && /* @__PURE__ */ jsx30("span", { className: "text-xs font-regular text-table-cell-text-secondary leading-xs", children: subtitle })
3107
3678
  ] })
3108
3679
  ] });
3109
3680
  AvatarCell.displayName = "AvatarCell";
@@ -3113,7 +3684,7 @@ var StatusCell = ({
3113
3684
  type = "primary",
3114
3685
  size = "sm",
3115
3686
  className
3116
- }) => /* @__PURE__ */ jsx28("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx28(Badge, { variant, type, size, children: label }) });
3687
+ }) => /* @__PURE__ */ jsx30("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx30(Badge, { variant, type, size, children: label }) });
3117
3688
  StatusCell.displayName = "StatusCell";
3118
3689
  var secondaryIntentColors = {
3119
3690
  success: "text-badge-light-success-text",
@@ -3131,7 +3702,7 @@ var NumberCell = ({
3131
3702
  className
3132
3703
  }) => {
3133
3704
  const formatted = typeof value === "number" && formatOptions ? new Intl.NumberFormat(locale, formatOptions).format(value) : String(value);
3134
- return /* @__PURE__ */ jsxs25(
3705
+ return /* @__PURE__ */ jsxs27(
3135
3706
  "div",
3136
3707
  {
3137
3708
  className: cn(
@@ -3140,8 +3711,8 @@ var NumberCell = ({
3140
3711
  className
3141
3712
  ),
3142
3713
  children: [
3143
- /* @__PURE__ */ jsx28("span", { className: "text-sm font-medium text-table-cell-text-primary", children: formatted }),
3144
- secondaryStat && /* @__PURE__ */ jsx28(
3714
+ /* @__PURE__ */ jsx30("span", { className: "text-sm font-medium text-table-cell-text-primary", children: formatted }),
3715
+ secondaryStat && /* @__PURE__ */ jsx30(
3145
3716
  "span",
3146
3717
  {
3147
3718
  className: cn(
@@ -3169,7 +3740,7 @@ var DateCell = ({
3169
3740
  }) => {
3170
3741
  const d = typeof date === "string" ? new Date(date) : date;
3171
3742
  const formatted = d.toLocaleDateString(locale, format);
3172
- return /* @__PURE__ */ jsx28(
3743
+ return /* @__PURE__ */ jsx30(
3173
3744
  "span",
3174
3745
  {
3175
3746
  className: cn(
@@ -3181,7 +3752,7 @@ var DateCell = ({
3181
3752
  );
3182
3753
  };
3183
3754
  DateCell.displayName = "DateCell";
3184
- var EmailCell = ({ email, className }) => /* @__PURE__ */ jsx28(
3755
+ var EmailCell = ({ email, className }) => /* @__PURE__ */ jsx30(
3185
3756
  Link,
3186
3757
  {
3187
3758
  intent: "neutral",
@@ -3197,13 +3768,13 @@ var LinkCell = ({
3197
3768
  label,
3198
3769
  target = "_blank",
3199
3770
  className
3200
- }) => /* @__PURE__ */ jsx28(Link, { intent: "brand", size: "sm", href, target, className, children: label ?? href });
3771
+ }) => /* @__PURE__ */ jsx30(Link, { intent: "brand", size: "sm", href, target, className, children: label ?? href });
3201
3772
  LinkCell.displayName = "LinkCell";
3202
3773
  var TextCell = ({
3203
3774
  value,
3204
3775
  secondary = false,
3205
3776
  className
3206
- }) => /* @__PURE__ */ jsx28(
3777
+ }) => /* @__PURE__ */ jsx30(
3207
3778
  "span",
3208
3779
  {
3209
3780
  className: cn(
@@ -3219,20 +3790,20 @@ var ButtonCell = ({
3219
3790
  className,
3220
3791
  children,
3221
3792
  ...props
3222
- }) => /* @__PURE__ */ jsx28("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx28(Button, { size: "sm", appearance: "ghost", intent: "brand", ...props, children }) });
3793
+ }) => /* @__PURE__ */ jsx30("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ jsx30(Button, { size: "sm", appearance: "ghost", intent: "brand", ...props, children }) });
3223
3794
  ButtonCell.displayName = "ButtonCell";
3224
3795
  var EditableCell = ({
3225
3796
  value,
3226
3797
  onSave,
3227
3798
  className
3228
3799
  }) => {
3229
- const [isEditing, setIsEditing] = React28.useState(false);
3230
- const [draft, setDraft] = React28.useState(value);
3231
- const inputRef = React28.useRef(null);
3232
- React28.useEffect(() => {
3800
+ const [isEditing, setIsEditing] = React30.useState(false);
3801
+ const [draft, setDraft] = React30.useState(value);
3802
+ const inputRef = React30.useRef(null);
3803
+ React30.useEffect(() => {
3233
3804
  setDraft(value);
3234
3805
  }, [value]);
3235
- React28.useEffect(() => {
3806
+ React30.useEffect(() => {
3236
3807
  if (isEditing) {
3237
3808
  inputRef.current?.focus();
3238
3809
  inputRef.current?.select();
@@ -3252,7 +3823,7 @@ var EditableCell = ({
3252
3823
  }
3253
3824
  };
3254
3825
  if (isEditing) {
3255
- return /* @__PURE__ */ jsx28(
3826
+ return /* @__PURE__ */ jsx30(
3256
3827
  "input",
3257
3828
  {
3258
3829
  ref: inputRef,
@@ -3268,7 +3839,7 @@ var EditableCell = ({
3268
3839
  }
3269
3840
  );
3270
3841
  }
3271
- return /* @__PURE__ */ jsx28(
3842
+ return /* @__PURE__ */ jsx30(
3272
3843
  "span",
3273
3844
  {
3274
3845
  role: "button",
@@ -3290,7 +3861,7 @@ var EditableCell = ({
3290
3861
  );
3291
3862
  };
3292
3863
  EditableCell.displayName = "EditableCell";
3293
- var RowActions = ({ children, className }) => /* @__PURE__ */ jsx28(
3864
+ var RowActions = ({ children, className }) => /* @__PURE__ */ jsx30(
3294
3865
  "div",
3295
3866
  {
3296
3867
  className: cn(
@@ -3304,7 +3875,7 @@ var RowActions = ({ children, className }) => /* @__PURE__ */ jsx28(
3304
3875
  RowActions.displayName = "RowActions";
3305
3876
 
3306
3877
  // src/components/ui/data-table.tsx
3307
- import * as React30 from "react";
3878
+ import * as React32 from "react";
3308
3879
  import {
3309
3880
  flexRender,
3310
3881
  getCoreRowModel,
@@ -3330,7 +3901,7 @@ import {
3330
3901
  } from "@dnd-kit/sortable";
3331
3902
  import { CSS } from "@dnd-kit/utilities";
3332
3903
  import {
3333
- Icon as Icon19,
3904
+ Icon as Icon21,
3334
3905
  faChevronLeftOutline,
3335
3906
  faChevronRightOutline,
3336
3907
  faSortSolid,
@@ -3343,9 +3914,9 @@ import {
3343
3914
  import * as PopoverPrimitive2 from "@radix-ui/react-popover";
3344
3915
 
3345
3916
  // src/components/ui/table.tsx
3346
- import * as React29 from "react";
3347
- import { jsx as jsx29 } from "react/jsx-runtime";
3348
- var Table = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx29(
3917
+ import * as React31 from "react";
3918
+ import { jsx as jsx31 } from "react/jsx-runtime";
3919
+ var Table = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx31(
3349
3920
  "table",
3350
3921
  {
3351
3922
  ref,
@@ -3354,7 +3925,7 @@ var Table = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
3354
3925
  }
3355
3926
  ) }));
3356
3927
  Table.displayName = "Table";
3357
- var TableHeader = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
3928
+ var TableHeader = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
3358
3929
  "thead",
3359
3930
  {
3360
3931
  ref,
@@ -3363,9 +3934,9 @@ var TableHeader = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
3363
3934
  }
3364
3935
  ));
3365
3936
  TableHeader.displayName = "TableHeader";
3366
- var TableBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29("tbody", { ref, className: cn("[&_tr:last-child_td]:border-b-0", className), ...props }));
3937
+ var TableBody = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31("tbody", { ref, className: cn("[&_tr:last-child_td]:border-b-0", className), ...props }));
3367
3938
  TableBody.displayName = "TableBody";
3368
- var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
3939
+ var TableFooter = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
3369
3940
  "tfoot",
3370
3941
  {
3371
3942
  ref,
@@ -3377,7 +3948,7 @@ var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
3377
3948
  }
3378
3949
  ));
3379
3950
  TableFooter.displayName = "TableFooter";
3380
- var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
3951
+ var TableRow = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
3381
3952
  "tr",
3382
3953
  {
3383
3954
  ref,
@@ -3391,7 +3962,7 @@ var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3391
3962
  }
3392
3963
  ));
3393
3964
  TableRow.displayName = "TableRow";
3394
- var TableHead = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
3965
+ var TableHead = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
3395
3966
  "th",
3396
3967
  {
3397
3968
  ref,
@@ -3407,7 +3978,7 @@ var TableHead = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3407
3978
  }
3408
3979
  ));
3409
3980
  TableHead.displayName = "TableHead";
3410
- var TableCell = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
3981
+ var TableCell = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
3411
3982
  "td",
3412
3983
  {
3413
3984
  ref,
@@ -3422,7 +3993,7 @@ var TableCell = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3422
3993
  }
3423
3994
  ));
3424
3995
  TableCell.displayName = "TableCell";
3425
- var TableCaption = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
3996
+ var TableCaption = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
3426
3997
  "caption",
3427
3998
  {
3428
3999
  ref,
@@ -3433,7 +4004,7 @@ var TableCaption = React29.forwardRef(({ className, ...props }, ref) => /* @__PU
3433
4004
  TableCaption.displayName = "TableCaption";
3434
4005
 
3435
4006
  // src/components/ui/data-table.tsx
3436
- import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
4007
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
3437
4008
  var filterOperatorsByType = {
3438
4009
  string: [
3439
4010
  { value: "contains", label: "Contains" },
@@ -3483,12 +4054,12 @@ function ColumnFilterPopover({
3483
4054
  children
3484
4055
  }) {
3485
4056
  const operators = filterOperatorsByType[filterType] ?? filterOperatorsByType.string;
3486
- const [operator, setOperator] = React30.useState(
4057
+ const [operator, setOperator] = React32.useState(
3487
4058
  operators[0].value
3488
4059
  );
3489
- const [inputValue, setInputValue] = React30.useState("");
3490
- const [open, setOpen] = React30.useState(false);
3491
- React30.useEffect(() => {
4060
+ const [inputValue, setInputValue] = React32.useState("");
4061
+ const [open, setOpen] = React32.useState(false);
4062
+ React32.useEffect(() => {
3492
4063
  if (open && filterValue && typeof filterValue === "object") {
3493
4064
  const fv = filterValue;
3494
4065
  if (fv.operator) setOperator(fv.operator);
@@ -3498,9 +4069,9 @@ function ColumnFilterPopover({
3498
4069
  setInputValue("");
3499
4070
  }
3500
4071
  }, [open, filterValue, operators]);
3501
- return /* @__PURE__ */ jsxs26(PopoverPrimitive2.Root, { open, onOpenChange: setOpen, children: [
3502
- /* @__PURE__ */ jsx30(PopoverPrimitive2.Trigger, { asChild: true, children }),
3503
- /* @__PURE__ */ jsx30(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx30(
4072
+ return /* @__PURE__ */ jsxs28(PopoverPrimitive2.Root, { open, onOpenChange: setOpen, children: [
4073
+ /* @__PURE__ */ jsx32(PopoverPrimitive2.Trigger, { asChild: true, children }),
4074
+ /* @__PURE__ */ jsx32(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx32(
3504
4075
  PopoverPrimitive2.Content,
3505
4076
  {
3506
4077
  align: "start",
@@ -3510,9 +4081,9 @@ function ColumnFilterPopover({
3510
4081
  "animate-in fade-in-0 zoom-in-95"
3511
4082
  ),
3512
4083
  onClick: (e) => e.stopPropagation(),
3513
- children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-sm", children: [
3514
- /* @__PURE__ */ jsx30("span", { className: "text-xs font-medium text-table-head-text", children: "Filter" }),
3515
- /* @__PURE__ */ jsx30(
4084
+ children: /* @__PURE__ */ jsxs28("div", { className: "flex flex-col gap-sm", children: [
4085
+ /* @__PURE__ */ jsx32("span", { className: "text-xs font-medium text-table-head-text", children: "Filter" }),
4086
+ /* @__PURE__ */ jsx32(
3516
4087
  "select",
3517
4088
  {
3518
4089
  className: cn(
@@ -3522,10 +4093,10 @@ function ColumnFilterPopover({
3522
4093
  ),
3523
4094
  value: operator,
3524
4095
  onChange: (e) => setOperator(e.target.value),
3525
- children: operators.map((op) => /* @__PURE__ */ jsx30("option", { value: op.value, children: op.label }, op.value))
4096
+ children: operators.map((op) => /* @__PURE__ */ jsx32("option", { value: op.value, children: op.label }, op.value))
3526
4097
  }
3527
4098
  ),
3528
- !noValueOperators.has(operator) && /* @__PURE__ */ jsx30(
4099
+ !noValueOperators.has(operator) && /* @__PURE__ */ jsx32(
3529
4100
  "input",
3530
4101
  {
3531
4102
  type: filterType === "number" ? "number" : filterType === "date" ? "date" : "text",
@@ -3545,8 +4116,8 @@ function ColumnFilterPopover({
3545
4116
  }
3546
4117
  }
3547
4118
  ),
3548
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-end gap-xs pt-xs", children: [
3549
- /* @__PURE__ */ jsx30(
4119
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-end gap-xs pt-xs", children: [
4120
+ /* @__PURE__ */ jsx32(
3550
4121
  Button,
3551
4122
  {
3552
4123
  appearance: "ghost",
@@ -3559,7 +4130,7 @@ function ColumnFilterPopover({
3559
4130
  children: "Clear"
3560
4131
  }
3561
4132
  ),
3562
- /* @__PURE__ */ jsx30(
4133
+ /* @__PURE__ */ jsx32(
3563
4134
  Button,
3564
4135
  {
3565
4136
  appearance: "solid",
@@ -3592,7 +4163,7 @@ function DraggableHeaderCell({
3592
4163
  const leadingIcon = meta?.icon;
3593
4164
  const canDrag = isDragEnabled && meta?.enableDrag !== false;
3594
4165
  const filterType = meta?.filterType ?? "string";
3595
- const [isHovered, setIsHovered] = React30.useState(false);
4166
+ const [isHovered, setIsHovered] = React32.useState(false);
3596
4167
  const {
3597
4168
  attributes,
3598
4169
  listeners,
@@ -3614,7 +4185,7 @@ function DraggableHeaderCell({
3614
4185
  opacity: isDragging ? 0.5 : 1,
3615
4186
  zIndex: isDragging ? 1 : void 0
3616
4187
  };
3617
- return /* @__PURE__ */ jsxs26(
4188
+ return /* @__PURE__ */ jsxs28(
3618
4189
  TableHead,
3619
4190
  {
3620
4191
  ref: setNodeRef,
@@ -3628,16 +4199,16 @@ function DraggableHeaderCell({
3628
4199
  onMouseEnter: () => setIsHovered(true),
3629
4200
  onMouseLeave: () => setIsHovered(false),
3630
4201
  children: [
3631
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-xs", children: [
3632
- leadingIcon && (canDrag ? /* @__PURE__ */ jsx30(
4202
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-xs", children: [
4203
+ leadingIcon && (canDrag ? /* @__PURE__ */ jsx32(
3633
4204
  "div",
3634
4205
  {
3635
4206
  ...attributes,
3636
4207
  ...listeners,
3637
4208
  className: "shrink-0 flex items-center cursor-grab",
3638
4209
  onClick: (e) => e.stopPropagation(),
3639
- children: /* @__PURE__ */ jsx30(
3640
- Icon19,
4210
+ children: /* @__PURE__ */ jsx32(
4211
+ Icon21,
3641
4212
  {
3642
4213
  icon: isHovered ? faGripDotsVerticalSolid2 : leadingIcon,
3643
4214
  size: "xs",
@@ -3645,23 +4216,23 @@ function DraggableHeaderCell({
3645
4216
  }
3646
4217
  )
3647
4218
  }
3648
- ) : /* @__PURE__ */ jsx30(
3649
- Icon19,
4219
+ ) : /* @__PURE__ */ jsx32(
4220
+ Icon21,
3650
4221
  {
3651
4222
  icon: leadingIcon,
3652
4223
  size: "xs",
3653
4224
  className: "shrink-0 text-table-head-icon"
3654
4225
  }
3655
4226
  )),
3656
- !leadingIcon && canDrag && isHovered && /* @__PURE__ */ jsx30(
4227
+ !leadingIcon && canDrag && isHovered && /* @__PURE__ */ jsx32(
3657
4228
  "div",
3658
4229
  {
3659
4230
  ...attributes,
3660
4231
  ...listeners,
3661
4232
  className: "shrink-0 flex items-center cursor-grab",
3662
4233
  onClick: (e) => e.stopPropagation(),
3663
- children: /* @__PURE__ */ jsx30(
3664
- Icon19,
4234
+ children: /* @__PURE__ */ jsx32(
4235
+ Icon21,
3665
4236
  {
3666
4237
  icon: faGripDotsVerticalSolid2,
3667
4238
  size: "xs",
@@ -3670,33 +4241,33 @@ function DraggableHeaderCell({
3670
4241
  )
3671
4242
  }
3672
4243
  ),
3673
- /* @__PURE__ */ jsx30("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : flexRender(
4244
+ /* @__PURE__ */ jsx32("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : flexRender(
3674
4245
  header.column.columnDef.header,
3675
4246
  header.getContext()
3676
4247
  ) }),
3677
- canSort && (isSorted || isHovered) && /* @__PURE__ */ jsx30(
3678
- Icon19,
4248
+ canSort && (isSorted || isHovered) && /* @__PURE__ */ jsx32(
4249
+ Icon21,
3679
4250
  {
3680
4251
  icon: isSorted === "asc" ? faSortUpSolid : isSorted === "desc" ? faSortDownSolid : faSortSolid,
3681
4252
  size: "xs",
3682
4253
  className: "shrink-0 text-table-head-icon"
3683
4254
  }
3684
4255
  ),
3685
- enableFiltering && (isFiltered || isHovered) && /* @__PURE__ */ jsx30(
4256
+ enableFiltering && (isFiltered || isHovered) && /* @__PURE__ */ jsx32(
3686
4257
  ColumnFilterPopover,
3687
4258
  {
3688
4259
  filterType,
3689
4260
  filterValue: header.column.getFilterValue(),
3690
4261
  onApply: (val) => header.column.setFilterValue(val),
3691
4262
  onClear: () => header.column.setFilterValue(void 0),
3692
- children: /* @__PURE__ */ jsx30(
4263
+ children: /* @__PURE__ */ jsx32(
3693
4264
  "button",
3694
4265
  {
3695
4266
  type: "button",
3696
4267
  onClick: (e) => e.stopPropagation(),
3697
4268
  className: "shrink-0 p-0 border-0 bg-transparent cursor-pointer",
3698
- children: /* @__PURE__ */ jsx30(
3699
- Icon19,
4269
+ children: /* @__PURE__ */ jsx32(
4270
+ Icon21,
3700
4271
  {
3701
4272
  icon: isFiltered ? faFilterSolid : faFilterOutline,
3702
4273
  size: "xs",
@@ -3708,7 +4279,7 @@ function DraggableHeaderCell({
3708
4279
  }
3709
4280
  )
3710
4281
  ] }),
3711
- enableColumnResizing && header.column.getCanResize() && /* @__PURE__ */ jsx30(
4282
+ enableColumnResizing && header.column.getCanResize() && /* @__PURE__ */ jsx32(
3712
4283
  "div",
3713
4284
  {
3714
4285
  onMouseDown: header.getResizeHandler(),
@@ -3826,17 +4397,17 @@ function DataTableInner({
3826
4397
  emptyMessage = "No results.",
3827
4398
  bordered = false
3828
4399
  }) {
3829
- const [internalSorting, setInternalSorting] = React30.useState([]);
3830
- const [internalColumnFilters, setInternalColumnFilters] = React30.useState([]);
3831
- const [internalPagination, setInternalPagination] = React30.useState({ pageIndex: 0, pageSize: 10 });
3832
- const [internalRowSelection, setInternalRowSelection] = React30.useState({});
3833
- const [internalColumnVisibility, setInternalColumnVisibility] = React30.useState({});
3834
- const [internalColumnOrder, setInternalColumnOrder] = React30.useState([]);
3835
- const [internalColumnPinning, setInternalColumnPinning] = React30.useState({});
3836
- const [internalColumnSizing, setInternalColumnSizing] = React30.useState({});
4400
+ const [internalSorting, setInternalSorting] = React32.useState([]);
4401
+ const [internalColumnFilters, setInternalColumnFilters] = React32.useState([]);
4402
+ const [internalPagination, setInternalPagination] = React32.useState({ pageIndex: 0, pageSize: 10 });
4403
+ const [internalRowSelection, setInternalRowSelection] = React32.useState({});
4404
+ const [internalColumnVisibility, setInternalColumnVisibility] = React32.useState({});
4405
+ const [internalColumnOrder, setInternalColumnOrder] = React32.useState([]);
4406
+ const [internalColumnPinning, setInternalColumnPinning] = React32.useState({});
4407
+ const [internalColumnSizing, setInternalColumnSizing] = React32.useState({});
3837
4408
  const columnOrder = columnOrderProp ?? internalColumnOrder;
3838
4409
  const setColumnOrder = onColumnOrderChange ?? setInternalColumnOrder;
3839
- React30.useEffect(() => {
4410
+ React32.useEffect(() => {
3840
4411
  if (enableColumnDrag && columnOrder.length === 0) {
3841
4412
  const ids = columns.map((c) => {
3842
4413
  if ("accessorKey" in c && c.accessorKey) return String(c.accessorKey);
@@ -3930,7 +4501,7 @@ function DataTableInner({
3930
4501
  }),
3931
4502
  useSensor(KeyboardSensor)
3932
4503
  );
3933
- const handleDragEnd = React30.useCallback(
4504
+ const handleDragEnd = React32.useCallback(
3934
4505
  (event) => {
3935
4506
  const { active, over } = event;
3936
4507
  if (!over || active.id === over.id) return;
@@ -3944,12 +4515,12 @@ function DataTableInner({
3944
4515
  },
3945
4516
  [table, setColumnOrder]
3946
4517
  );
3947
- const columnIds = React30.useMemo(
4518
+ const columnIds = React32.useMemo(
3948
4519
  () => table.getAllLeafColumns().map((c) => c.id),
3949
4520
  // eslint-disable-next-line react-hooks/exhaustive-deps
3950
4521
  [table.getAllLeafColumns().length, columnOrder]
3951
4522
  );
3952
- const columnSizeVars = React30.useMemo(() => {
4523
+ const columnSizeVars = React32.useMemo(() => {
3953
4524
  if (!enableColumnResizing) return {};
3954
4525
  const headers = table.getFlatHeaders();
3955
4526
  const vars = {};
@@ -3960,23 +4531,23 @@ function DataTableInner({
3960
4531
  return vars;
3961
4532
  }, [enableColumnResizing, table.getState().columnSizing]);
3962
4533
  const totalSize = enableColumnResizing ? table.getTotalSize() : void 0;
3963
- const tableContent = /* @__PURE__ */ jsxs26("div", { className: cn("w-full", className), style: columnSizeVars, children: [
3964
- /* @__PURE__ */ jsxs26(
4534
+ const tableContent = /* @__PURE__ */ jsxs28("div", { className: cn("w-full", className), style: columnSizeVars, children: [
4535
+ /* @__PURE__ */ jsxs28(
3965
4536
  Table,
3966
4537
  {
3967
4538
  style: totalSize ? { width: totalSize, tableLayout: "fixed" } : void 0,
3968
4539
  className: totalSize ? "w-auto" : void 0,
3969
4540
  children: [
3970
- /* @__PURE__ */ jsx30(
4541
+ /* @__PURE__ */ jsx32(
3971
4542
  TableHeader,
3972
4543
  {
3973
4544
  className: cn(bordered && "border-t border-table-border"),
3974
- children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx30(TableRow, { children: enableColumnDrag ? /* @__PURE__ */ jsx30(
4545
+ children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx32(TableRow, { children: enableColumnDrag ? /* @__PURE__ */ jsx32(
3975
4546
  SortableContext,
3976
4547
  {
3977
4548
  items: columnIds,
3978
4549
  strategy: horizontalListSortingStrategy,
3979
- children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx30(
4550
+ children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx32(
3980
4551
  DraggableHeaderCell,
3981
4552
  {
3982
4553
  header,
@@ -3988,7 +4559,7 @@ function DataTableInner({
3988
4559
  header.id
3989
4560
  ))
3990
4561
  }
3991
- ) : headerGroup.headers.map((header) => /* @__PURE__ */ jsx30(
4562
+ ) : headerGroup.headers.map((header) => /* @__PURE__ */ jsx32(
3992
4563
  DraggableHeaderCell,
3993
4564
  {
3994
4565
  header,
@@ -4001,11 +4572,11 @@ function DataTableInner({
4001
4572
  )) }, headerGroup.id))
4002
4573
  }
4003
4574
  ),
4004
- /* @__PURE__ */ jsx30(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx30(
4575
+ /* @__PURE__ */ jsx32(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx32(
4005
4576
  TableRow,
4006
4577
  {
4007
4578
  "data-state": row.getIsSelected() ? "selected" : void 0,
4008
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx30(
4579
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx32(
4009
4580
  TableCell,
4010
4581
  {
4011
4582
  style: enableColumnResizing ? { width: `var(--col-${cell.column.id}-size)` } : void 0,
@@ -4019,12 +4590,12 @@ function DataTableInner({
4019
4590
  ))
4020
4591
  },
4021
4592
  row.id
4022
- )) : /* @__PURE__ */ jsx30(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx30(
4593
+ )) : /* @__PURE__ */ jsx32(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx32(
4023
4594
  TableCell,
4024
4595
  {
4025
4596
  colSpan: columns.length,
4026
4597
  className: "h-48 text-center border-b-0",
4027
- children: emptyState ?? /* @__PURE__ */ jsx30("span", { className: "text-sm text-table-cell-text-secondary", children: emptyMessage })
4598
+ children: emptyState ?? /* @__PURE__ */ jsx32("span", { className: "text-sm text-table-cell-text-secondary", children: emptyMessage })
4028
4599
  }
4029
4600
  ) }) })
4030
4601
  ]
@@ -4033,7 +4604,7 @@ function DataTableInner({
4033
4604
  children?.(table)
4034
4605
  ] });
4035
4606
  if (enableColumnDrag) {
4036
- return /* @__PURE__ */ jsx30(
4607
+ return /* @__PURE__ */ jsx32(
4037
4608
  DndContext,
4038
4609
  {
4039
4610
  sensors,
@@ -4054,7 +4625,7 @@ function DataTablePagination({
4054
4625
  const totalCount = table.getFilteredRowModel().rows.length;
4055
4626
  const pageIndex = table.getState().pagination.pageIndex;
4056
4627
  const pageCount = table.getPageCount();
4057
- return /* @__PURE__ */ jsxs26(
4628
+ return /* @__PURE__ */ jsxs28(
4058
4629
  "div",
4059
4630
  {
4060
4631
  className: cn(
@@ -4062,16 +4633,16 @@ function DataTablePagination({
4062
4633
  className
4063
4634
  ),
4064
4635
  children: [
4065
- /* @__PURE__ */ jsx30("div", { className: "text-xs text-table-cell-text-secondary", children: selectedCount > 0 && /* @__PURE__ */ jsxs26("span", { children: [
4636
+ /* @__PURE__ */ jsx32("div", { className: "text-xs text-table-cell-text-secondary", children: selectedCount > 0 && /* @__PURE__ */ jsxs28("span", { children: [
4066
4637
  selectedCount,
4067
4638
  " of ",
4068
4639
  totalCount,
4069
4640
  " row(s) selected"
4070
4641
  ] }) }),
4071
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-lg", children: [
4072
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-sm", children: [
4073
- /* @__PURE__ */ jsx30("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: "Rows per page" }),
4074
- /* @__PURE__ */ jsx30(
4642
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-lg", children: [
4643
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-sm", children: [
4644
+ /* @__PURE__ */ jsx32("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: "Rows per page" }),
4645
+ /* @__PURE__ */ jsx32(
4075
4646
  "select",
4076
4647
  {
4077
4648
  className: cn(
@@ -4081,18 +4652,18 @@ function DataTablePagination({
4081
4652
  ),
4082
4653
  value: table.getState().pagination.pageSize,
4083
4654
  onChange: (e) => table.setPageSize(Number(e.target.value)),
4084
- children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx30("option", { value: size, children: size }, size))
4655
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx32("option", { value: size, children: size }, size))
4085
4656
  }
4086
4657
  )
4087
4658
  ] }),
4088
- /* @__PURE__ */ jsxs26("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: [
4659
+ /* @__PURE__ */ jsxs28("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: [
4089
4660
  "Page ",
4090
4661
  pageIndex + 1,
4091
4662
  " of ",
4092
4663
  pageCount
4093
4664
  ] }),
4094
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-xs", children: [
4095
- /* @__PURE__ */ jsx30(
4665
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-xs", children: [
4666
+ /* @__PURE__ */ jsx32(
4096
4667
  Button,
4097
4668
  {
4098
4669
  appearance: "outlined",
@@ -4104,7 +4675,7 @@ function DataTablePagination({
4104
4675
  "aria-label": "Previous page"
4105
4676
  }
4106
4677
  ),
4107
- /* @__PURE__ */ jsx30(
4678
+ /* @__PURE__ */ jsx32(
4108
4679
  Button,
4109
4680
  {
4110
4681
  appearance: "outlined",
@@ -4126,15 +4697,15 @@ var DataTable = Object.assign(DataTableInner, { displayName: "DataTable" });
4126
4697
  Object.assign(DataTablePagination, { displayName: "DataTablePagination" });
4127
4698
 
4128
4699
  // src/components/ui/side-panel.tsx
4129
- import * as React31 from "react";
4700
+ import * as React33 from "react";
4130
4701
  import * as DialogPrimitive2 from "@radix-ui/react-dialog";
4131
- import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
4702
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
4132
4703
  var SidePanel = DialogPrimitive2.Root;
4133
4704
  var SidePanelTrigger = DialogPrimitive2.Trigger;
4134
4705
  var SidePanelClose = DialogPrimitive2.Close;
4135
- var SidePanelContent = React31.forwardRef(({ className, overlay = true, children, ...props }, ref) => /* @__PURE__ */ jsxs27(DialogPrimitive2.Portal, { children: [
4136
- overlay && /* @__PURE__ */ jsx31(ModalOverlay, {}),
4137
- /* @__PURE__ */ jsx31(
4706
+ var SidePanelContent = React33.forwardRef(({ className, overlay = true, children, ...props }, ref) => /* @__PURE__ */ jsxs29(DialogPrimitive2.Portal, { children: [
4707
+ overlay && /* @__PURE__ */ jsx33(ModalOverlay, {}),
4708
+ /* @__PURE__ */ jsx33(
4138
4709
  DialogPrimitive2.Content,
4139
4710
  {
4140
4711
  ref,
@@ -4162,6 +4733,7 @@ export {
4162
4733
  Button,
4163
4734
  ButtonCell,
4164
4735
  Checkbox,
4736
+ ChipInput,
4165
4737
  DataTable,
4166
4738
  DataTablePagination,
4167
4739
  DateCell,
@@ -4193,6 +4765,7 @@ export {
4193
4765
  ModalTitle,
4194
4766
  ModalTrigger,
4195
4767
  NumberCell,
4768
+ NumberInput,
4196
4769
  ProductLogo,
4197
4770
  RowActions,
4198
4771
  SearchBar,
@@ -4239,6 +4812,7 @@ export {
4239
4812
  avatarVariants,
4240
4813
  badgeVariants,
4241
4814
  buttonVariants,
4815
+ chipInputVariants,
4242
4816
  cn,
4243
4817
  emptyStateVariants,
4244
4818
  flexRender,