@alexgorbatchev/shadcn 0.0.114 → 0.0.116

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.
@@ -10,6 +10,6 @@ interface ISonnerLiveProps {
10
10
  live?: boolean;
11
11
  }
12
12
  type SonnerProps = Omit<ToasterProps, "containerLive"> & ISonnerLiveProps & IDensityProps & IAnalyticsProps;
13
- declare function Sonner({ analytics, density, className, toastOptions, icons, theme, dir, expand, live, ...props }: SonnerProps): ReactElement;
13
+ declare function Sonner({ analytics, density, className, toastOptions, icons, theme, dir, expand, live, style, ...props }: SonnerProps): ReactElement;
14
14
  export { Sonner, Sonner as SonnerToaster, Sonner as Toaster };
15
15
  export { toast } from "sonner";
@@ -1210,6 +1210,7 @@ function Sonner({
1210
1210
  dir,
1211
1211
  expand = true,
1212
1212
  live = true,
1213
+ style,
1213
1214
  ...props
1214
1215
  }) {
1215
1216
  const activate = useAnalyticsCallback("Sonner", analytics, { name: "ui.activate" }, undefined);
@@ -1229,7 +1230,8 @@ function Sonner({
1229
1230
  dir: dir ?? inheritedDirection,
1230
1231
  expand,
1231
1232
  containerLive: live,
1232
- className: cn2("[&[data-sonner-toaster]]:font-mono", "[@media(max-width:600px)]:[&[data-sonner-toaster]]:w-auto!", "[@media(max-width:600px)]:[&[data-sonner-toaster]]:left-[var(--mobile-offset-left)]!", "[@media(max-width:600px)]:[&[data-sonner-toaster]]:right-[var(--mobile-offset-right)]!", "[@media(max-width:600px)]:[&[data-sonner-toaster]_[data-sonner-toast]]:w-full!", className),
1233
+ style: { fontFamily: "inherit", ...style },
1234
+ className: cn2("[@media(max-width:600px)]:[&[data-sonner-toaster]]:w-auto!", "[@media(max-width:600px)]:[&[data-sonner-toaster]]:left-[var(--mobile-offset-left)]!", "[@media(max-width:600px)]:[&[data-sonner-toaster]]:right-[var(--mobile-offset-right)]!", "[@media(max-width:600px)]:[&[data-sonner-toaster]_[data-sonner-toast]]:w-full!", className),
1233
1235
  icons: {
1234
1236
  success: /* @__PURE__ */ jsx("span", {
1235
1237
  children: /* @__PURE__ */ jsx(CircleCheckIcon, {
@@ -15,6 +15,11 @@ type TreeItemState = {
15
15
  type TreeItemProps<T> = useRender.ComponentProps<"div", TreeItemState> & IDensityProps & IAnalyticsProps & {
16
16
  item: ItemInstance<T>;
17
17
  startEnhancer?: ReactNode;
18
+ /**
19
+ * Whether the row shows its kind icon (folder or file) before the label. `false` drops it and its gap, so the label
20
+ * starts where the icon was; a tree whose disclosure already tells folders from leaves needs no icon.
21
+ */
22
+ hasIcon?: boolean;
18
23
  endEnhancer?: ReactNode;
19
24
  expandOn?: "click" | "doubleClick" | "disclosure";
20
25
  isEditing?: boolean;
@@ -94,5 +99,5 @@ export declare function TreeItemDot({ count, className }: ITreeItemDotProps): Re
94
99
  * Registered tree row; compose menus with render, put counts in `description` and pointer shortcuts in `actions`.
95
100
  * `endEnhancer` holds controls that must stay keyboard reachable on their own.
96
101
  */
97
- export declare function TreeItem<T>({ analytics, item, children, startEnhancer, endEnhancer, description, descriptionLabel, actions, expandOn, isEditing, isDropTarget, isDimmed, isUnread, leading, marker, linkProps, dropHint, density, render, ref, ...props }: TreeItemProps<T>): ReactElement;
102
+ export declare function TreeItem<T>({ analytics, item, children, startEnhancer, endEnhancer, description, descriptionLabel, actions, expandOn, isEditing, isDropTarget, isDimmed, isUnread, hasIcon, leading, marker, linkProps, dropHint, density, render, ref, ...props }: TreeItemProps<T>): ReactElement;
98
103
  export type { TreeItemProps };
@@ -128,6 +128,7 @@ function TreeItem({
128
128
  isDropTarget = false,
129
129
  isDimmed = false,
130
130
  isUnread = false,
131
+ hasIcon = true,
131
132
  leading,
132
133
  marker,
133
134
  linkProps,
@@ -183,7 +184,7 @@ function TreeItem({
183
184
  const faded = isDimmed && "opacity-70 group-hover/tree-item:opacity-100 group-focus-within/tree-item:opacity-100";
184
185
  const label = /* @__PURE__ */ jsxs(Fragment, {
185
186
  children: [
186
- /* @__PURE__ */ jsx("span", {
187
+ (hasIcon || startEnhancer) && /* @__PURE__ */ jsx("span", {
187
188
  "aria-hidden": "true",
188
189
  className: "flex shrink-0 [&>svg]:size-4",
189
190
  children: startEnhancer ?? (item.isFolder() ? isExpanded ? /* @__PURE__ */ jsx(FolderOpenIcon, {}) : /* @__PURE__ */ jsx(FolderIcon, {}) : /* @__PURE__ */ jsx(FileIcon, {}))
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.114",
2054
+ version: "0.0.116",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {