shadcn-ui-react 0.7.14 → 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 +102 -60
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +102 -60
- package/dist/style.css +15 -12
- package/package.json +21 -21
package/dist/index.cjs
CHANGED
|
@@ -3495,10 +3495,10 @@ function CaptionLabel(props) {
|
|
|
3495
3495
|
// node_modules/react-day-picker/dist/esm/components/Chevron.js
|
|
3496
3496
|
var import_react2 = __toESM(require("react"), 1);
|
|
3497
3497
|
function Chevron(props) {
|
|
3498
|
-
const { size = 24, orientation = "left", className } = props;
|
|
3498
|
+
const { size = 24, orientation = "left", className, style } = props;
|
|
3499
3499
|
return import_react2.default.createElement(
|
|
3500
3500
|
"svg",
|
|
3501
|
-
{ className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
3501
|
+
{ className, style, width: size, height: size, viewBox: "0 0 24 24" },
|
|
3502
3502
|
orientation === "up" && import_react2.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
3503
3503
|
orientation === "down" && import_react2.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
3504
3504
|
orientation === "left" && import_react2.default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
@@ -3598,18 +3598,18 @@ function useDayPicker() {
|
|
|
3598
3598
|
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
3599
3599
|
function Dropdown(props) {
|
|
3600
3600
|
const _a = props, { options, className } = _a, selectProps = __objRest(_a, ["options", "className"]);
|
|
3601
|
-
const { classNames, components } = useDayPicker();
|
|
3601
|
+
const { classNames, components, styles } = useDayPicker();
|
|
3602
3602
|
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
3603
3603
|
const selectedOption = options == null ? void 0 : options.find(({ value }) => value === selectProps.value);
|
|
3604
3604
|
return import_react6.default.createElement(
|
|
3605
3605
|
"span",
|
|
3606
|
-
{ "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot] },
|
|
3606
|
+
{ "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot], style: styles == null ? void 0 : styles[UI.DropdownRoot] },
|
|
3607
3607
|
import_react6.default.createElement(components.Select, __spreadValues({ className: cssClassSelect }, selectProps), options == null ? void 0 : options.map(({ value, label, disabled }) => import_react6.default.createElement(components.Option, { key: value, value, disabled }, label))),
|
|
3608
3608
|
import_react6.default.createElement(
|
|
3609
3609
|
"span",
|
|
3610
|
-
{ className: classNames[UI.CaptionLabel], "aria-hidden": true },
|
|
3610
|
+
{ className: classNames[UI.CaptionLabel], style: styles == null ? void 0 : styles[UI.CaptionLabel], "aria-hidden": true },
|
|
3611
3611
|
selectedOption == null ? void 0 : selectedOption.label,
|
|
3612
|
-
import_react6.default.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] })
|
|
3612
|
+
import_react6.default.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron] })
|
|
3613
3613
|
)
|
|
3614
3614
|
);
|
|
3615
3615
|
}
|
|
@@ -3663,7 +3663,7 @@ function MonthsDropdown(props) {
|
|
|
3663
3663
|
var import_react14 = __toESM(require("react"), 1);
|
|
3664
3664
|
function Nav(props) {
|
|
3665
3665
|
const _a = props, { onPreviousClick, onNextClick, previousMonth, nextMonth } = _a, navProps = __objRest(_a, ["onPreviousClick", "onNextClick", "previousMonth", "nextMonth"]);
|
|
3666
|
-
const { components, classNames, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
|
|
3666
|
+
const { components, classNames, styles, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
|
|
3667
3667
|
const handleNextClick = (0, import_react14.useCallback)((e) => {
|
|
3668
3668
|
if (nextMonth) {
|
|
3669
3669
|
onNextClick == null ? void 0 : onNextClick(e);
|
|
@@ -3679,13 +3679,13 @@ function Nav(props) {
|
|
|
3679
3679
|
__spreadValues({}, navProps),
|
|
3680
3680
|
import_react14.default.createElement(
|
|
3681
3681
|
components.PreviousMonthButton,
|
|
3682
|
-
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
|
|
3683
|
-
import_react14.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: "left" })
|
|
3682
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], style: styles == null ? void 0 : styles[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
|
|
3683
|
+
import_react14.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron], orientation: "left" })
|
|
3684
3684
|
),
|
|
3685
3685
|
import_react14.default.createElement(
|
|
3686
3686
|
components.NextMonthButton,
|
|
3687
|
-
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
|
|
3688
|
-
import_react14.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron] })
|
|
3687
|
+
{ type: "button", className: classNames[UI.NextMonthButton], style: styles == null ? void 0 : styles[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
|
|
3688
|
+
import_react14.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron] })
|
|
3689
3689
|
)
|
|
3690
3690
|
);
|
|
3691
3691
|
}
|
|
@@ -5372,6 +5372,14 @@ function DayPicker(initialProps) {
|
|
|
5372
5372
|
style: __spreadValues(__spreadValues({}, styles == null ? void 0 : styles[UI.Root]), props.style)
|
|
5373
5373
|
}), [classNames, props.className, props.style, styles]);
|
|
5374
5374
|
const dataAttributes = getDataAttributes(props);
|
|
5375
|
+
const getDropdownStyle = (dropdown) => {
|
|
5376
|
+
const dropdownStyle = styles == null ? void 0 : styles[UI.Dropdown];
|
|
5377
|
+
const specificDropdownStyle = styles == null ? void 0 : styles[dropdown];
|
|
5378
|
+
if (!dropdownStyle && !specificDropdownStyle) {
|
|
5379
|
+
return void 0;
|
|
5380
|
+
}
|
|
5381
|
+
return __spreadValues(__spreadValues({}, dropdownStyle), specificDropdownStyle);
|
|
5382
|
+
};
|
|
5375
5383
|
const rootElRef = (0, import_react31.useRef)(null);
|
|
5376
5384
|
useAnimation(rootElRef, Boolean(props.animate), {
|
|
5377
5385
|
classNames,
|
|
@@ -5420,15 +5428,15 @@ function DayPicker(initialProps) {
|
|
|
5420
5428
|
},
|
|
5421
5429
|
navLayout === "around" && !props.hideNavigation && displayIndex === 0 && import_react31.default.createElement(
|
|
5422
5430
|
components.PreviousMonthButton,
|
|
5423
|
-
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5424
|
-
import_react31.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
5431
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], style: styles == null ? void 0 : styles[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5432
|
+
import_react31.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
5425
5433
|
),
|
|
5426
5434
|
import_react31.default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles == null ? void 0 : styles[UI.MonthCaption], calendarMonth, displayIndex }, (captionLayout == null ? void 0 : captionLayout.startsWith("dropdown")) ? import_react31.default.createElement(
|
|
5427
5435
|
components.DropdownNav,
|
|
5428
5436
|
{ className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
|
|
5429
5437
|
(() => {
|
|
5430
|
-
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react31.default.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date, monthOffset), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style:
|
|
5431
|
-
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react31.default.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date, monthOffset), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style:
|
|
5438
|
+
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react31.default.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date, monthOffset), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: getDropdownStyle(UI.MonthsDropdown), value: dateLib.getMonth(calendarMonth.date) }) : import_react31.default.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
|
|
5439
|
+
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react31.default.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date, monthOffset), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: getDropdownStyle(UI.YearsDropdown), value: dateLib.getYear(calendarMonth.date) }) : import_react31.default.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
|
|
5432
5440
|
const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
|
|
5433
5441
|
return controls;
|
|
5434
5442
|
})(),
|
|
@@ -5444,11 +5452,11 @@ function DayPicker(initialProps) {
|
|
|
5444
5452
|
whiteSpace: "nowrap",
|
|
5445
5453
|
wordWrap: "normal"
|
|
5446
5454
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
5447
|
-
) : import_react31.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
5455
|
+
) : import_react31.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], style: styles == null ? void 0 : styles[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
5448
5456
|
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && import_react31.default.createElement(
|
|
5449
5457
|
components.NextMonthButton,
|
|
5450
|
-
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5451
|
-
import_react31.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
5458
|
+
{ type: "button", className: classNames[UI.NextMonthButton], style: styles == null ? void 0 : styles[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5459
|
+
import_react31.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
5452
5460
|
),
|
|
5453
5461
|
displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && import_react31.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
5454
5462
|
import_react31.default.createElement(
|
|
@@ -6778,12 +6786,12 @@ var FormCheckbox = (_a) => {
|
|
|
6778
6786
|
const checked = Boolean(field.value);
|
|
6779
6787
|
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
6780
6788
|
const hasError = Boolean(fieldError);
|
|
6781
|
-
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)(
|
|
6782
6790
|
"div",
|
|
6783
6791
|
{
|
|
6784
6792
|
className: cn(
|
|
6785
|
-
"flex items-start gap-
|
|
6786
|
-
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",
|
|
6787
6795
|
className
|
|
6788
6796
|
),
|
|
6789
6797
|
children: [
|
|
@@ -6799,7 +6807,7 @@ var FormCheckbox = (_a) => {
|
|
|
6799
6807
|
description ? descriptionId : void 0,
|
|
6800
6808
|
hasError ? messageId : void 0
|
|
6801
6809
|
].filter(Boolean).join(" ") || void 0,
|
|
6802
|
-
className: cn("mt-0.5", checkboxClassName),
|
|
6810
|
+
className: cn("mt-0.5 shrink-0", checkboxClassName),
|
|
6803
6811
|
onBlur: field.onBlur,
|
|
6804
6812
|
onCheckedChange: (value) => {
|
|
6805
6813
|
const nextValue = value === true;
|
|
@@ -6814,13 +6822,13 @@ var FormCheckbox = (_a) => {
|
|
|
6814
6822
|
{
|
|
6815
6823
|
htmlFor: checkboxId,
|
|
6816
6824
|
className: cn(
|
|
6817
|
-
"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",
|
|
6818
6826
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
6819
6827
|
hasError && "text-destructive",
|
|
6820
6828
|
labelClassName
|
|
6821
6829
|
),
|
|
6822
6830
|
children: [
|
|
6823
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label }),
|
|
6831
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "min-w-0", children: label }),
|
|
6824
6832
|
requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
6825
6833
|
import_lucide_react3.Asterisk,
|
|
6826
6834
|
{
|
|
@@ -6839,7 +6847,7 @@ var FormCheckbox = (_a) => {
|
|
|
6839
6847
|
{
|
|
6840
6848
|
id: descriptionId,
|
|
6841
6849
|
className: cn(
|
|
6842
|
-
"mt-
|
|
6850
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
6843
6851
|
descriptionClassName
|
|
6844
6852
|
),
|
|
6845
6853
|
children: description
|
|
@@ -6850,7 +6858,7 @@ var FormCheckbox = (_a) => {
|
|
|
6850
6858
|
{
|
|
6851
6859
|
id: messageId,
|
|
6852
6860
|
className: cn(
|
|
6853
|
-
"mt-
|
|
6861
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
6854
6862
|
messageClassName
|
|
6855
6863
|
),
|
|
6856
6864
|
children: fieldError
|
|
@@ -7704,11 +7712,15 @@ var SelectContent = React46.forwardRef(
|
|
|
7704
7712
|
setContentStyle(void 0);
|
|
7705
7713
|
}
|
|
7706
7714
|
}, [context.open]);
|
|
7715
|
+
function clampNumber(value, min2, max2) {
|
|
7716
|
+
return Math.min(Math.max(value, min2), max2);
|
|
7717
|
+
}
|
|
7707
7718
|
const updatePosition = React46.useCallback(() => {
|
|
7708
7719
|
const trigger = context.triggerRef.current;
|
|
7709
7720
|
if (!trigger) return;
|
|
7710
7721
|
const rect = trigger.getBoundingClientRect();
|
|
7711
7722
|
const viewportPadding = 8;
|
|
7723
|
+
const viewportWidth = window.innerWidth;
|
|
7712
7724
|
const preferredMaxHeight = 288;
|
|
7713
7725
|
const minUsefulHeight = 140;
|
|
7714
7726
|
const availableBelow = window.innerHeight - rect.bottom - viewportPadding - sideOffset;
|
|
@@ -7726,25 +7738,47 @@ var SelectContent = React46.forwardRef(
|
|
|
7726
7738
|
const baseStyle = {
|
|
7727
7739
|
position: "fixed",
|
|
7728
7740
|
zIndex: 9999,
|
|
7729
|
-
width:
|
|
7741
|
+
width: "max-content",
|
|
7730
7742
|
minWidth: rect.width,
|
|
7731
|
-
maxWidth: "calc(100vw - 16px)",
|
|
7732
7743
|
maxHeight: contentMaxHeight
|
|
7733
7744
|
};
|
|
7734
7745
|
if (align === "start") {
|
|
7735
|
-
|
|
7746
|
+
const left = clampNumber(
|
|
7747
|
+
rect.left,
|
|
7748
|
+
viewportPadding,
|
|
7749
|
+
Math.max(
|
|
7750
|
+
viewportPadding,
|
|
7751
|
+
viewportWidth - viewportPadding - rect.width
|
|
7752
|
+
)
|
|
7753
|
+
);
|
|
7754
|
+
baseStyle.left = left;
|
|
7736
7755
|
baseStyle.right = void 0;
|
|
7737
7756
|
baseStyle.transform = void 0;
|
|
7757
|
+
baseStyle.maxWidth = Math.max(
|
|
7758
|
+
rect.width,
|
|
7759
|
+
viewportWidth - left - viewportPadding
|
|
7760
|
+
);
|
|
7738
7761
|
}
|
|
7739
7762
|
if (align === "center") {
|
|
7740
|
-
|
|
7763
|
+
const center = clampNumber(
|
|
7764
|
+
rect.left + rect.width / 2,
|
|
7765
|
+
viewportPadding + rect.width / 2,
|
|
7766
|
+
viewportWidth - viewportPadding - rect.width / 2
|
|
7767
|
+
);
|
|
7768
|
+
baseStyle.left = center;
|
|
7741
7769
|
baseStyle.right = void 0;
|
|
7742
7770
|
baseStyle.transform = "translateX(-50%)";
|
|
7771
|
+
baseStyle.maxWidth = viewportWidth - viewportPadding * 2;
|
|
7743
7772
|
}
|
|
7744
7773
|
if (align === "end") {
|
|
7745
|
-
|
|
7746
|
-
baseStyle.
|
|
7747
|
-
baseStyle.
|
|
7774
|
+
const right = Math.max(viewportPadding, viewportWidth - rect.right);
|
|
7775
|
+
baseStyle.left = void 0;
|
|
7776
|
+
baseStyle.right = right;
|
|
7777
|
+
baseStyle.transform = void 0;
|
|
7778
|
+
baseStyle.maxWidth = Math.max(
|
|
7779
|
+
rect.width,
|
|
7780
|
+
viewportWidth - right - viewportPadding
|
|
7781
|
+
);
|
|
7748
7782
|
}
|
|
7749
7783
|
if (nextSide === "bottom") {
|
|
7750
7784
|
baseStyle.top = rect.bottom + sideOffset;
|
|
@@ -7825,7 +7859,7 @@ var SelectContent = React46.forwardRef(
|
|
|
7825
7859
|
"data-side": side,
|
|
7826
7860
|
"data-select-content": true,
|
|
7827
7861
|
className: cn(
|
|
7828
|
-
"pointer-events-auto
|
|
7862
|
+
"pointer-events-auto overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl",
|
|
7829
7863
|
className
|
|
7830
7864
|
),
|
|
7831
7865
|
style: __spreadProps(__spreadValues(__spreadValues({}, contentStyle != null ? contentStyle : {
|
|
@@ -7839,16 +7873,12 @@ var SelectContent = React46.forwardRef(
|
|
|
7839
7873
|
{
|
|
7840
7874
|
ref: scrollRef,
|
|
7841
7875
|
"data-select-scroll-content": true,
|
|
7842
|
-
className:
|
|
7843
|
-
"max-h-full overflow-x-hidden overflow-y-auto overscroll-contain px-1 py-1",
|
|
7844
|
-
"scrollbar-gutter-stable"
|
|
7845
|
-
),
|
|
7876
|
+
className: "max-h-full overflow-x-hidden overflow-y-auto overscroll-contain px-1 py-1",
|
|
7846
7877
|
style: {
|
|
7847
7878
|
maxHeight: contentStyle == null ? void 0 : contentStyle.maxHeight,
|
|
7848
7879
|
overflowX: "hidden",
|
|
7849
7880
|
overflowY: "auto",
|
|
7850
7881
|
overscrollBehavior: "contain",
|
|
7851
|
-
scrollbarGutter: "stable",
|
|
7852
7882
|
WebkitOverflowScrolling: "touch"
|
|
7853
7883
|
},
|
|
7854
7884
|
onWheel: (event) => {
|
|
@@ -7975,7 +8005,7 @@ var SelectItem = React46.forwardRef(
|
|
|
7975
8005
|
"data-highlighted": isActive ? "" : void 0,
|
|
7976
8006
|
"data-disabled": disabled ? "" : void 0,
|
|
7977
8007
|
className: cn(
|
|
7978
|
-
"relative flex w-full cursor-default select-none items-center rounded-
|
|
8008
|
+
"relative flex w-full min-w-0 cursor-default select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-left outline-none transition-colors",
|
|
7979
8009
|
sizeClasses.selectItem,
|
|
7980
8010
|
!disabled && "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
7981
8011
|
disabled && "pointer-events-none opacity-50",
|
|
@@ -8000,7 +8030,7 @@ var SelectItem = React46.forwardRef(
|
|
|
8000
8030
|
}, props), {
|
|
8001
8031
|
children: [
|
|
8002
8032
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_icons9.CheckIcon, { className: "h-4 w-4" }) : null }),
|
|
8003
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate", children })
|
|
8033
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "min-w-0 flex-1 truncate whitespace-nowrap", children })
|
|
8004
8034
|
]
|
|
8005
8035
|
})
|
|
8006
8036
|
);
|
|
@@ -8142,13 +8172,23 @@ function SearchableSelectBase({
|
|
|
8142
8172
|
96,
|
|
8143
8173
|
Math.min(preferredMaxHeight, availableHeight)
|
|
8144
8174
|
);
|
|
8175
|
+
const left = Math.min(
|
|
8176
|
+
Math.max(viewportPadding, rect.left),
|
|
8177
|
+
Math.max(
|
|
8178
|
+
viewportPadding,
|
|
8179
|
+
window.innerWidth - viewportPadding - rect.width
|
|
8180
|
+
)
|
|
8181
|
+
);
|
|
8145
8182
|
const nextStyle = {
|
|
8146
8183
|
position: "fixed",
|
|
8147
8184
|
zIndex: 9999,
|
|
8148
|
-
left
|
|
8149
|
-
width:
|
|
8185
|
+
left,
|
|
8186
|
+
width: "max-content",
|
|
8150
8187
|
minWidth: rect.width,
|
|
8151
|
-
maxWidth:
|
|
8188
|
+
maxWidth: Math.max(
|
|
8189
|
+
rect.width,
|
|
8190
|
+
window.innerWidth - left - viewportPadding
|
|
8191
|
+
),
|
|
8152
8192
|
maxHeight: contentMaxHeight
|
|
8153
8193
|
};
|
|
8154
8194
|
if (shouldOpenBelow) {
|
|
@@ -8273,13 +8313,12 @@ function SearchableSelectBase({
|
|
|
8273
8313
|
{
|
|
8274
8314
|
id: listboxId,
|
|
8275
8315
|
role: "listbox",
|
|
8276
|
-
className: "max-h-full overflow-x-hidden overflow-y-auto overscroll-contain p-1
|
|
8316
|
+
className: "max-h-full overflow-x-hidden overflow-y-auto overscroll-contain p-1",
|
|
8277
8317
|
style: {
|
|
8278
8318
|
maxHeight: contentStyle.maxHeight,
|
|
8279
8319
|
overflowX: "hidden",
|
|
8280
8320
|
overflowY: "auto",
|
|
8281
8321
|
overscrollBehavior: "contain",
|
|
8282
|
-
scrollbarGutter: "stable",
|
|
8283
8322
|
WebkitOverflowScrolling: "touch"
|
|
8284
8323
|
},
|
|
8285
8324
|
onWheel: (event) => {
|
|
@@ -10401,25 +10440,27 @@ function UiSelect({
|
|
|
10401
10440
|
variant = "outline",
|
|
10402
10441
|
errorMessage,
|
|
10403
10442
|
htmlFormItemId,
|
|
10404
|
-
position
|
|
10443
|
+
position = "popper",
|
|
10444
|
+
contentAlign = "center",
|
|
10445
|
+
contentSideOffset = 6
|
|
10405
10446
|
}) {
|
|
10406
10447
|
const generatedId = React72.useId();
|
|
10407
10448
|
const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
10408
10449
|
const messageId = `${triggerId}-message`;
|
|
10409
10450
|
const hasError = Boolean(errorMessage);
|
|
10410
10451
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
10411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("w-full space-y-0.5", selectClassName), children: [
|
|
10452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("w-full min-w-0 space-y-0.5", selectClassName), children: [
|
|
10412
10453
|
label ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
10413
10454
|
Label3,
|
|
10414
10455
|
{
|
|
10415
10456
|
htmlFor: triggerId,
|
|
10416
10457
|
className: cn(
|
|
10417
|
-
"flex items-center gap-0.5 text-sm font-medium
|
|
10458
|
+
"flex items-center gap-0.5 text-sm font-medium",
|
|
10418
10459
|
hasError && "text-destructive",
|
|
10419
10460
|
labelClassName
|
|
10420
10461
|
),
|
|
10421
10462
|
children: [
|
|
10422
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: label }),
|
|
10463
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "min-w-0 truncate", children: label }),
|
|
10423
10464
|
requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10424
10465
|
import_lucide_react9.Asterisk,
|
|
10425
10466
|
{
|
|
@@ -10451,7 +10492,7 @@ function UiSelect({
|
|
|
10451
10492
|
id: triggerId,
|
|
10452
10493
|
"aria-invalid": hasError || void 0,
|
|
10453
10494
|
"aria-describedby": errorMessage ? messageId : void 0,
|
|
10454
|
-
className,
|
|
10495
|
+
className: cn("min-w-0", className),
|
|
10455
10496
|
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SelectValue, { placeholder })
|
|
10456
10497
|
}
|
|
10457
10498
|
),
|
|
@@ -10459,7 +10500,8 @@ function UiSelect({
|
|
|
10459
10500
|
SelectContent,
|
|
10460
10501
|
{
|
|
10461
10502
|
position,
|
|
10462
|
-
|
|
10503
|
+
align: contentAlign,
|
|
10504
|
+
sideOffset: contentSideOffset,
|
|
10463
10505
|
className: cn(
|
|
10464
10506
|
"z-50 overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl outline-none",
|
|
10465
10507
|
contentClassName
|
|
@@ -10532,12 +10574,12 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10532
10574
|
"className"
|
|
10533
10575
|
]);
|
|
10534
10576
|
const hasError = Boolean(errorMessage || invalid);
|
|
10535
|
-
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)(
|
|
10536
10578
|
"div",
|
|
10537
10579
|
{
|
|
10538
10580
|
className: cn(
|
|
10539
|
-
"flex items-start gap-
|
|
10540
|
-
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",
|
|
10541
10583
|
contentClassName
|
|
10542
10584
|
),
|
|
10543
10585
|
children: [
|
|
@@ -10547,7 +10589,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10547
10589
|
ref,
|
|
10548
10590
|
id: htmlFormItemId,
|
|
10549
10591
|
invalid: hasError,
|
|
10550
|
-
className: cn("mt-0.5", className)
|
|
10592
|
+
className: cn("mt-0.5 shrink-0", className)
|
|
10551
10593
|
}, checkboxProps)
|
|
10552
10594
|
),
|
|
10553
10595
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -10556,13 +10598,13 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10556
10598
|
{
|
|
10557
10599
|
htmlFor: htmlFormItemId,
|
|
10558
10600
|
className: cn(
|
|
10559
|
-
"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",
|
|
10560
10602
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
10561
10603
|
hasError && "text-destructive",
|
|
10562
10604
|
labelClassName
|
|
10563
10605
|
),
|
|
10564
10606
|
children: [
|
|
10565
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: label }),
|
|
10607
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "min-w-0", children: label }),
|
|
10566
10608
|
requiredLabel ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10567
10609
|
import_lucide_react10.Asterisk,
|
|
10568
10610
|
{
|
|
@@ -10580,7 +10622,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10580
10622
|
"p",
|
|
10581
10623
|
{
|
|
10582
10624
|
className: cn(
|
|
10583
|
-
"mt-
|
|
10625
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
10584
10626
|
descriptionClassName
|
|
10585
10627
|
),
|
|
10586
10628
|
children: description
|
|
@@ -10590,7 +10632,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10590
10632
|
"p",
|
|
10591
10633
|
{
|
|
10592
10634
|
className: cn(
|
|
10593
|
-
"mt-
|
|
10635
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
10594
10636
|
errorClassName
|
|
10595
10637
|
),
|
|
10596
10638
|
children: errorMessage
|
package/dist/index.d.cts
CHANGED
|
@@ -1024,8 +1024,10 @@ interface UiSelectProps<TData = unknown> {
|
|
|
1024
1024
|
errorMessage?: string;
|
|
1025
1025
|
htmlFormItemId?: string;
|
|
1026
1026
|
position?: "popper";
|
|
1027
|
+
contentAlign?: "start" | "center" | "end";
|
|
1028
|
+
contentSideOffset?: number;
|
|
1027
1029
|
}
|
|
1028
|
-
declare function UiSelect<TData = unknown>({ label, placeholder, value, defaultValue, onChange, items, children, disabled, requiredLabel, className, selectClassName, labelClassName, contentClassName, itemClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, htmlFormItemId, position, }: UiSelectProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1030
|
+
declare function UiSelect<TData = unknown>({ label, placeholder, value, defaultValue, onChange, items, children, disabled, requiredLabel, className, selectClassName, labelClassName, contentClassName, itemClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, htmlFormItemId, position, contentAlign, contentSideOffset, }: UiSelectProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1029
1031
|
|
|
1030
1032
|
interface UiCheckboxProps extends CheckboxProps {
|
|
1031
1033
|
label?: React$1.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -1024,8 +1024,10 @@ interface UiSelectProps<TData = unknown> {
|
|
|
1024
1024
|
errorMessage?: string;
|
|
1025
1025
|
htmlFormItemId?: string;
|
|
1026
1026
|
position?: "popper";
|
|
1027
|
+
contentAlign?: "start" | "center" | "end";
|
|
1028
|
+
contentSideOffset?: number;
|
|
1027
1029
|
}
|
|
1028
|
-
declare function UiSelect<TData = unknown>({ label, placeholder, value, defaultValue, onChange, items, children, disabled, requiredLabel, className, selectClassName, labelClassName, contentClassName, itemClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, htmlFormItemId, position, }: UiSelectProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1030
|
+
declare function UiSelect<TData = unknown>({ label, placeholder, value, defaultValue, onChange, items, children, disabled, requiredLabel, className, selectClassName, labelClassName, contentClassName, itemClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, htmlFormItemId, position, contentAlign, contentSideOffset, }: UiSelectProps<TData>): react_jsx_runtime.JSX.Element;
|
|
1029
1031
|
|
|
1030
1032
|
interface UiCheckboxProps extends CheckboxProps {
|
|
1031
1033
|
label?: React$1.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -3198,10 +3198,10 @@ function CaptionLabel(props) {
|
|
|
3198
3198
|
// node_modules/react-day-picker/dist/esm/components/Chevron.js
|
|
3199
3199
|
import React9 from "react";
|
|
3200
3200
|
function Chevron(props) {
|
|
3201
|
-
const { size = 24, orientation = "left", className } = props;
|
|
3201
|
+
const { size = 24, orientation = "left", className, style } = props;
|
|
3202
3202
|
return React9.createElement(
|
|
3203
3203
|
"svg",
|
|
3204
|
-
{ className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
3204
|
+
{ className, style, width: size, height: size, viewBox: "0 0 24 24" },
|
|
3205
3205
|
orientation === "up" && React9.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
3206
3206
|
orientation === "down" && React9.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
3207
3207
|
orientation === "left" && React9.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
@@ -3301,18 +3301,18 @@ function useDayPicker() {
|
|
|
3301
3301
|
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
3302
3302
|
function Dropdown(props) {
|
|
3303
3303
|
const _a = props, { options, className } = _a, selectProps = __objRest(_a, ["options", "className"]);
|
|
3304
|
-
const { classNames, components } = useDayPicker();
|
|
3304
|
+
const { classNames, components, styles } = useDayPicker();
|
|
3305
3305
|
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
3306
3306
|
const selectedOption = options == null ? void 0 : options.find(({ value }) => value === selectProps.value);
|
|
3307
3307
|
return React12.createElement(
|
|
3308
3308
|
"span",
|
|
3309
|
-
{ "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot] },
|
|
3309
|
+
{ "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot], style: styles == null ? void 0 : styles[UI.DropdownRoot] },
|
|
3310
3310
|
React12.createElement(components.Select, __spreadValues({ className: cssClassSelect }, selectProps), options == null ? void 0 : options.map(({ value, label, disabled }) => React12.createElement(components.Option, { key: value, value, disabled }, label))),
|
|
3311
3311
|
React12.createElement(
|
|
3312
3312
|
"span",
|
|
3313
|
-
{ className: classNames[UI.CaptionLabel], "aria-hidden": true },
|
|
3313
|
+
{ className: classNames[UI.CaptionLabel], style: styles == null ? void 0 : styles[UI.CaptionLabel], "aria-hidden": true },
|
|
3314
3314
|
selectedOption == null ? void 0 : selectedOption.label,
|
|
3315
|
-
React12.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] })
|
|
3315
|
+
React12.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron] })
|
|
3316
3316
|
)
|
|
3317
3317
|
);
|
|
3318
3318
|
}
|
|
@@ -3366,7 +3366,7 @@ function MonthsDropdown(props) {
|
|
|
3366
3366
|
import React20, { useCallback } from "react";
|
|
3367
3367
|
function Nav(props) {
|
|
3368
3368
|
const _a = props, { onPreviousClick, onNextClick, previousMonth, nextMonth } = _a, navProps = __objRest(_a, ["onPreviousClick", "onNextClick", "previousMonth", "nextMonth"]);
|
|
3369
|
-
const { components, classNames, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
|
|
3369
|
+
const { components, classNames, styles, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
|
|
3370
3370
|
const handleNextClick = useCallback((e) => {
|
|
3371
3371
|
if (nextMonth) {
|
|
3372
3372
|
onNextClick == null ? void 0 : onNextClick(e);
|
|
@@ -3382,13 +3382,13 @@ function Nav(props) {
|
|
|
3382
3382
|
__spreadValues({}, navProps),
|
|
3383
3383
|
React20.createElement(
|
|
3384
3384
|
components.PreviousMonthButton,
|
|
3385
|
-
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
|
|
3386
|
-
React20.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: "left" })
|
|
3385
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], style: styles == null ? void 0 : styles[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
|
|
3386
|
+
React20.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron], orientation: "left" })
|
|
3387
3387
|
),
|
|
3388
3388
|
React20.createElement(
|
|
3389
3389
|
components.NextMonthButton,
|
|
3390
|
-
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
|
|
3391
|
-
React20.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron] })
|
|
3390
|
+
{ type: "button", className: classNames[UI.NextMonthButton], style: styles == null ? void 0 : styles[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
|
|
3391
|
+
React20.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron] })
|
|
3392
3392
|
)
|
|
3393
3393
|
);
|
|
3394
3394
|
}
|
|
@@ -5075,6 +5075,14 @@ function DayPicker(initialProps) {
|
|
|
5075
5075
|
style: __spreadValues(__spreadValues({}, styles == null ? void 0 : styles[UI.Root]), props.style)
|
|
5076
5076
|
}), [classNames, props.className, props.style, styles]);
|
|
5077
5077
|
const dataAttributes = getDataAttributes(props);
|
|
5078
|
+
const getDropdownStyle = (dropdown) => {
|
|
5079
|
+
const dropdownStyle = styles == null ? void 0 : styles[UI.Dropdown];
|
|
5080
|
+
const specificDropdownStyle = styles == null ? void 0 : styles[dropdown];
|
|
5081
|
+
if (!dropdownStyle && !specificDropdownStyle) {
|
|
5082
|
+
return void 0;
|
|
5083
|
+
}
|
|
5084
|
+
return __spreadValues(__spreadValues({}, dropdownStyle), specificDropdownStyle);
|
|
5085
|
+
};
|
|
5078
5086
|
const rootElRef = useRef2(null);
|
|
5079
5087
|
useAnimation(rootElRef, Boolean(props.animate), {
|
|
5080
5088
|
classNames,
|
|
@@ -5123,15 +5131,15 @@ function DayPicker(initialProps) {
|
|
|
5123
5131
|
},
|
|
5124
5132
|
navLayout === "around" && !props.hideNavigation && displayIndex === 0 && React33.createElement(
|
|
5125
5133
|
components.PreviousMonthButton,
|
|
5126
|
-
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5127
|
-
React33.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
5134
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], style: styles == null ? void 0 : styles[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5135
|
+
React33.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
5128
5136
|
),
|
|
5129
5137
|
React33.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles == null ? void 0 : styles[UI.MonthCaption], calendarMonth, displayIndex }, (captionLayout == null ? void 0 : captionLayout.startsWith("dropdown")) ? React33.createElement(
|
|
5130
5138
|
components.DropdownNav,
|
|
5131
5139
|
{ className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
|
|
5132
5140
|
(() => {
|
|
5133
|
-
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React33.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date, monthOffset), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style:
|
|
5134
|
-
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React33.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date, monthOffset), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style:
|
|
5141
|
+
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React33.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date, monthOffset), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: getDropdownStyle(UI.MonthsDropdown), value: dateLib.getMonth(calendarMonth.date) }) : React33.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
|
|
5142
|
+
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React33.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date, monthOffset), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: getDropdownStyle(UI.YearsDropdown), value: dateLib.getYear(calendarMonth.date) }) : React33.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
|
|
5135
5143
|
const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
|
|
5136
5144
|
return controls;
|
|
5137
5145
|
})(),
|
|
@@ -5147,11 +5155,11 @@ function DayPicker(initialProps) {
|
|
|
5147
5155
|
whiteSpace: "nowrap",
|
|
5148
5156
|
wordWrap: "normal"
|
|
5149
5157
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
5150
|
-
) : React33.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
5158
|
+
) : React33.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], style: styles == null ? void 0 : styles[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
5151
5159
|
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React33.createElement(
|
|
5152
5160
|
components.NextMonthButton,
|
|
5153
|
-
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5154
|
-
React33.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
5161
|
+
{ type: "button", className: classNames[UI.NextMonthButton], style: styles == null ? void 0 : styles[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
5162
|
+
React33.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], style: styles == null ? void 0 : styles[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
5155
5163
|
),
|
|
5156
5164
|
displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && React33.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
5157
5165
|
React33.createElement(
|
|
@@ -6496,12 +6504,12 @@ var FormCheckbox = (_a) => {
|
|
|
6496
6504
|
const checked = Boolean(field.value);
|
|
6497
6505
|
const fieldError = (_a3 = fieldState.error) == null ? void 0 : _a3.message;
|
|
6498
6506
|
const hasError = Boolean(fieldError);
|
|
6499
|
-
return /* @__PURE__ */ jsx21(FormItem, { className: cn("
|
|
6507
|
+
return /* @__PURE__ */ jsx21(FormItem, { className: cn("min-w-0", itemClassName), children: /* @__PURE__ */ jsxs11(
|
|
6500
6508
|
"div",
|
|
6501
6509
|
{
|
|
6502
6510
|
className: cn(
|
|
6503
|
-
"flex items-start gap-
|
|
6504
|
-
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",
|
|
6505
6513
|
className
|
|
6506
6514
|
),
|
|
6507
6515
|
children: [
|
|
@@ -6517,7 +6525,7 @@ var FormCheckbox = (_a) => {
|
|
|
6517
6525
|
description ? descriptionId : void 0,
|
|
6518
6526
|
hasError ? messageId : void 0
|
|
6519
6527
|
].filter(Boolean).join(" ") || void 0,
|
|
6520
|
-
className: cn("mt-0.5", checkboxClassName),
|
|
6528
|
+
className: cn("mt-0.5 shrink-0", checkboxClassName),
|
|
6521
6529
|
onBlur: field.onBlur,
|
|
6522
6530
|
onCheckedChange: (value) => {
|
|
6523
6531
|
const nextValue = value === true;
|
|
@@ -6532,13 +6540,13 @@ var FormCheckbox = (_a) => {
|
|
|
6532
6540
|
{
|
|
6533
6541
|
htmlFor: checkboxId,
|
|
6534
6542
|
className: cn(
|
|
6535
|
-
"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",
|
|
6536
6544
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
6537
6545
|
hasError && "text-destructive",
|
|
6538
6546
|
labelClassName
|
|
6539
6547
|
),
|
|
6540
6548
|
children: [
|
|
6541
|
-
/* @__PURE__ */ jsx21("span", { children: label }),
|
|
6549
|
+
/* @__PURE__ */ jsx21("span", { className: "min-w-0", children: label }),
|
|
6542
6550
|
requiredLabel ? /* @__PURE__ */ jsx21(
|
|
6543
6551
|
Asterisk,
|
|
6544
6552
|
{
|
|
@@ -6557,7 +6565,7 @@ var FormCheckbox = (_a) => {
|
|
|
6557
6565
|
{
|
|
6558
6566
|
id: descriptionId,
|
|
6559
6567
|
className: cn(
|
|
6560
|
-
"mt-
|
|
6568
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
6561
6569
|
descriptionClassName
|
|
6562
6570
|
),
|
|
6563
6571
|
children: description
|
|
@@ -6568,7 +6576,7 @@ var FormCheckbox = (_a) => {
|
|
|
6568
6576
|
{
|
|
6569
6577
|
id: messageId,
|
|
6570
6578
|
className: cn(
|
|
6571
|
-
"mt-
|
|
6579
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
6572
6580
|
messageClassName
|
|
6573
6581
|
),
|
|
6574
6582
|
children: fieldError
|
|
@@ -7428,11 +7436,15 @@ var SelectContent = React46.forwardRef(
|
|
|
7428
7436
|
setContentStyle(void 0);
|
|
7429
7437
|
}
|
|
7430
7438
|
}, [context.open]);
|
|
7439
|
+
function clampNumber(value, min2, max2) {
|
|
7440
|
+
return Math.min(Math.max(value, min2), max2);
|
|
7441
|
+
}
|
|
7431
7442
|
const updatePosition = React46.useCallback(() => {
|
|
7432
7443
|
const trigger = context.triggerRef.current;
|
|
7433
7444
|
if (!trigger) return;
|
|
7434
7445
|
const rect = trigger.getBoundingClientRect();
|
|
7435
7446
|
const viewportPadding = 8;
|
|
7447
|
+
const viewportWidth = window.innerWidth;
|
|
7436
7448
|
const preferredMaxHeight = 288;
|
|
7437
7449
|
const minUsefulHeight = 140;
|
|
7438
7450
|
const availableBelow = window.innerHeight - rect.bottom - viewportPadding - sideOffset;
|
|
@@ -7450,25 +7462,47 @@ var SelectContent = React46.forwardRef(
|
|
|
7450
7462
|
const baseStyle = {
|
|
7451
7463
|
position: "fixed",
|
|
7452
7464
|
zIndex: 9999,
|
|
7453
|
-
width:
|
|
7465
|
+
width: "max-content",
|
|
7454
7466
|
minWidth: rect.width,
|
|
7455
|
-
maxWidth: "calc(100vw - 16px)",
|
|
7456
7467
|
maxHeight: contentMaxHeight
|
|
7457
7468
|
};
|
|
7458
7469
|
if (align === "start") {
|
|
7459
|
-
|
|
7470
|
+
const left = clampNumber(
|
|
7471
|
+
rect.left,
|
|
7472
|
+
viewportPadding,
|
|
7473
|
+
Math.max(
|
|
7474
|
+
viewportPadding,
|
|
7475
|
+
viewportWidth - viewportPadding - rect.width
|
|
7476
|
+
)
|
|
7477
|
+
);
|
|
7478
|
+
baseStyle.left = left;
|
|
7460
7479
|
baseStyle.right = void 0;
|
|
7461
7480
|
baseStyle.transform = void 0;
|
|
7481
|
+
baseStyle.maxWidth = Math.max(
|
|
7482
|
+
rect.width,
|
|
7483
|
+
viewportWidth - left - viewportPadding
|
|
7484
|
+
);
|
|
7462
7485
|
}
|
|
7463
7486
|
if (align === "center") {
|
|
7464
|
-
|
|
7487
|
+
const center = clampNumber(
|
|
7488
|
+
rect.left + rect.width / 2,
|
|
7489
|
+
viewportPadding + rect.width / 2,
|
|
7490
|
+
viewportWidth - viewportPadding - rect.width / 2
|
|
7491
|
+
);
|
|
7492
|
+
baseStyle.left = center;
|
|
7465
7493
|
baseStyle.right = void 0;
|
|
7466
7494
|
baseStyle.transform = "translateX(-50%)";
|
|
7495
|
+
baseStyle.maxWidth = viewportWidth - viewportPadding * 2;
|
|
7467
7496
|
}
|
|
7468
7497
|
if (align === "end") {
|
|
7469
|
-
|
|
7470
|
-
baseStyle.
|
|
7471
|
-
baseStyle.
|
|
7498
|
+
const right = Math.max(viewportPadding, viewportWidth - rect.right);
|
|
7499
|
+
baseStyle.left = void 0;
|
|
7500
|
+
baseStyle.right = right;
|
|
7501
|
+
baseStyle.transform = void 0;
|
|
7502
|
+
baseStyle.maxWidth = Math.max(
|
|
7503
|
+
rect.width,
|
|
7504
|
+
viewportWidth - right - viewportPadding
|
|
7505
|
+
);
|
|
7472
7506
|
}
|
|
7473
7507
|
if (nextSide === "bottom") {
|
|
7474
7508
|
baseStyle.top = rect.bottom + sideOffset;
|
|
@@ -7549,7 +7583,7 @@ var SelectContent = React46.forwardRef(
|
|
|
7549
7583
|
"data-side": side,
|
|
7550
7584
|
"data-select-content": true,
|
|
7551
7585
|
className: cn(
|
|
7552
|
-
"pointer-events-auto
|
|
7586
|
+
"pointer-events-auto overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl",
|
|
7553
7587
|
className
|
|
7554
7588
|
),
|
|
7555
7589
|
style: __spreadProps(__spreadValues(__spreadValues({}, contentStyle != null ? contentStyle : {
|
|
@@ -7563,16 +7597,12 @@ var SelectContent = React46.forwardRef(
|
|
|
7563
7597
|
{
|
|
7564
7598
|
ref: scrollRef,
|
|
7565
7599
|
"data-select-scroll-content": true,
|
|
7566
|
-
className:
|
|
7567
|
-
"max-h-full overflow-x-hidden overflow-y-auto overscroll-contain px-1 py-1",
|
|
7568
|
-
"scrollbar-gutter-stable"
|
|
7569
|
-
),
|
|
7600
|
+
className: "max-h-full overflow-x-hidden overflow-y-auto overscroll-contain px-1 py-1",
|
|
7570
7601
|
style: {
|
|
7571
7602
|
maxHeight: contentStyle == null ? void 0 : contentStyle.maxHeight,
|
|
7572
7603
|
overflowX: "hidden",
|
|
7573
7604
|
overflowY: "auto",
|
|
7574
7605
|
overscrollBehavior: "contain",
|
|
7575
|
-
scrollbarGutter: "stable",
|
|
7576
7606
|
WebkitOverflowScrolling: "touch"
|
|
7577
7607
|
},
|
|
7578
7608
|
onWheel: (event) => {
|
|
@@ -7699,7 +7729,7 @@ var SelectItem = React46.forwardRef(
|
|
|
7699
7729
|
"data-highlighted": isActive ? "" : void 0,
|
|
7700
7730
|
"data-disabled": disabled ? "" : void 0,
|
|
7701
7731
|
className: cn(
|
|
7702
|
-
"relative flex w-full cursor-default select-none items-center rounded-
|
|
7732
|
+
"relative flex w-full min-w-0 cursor-default select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-left outline-none transition-colors",
|
|
7703
7733
|
sizeClasses.selectItem,
|
|
7704
7734
|
!disabled && "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
7705
7735
|
disabled && "pointer-events-none opacity-50",
|
|
@@ -7724,7 +7754,7 @@ var SelectItem = React46.forwardRef(
|
|
|
7724
7754
|
}, props), {
|
|
7725
7755
|
children: [
|
|
7726
7756
|
/* @__PURE__ */ jsx24("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: isSelected ? /* @__PURE__ */ jsx24(CheckIcon4, { className: "h-4 w-4" }) : null }),
|
|
7727
|
-
/* @__PURE__ */ jsx24("span", { className: "truncate", children })
|
|
7757
|
+
/* @__PURE__ */ jsx24("span", { className: "min-w-0 flex-1 truncate whitespace-nowrap", children })
|
|
7728
7758
|
]
|
|
7729
7759
|
})
|
|
7730
7760
|
);
|
|
@@ -7866,13 +7896,23 @@ function SearchableSelectBase({
|
|
|
7866
7896
|
96,
|
|
7867
7897
|
Math.min(preferredMaxHeight, availableHeight)
|
|
7868
7898
|
);
|
|
7899
|
+
const left = Math.min(
|
|
7900
|
+
Math.max(viewportPadding, rect.left),
|
|
7901
|
+
Math.max(
|
|
7902
|
+
viewportPadding,
|
|
7903
|
+
window.innerWidth - viewportPadding - rect.width
|
|
7904
|
+
)
|
|
7905
|
+
);
|
|
7869
7906
|
const nextStyle = {
|
|
7870
7907
|
position: "fixed",
|
|
7871
7908
|
zIndex: 9999,
|
|
7872
|
-
left
|
|
7873
|
-
width:
|
|
7909
|
+
left,
|
|
7910
|
+
width: "max-content",
|
|
7874
7911
|
minWidth: rect.width,
|
|
7875
|
-
maxWidth:
|
|
7912
|
+
maxWidth: Math.max(
|
|
7913
|
+
rect.width,
|
|
7914
|
+
window.innerWidth - left - viewportPadding
|
|
7915
|
+
),
|
|
7876
7916
|
maxHeight: contentMaxHeight
|
|
7877
7917
|
};
|
|
7878
7918
|
if (shouldOpenBelow) {
|
|
@@ -7997,13 +8037,12 @@ function SearchableSelectBase({
|
|
|
7997
8037
|
{
|
|
7998
8038
|
id: listboxId,
|
|
7999
8039
|
role: "listbox",
|
|
8000
|
-
className: "max-h-full overflow-x-hidden overflow-y-auto overscroll-contain p-1
|
|
8040
|
+
className: "max-h-full overflow-x-hidden overflow-y-auto overscroll-contain p-1",
|
|
8001
8041
|
style: {
|
|
8002
8042
|
maxHeight: contentStyle.maxHeight,
|
|
8003
8043
|
overflowX: "hidden",
|
|
8004
8044
|
overflowY: "auto",
|
|
8005
8045
|
overscrollBehavior: "contain",
|
|
8006
|
-
scrollbarGutter: "stable",
|
|
8007
8046
|
WebkitOverflowScrolling: "touch"
|
|
8008
8047
|
},
|
|
8009
8048
|
onWheel: (event) => {
|
|
@@ -10161,25 +10200,27 @@ function UiSelect({
|
|
|
10161
10200
|
variant = "outline",
|
|
10162
10201
|
errorMessage,
|
|
10163
10202
|
htmlFormItemId,
|
|
10164
|
-
position
|
|
10203
|
+
position = "popper",
|
|
10204
|
+
contentAlign = "center",
|
|
10205
|
+
contentSideOffset = 6
|
|
10165
10206
|
}) {
|
|
10166
10207
|
const generatedId = React72.useId();
|
|
10167
10208
|
const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
10168
10209
|
const messageId = `${triggerId}-message`;
|
|
10169
10210
|
const hasError = Boolean(errorMessage);
|
|
10170
10211
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
10171
|
-
return /* @__PURE__ */ jsxs27("div", { className: cn("w-full space-y-0.5", selectClassName), children: [
|
|
10212
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("w-full min-w-0 space-y-0.5", selectClassName), children: [
|
|
10172
10213
|
label ? /* @__PURE__ */ jsxs27(
|
|
10173
10214
|
Label3,
|
|
10174
10215
|
{
|
|
10175
10216
|
htmlFor: triggerId,
|
|
10176
10217
|
className: cn(
|
|
10177
|
-
"flex items-center gap-0.5 text-sm font-medium
|
|
10218
|
+
"flex items-center gap-0.5 text-sm font-medium",
|
|
10178
10219
|
hasError && "text-destructive",
|
|
10179
10220
|
labelClassName
|
|
10180
10221
|
),
|
|
10181
10222
|
children: [
|
|
10182
|
-
/* @__PURE__ */ jsx54("span", { children: label }),
|
|
10223
|
+
/* @__PURE__ */ jsx54("span", { className: "min-w-0 truncate", children: label }),
|
|
10183
10224
|
requiredLabel ? /* @__PURE__ */ jsx54(
|
|
10184
10225
|
Asterisk5,
|
|
10185
10226
|
{
|
|
@@ -10211,7 +10252,7 @@ function UiSelect({
|
|
|
10211
10252
|
id: triggerId,
|
|
10212
10253
|
"aria-invalid": hasError || void 0,
|
|
10213
10254
|
"aria-describedby": errorMessage ? messageId : void 0,
|
|
10214
|
-
className,
|
|
10255
|
+
className: cn("min-w-0", className),
|
|
10215
10256
|
children: /* @__PURE__ */ jsx54(SelectValue, { placeholder })
|
|
10216
10257
|
}
|
|
10217
10258
|
),
|
|
@@ -10219,7 +10260,8 @@ function UiSelect({
|
|
|
10219
10260
|
SelectContent,
|
|
10220
10261
|
{
|
|
10221
10262
|
position,
|
|
10222
|
-
|
|
10263
|
+
align: contentAlign,
|
|
10264
|
+
sideOffset: contentSideOffset,
|
|
10223
10265
|
className: cn(
|
|
10224
10266
|
"z-50 overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-xl outline-none",
|
|
10225
10267
|
contentClassName
|
|
@@ -10292,12 +10334,12 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10292
10334
|
"className"
|
|
10293
10335
|
]);
|
|
10294
10336
|
const hasError = Boolean(errorMessage || invalid);
|
|
10295
|
-
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(
|
|
10296
10338
|
"div",
|
|
10297
10339
|
{
|
|
10298
10340
|
className: cn(
|
|
10299
|
-
"flex items-start gap-
|
|
10300
|
-
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",
|
|
10301
10343
|
contentClassName
|
|
10302
10344
|
),
|
|
10303
10345
|
children: [
|
|
@@ -10307,7 +10349,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10307
10349
|
ref,
|
|
10308
10350
|
id: htmlFormItemId,
|
|
10309
10351
|
invalid: hasError,
|
|
10310
|
-
className: cn("mt-0.5", className)
|
|
10352
|
+
className: cn("mt-0.5 shrink-0", className)
|
|
10311
10353
|
}, checkboxProps)
|
|
10312
10354
|
),
|
|
10313
10355
|
/* @__PURE__ */ jsxs28("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -10316,13 +10358,13 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10316
10358
|
{
|
|
10317
10359
|
htmlFor: htmlFormItemId,
|
|
10318
10360
|
className: cn(
|
|
10319
|
-
"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",
|
|
10320
10362
|
checkboxProps.disabled && "cursor-not-allowed text-muted-foreground",
|
|
10321
10363
|
hasError && "text-destructive",
|
|
10322
10364
|
labelClassName
|
|
10323
10365
|
),
|
|
10324
10366
|
children: [
|
|
10325
|
-
/* @__PURE__ */ jsx55("span", { children: label }),
|
|
10367
|
+
/* @__PURE__ */ jsx55("span", { className: "min-w-0", children: label }),
|
|
10326
10368
|
requiredLabel ? /* @__PURE__ */ jsx55(
|
|
10327
10369
|
Asterisk6,
|
|
10328
10370
|
{
|
|
@@ -10340,7 +10382,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10340
10382
|
"p",
|
|
10341
10383
|
{
|
|
10342
10384
|
className: cn(
|
|
10343
|
-
"mt-
|
|
10385
|
+
"mt-0.5 text-sm leading-5 text-muted-foreground",
|
|
10344
10386
|
descriptionClassName
|
|
10345
10387
|
),
|
|
10346
10388
|
children: description
|
|
@@ -10350,7 +10392,7 @@ var UiCheckbox = React73.forwardRef(
|
|
|
10350
10392
|
"p",
|
|
10351
10393
|
{
|
|
10352
10394
|
className: cn(
|
|
10353
|
-
"mt-
|
|
10395
|
+
"mt-0.5 text-sm font-medium leading-5 text-destructive",
|
|
10354
10396
|
errorClassName
|
|
10355
10397
|
),
|
|
10356
10398
|
children: errorMessage
|
package/dist/style.css
CHANGED
|
@@ -468,9 +468,6 @@
|
|
|
468
468
|
.my-1 {
|
|
469
469
|
margin-block: calc(var(--spacing) * 1);
|
|
470
470
|
}
|
|
471
|
-
.-mt-0\.75 {
|
|
472
|
-
margin-top: calc(var(--spacing) * -0.75);
|
|
473
|
-
}
|
|
474
471
|
.-mt-4 {
|
|
475
472
|
margin-top: calc(var(--spacing) * -4);
|
|
476
473
|
}
|
|
@@ -727,6 +724,9 @@
|
|
|
727
724
|
.w-\[calc\(100vw-1rem\)\] {
|
|
728
725
|
width: calc(100vw - 1rem);
|
|
729
726
|
}
|
|
727
|
+
.w-auto {
|
|
728
|
+
width: auto;
|
|
729
|
+
}
|
|
730
730
|
.w-full {
|
|
731
731
|
width: 100%;
|
|
732
732
|
}
|
|
@@ -753,8 +753,11 @@
|
|
|
753
753
|
.min-w-0 {
|
|
754
754
|
min-width: calc(var(--spacing) * 0);
|
|
755
755
|
}
|
|
756
|
-
.min-w-
|
|
757
|
-
min-width: calc(var(--spacing) *
|
|
756
|
+
.min-w-5 {
|
|
757
|
+
min-width: calc(var(--spacing) * 5);
|
|
758
|
+
}
|
|
759
|
+
.min-w-14 {
|
|
760
|
+
min-width: calc(var(--spacing) * 14);
|
|
758
761
|
}
|
|
759
762
|
.min-w-\[8rem\] {
|
|
760
763
|
min-width: 8rem;
|
|
@@ -854,9 +857,6 @@
|
|
|
854
857
|
.resize {
|
|
855
858
|
resize: both;
|
|
856
859
|
}
|
|
857
|
-
.scrollbar-gutter-stable {
|
|
858
|
-
scrollbar-gutter: stable;
|
|
859
|
-
}
|
|
860
860
|
.list-none {
|
|
861
861
|
list-style-type: none;
|
|
862
862
|
}
|
|
@@ -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.",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"prepack": "npm run build"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@babel/core": "^7.29.
|
|
58
|
-
"@babel/preset-env": "^7.29.
|
|
59
|
-
"@babel/preset-react": "^7.
|
|
60
|
-
"@babel/preset-typescript": "^7.
|
|
57
|
+
"@babel/core": "^7.29.7",
|
|
58
|
+
"@babel/preset-env": "^7.29.7",
|
|
59
|
+
"@babel/preset-react": "^7.29.7",
|
|
60
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
61
61
|
"@eslint/config-array": "^0.23.5",
|
|
62
62
|
"@eslint/object-schema": "^3.0.5",
|
|
63
|
-
"@hookform/resolvers": "^5.
|
|
63
|
+
"@hookform/resolvers": "^5.4.0",
|
|
64
64
|
"@tailwindcss/postcss": "^4.3.0",
|
|
65
65
|
"@tailwindcss/vite": "^4.3.0",
|
|
66
66
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -68,22 +68,22 @@
|
|
|
68
68
|
"@testing-library/react": "^16.3.2",
|
|
69
69
|
"@testing-library/user-event": "^14.6.1",
|
|
70
70
|
"@types/jest": "^30.0.0",
|
|
71
|
-
"@types/node": "^25.
|
|
72
|
-
"@types/react": "^19.2.
|
|
71
|
+
"@types/node": "^25.9.1",
|
|
72
|
+
"@types/react": "^19.2.15",
|
|
73
73
|
"@types/react-dom": "^19.2.3",
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
75
|
-
"@typescript-eslint/parser": "^8.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
|
75
|
+
"@typescript-eslint/parser": "^8.60.0",
|
|
76
76
|
"autoprefixer": "^10.5.0",
|
|
77
77
|
"babel-jest": "^30.4.1",
|
|
78
78
|
"cross-env": "^10.1.0",
|
|
79
|
-
"eslint": "^10.
|
|
79
|
+
"eslint": "^10.4.1",
|
|
80
80
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
81
81
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
82
82
|
"identity-obj-proxy": "^3.0.0",
|
|
83
83
|
"jest": "^30.4.2",
|
|
84
84
|
"jest-environment-jsdom": "^30.4.1",
|
|
85
85
|
"react": "^19.2.6",
|
|
86
|
-
"react-day-picker": "^10.0.
|
|
86
|
+
"react-day-picker": "^10.0.1",
|
|
87
87
|
"react-dom": "^19.2.6",
|
|
88
88
|
"react-test-renderer": "^19.2.6",
|
|
89
89
|
"rimraf": "^6.1.3",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"tsup": "^8.5.1",
|
|
93
93
|
"typescript": "^6.0.3",
|
|
94
94
|
"vaul": "^1.1.2",
|
|
95
|
-
"vite": "^8.0.
|
|
96
|
-
"vite-plugin-dts": "^5.0.
|
|
95
|
+
"vite": "^8.0.14",
|
|
96
|
+
"vite-plugin-dts": "^5.0.1",
|
|
97
97
|
"vite-plugin-ts-alias": "^0.1.1",
|
|
98
98
|
"zod": "^4.4.3",
|
|
99
|
-
"@vitejs/plugin-react": "^6.0.
|
|
100
|
-
"@vitejs/plugin-react-swc": "^4.3.
|
|
99
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
100
|
+
"@vitejs/plugin-react-swc": "^4.3.1"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"react": ">=17.0.0 <21.0.0",
|
|
@@ -140,16 +140,16 @@
|
|
|
140
140
|
"clsx": "^2.1.1",
|
|
141
141
|
"cmdk": "^1.1.1",
|
|
142
142
|
"embla-carousel-react": "^8.6.0",
|
|
143
|
-
"framer-motion": "^12.
|
|
143
|
+
"framer-motion": "^12.40.0",
|
|
144
144
|
"input-otp": "^1.4.2",
|
|
145
|
-
"lucide-react": "^1.
|
|
145
|
+
"lucide-react": "^1.17.0",
|
|
146
146
|
"next-themes": "^0.4.6",
|
|
147
147
|
"react-dropzone": "^15.0.0",
|
|
148
148
|
"react-helmet-next": "^0.0.2",
|
|
149
|
-
"react-hook-form": "^7.
|
|
150
|
-
"react-resizable-panels": "^4.11.
|
|
149
|
+
"react-hook-form": "^7.76.1",
|
|
150
|
+
"react-resizable-panels": "^4.11.2",
|
|
151
151
|
"sonner": "^2.0.7",
|
|
152
|
-
"tailwind-merge": "^3.
|
|
152
|
+
"tailwind-merge": "^3.6.0",
|
|
153
153
|
"tailwind-variants": "^3.2.2",
|
|
154
154
|
"use-debounce": "^10.1.1",
|
|
155
155
|
"vaul": "^1.1.2"
|