shadcn-ui-react 0.7.18 → 0.7.20
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 +23 -19
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +23 -19
- package/dist/style.css +0 -18
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10609,7 +10609,7 @@ var Textarea = React49.forwardRef(
|
|
|
10609
10609
|
"disabled"
|
|
10610
10610
|
]);
|
|
10611
10611
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
10612
|
-
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition resize-y disabled:cursor-not-allowed disabled:opacity-50";
|
|
10612
|
+
const base = "block w-full py-2 bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition resize-y disabled:cursor-not-allowed disabled:opacity-50";
|
|
10613
10613
|
const textareaSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
10614
10614
|
const errorClass = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
10615
10615
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -11860,6 +11860,7 @@ function UiDate({
|
|
|
11860
11860
|
valueFormatPattern,
|
|
11861
11861
|
locale,
|
|
11862
11862
|
className,
|
|
11863
|
+
classNameDefault = true,
|
|
11863
11864
|
dateClassName,
|
|
11864
11865
|
labelClassName,
|
|
11865
11866
|
contentClassName,
|
|
@@ -11908,6 +11909,8 @@ function UiDate({
|
|
|
11908
11909
|
const maxDateTime = maxDate == null ? void 0 : maxDate.getTime();
|
|
11909
11910
|
const hasError = Boolean(invalid || errorMessage);
|
|
11910
11911
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
11912
|
+
const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
11913
|
+
const errorClass = hasError ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
11911
11914
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
11912
11915
|
const fromYear = (_a = minDate == null ? void 0 : minDate.getFullYear()) != null ? _a : currentYear - 100;
|
|
11913
11916
|
const toYear = (_b = maxDate == null ? void 0 : maxDate.getFullYear()) != null ? _b : currentYear + 50;
|
|
@@ -12021,6 +12024,7 @@ function UiDate({
|
|
|
12021
12024
|
const dateHeaderSelectTriggerClassName = "!h-8 !rounded-lg !border-transparent !bg-muted/60 !px-2 !text-xs !font-medium !shadow-none hover:!bg-muted focus-visible:!ring-1 focus-visible:!ring-ring";
|
|
12022
12025
|
const dateHeaderSelectContentClassName = "rounded-xl border-border/70 bg-popover shadow-lg";
|
|
12023
12026
|
const dateHeaderSelectItemClassName = "h-8 rounded-lg px-2 text-xs";
|
|
12027
|
+
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
|
|
12024
12028
|
const handleSelect = (date) => {
|
|
12025
12029
|
if (date && isDateOutsideRange(date, minDate, maxDate)) {
|
|
12026
12030
|
return;
|
|
@@ -12094,17 +12098,15 @@ function UiDate({
|
|
|
12094
12098
|
"data-empty": !selectedDate,
|
|
12095
12099
|
"aria-invalid": hasError || void 0,
|
|
12096
12100
|
"aria-describedby": errorMessage ? messageId : void 0,
|
|
12097
|
-
className: cn(
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
}),
|
|
12103
|
-
"h-10 w-full min-w-0 max-w-full shrink justify-between gap-2 rounded-xl text-left font-normal shadow-sm transition-colors hover:bg-accent/40",
|
|
12101
|
+
className: classNameDefault ? cn(
|
|
12102
|
+
base,
|
|
12103
|
+
formInputVariants[variant],
|
|
12104
|
+
inputSizeClass,
|
|
12105
|
+
"inline-flex w-full min-w-0 max-w-full shrink items-center justify-between gap-2 text-left font-normal",
|
|
12104
12106
|
"data-[empty=true]:text-muted-foreground",
|
|
12105
|
-
|
|
12107
|
+
errorClass,
|
|
12106
12108
|
className
|
|
12107
|
-
),
|
|
12109
|
+
) : className,
|
|
12108
12110
|
children: [
|
|
12109
12111
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
12110
12112
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react8.CalendarIcon, { className: "h-4 w-4 shrink-0 opacity-70" }),
|
|
@@ -12922,6 +12924,7 @@ function UiTime({
|
|
|
12922
12924
|
options,
|
|
12923
12925
|
hourCycle = "12",
|
|
12924
12926
|
className,
|
|
12927
|
+
classNameDefault = true,
|
|
12925
12928
|
timeClassName,
|
|
12926
12929
|
labelClassName,
|
|
12927
12930
|
contentClassName,
|
|
@@ -12942,6 +12945,7 @@ function UiTime({
|
|
|
12942
12945
|
const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
12943
12946
|
const messageId = `${triggerId}-message`;
|
|
12944
12947
|
const displayPattern = formatPattern != null ? formatPattern : resolveTimeFormat(timeFormat, "time12");
|
|
12948
|
+
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
|
|
12945
12949
|
const selectedTime = React53.useMemo(
|
|
12946
12950
|
() => parseTimeValue(value, valueFormat, valueFormatPattern, locale),
|
|
12947
12951
|
[value, valueFormat, valueFormatPattern, locale]
|
|
@@ -12968,6 +12972,8 @@ function UiTime({
|
|
|
12968
12972
|
const selectedMinutes = getTimeMinutes(selectedTime);
|
|
12969
12973
|
const hasError = Boolean(invalid || errorMessage);
|
|
12970
12974
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
12975
|
+
const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
12976
|
+
const errorClass = hasError ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
12971
12977
|
const listOptions = React53.useMemo(
|
|
12972
12978
|
() => (options == null ? void 0 : options.length) ? options : buildListOptions({
|
|
12973
12979
|
minuteStep,
|
|
@@ -13066,17 +13072,15 @@ function UiTime({
|
|
|
13066
13072
|
"data-empty": !selectedTime,
|
|
13067
13073
|
"aria-invalid": hasError || void 0,
|
|
13068
13074
|
"aria-describedby": errorMessage ? messageId : void 0,
|
|
13069
|
-
className: cn(
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
}),
|
|
13075
|
-
"w-full min-w-0 max-w-full shrink justify-between gap-2 text-left font-normal",
|
|
13075
|
+
className: classNameDefault ? cn(
|
|
13076
|
+
base,
|
|
13077
|
+
formInputVariants[variant],
|
|
13078
|
+
inputSizeClass,
|
|
13079
|
+
"inline-flex w-full min-w-0 max-w-full shrink items-center justify-between gap-2 text-left font-normal",
|
|
13076
13080
|
"data-[empty=true]:text-muted-foreground",
|
|
13077
|
-
|
|
13081
|
+
errorClass,
|
|
13078
13082
|
className
|
|
13079
|
-
),
|
|
13083
|
+
) : className,
|
|
13080
13084
|
children: [
|
|
13081
13085
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
13082
13086
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react10.ClockIcon, { className: "h-4 w-4 shrink-0 opacity-70" }),
|
package/dist/index.d.cts
CHANGED
|
@@ -1033,7 +1033,7 @@ type CustomFormDateProps<TFieldValues extends FieldValues, TName extends FieldPa
|
|
|
1033
1033
|
onChangeValue?: (value: Date | string | null) => void;
|
|
1034
1034
|
size?: SizeProps;
|
|
1035
1035
|
customSize?: CustomSize;
|
|
1036
|
-
variant?:
|
|
1036
|
+
variant?: VariantProps;
|
|
1037
1037
|
className?: string;
|
|
1038
1038
|
itemClassName?: string;
|
|
1039
1039
|
contentClassName?: string;
|
|
@@ -1231,6 +1231,7 @@ interface UiTimeProps {
|
|
|
1231
1231
|
options?: UiTimeOption[];
|
|
1232
1232
|
hourCycle?: HourCycle$1;
|
|
1233
1233
|
className?: string;
|
|
1234
|
+
classNameDefault?: boolean;
|
|
1234
1235
|
timeClassName?: string;
|
|
1235
1236
|
labelClassName?: string;
|
|
1236
1237
|
contentClassName?: string;
|
|
@@ -1239,14 +1240,14 @@ interface UiTimeProps {
|
|
|
1239
1240
|
requiredLabelClassName?: string;
|
|
1240
1241
|
size?: SizeProps;
|
|
1241
1242
|
customSize?: CustomSize;
|
|
1242
|
-
variant?:
|
|
1243
|
+
variant?: VariantProps;
|
|
1243
1244
|
errorMessage?: string;
|
|
1244
1245
|
invalid?: boolean;
|
|
1245
1246
|
htmlFormItemId?: string;
|
|
1246
1247
|
contentAlign?: "start" | "center" | "end";
|
|
1247
1248
|
contentSideOffset?: number;
|
|
1248
1249
|
}
|
|
1249
|
-
declare function UiTime({ label, placeholder, value, onChange, onBlur, disabled, requiredLabel, timeFormat, valueFormat, formatPattern, valueFormatPattern, locale, minuteStep, minTime, maxTime, options, hourCycle, className, timeClassName, labelClassName, contentClassName, optionClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiTimeProps): react_jsx_runtime.JSX.Element;
|
|
1250
|
+
declare function UiTime({ label, placeholder, value, onChange, onBlur, disabled, requiredLabel, timeFormat, valueFormat, formatPattern, valueFormatPattern, locale, minuteStep, minTime, maxTime, options, hourCycle, className, classNameDefault, timeClassName, labelClassName, contentClassName, optionClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiTimeProps): react_jsx_runtime.JSX.Element;
|
|
1250
1251
|
declare namespace UiTime {
|
|
1251
1252
|
var displayName: string;
|
|
1252
1253
|
}
|
|
@@ -1287,7 +1288,7 @@ type CustomFormTimeProps<TFieldValues extends FieldValues, TName extends FieldPa
|
|
|
1287
1288
|
onChangeValue?: (value: Date | string | null) => void;
|
|
1288
1289
|
size?: SizeProps;
|
|
1289
1290
|
customSize?: CustomSize;
|
|
1290
|
-
variant?:
|
|
1291
|
+
variant?: VariantProps;
|
|
1291
1292
|
className?: string;
|
|
1292
1293
|
itemClassName?: string;
|
|
1293
1294
|
contentClassName?: string;
|
|
@@ -1793,6 +1794,7 @@ interface UiDateProps {
|
|
|
1793
1794
|
valueFormatPattern?: string;
|
|
1794
1795
|
locale?: Locale | null;
|
|
1795
1796
|
className?: string;
|
|
1797
|
+
classNameDefault?: boolean;
|
|
1796
1798
|
dateClassName?: string;
|
|
1797
1799
|
labelClassName?: string;
|
|
1798
1800
|
contentClassName?: string;
|
|
@@ -1800,14 +1802,14 @@ interface UiDateProps {
|
|
|
1800
1802
|
requiredLabelClassName?: string;
|
|
1801
1803
|
size?: SizeProps;
|
|
1802
1804
|
customSize?: CustomSize;
|
|
1803
|
-
variant?:
|
|
1805
|
+
variant?: VariantProps;
|
|
1804
1806
|
errorMessage?: string;
|
|
1805
1807
|
invalid?: boolean;
|
|
1806
1808
|
htmlFormItemId?: string;
|
|
1807
1809
|
contentAlign?: "start" | "center" | "end";
|
|
1808
1810
|
contentSideOffset?: number;
|
|
1809
1811
|
}
|
|
1810
|
-
declare function UiDate({ label, placeholder, value, defaultMonth, onChange, onBlur, disabled, requiredLabel, start_date, end_date, startDate, endDate, dateFormat, valueFormat, formatPattern, valueFormatPattern, locale, className, dateClassName, labelClassName, contentClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiDateProps): react_jsx_runtime.JSX.Element;
|
|
1812
|
+
declare function UiDate({ label, placeholder, value, defaultMonth, onChange, onBlur, disabled, requiredLabel, start_date, end_date, startDate, endDate, dateFormat, valueFormat, formatPattern, valueFormatPattern, locale, className, classNameDefault, dateClassName, labelClassName, contentClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiDateProps): react_jsx_runtime.JSX.Element;
|
|
1811
1813
|
declare namespace UiDate {
|
|
1812
1814
|
var displayName: string;
|
|
1813
1815
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1033,7 +1033,7 @@ type CustomFormDateProps<TFieldValues extends FieldValues, TName extends FieldPa
|
|
|
1033
1033
|
onChangeValue?: (value: Date | string | null) => void;
|
|
1034
1034
|
size?: SizeProps;
|
|
1035
1035
|
customSize?: CustomSize;
|
|
1036
|
-
variant?:
|
|
1036
|
+
variant?: VariantProps;
|
|
1037
1037
|
className?: string;
|
|
1038
1038
|
itemClassName?: string;
|
|
1039
1039
|
contentClassName?: string;
|
|
@@ -1231,6 +1231,7 @@ interface UiTimeProps {
|
|
|
1231
1231
|
options?: UiTimeOption[];
|
|
1232
1232
|
hourCycle?: HourCycle$1;
|
|
1233
1233
|
className?: string;
|
|
1234
|
+
classNameDefault?: boolean;
|
|
1234
1235
|
timeClassName?: string;
|
|
1235
1236
|
labelClassName?: string;
|
|
1236
1237
|
contentClassName?: string;
|
|
@@ -1239,14 +1240,14 @@ interface UiTimeProps {
|
|
|
1239
1240
|
requiredLabelClassName?: string;
|
|
1240
1241
|
size?: SizeProps;
|
|
1241
1242
|
customSize?: CustomSize;
|
|
1242
|
-
variant?:
|
|
1243
|
+
variant?: VariantProps;
|
|
1243
1244
|
errorMessage?: string;
|
|
1244
1245
|
invalid?: boolean;
|
|
1245
1246
|
htmlFormItemId?: string;
|
|
1246
1247
|
contentAlign?: "start" | "center" | "end";
|
|
1247
1248
|
contentSideOffset?: number;
|
|
1248
1249
|
}
|
|
1249
|
-
declare function UiTime({ label, placeholder, value, onChange, onBlur, disabled, requiredLabel, timeFormat, valueFormat, formatPattern, valueFormatPattern, locale, minuteStep, minTime, maxTime, options, hourCycle, className, timeClassName, labelClassName, contentClassName, optionClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiTimeProps): react_jsx_runtime.JSX.Element;
|
|
1250
|
+
declare function UiTime({ label, placeholder, value, onChange, onBlur, disabled, requiredLabel, timeFormat, valueFormat, formatPattern, valueFormatPattern, locale, minuteStep, minTime, maxTime, options, hourCycle, className, classNameDefault, timeClassName, labelClassName, contentClassName, optionClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiTimeProps): react_jsx_runtime.JSX.Element;
|
|
1250
1251
|
declare namespace UiTime {
|
|
1251
1252
|
var displayName: string;
|
|
1252
1253
|
}
|
|
@@ -1287,7 +1288,7 @@ type CustomFormTimeProps<TFieldValues extends FieldValues, TName extends FieldPa
|
|
|
1287
1288
|
onChangeValue?: (value: Date | string | null) => void;
|
|
1288
1289
|
size?: SizeProps;
|
|
1289
1290
|
customSize?: CustomSize;
|
|
1290
|
-
variant?:
|
|
1291
|
+
variant?: VariantProps;
|
|
1291
1292
|
className?: string;
|
|
1292
1293
|
itemClassName?: string;
|
|
1293
1294
|
contentClassName?: string;
|
|
@@ -1793,6 +1794,7 @@ interface UiDateProps {
|
|
|
1793
1794
|
valueFormatPattern?: string;
|
|
1794
1795
|
locale?: Locale | null;
|
|
1795
1796
|
className?: string;
|
|
1797
|
+
classNameDefault?: boolean;
|
|
1796
1798
|
dateClassName?: string;
|
|
1797
1799
|
labelClassName?: string;
|
|
1798
1800
|
contentClassName?: string;
|
|
@@ -1800,14 +1802,14 @@ interface UiDateProps {
|
|
|
1800
1802
|
requiredLabelClassName?: string;
|
|
1801
1803
|
size?: SizeProps;
|
|
1802
1804
|
customSize?: CustomSize;
|
|
1803
|
-
variant?:
|
|
1805
|
+
variant?: VariantProps;
|
|
1804
1806
|
errorMessage?: string;
|
|
1805
1807
|
invalid?: boolean;
|
|
1806
1808
|
htmlFormItemId?: string;
|
|
1807
1809
|
contentAlign?: "start" | "center" | "end";
|
|
1808
1810
|
contentSideOffset?: number;
|
|
1809
1811
|
}
|
|
1810
|
-
declare function UiDate({ label, placeholder, value, defaultMonth, onChange, onBlur, disabled, requiredLabel, start_date, end_date, startDate, endDate, dateFormat, valueFormat, formatPattern, valueFormatPattern, locale, className, dateClassName, labelClassName, contentClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiDateProps): react_jsx_runtime.JSX.Element;
|
|
1812
|
+
declare function UiDate({ label, placeholder, value, defaultMonth, onChange, onBlur, disabled, requiredLabel, start_date, end_date, startDate, endDate, dateFormat, valueFormat, formatPattern, valueFormatPattern, locale, className, classNameDefault, dateClassName, labelClassName, contentClassName, messageClassName, requiredLabelClassName, size, customSize, variant, errorMessage, invalid, htmlFormItemId, contentAlign, contentSideOffset, }: UiDateProps): react_jsx_runtime.JSX.Element;
|
|
1811
1813
|
declare namespace UiDate {
|
|
1812
1814
|
var displayName: string;
|
|
1813
1815
|
}
|
package/dist/index.js
CHANGED
|
@@ -10330,7 +10330,7 @@ var Textarea = React49.forwardRef(
|
|
|
10330
10330
|
"disabled"
|
|
10331
10331
|
]);
|
|
10332
10332
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
10333
|
-
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition resize-y disabled:cursor-not-allowed disabled:opacity-50";
|
|
10333
|
+
const base = "block w-full py-2 bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition resize-y disabled:cursor-not-allowed disabled:opacity-50";
|
|
10334
10334
|
const textareaSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
10335
10335
|
const errorClass = invalid ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
10336
10336
|
return /* @__PURE__ */ jsx27(
|
|
@@ -11590,6 +11590,7 @@ function UiDate({
|
|
|
11590
11590
|
valueFormatPattern,
|
|
11591
11591
|
locale,
|
|
11592
11592
|
className,
|
|
11593
|
+
classNameDefault = true,
|
|
11593
11594
|
dateClassName,
|
|
11594
11595
|
labelClassName,
|
|
11595
11596
|
contentClassName,
|
|
@@ -11638,6 +11639,8 @@ function UiDate({
|
|
|
11638
11639
|
const maxDateTime = maxDate == null ? void 0 : maxDate.getTime();
|
|
11639
11640
|
const hasError = Boolean(invalid || errorMessage);
|
|
11640
11641
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
11642
|
+
const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
11643
|
+
const errorClass = hasError ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
11641
11644
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
11642
11645
|
const fromYear = (_a = minDate == null ? void 0 : minDate.getFullYear()) != null ? _a : currentYear - 100;
|
|
11643
11646
|
const toYear = (_b = maxDate == null ? void 0 : maxDate.getFullYear()) != null ? _b : currentYear + 50;
|
|
@@ -11751,6 +11754,7 @@ function UiDate({
|
|
|
11751
11754
|
const dateHeaderSelectTriggerClassName = "!h-8 !rounded-lg !border-transparent !bg-muted/60 !px-2 !text-xs !font-medium !shadow-none hover:!bg-muted focus-visible:!ring-1 focus-visible:!ring-ring";
|
|
11752
11755
|
const dateHeaderSelectContentClassName = "rounded-xl border-border/70 bg-popover shadow-lg";
|
|
11753
11756
|
const dateHeaderSelectItemClassName = "h-8 rounded-lg px-2 text-xs";
|
|
11757
|
+
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
|
|
11754
11758
|
const handleSelect = (date) => {
|
|
11755
11759
|
if (date && isDateOutsideRange(date, minDate, maxDate)) {
|
|
11756
11760
|
return;
|
|
@@ -11824,17 +11828,15 @@ function UiDate({
|
|
|
11824
11828
|
"data-empty": !selectedDate,
|
|
11825
11829
|
"aria-invalid": hasError || void 0,
|
|
11826
11830
|
"aria-describedby": errorMessage ? messageId : void 0,
|
|
11827
|
-
className: cn(
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
}),
|
|
11833
|
-
"h-10 w-full min-w-0 max-w-full shrink justify-between gap-2 rounded-xl text-left font-normal shadow-sm transition-colors hover:bg-accent/40",
|
|
11831
|
+
className: classNameDefault ? cn(
|
|
11832
|
+
base,
|
|
11833
|
+
formInputVariants[variant],
|
|
11834
|
+
inputSizeClass,
|
|
11835
|
+
"inline-flex w-full min-w-0 max-w-full shrink items-center justify-between gap-2 text-left font-normal",
|
|
11834
11836
|
"data-[empty=true]:text-muted-foreground",
|
|
11835
|
-
|
|
11837
|
+
errorClass,
|
|
11836
11838
|
className
|
|
11837
|
-
),
|
|
11839
|
+
) : className,
|
|
11838
11840
|
children: [
|
|
11839
11841
|
/* @__PURE__ */ jsxs19("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
11840
11842
|
/* @__PURE__ */ jsx31(CalendarIcon, { className: "h-4 w-4 shrink-0 opacity-70" }),
|
|
@@ -12660,6 +12662,7 @@ function UiTime({
|
|
|
12660
12662
|
options,
|
|
12661
12663
|
hourCycle = "12",
|
|
12662
12664
|
className,
|
|
12665
|
+
classNameDefault = true,
|
|
12663
12666
|
timeClassName,
|
|
12664
12667
|
labelClassName,
|
|
12665
12668
|
contentClassName,
|
|
@@ -12680,6 +12683,7 @@ function UiTime({
|
|
|
12680
12683
|
const triggerId = htmlFormItemId != null ? htmlFormItemId : generatedId;
|
|
12681
12684
|
const messageId = `${triggerId}-message`;
|
|
12682
12685
|
const displayPattern = formatPattern != null ? formatPattern : resolveTimeFormat(timeFormat, "time12");
|
|
12686
|
+
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:cursor-not-allowed disabled:opacity-50";
|
|
12683
12687
|
const selectedTime = React53.useMemo(
|
|
12684
12688
|
() => parseTimeValue(value, valueFormat, valueFormatPattern, locale),
|
|
12685
12689
|
[value, valueFormat, valueFormatPattern, locale]
|
|
@@ -12706,6 +12710,8 @@ function UiTime({
|
|
|
12706
12710
|
const selectedMinutes = getTimeMinutes(selectedTime);
|
|
12707
12711
|
const hasError = Boolean(invalid || errorMessage);
|
|
12708
12712
|
const sizeClasses = getFormSizeClasses(size, customSize);
|
|
12713
|
+
const inputSizeClass = variant === "flushed" ? sizeClasses.flushedControl : variant === "link" ? sizeClasses.linkControl : sizeClasses.control;
|
|
12714
|
+
const errorClass = hasError ? "border-destructive focus:border-destructive focus:ring-destructive/20" : "";
|
|
12709
12715
|
const listOptions = React53.useMemo(
|
|
12710
12716
|
() => (options == null ? void 0 : options.length) ? options : buildListOptions({
|
|
12711
12717
|
minuteStep,
|
|
@@ -12804,17 +12810,15 @@ function UiTime({
|
|
|
12804
12810
|
"data-empty": !selectedTime,
|
|
12805
12811
|
"aria-invalid": hasError || void 0,
|
|
12806
12812
|
"aria-describedby": errorMessage ? messageId : void 0,
|
|
12807
|
-
className: cn(
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
}),
|
|
12813
|
-
"w-full min-w-0 max-w-full shrink justify-between gap-2 text-left font-normal",
|
|
12813
|
+
className: classNameDefault ? cn(
|
|
12814
|
+
base,
|
|
12815
|
+
formInputVariants[variant],
|
|
12816
|
+
inputSizeClass,
|
|
12817
|
+
"inline-flex w-full min-w-0 max-w-full shrink items-center justify-between gap-2 text-left font-normal",
|
|
12814
12818
|
"data-[empty=true]:text-muted-foreground",
|
|
12815
|
-
|
|
12819
|
+
errorClass,
|
|
12816
12820
|
className
|
|
12817
|
-
),
|
|
12821
|
+
) : className,
|
|
12818
12822
|
children: [
|
|
12819
12823
|
/* @__PURE__ */ jsxs21("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
12820
12824
|
/* @__PURE__ */ jsx33(ClockIcon, { className: "h-4 w-4 shrink-0 opacity-70" }),
|
package/dist/style.css
CHANGED
|
@@ -2508,16 +2508,6 @@
|
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
.hover\:bg-accent\/40 {
|
|
2512
|
-
&:hover {
|
|
2513
|
-
@media (hover: hover) {
|
|
2514
|
-
background-color: var(--accent);
|
|
2515
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2516
|
-
background-color: color-mix(in oklab, var(--accent) 40%, transparent);
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
2511
|
.hover\:bg-accent\/70 {
|
|
2522
2512
|
&:hover {
|
|
2523
2513
|
@media (hover: hover) {
|
|
@@ -3112,14 +3102,6 @@
|
|
|
3112
3102
|
}
|
|
3113
3103
|
}
|
|
3114
3104
|
}
|
|
3115
|
-
.focus-visible\:ring-destructive\/30 {
|
|
3116
|
-
&:focus-visible {
|
|
3117
|
-
--tw-ring-color: var(--destructive);
|
|
3118
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3119
|
-
--tw-ring-color: color-mix(in oklab, var(--destructive) 30%, transparent);
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
3105
|
.focus-visible\:ring-emerald-500\/40 {
|
|
3124
3106
|
&:focus-visible {
|
|
3125
3107
|
--tw-ring-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 40%, transparent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-ui-react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.20",
|
|
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.",
|