django-unfold 0.56.0__py3-none-any.whl → 0.58.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.
Files changed (45) hide show
  1. {django_unfold-0.56.0.dist-info → django_unfold-0.58.0.dist-info}/METADATA +1 -1
  2. {django_unfold-0.56.0.dist-info → django_unfold-0.58.0.dist-info}/RECORD +45 -41
  3. unfold/contrib/import_export/templates/admin/import_export/base.html +1 -5
  4. unfold/contrib/import_export/templates/admin/import_export/import_form.html +1 -1
  5. unfold/contrib/simple_history/templates/simple_history/object_history_form.html +1 -1
  6. unfold/decorators.py +1 -2
  7. unfold/forms.py +3 -2
  8. unfold/layout.py +19 -1
  9. unfold/sites.py +64 -41
  10. unfold/static/unfold/css/styles.css +2 -2
  11. unfold/styles.css +66 -117
  12. unfold/templates/admin/actions.html +1 -1
  13. unfold/templates/admin/auth/user/change_password.html +1 -1
  14. unfold/templates/admin/submit_line.html +7 -7
  15. unfold/templates/registration/password_change_done.html +1 -1
  16. unfold/templates/registration/password_change_form.html +1 -1
  17. unfold/templates/unfold/components/card.html +23 -23
  18. unfold/templates/unfold/components/progress.html +9 -7
  19. unfold/templates/unfold/components/table.html +5 -5
  20. unfold/templates/unfold/helpers/change_list_filter_actions.html +1 -1
  21. unfold/templates/unfold/helpers/edit_inline/tabular_field.html +1 -1
  22. unfold/templates/unfold/helpers/field.html +2 -2
  23. unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
  24. unfold/templates/unfold/helpers/fieldset_row_checkbox.html +2 -2
  25. unfold/templates/unfold/helpers/fieldset_row_field.html +2 -2
  26. unfold/templates/unfold/helpers/form_errors.html +1 -1
  27. unfold/templates/unfold/helpers/messages/errornote.html +1 -5
  28. unfold/templates/unfold/helpers/navigation.html +1 -1
  29. unfold/templates/unfold/layouts/skeleton.html +1 -1
  30. unfold/templates/unfold/widgets/clearable_file_input.html +3 -3
  31. unfold/templates/unfold/widgets/clearable_file_input_small.html +1 -1
  32. unfold/templates/unfold/widgets/select.html +9 -0
  33. unfold/templates/unfold_crispy/errors_formset.html +3 -0
  34. unfold/templates/unfold_crispy/field.html +1 -1
  35. unfold/templates/unfold_crispy/inputs.html +1 -1
  36. unfold/templates/unfold_crispy/layout/checkbox.html +2 -2
  37. unfold/templates/unfold_crispy/layout/field_errors.html +5 -5
  38. unfold/templates/unfold_crispy/layout/fieldset.html +1 -1
  39. unfold/templates/unfold_crispy/layout/hr.html +13 -0
  40. unfold/templates/unfold_crispy/layout/table_inline_formset.html +23 -19
  41. unfold/templates/unfold_crispy/whole_uni_formset.html +30 -0
  42. unfold/templatetags/unfold.py +14 -0
  43. unfold/widgets.py +32 -2
  44. {django_unfold-0.56.0.dist-info → django_unfold-0.58.0.dist-info}/LICENSE.md +0 -0
  45. {django_unfold-0.56.0.dist-info → django_unfold-0.58.0.dist-info}/WHEEL +0 -0
unfold/styles.css CHANGED
@@ -2,19 +2,29 @@
2
2
  @plugin '@tailwindcss/typography';
3
3
  @custom-variant dark (&:where(.dark, .dark *));
4
4
  @source inline("h-3 w-3 h-[64px] w-[65px]! left-[65px] dark:hover:bg-white/[.06] translate-x-1/4 -translate-y-1/4");
5
- @source inline("{-,}{top,bottom,left,right}-{0..4}");
6
- @source inline("rounded-{t,r,b,l}-default");
5
+ @source inline("{-,}{top,bottom,left,right}-{0..6}");
6
+ @source inline("rounded rounded-{t,r,b,l} rounded-{t,r,b,l}-default");
7
7
  @source inline("{md:,lg:,2xl:,}relative {md:,lg:,2xl:,}flex {md:,lg:,2xl:,}absolute {md:,lg:,2xl:,}sticky");
8
- @source inline("{-,}m{t,r,b,l,x,y,}-{0..4} {-,}p{t,r,b,l,x,y,}-{0..4}");
8
+ @source inline("{-,}m{t,r,b,l,x,y,}-{0..6} {-,}p{t,r,b,l,x,y,}-{0..6}");
9
9
  @source inline("{md:,lg:,}border-{0,2} {md:,lg:,}border-{t,r,b,l}-{0,2}");
10
10
  @source inline("{hover:,dark:,}bg-primary-{50,{100..900..100},950}");
