django-unfold 0.28.1__py3-none-any.whl → 0.29.1__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.
@@ -59,22 +59,28 @@
59
59
 
60
60
  {% if inline_admin_form.original or inline_admin_form.show_url %}
61
61
  <tr>
62
- <td class="original {% if inline_admin_form.original or inline_admin_form.show_url %}{% if inline_admin_form.original and inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model and inline_admin_formset.has_change_permission %}bg-gray-50 border-b border-gray-200 dark:bg-white/[.02] dark:border-gray-800{% endif %}{% endif %}" colspan="10">
62
+ <td class="original {% if inline_admin_form.original or inline_admin_form.show_url %}border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-white/[.02]{% endif %}" colspan="10">
63
63
  {% if inline_admin_form.original or inline_admin_form.show_url %}
64
- <p class="align-middle flex font-normal items-center leading-none px-3 text-gray-500 text-left text-sm whitespace-nowrap">
64
+ <p class="bg-gray-50 flex font-medium items-center px-3 py-2 text-gray-400 text-sm dark:bg-white/[.02] ">
65
65
  {% if inline_admin_form.original %}
66
+ <span class="font-semibold text-gray-900 dark:text-gray-200">
67
+ {{ inline_admin_form.original }}
68
+ </span>
69
+
66
70
  {% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}
67
- <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{% if inline_admin_formset.has_change_permission %}inlinechangelink py-1.5{% else %}inlineviewlink mt-3{% endif %} font-medium text-primary-600 underline text-xs">
68
- {{ inline_admin_form.original }}
71
+ <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{{ inline_admin_formset.has_change_permission|yesno:'inlinechangelink,inlineviewlink' }} font-medium ml-2 text-primary-600 underline dark:text-primary-500">
72
+ {% if inline_admin_formset.has_change_permission %}
73
+ {% translate "Change" %}
74
+ {% else %}
75
+ {% translate "View" %}
76
+ {% endif %}
69
77
  </a>
70
78
  {% endif %}
71
- {% else %}
72
- {{ inline_admin_form.original }}
73
79
  {% endif %}
74
80
 
75
81
  {% if inline_admin_form.show_url %}
76
- <a href="{{ inline_admin_form.absolute_url }}" class="ml-1 mt-3">
77
- <span class="material-symbols-outlined h-4 md-16 text-primary-600">launch</span>
82
+ <a href="{{ inline_admin_form.absolute_url }}" class="font-medium ml-2 text-primary-600 underline dark:text-primary-500">
83
+ {% translate "View on site" %}
78
84
  </a>
79
85
  {% endif %}
80
86
  </p>
@@ -110,7 +116,7 @@
110
116
  {% with is_last_col=forloop.last %}
111
117
  {% for field in line %}
112
118
  {% if field.is_readonly or not field.field.is_hidden %}
113
- <td{% if field.field.name %} class="field-{{ field.field.name }}{% if field.field.errors|length > 0 %} errors{% endif %}{% if inline_admin_form.original %} p-3 lg:py-3{% else %} py-3{% endif %}{% if field.is_checkbox %} align-middle{% else %} align-top{% endif %} {% if is_last_row and not inline_admin_formset.has_add_permission %}{% if is_last_col %}border-0 {% else %}border-b lg:border-0{% endif %}{% else %}border-b{% endif %} border-gray-200 flex items-center before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 before:w-72 lg:before:hidden font-normal px-3 text-left text-sm lg:table-cell dark:border-gray-800 {% if field.field.is_hidden %} !hidden{% endif %}"{% endif %} data-label="{{ field.field.label }}">
119
+ <td{% if field.field.name %} class="field-{{ field.field.name }} group field-tabular {% if field.field.errors|length > 0 %} errors{% endif %}{% if inline_admin_form.original %} p-3 lg:py-3{% else %} py-3{% endif %}{% if field.is_checkbox %} align-middle{% else %} align-top{% endif %} {% if is_last_row and not inline_admin_formset.has_add_permission %}{% if is_last_col %}border-0 {% else %}border-b lg:border-0{% endif %}{% else %}border-b{% endif %} border-gray-200 flex items-center before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 before:pr-4 lg:before:hidden font-normal px-3 text-left text-sm lg:table-cell dark:border-gray-800 {% if field.field.is_hidden %} !hidden{% endif %}"{% endif %} data-label="{{ field.field.label }}">
114
120
  {% if field.is_readonly %}
115
121
  {% include "unfold/helpers/field_readonly_value.html" with tabular=1 %}
