shadcn-ui-react 0.5.0 → 0.5.1
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/README.md +141 -31
- package/dist/index.cjs +346 -28
- package/dist/index.d.cts +70 -40
- package/dist/index.d.ts +70 -40
- package/dist/index.js +344 -28
- package/dist/style.css +30 -17
- package/package.json +16 -16
package/dist/index.cjs
CHANGED
|
@@ -239,7 +239,7 @@ __export(index_exports, {
|
|
|
239
239
|
SelectSeparator: () => SelectSeparator,
|
|
240
240
|
SelectTrigger: () => SelectTrigger,
|
|
241
241
|
SelectValue: () => SelectValue,
|
|
242
|
-
Separator: () =>
|
|
242
|
+
Separator: () => Separator6,
|
|
243
243
|
Sheet: () => Sheet,
|
|
244
244
|
SheetClose: () => SheetClose,
|
|
245
245
|
SheetContent: () => SheetContent,
|
|
@@ -281,6 +281,8 @@ __export(index_exports, {
|
|
|
281
281
|
TooltipContent: () => TooltipContent,
|
|
282
282
|
TooltipProvider: () => TooltipProvider,
|
|
283
283
|
TooltipTrigger: () => TooltipTrigger,
|
|
284
|
+
UiInput: () => UiInput,
|
|
285
|
+
UiSelect: () => UiSelect,
|
|
284
286
|
badgeVariants: () => badgeVariants,
|
|
285
287
|
buttonVariants: () => buttonVariants,
|
|
286
288
|
cn: () => cn,
|
|
@@ -3899,6 +3901,148 @@ function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false)
|
|
|
3899
3901
|
});
|
|
3900
3902
|
}
|
|
3901
3903
|
|
|
3904
|
+
// node_modules/react-day-picker/dist/esm/noonDateLib.js
|
|
3905
|
+
function createNoonOverrides(timeZone, options = {}) {
|
|
3906
|
+
var _a, _b;
|
|
3907
|
+
const { weekStartsOn, locale } = options;
|
|
3908
|
+
const fallbackWeekStartsOn = (_b = weekStartsOn != null ? weekStartsOn : (_a = locale == null ? void 0 : locale.options) == null ? void 0 : _a.weekStartsOn) != null ? _b : 0;
|
|
3909
|
+
const toNoonTZDate = (date) => {
|
|
3910
|
+
const normalizedDate = typeof date === "number" || typeof date === "string" ? new Date(date) : date;
|
|
3911
|
+
return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
|
|
3912
|
+
};
|
|
3913
|
+
const toCalendarDate = (date) => {
|
|
3914
|
+
const zoned = toNoonTZDate(date);
|
|
3915
|
+
return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);
|
|
3916
|
+
};
|
|
3917
|
+
return {
|
|
3918
|
+
today: () => {
|
|
3919
|
+
return toNoonTZDate(TZDate.tz(timeZone));
|
|
3920
|
+
},
|
|
3921
|
+
newDate: (year, monthIndex, date) => {
|
|
3922
|
+
return new TZDate(year, monthIndex, date, 12, 0, 0, timeZone);
|
|
3923
|
+
},
|
|
3924
|
+
startOfDay: (date) => {
|
|
3925
|
+
return toNoonTZDate(date);
|
|
3926
|
+
},
|
|
3927
|
+
startOfWeek: (date, options2) => {
|
|
3928
|
+
var _a2;
|
|
3929
|
+
const base = toNoonTZDate(date);
|
|
3930
|
+
const weekStartsOnValue = (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn;
|
|
3931
|
+
const diff = (base.getDay() - weekStartsOnValue + 7) % 7;
|
|
3932
|
+
base.setDate(base.getDate() - diff);
|
|
3933
|
+
return base;
|
|
3934
|
+
},
|
|
3935
|
+
startOfISOWeek: (date) => {
|
|
3936
|
+
const base = toNoonTZDate(date);
|
|
3937
|
+
const diff = (base.getDay() - 1 + 7) % 7;
|
|
3938
|
+
base.setDate(base.getDate() - diff);
|
|
3939
|
+
return base;
|
|
3940
|
+
},
|
|
3941
|
+
startOfMonth: (date) => {
|
|
3942
|
+
const base = toNoonTZDate(date);
|
|
3943
|
+
base.setDate(1);
|
|
3944
|
+
return base;
|
|
3945
|
+
},
|
|
3946
|
+
startOfYear: (date) => {
|
|
3947
|
+
const base = toNoonTZDate(date);
|
|
3948
|
+
base.setMonth(0, 1);
|
|
3949
|
+
return base;
|
|
3950
|
+
},
|
|
3951
|
+
endOfWeek: (date, options2) => {
|
|
3952
|
+
var _a2;
|
|
3953
|
+
const base = toNoonTZDate(date);
|
|
3954
|
+
const weekStartsOnValue = (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn;
|
|
3955
|
+
const endDow = (weekStartsOnValue + 6) % 7;
|
|
3956
|
+
const diff = (endDow - base.getDay() + 7) % 7;
|
|
3957
|
+
base.setDate(base.getDate() + diff);
|
|
3958
|
+
return base;
|
|
3959
|
+
},
|
|
3960
|
+
endOfISOWeek: (date) => {
|
|
3961
|
+
const base = toNoonTZDate(date);
|
|
3962
|
+
const diff = (7 - base.getDay()) % 7;
|
|
3963
|
+
base.setDate(base.getDate() + diff);
|
|
3964
|
+
return base;
|
|
3965
|
+
},
|
|
3966
|
+
endOfMonth: (date) => {
|
|
3967
|
+
const base = toNoonTZDate(date);
|
|
3968
|
+
base.setMonth(base.getMonth() + 1, 0);
|
|
3969
|
+
return base;
|
|
3970
|
+
},
|
|
3971
|
+
endOfYear: (date) => {
|
|
3972
|
+
const base = toNoonTZDate(date);
|
|
3973
|
+
base.setMonth(11, 31);
|
|
3974
|
+
return base;
|
|
3975
|
+
},
|
|
3976
|
+
eachMonthOfInterval: (interval) => {
|
|
3977
|
+
const start = toNoonTZDate(interval.start);
|
|
3978
|
+
const end = toNoonTZDate(interval.end);
|
|
3979
|
+
const result = [];
|
|
3980
|
+
const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);
|
|
3981
|
+
const endKey = end.getFullYear() * 12 + end.getMonth();
|
|
3982
|
+
while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {
|
|
3983
|
+
result.push(new TZDate(cursor, timeZone));
|
|
3984
|
+
cursor.setMonth(cursor.getMonth() + 1, 1);
|
|
3985
|
+
}
|
|
3986
|
+
return result;
|
|
3987
|
+
},
|
|
3988
|
+
// Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
|
|
3989
|
+
// mutate the same TZDate, and return it.
|
|
3990
|
+
addDays: (date, amount) => {
|
|
3991
|
+
const base = toNoonTZDate(date);
|
|
3992
|
+
base.setDate(base.getDate() + amount);
|
|
3993
|
+
return base;
|
|
3994
|
+
},
|
|
3995
|
+
addWeeks: (date, amount) => {
|
|
3996
|
+
const base = toNoonTZDate(date);
|
|
3997
|
+
base.setDate(base.getDate() + amount * 7);
|
|
3998
|
+
return base;
|
|
3999
|
+
},
|
|
4000
|
+
addMonths: (date, amount) => {
|
|
4001
|
+
const base = toNoonTZDate(date);
|
|
4002
|
+
base.setMonth(base.getMonth() + amount);
|
|
4003
|
+
return base;
|
|
4004
|
+
},
|
|
4005
|
+
addYears: (date, amount) => {
|
|
4006
|
+
const base = toNoonTZDate(date);
|
|
4007
|
+
base.setFullYear(base.getFullYear() + amount);
|
|
4008
|
+
return base;
|
|
4009
|
+
},
|
|
4010
|
+
eachYearOfInterval: (interval) => {
|
|
4011
|
+
const start = toNoonTZDate(interval.start);
|
|
4012
|
+
const end = toNoonTZDate(interval.end);
|
|
4013
|
+
const years = [];
|
|
4014
|
+
const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);
|
|
4015
|
+
while (cursor.getFullYear() <= end.getFullYear()) {
|
|
4016
|
+
years.push(new TZDate(cursor, timeZone));
|
|
4017
|
+
cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);
|
|
4018
|
+
}
|
|
4019
|
+
return years;
|
|
4020
|
+
},
|
|
4021
|
+
getWeek: (date, options2) => {
|
|
4022
|
+
var _a2, _b2, _c, _d;
|
|
4023
|
+
const base = toCalendarDate(date);
|
|
4024
|
+
return getWeek(base, {
|
|
4025
|
+
weekStartsOn: (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn,
|
|
4026
|
+
firstWeekContainsDate: (_d = (_c = options2 == null ? void 0 : options2.firstWeekContainsDate) != null ? _c : (_b2 = locale == null ? void 0 : locale.options) == null ? void 0 : _b2.firstWeekContainsDate) != null ? _d : 1
|
|
4027
|
+
});
|
|
4028
|
+
},
|
|
4029
|
+
getISOWeek: (date) => {
|
|
4030
|
+
const base = toCalendarDate(date);
|
|
4031
|
+
return getISOWeek(base);
|
|
4032
|
+
},
|
|
4033
|
+
differenceInCalendarDays: (dateLeft, dateRight) => {
|
|
4034
|
+
const left = toCalendarDate(dateLeft);
|
|
4035
|
+
const right = toCalendarDate(dateRight);
|
|
4036
|
+
return differenceInCalendarDays(left, right);
|
|
4037
|
+
},
|
|
4038
|
+
differenceInCalendarMonths: (dateLeft, dateRight) => {
|
|
4039
|
+
const left = toCalendarDate(dateLeft);
|
|
4040
|
+
const right = toCalendarDate(dateRight);
|
|
4041
|
+
return differenceInCalendarMonths(left, right);
|
|
4042
|
+
}
|
|
4043
|
+
};
|
|
4044
|
+
}
|
|
4045
|
+
|
|
3902
4046
|
// node_modules/react-day-picker/dist/esm/useAnimation.js
|
|
3903
4047
|
var import_react28 = require("react");
|
|
3904
4048
|
var asHtmlElement = (element) => {
|
|
@@ -4692,15 +4836,22 @@ function toTimeZone(date, timeZone) {
|
|
|
4692
4836
|
}
|
|
4693
4837
|
|
|
4694
4838
|
// node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
|
|
4695
|
-
function
|
|
4839
|
+
function toZoneNoon(date, timeZone, noonSafe) {
|
|
4840
|
+
if (!noonSafe)
|
|
4841
|
+
return toTimeZone(date, timeZone);
|
|
4842
|
+
const zoned = toTimeZone(date, timeZone);
|
|
4843
|
+
const noonZoned = new TZDate(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, timeZone);
|
|
4844
|
+
return new Date(noonZoned.getTime());
|
|
4845
|
+
}
|
|
4846
|
+
function convertMatcher(matcher, timeZone, noonSafe) {
|
|
4696
4847
|
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
4697
4848
|
return matcher;
|
|
4698
4849
|
}
|
|
4699
4850
|
if (matcher instanceof Date) {
|
|
4700
|
-
return
|
|
4851
|
+
return toZoneNoon(matcher, timeZone, noonSafe);
|
|
4701
4852
|
}
|
|
4702
4853
|
if (Array.isArray(matcher)) {
|
|
4703
|
-
return matcher.map((value) => value instanceof Date ?
|
|
4854
|
+
return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone, noonSafe) : value);
|
|
4704
4855
|
}
|
|
4705
4856
|
if (isDateRange(matcher)) {
|
|
4706
4857
|
return __spreadProps(__spreadValues({}, matcher), {
|
|
@@ -4710,30 +4861,30 @@ function convertMatcher(matcher, timeZone) {
|
|
|
4710
4861
|
}
|
|
4711
4862
|
if (isDateInterval(matcher)) {
|
|
4712
4863
|
return {
|
|
4713
|
-
before:
|
|
4714
|
-
after:
|
|
4864
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe),
|
|
4865
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
4715
4866
|
};
|
|
4716
4867
|
}
|
|
4717
4868
|
if (isDateAfterType(matcher)) {
|
|
4718
4869
|
return {
|
|
4719
|
-
after:
|
|
4870
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
4720
4871
|
};
|
|
4721
4872
|
}
|
|
4722
4873
|
if (isDateBeforeType(matcher)) {
|
|
4723
4874
|
return {
|
|
4724
|
-
before:
|
|
4875
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe)
|
|
4725
4876
|
};
|
|
4726
4877
|
}
|
|
4727
4878
|
return matcher;
|
|
4728
4879
|
}
|
|
4729
|
-
function convertMatchersToTimeZone(matchers, timeZone) {
|
|
4880
|
+
function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
|
|
4730
4881
|
if (!matchers) {
|
|
4731
4882
|
return matchers;
|
|
4732
4883
|
}
|
|
4733
4884
|
if (Array.isArray(matchers)) {
|
|
4734
|
-
return matchers.map((matcher) => convertMatcher(matcher, timeZone));
|
|
4885
|
+
return matchers.map((matcher) => convertMatcher(matcher, timeZone, noonSafe));
|
|
4735
4886
|
}
|
|
4736
|
-
return convertMatcher(matchers, timeZone);
|
|
4887
|
+
return convertMatcher(matchers, timeZone, noonSafe);
|
|
4737
4888
|
}
|
|
4738
4889
|
|
|
4739
4890
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
@@ -4786,16 +4937,23 @@ function DayPicker(initialProps) {
|
|
|
4786
4937
|
}
|
|
4787
4938
|
}
|
|
4788
4939
|
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = (0, import_react32.useMemo)(() => {
|
|
4940
|
+
var _a2;
|
|
4789
4941
|
const locale2 = __spreadValues(__spreadValues({}, enUS2), props.locale);
|
|
4942
|
+
const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;
|
|
4943
|
+
const noonOverrides = props.noonSafe && props.timeZone ? createNoonOverrides(props.timeZone, {
|
|
4944
|
+
weekStartsOn,
|
|
4945
|
+
locale: locale2
|
|
4946
|
+
}) : void 0;
|
|
4947
|
+
const overrides = props.dateLib && noonOverrides ? __spreadValues(__spreadValues({}, noonOverrides), props.dateLib) : (_a2 = props.dateLib) != null ? _a2 : noonOverrides;
|
|
4790
4948
|
const dateLib2 = new DateLib({
|
|
4791
4949
|
locale: locale2,
|
|
4792
|
-
weekStartsOn
|
|
4950
|
+
weekStartsOn,
|
|
4793
4951
|
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
4794
4952
|
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
4795
4953
|
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
4796
4954
|
timeZone: props.timeZone,
|
|
4797
4955
|
numerals: props.numerals
|
|
4798
|
-
},
|
|
4956
|
+
}, overrides);
|
|
4799
4957
|
return {
|
|
4800
4958
|
dateLib: dateLib2,
|
|
4801
4959
|
components: getComponents(props.components),
|
|
@@ -4814,6 +4972,7 @@ function DayPicker(initialProps) {
|
|
|
4814
4972
|
props.timeZone,
|
|
4815
4973
|
props.numerals,
|
|
4816
4974
|
props.dateLib,
|
|
4975
|
+
props.noonSafe,
|
|
4817
4976
|
props.components,
|
|
4818
4977
|
props.formatters,
|
|
4819
4978
|
props.labels,
|
|
@@ -6073,7 +6232,7 @@ var Input = React41.forwardRef(
|
|
|
6073
6232
|
]);
|
|
6074
6233
|
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:opacity-50 disabled:cursor-not-allowed";
|
|
6075
6234
|
const sizeCls = size === "sm" ? "h-9 px-3 text-sm" : size === "lg" ? "h-12 px-5 text-base" : "h-11 px-4 text-sm";
|
|
6076
|
-
const
|
|
6235
|
+
const variants4 = {
|
|
6077
6236
|
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
6078
6237
|
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
6079
6238
|
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
@@ -6116,7 +6275,7 @@ var Input = React41.forwardRef(
|
|
|
6116
6275
|
disabled,
|
|
6117
6276
|
className: classNameDefault ? cn(
|
|
6118
6277
|
base,
|
|
6119
|
-
|
|
6278
|
+
variants4[variant],
|
|
6120
6279
|
variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
|
|
6121
6280
|
errorCls,
|
|
6122
6281
|
iconPadLeft,
|
|
@@ -6223,7 +6382,7 @@ var FormField = (_a) => {
|
|
|
6223
6382
|
import_lucide_react2.Asterisk,
|
|
6224
6383
|
{
|
|
6225
6384
|
className: cn(
|
|
6226
|
-
"ml-
|
|
6385
|
+
"ml-px h-3 w-3 text-red-500",
|
|
6227
6386
|
requiredLabelClassName
|
|
6228
6387
|
)
|
|
6229
6388
|
}
|
|
@@ -6427,7 +6586,7 @@ var FormSelect = ({
|
|
|
6427
6586
|
import_lucide_react2.Asterisk,
|
|
6428
6587
|
{
|
|
6429
6588
|
className: cn(
|
|
6430
|
-
"ml-
|
|
6589
|
+
"ml-1 h-3 w-3 text-red-500",
|
|
6431
6590
|
requiredLabelClassName
|
|
6432
6591
|
)
|
|
6433
6592
|
}
|
|
@@ -7226,12 +7385,9 @@ var ResizablePanelGroup = (_a) => {
|
|
|
7226
7385
|
"className"
|
|
7227
7386
|
]);
|
|
7228
7387
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7229
|
-
ResizablePrimitive.
|
|
7388
|
+
ResizablePrimitive.Group,
|
|
7230
7389
|
__spreadValues({
|
|
7231
|
-
className: cn(
|
|
7232
|
-
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
7233
|
-
className
|
|
7234
|
-
)
|
|
7390
|
+
className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
|
|
7235
7391
|
}, props)
|
|
7236
7392
|
);
|
|
7237
7393
|
};
|
|
@@ -7245,7 +7401,7 @@ var ResizableHandle = (_a) => {
|
|
|
7245
7401
|
"className"
|
|
7246
7402
|
]);
|
|
7247
7403
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7248
|
-
ResizablePrimitive.
|
|
7404
|
+
ResizablePrimitive.Separator,
|
|
7249
7405
|
__spreadProps(__spreadValues({
|
|
7250
7406
|
className: cn(
|
|
7251
7407
|
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
@@ -7399,7 +7555,7 @@ var SelectContent = React54.forwardRef((_a, ref) => {
|
|
|
7399
7555
|
__spreadProps(__spreadValues({
|
|
7400
7556
|
ref,
|
|
7401
7557
|
className: cn(
|
|
7402
|
-
"relative z-50 max-h-96 min-w-
|
|
7558
|
+
"relative z-50 max-h-96 min-w-32 overflow-hidden bg-popover border border-border text-popover-foreground rounded-md shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
7403
7559
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
7404
7560
|
className
|
|
7405
7561
|
),
|
|
@@ -7412,7 +7568,7 @@ var SelectContent = React54.forwardRef((_a, ref) => {
|
|
|
7412
7568
|
{
|
|
7413
7569
|
className: cn(
|
|
7414
7570
|
"p-1",
|
|
7415
|
-
position === "popper" && "h-
|
|
7571
|
+
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
7416
7572
|
),
|
|
7417
7573
|
children
|
|
7418
7574
|
}
|
|
@@ -7441,7 +7597,7 @@ var SelectItem = React54.forwardRef((_a, ref) => {
|
|
|
7441
7597
|
__spreadProps(__spreadValues({
|
|
7442
7598
|
ref,
|
|
7443
7599
|
className: cn(
|
|
7444
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-
|
|
7600
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
7445
7601
|
className
|
|
7446
7602
|
)
|
|
7447
7603
|
}, props), {
|
|
@@ -7469,7 +7625,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
7469
7625
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
7470
7626
|
var React55 = __toESM(require("react"), 1);
|
|
7471
7627
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
7472
|
-
var
|
|
7628
|
+
var Separator6 = React55.forwardRef(
|
|
7473
7629
|
(_a, ref) => {
|
|
7474
7630
|
var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
|
|
7475
7631
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
@@ -7487,7 +7643,7 @@ var Separator5 = React55.forwardRef(
|
|
|
7487
7643
|
);
|
|
7488
7644
|
}
|
|
7489
7645
|
);
|
|
7490
|
-
|
|
7646
|
+
Separator6.displayName = SeparatorPrimitive.Root.displayName;
|
|
7491
7647
|
|
|
7492
7648
|
// src/components/sheet.tsx
|
|
7493
7649
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
@@ -8675,6 +8831,166 @@ function Dropzone({
|
|
|
8675
8831
|
] }, idx)) })
|
|
8676
8832
|
] });
|
|
8677
8833
|
}
|
|
8834
|
+
|
|
8835
|
+
// src/types/select.ts
|
|
8836
|
+
var inputVariants2 = {
|
|
8837
|
+
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
8838
|
+
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
8839
|
+
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
8840
|
+
filled: "rounded-md border border-input bg-muted/70 hover:bg-muted shadow-inner focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
8841
|
+
// sin bordes laterales/superior, solo inferior; sin sombras ni radios
|
|
8842
|
+
flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
|
|
8843
|
+
// sin estilos, útil para inputs embebidos o controles muy custom
|
|
8844
|
+
unstyled: "border-0 shadow-none focus:ring-0",
|
|
8845
|
+
// aspecto tipo enlace: inline height-auto, sin paddings ni borde
|
|
8846
|
+
link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
|
|
8847
|
+
};
|
|
8848
|
+
var variants2 = inputVariants2;
|
|
8849
|
+
|
|
8850
|
+
// src/components/ui/select.tsx
|
|
8851
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
8852
|
+
function UiSelect({
|
|
8853
|
+
ref,
|
|
8854
|
+
label,
|
|
8855
|
+
placeholder,
|
|
8856
|
+
value,
|
|
8857
|
+
onChange,
|
|
8858
|
+
items,
|
|
8859
|
+
children,
|
|
8860
|
+
className,
|
|
8861
|
+
selectClassName,
|
|
8862
|
+
labelClassName,
|
|
8863
|
+
contentClassName,
|
|
8864
|
+
size = "md",
|
|
8865
|
+
variant = "outline",
|
|
8866
|
+
errorMessage,
|
|
8867
|
+
htmlFormItemId: formItemId
|
|
8868
|
+
}) {
|
|
8869
|
+
const triggerBase = "relative inline-flex w-full items-center justify-between outline-none transition disabled:opacity-50 disabled:cursor-not-allowed text-foreground placeholder:text-muted-foreground ring-offset-background";
|
|
8870
|
+
const sizeTrigger = {
|
|
8871
|
+
sm: "h-9 px-3 text-sm",
|
|
8872
|
+
md: "h-11 px-4 text-sm",
|
|
8873
|
+
lg: "h-12 px-5 text-base"
|
|
8874
|
+
};
|
|
8875
|
+
const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-12 text-base" : "h-11 text-sm" : "";
|
|
8876
|
+
const specialLink = variant === "link" ? "text-sm" : "";
|
|
8877
|
+
const contentBase = "bg-popover text-popover-foreground border border-border rounded-md shadow-md";
|
|
8878
|
+
const itemSize = {
|
|
8879
|
+
sm: "h-8 text-sm",
|
|
8880
|
+
md: "h-9 text-sm",
|
|
8881
|
+
lg: "h-10 text-base"
|
|
8882
|
+
};
|
|
8883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cn("w-full", selectClassName), children: [
|
|
8884
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8885
|
+
Label3,
|
|
8886
|
+
{
|
|
8887
|
+
ref,
|
|
8888
|
+
className: cn(errorMessage && "text-destructive", labelClassName),
|
|
8889
|
+
htmlFor: formItemId,
|
|
8890
|
+
children: label
|
|
8891
|
+
}
|
|
8892
|
+
) : null,
|
|
8893
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Select2, { value, onValueChange: onChange, children: [
|
|
8894
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8895
|
+
SelectTrigger,
|
|
8896
|
+
{
|
|
8897
|
+
className: cn(
|
|
8898
|
+
triggerBase,
|
|
8899
|
+
variants2[variant],
|
|
8900
|
+
variant === "flushed" ? specialFlushed : variant === "link" ? specialLink : sizeTrigger[size],
|
|
8901
|
+
errorMessage && "ring-destructive focus:ring-destructive/40 border-destructive",
|
|
8902
|
+
className,
|
|
8903
|
+
label ? "mt-1" : ""
|
|
8904
|
+
),
|
|
8905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectValue, { placeholder })
|
|
8906
|
+
}
|
|
8907
|
+
),
|
|
8908
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectContent, { className: cn(contentBase, contentClassName), children: children ? children : items ? items == null ? void 0 : items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
8909
|
+
SelectItem,
|
|
8910
|
+
{
|
|
8911
|
+
value: item.value,
|
|
8912
|
+
className: cn(itemSize[size]),
|
|
8913
|
+
children: item.label
|
|
8914
|
+
},
|
|
8915
|
+
item.value
|
|
8916
|
+
)) : null })
|
|
8917
|
+
] }),
|
|
8918
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-sm text-destructive mt-1 ", children: errorMessage }) : null
|
|
8919
|
+
] });
|
|
8920
|
+
}
|
|
8921
|
+
|
|
8922
|
+
// src/types/input.ts
|
|
8923
|
+
var inputVariants3 = {
|
|
8924
|
+
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
8925
|
+
// default variant
|
|
8926
|
+
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
8927
|
+
// similar to 'filled' but lighter
|
|
8928
|
+
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
8929
|
+
// no background, just hover/focus effect
|
|
8930
|
+
filled: "rounded-md border border-input bg-muted/70 hover:bg-muted shadow-inner focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
8931
|
+
// solid background, inset shadow
|
|
8932
|
+
flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
|
|
8933
|
+
// no lateral/top borders, only bottom; no shadows or rounding
|
|
8934
|
+
unstyled: "border-0 shadow-none focus:ring-0",
|
|
8935
|
+
// no styles, useful for embedded inputs or very custom controls
|
|
8936
|
+
link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
|
|
8937
|
+
};
|
|
8938
|
+
var variants3 = inputVariants3;
|
|
8939
|
+
|
|
8940
|
+
// src/components/ui/input.tsx
|
|
8941
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
8942
|
+
function UiInput(_a) {
|
|
8943
|
+
var _b = _a, {
|
|
8944
|
+
ref,
|
|
8945
|
+
label,
|
|
8946
|
+
placeholder,
|
|
8947
|
+
onChange,
|
|
8948
|
+
className,
|
|
8949
|
+
classNameDefault,
|
|
8950
|
+
labelClassName,
|
|
8951
|
+
inputClassName,
|
|
8952
|
+
variant = "outline",
|
|
8953
|
+
errorMessage,
|
|
8954
|
+
htmlFormItemId: formItemId
|
|
8955
|
+
} = _b, inputProps = __objRest(_b, [
|
|
8956
|
+
"ref",
|
|
8957
|
+
"label",
|
|
8958
|
+
"placeholder",
|
|
8959
|
+
"onChange",
|
|
8960
|
+
"className",
|
|
8961
|
+
"classNameDefault",
|
|
8962
|
+
"labelClassName",
|
|
8963
|
+
"inputClassName",
|
|
8964
|
+
"variant",
|
|
8965
|
+
"errorMessage",
|
|
8966
|
+
"htmlFormItemId"
|
|
8967
|
+
]);
|
|
8968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("w-full", inputClassName), children: [
|
|
8969
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8970
|
+
Label3,
|
|
8971
|
+
{
|
|
8972
|
+
ref,
|
|
8973
|
+
className: cn(errorMessage && "text-destructive", labelClassName),
|
|
8974
|
+
htmlFor: formItemId,
|
|
8975
|
+
children: label
|
|
8976
|
+
}
|
|
8977
|
+
) : null,
|
|
8978
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8979
|
+
Input,
|
|
8980
|
+
__spreadProps(__spreadValues({}, inputProps), {
|
|
8981
|
+
onChange,
|
|
8982
|
+
placeholder,
|
|
8983
|
+
className: cn(
|
|
8984
|
+
"bg-input px-[0.9rem] py-5",
|
|
8985
|
+
className,
|
|
8986
|
+
variants3[variant]
|
|
8987
|
+
),
|
|
8988
|
+
classNameDefault
|
|
8989
|
+
})
|
|
8990
|
+
),
|
|
8991
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-sm text-destructive mt-1 ", children: errorMessage }) : null
|
|
8992
|
+
] });
|
|
8993
|
+
}
|
|
8678
8994
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8679
8995
|
0 && (module.exports = {
|
|
8680
8996
|
Accordion,
|
|
@@ -8899,6 +9215,8 @@ function Dropzone({
|
|
|
8899
9215
|
TooltipContent,
|
|
8900
9216
|
TooltipProvider,
|
|
8901
9217
|
TooltipTrigger,
|
|
9218
|
+
UiInput,
|
|
9219
|
+
UiSelect,
|
|
8902
9220
|
badgeVariants,
|
|
8903
9221
|
buttonVariants,
|
|
8904
9222
|
cn,
|