11
11
  @source inline("{hover:,dark:,}border-base-{50,{100..900..100},950} {hover:,dark:,}border-transparent");
12
12
  @source inline("{hover:,dark:,}bg-base-{50,{100..900..100},950}");
13
- @source inline("{md:,lg:,}w-{1/2,1/3,2/3,1/4,2/4,3/4,1/5,2/5,3/5,4/5}");
13
+ @source inline("{md:,lg:,}w-{1/2,1/3,2/3,1/4,2/4,3/4,1/5,2/5,3/5,4/5,1/6,2/6,3/6,4/6,5/6,1/7,2/7,3/7,4/7,5/7,6/7}");
14
14
  @source inline("{md:,lg:,}gap-{0.5,{1..12}}");
15
15
  @source inline("{md:,lg:,}grid-cols-{1..12}");
16
16
  @source inline("{md:,lg:,}col-span-{1..12}");
17
17
 
18
+ @layer base {
19
+ *,
20
+ ::after,
21
+ ::before,
22
+ ::backdrop,
23
+ ::file-selector-button {
24
+ border-color: var(--color-gray-200, currentColor);
25
+ }
26
+ }
27
+
18
28
  @theme {
19
29
  --font-sans: 'Inter', sans-serif;
20
30
  }
@@ -90,6 +100,10 @@
90
100
  font-size: 18px;
91
101
  }
92
102
 
103
+ .errorlist {
104
+ @apply *:before:align-bottom *:before:content-['warning'] *:before:material-symbols-outlined *:before:mr-1;
105
+ }
106
+
93
107
  [x-cloak] {
94
108
  @apply hidden!;
95
109
  }
