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/dist/index.js CHANGED
@@ -3638,6 +3638,148 @@ function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false)
3638
3638
  });
3639
3639
  }
3640
3640
 
3641
+ // node_modules/react-day-picker/dist/esm/noonDateLib.js
3642
+ function createNoonOverrides(timeZone, options = {}) {
3643
+ var _a, _b;
3644
+ const { weekStartsOn, locale } = options;
3645
+ const fallbackWeekStartsOn = (_b = weekStartsOn != null ? weekStartsOn : (_a = locale == null ? void 0 : locale.options) == null ? void 0 : _a.weekStartsOn) != null ? _b : 0;
3646
+ const toNoonTZDate = (date) => {
3647
+ const normalizedDate = typeof date === "number" || typeof date === "string" ? new Date(date) : date;
3648
+ return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
3649
+ };
3650
+ const toCalendarDate = (date) => {
3651
+ const zoned = toNoonTZDate(date);
3652
+ return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);
3653
+ };
3654
+ return {
3655
+ today: () => {
3656
+ return toNoonTZDate(TZDate.tz(timeZone));
3657
+ },
3658
+ newDate: (year, monthIndex, date) => {
3659
+ return new TZDate(year, monthIndex, date, 12, 0, 0, timeZone);
3660
+ },
3661
+ startOfDay: (date) => {
3662
+ return toNoonTZDate(date);
3663
+ },
3664
+ startOfWeek: (date, options2) => {
3665
+ var _a2;
3666
+ const base = toNoonTZDate(date);
3667
+ const weekStartsOnValue = (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn;
3668
+ const diff = (base.getDay() - weekStartsOnValue + 7) % 7;
3669
+ base.setDate(base.getDate() - diff);
3670
+ return base;
3671
+ },
3672
+ startOfISOWeek: (date) => {
3673
+ const base = toNoonTZDate(date);
3674
+ const diff = (base.getDay() - 1 + 7) % 7;
3675
+ base.setDate(base.getDate() - diff);
3676
+ return base;
3677
+ },
3678
+ startOfMonth: (date) => {
3679
+ const base = toNoonTZDate(date);
3680
+ base.setDate(1);
3681
+ return base;
3682
+ },
3683
+ startOfYear: (date) => {
3684
+ const base = toNoonTZDate(date);
3685
+ base.setMonth(0, 1);
3686
+ return base;
3687
+ },
3688
+ endOfWeek: (date, options2) => {
3689
+ var _a2;
3690
+ const base = toNoonTZDate(date);
3691
+ const weekStartsOnValue = (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn;
3692
+ const endDow = (weekStartsOnValue + 6) % 7;
3693
+ const diff = (endDow - base.getDay() + 7) % 7;
3694
+ base.setDate(base.getDate() + diff);
3695
+ return base;
3696
+ },
3697
+ endOfISOWeek: (date) => {
3698
+ const base = toNoonTZDate(date);
3699
+ const diff = (7 - base.getDay()) % 7;
3700
+ base.setDate(base.getDate() + diff);
3701
+ return base;
3702
+ },
3703
+ endOfMonth: (date) => {
3704
+ const base = toNoonTZDate(date);
3705
+ base.setMonth(base.getMonth() + 1, 0);
3706
+ return base;
3707
+ },
3708
+ endOfYear: (date) => {
3709
+ const base = toNoonTZDate(date);
3710
+ base.setMonth(11, 31);
3711
+ return base;
3712
+ },
3713
+ eachMonthOfInterval: (interval) => {
3714
+ const start = toNoonTZDate(interval.start);
3715
+ const end = toNoonTZDate(interval.end);
3716
+ const result = [];
3717
+ const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);
3718
+ const endKey = end.getFullYear() * 12 + end.getMonth();
3719
+ while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {
3720
+ result.push(new TZDate(cursor, timeZone));
3721
+ cursor.setMonth(cursor.getMonth() + 1, 1);
3722
+ }
3723
+ return result;
3724
+ },
3725
+ // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
3726
+ // mutate the same TZDate, and return it.
3727
+ addDays: (date, amount) => {
3728
+ const base = toNoonTZDate(date);
3729
+ base.setDate(base.getDate() + amount);
3730
+ return base;
3731
+ },
3732
+ addWeeks: (date, amount) => {
3733
+ const base = toNoonTZDate(date);
3734
+ base.setDate(base.getDate() + amount * 7);
3735
+ return base;
3736
+ },
3737
+ addMonths: (date, amount) => {
3738
+ const base = toNoonTZDate(date);
3739
+ base.setMonth(base.getMonth() + amount);
3740
+ return base;
3741
+ },
3742
+ addYears: (date, amount) => {
3743
+ const base = toNoonTZDate(date);
3744
+ base.setFullYear(base.getFullYear() + amount);
3745
+ return base;
3746
+ },
3747
+ eachYearOfInterval: (interval) => {
3748
+ const start = toNoonTZDate(interval.start);
3749
+ const end = toNoonTZDate(interval.end);
3750
+ const years = [];
3751
+ const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);
3752
+ while (cursor.getFullYear() <= end.getFullYear()) {
3753
+ years.push(new TZDate(cursor, timeZone));
3754
+ cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);
3755
+ }
3756
+ return years;
3757
+ },
3758
+ getWeek: (date, options2) => {
3759
+ var _a2, _b2, _c, _d;
3760
+ const base = toCalendarDate(date);
3761
+ return getWeek(base, {
3762
+ weekStartsOn: (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn,
3763
+ 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
3764
+ });
3765
+ },
3766
+ getISOWeek: (date) => {
3767
+ const base = toCalendarDate(date);
3768
+ return getISOWeek(base);
3769
+ },
3770
+ differenceInCalendarDays: (dateLeft, dateRight) => {
3771
+ const left = toCalendarDate(dateLeft);
3772
+ const right = toCalendarDate(dateRight);
3773
+ return differenceInCalendarDays(left, right);
3774
+ },
3775
+ differenceInCalendarMonths: (dateLeft, dateRight) => {
3776
+ const left = toCalendarDate(dateLeft);
3777
+ const right = toCalendarDate(dateRight);
3778
+ return differenceInCalendarMonths(left, right);
3779
+ }
3780
+ };
3781
+ }
3782
+
3641
3783
  // node_modules/react-day-picker/dist/esm/useAnimation.js
