@webdevarif/dashui 0.2.1 → 0.2.3

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
@@ -1880,11 +1880,10 @@ function MediaGrid({
1880
1880
  // src/components/media/media-picker-dialog.tsx
1881
1881
  import * as React20 from "react";
1882
1882
  import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
1883
- var TYPE_OPTIONS = [
1883
+ var ALL_TYPE_OPTIONS = [
1884
1884
  { value: "all", label: "All" },
1885
1885
  { value: "images", label: "Images" },
1886
1886
  { value: "videos", label: "Videos" },
1887
- { value: "audio", label: "Audio" },
1888
1887
  { value: "documents", label: "Docs" }
1889
1888
  ];
1890
1889
  function MediaPickerDialog({
@@ -1910,23 +1909,61 @@ function MediaPickerDialog({
1910
1909
  onSelect
1911
1910
  }) {
1912
1911
  const [localSelected, setLocalSelected] = React20.useState(/* @__PURE__ */ new Set());
1912
+ const [isDragging, setIsDragging] = React20.useState(false);
1913
1913
  const fileInputRef = React20.useRef(null);
1914
+ const dragCounterRef = React20.useRef(0);
1915
+ React20.useEffect(() => {
1916
+ if (!open) {
1917
+ setLocalSelected(/* @__PURE__ */ new Set());
1918
+ setIsDragging(false);
1919
+ dragCounterRef.current = 0;
1920
+ }
1921
+ }, [open]);
1922
+ const handleDragEnter = (e) => {
1923
+ e.preventDefault();
1924
+ e.stopPropagation();
1925
+ if (e.dataTransfer.types.includes("Files")) {
1926
+ dragCounterRef.current++;
1927
+ setIsDragging(true);
1928
+ }
1929
+ };
1930
+ const handleDragLeave = (e) => {
1931
+ e.preventDefault();
1932
+ e.stopPropagation();
1933
+ dragCounterRef.current--;
1934
+ if (dragCounterRef.current <= 0) {
1935
+ dragCounterRef.current = 0;
1936
+ setIsDragging(false);
1937
+ }
1938
+ };
1939
+ const handleDragOver = (e) => {
1940
+ e.preventDefault();
1941
+ e.stopPropagation();
1942
+ };
1943
+ const handleDrop = (e) => {
1944
+ e.preventDefault();
1945
+ e.stopPropagation();
1946
+ dragCounterRef.current = 0;
1947
+ setIsDragging(false);
1948
+ if (!onUpload || !e.dataTransfer.files.length) return;
1949
+ const accepted = accept === "images" ? Array.from(e.dataTransfer.files).filter((f) => f.type.startsWith("image/")) : Array.from(e.dataTransfer.files);
1950
+ if (!accepted.length) return;
1951
+ const dt = new DataTransfer();
1952
+ accepted.forEach((f) => dt.items.add(f));
1953
+ onUpload(dt.files);
1954
+ };
1955
+ const typeOptions = ALL_TYPE_OPTIONS.filter(
1956
+ (o) => accept === "images" ? o.value === "all" || o.value === "images" : true
1957
+ );
1914
1958
  const handleFileSelect = (file) => {
1915
- if (multiple) {
1916
- setLocalSelected((prev) => {
1959
+ setLocalSelected((prev) => {
1960
+ if (multiple) {
1917
1961
  const next = new Set(prev);
1918
- if (next.has(file.id)) {
1919
- next.delete(file.id);
1920
- } else {
1921
- next.add(file.id);
1922
- }
1962
+ next.has(file.id) ? next.delete(file.id) : next.add(file.id);
1923
1963
  return next;
1924
- });
1925
- } else {
1926
- const selected = files.filter((f) => f.id === file.id);
1927
- onSelect(selected);
1928
- onOpenChange(false);
1929
- }
1964
+ }
1965
+ return prev.has(file.id) ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([file.id]);
1966
+ });
1930
1967
  };
1931
1968
  const handleConfirm = () => {
1932
1969
  const selected = files.filter((f) => localSelected.has(f.id));
@@ -1939,163 +1976,201 @@ function MediaPickerDialog({
1939
1976
  }
1940
1977
  };
1941
1978
  const activeUploads = uploads.filter((u) => u.status === "uploading");
1942
- return /* @__PURE__ */ jsx34(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs20(DialogContent, { className: "flex h-[85vh] max-h-[700px] max-w-4xl flex-col gap-0 p-0", "aria-describedby": void 0, children: [
1943
- /* @__PURE__ */ jsxs20(DialogHeader, { className: "flex-row items-center justify-between border-b px-5 py-3", children: [
1944
- /* @__PURE__ */ jsx34(DialogTitle, { className: "text-base", children: title }),
1945
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
1946
- /* @__PURE__ */ jsxs20("span", { className: "text-xs text-muted-foreground", children: [
1947
- total,
1948
- " files"
1949
- ] }),
1950
- onUpload && /* @__PURE__ */ jsxs20(Fragment4, { children: [
1951
- /* @__PURE__ */ jsx34(
1952
- "input",
1953
- {
1954
- ref: fileInputRef,
1955
- type: "file",
1956
- className: "hidden",
1957
- multiple: true,
1958
- accept: accept === "images" ? "image/*" : void 0,
1959
- onChange: handleUploadChange
1960
- }
1961
- ),
1962
- /* @__PURE__ */ jsxs20(
1963
- "button",
1964
- {
1965
- onClick: () => fileInputRef.current?.click(),
1966
- className: "flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground transition-opacity hover:opacity-90",
1967
- children: [
1968
- /* @__PURE__ */ jsxs20("svg", { className: "h-3.5 w-3.5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1969
- /* @__PURE__ */ jsx34("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1970
- /* @__PURE__ */ jsx34("polyline", { points: "17 8 12 3 7 8" }),
1971
- /* @__PURE__ */ jsx34("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
1972
- ] }),
1973
- "Upload"
1974
- ]
1975
- }
1976
- )
1977
- ] })
1978
- ] })
1979
- ] }),
1980
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-1 overflow-hidden", children: [
1981
- folders.length > 0 && /* @__PURE__ */ jsxs20("aside", { className: "flex w-44 shrink-0 flex-col gap-0.5 overflow-y-auto border-r p-2", children: [
1982
- /* @__PURE__ */ jsxs20(
1983
- "button",
1984
- {
1985
- onClick: () => onFolderChange?.(""),
1986
- className: cn(
1987
- "flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors",
1988
- !activeFolderId ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground hover:bg-accent"
1989
- ),
1990
- children: [
1991
- /* @__PURE__ */ jsx34("svg", { className: "h-3.5 w-3.5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx34("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }) }),
1992
- "All files"
1993
- ]
1994
- }
1995
- ),
1996
- folders.map((folder) => /* @__PURE__ */ jsxs20(
1997
- "button",
1998
- {
1999
- onClick: () => onFolderChange?.(folder.id),
2000
- className: cn(
2001
- "flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors",
2002
- activeFolderId === folder.id ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground hover:bg-accent"
2003
- ),
2004
- children: [
2005
- /* @__PURE__ */ jsx34("span", { className: "text-base leading-none", children: folder.icon ?? "\u{1F4C1}" }),
2006
- /* @__PURE__ */ jsx34("span", { className: "truncate", children: folder.name })
2007
- ]
2008
- },
2009
- folder.id
2010
- ))
2011
- ] }),
2012
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
2013
- /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 border-b px-4 py-2", children: [
2014
- /* @__PURE__ */ jsxs20("div", { className: "relative flex-1", children: [
2015
- /* @__PURE__ */ jsxs20("svg", { className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2016
- /* @__PURE__ */ jsx34("circle", { cx: "11", cy: "11", r: "8" }),
2017
- /* @__PURE__ */ jsx34("path", { d: "m21 21-4.35-4.35" })
2018
- ] }),
1979
+ const firstSelected = files.find((f) => localSelected.has(f.id));
1980
+ return /* @__PURE__ */ jsx34(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs20(
1981
+ DialogContent,
1982
+ {
1983
+ "aria-describedby": void 0,
1984
+ className: "flex h-[85vh] max-h-[700px] max-w-4xl flex-col gap-0 p-0",
1985
+ children: [
1986
+ /* @__PURE__ */ jsxs20(DialogHeader, { className: "flex-row items-center gap-3 border-b px-5 py-3 pr-12 space-y-0 shrink-0", children: [
1987
+ onUpload && /* @__PURE__ */ jsxs20(Fragment4, { children: [
2019
1988
  /* @__PURE__ */ jsx34(
2020
1989
  "input",
2021
1990
  {
2022
- type: "search",
2023
- value: search,
2024
- onChange: (e) => onSearch?.(e.target.value),
2025
- placeholder: "Search files\u2026",
2026
- className: "h-7 w-full rounded-md border border-input bg-muted/50 pl-8 pr-3 text-xs outline-none focus:border-primary focus:ring-1 focus:ring-primary"
1991
+ ref: fileInputRef,
1992
+ type: "file",
1993
+ className: "hidden",
1994
+ multiple: true,
1995
+ accept: accept === "images" ? "image/*" : void 0,
1996
+ onChange: handleUploadChange
1997
+ }
1998
+ ),
1999
+ /* @__PURE__ */ jsxs20(
2000
+ "button",
2001
+ {
2002
+ onClick: () => fileInputRef.current?.click(),
2003
+ className: "flex shrink-0 items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground transition-opacity hover:opacity-90",
2004
+ children: [
2005
+ /* @__PURE__ */ jsxs20("svg", { className: "h-3.5 w-3.5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2006
+ /* @__PURE__ */ jsx34("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
2007
+ /* @__PURE__ */ jsx34("polyline", { points: "17 8 12 3 7 8" }),
2008
+ /* @__PURE__ */ jsx34("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
2009
+ ] }),
2010
+ "Upload"
2011
+ ]
2027
2012
  }
2028
2013
  )
2029
2014
  ] }),
2030
- /* @__PURE__ */ jsx34("div", { className: "flex gap-1", children: TYPE_OPTIONS.filter((o) => accept === "images" ? o.value === "" || o.value === "image" : true).map((opt) => /* @__PURE__ */ jsx34(
2031
- "button",
2032
- {
2033
- onClick: () => onTypeChange?.(opt.value),
2034
- className: cn(
2035
- "rounded px-2 py-1 text-xs transition-colors",
2036
- typeFilter === opt.value ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
2037
- ),
2038
- children: opt.label
2039
- },
2040
- opt.value
2041
- )) })
2015
+ /* @__PURE__ */ jsx34(DialogTitle, { className: "text-sm font-semibold flex-1", children: title }),
2016
+ /* @__PURE__ */ jsxs20("span", { className: "text-xs text-muted-foreground shrink-0", children: [
2017
+ total,
2018
+ " files"
2019
+ ] })
2042
2020
  ] }),
2043
- activeUploads.length > 0 && /* @__PURE__ */ jsx34("div", { className: "border-b px-4 py-2 space-y-1.5", children: activeUploads.map((u, i) => /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
2044
- /* @__PURE__ */ jsx34("span", { className: "flex-1 truncate text-xs text-muted-foreground", children: u.name }),
2045
- /* @__PURE__ */ jsx34("div", { className: "h-1.5 w-24 overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx34(
2046
- "div",
2047
- {
2048
- className: "h-full rounded-full bg-primary transition-all",
2049
- style: { width: `${u.progress}%` }
2050
- }
2051
- ) }),
2052
- /* @__PURE__ */ jsxs20("span", { className: "text-[10px] text-muted-foreground", children: [
2053
- u.progress,
2054
- "%"
2021
+ /* @__PURE__ */ jsxs20("div", { className: "flex flex-1 overflow-hidden min-h-0", children: [
2022
+ folders.length > 0 && /* @__PURE__ */ jsxs20("aside", { className: "flex w-44 shrink-0 flex-col gap-0.5 overflow-y-auto border-r p-2", children: [
2023
+ /* @__PURE__ */ jsxs20(
2024
+ "button",
2025
+ {
2026
+ onClick: () => onFolderChange?.(""),
2027
+ className: cn(
2028
+ "flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors",
2029
+ !activeFolderId ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground hover:bg-accent"
2030
+ ),
2031
+ children: [
2032
+ /* @__PURE__ */ jsx34("svg", { className: "h-3.5 w-3.5 shrink-0", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx34("path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }) }),
2033
+ "All files"
2034
+ ]
2035
+ }
2036
+ ),
2037
+ folders.map((folder) => /* @__PURE__ */ jsxs20(
2038
+ "button",
2039
+ {
2040
+ onClick: () => onFolderChange?.(folder.id),
2041
+ className: cn(
2042
+ "flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors",
2043
+ activeFolderId === folder.id ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground hover:bg-accent"
2044
+ ),
2045
+ children: [
2046
+ /* @__PURE__ */ jsx34("span", { className: "text-base leading-none", children: folder.icon ?? "\u{1F4C1}" }),
2047
+ /* @__PURE__ */ jsx34("span", { className: "truncate", children: folder.name })
2048
+ ]
2049
+ },
2050
+ folder.id
2051
+ ))
2052
+ ] }),
2053
+ /* @__PURE__ */ jsxs20("div", { className: "flex flex-1 flex-col overflow-hidden min-w-0", children: [
2054
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 border-b px-4 py-2 shrink-0", children: [
2055
+ /* @__PURE__ */ jsx34("div", { className: "flex items-center gap-0.5 rounded-lg border border-input bg-muted/50 p-0.5", children: typeOptions.map((opt) => /* @__PURE__ */ jsx34(
2056
+ "button",
2057
+ {
2058
+ onClick: () => onTypeChange?.(opt.value),
2059
+ className: cn(
2060
+ "rounded-md px-2.5 py-1 text-xs font-medium transition-colors",
2061
+ typeFilter === opt.value ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
2062
+ ),
2063
+ children: opt.label
2064
+ },
2065
+ opt.value
2066
+ )) }),
2067
+ /* @__PURE__ */ jsxs20("div", { className: "relative flex-1 max-w-xs ml-auto", children: [
2068
+ /* @__PURE__ */ jsxs20("svg", { className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2069
+ /* @__PURE__ */ jsx34("circle", { cx: "11", cy: "11", r: "8" }),
2070
+ /* @__PURE__ */ jsx34("path", { d: "m21 21-4.35-4.35" })
2071
+ ] }),
2072
+ /* @__PURE__ */ jsx34(
2073
+ "input",
2074
+ {
2075
+ type: "search",
2076
+ value: search,
2077
+ onChange: (e) => onSearch?.(e.target.value),
2078
+ placeholder: "Search\u2026",
2079
+ className: "h-8 w-full rounded-lg border border-input bg-background pl-8 pr-3 text-xs outline-none focus:border-primary focus:ring-1 focus:ring-primary/30"
2080
+ }
2081
+ )
2082
+ ] })
2083
+ ] }),
2084
+ activeUploads.length > 0 && /* @__PURE__ */ jsx34("div", { className: "border-b px-4 py-2 space-y-1.5 shrink-0", children: activeUploads.map((u, i) => /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
2085
+ /* @__PURE__ */ jsx34("span", { className: "flex-1 truncate text-xs text-muted-foreground", children: u.name }),
2086
+ /* @__PURE__ */ jsx34("div", { className: "h-1.5 w-24 overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx34(
2087
+ "div",
2088
+ {
2089
+ className: "h-full rounded-full bg-primary transition-all duration-200",
2090
+ style: { width: `${u.progress}%` }
2091
+ }
2092
+ ) }),
2093
+ /* @__PURE__ */ jsxs20("span", { className: "text-[10px] text-muted-foreground w-6 text-right", children: [
2094
+ u.progress,
2095
+ "%"
2096
+ ] })
2097
+ ] }, i)) }),
2098
+ /* @__PURE__ */ jsxs20(
2099
+ "div",
2100
+ {
2101
+ className: "relative flex-1 overflow-y-auto p-4",
2102
+ onDragEnter: handleDragEnter,
2103
+ onDragLeave: handleDragLeave,
2104
+ onDragOver: handleDragOver,
2105
+ onDrop: handleDrop,
2106
+ children: [
2107
+ isDragging && onUpload && /* @__PURE__ */ jsxs20("div", { className: "pointer-events-none absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 rounded-lg border-2 border-dashed border-primary bg-primary/5 backdrop-blur-[1px]", children: [
2108
+ /* @__PURE__ */ jsxs20("svg", { className: "h-10 w-10 text-primary opacity-70", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
2109
+ /* @__PURE__ */ jsx34("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
2110
+ /* @__PURE__ */ jsx34("polyline", { points: "17 8 12 3 7 8" }),
2111
+ /* @__PURE__ */ jsx34("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
2112
+ ] }),
2113
+ /* @__PURE__ */ jsxs20("p", { className: "text-sm font-medium text-primary", children: [
2114
+ "Drop ",
2115
+ accept === "images" ? "images" : "files",
2116
+ " to upload"
2117
+ ] })
2118
+ ] }),
2119
+ /* @__PURE__ */ jsx34(
2120
+ MediaGrid,
2121
+ {
2122
+ files,
2123
+ selected: localSelected,
2124
+ onSelect: handleFileSelect,
2125
+ loading,
2126
+ columns: 5,
2127
+ onUploadClick: onUpload ? () => fileInputRef.current?.click() : void 0
2128
+ }
2129
+ ),
2130
+ hasMore && /* @__PURE__ */ jsx34("div", { className: "mt-4 flex justify-center", children: /* @__PURE__ */ jsx34(
2131
+ "button",
2132
+ {
2133
+ onClick: onLoadMore,
2134
+ className: "rounded-lg border px-4 py-2 text-xs text-muted-foreground transition-colors hover:bg-accent",
2135
+ children: "Load more"
2136
+ }
2137
+ ) })
2138
+ ]
2139
+ }
2140
+ )
2055
2141
  ] })
2056
- ] }, i)) }),
2057
- /* @__PURE__ */ jsxs20("div", { className: "flex-1 overflow-y-auto p-4", children: [
2058
- /* @__PURE__ */ jsx34(
2059
- MediaGrid,
2060
- {
2061
- files,
2062
- selected: localSelected,
2063
- onSelect: handleFileSelect,
2064
- loading,
2065
- columns: 5,
2066
- onUploadClick: onUpload ? () => fileInputRef.current?.click() : void 0
2067
- }
2068
- ),
2069
- hasMore && /* @__PURE__ */ jsx34("div", { className: "mt-4 flex justify-center", children: /* @__PURE__ */ jsx34(
2070
- "button",
2071
- {
2072
- onClick: onLoadMore,
2073
- className: "rounded-md border px-4 py-2 text-sm text-muted-foreground transition-colors hover:bg-accent",
2074
- children: "Load more"
2075
- }
2076
- ) })
2077
2142
  ] }),
2078
- multiple && localSelected.size > 0 && /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between border-t px-4 py-3", children: [
2143
+ localSelected.size > 0 && /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-4 border-t px-5 py-3 shrink-0 bg-muted/20", children: [
2079
2144
  /* @__PURE__ */ jsxs20("span", { className: "text-sm text-muted-foreground", children: [
2080
2145
  localSelected.size,
2146
+ " file",
2147
+ localSelected.size !== 1 ? "s" : "",
2081
2148
  " selected"
2082
2149
  ] }),
2083
- /* @__PURE__ */ jsxs20("div", { className: "flex gap-2", children: [
2150
+ firstSelected && firstSelected.mimeType.startsWith("image/") && /* @__PURE__ */ jsx34(
2151
+ "img",
2152
+ {
2153
+ src: firstSelected.url,
2154
+ alt: firstSelected.name,
2155
+ className: "h-9 w-9 rounded-lg border border-border object-cover shadow-sm"
2156
+ }
2157
+ ),
2158
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
2084
2159
  /* @__PURE__ */ jsx34(
2085
2160
  "button",
2086
2161
  {
2087
2162
  onClick: () => setLocalSelected(/* @__PURE__ */ new Set()),
2088
- className: "rounded-md px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-accent",
2089
- children: "Clear"
2163
+ className: "rounded-lg px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-accent",
2164
+ children: "Cancel"
2090
2165
  }
2091
2166
  ),
2092
2167
  /* @__PURE__ */ jsxs20(
2093
2168
  "button",
2094
2169
  {
2095
2170
  onClick: handleConfirm,
2096
- className: "rounded-md bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",
2171
+ className: "rounded-lg bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",
2097
2172
  children: [
2098
- "Insert ",
2173
+ "Use ",
2099
2174
  localSelected.size,
2100
2175
  " file",
2101
2176
  localSelected.size !== 1 ? "s" : ""
@@ -2104,9 +2179,9 @@ function MediaPickerDialog({
2104
2179
  )
2105
2180
  ] })
2106
2181
  ] })
2107
- ] })
2108
- ] })
2109
- ] }) });
2182
+ ]
2183
+ }
2184
+ ) });
2110
2185
  }
2111
2186
 
2112
2187
  // src/components/media/image-picker-field.tsx