@alexgorbatchev/shadcn 0.0.142 → 0.0.143

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.
@@ -5415,13 +5415,14 @@ function SelectionAction2({
5415
5415
  const belowBlock = block.bottom + GAP;
5416
5416
  const aboveBlock = block.top - GAP - height;
5417
5417
  const besideBlock = block.right + GAP;
5418
+ const sideGap = besideBlock - last.right;
5418
5419
  const nearAbove = first.top - GAP - height;
5419
5420
  const nearBelow = last.bottom + GAP;
5420
5421
  let x = last.left;
5421
5422
  let y = nearBelow;
5422
5423
  if (belowBlock >= nearBelow && belowBlock <= nearBelow + height && belowBlock + height <= maxY) {
5423
5424
  y = belowBlock;
5424
- } else if (block.width > 0 && besideBlock >= last.right + GAP && besideBlock + width <= maxX) {
5425
+ } else if (block.width > 0 && sideGap >= GAP && sideGap <= height && besideBlock + width <= maxX) {
5425
5426
  x = besideBlock;
5426
5427
  y = last.top + (last.height - height) / 2;
5427
5428
  } else if (aboveBlock >= minY && aboveBlock <= nearAbove && aboveBlock >= nearAbove - height) {
@@ -26,7 +26,7 @@ import {
26
26
  PaginationPrevious2,
27
27
  PaginationNext2,
28
28
  PaginationEllipsis2
29
- } from "../../chunk-xckskyjx.js";
29
+ } from "../../chunk-cmg54svw.js";
30
30
  import {
31
31
  MenuPopup,
32
32
  MenuItem2,
package/dist/index.js CHANGED
@@ -188,7 +188,7 @@ import {
188
188
  DashboardLayout2,
189
189
  BillingUsage2,
190
190
  SelectionAction2
191
- } from "./chunk-xckskyjx.js";
191
+ } from "./chunk-cmg54svw.js";
192
192
  import {
193
193
  Combobox2,
194
194
  ComboboxValue2,
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.142",
2054
+ version: "0.0.143",
2055
2055
  description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -35,3 +35,11 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
35
35
  render: () => <SelectionExample />
36
36
  }
37
37
  ```
38
+
39
+ ### StaysNearShortSelection
40
+
41
+ ```tsx
42
+ {
43
+ render: () => <SelectionExample width="w-[min(65vw,28rem)]"/>
44
+ }
45
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.142",
3
+ "version": "0.0.143",
4
4
  "description": "Sharp, monospace React components with compact, comfortable, and touch densities.",
5
5
  "license": "MIT",
6
6
  "repository": {