@@ -153,50 +167,37 @@ table tr.selected th {
153
167
  Datetime
154
168
  *******************************************************/
155
169
  .datetimeshortcuts {
156
- @apply absolute flex flex-row-reverse items-center right-0 text-[0px] top-px;
170
+ @apply absolute flex flex-row-reverse items-center right-px text-[0px] top-px;
157
171
  }
158
172
 
159
173
  .datetimeshortcuts a {
160
- @apply text-[0px] text-base-400 transition hover:text-base-700;
174
+ @apply flex items-center h-9 text-[0px] text-base-400 transition hover:text-base-700;
161
175
  }
162
176
 
163
177
  .datetimeshortcuts a:first-child {
164
- @apply hover:text-base-700 dark:text-base-500 dark:hover:text-base-200;
178
+ @apply hidden;
165
179
  }
166
180
 
167
181
  .datetimeshortcuts a:first-child:after {
168
- @apply border-l border-base-200 flex h-9 items-center justify-center leading-none material-symbols-outlined py-2 text-center w-9 hover:text-base-700 dark:border-base-700 dark:hover:text-white;
169
- content: "timer";
182
+ @apply content-['update'] flex h-9 items-center justify-center leading-none material-symbols-outlined px-3 py-2 text-center hover:text-base-700 dark:border-base-700 dark:hover:text-base-700;
170
183
  }
171
184
 
172
185
  .datetimeshortcuts a:first-child:after {
173
186
  @apply flex;
174
187
  }
175
188
 
189
+ .clock-icon,
176
190
  .date-icon {
177
- @apply block h-9 text-base-400 transition-all w-9 hover:text-base-700 dark:text-base-500 dark:hover:text-white;
178
- }
179
-
180
- .date-icon:after {
181
- @apply border-l border-base-200 h-9 items-center justify-center leading-none material-symbols-outlined py-2 text-center w-9 hover:text-base-700 dark:border-base-700;
182
- content: "edit";
191
+ @apply block text-base-400 transition-all hover:text-base-700 dark:text-base-500 dark:hover:text-base-200;
192
+ @apply after:border-base-200 after:material-symbols-outlined after:px-3 dark:after:border-base-700;
183
193
  }
184
194
 
185
195
  .date-icon:after {
186
- @apply flex dark:hover:text-white;
187
- }
188
-
189
- .clock-icon {
190
- @apply block h-9 ml-2 w-9 hover:text-base-700 dark:text-base-500 dark:hover:text-base-200;
196
+ content: "calendar_today";
191
197
  }
192
198
 
193
199
  .clock-icon:after {
194
- @apply border-l border-base-200 h-9 items-center justify-center material-symbols-outlined py-2 text-base text-center w-9 hover:text-base-700 dark:border-base-700 dark:hover:text-white;
195
- content: "edit";
196
- }
197
-
198
- .clock-icon:after {
199
- @apply flex;
200
+ content: "schedule";
200
201
  }
201
202
 
202
203
  .timezonewarning {
@@ -356,7 +357,11 @@ h3 span:nth-child(3) {
356
357
  @apply outline-none;
357
358
  }
358
359
 
359
- .select2.select2-container.select2-container--focus{
360
+ .select2.select2-container--open {
361
+ @apply border-b-0 border-primary-600 relative outline-2 -outline-offset-2 outline-primary-600;
362
+ }
363
+
364
+ .select2.select2-container.select2-container--focus {
360
365
  @apply outline-2 outline-primary-600 -outline-offset-2;
361
366
  }
362
367
 
@@ -364,153 +369,97 @@ h3 span:nth-child(3) {
364
369
  @apply border-red-600;
365
370
  }
366
371
 
367
- .select2-container.select2-container--admin-autocomplete
368
- .select2-selection--single {
372
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single {
369
373
  @apply h-auto;
370
374
  }
371
375
 
372
- .select2-container.select2-container--admin-autocomplete
373
- .select2-selection--single
374
- .select2-selection__rendered {
376
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
375
377
  @apply font-medium h-9 px-3 py-2 text-font-default-light text-sm dark:text-font-default-dark;
376
378
  }
377
379
 
378
- .select2-container.select2-container--admin-autocomplete
379
- .select2-selection--multiple
380
- .select2-selection__clear,
381
- .select2-container.select2-container--admin-autocomplete
382
- .select2-selection--single
383
- .select2-selection__clear {
384
- @apply flex items-center h-9 -mt-2 text-[0px];
380
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear,
381
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
382
+ @apply flex items-center h-9 -mt-2 text-[0px] after:text-base-400 hover:after:text-base-700 dark:hover:after:text-base-200 dark:after:text-base-500;
385
383
  }
386
384
 
387
- .select2-container.select2-container--admin-autocomplete
388
- .select2-selection--multiple
389
- .select2-selection__clear:after,
390
- .select2-container.select2-container--admin-autocomplete
391
- .select2-selection--single
392
- .select2-selection__clear:after {
393
- @apply material-symbols-outlined text-base-500;
394
- content: "close";
395
- font-size: 14px;
385
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear:after,
386
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear:after {
387
+ @apply material-symbols-outlined transition-all content-['close'] text-[18px] ;
396
388
  }
397
389
 
398
- .select2-container.select2-container--admin-autocomplete
399
- .select2-selection--single
400
- .select2-selection__arrow {
390
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
401
391
  @apply flex h-9 items-center mr-2 -mt-px;
392
+ @apply after:left-0 after:leading-none after:m-0 after:material-symbols-outlined after:text-base-400 after:text-lg dark:after:text-base-500;
402
393
  }
403
394
 
404
- .select2-container.select2-container--admin-autocomplete
405
- .select2-selection--single
406
- .select2-selection__arrow:after {
407
- @apply left-0 leading-none m-0 material-symbols-outlined text-base-500 text-lg;
395
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow:after {
408
396
  content: "expand_more";
409
397
  }
410
398
 
411
- .select2-container.select2-container--admin-autocomplete
412
- .select2-selection--single
413
- .select2-selection__arrow
414
- b {
399
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
415
400
  @apply hidden;
416
401
  }
417
402
 
418
- .select2-container.select2-container--admin-autocomplete
419
- .select2-search--dropdown {
420
- @apply flex px-3 py-2;
421
- }
422
-
423
- .select2-container.select2-container--admin-autocomplete
424
- .select2-search--dropdown
425
- .select2-search__field {
426
- @apply bg-base-50 border border-base-200 border-solid grow font-medium mx-0 outline-hidden px-3 py-2 rounded-default shadow-xs text-font-default-light text-sm w-full dark:bg-base-800 dark:border-base-800 dark:text-font-default-dark;
403
+ .select2-container.select2-container--admin-autocomplete .select2-search--dropdown {
404
+ @apply border-b border-base-200 py-1.5 px-1 relative dark:border-base-700 before:absolute before:content-['search'] before:material-symbols-outlined before:left-4 before:top-2.5 before:text-base-400 before:text-lg dark:before:text-base-500;
427
405
  }
428
406
 
429
- .select2-container.select2-container--admin-autocomplete.select2-container--open.select2-container--above {
430
- @apply rounded-t-none;
407
+ .select2-container.select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
408
+ @apply bg-base-100 border-0 border-base-200 border-solid grow font-medium mx-0 outline-hidden px-3 py-2 pl-9 rounded-default text-font-default-light text-sm w-full dark:bg-base-800 dark:border-base-800 dark:text-font-default-dark;
431
409
  }
432
410
 
433
- .select2-container.select2-container--admin-autocomplete.select2-container--open.select2-container--below {
434
- @apply rounded-b-none;
411
+ .select2-container .select2-results__options {
412
+ @apply py-1;
435
413
  }
436
414
 
437
415
  .select2-container.select2-container--open .select2-dropdown {
438
- @apply border border-transparent outline-2 -outline-offset-2 outline-primary-600 pb-2 shadow-xs dark:bg-base-900;
416
+ @apply bg-white border border-base-200 rounded-default shadow-xs dark:border-base-700 dark:bg-base-900;
439
417
  }
440
418
 
441
419
  .select2-container.select2-container--open .select2-dropdown--below {
442
- @apply rounded-t-none rounded-b -top-0.5;
420
+ @apply mt-1;
443
421
  }
444
422
 
445
423
  .select2-container.select2-container--open .select2-dropdown--above {
446
- @apply rounded-b-none rounded-default -bottom-0.5;
424
+ @apply mb-1;
447
425
  }
448
426
 
449
- .select2-container.select2-container--admin-autocomplete
450
- .select2-results__option {
451
- @apply block px-3 py-2 text-font-default-light text-sm transition-all dark:text-font-default-dark;
427
+ .select2-container.select2-container--admin-autocomplete .select2-results__option {
428
+ @apply block mb-0.5 mx-1 px-2 py-2 rounded-default text-font-default-light transition-all hover:bg-base-100 hover:text-base-700 dark:hover:bg-base-800 dark:hover:text-base-200 dark:text-font-default-dark last:mb-0;
452
429
  }
453
-
454
- .select2-container.select2-container--admin-autocomplete
455
- .select2-results__option[aria-selected="true"] {
456
- @apply text-primary-600 dark:text-primary-500;
457
- }
458
-
459
- .select2-container.select2-container--admin-autocomplete
460
- .select2-results__option--highlighted[aria-selected="true"] {
461
- @apply text-primary-600 dark:text-primary-500;
430
+ .select2-container.select2-container--admin-autocomplete .select2-results__option[aria-selected="true"] {
431
+ @apply text-primary-600 dark:text-primary-500 flex items-center text-primary-600 dark:text-primary-500 after:content-['check'] after:material-symbols-outlined after:ml-auto;
462
432
  }
463
433
 
464
- .select2-container.select2-container--admin-autocomplete
465
- .select2-selection--multiple
466
- .select2-selection__clear {
467
- @apply m-0 mr-2 top-0;
434
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear {
435
+ @apply m-0 mr-3 top-0;
468
436
  }
469
437
 
470
- .select2-container.select2-container--admin-autocomplete
471
- .select2-selection--multiple
472
- .select2-selection__rendered {
438
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
473
439
  @apply pl-1 pr-6 py-0 pt-1;
474
440
  }
475
441
 
476
- .select2-container.select2-container--admin-autocomplete
477
- .select2-selection--single
478
- .select2-selection__rendered {
442
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
479
443
  @apply pr-8;
480
444
  }
481
445
 
482
- .select2-container--admin-autocomplete
483
- .select2-selection--multiple
484
- li.select2-selection__choice {
446
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-selection__choice {
485
447
  @apply bg-base-100 block font-medium h-7 leading-7 m-0 mr-1 mb-1 px-2 shadow-inner text-sm text-base-600 hover:text-base-700 truncate dark:bg-base-800 dark:text-base-300 dark:hover:text-base-200;
486
448
  }
487
449
 
488
- .select2-container--admin-autocomplete
489
- .select2-selection--multiple
490
- li.select2-selection__choice
491
- .select2-selection__choice__remove {
450
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-selection__choice .select2-selection__choice__remove {
492
451
  @apply align-top text-[0px] hover:text-base-600 dark:hover:text-base-200;
493
452
  }
494
453
 
495
- .select2-container--admin-autocomplete
496
- .select2-selection--multiple
497
- li.select2-selection__choice
498
- .select2-selection__choice__remove:after {
454
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-selection__choice .select2-selection__choice__remove:after {
499
455
  @apply h-7 leading-7! material-symbols-outlined;
500
456
 
501
457
  content: "close";
502
458
  font-size: 14px;
503
459
  }
504
460
 
505
- .select2-container--admin-autocomplete
506
- .select2-selection--multiple
507
- li.select2-search--inline
508
- .select2-search__field {
509
- @apply m-0 h-7 text-base-500 text-sm;
510
- }
511
-
512
- .select2.select2-container--open {
513
- @apply border-b-0 border-primary-600 relative outline-2 -outline-offset-2 outline-primary-600;
461
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-search--inline .select2-search__field {
462
+ @apply m-0 h-7 ml-2 text-base-500 text-sm;
514
463
  }
515
464
 
516
465
  /*******************************************************
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div id="changelist-actions" class="actions flex flex-col gap-3 text-white sm:flex-row sm:items-center lg:items-center {% if not cl.model_admin.list_fullwidth %}mx-auto{% endif %}" x-bind:style="'width: ' + changeListWidth + 'px'">
4
4
  {% block actions %}
5
- <div class="flex flex-row gap-2 lg:flex-row" x-data="{action: ''}">
5
+ <div class="group primary flex flex-row gap-2 lg:flex-row" x-data="{action: ''}">
6
6
  {% block actions-form %}
7
7
  {% for field in action_form %}
8
8
  {% if field.label %}
@@ -1,7 +1,7 @@
1
1
  {% extends "admin/base_site.html" %}
2
2
  {% load admin_urls i18n static %}
3
3
 
4
- {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}
4
+ {% block extrastyle %}{{ block.super }}{% endblock %}
5
5
  {% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %}
6
6
 
7
7
  {% if not is_popup %}
@@ -5,13 +5,13 @@
5
5
  <div class="flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse container lg:h-[64px]">
6
6
  {% block submit-row %}
7
7
  {% if show_save %}
8
- <button type="submit" form="{{ opts.model_name }}_form" name="_save" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-default text-white w-full lg:w-auto">
8
+ <button type="submit" form="{{ opts.model_name }}_form" name="_save" class="bg-primary-600 block border border-transparent cursor-pointer font-medium px-3 py-2 rounded-default text-white w-full lg:w-auto">
9
9
  {% translate 'Save' %}
10
10
  </button>
11
11
  {% endif %}
12
12
 
13
13
  {% for action in actions_submit_line %}
14
- <button type="submit" form="{{ opts.model_name }}_form" {% if not action.attrs.name %}name="{{ action.action_name }}"{% endif %} class="border border-base-200 flex font-medium gap-2 items-center px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900" {% include "unfold/helpers/attrs.html" with attrs=action.attrs %}>
14
+ <button type="submit" form="{{ opts.model_name }}_form" {% if not action.attrs.name %}name="{{ action.action_name }}"{% endif %} class="border border-base-200 cursor-pointer flex font-medium gap-2 items-center justify-center px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900" {% include "unfold/helpers/attrs.html" with attrs=action.attrs %}>
15
15
  {% if action.icon %}
16
16
  <span class="material-symbols-outlined">
17
17
  {{ action.icon }}
@@ -23,7 +23,7 @@
23
23
  {% endfor %}
24
24
 
25
25
  {% if show_save_and_continue %}
26
- <button type="submit" form="{{ opts.model_name }}_form" name="_continue" class="border border-base-200 font-medium px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
26
+ <button type="submit" form="{{ opts.model_name }}_form" name="_continue" class="border border-base-200 cursor-pointer font-medium px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
27
27
  {% if can_change %}
28
28
  {% translate 'Save and continue editing' %}
29
29
  {% else %}
@@ -33,13 +33,13 @@
33
33
  {% endif %}
34
34
 
35
35
  {% if show_save_and_add_another %}
36
- <button type="submit" form="{{ opts.model_name }}_form" name="_addanother" class="border border-base-200 font-medium px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
36
+ <button type="submit" form="{{ opts.model_name }}_form" name="_addanother" class="border border-base-200 cursor-pointer font-medium px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
37
37
  {% translate 'Save and add another' %}
38
38
  </button>
39
39
  {% endif %}
40
40
 
41
41
  {% if show_save_as_new %}
42
- <button type="submit" form="{{ opts.model_name }}_form" name="_saveasnew" class="border border-base-200 font-medium px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
42
+ <button type="submit" form="{{ opts.model_name }}_form" name="_saveasnew" class="border border-base-200 cursor-pointer font-medium px-3 py-2 rounded-default transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
43
43
  {% translate 'Save as new' %}
44
44
  </button>
45
45
  {% endif %}
@@ -48,7 +48,7 @@
48
48
  {% if show_close or adminform.model_admin.change_form_show_cancel_button %}
49
49
  {% url opts|admin_urlname:'changelist' as changelist_url %}
50
50
 
51
- <a href="{% add_preserved_filters changelist_url %}" class="border border-base-200 font-medium px-3 py-2 rounded-default text-center transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
51
+ <a href="{% add_preserved_filters changelist_url %}" class="border border-base-200 cursor-pointer font-medium px-3 py-2 rounded-default text-center transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:hover:text-base-200 dark:hover:bg-base-900">
52
52
  {% translate 'Close' %}
53
53
  </a>
54
54
  {% endif %}
@@ -56,7 +56,7 @@
56
56
  {% if show_delete_link and original %}
57
57
  {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
58
58
 
59
- <a href="{% add_preserved_filters delete_url %}" class="bg-red-600 flex items-center justify-center font-medium h-[38px] ml-auto px-3 py-2 rounded-default text-center text-white w-full lg:w-auto dark:bg-red-500/20 dark:text-red-500">
59
+ <a href="{% add_preserved_filters delete_url %}" class="bg-red-600 cursor-pointer flex items-center justify-center font-medium h-[38px] ml-auto px-3 py-2 rounded-default text-center text-white w-full lg:w-auto dark:bg-red-500/20 dark:text-red-500">
60
60
  {% translate "Delete" %} {{ opts.verbose_name }}
61
61
  </a>
62
62
  {% endif %}
@@ -1,7 +1,7 @@
1
1
  {% extends "admin/base_site.html" %}
2
2
  {% load admin_urls i18n static %}
3
3
 
4
- {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}
4
+ {% block extrastyle %}{{ block.super }}">{% endblock %}
5
5
 
6
6
  {% if not is_popup %}
7
7
  {% block breadcrumbs %}
@@ -1,7 +1,7 @@
1
1
  {% extends "admin/base_site.html" %}
2
2
  {% load admin_urls i18n static %}
3
3
 
4
- {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %}
4
+ {% block extrastyle %}{{ block.super }}{% endblock %}
5
5
 
6
6
  {% if not is_popup %}
7
7
  {% block breadcrumbs %}
@@ -1,27 +1,27 @@
1
- <div class="bg-white border border-base-200 flex flex-col grow overflow-hidden p-6 relative rounded-default shadow-xs dark:bg-base-900 dark:border-base-800 {% if class %} {{ class }}{% endif %}">
2
- {% if title %}
3
- <h2 class="bg-base-50 border-b border-base-200 font-semibold mb-6 -mt-6 -mx-6 py-4 px-6 text-font-important-light dark:text-font-important-dark dark:border-base-800 dark:bg-white/[.02]">
4
- {{ title }}
5
- </h2>
6
- {% endif %}
7
-
8
- <div class="grow relative {% if icon %} pl-6{% endif %}">
9
- {{ children }}
10
-
11
- {% if label %}
12
- <div class="absolute right-0 top-0">
13
- {% include "unfold/helpers/label.html" with text=label type="primary" %}
14
- </div>
15
- {% endif %}
1
+ <{% if href %}a href="{{ href }}"{% else %}div{% endif %} class="bg-white block border border-base-200 flex flex-col grow overflow-hidden p-6 relative rounded-default shadow-xs dark:bg-base-900 dark:border-base-800 {% if href %}cursor-pointer transition-all hover:border-base-300 hover:shadow-md hover:shadow-base-200 dark:hover:border-base-700 dark:hover:shadow-base-800/50 {% endif %}{% if class %} {{ class }}{% endif %}">
2
+ {% if title %}
3
+ <h2 class="border-b border-base-200 font-semibold mb-6 -mt-6 -mx-6 py-4 px-6 text-[15px] text-font-important-light dark:text-font-important-dark dark:border-base-800">
4
+ {{ title }}
5
+ </h2>
6
+ {% endif %}
16
7
 
17
- {% if icon %}
18
- <span class="material-symbols-outlined absolute -left-6 text-base-300 top-1/2 -translate-x-1/3 -translate-y-1/2 text-6xl! dark:text-base-500">{{ icon }}</span>
19
- {% endif %}
20
- </div>
8
+ <span class="grow relative {% if icon %} pl-6{% endif %}">
9
+ {{ children }}
21
10
 
22
- {% if footer %}
23
- <div class="border-t border-base-200 flex items-center -mb-6 -mx-6 mt-6 pb-2 pt-2 px-6 text-sm dark:border-base-800">
24
- {{ footer }}
11
+ {% if label %}
12
+ <div class="absolute right-0 top-0">
13
+ {% include "unfold/helpers/label.html" with text=label type="primary" %}
25
14
  </div>
26
15
  {% endif %}
27
- </div>
16
+
17
+ {% if icon %}
18
+ <span class="material-symbols-outlined absolute -left-6 text-base-300 top-1/2 -translate-x-1/3 -translate-y-1/2 text-6xl! dark:text-base-500">{{ icon }}</span>
19
+ {% endif %}
20
+ </span>
21
+
22
+ {% if footer %}
23
+ <span class="border-t border-base-200 flex items-center -mb-6 -mx-6 mt-6 pb-2 pt-2 px-6 text-sm dark:border-base-800">
24
+ {{ footer }}
25
+ </span>
26
+ {% endif %}
27
+ </{% if href %}a{% else %}div{% endif %}>
@@ -1,21 +1,23 @@
1
1
  <div class="{% if class %}{{ class }}{% endif %}">
2
- <div class="overflow-hidden relative px-2 py-1 text-sm">
3
- {% if value %}
4
- <div class="absolute bottom-0 left-0 rounded-default top-0 bg-primary-100 z-10 dark:bg-primary-500/20" style="width: {{ value }}%"></div>
5
- {% endif %}
6
-
2
+ <div class="flex flex-col gap-2 relative">
7
3
  <div class="flex flex-row relative z-20">
8
4
  {% if title %}
9
- <h3 class="text-font-default-light dark:text-font-default-dark text-sm">
5
+ <h3 class="text-font-important-light dark:text-font-important-dark text-sm">
10
6
  {{ title }}
11
7
  </h3>
12
8
  {% endif %}
13
9
 
14
10
  {% if description %}
15
- <strong class="font-semibold text-font-important-light ml-auto dark:text-font-important-dark">
11
+ <strong class="bg-base-100 font-medium text-font-important-light ml-auto px-1.5 py-1 rounded-default text-xs dark:text-font-important-dark dark:bg-base-800">
16
12
  {{ description }}
17
13
  </strong>
18
14
  {% endif %}
19
15
  </div>
16
+
17
+ {% if value %}
18
+ <div class="bg-gray-100 overflow-hidden rounded-default dark:bg-base-800">
19
+ <div class="h-1.5 bg-primary-600 rounded-default z-10 dark:bg-primary-500" title="{{ value }}%" style="width: {{ value }}%"></div>
20
+ </div>
21
+ {% endif %}
20
22
  </div>
21
23
  </div>
@@ -1,6 +1,6 @@
1
1
  {% load i18n unfold %}
2
2
 
3
- <div class="flex flex-col">
3
+ <div class="flex flex-col {% if class %}{{ class }}{% endif %}">
4
4
  {% if title %}
5
5
  <h3 class="font-semibold mb-1 text-font-important-light text-sm dark:text-font-important-dark">
6
6
  {{ title }}
@@ -11,10 +11,10 @@
11
11
  <div {% if height %}style="max-height: {{ height }}px;" data-simplebar{% endif %}>
12
12
  <table class="block border-spacing-none border-separate w-full lg:table">
13
13
  {% if table.headers %}
14
- <thead class="text-base-900 dark:text-base-100 {% if height %}sticky top-0{% endif %}">
14
+ <thead class="text-font-important-light dark:text-font-important-dark {% if height %}sticky top-0{% endif %}">
15
15
  <tr class="bg-base-50 dark:bg-base-900">
16
16
  {% for header in table.headers %}
17
- <th class="align-middle border-b border-base-200 font-semibold py-2 text-left text-sm whitespace-nowrap sortable column-description hidden px-3 lg:table-cell dark:border-base-800 dark:bg-white/[.02] {% if card_included == 1 %}first:pl-6 last:pr-6{% endif %}">
17
+ <th class="align-middle border-b border-base-200 font-semibold py-2 text-left whitespace-nowrap sortable column-description hidden px-3 lg:table-cell dark:border-base-800 dark:bg-white/[.02] {% if card_included == 1 %}first:pl-6 last:pr-6{% endif %}">
18
18
  {{ header|capfirst }}
19
19
  </th>
20
20
  {% endfor %}
@@ -25,9 +25,9 @@
25
25
  {% if table.rows %}
26
26
  <tbody class="block lg:table-row-group">
27
27
  {% for row in table.rows %}
28
- <tr class="{% if striped == 1 %}{% cycle '' 'bg-base-50 dark:bg-white/[.02]' %}{% endif %} block group {% if forloop.first %}first-row{% endif %} {% if not card_included == 1 %}border mb-3 rounded-default shadow-xs{% else %}border-b{% endif %} lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
28
+ <tr class="{% if striped == 1 %}{% cycle '' 'bg-base-50 dark:bg-white/[.02]' %}{% endif %} block group {% if forloop.first %}first-row{% endif %} {% if not card_included == 1 %}border border-base-200 mb-3 rounded-default shadow-xs{% else %}border-b border-base-200 last:border-b-0{% endif %} lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
29
29
  {% for cell in row %}
30
- <td class="px-3 py-2 align-middle flex border-t border-base-200 font-normal gap-4 min-w-0 overflow-hidden text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:group-[.first-row]:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800 {% if card_included == 1 %}lg:first:pl-6 lg:last:pr-6{% endif %}" {% if table.headers %}data-label="{{ table.headers|index:forloop.counter0 }}"{% endif %}>
30
+ <td class="px-3 py-2 align-middle flex border-t border-base-200 font-normal gap-4 min-w-0 overflow-hidden text-left before:flex before:capitalize before:content-[attr(data-label)] before:font-semibold before:text-font-important-light dark:before:text-font-important-dark before:items-center before:mr-auto first:border-t-0 lg:group-[.first-row]:border-t-0 lg:before:hidden {% if not forloop.parentloop.first %}lg:first:border-t{% endif %} lg:py-3 lg:table-cell dark:border-base-800 {% if card_included == 1 %}lg:first:pl-6 lg:last:pr-6{% endif %}" {% if table.headers %}data-label="{{ table.headers|index:forloop.counter0 }}"{% endif %}>
31
31
  {{ cell }}
32
32
  </td>
33
33
  {% endfor %}
@@ -3,7 +3,7 @@
3
3
  {% if cl.model_admin.list_filter_submit or cl.is_facets_optional or cl.has_active_filters %}
4
4
  <div class="bg-white border-t border-base-200 p-3 py-2.5 dark:bg-base-800 dark:border-base-700{% if not cl.model_admin.list_filter_sheet %} 2xl:border-t-0! 2xl:bg-transparent! 2xl:px-0{% endif %}">
5
5
  {% if cl.model_admin.list_filter_submit %}
6
- <button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-default text-white w-full">
6
+ <button type="submit" class="bg-primary-600 block border border-transparent cursor-pointer font-medium px-3 py-2 rounded-default text-white w-full">
7
7
  {% trans "Apply Filters" %}
8
8
  </button>
9
9
  {% endif %}
@@ -16,7 +16,7 @@
16
16
  {{ field.field }}
17
17
 
18
18
  {% if field.field.errors|length > 0 %}
19
- <div class="mt-1 text-red-600 text-sm dark:text-red-500">
19
+ <div class="mt-2 text-red-600 text-xs dark:text-red-500">
20
20
  {% for error in field.field.errors %}
21
21
  {{ error }}
22
22
  {% endfor %}
@@ -1,7 +1,7 @@
1
1
  {% load unfold %}
2
2
 
3
3
  {% if field.field.widget.input_type == "checkbox" and field.field.widget|class_name != "UnfoldAdminCheckboxSelectMultiple"%}
4
- <div class="{% if field.errors %}errors {% endif %}flex flex-col group mb-6 last:mb-4">
4
+ <div class="{% if field.errors %}errors {% endif %}flex flex-col group mb-5 last:mb-4">
5
5
  <div class="flex flex-row gap-2 items-center">
6
6
  {{ field }}
7
7
 
@@ -13,7 +13,7 @@
13
13
  {% include "unfold/helpers/help_text.html" with help_text=field.help_text %}
14
14
  </div>
15
15
  {% else %}
16
- <div class="{% if field.errors %}errors {% endif %}flex flex-col gap-2 group mb-6 last:mb-4">
16
+ <div class="{% if field.errors %}errors {% endif %}flex flex-col gap-2 group mb-5 last:mb-4">
17
17
  {% include "unfold/helpers/form_label.html" with field=field %}
18
18
 
19
19
  {{ field }}
@@ -1 +1 @@
1
- <div class="readonly break-words {% if field.is_json %}max-w-4xl{% else %}max-w-2xl{% endif %} py-2 text-sm *:rounded-default {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-base-50 border font-medium px-3 rounded-default shadow-xs dark:border-base-700 dark:bg-base-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded-default py-0!{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
1
+ <div class="readonly break-words {% if field.is_json %}max-w-4xl{% else %}max-w-2xl{% endif %} py-2 text-sm *:rounded-default {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-base-50 border border-base-200 font-medium px-3 rounded-default shadow-xs dark:border-base-700 dark:bg-base-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded-default py-0!{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
 
18
18
  {% if field.errors %}
19
- <div class="mt-1 text-red-600 text-sm dark:text-red-500">
19
+ <div class="mt-2 text-red-600 text-xs dark:text-red-500">
20
20
  {{ field.errors }}
21
21
  </div>
22
22
  {% endif %}
@@ -36,7 +36,7 @@
36
36
  {% endif %}
37
37
 
38
38
  {% if field.errors %}
39
- <div class="mt-1 text-red-600 text-sm dark:text-red-500">
39
+ <div class="mt-2 text-red-600 text-xs dark:text-red-500">
40
40
  {{ field.errors }}
41
41
  </div>
42
42
  {% endif %}
@@ -2,7 +2,7 @@
2
2
  {{ field.label_tag }}
3
3
  </div>
4
4
 
5
- <div class="grow">
5
+ <div class="grow relative">
6
6
  {% if field.is_readonly %}
7
7
  {% include "unfold/helpers/field_readonly_value.html" %}
8
8
  {% else %}
@@ -14,7 +14,7 @@
14
14
  {% endif %}
15
15
 
16
16
  {% if field.errors %}
17
- <div class="mt-1 text-red-600 text-sm dark:text-red-500">
17
+ <div class="mt-2 text-red-600 text-xs dark:text-red-500">
18
18
  {{ field.errors }}
19
19
  </div>
20
20
  {% endif %}
@@ -1,5 +1,5 @@
1
1
  {% if errors %}
2
- <div class="mt-1 text-red-600 text-sm dark:text-red-500">
2
+ <div class="mt-2 text-red-600 text-xs dark:text-red-500">
3
3
  <ul>
4
4
  {% for error in errors %}
5
5
  <li>
@@ -2,10 +2,6 @@
2
2
 
3
3
  {% if errors %}
4
4
  <p class="errornote bg-red-100 mb-8 text-red-700 px-3 py-3 rounded-default dark:bg-red-500/20 dark:border-red-500/20 dark:text-red-400">
5
- {% if errors.items|length == 1 %}
6
- {% translate "Please correct the error below." %}
7
- {% else %}
8
- {% translate "Please correct the errors below." %}
9
- {% endif %}
5
+ {% blocktranslate count counter=errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
10
6
  </p>
11
7
  {% endif %}
@@ -1,6 +1,6 @@
1
1
  {% load i18n unfold %}
2
2
 
3
- <nav class="bg-base-50 flex flex-col min-h-screen dark:bg-base-950/20 {% element_classes 'navigation_inner' %}">
3
+ <nav id="nav-sidebar-inner" class="bg-base-50 flex flex-col min-h-screen dark:bg-base-950/20 {% element_classes 'navigation_inner' %}">
4
4
  {% include "unfold/helpers/navigation_header.html" %}
5
5
 
6
6
  {% include "unfold/helpers/search.html" %}