shadcn-ui-react 0.7.15 → 0.7.16
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 +16 -16
- package/dist/index.js +16 -16
- package/dist/style.css +7 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6786,12 +6786,12 @@ var FormCheckbox = (_a) => {
|
|
|
6786
6786
|
const checked = Boolean(field.value);
|
|
6787
6787
|
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
6788
6788
|
const hasError = Boolean(fieldError);
|
|
6789
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormItem, { className: cn("
|
|
6789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormItem, { className: cn("min-w-0", itemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
6790
6790
|
"div",
|
|
6791
6791
|
{
|
|
6792
6792
|
className: cn(
|
|
6793
|
-
"flex items-start gap-
|
|
6794
|
-
hasError && "border-destructive/20 bg-destructive/5",
|
|
6793
|
+
"flex min-w-0 items-start gap-2.5 transition-colors",
|
|
6794
|
+
hasError && "rounded-md border border-destructive/20 bg-destructive/5 px-2 py-1.5",
|
|
6795
6795
|
className
|
|
6796
6796
|
),
|
|
6797
6797
|
children: [
|
|
@@ -6807,7 +6807,7 @@ var FormCheckbox = (_a) => {
|
|
|
6807
6807
|
description ? descriptionId : void 0,
|
|
6808
6808
|
hasError ? messageId : void 0
|
|
6809
6809
|
].filter(Boolean).join(" ") || void 0,
|
|
6810
|
-
className: cn("mt-0.5", checkboxClassName),
|
|
6810
|
+
className: cn("mt-0.5 shrink-0", checkboxClassName),
|
|
6811
6811
|
onBlur: field.onBlur,
|
|
6812
6812
|
onCheckedChange: (value) => {
|
|
6813
6813
|
const nextValue = value === true;
|
|
@@ -6822,13 +6822,13 @@ var FormCheckbox = (_a) => {
|
|
|
6822
6822
|
{
|
|
6823
6823
|
htmlFor: checkboxId,
|
|
6824
6824
|
className: cn(
|
|
6825
|
-
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-
|
|
6825
|
+
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-5 text-foreground",
|
|
6826
6826
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
6827
6827
|
hasError && "text-destructive",
|
|
6828
6828
|
labelClassName
|
|
6829
6829
|
),
|
|
6830
6830
|
children: [
|
|
6831
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label }),
|
|
6831
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "min-w-0", children: label }),
|
|
6832
6832
|
requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6833
6833
|
import_lucide_react3.Asterisk,
|
|
6834
6834
|
{
|
|
@@ -6847,7 +6847,7 @@ var FormCheckbox = (_a) => {
|
|
|
6847
6847
|
{
|
|
6848
6848
|
id: descriptionId,
|
|
6849
6849
|
className: cn(
|
|
6850
|
-
"mt-
|
|
6850
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
6851
6851
|
descriptionClassName
|
|
6852
6852
|
),
|
|
6853
6853
|
children: description
|
|
@@ -6858,7 +6858,7 @@ var FormCheckbox = (_a) => {
|
|
|
6858
6858
|
{
|
|
6859
6859
|
id: messageId,
|
|
6860
6860
|
className: cn(
|
|
6861
|
-
"mt-
|
|
6861
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
6862
6862
|
messageClassName
|
|
6863
6863
|
),
|
|
6864
6864
|
children: fieldError
|
|
@@ -10574,12 +10574,12 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10574
10574
|
"className"
|
|
10575
10575
|
]);
|
|
10576
10576
|
const hasError = Boolean(errorMessage || invalid);
|
|
10577
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
10577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("w-full min-w-0", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
10578
10578
|
"div",
|
|
10579
10579
|
{
|
|
10580
10580
|
className: cn(
|
|
10581
|
-
"flex items-start gap-
|
|
10582
|
-
hasError && "border-destructive/20 bg-destructive/5",
|
|
10581
|
+
"flex min-w-0 items-start gap-2.5 transition-colors",
|
|
10582
|
+
hasError && "rounded-md border border-destructive/20 bg-destructive/5 px-2 py-1.5",
|
|
10583
10583
|
contentClassName
|
|
10584
10584
|
),
|
|
10585
10585
|
children: [
|
|
@@ -10589,7 +10589,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10589
10589
|
ref,
|
|
10590
10590
|
id: htmlFormItemId,
|
|
10591
10591
|
invalid: hasError,
|
|
10592
|
-
className: cn("mt-0.5", className)
|
|
10592
|
+
className: cn("mt-0.5 shrink-0", className)
|
|
10593
10593
|
}, checkboxProps)
|
|
10594
10594
|
),
|
|
10595
10595
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -10598,13 +10598,13 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10598
10598
|
{
|
|
10599
10599
|
htmlFor: htmlFormItemId,
|
|
10600
10600
|
className: cn(
|
|
10601
|
-
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-
|
|
10601
|
+
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-5 text-foreground",
|
|
10602
10602
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
10603
10603
|
hasError && "text-destructive",
|
|
10604
10604
|
labelClassName
|
|
10605
10605
|
),
|
|
10606
10606
|
children: [
|
|
10607
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: label }),
|
|
10607
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "min-w-0", children: label }),
|
|
10608
10608
|
requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10609
10609
|
import_lucide_react10.Asterisk,
|
|
10610
10610
|
{
|
|
@@ -10622,7 +10622,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10622
10622
|
"p",
|
|
10623
10623
|
{
|
|
10624
10624
|
className: cn(
|
|
10625
|
-
"mt-
|
|
10625
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
10626
10626
|
descriptionClassName
|
|
10627
10627
|
),
|
|
10628
10628
|
children: description
|
|
@@ -10632,7 +10632,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10632
10632
|
"p",
|
|
10633
10633
|
{
|
|
10634
10634
|
className: cn(
|
|
10635
|
-
"mt-
|
|
10635
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
10636
10636
|
errorClassName
|
|
10637
10637
|
),
|
|
10638
10638
|
children: errorMessage
|
package/dist/index.js
CHANGED
|
@@ -6504,12 +6504,12 @@ var FormCheckbox = (_a) => {
|
|
|
6504
6504
|
const checked = Boolean(field.value);
|
|
6505
6505
|
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
6506
6506
|
const hasError = Boolean(fieldError);
|
|
6507
|
-
return /* @__PURE__ */ jsx21(FormItem, { className: cn("
|
|
6507
|
+
return /* @__PURE__ */ jsx21(FormItem, { className: cn("min-w-0", itemClassName), children: /* @__PURE__ */ jsxs11(
|
|
6508
6508
|
"div",
|
|
6509
6509
|
{
|
|
6510
6510
|
className: cn(
|
|
6511
|
-
"flex items-start gap-
|
|
6512
|
-
hasError && "border-destructive/20 bg-destructive/5",
|
|
6511
|
+
"flex min-w-0 items-start gap-2.5 transition-colors",
|
|
6512
|
+
hasError && "rounded-md border border-destructive/20 bg-destructive/5 px-2 py-1.5",
|
|
6513
6513
|
className
|
|
6514
6514
|
),
|
|
6515
6515
|
children: [
|
|
@@ -6525,7 +6525,7 @@ var FormCheckbox = (_a) => {
|
|
|
6525
6525
|
description ? descriptionId : void 0,
|
|
6526
6526
|
hasError ? messageId : void 0
|
|
6527
6527
|
].filter(Boolean).join(" ") || void 0,
|
|
6528
|
-
className: cn("mt-0.5", checkboxClassName),
|
|
6528
|
+
className: cn("mt-0.5 shrink-0", checkboxClassName),
|
|
6529
6529
|
onBlur: field.onBlur,
|
|
6530
6530
|
onCheckedChange: (value) => {
|
|
6531
6531
|
const nextValue = value === true;
|
|
@@ -6540,13 +6540,13 @@ var FormCheckbox = (_a) => {
|
|
|
6540
6540
|
{
|
|
6541
6541
|
htmlFor: checkboxId,
|
|
6542
6542
|
className: cn(
|
|
6543
|
-
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-
|
|
6543
|
+
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-5 text-foreground",
|
|
6544
6544
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
6545
6545
|
hasError && "text-destructive",
|
|
6546
6546
|
labelClassName
|
|
6547
6547
|
),
|
|
6548
6548
|
children: [
|
|
6549
|
-
/* @__PURE__ */ jsx21("span", { children: label }),
|
|
6549
|
+
/* @__PURE__ */ jsx21("span", { className: "min-w-0", children: label }),
|
|
6550
6550
|
requiredLabel ? /* @__PURE__ */ jsx21(
|
|
6551
6551
|
Asterisk,
|
|
6552
6552
|
{
|
|
@@ -6565,7 +6565,7 @@ var FormCheckbox = (_a) => {
|
|
|
6565
6565
|
{
|
|
6566
6566
|
id: descriptionId,
|
|
6567
6567
|
className: cn(
|
|
6568
|
-
"mt-
|
|
6568
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
6569
6569
|
descriptionClassName
|
|
6570
6570
|
),
|
|
6571
6571
|
children: description
|
|
@@ -6576,7 +6576,7 @@ var FormCheckbox = (_a) => {
|
|
|
6576
6576
|
{
|
|
6577
6577
|
id: messageId,
|
|
6578
6578
|
className: cn(
|
|
6579
|
-
"mt-
|
|
6579
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
6580
6580
|
messageClassName
|
|
6581
6581
|
),
|
|
6582
6582
|
children: fieldError
|
|
@@ -10334,12 +10334,12 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10334
10334
|
"className"
|
|
10335
10335
|
]);
|
|
10336
10336
|
const hasError = Boolean(errorMessage || invalid);
|
|
10337
|
-
return /* @__PURE__ */ jsx55("div", { className: cn("w-full", containerClassName), children: /* @__PURE__ */ jsxs28(
|
|
10337
|
+
return /* @__PURE__ */ jsx55("div", { className: cn("w-full min-w-0", containerClassName), children: /* @__PURE__ */ jsxs28(
|
|
10338
10338
|
"div",
|
|
10339
10339
|
{
|
|
10340
10340
|
className: cn(
|
|
10341
|
-
"flex items-start gap-
|
|
10342
|
-
hasError && "border-destructive/20 bg-destructive/5",
|
|
10341
|
+
"flex min-w-0 items-start gap-2.5 transition-colors",
|
|
10342
|
+
hasError && "rounded-md border border-destructive/20 bg-destructive/5 px-2 py-1.5",
|
|
10343
10343
|
contentClassName
|
|
10344
10344
|
),
|
|
10345
10345
|
children: [
|
|
@@ -10349,7 +10349,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10349
10349
|
ref,
|
|
10350
10350
|
id: htmlFormItemId,
|
|
10351
10351
|
invalid: hasError,
|
|
10352
|
-
className: cn("mt-0.5", className)
|
|
10352
|
+
className: cn("mt-0.5 shrink-0", className)
|
|
10353
10353
|
}, checkboxProps)
|
|
10354
10354
|
),
|
|
10355
10355
|
/* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -10358,13 +10358,13 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10358
10358
|
{
|
|
10359
10359
|
htmlFor: htmlFormItemId,
|
|
10360
10360
|
className: cn(
|
|
10361
|
-
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-
|
|
10361
|
+
"inline-flex cursor-pointer items-start gap-1 text-sm font-medium leading-5 text-foreground",
|
|
10362
10362
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
10363
10363
|
hasError && "text-destructive",
|
|
10364
10364
|
labelClassName
|
|
10365
10365
|
),
|
|
10366
10366
|
children: [
|
|
10367
|
-
/* @__PURE__ */ jsx55("span", { children: label }),
|
|
10367
|
+
/* @__PURE__ */ jsx55("span", { className: "min-w-0", children: label }),
|
|
10368
10368
|
requiredLabel ? /* @__PURE__ */ jsx55(
|
|
10369
10369
|
Asterisk6,
|
|
10370
10370
|
{
|
|
@@ -10382,7 +10382,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10382
10382
|
"p",
|
|
10383
10383
|
{
|
|
10384
10384
|
className: cn(
|
|
10385
|
-
"mt-
|
|
10385
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
10386
10386
|
descriptionClassName
|
|
10387
10387
|
),
|
|
10388
10388
|
children: description
|
|
@@ -10392,7 +10392,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10392
10392
|
"p",
|
|
10393
10393
|
{
|
|
10394
10394
|
className: cn(
|
|
10395
|
-
"mt-
|
|
10395
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
10396
10396
|
errorClassName
|
|
10397
10397
|
),
|
|
10398
10398
|
children: errorMessage
|
package/dist/style.css
CHANGED
|
@@ -909,6 +909,9 @@
|
|
|
909
909
|
.gap-2 {
|
|
910
910
|
gap: calc(var(--spacing) * 2);
|
|
911
911
|
}
|
|
912
|
+
.gap-2\.5 {
|
|
913
|
+
gap: calc(var(--spacing) * 2.5);
|
|
914
|
+
}
|
|
912
915
|
.gap-3 {
|
|
913
916
|
gap: calc(var(--spacing) * 3);
|
|
914
917
|
}
|
|
@@ -1613,14 +1616,14 @@
|
|
|
1613
1616
|
.text-\[11px\] {
|
|
1614
1617
|
font-size: 11px;
|
|
1615
1618
|
}
|
|
1619
|
+
.leading-5 {
|
|
1620
|
+
--tw-leading: calc(var(--spacing) * 5);
|
|
1621
|
+
line-height: calc(var(--spacing) * 5);
|
|
1622
|
+
}
|
|
1616
1623
|
.leading-none {
|
|
1617
1624
|
--tw-leading: 1;
|
|
1618
1625
|
line-height: 1;
|
|
1619
1626
|
}
|
|
1620
|
-
.leading-relaxed {
|
|
1621
|
-
--tw-leading: var(--leading-relaxed);
|
|
1622
|
-
line-height: var(--leading-relaxed);
|
|
1623
|
-
}
|
|
1624
1627
|
.font-bold {
|
|
1625
1628
|
--tw-font-weight: var(--font-weight-bold);
|
|
1626
1629
|
font-weight: var(--font-weight-bold);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-ui-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
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.",
|