@alexgorbatchev/shadcn 0.0.120 → 0.0.122

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.
@@ -45,6 +45,11 @@ interface ISplitViewProps {
45
45
  * image, stays in view above it.
46
46
  */
47
47
  drawerHeight?: "tall" | "half";
48
+ /**
49
+ * With the "drawer" narrow layout, a CSS length from the viewport's top where the drawer's top edge sits instead of
50
+ * `drawerHeight`, such as "3rem" to start it right under a phone's top bar, so no cut slice of the page shows above it.
51
+ */
52
+ drawerTopInset?: string;
48
53
  /** Called when a "sheet" or "drawer" narrow layout asks to open or close the sidebar, such as on Escape or a swipe. */
49
54
  onSidebarOpenChange?: (open: boolean) => void;
50
55
  /**
@@ -58,5 +63,5 @@ interface ISplitViewProps {
58
63
  * open sidebar take over the content's place. The sidebar and content render into slots that move between the
59
64
  * layouts, so their state survives resizing across the breakpoint and opening or closing the sidebar.
60
65
  */
61
- export declare function SplitView({ sidebar, children, storageKey, sidebarPosition, sidebarOpen, storage, sidebarLabel, contentLabel, resizeLabel, defaultSidebarSize, sidebarPadding, contentPadding, layout: layoutMode, minSidebarSize, maxSidebarSize, wideQuery, narrowLayout, sidebarExpanded, drawerHeight, onSidebarOpenChange, sidebarFinalFocus, }: ISplitViewProps): ReactElement;
66
+ export declare function SplitView({ sidebar, children, storageKey, sidebarPosition, sidebarOpen, storage, sidebarLabel, contentLabel, resizeLabel, defaultSidebarSize, sidebarPadding, contentPadding, layout: layoutMode, minSidebarSize, maxSidebarSize, wideQuery, narrowLayout, sidebarExpanded, drawerHeight, drawerTopInset, onSidebarOpenChange, sidebarFinalFocus, }: ISplitViewProps): ReactElement;
62
67
  export {};
@@ -116,6 +116,7 @@ function SplitView({
116
116
  narrowLayout = "stack",
117
117
  sidebarExpanded = false,
118
118
  drawerHeight = "tall",
119
+ drawerTopInset,
119
120
  onSidebarOpenChange,
120
121
  sidebarFinalFocus
121
122
  }) {
@@ -266,7 +267,8 @@ function SplitView({
266
267
  children: /* @__PURE__ */ jsxs(DrawerContent2, {
267
268
  "aria-label": sidebarLabel,
268
269
  finalFocus: sidebarFinalFocus,
269
- className: cn2(narrowLayout === "drawer" && "data-[swipe-axis=y]:[--drawer-content-max-height:100dvh] data-[swipe-axis=y]:rounded-t-none", narrowLayout === "drawer" && (sidebarExpanded ? "h-dvh" : drawerHeight === "half" ? "h-[50dvh]" : "h-[85dvh]")),
270
+ className: cn2(narrowLayout === "drawer" && "data-[swipe-axis=y]:[--drawer-content-max-height:100dvh] data-[swipe-axis=y]:rounded-t-none", narrowLayout === "drawer" && (sidebarExpanded ? "h-dvh" : drawerTopInset ? "h-[calc(100dvh-var(--split-view-drawer-top))]" : drawerHeight === "half" ? "h-[50dvh]" : "h-[85dvh]")),
271
+ style: drawerTopInset ? { ["--split-view-drawer-top"]: drawerTopInset } : undefined,
270
272
  children: [
271
273
  narrowLayout === "sheet" && /* @__PURE__ */ jsxs("div", {
272
274
  className: "flex shrink-0 items-center justify-between gap-2 p-panel pb-0",
@@ -21,10 +21,10 @@ type TreeItemProps<T> = useRender.ComponentProps<"div", TreeItemState> & IDensit
21
21
  */
22
22
  hasIcon?: boolean;
23
23
  /**
24
- * Calls attention to the row with the `warning` tone: a light tint and a warning-coloured start icon, such as a
25
- * lightning bolt for something live. A selected row keeps the selection background and adds a warning ring instead.
26
- * The tint stays light enough for coloured markers and muted text on the row to keep 4.5:1. Pair it with words in
27
- * `descriptionLabel`, so the meaning never rests on colour.
24
+ * Calls attention to the row with the `warning` tone: a 2 px warning bar on its leading edge and a warning-coloured
25
+ * start icon, such as a lightning bolt for something live. The row takes no fill, so fills keep meaning selection, and
26
+ * a selected row keeps the selection background with the bar. Pair it with words in `descriptionLabel`, so the meaning
27
+ * never rests on colour.
28
28
  */
29
29
  tone?: "default" | "warning";
30
30
  endEnhancer?: ReactNode;
@@ -257,7 +257,7 @@ function TreeItem({
257
257
  onDragStart: undefined
258
258
  } : {},
259
259
  style: { paddingInlineStart: `${item.getItemMeta().level * (item.getTree().getConfig().indent ?? 20) + 8}px` },
260
- className: cn2("relative flex min-h-control min-w-0 cursor-default items-center gap-2 rounded-sm py-1 pr-2 text-sm outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring", (isSelected || isDropTarget || isInsideTarget) && "bg-accent text-accent-foreground", tone === "warning" && (isSelected || isDropTarget || isInsideTarget ? "ring-1 ring-warning ring-inset" : "bg-warning/8 hover:bg-warning/10"), isDimmed && "group/tree-item"),
260
+ className: cn2("relative flex min-h-control min-w-0 cursor-default items-center gap-2 rounded-sm py-1 pr-2 text-sm outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring", (isSelected || isDropTarget || isInsideTarget) && "bg-accent text-accent-foreground", tone === "warning" && "before:pointer-events-none before:absolute before:inset-y-1 before:start-0 before:w-0.5 before:rounded-full before:bg-warning", isDimmed && "group/tree-item"),
261
261
  children: /* @__PURE__ */ jsxs(Fragment, {
262
262
  children: [
263
263
  item.isFolder() && expandOn === "disclosure" ? /* @__PURE__ */ jsx(Button2, {
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.120",
2054
+ version: "0.0.122",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
package/dist/theme.css CHANGED
@@ -131,7 +131,7 @@
131
131
  --border: #353b44;
132
132
  --input: #6f7783;
133
133
  --ring: #ff5cd6;
134
- --frame-edge: rgb(255 255 255 / 0.24);
134
+ --frame-edge: rgb(255 255 255 / 0.34);
135
135
  --media-edge: var(--input);
136
136
  --frame-halo: rgb(0 0 0 / 0.92);
137
137
  --backdrop: rgb(4 5 7 / 0.7);
@@ -171,7 +171,7 @@
171
171
  --border: #353b44;
172
172
  --input: #6f7783;
173
173
  --ring: #ff5cd6;
174
- --frame-edge: rgb(255 255 255 / 0.24);
174
+ --frame-edge: rgb(255 255 255 / 0.34);
175
175
  --media-edge: var(--input);
176
176
  --frame-halo: rgb(0 0 0 / 0.92);
177
177
  --backdrop: rgb(4 5 7 / 0.7);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.120",
3
+ "version": "0.0.122",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {