django-unfold 0.57.0__py3-none-any.whl → 0.59.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 (57) hide show
  1. {django_unfold-0.57.0.dist-info → django_unfold-0.59.0.dist-info}/METADATA +1 -1
  2. {django_unfold-0.57.0.dist-info → django_unfold-0.59.0.dist-info}/RECORD +57 -55
  3. unfold/checks.py +24 -2
  4. unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +2 -2
  5. unfold/contrib/import_export/templates/admin/import_export/base.html +1 -5
  6. unfold/contrib/import_export/templates/admin/import_export/import_form.html +1 -1
  7. unfold/contrib/simple_history/templates/simple_history/object_history_form.html +1 -1
  8. unfold/decorators.py +28 -15
  9. unfold/fields.py +1 -1
  10. unfold/forms.py +4 -2
  11. unfold/layout.py +16 -0
  12. unfold/mixins/action_model_admin.py +22 -14
  13. unfold/paginator.py +12 -1
  14. unfold/settings.py +8 -1
  15. unfold/sites.py +87 -40
  16. unfold/static/admin/js/admin/RelatedObjectLookups.js +9 -3
  17. unfold/static/unfold/css/styles.css +2 -2
  18. unfold/styles.css +59 -104
  19. unfold/templates/admin/auth/user/change_password.html +1 -1
  20. unfold/templates/admin/base.html +1 -1
  21. unfold/templates/admin/change_form.html +2 -1
  22. unfold/templates/admin/edit_inline/stacked.html +1 -1
  23. unfold/templates/admin/includes/fieldset.html +9 -3
  24. unfold/templates/admin/login.html +1 -1
  25. unfold/templates/admin/pagination.html +1 -1
  26. unfold/templates/admin/submit_line.html +7 -7
  27. unfold/templates/registration/password_change_done.html +1 -1
  28. unfold/templates/registration/password_change_form.html +1 -1
  29. unfold/templates/unfold/components/button.html +1 -1
  30. unfold/templates/unfold/components/card.html +23 -23
  31. unfold/templates/unfold/components/progress.html +9 -7
  32. unfold/templates/unfold/components/table.html +5 -5
  33. unfold/templates/unfold/helpers/account_links.html +14 -6
  34. unfold/templates/unfold/helpers/change_list_actions.html +2 -2
  35. unfold/templates/unfold/helpers/change_list_filter_actions.html +2 -2
  36. unfold/templates/unfold/helpers/edit_inline/tabular_heading.html +1 -1
  37. unfold/templates/unfold/helpers/empty_results.html +2 -2
  38. unfold/templates/unfold/helpers/field.html +2 -2
  39. unfold/templates/unfold/helpers/header.html +1 -1
  40. unfold/templates/unfold/helpers/language_form.html +10 -0
  41. unfold/templates/unfold/helpers/language_switch.html +17 -19
  42. unfold/templates/unfold/helpers/navigation.html +1 -1
  43. unfold/templates/unfold/helpers/pagination_infinite.html +3 -3
  44. unfold/templates/unfold/helpers/theme_switch.html +29 -27
  45. unfold/templates/unfold/helpers/userlinks.html +2 -6
  46. unfold/templates/unfold/helpers/welcomemsg.html +9 -7
  47. unfold/templates/unfold/widgets/select.html +1 -1
  48. unfold/templates/unfold_crispy/field.html +1 -1
  49. unfold/templates/unfold_crispy/layout/checkbox.html +2 -2
  50. unfold/templates/unfold_crispy/layout/fieldset.html +4 -2
  51. unfold/templates/unfold_crispy/layout/fieldset_subheader.html +3 -0
  52. unfold/templates/unfold_crispy/layout/table_inline_formset.html +18 -16
  53. unfold/templatetags/unfold.py +20 -1
  54. unfold/utils.py +2 -2
  55. unfold/widgets.py +10 -4
  56. {django_unfold-0.57.0.dist-info → django_unfold-0.59.0.dist-info}/LICENSE.md +0 -0
  57. {django_unfold-0.57.0.dist-info → django_unfold-0.59.0.dist-info}/WHEEL +0 -0
