@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 &&
|
|
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) {
|
package/dist/index.js
CHANGED
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.
|
|
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
|
+
```
|