shadcn-ui-react 0.4.0 → 0.4.2

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 CHANGED
@@ -176,12 +176,14 @@ import {
176
176
  import * as z from "zod";
177
177
 
178
178
  const formSchema = z.object({
179
- email: z
180
- .string({ error: "Email is required" })
181
- .email({ message: "Enter a valid email address" }),
179
+ email: z.email({
180
+ pattern: z.regexes.email,
181
+ error: 'Email is required'
182
+ }),
182
183
  password: z
183
184
  .string()
184
185
  .min(8, { message: "Password must be at least 8 characters" }),
186
+ gender: z.enum(['male', 'female']).optional().nullable(),
185
187
  });
186
188
 
187
189
  type UserFormValue = z.infer<typeof formSchema>;
@@ -208,6 +210,15 @@ export default function UserAuthForm() {
208
210
  variant="outline" //outline | soft | ghost | filled | flushed | unstyled | link
209
211
  className="" //your style
210
212
  />
213
+ <FormField
214
+ control={form.control}
215
+ name="password"
216
+ type="password"
217
+ placeholder="Enter password"
218
+ label="Password"
219
+ variant="outline" //outline | soft | ghost | filled | flushed | unstyled | link
220
+ className="" //your style
221
+ />
211
222
  <FormSelect
212
223
  control={form.control}
213
224
  name="gender"
package/dist/index.cjs CHANGED
@@ -2725,7 +2725,7 @@ function endOfBroadcastWeek(date, dateLib) {
2725
2725
  }
2726
2726
 
2727
2727
  // node_modules/react-day-picker/dist/esm/classes/DateLib.js
2728
- var DateLib = class {
2728
+ var DateLib = class _DateLib {
2729
2729
  /**
2730
2730
  * Creates an instance of `DateLib`.
2731
2731
  *
@@ -2932,7 +2932,62 @@ var DateLib = class {
2932
2932
  formatNumber(value) {
2933
2933
  return this.replaceDigits(value.toString());
2934
2934
  }
2935
+ /**
2936
+ * Returns the preferred ordering for month and year labels for the current
2937
+ * locale.
2938
+ */
2939
+ getMonthYearOrder() {
2940
+ var _a;
2941
+ const code = (_a = this.options.locale) == null ? void 0 : _a.code;
2942
+ if (!code) {
2943
+ return "month-first";
2944
+ }
2945
+ return _DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
2946
+ }
2947
+ /**
2948
+ * Formats the month/year pair respecting locale conventions.
2949
+ *
2950
+ * @since 9.11.0
2951
+ */
2952
+ formatMonthYear(date) {
2953
+ const { locale, timeZone, numerals } = this.options;
2954
+ const localeCode = locale == null ? void 0 : locale.code;
2955
+ if (localeCode && _DateLib.yearFirstLocales.has(localeCode)) {
2956
+ try {
2957
+ const intl = new Intl.DateTimeFormat(localeCode, {
2958
+ month: "long",
2959
+ year: "numeric",
2960
+ timeZone,
2961
+ numberingSystem: numerals
2962
+ });
2963
+ const formatted = intl.format(date);
2964
+ return formatted;
2965
+ } catch (e) {
2966
+ }
2967
+ }
2968
+ const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
2969
+ return this.format(date, pattern);
2970
+ }
2935
2971
  };
2972
+ DateLib.yearFirstLocales = /* @__PURE__ */ new Set([
2973
+ "eu",
2974
+ "hu",
2975
+ "ja",
2976
+ "ja-Hira",
2977
+ "ja-JP",
2978
+ "ko",
2979
+ "ko-KR",
2980
+ "lt",
2981
+ "lt-LT",
2982
+ "lv",
2983
+ "lv-LV",
2984
+ "mn",
2985
+ "mn-MN",
2986
+ "zh",
2987
+ "zh-CN",
2988
+ "zh-HK",
2989
+ "zh-TW"
2990
+ ]);
2936
2991
  var defaultDateLib = new DateLib();
2937
2992
 
2938
2993
  // node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
@@ -3528,7 +3583,8 @@ __export(formatters_exports, {
3528
3583
 
3529
3584
  // node_modules/react-day-picker/dist/esm/formatters/formatCaption.js
3530
3585
  function formatCaption(month, options, dateLib) {
3531
- return (dateLib != null ? dateLib : new DateLib(options)).format(month, "LLLL y");
3586
+ const lib = dateLib != null ? dateLib : new DateLib(options);
3587
+ return lib.formatMonthYear(month);
3532
3588
  }
3533
3589
  var formatMonthCaption = formatCaption;
3534
3590
 
@@ -3672,7 +3728,8 @@ var labelDay = labelDayButton;
3672
3728
 
3673
3729
  // node_modules/react-day-picker/dist/esm/labels/labelGrid.js
3674
3730
  function labelGrid(date, options, dateLib) {
3675
- return (dateLib != null ? dateLib : new DateLib(options)).format(date, "LLLL y");
3731
+ const lib = dateLib != null ? dateLib : new DateLib(options);
3732
+ return lib.formatMonthYear(date);
3676
3733
  }
3677
3734
  var labelCaption = labelGrid;
3678
3735
 
@@ -4649,7 +4706,7 @@ function DayPicker(initialProps) {
4649
4706
  { value: contextValue },
4650
4707
  import_react32.default.createElement(
4651
4708
  components.Root,
4652
- __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"] }, dataAttributes),
4709
+ __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
4653
4710
  import_react32.default.createElement(
4654
4711
  components.Months,
4655
4712
  { className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
@@ -4674,8 +4731,12 @@ function DayPicker(initialProps) {
4674
4731
  import_react32.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_react32.default.createElement(
4675
4732
  components.DropdownNav,
4676
4733
  { className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
4677
- captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react32.default.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : import_react32.default.createElement("span", null, formatMonthDropdown2(calendarMonth.date, dateLib)),
4678
- captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react32.default.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : import_react32.default.createElement("span", null, formatYearDropdown2(calendarMonth.date, dateLib)),
4734
+ (() => {
4735
+ const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react32.default.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : import_react32.default.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
4736
+ const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react32.default.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : import_react32.default.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
4737
+ const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
4738
+ return controls;
4739
+ })(),
4679
4740
  import_react32.default.createElement("span", { role: "status", "aria-live": "polite", style: {
4680
4741
  border: 0,
4681
4742
  clip: "rect(0 0 0 0)",
@@ -5762,11 +5823,10 @@ var Form = ({
5762
5823
  var import_react33 = __toESM(require("react"), 1);
5763
5824
  var import_react_hook_form2 = require("react-hook-form");
5764
5825
  var import_react_slot3 = require("@radix-ui/react-slot");
5765
- var import_lucide_react3 = require("lucide-react");
5826
+ var import_lucide_react2 = require("lucide-react");
5766
5827
 
5767
5828
  // src/components/input.tsx
5768
5829
  var React41 = __toESM(require("react"), 1);
5769
- var import_lucide_react2 = require("lucide-react");
5770
5830
  var import_jsx_runtime17 = require("react/jsx-runtime");
5771
5831
  var Input = React41.forwardRef(
5772
5832
  (_a, ref) => {
@@ -5776,6 +5836,7 @@ var Input = React41.forwardRef(
5776
5836
  size = "md",
5777
5837
  leading,
5778
5838
  trailing,
5839
+ classNameDefault = true,
5779
5840
  invalid = false,
5780
5841
  disabled
5781
5842
  } = _b, props = __objRest(_b, [
@@ -5784,6 +5845,7 @@ var Input = React41.forwardRef(
5784
5845
  "size",
5785
5846
  "leading",
5786
5847
  "trailing",
5848
+ "classNameDefault",
5787
5849
  "invalid",
5788
5850
  "disabled"
5789
5851
  ]);
@@ -5819,7 +5881,6 @@ var Input = React41.forwardRef(
5819
5881
  className: cn(
5820
5882
  "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 opacity-60",
5821
5883
  size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
5822
- // no desplazamos visualmente en variantes sin padding
5823
5884
  variant === "flushed" || variant === "link" ? "hidden" : ""
5824
5885
  ),
5825
5886
  children: leading
@@ -5831,7 +5892,7 @@ var Input = React41.forwardRef(
5831
5892
  ref,
5832
5893
  "aria-invalid": invalid || void 0,
5833
5894
  disabled,
5834
- className: cn(
5895
+ className: classNameDefault ? cn(
5835
5896
  base,
5836
5897
  variants2[variant],
5837
5898
  variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
@@ -5839,7 +5900,7 @@ var Input = React41.forwardRef(
5839
5900
  iconPadLeft,
5840
5901
  iconPadRight,
5841
5902
  className
5842
- )
5903
+ ) : className
5843
5904
  }, props)
5844
5905
  ),
5845
5906
  trailing ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -5857,7 +5918,6 @@ var Input = React41.forwardRef(
5857
5918
  }
5858
5919
  );
5859
5920
  Input.displayName = "Input";
5860
- Input.displayName = "Input";
5861
5921
 
5862
5922
  // src/components/Form/form-field.tsx
5863
5923
  var import_jsx_runtime18 = require("react/jsx-runtime");
@@ -5937,7 +5997,7 @@ var FormField = (_a) => {
5937
5997
  children: [
5938
5998
  label,
5939
5999
  requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
5940
- import_lucide_react3.Asterisk,
6000
+ import_lucide_react2.Asterisk,
5941
6001
  {
5942
6002
  className: cn(
5943
6003
  "ml-[1px] h-3 w-3 text-red-500",
@@ -5957,7 +6017,7 @@ var FormField = (_a) => {
5957
6017
  },
5958
6018
  placeholder,
5959
6019
  className: cn("bg-input px-[0.9rem] py-5", className),
5960
- classNameDefault: classNameDefault != null ? classNameDefault : true
6020
+ classNameDefault
5961
6021
  })
5962
6022
  ) }),
5963
6023
  fieldError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormMessage, { className: messageClassName, children: fieldError })
@@ -6141,7 +6201,7 @@ var FormSelect = ({
6141
6201
  children: [
6142
6202
  label,
6143
6203
  requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6144
- import_lucide_react3.Asterisk,
6204
+ import_lucide_react2.Asterisk,
6145
6205
  {
6146
6206
  className: cn(
6147
6207
  "ml-[4px] h-3 w-3 text-red-500",
@@ -6253,35 +6313,35 @@ var HoverCardContent = React43.forwardRef((_a, ref) => {
6253
6313
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
6254
6314
 
6255
6315
  // src/components/icons.tsx
6256
- var import_lucide_react4 = require("lucide-react");
6316
+ var import_lucide_react3 = require("lucide-react");
6257
6317
  var IconsApp = {
6258
- dashboard: import_lucide_react4.LayoutDashboardIcon,
6259
- logo: import_lucide_react4.Command,
6260
- login: import_lucide_react4.LogIn,
6261
- close: import_lucide_react4.X,
6262
- profile: import_lucide_react4.User2Icon,
6263
- spinner: import_lucide_react4.Loader2,
6264
- kanban: import_lucide_react4.CircuitBoardIcon,
6265
- chevronLeft: import_lucide_react4.ChevronLeft,
6266
- chevronRight: import_lucide_react4.ChevronRight,
6267
- trash: import_lucide_react4.Trash,
6268
- employee: import_lucide_react4.UserX2Icon,
6269
- post: import_lucide_react4.FileText,
6270
- page: import_lucide_react4.File,
6271
- media: import_lucide_react4.Image,
6272
- settings: import_lucide_react4.Settings,
6273
- billing: import_lucide_react4.CreditCard,
6274
- ellipsis: import_lucide_react4.MoreVertical,
6275
- add: import_lucide_react4.Plus,
6276
- warning: import_lucide_react4.AlertTriangle,
6277
- user: import_lucide_react4.User,
6278
- arrowRight: import_lucide_react4.ArrowRight,
6279
- help: import_lucide_react4.HelpCircle,
6280
- pizza: import_lucide_react4.Pizza,
6281
- sun: import_lucide_react4.SunMedium,
6282
- moon: import_lucide_react4.Moon,
6283
- laptop: import_lucide_react4.Laptop,
6284
- check: import_lucide_react4.Check
6318
+ dashboard: import_lucide_react3.LayoutDashboardIcon,
6319
+ logo: import_lucide_react3.Command,
6320
+ login: import_lucide_react3.LogIn,
6321
+ close: import_lucide_react3.X,
6322
+ profile: import_lucide_react3.User2Icon,
6323
+ spinner: import_lucide_react3.Loader2,
6324
+ kanban: import_lucide_react3.CircuitBoardIcon,
6325
+ chevronLeft: import_lucide_react3.ChevronLeft,
6326
+ chevronRight: import_lucide_react3.ChevronRight,
6327
+ trash: import_lucide_react3.Trash,
6328
+ employee: import_lucide_react3.UserX2Icon,
6329
+ post: import_lucide_react3.FileText,
6330
+ page: import_lucide_react3.File,
6331
+ media: import_lucide_react3.Image,
6332
+ settings: import_lucide_react3.Settings,
6333
+ billing: import_lucide_react3.CreditCard,
6334
+ ellipsis: import_lucide_react3.MoreVertical,
6335
+ add: import_lucide_react3.Plus,
6336
+ warning: import_lucide_react3.AlertTriangle,
6337
+ user: import_lucide_react3.User,
6338
+ arrowRight: import_lucide_react3.ArrowRight,
6339
+ help: import_lucide_react3.HelpCircle,
6340
+ pizza: import_lucide_react3.Pizza,
6341
+ sun: import_lucide_react3.SunMedium,
6342
+ moon: import_lucide_react3.Moon,
6343
+ laptop: import_lucide_react3.Laptop,
6344
+ check: import_lucide_react3.Check
6285
6345
  };
6286
6346
  var Icons = IconsApp;
6287
6347
 
@@ -6686,7 +6746,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
6686
6746
  // src/components/pagination.tsx
6687
6747
  var import_react_icons12 = require("@radix-ui/react-icons");
6688
6748
  var React48 = __toESM(require("react"), 1);
6689
- var import_lucide_react5 = require("lucide-react");
6749
+ var import_lucide_react4 = require("lucide-react");
6690
6750
  var import_jsx_runtime25 = require("react/jsx-runtime");
6691
6751
  var Pagination = (_a) => {
6692
6752
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -6755,7 +6815,7 @@ var PaginationPreviousLast = (_a) => {
6755
6815
  className: cn("gap-1 pl-2.5", className)
6756
6816
  }, props), {
6757
6817
  children: [
6758
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react5.ChevronLeft, { className: "h-4 w-4" }),
6818
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronLeft, { className: "h-4 w-4" }),
6759
6819
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Previous Last" })
6760
6820
  ]
6761
6821
  })
@@ -6819,7 +6879,7 @@ var PaginationNextLast = (_a) => {
6819
6879
  }, props), {
6820
6880
  children: [
6821
6881
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Next Last" }),
6822
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react5.ChevronRight, { className: "h-4 w-4" })
6882
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
6823
6883
  ]
6824
6884
  })
6825
6885
  );
@@ -7044,7 +7104,7 @@ function SearchInput({
7044
7104
  value: searchTerm,
7045
7105
  onChange: (event) => setSearchTerm(event.target.value),
7046
7106
  className: cn("w-full md:max-w-sm", className),
7047
- classNameDefault: classNameDefault != null ? classNameDefault : true
7107
+ classNameDefault
7048
7108
  }
7049
7109
  );
7050
7110
  }
@@ -7937,13 +7997,13 @@ var AlertModal = ({
7937
7997
  };
7938
7998
 
7939
7999
  // src/shared/breadcrumbs.tsx
7940
- var import_lucide_react6 = require("lucide-react");
8000
+ var import_lucide_react5 = require("lucide-react");
7941
8001
  var import_react35 = require("react");
7942
8002
  var import_jsx_runtime47 = require("react/jsx-runtime");
7943
8003
  function Breadcrumbs({ items, className, classNameList }) {
7944
8004
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react35.Fragment, { children: [
7945
8005
  index !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbLink, { href: item.link, children: item.title }) }),
7946
- index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react6.Slash, {}) }),
8006
+ index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react5.Slash, {}) }),
7947
8007
  index === items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbPage, { children: item.title })
7948
8008
  ] }, item.title)) }) });
7949
8009
  }
@@ -7952,7 +8012,7 @@ function Breadcrumbs({ items, className, classNameList }) {
7952
8012
  var import_react36 = __toESM(require("react"), 1);
7953
8013
  var import_react_icons18 = require("@radix-ui/react-icons");
7954
8014
  var import_react_table = require("@tanstack/react-table");
7955
- var import_lucide_react7 = require("lucide-react");
8015
+ var import_lucide_react6 = require("lucide-react");
7956
8016
  var import_jsx_runtime48 = require("react/jsx-runtime");
7957
8017
  function DataTable({
7958
8018
  columns,
@@ -8103,7 +8163,7 @@ function DataTable({
8103
8163
  pageIndex: pagination.pageIndex - 1
8104
8164
  })),
8105
8165
  disabled: pagination.pageIndex === 0,
8106
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react7.ChevronLeftIcon, { className: "h-4 w-4" })
8166
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronLeftIcon, { className: "h-4 w-4" })
8107
8167
  }
