@alexgorbatchev/shadcn 0.0.141 → 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.
|
@@ -615,7 +615,7 @@ function OptionCardContent({
|
|
|
615
615
|
}),
|
|
616
616
|
reason !== undefined && /* @__PURE__ */ jsxs4("span", {
|
|
617
617
|
"data-slot": "option-card-reason",
|
|
618
|
-
className: "flow-root
|
|
618
|
+
className: "flow-root",
|
|
619
619
|
children: [
|
|
620
620
|
/* @__PURE__ */ jsx6("span", {
|
|
621
621
|
className: "float-start me-1 font-semibold",
|
|
@@ -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: {
|
package/dist/typeset.css
CHANGED
|
@@ -33,11 +33,13 @@
|
|
|
33
33
|
|
|
34
34
|
/*
|
|
35
35
|
* Compact prose inside a dense control, such as an option card's description: the surrounding text size at every
|
|
36
|
-
* width (no larger phone step)
|
|
36
|
+
* width (no larger phone step), tighter spacing between blocks, and the control's own text colour, such as a muted
|
|
37
|
+
* description, so it reads as part of the control.
|
|
37
38
|
*/
|
|
38
39
|
.typeset.typeset-compact:not(:where(.not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] *)) {
|
|
39
40
|
--typeset-flow: 0.5em;
|
|
40
41
|
font-size: var(--typeset-size);
|
|
42
|
+
color: inherit;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.typeset *:not(:where(.not-typeset, [data-not-typeset], .not-typeset *, [data-not-typeset] *)) {
|
|
@@ -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
|
+
```
|