unfold/styles.css CHANGED
@@ -1,20 +1,38 @@
1
1
  @import 'tailwindcss';
2
2
  @plugin '@tailwindcss/typography';
3
- @custom-variant dark (&:where(.dark, .dark *));
3
+
4
+ @custom-variant dark {
5
+ @media not print {
6
+ &:where(.dark, .dark *) {
7
+ @slot
8
+ }
9
+ }
10
+ }
11
+
4
12
  @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");
13
+ @source inline("{-,}{top,bottom,left,right}-{0..6}");
14
+ @source inline("rounded rounded-{t,r,b,l} rounded-{t,r,b,l}-default");
7
15
  @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}");
16
+ @source inline("{-,}m{t,r,b,l,x,y,}-{0..6} {-,}p{t,r,b,l,x,y,}-{0..6}");
9
17
  @source inline("{md:,lg:,}border-{0,2} {md:,lg:,}border-{t,r,b,l}-{0,2}");
10
18
  @source inline("{hover:,dark:,}bg-primary-{50,{100..900..100},950}");
11
19
  @source inline("{hover:,dark:,}border-base-{50,{100..900..100},950} {hover:,dark:,}border-transparent");
12
20
  @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}");
21
+ @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
22
  @source inline("{md:,lg:,}gap-{0.5,{1..12}}");
15
23
  @source inline("{md:,lg:,}grid-cols-{1..12}");
16
24
  @source inline("{md:,lg:,}col-span-{1..12}");
17
25
 
26
+ @layer base {
27
+ *,
28
+ ::after,
29
+ ::before,
30
+ ::backdrop,
31
+ ::file-selector-button {
32
+ border-color: var(--color-gray-200, currentColor);
33
+ }
34
+ }
35
+
18
36
  @theme {
19
37
  --font-sans: 'Inter', sans-serif;
20
38
  }