8108
8168
  ),
8109
8169
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
@@ -8116,7 +8176,7 @@ function DataTable({
8116
8176
  pageIndex: pagination.pageIndex + 1
8117
8177
  })),
8118
8178
  disabled: pagination.pageIndex + 1 >= pageCount,
8119
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react7.ChevronRightIcon, { className: "h-4 w-4" })
8179
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronRightIcon, { className: "h-4 w-4" })
8120
8180
  }
8121
8181
  ),
8122
8182
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
@@ -8178,7 +8238,7 @@ function DataTableSkeleton({
8178
8238
 
8179
8239
  // src/shared/fileupload.tsx
8180
8240
  var import_react_icons19 = require("@radix-ui/react-icons");
8181
- var import_lucide_react8 = require("lucide-react");
8241
+ var import_lucide_react7 = require("lucide-react");
8182
8242
  var import_react37 = require("react");
8183
8243
  var import_react_dropzone = require("react-dropzone");
8184
8244
  var import_jsx_runtime50 = require("react/jsx-runtime");
@@ -8209,7 +8269,7 @@ function FileUpload({
8209
8269
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", __spreadValues({}, getInputProps())),
8210
8270
  value && !!value.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_icons19.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
8211
8271
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: "absolute -bottom-5 left-1/2 flex w-full -translate-x-1/2 -translate-y-1/2 transform flex-col items-center justify-center bg-gray-300 bg-opacity-50 py-1 text-xs font-normal text-muted-foreground ", children: [
8212
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react8.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
8272
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react7.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
8213
8273
  label
8214
8274
  ] })
8215
8275
  ] }))
