shadcn-ui-react 0.7.5 → 0.7.6
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/index.cjs +13 -23
- package/dist/index.js +16 -26
- package/dist/style.css +4 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -440,11 +440,11 @@ var React3 = __toESM(require("react"), 1);
|
|
|
440
440
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
441
441
|
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
442
442
|
[
|
|
443
|
-
"inline-flex items-center justify-center
|
|
443
|
+
"inline-flex min-w-max shrink-0 items-center justify-center whitespace-nowrap",
|
|
444
444
|
"rounded-md text-sm font-medium",
|
|
445
445
|
"transition-all duration-200 active:scale-95",
|
|
446
446
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2",
|
|
447
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
447
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
448
448
|
"cursor-pointer select-none",
|
|
449
449
|
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
450
450
|
].join(" "),
|
|
@@ -453,7 +453,7 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
453
453
|
variant: {
|
|
454
454
|
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
455
455
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
456
|
-
outline: "border border-
|
|
456
|
+
outline: "border border-input bg-background text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
457
457
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
458
458
|
ghost: "bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
459
459
|
link: "h-auto p-0 text-primary underline-offset-4 shadow-none hover:underline",
|
|
@@ -539,39 +539,29 @@ var Button = React3.forwardRef(
|
|
|
539
539
|
className
|
|
540
540
|
);
|
|
541
541
|
const isDisabled = loading || disabled;
|
|
542
|
-
const
|
|
542
|
+
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
543
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "inline-flex min-w-max flex-row items-center justify-center gap-2 whitespace-nowrap leading-none", children: [
|
|
543
544
|
loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
544
545
|
import_lucide_react.Loader2,
|
|
545
546
|
{
|
|
546
|
-
className: cn("size-4 animate-spin", loaderClassName),
|
|
547
|
+
className: cn("size-4 shrink-0 animate-spin", loaderClassName),
|
|
547
548
|
"aria-hidden": "true"
|
|
548
549
|
}
|
|
549
550
|
) : null,
|
|
550
|
-
|
|
551
|
+
children
|
|
551
552
|
] });
|
|
552
|
-
if (asChild) {
|
|
553
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
554
|
-
import_react_slot.Slot,
|
|
555
|
-
__spreadProps(__spreadValues({
|
|
556
|
-
ref,
|
|
557
|
-
className: classes,
|
|
558
|
-
"aria-disabled": isDisabled,
|
|
559
|
-
"data-loading": loading ? "true" : void 0
|
|
560
|
-
}, props), {
|
|
561
|
-
children
|
|
562
|
-
})
|
|
563
|
-
);
|
|
564
|
-
}
|
|
565
553
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
566
|
-
|
|
554
|
+
Comp,
|
|
567
555
|
__spreadProps(__spreadValues({
|
|
568
556
|
ref,
|
|
569
|
-
type,
|
|
557
|
+
type: asChild ? void 0 : type,
|
|
570
558
|
className: classes,
|
|
571
|
-
disabled: isDisabled,
|
|
559
|
+
disabled: asChild ? void 0 : isDisabled,
|
|
560
|
+
"aria-disabled": asChild ? isDisabled : void 0,
|
|
561
|
+
"aria-busy": loading ? true : void 0,
|
|
572
562
|
"data-loading": loading ? "true" : void 0
|
|
573
563
|
}, props), {
|
|
574
|
-
children: content
|
|
564
|
+
children: asChild ? children : content
|
|
575
565
|
})
|
|
576
566
|
);
|
|
577
567
|
}
|
package/dist/index.js
CHANGED
|
@@ -153,14 +153,14 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
153
153
|
import { cva as cva2 } from "class-variance-authority";
|
|
154
154
|
import { Loader2 } from "lucide-react";
|
|
155
155
|
import * as React3 from "react";
|
|
156
|
-
import {
|
|
156
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
157
157
|
var buttonVariants = cva2(
|
|
158
158
|
[
|
|
159
|
-
"inline-flex items-center justify-center
|
|
159
|
+
"inline-flex min-w-max shrink-0 items-center justify-center whitespace-nowrap",
|
|
160
160
|
"rounded-md text-sm font-medium",
|
|
161
161
|
"transition-all duration-200 active:scale-95",
|
|
162
162
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2",
|
|
163
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
163
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
164
164
|
"cursor-pointer select-none",
|
|
165
165
|
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
|
|
166
166
|
].join(" "),
|
|
@@ -169,7 +169,7 @@ var buttonVariants = cva2(
|
|
|
169
169
|
variant: {
|
|
170
170
|
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
171
171
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
172
|
-
outline: "border border-
|
|
172
|
+
outline: "border border-input bg-background text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
173
173
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
174
174
|
ghost: "bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
175
175
|
link: "h-auto p-0 text-primary underline-offset-4 shadow-none hover:underline",
|
|
@@ -255,39 +255,29 @@ var Button = React3.forwardRef(
|
|
|
255
255
|
className
|
|
256
256
|
);
|
|
257
257
|
const isDisabled = loading || disabled;
|
|
258
|
-
const
|
|
258
|
+
const Comp = asChild ? Slot : "button";
|
|
259
|
+
const content = /* @__PURE__ */ jsxs2("span", { className: "inline-flex min-w-max flex-row items-center justify-center gap-2 whitespace-nowrap leading-none", children: [
|
|
259
260
|
loading ? /* @__PURE__ */ jsx3(
|
|
260
261
|
Loader2,
|
|
261
262
|
{
|
|
262
|
-
className: cn("size-4 animate-spin", loaderClassName),
|
|
263
|
+
className: cn("size-4 shrink-0 animate-spin", loaderClassName),
|
|
263
264
|
"aria-hidden": "true"
|
|
264
265
|
}
|
|
265
266
|
) : null,
|
|
266
|
-
|
|
267
|
+
children
|
|
267
268
|
] });
|
|
268
|
-
if (asChild) {
|
|
269
|
-
return /* @__PURE__ */ jsx3(
|
|
270
|
-
Slot,
|
|
271
|
-
__spreadProps(__spreadValues({
|
|
272
|
-
ref,
|
|
273
|
-
className: classes,
|
|
274
|
-
"aria-disabled": isDisabled,
|
|
275
|
-
"data-loading": loading ? "true" : void 0
|
|
276
|
-
}, props), {
|
|
277
|
-
children
|
|
278
|
-
})
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
269
|
return /* @__PURE__ */ jsx3(
|
|
282
|
-
|
|
270
|
+
Comp,
|
|
283
271
|
__spreadProps(__spreadValues({
|
|
284
272
|
ref,
|
|
285
|
-
type,
|
|
273
|
+
type: asChild ? void 0 : type,
|
|
286
274
|
className: classes,
|
|
287
|
-
disabled: isDisabled,
|
|
275
|
+
disabled: asChild ? void 0 : isDisabled,
|
|
276
|
+
"aria-disabled": asChild ? isDisabled : void 0,
|
|
277
|
+
"aria-busy": loading ? true : void 0,
|
|
288
278
|
"data-loading": loading ? "true" : void 0
|
|
289
279
|
}, props), {
|
|
290
|
-
children: content
|
|
280
|
+
children: asChild ? children : content
|
|
291
281
|
})
|
|
292
282
|
);
|
|
293
283
|
}
|
|
@@ -9267,7 +9257,7 @@ var AlertModal = ({
|
|
|
9267
9257
|
|
|
9268
9258
|
// src/shared/breadcrumbs.tsx
|
|
9269
9259
|
import { Slash } from "lucide-react";
|
|
9270
|
-
import { Fragment
|
|
9260
|
+
import { Fragment } from "react";
|
|
9271
9261
|
import { jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9272
9262
|
function Breadcrumbs({
|
|
9273
9263
|
items,
|
|
@@ -9278,7 +9268,7 @@ function Breadcrumbs({
|
|
|
9278
9268
|
return /* @__PURE__ */ jsx56(Breadcrumb, { className, children: /* @__PURE__ */ jsx56(BreadcrumbList, { className: classNameList, children: items.map((item, index) => {
|
|
9279
9269
|
var _a;
|
|
9280
9270
|
const isLast = index === items.length - 1;
|
|
9281
|
-
return /* @__PURE__ */ jsxs29(
|
|
9271
|
+
return /* @__PURE__ */ jsxs29(Fragment, { children: [
|
|
9282
9272
|
!isLast ? /* @__PURE__ */ jsx56(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx56(BreadcrumbLink, { href: (_a = item.link) != null ? _a : "#", children: item.title }) }) : /* @__PURE__ */ jsx56(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ jsx56(BreadcrumbPage, { children: item.title }) }),
|
|
9283
9273
|
!isLast ? /* @__PURE__ */ jsx56(BreadcrumbSeparator, { children: separator }) : null
|
|
9284
9274
|
] }, `${item.title}-${index}`);
|
package/dist/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-ui-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Bleker <bleker@gliyen.com>",
|
|
6
6
|
"description": "A collection of components for building beautiful and accessible user interfaces with React and Tailwind CSS.",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@babel/core": "^7.29.0",
|
|
55
|
-
"@babel/preset-env": "^7.29.
|
|
55
|
+
"@babel/preset-env": "^7.29.5",
|
|
56
56
|
"@babel/preset-react": "^7.28.5",
|
|
57
57
|
"@babel/preset-typescript": "^7.28.5",
|
|
58
58
|
"@eslint/config-array": "^0.23.5",
|