@alexgorbatchev/shadcn 0.0.137 → 0.0.138
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.
|
@@ -496,7 +496,7 @@ import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
|
496
496
|
import { CheckIcon } from "lucide-react";
|
|
497
497
|
import { jsx as jsx6, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
498
498
|
"use client";
|
|
499
|
-
var GROUP_CLASS = "grid w-full gap-2
|
|
499
|
+
var GROUP_CLASS = "grid w-full gap-2";
|
|
500
500
|
function OptionCardGroup2({ analytics, density, className, ...props }) {
|
|
501
501
|
const trackedOnValueChange = useAnalyticsCallback("OptionCardGroup", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
502
502
|
return /* @__PURE__ */ jsx6(RadioGroupPrimitive, {
|
|
@@ -517,7 +517,7 @@ function OptionCheckboxGroup2({ analytics, density, className, ...props }) {
|
|
|
517
517
|
onValueChange: trackedOnValueChange
|
|
518
518
|
});
|
|
519
519
|
}
|
|
520
|
-
var CARD_CLASS = "group/option-card grid w-full cursor-pointer grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-2 rounded-md border border-input bg-card p-panel-sm text-start text-sm text-card-foreground transition-colors outline-none
|
|
520
|
+
var CARD_CLASS = "group/option-card grid w-full cursor-pointer grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-2 rounded-md border border-input bg-card p-panel-sm text-start text-sm text-card-foreground transition-colors outline-none hover:bg-muted/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid data-checked:border-primary data-checked:ring-1 data-checked:ring-primary forced-colors:data-checked:border-[color:Highlight] aria-invalid:not-data-checked:border-destructive data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-card data-readonly:cursor-default data-folding:pb-10";
|
|
521
521
|
function useFold(lines) {
|
|
522
522
|
const ref = useRef(null);
|
|
523
523
|
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
@@ -573,9 +573,7 @@ function OptionCardContent({
|
|
|
573
573
|
"data-slot": "option-card-marker",
|
|
574
574
|
"aria-hidden": "true",
|
|
575
575
|
className: "font-mono leading-5 text-muted-foreground group-data-checked/option-card:text-primary forced-colors:group-data-checked/option-card:text-[color:Highlight]",
|
|
576
|
-
children: marker
|
|
577
|
-
className: "before:content-[counter(option-card,lower-alpha)]"
|
|
578
|
-
})
|
|
576
|
+
children: marker
|
|
579
577
|
}),
|
|
580
578
|
/* @__PURE__ */ jsxs4("span", {
|
|
581
579
|
className: "flex min-w-0 flex-col gap-1",
|
|
@@ -677,9 +675,7 @@ function OptionCard2({
|
|
|
677
675
|
className: "hidden size-2 rounded-full bg-primary group-data-checked/option-card:block forced-colors:bg-[Highlight]"
|
|
678
676
|
})
|
|
679
677
|
}),
|
|
680
|
-
marker
|
|
681
|
-
className: "before:content-[counter(option-card,lower-alpha)]"
|
|
682
|
-
})
|
|
678
|
+
marker
|
|
683
679
|
]
|
|
684
680
|
});
|
|
685
681
|
const content = {
|
|
@@ -703,7 +699,7 @@ function OptionCard2({
|
|
|
703
699
|
"data-folding": fold.isFoldable || undefined,
|
|
704
700
|
"aria-labelledby": recommended ? `${ids.label} ${ids.tag}` : ids.label,
|
|
705
701
|
"aria-describedby": getDescribedBy(ids, content),
|
|
706
|
-
className: (state) => cn2(CARD_CLASS, "grid-cols-[
|
|
702
|
+
className: (state) => cn2(CARD_CLASS, "grid-cols-[max-content_minmax(0,1fr)]", typeof className === "function" ? className(state) : className),
|
|
707
703
|
...props,
|
|
708
704
|
children: /* @__PURE__ */ jsx6(OptionCardContent, {
|
|
709
705
|
ids,
|
|
@@ -35,7 +35,10 @@ interface IOptionCardContentProps {
|
|
|
35
35
|
reason?: ReactNode;
|
|
36
36
|
/** A picture of the option shown above its label, such as a screenshot of a design choice. */
|
|
37
37
|
image?: ReactNode;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* An optional short identifier beside the card's radio mark or checkbox. Cards carry no letter by default: the mark
|
|
40
|
+
* leads the card, and readers took letters for numbering written by the author.
|
|
41
|
+
*/
|
|
39
42
|
marker?: ReactNode;
|
|
40
43
|
}
|
|
41
44
|
type OptionCardProps = Omit<RadioPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps;
|
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.138",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|