django-unfold 0.29.1__py3-none-any.whl → 0.30.0__py3-none-any.whl

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.
unfold/widgets.py CHANGED
@@ -23,6 +23,7 @@ from django.forms import (
23
23
  MultiWidget,
24
24
  NullBooleanSelect,
25
25
  NumberInput,
26
+ PasswordInput,
26
27
  Select,
27
28
  )
28
29
  from django.utils.translation import gettext_lazy as _
@@ -90,12 +91,10 @@ TEXTAREA_CLASSES = [
90
91
  "max-w-4xl",
91
92
  "appearance-none",
92
93
  "expandable",
93
- "overflow-hidden",
94
94
  "transition",
95
95
  "transition-height",
96
96
  "duration-75",
97
97
  "ease-in-out",
98
- "resize-none",
99
98
  ]
100
99
 
101
100
  TEXTAREA_EXPANDABLE_CLASSES = [
@@ -116,6 +115,7 @@ SELECT_CLASSES = [
116
115
 
117
116
  PROSE_CLASSES = [
118
117
  "font-normal",
118
+ "whitespace-normal",
119
119
  "prose-sm",
120
120
  "prose-blockquote:border-l-4",
121
121
  "prose-blockquote:not-italic",
@@ -567,3 +567,10 @@ class UnfoldForeignKeyRawIdWidget(ForeignKeyRawIdWidget):
567
567
  **(attrs or {}),
568
568
  }
569
569
  super().__init__(rel, admin_site, attrs, using)
570
+
571
+
572
+ class UnfoldAdminPasswordInput(PasswordInput):
573
+ def __init__(self, attrs=None, render_value=False):
574
+ super().__init__(
575
+ {"class": " ".join(INPUT_CLASSES), **(attrs or {})}, render_value
576
+ )