@alexgorbatchev/shadcn 0.0.90 → 0.0.92
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.
- package/dist/{chunk-x6ed6smh.js → chunk-tcbjvdem.js} +6 -4
- package/dist/components/Toolbar.d.ts +13 -2
- package/dist/components/editor/index.js +1 -1
- package/dist/components/json-render/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/prototype.js +1 -1
- package/llms/components/actions/Toolbar.md +14 -0
- package/package.json +1 -1
|
@@ -14,12 +14,13 @@ import {
|
|
|
14
14
|
// src/components/Toolbar.tsx
|
|
15
15
|
import { Toolbar as ToolbarPrimitive } from "@base-ui/react/toolbar";
|
|
16
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
|
-
function Toolbar2({ density, className, ...props }) {
|
|
17
|
+
function Toolbar2({ density, className, variant = "framed", ...props }) {
|
|
18
18
|
return /* @__PURE__ */ jsx(ToolbarPrimitive.Root, {
|
|
19
19
|
"data-density": density,
|
|
20
20
|
"data-slot": "toolbar",
|
|
21
21
|
"data-scroll": "none",
|
|
22
|
-
|
|
22
|
+
"data-variant": variant,
|
|
23
|
+
className: (state) => cn2("flex min-w-0 gap-control-gap rounded-sm text-card-foreground data-[orientation=vertical]:flex-col", variant === "framed" && "border border-border bg-card p-1", typeof className === "function" ? className(state) : className),
|
|
23
24
|
...props
|
|
24
25
|
});
|
|
25
26
|
}
|
|
@@ -68,11 +69,12 @@ function ToolbarInput2({
|
|
|
68
69
|
...analyticsInput
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
|
-
function ToolbarGroup2({ density, className, ...props }) {
|
|
72
|
+
function ToolbarGroup2({ density, className, wrap = false, ...props }) {
|
|
72
73
|
return /* @__PURE__ */ jsx(ToolbarPrimitive.Group, {
|
|
73
74
|
"data-density": density,
|
|
74
75
|
"data-slot": "toolbar-group",
|
|
75
|
-
|
|
76
|
+
"data-wrap": wrap ? "" : undefined,
|
|
77
|
+
className: (state) => cn2("flex items-center gap-control-gap data-[orientation=vertical]:flex-col", wrap && "flex-wrap justify-start data-[orientation=vertical]:flex-row", typeof className === "function" ? className(state) : className),
|
|
76
78
|
...props
|
|
77
79
|
});
|
|
78
80
|
}
|
|
@@ -2,10 +2,21 @@ import type { IAnalyticsProps } from "../analytics/types.js";
|
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import type { IDensityProps } from "../density/types.js";
|
|
4
4
|
import { Toolbar as ToolbarPrimitive } from "@base-ui/react/toolbar";
|
|
5
|
-
|
|
5
|
+
type ToolbarProps = ToolbarPrimitive.Root.Props & IDensityProps & {
|
|
6
|
+
/** `framed` (the default) draws a card around the controls; `plain` lays them out inside another surface. */
|
|
7
|
+
variant?: "framed" | "plain";
|
|
8
|
+
};
|
|
9
|
+
declare function Toolbar({ density, className, variant, ...props }: ToolbarProps): ReactElement;
|
|
6
10
|
declare function ToolbarButton({ analytics, density, className, ...props }: ToolbarPrimitive.Button.Props & IDensityProps & IAnalyticsProps): ReactElement;
|
|
7
11
|
declare function ToolbarLink({ analytics, density, className, ...props }: ToolbarPrimitive.Link.Props & IDensityProps & IAnalyticsProps): ReactElement;
|
|
8
12
|
declare function ToolbarInput({ analytics, density, className, ...props }: ToolbarPrimitive.Input.Props & IDensityProps & IAnalyticsProps): ReactElement;
|
|
9
|
-
|
|
13
|
+
type ToolbarGroupProps = ToolbarPrimitive.Group.Props & IDensityProps & {
|
|
14
|
+
/**
|
|
15
|
+
* Lets the group's controls wrap onto further lines instead of overflowing, as a set of chips does. They run in
|
|
16
|
+
* rows even inside a vertical toolbar, whose arrow keys still move through them in order.
|
|
17
|
+
*/
|
|
18
|
+
wrap?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare function ToolbarGroup({ density, className, wrap, ...props }: ToolbarGroupProps): ReactElement;
|
|
10
21
|
declare function ToolbarSeparator({ density, className, ...props }: ToolbarPrimitive.Separator.Props & IDensityProps): ReactElement;
|
|
11
22
|
export { Toolbar, ToolbarButton, ToolbarLink, ToolbarInput, ToolbarGroup, ToolbarSeparator };
|
|
@@ -151,7 +151,7 @@ import"../../chunk-m4geb1s5.js";
|
|
|
151
151
|
import"../../chunk-9ecf92s6.js";
|
|
152
152
|
import"../../chunk-fe33dx54.js";
|
|
153
153
|
import"../../chunk-tcefvfr8.js";
|
|
154
|
-
import"../../chunk-
|
|
154
|
+
import"../../chunk-tcbjvdem.js";
|
|
155
155
|
import {
|
|
156
156
|
Carousel2,
|
|
157
157
|
CarouselContent2,
|
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.92",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact and comfortable densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -87,3 +87,17 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
87
87
|
</Toolbar>)
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
|
+
|
|
91
|
+
### PlainWrapping
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
{
|
|
95
|
+
render: (args) => (<div className="w-48">
|
|
96
|
+
<Toolbar {...args} aria-label="Tags" orientation="vertical" variant="plain">
|
|
97
|
+
<ToolbarGroup aria-label="Vibe" wrap>
|
|
98
|
+
{["Dark", "Bright", "Hypnotic", "Warm", "Deep"].map((name) => (<ToolbarButton key={name}>{name}</ToolbarButton>))}
|
|
99
|
+
</ToolbarGroup>
|
|
100
|
+
</Toolbar>
|
|
101
|
+
</div>)
|
|
102
|
+
}
|
|
103
|
+
```
|