@@ -135,18 +153,6 @@ select:after {
135
153
  /*******************************************************
136
154
  Table
137
155
  *******************************************************/
138
- table select {
139
- @apply appearance-none bg-no-repeat border border-base-200 block cursor-pointer font-medium px-3 py-2 pr-5 rounded-default shadow-xs text-base-500;
140
-
141
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="rgb(156, 163, 175)"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>');
142
- background-size: 1.125rem 1.125rem;
143
- background-position: right 0.5rem center;
144
- }
145
-
146
-
147
- table select:focus {
148
- @apply border-primary-600;
149
- }
150
156
 
151
157
  table tr.selected td,
152
158
  table tr.selected th {
@@ -347,7 +353,11 @@ h3 span:nth-child(3) {
347
353
  @apply outline-none;
348
354
  }
349
355
 
350
- .select2.select2-container.select2-container--focus{
356
+ .select2.select2-container--open {
357
+ @apply border-b-0 border-primary-600 relative outline-2 -outline-offset-2 outline-primary-600;
358
+ }
359
+
360
+ .select2.select2-container.select2-container--focus {
351
361
  @apply outline-2 outline-primary-600 -outline-offset-2;
352
362
  }
353
363
 
@@ -355,152 +365,97 @@ h3 span:nth-child(3) {
355
365
  @apply border-red-600;
356
366
  }
357
367
 
358
- .select2-container.select2-container--admin-autocomplete
359
- .select2-selection--single {
368
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single {
360
369
  @apply h-auto;
361
370
  }
362
371
 
363
- .select2-container.select2-container--admin-autocomplete
364
- .select2-selection--single
365
- .select2-selection__rendered {
372
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
366
373
  @apply font-medium h-9 px-3 py-2 text-font-default-light text-sm dark:text-font-default-dark;
367
374
  }
368
375
 
369
- .select2-container.select2-container--admin-autocomplete
370
- .select2-selection--multiple
371
- .select2-selection__clear,
372
- .select2-container.select2-container--admin-autocomplete
373
- .select2-selection--single
374
- .select2-selection__clear {
376
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear,
377
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
375
378
  @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;
376
379
  }
377
380
 
378
- .select2-container.select2-container--admin-autocomplete
379
- .select2-selection--multiple
380
- .select2-selection__clear:after,
381
- .select2-container.select2-container--admin-autocomplete
382
- .select2-selection--single
383
- .select2-selection__clear:after {
381
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear:after,
382
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear:after {
384
383
  @apply material-symbols-outlined transition-all content-['close'] text-[18px] ;
385
384
  }
386
385
 
387
- .select2-container.select2-container--admin-autocomplete
388
- .select2-selection--single
389
- .select2-selection__arrow {
386
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
390
387
  @apply flex h-9 items-center mr-2 -mt-px;
388
+ @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;
391
389
  }
392
390
 
393
- .select2-container.select2-container--admin-autocomplete
394
- .select2-selection--single
395
- .select2-selection__arrow:after {
396
- @apply left-0 leading-none m-0 material-symbols-outlined text-base-400 text-lg;
391
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow:after {
397
392
  content: "expand_more";
398
393
  }
399
394
 
400
- .select2-container.select2-container--admin-autocomplete
401
- .select2-selection--single
402
- .select2-selection__arrow
403
- b {
395
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
404
396
  @apply hidden;
405
397
  }
406
398
 
407
- .select2-container.select2-container--admin-autocomplete
408
- .select2-search--dropdown {
409
- @apply flex px-3 py-2;
410
- }
411
-
412
- .select2-container.select2-container--admin-autocomplete
413
- .select2-search--dropdown
414
- .select2-search__field {
415
- @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;
399
+ .select2-container.select2-container--admin-autocomplete .select2-search--dropdown {
400
+ @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;
416
401
  }
417
402
 
418
- .select2-container.select2-container--admin-autocomplete.select2-container--open.select2-container--above {
419
- @apply rounded-t-none;
403
+ .select2-container.select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
404
+ @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;
420
405
  }
421
406
 
422
- .select2-container.select2-container--admin-autocomplete.select2-container--open.select2-container--below {
423
- @apply rounded-b-none;
407
+ .select2-container .select2-results__options {
408
+ @apply py-1;
424
409
  }
425
410
 
426
411
  .select2-container.select2-container--open .select2-dropdown {
427
- @apply border border-transparent outline-2 -outline-offset-2 outline-primary-600 pb-2 shadow-xs dark:bg-base-900;
412
+ @apply bg-white border border-base-200 rounded-default shadow-xs dark:border-base-700 dark:bg-base-900;
428
413
  }
429
414
 
430
415
  .select2-container.select2-container--open .select2-dropdown--below {
431
- @apply rounded-t-none rounded-b -top-0.5;
416
+ @apply mt-1;
432
417
  }
433
418
 
434
419
  .select2-container.select2-container--open .select2-dropdown--above {
435
- @apply rounded-b-none rounded-default -bottom-0.5;
436
- }
437
-
438
- .select2-container.select2-container--admin-autocomplete
439
- .select2-results__option {
440
- @apply block px-3 py-2 text-font-default-light text-sm transition-all dark:text-font-default-dark;
420
+ @apply mb-1;
441
421
  }
442
422
 
443
- .select2-container.select2-container--admin-autocomplete
444
- .select2-results__option[aria-selected="true"] {
445
- @apply text-primary-600 dark:text-primary-500;
423
+ .select2-container.select2-container--admin-autocomplete .select2-results__option {
424
+ @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;
446
425
  }
447
-
448
- .select2-container.select2-container--admin-autocomplete
449
- .select2-results__option--highlighted[aria-selected="true"] {
450
- @apply text-primary-600 dark:text-primary-500;
426
+ .select2-container.select2-container--admin-autocomplete .select2-results__option[aria-selected="true"] {
427
+ @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;
451
428
  }
452
429
 
453
- .select2-container.select2-container--admin-autocomplete
454
- .select2-selection--multiple
455
- .select2-selection__clear {
430
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear {
456
431
  @apply m-0 mr-3 top-0;
457
432
  }
458
433
 
459
-
460
- .select2-container.select2-container--admin-autocomplete
461
- .select2-selection--multiple
462
- .select2-selection__rendered {
434
+ .select2-container.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
463
435
  @apply pl-1 pr-6 py-0 pt-1;
464
436
  }
465
437
 
466
- .select2-container.select2-container--admin-autocomplete
467
- .select2-selection--single
468
- .select2-selection__rendered {
438
+ .select2-container.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
469
439
  @apply pr-8;
470
440
  }
471
441
 
472
- .select2-container--admin-autocomplete
473
- .select2-selection--multiple
474
- li.select2-selection__choice {
442
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-selection__choice {
475
443
  @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;
476
444
  }
477
445
 
478
- .select2-container--admin-autocomplete
479
- .select2-selection--multiple
480
- li.select2-selection__choice
481
- .select2-selection__choice__remove {
446
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-selection__choice .select2-selection__choice__remove {
482
447
  @apply align-top text-[0px] hover:text-base-600 dark:hover:text-base-200;
483
448
  }
484
449
 
485
- .select2-container--admin-autocomplete
486
- .select2-selection--multiple
487
- li.select2-selection__choice
488
- .select2-selection__choice__remove:after {
450
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-selection__choice .select2-selection__choice__remove:after {
489
451
  @apply h-7 leading-7! material-symbols-outlined;
490
452
 
491
453
  content: "close";
492
454
  font-size: 14px;
493
455
  }
494
456
 
495
- .select2-container--admin-autocomplete
496
- .select2-selection--multiple
497
- li.select2-search--inline
498
- .select2-search__field {
499
- @apply m-0 h-7 text-base-500 text-sm;
500
- }
501
-
502
- .select2.select2-container--open {
503
- @apply border-b-0 border-primary-600 relative outline-2 -outline-offset-2 outline-primary-600;
457
+ .select2-container--admin-autocomplete .select2-selection--multiple li.select2-search--inline .select2-search__field {
458
+ @apply m-0 h-7 ml-2 text-base-500 text-sm;
504
459
  }
505
460
 
506
461
  /*******************************************************
@@ -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 %}
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  {% endblock messages %}
40
40
 
41
- <div class="px-4 pb-8 grow">
41
+ <div class="px-4 pb-4 grow">
42
42
  <div id="content" class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} mx-auto {% block coltype %}colM{% endblock %}">
43
43
  {% if cl %}
44
44
  {% tab_list "changelist" cl.opts %}
@@ -93,8 +93,9 @@
93
93
  {% include 'admin/includes/fieldset.html' %}
94
94
  {% endif %}
95
95
  {% endfor %}
96
+
97
+ {% include "unfold/helpers/fieldsets_tabs.html" %}
96
98
  {% endwith %}
97
- {% include "unfold/helpers/fieldsets_tabs.html" %}
98
99
  {% endblock %}
99
100
 
100
101
  {% block after_field_sets %}{% endblock %}
@@ -17,7 +17,7 @@
17
17
  {{ inline_admin_formset.formset.management_form }}
18
18
  {% include "unfold/helpers/messages/error.html" with errors=inline_admin_formset.formset.non_form_errors %}
19
19
 
20
- <div class="border border-base-200 mb-6 overflow-hidden rounded-default shadow-xs w-full dark:border-base-800 *:border-t *:first:border-t-0 *:border-base-200 dark:*:border-base-800"
20
+ <div class="border border-base-200 mb-6 overflow-hidden rounded-default shadow-xs w-full dark:border-base-800 *:border-t first-of-type:border-t-0 *:border-base-200 dark:*:border-base-800"
21
21
  {% if inline_admin_formset.opts.ordering_field %}
22
22
  data-ordering-field="{{ inline_admin_formset.opts.ordering_field }}" x-on:end="sortRecords" x-sort.ghost
23
23
  {% endif %}>
@@ -2,9 +2,15 @@
2
2
 
3
3
  <fieldset class="module{% if fieldset.classes %} {{ fieldset.classes }}{% endif %}" {% if stacked != 1 %}x-show="activeTab == 'general'"{% endif %}>
4
4
  {% if fieldset.name and "tab" not in fieldset.classes %}
5
- <h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm 2xl:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark">
6
- {{ fieldset.name }}
7
- </h2>
5
+ {% if stacked == 1 %}
6
+ <h2 class="bg-base-50 border-b border-base-200 border-t border-dashed font-semibold text-font-important-light px-3 py-2 dark:text-font-important-dark dark:bg-white/[.02] dark:border-base-800">
7
+ {{ fieldset.name }}
8
+ </h2>
9
+ {% else %}
10
+ <h2 class="bg-base-100 font-semibold mb-6 px-4 py-3 rounded-default text-font-important-light text-sm 2xl:-mx-4 dark:bg-white/[.02] dark:text-font-important-dark">
11
+ {{ fieldset.name }}
12
+ </h2>
13
+ {% endif %}
8
14
  {% endif %}
9
15
 
10
16
  {% if fieldset.description %}
@@ -63,7 +63,7 @@
63
63
  {% url 'admin_password_reset' as password_reset_url %}
64
64
 
65
65
  <div class="submit-row">
66
- <button type="submit" class="bg-primary-600 border border-transparent flex flex-row font-semibold group items-center justify-center py-2 rounded-default text-sm text-white w-full">
66
+ <button type="submit" class="bg-primary-600 border border-transparent cursor-pointer flex flex-row font-semibold group items-center justify-center py-2 rounded-default text-sm text-white w-full">
67
67
  {% translate 'Log in' %}
68
68
 
69
69
  <span class="material-symbols-outlined ml-2 relative right-0 text-base transition-all group-hover:-right-1">arrow_forward</span>
@@ -15,7 +15,7 @@
15
15
 
16
16
  {% if cl.formset and cl.result_count %}
17
17
  <div class="ml-auto">
18
- <button type="submit" name="_save" form="changelist-form" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-default text-white w-full">
18
+ <button type="submit" name="_save" form="changelist-form" class="bg-primary-600 block border border-transparent cursor-pointer font-medium px-3 py-2 rounded-default text-white w-full">
19
19
  {% translate 'Save' %}
20
20
  </button>
21
21
  </div>
@@ -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,4 +1,4 @@
1
1
  <{% if href %}a href="{{ href }}"{% else %}button{% endif%} {% if submit %}type="submit"{% endif%} {% if name %}name="{{ name }}"{% endif %}
2
- class="border border-base-200 font-medium flex items-center gap-2 px-3 py-2 rounded-default justify-center whitespace-nowrap {% if attrs.disabled %}cursor-not-allowed opacity-50{% endif %} {% if variant == "default" %}bg-white dark:border-base-700 dark:bg-transparent dark:text-white{% else %}bg-primary-600 border-transparent text-white{% endif %}{% if class %} {{ class }}{% endif %}" {% include "unfold/helpers/attrs.html" %}>
2
+ class="border border-base-200 font-medium flex items-center gap-2 px-3 py-2 rounded-default justify-center whitespace-nowrap {% if attrs.disabled %}cursor-not-allowed opacity-50{% endif %} {% if variant == "default" %}bg-white text-font-important-light dark:border-base-700 dark:bg-transparent dark:text-font-important-dark{% else %}bg-primary-600 border-transparent text-white{% endif %}{% if class %} {{ class }}{% endif %}" {% include "unfold/helpers/attrs.html" %}>
3
3
  {{ children }}
4
4
  </{% if href %}a{% else %}button{% endif%}>
@@ -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 %}
@@ -6,7 +6,7 @@
6
6
  </a>
7
7
 
8
8
  <nav class="absolute bg-white border border-base-200 flex flex-col leading-none py-1 -right-2 rounded-default shadow-lg top-7 w-52 z-50 dark:bg-base-800 dark:border-base-700" x-cloak x-show="openUserLinks" x-transition x-on:click.outside="openUserLinks = false">
9
- <div class="border-b border-base-100 flex flex-row shrink-0 items-start justify-start mb-1 pb-1 dark:border-base-700">
9
+ <div class="border-b border-base-200 flex flex-row shrink-0 items-start justify-start mb-1 pb-1 dark:border-base-700">
10
10
  <span class="block mx-1 px-3 py-2 truncate">
11
11
  {% firstof user.get_short_name user.get_username %}
12
12
  </span>
@@ -18,17 +18,25 @@
18
18
  </a>
19
19
  {% endif %}
20
20
 
21
- {% if user.has_usable_password %}
22
- <a href="{% url 'admin:password_change' %}" class="mx-1 px-3 py-2 rounded-default hover:bg-base-100 hover:text-base-700 dark:hover:bg-base-700 dark:hover:text-base-200">
23
- {% translate 'Change password' %}
24
- </a>
21
+ {% if account_links %}
22
+ {% for link in account_links %}
23
+ <a href="{{ link.link }}" class="mx-1 px-3 py-2 rounded-default hover:bg-base-100 hover:text-base-700 dark:hover:bg-base-700 dark:hover:text-base-200">
24
+ {{ link.title }}
25
+ </a>
26
+ {% endfor %}
27
+ {% else %}
28
+ {% if user.has_usable_password %}
29
+ <a href="{% url 'admin:password_change' %}" class="mx-1 px-3 py-2 rounded-default hover:bg-base-100 hover:text-base-700 dark:hover:bg-base-700 dark:hover:text-base-200">
30
+ {% translate 'Change password' %}
31
+ </a>
32
+ {% endif %}
25
33
  {% endif %}
26
34
 
27
35
  <div class="border-t border-base-200 mt-1 pt-1 dark:border-base-700">
28
36
  <form id="logout-form" method="post" action="{% url 'admin:logout' %}" class="mx-1">
29
37
  {% csrf_token %}
30
38
 
31
- <button type="submit" class="bg-none block px-3 py-2 text-left text-red-500 rounded-default w-full hover:bg-red-100 dark:hover:bg-red-500/20 dark:hover:text-red-500">
39
+ <button type="submit" class="bg-none block cursor-pointer px-3 py-2 text-left text-red-500 rounded-default w-full hover:bg-red-100 dark:hover:bg-red-500/20 dark:hover:text-red-500">
32
40
  {% translate 'Log out' %}
33
41
  </button>
34
42
  </form>
@@ -2,8 +2,8 @@
2
2
 
3
3
  {% if actions_on_top %}
4
4
  {% if cl.search_fields or action_form or cl.has_filters %}
5
- <div class="bottom-0 left-0 right-0 hidden bg-primary-600 group-has-[input.action-select:checked]:flex fixed gap-3 lg:h-[71px] items-center p-3 z-50 lg:flex-row dark:bg-primary-500">
6
- <div id="changelist-actions-wrapper" class="grow lg:px-4" {% if not is_popup %}x-bind:class="{'xl:ml-0': !sidebarDesktopOpen, 'xl:ml-72': sidebarDesktopOpen}"{% endif %}>
5
+ <div class="bottom-0 left-0 right-0 hidden bg-primary-600 group-has-[input.action-select:checked]:flex fixed gap-3 lg:h-[64px] items-center p-3 z-50 lg:flex-row dark:bg-primary-500">
6
+ <div id="changelist-actions-wrapper" class="grow" {% if not is_popup %}x-bind:class="{'xl:ml-0': !sidebarDesktopOpen, 'xl:ml-72': sidebarDesktopOpen}"{% endif %}>
7
7
  {% if action_form %}
8
8
  {% admin_actions %}
9
9
  {% endif %}
@@ -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 %}
@@ -12,7 +12,7 @@
12
12
  <span id="changelist-filter-extra-actions" class="flex flex-row gap-2 items-center mt-2">
13
13
  {% if cl.is_facets_optional %}
14
14
  {% if cl.add_facets %}
15
- <a href="{{ cl.remove_facet_link }}" class="hidelink border grow font-medium px-3 py-2 rounded-default text-center transition-all w-full hover:bg-base-50 lg:w-auto dark:border-base-700 dark:hover:text-base-200">
15
+ <a href="{{ cl.remove_facet_link }}" class="hidelink border border-base-200 grow font-medium px-3 py-2 rounded-default text-center transition-all w-full lg:w-auto dark:border-base-700 dark:hover:text-base-200">
16
16
  {% trans "Hide counts" %}
17
17
  </a>
18
18
  {% else %}