3642
3784
  import { useLayoutEffect, useRef } from "react";
3643
3785
  var asHtmlElement = (element) => {
@@ -4431,15 +4573,22 @@ function toTimeZone(date, timeZone) {
4431
4573
  }
4432
4574
 
4433
4575
  // node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
4434
- function convertMatcher(matcher, timeZone) {
4576
+ function toZoneNoon(date, timeZone, noonSafe) {
4577
+ if (!noonSafe)
4578
+ return toTimeZone(date, timeZone);
4579
+ const zoned = toTimeZone(date, timeZone);
4580
+ const noonZoned = new TZDate(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, timeZone);
4581
+ return new Date(noonZoned.getTime());
4582
+ }
4583
+ function convertMatcher(matcher, timeZone, noonSafe) {
4435
4584
  if (typeof matcher === "boolean" || typeof matcher === "function") {
4436
4585
  return matcher;
4437
4586
  }
4438
4587
  if (matcher instanceof Date) {
4439
- return toTimeZone(matcher, timeZone);
4588
+ return toZoneNoon(matcher, timeZone, noonSafe);
4440
4589
  }
4441
4590
  if (Array.isArray(matcher)) {
4442
- return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
4591
+ return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone, noonSafe) : value);
4443
4592
  }
4444
4593
  if (isDateRange(matcher)) {
4445
4594
  return __spreadProps(__spreadValues({}, matcher), {
@@ -4449,30 +4598,30 @@ function convertMatcher(matcher, timeZone) {
4449
4598
  }
4450
4599
  if (isDateInterval(matcher)) {
4451
4600
  return {
4452
- before: toTimeZone(matcher.before, timeZone),
4453
- after: toTimeZone(matcher.after, timeZone)
4601
+ before: toZoneNoon(matcher.before, timeZone, noonSafe),
4602
+ after: toZoneNoon(matcher.after, timeZone, noonSafe)
4454
4603
  };
4455
4604
  }
4456
4605
  if (isDateAfterType(matcher)) {
4457
4606
  return {
4458
- after: toTimeZone(matcher.after, timeZone)
4607
+ after: toZoneNoon(matcher.after, timeZone, noonSafe)
4459
4608
  };
4460
4609
  }
4461
4610
  if (isDateBeforeType(matcher)) {
4462
4611
  return {
4463
- before: toTimeZone(matcher.before, timeZone)
4612
+ before: toZoneNoon(matcher.before, timeZone, noonSafe)
4464
4613
  };
4465
4614
  }
4466
4615
  return matcher;
4467
4616
  }
4468
- function convertMatchersToTimeZone(matchers, timeZone) {
4617
+ function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
4469
4618
  if (!matchers) {
4470
4619
  return matchers;
4471
4620
  }
4472
4621
  if (Array.isArray(matchers)) {
4473
- return matchers.map((matcher) => convertMatcher(matcher, timeZone));
4622
+ return matchers.map((matcher) => convertMatcher(matcher, timeZone, noonSafe));
4474
4623
  }
4475
- return convertMatcher(matchers, timeZone);
4624
+ return convertMatcher(matchers, timeZone, noonSafe);
4476
4625
  }
4477
4626
 
4478
4627
  // node_modules/react-day-picker/dist/esm/DayPicker.js
@@ -4525,16 +4674,23 @@ function DayPicker(initialProps) {
4525
4674
  }
4526
4675
  }
4527
4676
  const { components, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo2(() => {
4677
+ var _a2;
4528
4678
  const locale2 = __spreadValues(__spreadValues({}, enUS2), props.locale);
4679
+ const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;
4680
+ const noonOverrides = props.noonSafe && props.timeZone ? createNoonOverrides(props.timeZone, {
4681
+ weekStartsOn,
4682
+ locale: locale2
4683
+ }) : void 0;
4684
+ const overrides = props.dateLib && noonOverrides ? __spreadValues(__spreadValues({}, noonOverrides), props.dateLib) : (_a2 = props.dateLib) != null ? _a2 : noonOverrides;
4529
4685
  const dateLib2 = new DateLib({
4530
4686
  locale: locale2,
4531
- weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
4687
+ weekStartsOn,
4532
4688
  firstWeekContainsDate: props.firstWeekContainsDate,
4533
4689
  useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
4534
4690
  useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
4535
4691
  timeZone: props.timeZone,
4536
4692
  numerals: props.numerals
4537
- }, props.dateLib);
4693
+ }, overrides);
4538
4694
  return {
4539
4695
  dateLib: dateLib2,
4540
4696
  components: getComponents(props.components),
@@ -4553,6 +4709,7 @@ function DayPicker(initialProps) {
4553
4709
  props.timeZone,
4554
4710
  props.numerals,
4555
4711
  props.dateLib,
4712
+ props.noonSafe,
4556
4713
  props.components,
4557
4714
  props.formatters,
4558
4715
  props.labels,
@@ -5825,7 +5982,7 @@ var Input = React41.forwardRef(
5825
5982
  ]);
5826
5983
  const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:opacity-50 disabled:cursor-not-allowed";
5827
5984
  const sizeCls = size === "sm" ? "h-9 px-3 text-sm" : size === "lg" ? "h-12 px-5 text-base" : "h-11 px-4 text-sm";
5828
- const variants2 = {
5985
+ const variants4 = {
5829
5986
  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",
5830
5987
  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",
5831
5988
  ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
@@ -5868,7 +6025,7 @@ var Input = React41.forwardRef(
5868
6025
  disabled,
5869
6026
  className: classNameDefault ? cn(
5870
6027
  base,
5871
- variants2[variant],
6028
+ variants4[variant],
5872
6029
  variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
5873
6030
  errorCls,
5874
6031
  iconPadLeft,
@@ -5975,7 +6132,7 @@ var FormField = (_a) => {
5975
6132
  Asterisk,
5976
6133
  {
5977
6134
  className: cn(
5978
- "ml-[1px] h-3 w-3 text-red-500",
6135
+ "ml-px h-3 w-3 text-red-500",
5979
6136
  requiredLabelClassName
5980
6137
  )
5981
6138
  }
@@ -6179,7 +6336,7 @@ var FormSelect = ({
6179
6336
  Asterisk,
6180
6337
  {
6181
6338
  className: cn(
6182
- "ml-[4px] h-3 w-3 text-red-500",
6339
+ "ml-1 h-3 w-3 text-red-500",
6183
6340
  requiredLabelClassName
6184
6341
  )
6185
6342
  }
@@ -7014,12 +7171,9 @@ var ResizablePanelGroup = (_a) => {
7014
7171
  "className"
7015
7172
  ]);
7016
7173
  return /* @__PURE__ */ jsx29(
7017
- ResizablePrimitive.PanelGroup,
7174
+ ResizablePrimitive.Group,
7018
7175
  __spreadValues({
7019
- className: cn(
7020
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
7021
- className
7022
- )
7176
+ className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
7023
7177
  }, props)
7024
7178
  );
7025
7179
  };
@@ -7033,7 +7187,7 @@ var ResizableHandle = (_a) => {
7033
7187
  "className"
7034
7188
  ]);
7035
7189
  return /* @__PURE__ */ jsx29(
7036
- ResizablePrimitive.PanelResizeHandle,
7190
+ ResizablePrimitive.Separator,
7037
7191
  __spreadProps(__spreadValues({
7038
7192
  className: cn(
7039
7193
  "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",
@@ -7192,7 +7346,7 @@ var SelectContent = React54.forwardRef((_a, ref) => {
7192
7346
  __spreadProps(__spreadValues({
7193
7347
  ref,
7194
7348
  className: cn(
7195
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground 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",
7349
+ "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",
7196
7350
  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",
7197
7351
  className
7198
7352
  ),
@@ -7205,7 +7359,7 @@ var SelectContent = React54.forwardRef((_a, ref) => {
7205
7359
  {
7206
7360
  className: cn(
7207
7361
  "p-1",
7208
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
7362
+ position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
7209
7363
  ),
7210
7364
  children
7211
7365
  }
@@ -7234,7 +7388,7 @@ var SelectItem = React54.forwardRef((_a, ref) => {
7234
7388
  __spreadProps(__spreadValues({
7235
7389
  ref,
7236
7390
  className: cn(
7237
- "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",
7391
+ "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",
7238
7392
  className
7239
7393
  )
7240
7394
  }, props), {
@@ -7262,7 +7416,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
7262
7416
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
7263
7417
  import * as React55 from "react";
7264
7418
  import { jsx as jsx33 } from "react/jsx-runtime";
7265
- var Separator5 = React55.forwardRef(
7419
+ var Separator6 = React55.forwardRef(
7266
7420
  (_a, ref) => {
7267
7421
  var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
7268
7422
  return /* @__PURE__ */ jsx33(
@@ -7280,7 +7434,7 @@ var Separator5 = React55.forwardRef(
7280
7434
  );
7281
7435
  }
7282
7436
  );
7283
- Separator5.displayName = SeparatorPrimitive.Root.displayName;
7437
+ Separator6.displayName = SeparatorPrimitive.Root.displayName;
7284
7438
 
7285
7439
  // src/components/sheet.tsx
7286
7440
  import * as SheetPrimitive from "@radix-ui/react-dialog";
@@ -8477,6 +8631,166 @@ function Dropzone({
8477
8631
  ] }, idx)) })
8478
8632
  ] });
8479
8633
  }
8634
+
8635
+ // src/types/select.ts
8636
+ var inputVariants2 = {
8637
+ 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",
8638
+ 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",
8639
+ ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
8640
+ 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",
8641
+ // sin bordes laterales/superior, solo inferior; sin sombras ni radios
8642
+ flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
8643
+ // sin estilos, útil para inputs embebidos o controles muy custom
8644
+ unstyled: "border-0 shadow-none focus:ring-0",
8645
+ // aspecto tipo enlace: inline height-auto, sin paddings ni borde
8646
+ link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
8647
+ };
8648
+ var variants2 = inputVariants2;
8649
+
8650
+ // src/components/ui/select.tsx
8651
+ import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
8652
+ function UiSelect({
8653
+ ref,
8654
+ label,
8655
+ placeholder,
8656
+ value,
8657
+ onChange,
8658
+ items,
8659
+ children,
8660
+ className,
8661
+ selectClassName,
8662
+ labelClassName,
8663
+ contentClassName,
8664
+ size = "md",
8665
+ variant = "outline",
8666
+ errorMessage,
8667
+ htmlFormItemId: formItemId
8668
+ }) {
8669
+ 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";
8670
+ const sizeTrigger = {
8671
+ sm: "h-9 px-3 text-sm",
8672
+ md: "h-11 px-4 text-sm",
8673
+ lg: "h-12 px-5 text-base"
8674
+ };
8675
+ const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-12 text-base" : "h-11 text-sm" : "";
8676
+ const specialLink = variant === "link" ? "text-sm" : "";
8677
+ const contentBase = "bg-popover text-popover-foreground border border-border rounded-md shadow-md";
8678
+ const itemSize = {
8679
+ sm: "h-8 text-sm",
8680
+ md: "h-9 text-sm",
8681
+ lg: "h-10 text-base"
8682
+ };
8683
+ return /* @__PURE__ */ jsxs30("div", { className: cn("w-full", selectClassName), children: [
8684
+ label ? /* @__PURE__ */ jsx55(
8685
+ Label3,
8686
+ {
8687
+ ref,
8688
+ className: cn(errorMessage && "text-destructive", labelClassName),
8689
+ htmlFor: formItemId,
8690
+ children: label
8691
+ }
8692
+ ) : null,
8693
+ /* @__PURE__ */ jsxs30(Select2, { value, onValueChange: onChange, children: [
8694
+ /* @__PURE__ */ jsx55(
8695
+ SelectTrigger,
8696
+ {
8697
+ className: cn(
8698
+ triggerBase,
8699
+ variants2[variant],
8700
+ variant === "flushed" ? specialFlushed : variant === "link" ? specialLink : sizeTrigger[size],
8701
+ errorMessage && "ring-destructive focus:ring-destructive/40 border-destructive",
8702
+ className,
8703
+ label ? "mt-1" : ""
8704
+ ),
8705
+ children: /* @__PURE__ */ jsx55(SelectValue, { placeholder })
8706
+ }
8707
+ ),
8708
+ /* @__PURE__ */ jsx55(SelectContent, { className: cn(contentBase, contentClassName), children: children ? children : items ? items == null ? void 0 : items.map((item) => /* @__PURE__ */ jsx55(
8709
+ SelectItem,
8710
+ {
8711
+ value: item.value,
8712
+ className: cn(itemSize[size]),
8713
+ children: item.label
8714
+ },
8715
+ item.value
8716
+ )) : null })
8717
+ ] }),
8718
+ errorMessage ? /* @__PURE__ */ jsx55("p", { className: "text-sm text-destructive mt-1 ", children: errorMessage }) : null
8719
+ ] });
8720
+ }
8721
+
8722
+ // src/types/input.ts
8723
+ var inputVariants3 = {
8724
+ 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",
8725
+ // default variant
8726
+ 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",
8727
+ // similar to 'filled' but lighter
8728
+ ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
8729
+ // no background, just hover/focus effect
8730
+ 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",
8731
+ // solid background, inset shadow
8732
+ flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
8733
+ // no lateral/top borders, only bottom; no shadows or rounding
8734
+ unstyled: "border-0 shadow-none focus:ring-0",
8735
+ // no styles, useful for embedded inputs or very custom controls
8736
+ link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
8737
+ };
8738
+ var variants3 = inputVariants3;
8739
+
8740
+ // src/components/ui/input.tsx
8741
+ import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
8742
+ function UiInput(_a) {
8743
+ var _b = _a, {
8744
+ ref,
8745
+ label,
8746
+ placeholder,
8747
+ onChange,
8748
+ className,
8749
+ classNameDefault,
8750
+ labelClassName,
8751
+ inputClassName,
8752
+ variant = "outline",
8753
+ errorMessage,
8754
+ htmlFormItemId: formItemId
8755
+ } = _b, inputProps = __objRest(_b, [
8756
+ "ref",
8757
+ "label",
8758
+ "placeholder",
8759
+ "onChange",
8760
+ "className",
8761
+ "classNameDefault",
8762
+ "labelClassName",
8763
+ "inputClassName",
8764
+ "variant",
8765
+ "errorMessage",
8766
+ "htmlFormItemId"
8767
+ ]);
8768
+ return /* @__PURE__ */ jsxs31("div", { className: cn("w-full", inputClassName), children: [
8769
+ label ? /* @__PURE__ */ jsx56(
8770
+ Label3,
8771
+ {
8772
+ ref,
8773
+ className: cn(errorMessage && "text-destructive", labelClassName),
8774
+ htmlFor: formItemId,
8775
+ children: label
8776
+ }
8777
+ ) : null,
8778
+ /* @__PURE__ */ jsx56(
8779
+ Input,
8780
+ __spreadProps(__spreadValues({}, inputProps), {
8781
+ onChange,
8782
+ placeholder,
8783
+ className: cn(
8784
+ "bg-input px-[0.9rem] py-5",
8785
+ className,
8786
+ variants3[variant]
8787
+ ),
8788
+ classNameDefault
8789
+ })
8790
+ ),
8791
+ errorMessage ? /* @__PURE__ */ jsx56("p", { className: "text-sm text-destructive mt-1 ", children: errorMessage }) : null
8792
+ ] });
8793
+ }
8480
8794
  export {
8481
8795
  Accordion,
8482
8796
  AccordionContent,
@@ -8658,7 +8972,7 @@ export {
8658
8972
  SelectSeparator,
8659
8973
  SelectTrigger,
8660
8974
  SelectValue,
8661
- Separator5 as Separator,
8975
+ Separator6 as Separator,
8662
8976
  Sheet,
8663
8977
  SheetClose,
8664
8978
  SheetContent,
@@ -8700,6 +9014,8 @@ export {
8700
9014
  TooltipContent,
8701
9015
  TooltipProvider,
8702
9016
  TooltipTrigger,
9017
+ UiInput,
9018
+ UiSelect,
8703
9019
  badgeVariants,
8704
9020
  buttonVariants,
8705
9021
  cn,
package/dist/style.css CHANGED
@@ -430,6 +430,9 @@
430
430
  .-mt-4 {
431
431
  margin-top: calc(var(--spacing) * -4);
432
432
  }
433
+ .mt-1 {
434
+ margin-top: calc(var(--spacing) * 1);
435
+ }
433
436
  .mt-1\.5 {
434
437
  margin-top: calc(var(--spacing) * 1.5);
435
438
  }
@@ -463,15 +466,12 @@
463
466
  .ml-2 {
464
467
  margin-left: calc(var(--spacing) * 2);
465
468
  }
466
- .ml-\[1px\] {
467
- margin-left: 1px;
468
- }
469
- .ml-\[4px\] {
470
- margin-left: 4px;
471
- }
472
469
  .ml-auto {
473
470
  margin-left: auto;
474
471
  }
472
+ .ml-px {
473
+ margin-left: 1px;
474
+ }
475
475
  .block {
476
476
  display: block;
477
477
  }
@@ -500,6 +500,9 @@
500
500
  width: calc(var(--spacing) * 8);
501
501
  height: calc(var(--spacing) * 8);
502
502
  }
503
+ .h-\(--radix-select-trigger-height\) {
504
+ height: var(--radix-select-trigger-height);
505
+ }
503
506
  .h-1\.5 {
504
507
  height: calc(var(--spacing) * 1.5);
505
508
  }
@@ -557,9 +560,6 @@
557
560
  .h-\[var\(--radix-navigation-menu-viewport-height\)\] {
558
561
  height: var(--radix-navigation-menu-viewport-height);
559
562
  }
560
- .h-\[var\(--radix-select-trigger-height\)\] {
561
- height: var(--radix-select-trigger-height);
562
- }
563
563
  .h-auto {
564
564
  height: auto;
565
565
  }
@@ -661,18 +661,21 @@
661
661
  max-width: -moz-max-content;
662
662
  max-width: max-content;
663
663
  }
664
+ .min-w-\(--radix-select-trigger-width\) {
665
+ min-width: var(--radix-select-trigger-width);
666
+ }
664
667
  .min-w-0 {
665
668
  min-width: calc(var(--spacing) * 0);
666
669
  }
670
+ .min-w-32 {
671
+ min-width: calc(var(--spacing) * 32);
672
+ }
667
673
  .min-w-\[8rem\] {
668
674
  min-width: 8rem;
669
675
  }
670
676
  .min-w-\[12rem\] {
671
677
  min-width: 12rem;
672
678
  }
673
- .min-w-\[var\(--radix-select-trigger-width\)\] {
674
- min-width: var(--radix-select-trigger-width);
675
- }
676
679
  .flex-1 {
677
680
  flex: 1;
678
681
  }
@@ -2144,6 +2147,21 @@
2144
2147
  opacity: 100%;
2145
2148
  }
2146
2149
  }
2150
+ .aria-\[orientation\=vertical\]\:flex-col {
2151
+ &[aria-orientation=vertical] {
2152
+ flex-direction: column;
2153
+ }
2154
+ }
2155
+ .data-disabled\:pointer-events-none {
2156
+ &[data-disabled] {
2157
+ pointer-events: none;
2158
+ }
2159
+ }
2160
+ .data-disabled\:opacity-50 {
2161
+ &[data-disabled] {
2162
+ opacity: 50%;
2163
+ }
2164
+ }
2147
2165
  .data-\[active\]\:bg-accent\/50 {
2148
2166
  &[data-active] {
2149
2167
  background-color: var(--accent);
@@ -2224,11 +2242,6 @@
2224
2242
  width: 100%;
2225
2243
  }
2226
2244
  }
2227
- .data-\[panel-group-direction\=vertical\]\:flex-col {
2228
- &[data-panel-group-direction=vertical] {
2229
- flex-direction: column;
2230
- }
2231
- }
2232
2245
  .data-\[panel-group-direction\=vertical\]\:after\:left-0 {
2233
2246
  &[data-panel-group-direction=vertical] {
2234
2247
  &::after {