116
122
  {% else %}
@@ -132,7 +138,7 @@
132
138
  {% endfor %}
133
139
 
134
140
  {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
135
- <td class="delete {% if inline_admin_form.original %}p-3 lg:py-3{% else %}py-3{% endif %} text-left font-normal px-3 text-sm text-red-600 border-b border-gray-200 flex items-center before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 before:w-72 lg:before:hidden font-normal px-3 text-sm lg:align-top lg:table-cell lg:underline lg:w-px dark:border-gray-800" data-label="{% trans "Remove" %}">
141
+ <td class="delete {% if inline_admin_form.original %}p-3 lg:py-3{% else %}py-3{% endif %} text-left text-red-600 border-b border-gray-200 flex items-center before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 before:pr-4 lg:before:hidden font-normal px-3 text-sm lg:align-top lg:table-cell lg:underline lg:w-px dark:border-gray-800" data-label="{% trans "Remove" %}">
136
142
  {% if inline_admin_form.original %}
137
143
  <div class="flex flex-row lg:mt-3">
138
144
  <div class="ml-auto">
@@ -14,7 +14,7 @@
14
14
  {% if spec|class_name == "BooleanFieldListFilter" %}
15
15
  <ul class="border-l-4 border-gray-200 flex pl-4 py-2 text-gray-500 text-sm dark:border-gray-700">
16
16
  {% for choice in choices %}
17
- <li class="{% if choice.selected %}font-medium text-primary-500 underline dark{% else %}text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200{% endif %} pr-4">
17
+ <li class="{% if choice.selected %}font-medium text-primary-600 dark:text-primary-500 underline dark{% else %}text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200{% endif %} pr-4">
18
18
  <a href="{{ choice.query_string|iriencode }}" title="{{ choice.display }}">
19
19
  {{ choice.display }}
20
20
  </a>
@@ -24,7 +24,7 @@
24
24
  {% else %}
25
25
  <ul class="border-l-4 border-gray-200 flex flex-col pl-4 py-4 text-gray-500 text-sm dark:border-gray-700">
26
26
  {% for choice in choices %}
27
- <li class="mb-4 last:mb-0 {% if choice.selected %}font-medium text-primary-500 underline {% else %}text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200{% endif %}">
27
+ <li class="mb-4 last:mb-0 {% if choice.selected %}font-medium text-primary-600 dark:text-primary-500 underline {% else %}text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200{% endif %}">
28
28
  <a href="{{ choice.query_string|iriencode }}" title="{{ choice.display }}">
29
29
  {{ choice.display }}
30
30
  </a>
@@ -29,7 +29,7 @@
29
29
  <div class="w-full sm:w-96">
30
30
  <h1 class="font-semibold mb-10">
31
31
  <span class="block text-gray-700 dark:text-gray-200">{% trans 'Welcome back to' %}</span>
32
- <span class="block text-primary-600 text-xl">{{ site_title }}</span>
32
+ <span class="block text-primary-600 text-xl dark:text-primary-500">{{ site_title }}</span>
33
33
  </h1>
34
34
 
35
35
  {% include "unfold/helpers/messages/errornote.html" with errors=form.errors %}
@@ -78,7 +78,7 @@
78
78
 
79
79
  <div class="absolute flex flex-row items-center justify-between left-0 m-4 right-0 top-0">
80
80
  {% if site_url %}
81
- <a href="{{ site_url }}" class="flex font-medium items-center text-sm text-primary-600">
81
+ <a href="{{ site_url }}" class="flex font-medium items-center text-sm text-primary-600 dark:text-primary-500">
82
82
  <span class="material-symbols-outlined mr-2">arrow_back</span> {% trans 'Return to site' %}
83
83
  </a>
84
84
  {% endif %}
@@ -4,7 +4,7 @@
4
4
  <div @click="sidebarDesktopOpen = !sidebarDesktopOpen"
5
5
  hx-get="{% url "admin:toggle_sidebar" %}"
6
6
  hx-swap="none"
7
- class="block bg-white border cursor-pointer fixed flex h-6 hidden items-center justify-center rounded-full text-gray-500 top-5 -translate-x-1/2 w-6 z-50 xl:flex dark:bg-gray-800 dark:border-gray-700 dark:text-gray-200"
7
+ class="bg-white border cursor-pointer fixed h-6 hidden items-center justify-center rounded-full text-gray-500 top-5 -translate-x-1/2 w-6 z-50 xl:flex dark:bg-gray-800 dark:border-gray-700 dark:text-gray-200"
8
8
  :class="{'ml-6 rotate-180': !sidebarDesktopOpen, 'ml-72': sidebarDesktopOpen}">
9
9
  <span class="material-symbols-outlined md-16">
10
10
  first_page
@@ -12,7 +12,7 @@
12
12
  </div>
13
13
 
14
14
  <div @click="sidebarMobileOpen = !sidebarMobileOpen"
15
- class="fixed bottom-0 bg-gray-700 flex cursor-pointer flex items-center left-0 mb-2 ml-2 justify-center px-2 py-1 rounded-full shadow-sm text-xs text-white uppercase z-50 xl:hidden"
15
+ class="fixed bottom-0 bg-gray-700 cursor-pointer flex items-center left-0 mb-2 ml-2 justify-center px-2 py-1 rounded-full shadow-sm text-xs text-white uppercase z-50 xl:hidden"
16
16
  :class="{'ml-72 -translate-x-1/2': sidebarMobileOpen}">
17
17
  {% trans "Menu" %}
18
18
  </div>
@@ -0,0 +1,3 @@
1
+ <button {% if submit %}type="submit"{% endif%} class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded-md text-sm text-white">
2
+ {{ children }}
3
+ </button>
@@ -5,7 +5,7 @@
5
5
  <span class="material-symbols-outlined">person</span>
6
6
  </a>
7
7
 
8
- <nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-52 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400" x-cloak x-show="openUserLinks" @click.outside="openUserLinks = false">
8
+ <nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-52 z-50 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400" x-cloak x-show="openUserLinks" @click.outside="openUserLinks = false">
9
9
  <div class="border-b border-gray-100 flex flex-row flex-shrink-0 items-start justify-start mb-1 pb-1 dark:border-gray-700">
10
10
  <span class="block mx-1 px-3 py-2 truncate">
11
11
  {% firstof user.get_short_name user.get_username %}
@@ -1 +1 @@
1
- <div class="readonly font-medium max-w-4xl py-2 text-gray-500 text-sm truncate dark:text-gray-400 *:rounded-md {% if not adminform.model_admin.compressed_fields or tabular and not field.is_image %}bg-gray-50 border px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
1
+ <div class="readonly font-medium max-w-4xl py-2 text-gray-500 text-sm truncate dark:text-gray-400 *:rounded-md {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-gray-50 border px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded-md !py-0{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
@@ -6,27 +6,53 @@
6
6
  {% for field in line %}
7
7
  <div class="flex group {% if adminform.model_admin.compressed_fields %} field-row{% endif %}{% if not line.fields|length == 1 and not adminform.model_admin.compressed_fields %} lg:max-w-xs flex-grow{% endif %}{% if field.errors %} errors {% endif %}{% if not forloop.parentloop.last %} {% if adminform.model_admin.compressed_fields %}mb-3{% else %}mb-6{% endif %}{% else %} pb-3{% endif %} {% if adminform.model_admin.compressed_fields %}flex-col lg:flex-row lg:gap-2 {% else %}flex-col{% endif %}">
8
8
  {% if field.is_checkbox %}
9
- <div class="flex flex-row">
10
- {{ field.field }}
11
-
12
- <div class="flex flex-col">
13
- {{ field.label_tag }}
14
-
15
- {% if field.field.help_text %}
16
- <div class="ml-2 -mt-1">
17
- {% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
18
- </div>
19
- {% endif %}
20
-
21
- {% if field.errors %}
22
- <span class="mt-1 text-red-600 text-sm dark:text-red-500">
23
- {{ field.errors }}
24
- </span>
25
- {% endif %}
9
+ {% if adminform.model_admin.compressed_fields %}
10
+ <div class="flex flex-row gap-4">
11
+ <div class="font-medium h-5 flex items-start -ml-2 min-w-32 w-32 lg:min-w-48 lg:w-48">
12
+ {{ field.label_tag }}
13
+ </div>
14
+
15
+ <div class="flex-grow">
16
+ <div class="flex flex-col lg:flex-row">
17
+ {{ field.field }}
18
+
19
+ {% if field.field.help_text %}
20
+ <div class="lg:-mt-2 lg:ml-2">
21
+ {% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
22
+ </div>
23
+ {% endif %}
24
+ </div>
25
+
26
+ {% if field.errors %}
27
+ <span class="mt-1 text-red-600 text-sm dark:text-red-500">
28
+ {{ field.errors }}
29
+ </span>
30
+ {% endif %}
31
+ </div>
26
32
  </div>
27
- </div>
33
+ {% else %}
34
+ <div class="flex flex-row">
35
+ {{ field.field }}
36
+
37
+ <div class="flex flex-col">
38
+ {{ field.label_tag }}
39
+
40
+ {% if field.field.help_text %}
41
+ <div class="ml-2 -mt-1">
42
+ {% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
43
+ </div>
44
+ {% endif %}
45
+
46
+ {% if field.errors %}
47
+ <span class="mt-1 text-red-600 text-sm dark:text-red-500">
48
+ {{ field.errors }}
49
+ </span>
50
+ {% endif %}
51
+ </div>
52
+ </div>
53
+ {% endif %}
28
54
  {% else %}
29
- <div class="{% if adminform.model_admin.compressed_fields %} min-w-48 mt-2 w-48{% endif %}">
55
+ <div class="{% if adminform.model_admin.compressed_fields %} min-w-48 lg:mt-2 w-48{% endif %}">
30
56
  {{ field.label_tag }}
31
57
  </div>
32
58
 
@@ -1,23 +1,25 @@
1
1
  {% load i18n %}
2
2
 
3
3
  <div class="relative min-w-sidebar transition-width w-sidebar z-30">
4
- <nav id="nav-sidebar" class="bg-gray-50 border-r border-gray-200 flex flex-col fixed max-h-screen min-h-screen min-w-sidebar transition-width w-sidebar dark:bg-gray-950/20 dark:border-gray-800">
5
- <div class="border-b border-gray-200 mb-5 py-3 dark:border-gray-800">
6
- <div class="flex font-medium h-10 items-center px-6 text-gray-700 dark:text-gray-200">
7
- {% if site_logo %}
8
- {% include "unfold/helpers/site_logo.html" %}
9
- {% elif branding %}
10
- {% include "unfold/helpers/site_icon.html" %}
11
- {% endif %}
4
+ <nav id="nav-sidebar" class="bg-gray-50 border-r border-gray-200 fixed max-h-screen transition-width w-sidebar dark:bg-gray-900 dark:border-gray-800">
5
+ <div class="flex flex-col min-h-screen min-w-sidebar dark:bg-gray-950/20">
6
+ <div class="border-b border-gray-200 mb-5 py-3 dark:border-gray-800">
7
+ <div class="flex font-medium h-10 items-center px-6 text-gray-700 dark:text-gray-200">
8
+ {% if site_logo %}
9
+ {% include "unfold/helpers/site_logo.html" %}
10
+ {% elif branding %}
11
+ {% include "unfold/helpers/site_icon.html" %}
12
+ {% endif %}
13
+ </div>
12
14
  </div>
13
- </div>
14
15
 
15
- {% include "unfold/helpers/search.html" %}
16
+ {% include "unfold/helpers/search.html" %}
16
17
 
17
- {% if sidebar_navigation|length > 0 %}
18
- {% include "unfold/helpers/app_list.html" with app_list=available_apps %}
19
- {% else %}
20
- {% include "admin/app_list.html" with app_list=available_apps show_changelinks=False %}
21
- {% endif %}
18
+ {% if sidebar_navigation|length > 0 %}
19
+ {% include "unfold/helpers/app_list.html" with app_list=available_apps %}
20
+ {% else %}
21
+ {% include "admin/app_list.html" with app_list=available_apps show_changelinks=False %}
22
+ {% endif %}
23
+ </div>
22
24
  </nav>
23
25
  </div>
@@ -1,5 +1,5 @@
1
1
  <li class="border-b flex-grow text-center md:border-b-0 md:border-r last:border-0 dark:border-gray-800">
2
- <a href="{{ link }}" class="block px-4 py-2 text-gray-500 text-left whitespace-nowrap hover:text-gray-700 dark:text-gray-400 hover:dark:text-gray-200"{% if blank %} target="_blank"{% endif %}>
2
+ <a href="{{ link }}" class="block px-4 py-2 text-gray-500 text-left whitespace-nowrap hover:text-gray-700 dark:text-gray-400 hover:dark:text-gray-200"{% if blank %} target="_blank"{% endif %} {% include "unfold/helpers/attrs.html" with attrs=action.attrs %}>
3
3
  {{ title }}
4
4
  </a>
5
5
  </li>
@@ -1,5 +1,5 @@
1
1
  {% if not is_popup %}
2
- {% if tab_list or actions_list or actions_items or nav_global %}
2
+ {% if tab_list or actions_list or actions_detail or actions_items or nav_global %}
3
3
  <div class="flex items-start flex-col mb-4 text-gray-500 text-sm w-full md:border-b dark:md:border-gray-800 md:border-l-0 md:flex-row md:items-center md:justify-end dark:text-gray-400">
4
4
  {% if tab_list %}
5
5
  <ul class="border rounded-md flex flex-col w-full md:flex-row md:border-b-0 md:border-t-0 md:border-l-0 md:border-r-0 dark:border-gray-800">
@@ -15,12 +15,16 @@
15
15
  </ul>
16
16
  {% endif %}
17
17
 
18
- {% if actions_list or actions_items or nav_global %}
18
+ {% if actions_list or actions_detail or actions_items or nav_global %}
19
19
  <ul class="border flex flex-col mb-4 mt-2 rounded-md shadow-sm md:flex-row md:mb-2 md:mt-0 dark:border-gray-800 max-md:w-full">
20
20
  {% for action in actions_list %}
21
21
  {% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
22
22
  {% endfor %}
23
23
 
24
+ {% for action in actions_detail %}
25
+ {% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
26
+ {% endfor %}
27
+
24
28
  {% if actions_items %}
25
29
  {{ actions_items }}
26
30
  {% endif %}
@@ -7,7 +7,7 @@
7
7
  </span>
8
8
  </a>
9
9
 
10
- <nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-40 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400" x-cloak x-show="openTheme" @click.outside="openTheme = false">
10
+ <nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-40 z-50 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400" x-cloak x-show="openTheme" @click.outside="openTheme = false">
11
11
  <a class="cursor-pointer flex flex-row leading-none mx-1 px-3 py-1.5 rounded hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-gray-200"
12
12
  x-on:click="adminTheme = 'dark'"
13
13
  x-bind:class="adminTheme == 'dark' && 'text-primary-600 dark:text-primary-500 dark:hover:!text-primary-500 hover:!text-primary-600'">
@@ -1,4 +1,4 @@
1
- <div class="flex flex-row">
1
+ <div class="flex flex-row flex-grow">
2
2
  {% include 'django/forms/widgets/input.html' %}
3
3
 
4
4
  {% if related_url %}
@@ -1,23 +1,23 @@
1
- <div class="datetime flex flex-col gap-2 max-w-2xl lg:flex-row group-[.field-row]:flex-row group-[.field-row]:items-center">
2
- <div class="basis-1/2 flex flex-col flex-wrap mb-4 lg:mb-0 group-[.field-row]:flex-row group-[.field-row]:gap-2">
3
- <div class="font-medium mb-2 text-gray-500 text-sm dark:text-gray-400 group-[.field-row]:mb-0 group-[.field-row]:flex group-[.field-row]:items-center">
1
+ <div class="datetime flex flex-col gap-2 max-w-2xl lg:flex-row lg:group-[.field-row]:flex-row lg:group-[.field-row]:items-center lg:group-[.field-tabular]:flex-row lg:group-[.field-tabular]:items-center">
2
+ <div class="basis-1/2 flex flex-col lg:group-[.field-row]:flex-row group-[.field-row]:gap-2 lg:group-[.field-tabular]:flex-row group-[.field-tabular]:gap-2">
3
+ <div class="font-medium mb-2 text-gray-500 text-sm dark:text-gray-400 group-[.field-row]:mb-0 group-[.field-row]:flex group-[.field-row]:items-center group-[.field-tabular]:mb-0 group-[.field-tabular]:flex group-[.field-tabular]:items-center">
4
4
  {{ date_label }}
5
5
  </div>
6
6
 
7
7
  {% with widget=widget.subwidgets.0 %}
8
- <div class="flex flex-col relative group-[.field-row]:flex-grow">
8
+ <div class="flex flex-col min-w-52 relative group-[.field-row]:flex-grow group-[.field-tabular]:flex-grow">
9
9
  {% include widget.template_name %}
10
10
  </div>
11
11
  {% endwith %}
12
12
  </div>
13
13
 
14
- <div class="basis-1/2 flex flex-col flex-wrap lg:ml-auto mt-3 md:mt-0 group-[.field-row]:flex-row group-[.field-row]:gap-2">
15
- <div class="font-medium mb-2 text-gray-500 text-sm dark:text-gray-400 group-[.field-row]:mb-0 group-[.field-row]:flex group-[.field-row]:items-center">
14
+ <div class="basis-1/2 flex flex-col lg:ml-auto md:mt-0 lg:group-[.field-row]:flex-row group-[.field-row]:gap-2 lg:group-[.field-tabular]:flex-row group-[.field-tabular]:gap-2">
15
+ <div class="font-medium mb-2 text-gray-500 text-sm dark:text-gray-400 group-[.field-row]:mb-0 group-[.field-row]:flex group-[.field-row]:items-center group-[.field-tabular]:mb-0 group-[.field-tabular]:flex group-[.field-tabular]:items-center">
16
16
  {{ time_label }}
17
17
  </div>
18
18
 
19
19
  {% with widget=widget.subwidgets.1 %}
20
- <div class="flex flex-col relative group-[.field-row]:flex-grow">
20
+ <div class="flex flex-col min-w-52 relative group-[.field-row]:flex-grow group-[.field-tabular]:flex-grow">
21
21
  {% include widget.template_name %}
22
22
  </div>
23
23
  {% endwith %}
@@ -26,6 +26,7 @@ def tab_list(context, opts) -> str:
26
26
  context={
27
27
  "tab_list": tabs,
28
28
  "nav_global": context.get("nav_global"),
29
+ "actions_detail": context.get("actions_detail"),
29
30
  "actions_list": context.get("actions_list"),
30
31
  "actions_items": context.get("actions_items"),
31
32
  "is_popup": context.get("is_popup"),
unfold/widgets.py CHANGED
@@ -49,6 +49,7 @@ BASE_CLASSES = [
49
49
  "border",
50
50
  "bg-white",
51
51
  "font-medium",
52
+ "min-w-20",
52
53
  "rounded-md",
53
54
  "shadow-sm",
54
55
  "text-gray-500",
@@ -78,6 +79,8 @@ BASE_INPUT_CLASSES = [
78
79
 
79
80
  INPUT_CLASSES = [*BASE_INPUT_CLASSES, "max-w-2xl"]
80
81
 
82
+ DATETIME_CLASSES = [*BASE_INPUT_CLASSES, "min-w-52"]
83
+
81
84
  COLOR_CLASSES = [*BASE_CLASSES, "h-9.5", "px-2", "py-2", "w-32"]
82
85
 
83
86
  INPUT_CLASSES_READONLY = [*BASE_INPUT_CLASSES, "bg-gray-50"]
@@ -227,6 +230,7 @@ SWITCH_CLASSES = [
227
230
  "rounded-full",
228
231
  "transition-all",
229
232
  "w-8",
233
+ "min-w-8",
230
234
  "after:absolute",
231
235
  "after:bg-white",
232
236
  "after:content-['']",
@@ -321,7 +325,7 @@ class UnfoldAdminDateWidget(AdminDateWidget):
321
325
  self, attrs: Optional[Dict[str, Any]] = None, format: Optional[str] = None
322
326
  ) -> None:
323
327
  attrs = {
324
- "class": "vDateField " + " ".join(INPUT_CLASSES),
328
+ "class": "vDateField " + " ".join(DATETIME_CLASSES),
325
329
  "size": "10",
326
330
  **(attrs or {}),
327
331
  }
@@ -335,7 +339,7 @@ class UnfoldAdminSingleDateWidget(AdminDateWidget):
335
339
  self, attrs: Optional[Dict[str, Any]] = None, format: Optional[str] = None
336
340
  ) -> None:
337
341
  attrs = {
338
- "class": "vDateField " + " ".join(INPUT_CLASSES),
342
+ "class": "vDateField " + " ".join(DATETIME_CLASSES),
339
343
  "size": "10",
340
344
  **(attrs or {}),
341
345
  }
@@ -347,7 +351,7 @@ class UnfoldAdminTimeWidget(AdminTimeWidget):
347
351
  self, attrs: Optional[Dict[str, Any]] = None, format: Optional[str] = None
348
352
  ) -> None:
349
353
  attrs = {
350
- "class": "vTimeField " + " ".join(INPUT_CLASSES),
354
+ "class": "vTimeField " + " ".join(DATETIME_CLASSES),
351
355
  "size": "8",
352
356
  **(attrs or {}),
353
357
  }
@@ -361,7 +365,7 @@ class UnfoldAdminSingleTimeWidget(AdminTimeWidget):
361
365
  self, attrs: Optional[Dict[str, Any]] = None, format: Optional[str] = None
362
366
  ) -> None:
363
367
  attrs = {
364
- "class": "vTimeField " + " ".join(INPUT_CLASSES),
368
+ "class": "vTimeField " + " ".join(DATETIME_CLASSES),
365
369
  "size": "8",
366
370
  **(attrs or {}),
367
371
  }