@codapet/design-system 0.7.1 → 0.7.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.mjs CHANGED
@@ -477,6 +477,29 @@ var AutoResizeTextarea = React7.forwardRef(
477
477
  React7.useLayoutEffect(() => {
478
478
  resize();
479
479
  }, [resize, value]);
480
+ React7.useLayoutEffect(() => {
481
+ const el = innerRef.current;
482
+ if (!el) return;
483
+ const descriptor = Object.getOwnPropertyDescriptor(
484
+ window.HTMLTextAreaElement.prototype,
485
+ "value"
486
+ );
487
+ if (!descriptor?.get || !descriptor?.set) return;
488
+ const { get, set } = descriptor;
489
+ Object.defineProperty(el, "value", {
490
+ configurable: true,
491
+ get() {
492
+ return get.call(this);
493
+ },
494
+ set(v) {
495
+ set.call(this, v);
496
+ resize();
497
+ }
498
+ });
499
+ return () => {
500
+ delete el.value;
501
+ };
502
+ }, [resize]);
480
503
  return /* @__PURE__ */ jsx8(
481
504
  Textarea,
482
505
  {
@@ -2604,10 +2627,7 @@ function DateInput({
2604
2627
  showOutsideDays,
2605
2628
  startMonth: dropdownStartMonth,
2606
2629
  endMonth: dropdownEndMonth,
2607
- className: cn(
2608
- "w-auto mx-auto overflow-y-auto h-auto m-2",
2609
- calendarClassName
2610
- ),
2630
+ className: cn("w-auto mx-auto h-auto sm:m-2", calendarClassName),
2611
2631
  classNames,
2612
2632
  components,
2613
2633
  formatters,