@melv1c/ui-kit 1.5.0 → 1.5.3

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.d.cts CHANGED
@@ -494,9 +494,15 @@ interface DateTimePickerProps {
494
494
  */
495
495
  showClear?: boolean;
496
496
  /**
497
- * Disable the picker
497
+ * Disable the entire picker
498
498
  */
499
499
  disabled?: boolean;
500
+ /**
501
+ * Apply the disabled modifier to matching days.
502
+ * Supports Date, Date[], DateRange, DateBefore, DateAfter, DateInterval, DayOfWeek, or a function.
503
+ * @see https://daypicker.dev/selections/disabling-dates
504
+ */
505
+ disabledDates?: React.ComponentProps<typeof DayPicker>["disabled"];
500
506
  /**
501
507
  * Custom className for the container
502
508
  */
@@ -506,7 +512,7 @@ interface DateTimePickerProps {
506
512
  */
507
513
  formatDateTime?: (date: Date) => string;
508
514
  }
509
- declare function DateTimePicker({ value, onChange, label, placeholder, showClear, disabled, className, formatDateTime, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
515
+ declare function DateTimePicker({ value, onChange, label, placeholder, showClear, disabled, disabledDates, className, formatDateTime, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
510
516
 
511
517
  declare const appleIconVariants: (props?: ({
512
518
  variant?: "default" | "transparent" | "dark" | "light" | null | undefined;
package/dist/index.d.ts CHANGED
@@ -494,9 +494,15 @@ interface DateTimePickerProps {
494
494
  */
495
495
  showClear?: boolean;
496
496
  /**
497
- * Disable the picker
497
+ * Disable the entire picker
498
498
  */
499
499
  disabled?: boolean;
500
+ /**
501
+ * Apply the disabled modifier to matching days.
502
+ * Supports Date, Date[], DateRange, DateBefore, DateAfter, DateInterval, DayOfWeek, or a function.
503
+ * @see https://daypicker.dev/selections/disabling-dates
504
+ */
505
+ disabledDates?: React.ComponentProps<typeof DayPicker>["disabled"];
500
506
  /**
501
507
  * Custom className for the container
502
508
  */
@@ -506,7 +512,7 @@ interface DateTimePickerProps {
506
512
  */
507
513
  formatDateTime?: (date: Date) => string;
508
514
  }
509
- declare function DateTimePicker({ value, onChange, label, placeholder, showClear, disabled, className, formatDateTime, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
515
+ declare function DateTimePicker({ value, onChange, label, placeholder, showClear, disabled, disabledDates, className, formatDateTime, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
510
516
 
511
517
  declare const appleIconVariants: (props?: ({
512
518
  variant?: "default" | "transparent" | "dark" | "light" | null | undefined;
package/dist/index.js CHANGED
@@ -4361,6 +4361,7 @@ function DateTimePicker({
4361
4361
  placeholder = "Select date and time",
4362
4362
  showClear = true,
4363
4363
  disabled = false,
4364
+ disabledDates,
4364
4365
  className,
4365
4366
  formatDateTime
4366
4367
  }) {
@@ -4453,7 +4454,7 @@ function DateTimePicker({
4453
4454
  selected: date,
4454
4455
  captionLayout: "dropdown",
4455
4456
  onSelect: handleDateChange,
4456
- disabled
4457
+ disabled: disabledDates
4457
4458
  }
4458
4459
  ),
4459
4460
  /* @__PURE__ */ jsxs("div", { className: "border-t p-3", children: [
@@ -4466,7 +4467,7 @@ function DateTimePicker({
4466
4467
  step: "60",
4467
4468
  value: formatTimeValue(date),
4468
4469
  onChange: handleTimeChange,
4469
- disabled,
4470
+ disabled: !date || disabled,
4470
4471
  className: "bg-background h-8 appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
4471
4472
  }
4472
4473
  )