package/dist/index.js CHANGED
@@ -2464,7 +2464,7 @@ function endOfBroadcastWeek(date, dateLib) {
2464
2464
  }
2465
2465
 
2466
2466
  // node_modules/react-day-picker/dist/esm/classes/DateLib.js
2467
- var DateLib = class {
2467
+ var DateLib = class _DateLib {
2468
2468
  /**
2469
2469
  * Creates an instance of `DateLib`.
2470
2470
  *
@@ -2671,7 +2671,62 @@ var DateLib = class {
2671
2671
  formatNumber(value) {
2672
2672
  return this.replaceDigits(value.toString());
2673
2673
  }
2674
+ /**
2675
+ * Returns the preferred ordering for month and year labels for the current
2676
+ * locale.
2677
+ */
2678
+ getMonthYearOrder() {
2679
+ var _a;
2680
+ const code = (_a = this.options.locale) == null ? void 0 : _a.code;
2681
+ if (!code) {
2682
+ return "month-first";
2683
+ }
2684
+ return _DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
2685
+ }
2686
+ /**
2687
+ * Formats the month/year pair respecting locale conventions.
2688
+ *
2689
+ * @since 9.11.0
2690
+ */
2691
+ formatMonthYear(date) {
2692
+ const { locale, timeZone, numerals } = this.options;
2693
+ const localeCode = locale == null ? void 0 : locale.code;
2694
+ if (localeCode && _DateLib.yearFirstLocales.has(localeCode)) {
2695
+ try {
2696
+ const intl = new Intl.DateTimeFormat(localeCode, {
2697
+ month: "long",
2698
+ year: "numeric",
2699
+ timeZone,
2700
+ numberingSystem: numerals
2701
+ });
2702
+ const formatted = intl.format(date);
2703
+ return formatted;
2704
+ } catch (e) {
2705
+ }
2706
+ }
2707
+ const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
2708
+ return this.format(date, pattern);
2709
+ }
2674
2710
  };
2711
+ DateLib.yearFirstLocales = /* @__PURE__ */ new Set([
2712
+ "eu",
2713
+ "hu",
2714
+ "ja",
2715
+ "ja-Hira",
2716
+ "ja-JP",
2717
+ "ko",
2718
+ "ko-KR",
2719
+ "lt",
2720
+ "lt-LT",
2721
+ "lv",
2722
+ "lv-LV",
2723
+ "mn",
2724
+ "mn-MN",
2725
+ "zh",
2726
+ "zh-CN",
2727
+ "zh-HK",
2728
+ "zh-TW"
2729
+ ]);
2675
2730
  var defaultDateLib = new DateLib();
2676
2731
 
2677
2732
  // node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
@@ -3267,7 +3322,8 @@ __export(formatters_exports, {
3267
3322
 
3268
3323
  // node_modules/react-day-picker/dist/esm/formatters/formatCaption.js
3269
3324
  function formatCaption(month, options, dateLib) {
3270
- return (dateLib != null ? dateLib : new DateLib(options)).format(month, "LLLL y");
3325
+ const lib = dateLib != null ? dateLib : new DateLib(options);
3326
+ return lib.formatMonthYear(month);
3271
3327
  }
3272
3328
  var formatMonthCaption = formatCaption;
3273
3329
 
@@ -3411,7 +3467,8 @@ var labelDay = labelDayButton;
3411
3467
 
3412
3468
  // node_modules/react-day-picker/dist/esm/labels/labelGrid.js
3413
3469
  function labelGrid(date, options, dateLib) {
3414
- return (dateLib != null ? dateLib : new DateLib(options)).format(date, "LLLL y");
3470
+ const lib = dateLib != null ? dateLib : new DateLib(options);
3471
+ return lib.formatMonthYear(date);
3415
3472
  }
3416
3473
  var labelCaption = labelGrid;
3417
3474
 
@@ -4388,7 +4445,7 @@ function DayPicker(initialProps) {
4388
4445
  { value: contextValue },
4389
4446
  React32.createElement(
4390
4447
  components.Root,
4391
- __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"] }, dataAttributes),
4448
+ __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
4392
4449
  React32.createElement(
4393
4450
  components.Months,
4394
4451
  { className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
@@ -4413,8 +4470,12 @@ function DayPicker(initialProps) {
4413
4470
  React32.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")) ? React32.createElement(
4414
4471
  components.DropdownNav,
4415
4472
  { className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
4416
- captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React32.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : React32.createElement("span", null, formatMonthDropdown2(calendarMonth.date, dateLib)),
4417
- captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React32.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : React32.createElement("span", null, formatYearDropdown2(calendarMonth.date, dateLib)),
4473
+ (() => {
4474
+ const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React32.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : React32.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
4475
+ const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React32.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : React32.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
4476
+ const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
4477
+ return controls;
4478
+ })(),
4418
4479
  React32.createElement("span", { role: "status", "aria-live": "polite", style: {
4419
4480
  border: 0,
4420
4481
  clip: "rect(0 0 0 0)",
@@ -5518,7 +5579,6 @@ import { Asterisk } from "lucide-react";
5518
5579
 
5519
5580
  // src/components/input.tsx
5520
5581
  import * as React41 from "react";
5521
- import { Mail, Search, Eye, EyeOff } from "lucide-react";
5522
5582
  import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
5523
5583
  var Input = React41.forwardRef(
5524
5584
  (_a, ref) => {
@@ -5528,6 +5588,7 @@ var Input = React41.forwardRef(
5528
5588
  size = "md",
5529
5589
  leading,
5530
5590
  trailing,
5591
+ classNameDefault = true,
5531
5592
  invalid = false,
5532
5593
  disabled
5533
5594
  } = _b, props = __objRest(_b, [
@@ -5536,6 +5597,7 @@ var Input = React41.forwardRef(
5536
5597
  "size",
5537
5598
  "leading",
5538
5599
  "trailing",
5600
+ "classNameDefault",
5539
5601
  "invalid",
5540
5602
  "disabled"
5541
5603
  ]);
@@ -5571,7 +5633,6 @@ var Input = React41.forwardRef(
5571
5633
  className: cn(
5572
5634
  "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 opacity-60",
5573
5635
  size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
5574
- // no desplazamos visualmente en variantes sin padding
5575
5636
  variant === "flushed" || variant === "link" ? "hidden" : ""
5576
5637
  ),
5577
5638
  children: leading
@@ -5583,7 +5644,7 @@ var Input = React41.forwardRef(
5583
5644
  ref,
5584
5645
  "aria-invalid": invalid || void 0,
5585
5646
  disabled,
5586
- className: cn(
5647
+ className: classNameDefault ? cn(
5587
5648
  base,
5588
5649
  variants2[variant],
5589
5650
  variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
@@ -5591,7 +5652,7 @@ var Input = React41.forwardRef(
5591
5652
  iconPadLeft,
5592
5653
  iconPadRight,
5593
5654
  className
5594
- )
5655
+ ) : className
5595
5656
  }, props)
5596
5657
  ),
5597
5658
  trailing ? /* @__PURE__ */ jsx17(
@@ -5609,7 +5670,6 @@ var Input = React41.forwardRef(
5609
5670
  }
5610
5671
  );
5611
5672
  Input.displayName = "Input";
5612
- Input.displayName = "Input";
5613
5673
 
5614
5674
  // src/components/Form/form-field.tsx
5615
5675
  import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
@@ -5709,7 +5769,7 @@ var FormField = (_a) => {
5709
5769
  },
5710
5770
  placeholder,
5711
5771
  className: cn("bg-input px-[0.9rem] py-5", className),
5712
- classNameDefault: classNameDefault != null ? classNameDefault : true
5772
+ classNameDefault
5713
5773
  })
5714
5774
  ) }),
5715
5775
  fieldError && /* @__PURE__ */ jsx18(FormMessage, { className: messageClassName, children: fieldError })
@@ -6832,7 +6892,7 @@ function SearchInput({
6832
6892
  value: searchTerm,
6833
6893
  onChange: (event) => setSearchTerm(event.target.value),
6834
6894
  className: cn("w-full md:max-w-sm", className),
6835
- classNameDefault: classNameDefault != null ? classNameDefault : true
6895
+ classNameDefault
6836
6896
  }
6837
6897
  );
6838
6898
  }
@@ -7981,7 +8041,7 @@ function DataTableSkeleton({
7981
8041
  // src/shared/fileupload.tsx
7982
8042
  import { AvatarIcon } from "@radix-ui/react-icons";
7983
8043
  import { CameraIcon } from "lucide-react";
7984
- import { useEffect as useEffect5, useState as useState6 } from "react";
8044
+ import { useEffect as useEffect5, useState as useState5 } from "react";
7985
8045
  import { useDropzone } from "react-dropzone";
7986
8046
  import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
7987
8047
  function FileUpload({
@@ -8019,7 +8079,7 @@ function FileUpload({
8019
8079
  ) });
8020
8080
  }
8021
8081
  function ImagePreview({ file }) {
8022
- const [objectUrl, setObjectUrl] = useState6(null);
8082
+ const [objectUrl, setObjectUrl] = useState5(null);
8023
8083
  useEffect5(() => {
8024
8084
  const url = URL.createObjectURL(file);
8025
8085
  setObjectUrl(url);
package/dist/style.css CHANGED
@@ -773,9 +773,6 @@
773
773
  .gap-2 {
774
774
  gap: calc(var(--spacing) * 2);
775
775
  }
776
- .gap-3 {
777
- gap: calc(var(--spacing) * 3);
778
- }
779
776
  .gap-4 {
780
777
  gap: calc(var(--spacing) * 4);
781
778
  }
@@ -814,13 +811,6 @@
814
811
  margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));
815
812
  }
816
813
  }
817
- .space-y-8 {
818
- :where(& > :not(:last-child)) {
819
- --tw-space-y-reverse: 0;
820
- margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));
821
- margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));
822
- }
823
- }
824
814
  .space-x-1 {
825
815
  :where(& > :not(:last-child)) {
826
816
  --tw-space-x-reverse: 0;
@@ -2653,11 +2643,6 @@
2653
2643
  max-width: var(--container-sm);
2654
2644
  }
2655
2645
  }
2656
- .sm\:grid-cols-2 {
2657
- @media (width >= 40rem) {
2658
- grid-template-columns: repeat(2, minmax(0, 1fr));
2659
- }
2660
- }
2661
2646
  .sm\:flex-col {
2662
2647
  @media (width >= 40rem) {
2663
2648
  flex-direction: column;
@@ -2783,11 +2768,6 @@
2783
2768
  width: 250px;
2784
2769
  }
2785
2770
  }
2786
- .lg\:grid-cols-3 {
2787
- @media (width >= 64rem) {
2788
- grid-template-columns: repeat(3, minmax(0, 1fr));
2789
- }
2790
- }
2791
2771
  .lg\:gap-8 {
2792
2772
  @media (width >= 64rem) {
2793
2773
  gap: calc(var(--spacing) * 8);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadcn-ui-react",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "private": false,
5
5
  "author": "Bleker Cordova <bleker@gliyen.com>",
6
6
  "description": "A collection of components for building beautiful and accessible user interfaces with React and Tailwind CSS.",
@@ -63,19 +63,19 @@
63
63
  "@types/node": "^24.5.2",
64
64
  "@types/react": "^19.1.13",
65
65
  "@types/react-dom": "^19.1.9",
66
- "@typescript-eslint/eslint-plugin": "^8.44.0",
67
- "@typescript-eslint/parser": "^8.44.0",
66
+ "@typescript-eslint/eslint-plugin": "^8.44.1",
67
+ "@typescript-eslint/parser": "^8.44.1",
68
68
  "autoprefixer": "^10.4.21",
69
69
  "babel-jest": "^30.1.2",
70
70
  "cross-env": "^10.0.0",
71
71
  "eslint": "^9.36.0",
72
72
  "eslint-plugin-react-hooks": "^5.2.0",
73
- "eslint-plugin-react-refresh": "^0.4.20",
73
+ "eslint-plugin-react-refresh": "^0.4.21",
74
74
  "identity-obj-proxy": "^3.0.0",
75
75
  "jest": "^30.1.3",
76
76
  "jest-environment-jsdom": "^30.1.2",
77
77
  "react": "^19.1.1",
78
- "react-day-picker": "^9.10.0",
78
+ "react-day-picker": "^9.11.0",
79
79
  "react-dom": "^19.1.1",
80
80
  "react-test-renderer": "^19.1.1",
81
81
  "rimraf": "^6.0.1",
@@ -84,14 +84,14 @@
84
84
  "tsup": "^8.5.0",
85
85
  "typescript": "^5.9.2",
86
86
  "vaul": "^1.1.2",
87
- "vite": "^7.1.6",
87
+ "vite": "^7.1.7",
88
88
  "vite-plugin-dts": "^4.5.4",
89
89
  "vite-plugin-ts-alias": "^0.1.1",
90
- "zod": "^4.1.9"
90
+ "zod": "^4.1.11"
91
91
  },
92
92
  "peerDependencies": {
93
- "react": "^17.0.0 || ^18.3.1 || ^19.1.0 || ^20.0.0",
94
- "react-dom": "^17.0.0 || ^18.3.1 || ^19.1.0 || ^20.0.0"
93
+ "react": "^17.0.0 || ^18.3.1 || ^19.1.1 || ^20.0.0",
94
+ "react-dom": "^17.0.0 || ^18.3.1 || ^19.1.1 || ^20.0.0"
95
95
  },
96
96
  "publishConfig": {
97
97
  "access": "public"
@@ -132,12 +132,12 @@
132
132
  "clsx": "^2.1.1",
133
133
  "cmdk": "^1.1.1",
134
134
  "embla-carousel-react": "^8.6.0",
135
- "framer-motion": "^12.23.16",
135
+ "framer-motion": "^12.23.22",
136
136
  "input-otp": "^1.4.2",
137
137
  "lucide-react": "^0.544.0",
138
138
  "next-themes": "^0.4.6",
139
139
  "react-dropzone": "^14.3.8",
140
- "react-helmet-next": "^0.0.1",
140
+ "react-helmet-next": "^0.0.2",
141
141
  "react-hook-form": "^7.63.0",
142
142
  "react-resizable-panels": "^3.0.6",
143
143
  "sonner": "^2.0.7",