django-cotton-bs5 0.2.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.
Files changed (161) hide show
  1. cotton_bs5/__init__.py +0 -0
  2. cotton_bs5/apps.py +5 -0
  3. cotton_bs5/static/_variables.scss +61 -0
  4. cotton_bs5/static/bs5/_accordion.scss +158 -0
  5. cotton_bs5/static/bs5/_alert.scss +68 -0
  6. cotton_bs5/static/bs5/_badge.scss +38 -0
  7. cotton_bs5/static/bs5/_breadcrumb.scss +40 -0
  8. cotton_bs5/static/bs5/_button-group.scss +142 -0
  9. cotton_bs5/static/bs5/_buttons.scss +216 -0
  10. cotton_bs5/static/bs5/_card.scss +239 -0
  11. cotton_bs5/static/bs5/_carousel.scss +236 -0
  12. cotton_bs5/static/bs5/_close.scss +63 -0
  13. cotton_bs5/static/bs5/_containers.scss +41 -0
  14. cotton_bs5/static/bs5/_dropdown.scss +250 -0
  15. cotton_bs5/static/bs5/_forms.scss +9 -0
  16. cotton_bs5/static/bs5/_functions.scss +302 -0
  17. cotton_bs5/static/bs5/_grid.scss +39 -0
  18. cotton_bs5/static/bs5/_helpers.scss +12 -0
  19. cotton_bs5/static/bs5/_images.scss +42 -0
  20. cotton_bs5/static/bs5/_list-group.scss +197 -0
  21. cotton_bs5/static/bs5/_maps.scss +174 -0
  22. cotton_bs5/static/bs5/_mixins.scss +42 -0
  23. cotton_bs5/static/bs5/_modal.scss +236 -0
  24. cotton_bs5/static/bs5/_nav.scss +197 -0
  25. cotton_bs5/static/bs5/_navbar.scss +289 -0
  26. cotton_bs5/static/bs5/_offcanvas.scss +143 -0
  27. cotton_bs5/static/bs5/_pagination.scss +109 -0
  28. cotton_bs5/static/bs5/_placeholders.scss +51 -0
  29. cotton_bs5/static/bs5/_popover.scss +196 -0
  30. cotton_bs5/static/bs5/_progress.scss +68 -0
  31. cotton_bs5/static/bs5/_reboot.scss +611 -0
  32. cotton_bs5/static/bs5/_root.scss +187 -0
  33. cotton_bs5/static/bs5/_spinners.scss +85 -0
  34. cotton_bs5/static/bs5/_tables.scss +171 -0
  35. cotton_bs5/static/bs5/_toasts.scss +73 -0
  36. cotton_bs5/static/bs5/_tooltip.scss +119 -0
  37. cotton_bs5/static/bs5/_transitions.scss +27 -0
  38. cotton_bs5/static/bs5/_type.scss +106 -0
  39. cotton_bs5/static/bs5/_utilities.scss +806 -0
  40. cotton_bs5/static/bs5/_variables-dark.scss +87 -0
  41. cotton_bs5/static/bs5/_variables.scss +1751 -0
  42. cotton_bs5/static/bs5/bootstrap-grid.scss +62 -0
  43. cotton_bs5/static/bs5/bootstrap-reboot.scss +10 -0
  44. cotton_bs5/static/bs5/bootstrap-utilities.scss +19 -0
  45. cotton_bs5/static/bs5/bootstrap.scss +52 -0
  46. cotton_bs5/static/bs5/forms/_floating-labels.scss +95 -0
  47. cotton_bs5/static/bs5/forms/_form-check.scss +189 -0
  48. cotton_bs5/static/bs5/forms/_form-control.scss +214 -0
  49. cotton_bs5/static/bs5/forms/_form-range.scss +91 -0
  50. cotton_bs5/static/bs5/forms/_form-select.scss +80 -0
  51. cotton_bs5/static/bs5/forms/_form-text.scss +11 -0
  52. cotton_bs5/static/bs5/forms/_input-group.scss +132 -0
  53. cotton_bs5/static/bs5/forms/_labels.scss +36 -0
  54. cotton_bs5/static/bs5/forms/_validation.scss +12 -0
  55. cotton_bs5/static/bs5/helpers/_clearfix.scss +3 -0
  56. cotton_bs5/static/bs5/helpers/_color-bg.scss +7 -0
  57. cotton_bs5/static/bs5/helpers/_colored-links.scss +30 -0
  58. cotton_bs5/static/bs5/helpers/_focus-ring.scss +5 -0
  59. cotton_bs5/static/bs5/helpers/_icon-link.scss +25 -0
  60. cotton_bs5/static/bs5/helpers/_position.scss +36 -0
  61. cotton_bs5/static/bs5/helpers/_ratio.scss +26 -0
  62. cotton_bs5/static/bs5/helpers/_stacks.scss +15 -0
  63. cotton_bs5/static/bs5/helpers/_stretched-link.scss +15 -0
  64. cotton_bs5/static/bs5/helpers/_text-truncation.scss +7 -0
  65. cotton_bs5/static/bs5/helpers/_visually-hidden.scss +8 -0
  66. cotton_bs5/static/bs5/helpers/_vr.scss +8 -0
  67. cotton_bs5/static/bs5/mixins/_alert.scss +18 -0
  68. cotton_bs5/static/bs5/mixins/_backdrop.scss +14 -0
  69. cotton_bs5/static/bs5/mixins/_banner.scss +7 -0
  70. cotton_bs5/static/bs5/mixins/_border-radius.scss +78 -0
  71. cotton_bs5/static/bs5/mixins/_box-shadow.scss +18 -0
  72. cotton_bs5/static/bs5/mixins/_breakpoints.scss +127 -0
  73. cotton_bs5/static/bs5/mixins/_buttons.scss +70 -0
  74. cotton_bs5/static/bs5/mixins/_caret.scss +69 -0
  75. cotton_bs5/static/bs5/mixins/_clearfix.scss +9 -0
  76. cotton_bs5/static/bs5/mixins/_color-mode.scss +21 -0
  77. cotton_bs5/static/bs5/mixins/_color-scheme.scss +7 -0
  78. cotton_bs5/static/bs5/mixins/_container.scss +11 -0
  79. cotton_bs5/static/bs5/mixins/_deprecate.scss +10 -0
  80. cotton_bs5/static/bs5/mixins/_forms.scss +163 -0
  81. cotton_bs5/static/bs5/mixins/_gradients.scss +47 -0
  82. cotton_bs5/static/bs5/mixins/_grid.scss +151 -0
  83. cotton_bs5/static/bs5/mixins/_image.scss +16 -0
  84. cotton_bs5/static/bs5/mixins/_list-group.scss +26 -0
  85. cotton_bs5/static/bs5/mixins/_lists.scss +7 -0
  86. cotton_bs5/static/bs5/mixins/_pagination.scss +10 -0
  87. cotton_bs5/static/bs5/mixins/_reset-text.scss +17 -0
  88. cotton_bs5/static/bs5/mixins/_resize.scss +6 -0
  89. cotton_bs5/static/bs5/mixins/_table-variants.scss +24 -0
  90. cotton_bs5/static/bs5/mixins/_text-truncate.scss +8 -0
  91. cotton_bs5/static/bs5/mixins/_transition.scss +26 -0
  92. cotton_bs5/static/bs5/mixins/_utilities.scss +97 -0
  93. cotton_bs5/static/bs5/mixins/_visually-hidden.scss +33 -0
  94. cotton_bs5/static/bs5/utilities/_api.scss +47 -0
  95. cotton_bs5/static/bs5/vendor/_rfs.scss +348 -0
  96. cotton_bs5/static/stylesheet.scss +120 -0
  97. cotton_bs5/templates/cotton/accordion/body.html +6 -0
  98. cotton_bs5/templates/cotton/accordion/header.html +12 -0
  99. cotton_bs5/templates/cotton/accordion/index.html +6 -0
  100. cotton_bs5/templates/cotton/accordion/item.html +8 -0
  101. cotton_bs5/templates/cotton/alert.html +11 -0
  102. cotton_bs5/templates/cotton/badge.html +6 -0
  103. cotton_bs5/templates/cotton/breadcrumbs/index.html +9 -0
  104. cotton_bs5/templates/cotton/breadcrumbs/item.html +13 -0
  105. cotton_bs5/templates/cotton/button/dismiss.html +9 -0
  106. cotton_bs5/templates/cotton/button/index.html +15 -0
  107. cotton_bs5/templates/cotton/button_group.html +9 -0
  108. cotton_bs5/templates/cotton/card/body.html +4 -0
  109. cotton_bs5/templates/cotton/card/footer.html +4 -0
  110. cotton_bs5/templates/cotton/card/header.html +4 -0
  111. cotton_bs5/templates/cotton/card/index.html +13 -0
  112. cotton_bs5/templates/cotton/card/subtitle.html +2 -0
  113. cotton_bs5/templates/cotton/card/title.html +2 -0
  114. cotton_bs5/templates/cotton/carousel/button.html +9 -0
  115. cotton_bs5/templates/cotton/carousel/caption.html +4 -0
  116. cotton_bs5/templates/cotton/carousel/index.html +12 -0
  117. cotton_bs5/templates/cotton/carousel/item.html +5 -0
  118. cotton_bs5/templates/cotton/collapse.html +11 -0
  119. cotton_bs5/templates/cotton/dropdown/divider.html +1 -0
  120. cotton_bs5/templates/cotton/dropdown/header.html +4 -0
  121. cotton_bs5/templates/cotton/dropdown/index.html +11 -0
  122. cotton_bs5/templates/cotton/dropdown/item.html +15 -0
  123. cotton_bs5/templates/cotton/dropdown/toggle.html +15 -0
  124. cotton_bs5/templates/cotton/grid/col.html +5 -0
  125. cotton_bs5/templates/cotton/grid/index.html +5 -0
  126. cotton_bs5/templates/cotton/list_group/index.html +11 -0
  127. cotton_bs5/templates/cotton/list_group/item.html +9 -0
  128. cotton_bs5/templates/cotton/modal/body.html +1 -0
  129. cotton_bs5/templates/cotton/modal/footer.html +3 -0
  130. cotton_bs5/templates/cotton/modal/header.html +8 -0
  131. cotton_bs5/templates/cotton/modal/index.html +23 -0
  132. cotton_bs5/templates/cotton/modal/title.html +3 -0
  133. cotton_bs5/templates/cotton/nav/index.html +5 -0
  134. cotton_bs5/templates/cotton/nav/link.html +4 -0
  135. cotton_bs5/templates/cotton/navbar/index.html +26 -0
  136. cotton_bs5/templates/cotton/navbar/link.html +9 -0
  137. cotton_bs5/templates/cotton/navbar/links.html +4 -0
  138. cotton_bs5/templates/cotton/offcanvas/body.html +2 -0
  139. cotton_bs5/templates/cotton/offcanvas/footer.html +6 -0
  140. cotton_bs5/templates/cotton/offcanvas/header.html +5 -0
  141. cotton_bs5/templates/cotton/offcanvas/index.html +7 -0
  142. cotton_bs5/templates/cotton/offcanvas/title.html +2 -0
  143. cotton_bs5/templates/cotton/pagination/index.html +6 -0
  144. cotton_bs5/templates/cotton/pagination/link.html +14 -0
  145. cotton_bs5/templates/cotton/placeholder.html +4 -0
  146. cotton_bs5/templates/cotton/progress.html +24 -0
  147. cotton_bs5/templates/cotton/ratio.html +5 -0
  148. cotton_bs5/templates/cotton/spinner.html +9 -0
  149. cotton_bs5/templates/cotton/table.html +15 -0
  150. cotton_bs5/templates/cotton/tabs/content.html +4 -0
  151. cotton_bs5/templates/cotton/tabs/index.html +13 -0
  152. cotton_bs5/templates/cotton/tabs/item.html +18 -0
  153. cotton_bs5/templates/cotton/tabs/pane.html +11 -0
  154. cotton_bs5/templates/cotton/toast/activate.html +17 -0
  155. cotton_bs5/templates/cotton/toast/body.html +3 -0
  156. cotton_bs5/templates/cotton/toast/header.html +5 -0
  157. cotton_bs5/templates/cotton/toast/index.html +9 -0
  158. django_cotton_bs5-0.2.1.dist-info/LICENSE +21 -0
  159. django_cotton_bs5-0.2.1.dist-info/METADATA +78 -0
  160. django_cotton_bs5-0.2.1.dist-info/RECORD +161 -0
  161. django_cotton_bs5-0.2.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,4 @@
1
+ <c-vars text />
2
+ <li>
3
+ <h6 class="dropdown-header">{{ text }}{{ slot }}</h6>
4
+ </li>
@@ -0,0 +1,11 @@
1
+ {% load cotton %}
2
+ <c-vars direction="down"
3
+ :dir_dict="{'up': 'dropup', 'down': 'dropdown', 'left': 'dropstart', 'right':'dropend'}"
4
+ class />
5
+ <div class="{{ dir_dict|get_item:direction }} {{ class }}"
6
+ {{ attrs }}>
7
+ {{ button }}
8
+ <ul class="dropdown-menu">
9
+ {{ slot }}
10
+ </ul>
11
+ </div>
@@ -0,0 +1,15 @@
1
+ <c-vars href text active disabled class />
2
+ {% if href %}
3
+ <a class="dropdown-item{% if active %} active{% endif %}{% if disabled %} disabled{% endif %} {{ class }}"
4
+ {% if disabled %}tabindex="-1" aria-disabled="true"{% endif %}
5
+ {{ attrs }}>
6
+ {{ text }} {{ slot }}
7
+ </a>
8
+ {% else %}
9
+ <button class="dropdown-item{% if active %} active{% endif %}{% if disabled %} disabled{% endif %} {{ class }}"
10
+ type="button"
11
+ {% if disabled %}disabled{% endif %}
12
+ {{ attrs }}>
13
+ {{ text }} {{ slot }}
14
+ </button>
15
+ {% endif %}
@@ -0,0 +1,15 @@
1
+ <c-vars variant="primary"
2
+ size=""
3
+ :caret="True"
4
+ split
5
+ disabled
6
+ text
7
+ class />
8
+ <button type="button"
9
+ class="btn{% if caret %} dropdown-toggle{% endif %} btn-{{ variant }}{% if size %} btn-{{ size }}{% endif %} {{ class }}"
10
+ data-bs-toggle="dropdown"
11
+ aria-expanded="false"
12
+ {% if disabled %}disabled{% endif %}
13
+ {{ attrs }}>
14
+ {{ text }} {{ slot }}
15
+ </button>
@@ -0,0 +1,5 @@
1
+ <c-vars width="" :responsive="{}" offset="" class />
2
+ <div class="{% if width %}col-{{ width }} {% else %} col {% endif %} {% for bp, width in responsive.items %}col-{{ bp }}-{{ width }}{% endfor %} {{ class }}"
3
+ {{ attrs }}>
4
+ {{ slot }}
5
+ </div>
@@ -0,0 +1,5 @@
1
+ <c-vars cols="" gap="1" :responsive="{}" class />
2
+ <div class="row{% if cols %} row-cols-{{ cols }}{% endif %}{% if gap %} g-{{ gap }}{% endif %}{% for bp,cols in responsive.items %} row-cols-{{ bp }}-{{ cols }}{% endfor %} {{ class }}"
3
+ {{ attrs }}>
4
+ {{ slot }}
5
+ </div>
@@ -0,0 +1,11 @@
1
+ <c-vars :flush="False"
2
+ :numbered="False"
3
+ :horizontal="False"
4
+ class />
5
+ {# djlint:off #}
6
+ <{% if numbered %}ol{% else %}ul{% endif %}
7
+ class="list-group{% if flush %} list-group-flush{% endif %}{% if horizontal %} list-group-horizontal{% if horizontal != True %}-{{ horizontal }}{% endif %}{% endif %}{{ class }}"
8
+ {{ attrs }}>
9
+ {{ slot }}
10
+ </{% if numbered %}ol{% else %}ul{% endif %}>
11
+ {# djlint:on #}
@@ -0,0 +1,9 @@
1
+ <c-vars text active disabled variant href tag="li" class />
2
+ {# djlint:off #}
3
+ <{% if href %}a href="{{ href }}"{% else %}{{ tag }}{% endif %}
4
+ class="list-group-item{% if href %} list-group-item-action{% endif %}{% if active %} active{% elif disabled %} disabled{% endif %}{% if variant %} list-group-item-{{ variant }}{% endif %} {{ class }}"
5
+ {% if active %}aria-current="true"{% elif disabled %}aria-disabled="true"{% endif %}
6
+ {{ attrs }}>
7
+ {{ text }} {{ slot }}
8
+ </{% if href %}a{% else %}{{ tag }}{% endif %}>
9
+ {# djlint:on #}
@@ -0,0 +1 @@
1
+ <div class="modal-body">{{ slot }}</div>
@@ -0,0 +1,3 @@
1
+ <c-vars class />
2
+ <div class="modal-footer {{ class }}" {{ attrs }}>{{ slot }}
3
+ </div>
@@ -0,0 +1,8 @@
1
+ <c-vars id title class />
2
+ <div class="modal-header">
3
+ {{ header_start }}
4
+ <h1 class="modal-title fs-5 {{ class }}"
5
+ {% if id %}id="{{ id }}Label"{% endif %}>{{ title }}</h1>
6
+ {{ header_end }}
7
+ <c-button.dismiss dismiss="modal" />
8
+ </div>
@@ -0,0 +1,23 @@
1
+ <c-vars id
2
+ fade
3
+ centered
4
+ scrollable
5
+ backdrop
6
+ size
7
+ class
8
+ dialog_attrs
9
+ content_class
10
+ content_attrs />
11
+ <div id="{{ id }}"
12
+ class="modal {% if fade %}fade{% endif %} {{ class }}"
13
+ tabindex="-1"
14
+ aria-labelledby="{{ id }}Label"
15
+ aria-hidden="true"
16
+ {{ attrs }}>
17
+ <div class="modal-dialog {% if centered %}modal-dialog-centered{% endif %}{% if scrollable %}modal-dialog-scrollable{% endif %}"
18
+ {{ dialog_attrs }}>
19
+ <div class="modal-content {{ content_class }}"
20
+ {{ content_attrs }}>{{ slot }}
21
+ </div>
22
+ </div>
23
+ </div>
@@ -0,0 +1,3 @@
1
+ <c-vars id text class />
2
+ <h1 class="modal-title fs-5 {{ class }}"
3
+ {% if id %}id="{{ id }}Label"{% endif %}>{{ text }} {{ slot }}</h1>
@@ -0,0 +1,5 @@
1
+ <c-vars type vertical fill justify class />
2
+ <nav class="nav {% if type %}nav-{{ type }}{% endif %} {% if fill %}nav-fill{% endif %}{% if justify %} nav-justify{% endif %}{% if vertical %} flex-column{% endif %} {{ class }}"
3
+ {{ attrs }}>
4
+ {{ slot }}
5
+ </nav>
@@ -0,0 +1,4 @@
1
+ <c-vars text active disabled class />
2
+ <a class="nav-link{% if active %} active{% elif disabled %} disabled{% endif %} {{ class }}"
3
+ {% if active %} aria-current="page" {% elif disabled %} aria-disabled="true"{% endif %}
4
+ {{ attrs }}>{{ slot }}{{ text }}</a>
@@ -0,0 +1,26 @@
1
+ {% load i18n %}
2
+ <c-vars expand="lg" brand brand_href="/" class />
3
+ <nav class="navbar{% if expand %} navbar-expand-{{ expand }}{% endif %} {{ class }}"
4
+ {{ attrs }}>
5
+ <div class="container-fluid">
6
+ {% if brand %}<a class="navbar-brand" href="{{ brand_href }}">{{ brand }}</a>{% endif %}
7
+ {% if expand %}
8
+ <button class="navbar-toggler"
9
+ type="button"
10
+ data-bs-toggle="collapse"
11
+ data-bs-target="#navbarNav"
12
+ aria-controls="navbarNav"
13
+ aria-expanded="false"
14
+ aria-label="{% trans "Toggle navigation" %}">
15
+ <span class="navbar-toggler-icon"></span>
16
+ </button>
17
+ <div class="collapse navbar-collapse" id="navbarNav">
18
+ <c-navbar.links>
19
+ {{ slot }}
20
+ </c-navbar.links>
21
+ </div>
22
+ {% else %}
23
+ {{ slot }}
24
+ {% endif %}
25
+ </div>
26
+ </nav>
@@ -0,0 +1,9 @@
1
+ <c-vars text active disabled li_class class />
2
+ <li class="nav-item {{ li_class }}">
3
+ <a class="nav-link{% if active %} active{% endif %}{% if disabled %} disabled{% endif %} {{ class }}"
4
+ {% if active %}aria-current="page"{% endif %}
5
+ {% if disabled %}tabindex="-1" aria-disabled="true"{% endif %}
6
+ {{ attrs }}>
7
+ {{ text }} {{ slot }}
8
+ </a>
9
+ </li>
@@ -0,0 +1,4 @@
1
+ <c-vars align="" class />
2
+ <ul class="navbar-nav {{ class }}" {{ attrs }}>
3
+ {{ slot }}
4
+ </ul>
@@ -0,0 +1,2 @@
1
+ <c-vars class />
2
+ <div class="offcanvas-body {{ class }}">{{ slot }}</div>
@@ -0,0 +1,6 @@
1
+ <c-vars sticky text class />
2
+ <div class="offcanvas-footer d-flex justify-content-end flex-shrink-1 px-md-3 py-md-2 gap-2 mt-auto {{ class }}{% if sticky %} sticky-bottom{% endif %}"
3
+ {{ attrs }}>
4
+ {{ text }}
5
+ {{ slot }}
6
+ </div>
@@ -0,0 +1,5 @@
1
+ <c-vars text class />
2
+ <div class="offcanvas-header {{ class }}" {{ attrs }}>
3
+ {{ slot }}
4
+ <c-button.dismiss dismiss="offcanvas" data-bs-target="#{{ id }}" />
5
+ </div>
@@ -0,0 +1,7 @@
1
+ <c-vars placement="start" breakpoint class />
2
+ <div class="{% if breakpoint %}offcanvas-{{ breakpoint }} {% else %}offcanvas{% endif %} offcanvas-{{ placement }} {{ class }}"
3
+ tabindex="-1"
4
+ aria-labelledby="{{ id }}Label"
5
+ aria-hidden="true"
6
+ {{ attrs }}>{{ slot }}
7
+ </div>
@@ -0,0 +1,2 @@
1
+ <c-vars title class />
2
+ <h5 class="offcanvas-title {{ class }}">{{ title }} {{ slot }}</h5>
@@ -0,0 +1,6 @@
1
+ <c-vars size="" class />
2
+ <nav {{ attrs }}>
3
+ <ul class="pagination{% if size %} pagination-{{ size }}{% endif %} {{ class }}">
4
+ {{ slot }}
5
+ </ul>
6
+ </nav>
@@ -0,0 +1,14 @@
1
+ <c-vars page text active disabled class />
2
+ <li class="page-item{% if active %} active{% endif %}{% if disabled %} disabled{% endif %}">
3
+ {% if disabled %}
4
+ <span class="page-link {{ class }}" {{ attrs }}>{{ text }} {{ slot }}</span>
5
+ {% else %}
6
+ <a class="page-link {{ class }}"
7
+ href="?page={{ page }}"
8
+ {% if active %}aria-current="page"{% endif %}
9
+ {% if disabled %}tabindex="-1" aria-disabled="true"{% endif %}
10
+ {{ attrs }}>
11
+ {{ text }} {{ slot }}
12
+ </a>
13
+ {% endif %}
14
+ </li>
@@ -0,0 +1,4 @@
1
+ <c-vars width="12" size="" glow wave />
2
+ <div class="{% if glow or wave %}placeholder-{% if glow %}glow{% elif wave %}wave{% endif %} {% endif %}">
3
+ <span class="placeholder col-{{ width }}{% if size %} placeholder-{{ size }}{% endif %} {{ class }} {% if variant %}bg-{{ variant }}{% endif %}"></span>
4
+ </div>
@@ -0,0 +1,24 @@
1
+ {% load i18n %}
2
+ <c-vars value
3
+ :min="0"
4
+ :max="100"
5
+ text
6
+ label
7
+ variant="primary"
8
+ striped
9
+ animated
10
+ class />
11
+ {% trans "Progress" as default_label %}
12
+ <div class="progress {{ class }}"
13
+ role="progressbar"
14
+ aria-label="{% firstof label default_label %}"
15
+ aria-valuenow="{{ value }}"
16
+ aria-valuemin="{{ min }}"
17
+ aria-valuemax="{{ max }}"
18
+ {{ attrs }}>
19
+ <div class="progress-bar bg-{{ variant }}{% if striped %} progress-bar-striped{% endif %}{% if animated %} progress-bar-animated{% endif %}"
20
+ style="width: calc(({{ value }} - {{ min }}) / ({{ max }} - {{ min }}) * 100%)">
21
+ {{ text }}
22
+ {{ slot }}
23
+ </div>
24
+ </div>
@@ -0,0 +1,5 @@
1
+ <c-vars w="1" h="1" perc />
2
+ <div class="ratio"
3
+ {% if perc %} style="--bs-aspect-ratio: {{ perc }};" {% else %} style="--bs-aspect-ratio: calc({{ h }} / {{ w }} * 100%);" {% endif %}>
4
+ {{ slot }}
5
+ </div>
@@ -0,0 +1,9 @@
1
+ {% load i18n %}
2
+ <c-vars type="border" size variant label class />
3
+ {% trans "Loading..." as default_label %}
4
+ <div class="spinner-{{ type }}{% if size %} spinner-{{ type }}-{{ size }}{% endif %}{% if variant %} text-{{ variant }}{% endif %} {{ class }}"
5
+ role="status"
6
+ {{ attrs }}>
7
+ <span class="visually-hidden">{% firstof label default_label %}</span>
8
+ {{ slot }}
9
+ </div>
@@ -0,0 +1,15 @@
1
+ <c-vars striped
2
+ bordered
3
+ hover
4
+ responsive
5
+ small
6
+ variant
7
+ caption
8
+ class />
9
+ <div class="table-responsive{% if responsive %}-{{ responsive }}{% endif %}">
10
+ <table class="table{% if small %} table-sm{% endif %}{% if striped %} table-striped{% endif %}{% if bordered %} table-bordered{% endif %}{% if hover %} table-hover{% endif %}{% if variant %} table-{{ variant }}{% endif %} {{ class }}"
11
+ {{ attrs }}>
12
+ {% if caption %}<caption>{{ caption }}</caption>{% endif %}
13
+ {{ slot }}
14
+ </table>
15
+ </div>
@@ -0,0 +1,4 @@
1
+ <c-vars class />
2
+ <div class="tab-content {{ class }}" {{ attrs }}>
3
+ {{ slot }}
4
+ </div>
@@ -0,0 +1,13 @@
1
+ <c-vars type vertical fill justify class />
2
+ {# djlint:off #}
3
+ <ul class="nav {% if type %}nav-{{ type }}{% endif %}
4
+ {% if fill %}nav-fill{% endif %}
5
+ {% if justify %} nav-justify{% endif %}
6
+ {% if vertical %} flex-column{% endif %}
7
+ {{ class }}"
8
+ role="tablist"
9
+ {% if vertical %} aria-orientation="vertical"{% endif %}
10
+ {{ attrs }}>
11
+ {{ slot }}
12
+ </ul>
13
+ {# djlint:on #}
@@ -0,0 +1,18 @@
1
+ <c-vars target active disabled text class />
2
+ {# djlint:off #}
3
+ <li class="nav-item" role="presentation">
4
+ <button class="nav-link{% if active %} active{% endif %} {{ class }}"
5
+ id="{{ target }}-tab"
6
+ data-bs-toggle="tab"
7
+ data-bs-target="#{{ target }}"
8
+ aria-controls="{{ target }}"
9
+ aria-selected="{% if active %}true{% else %}false{% endif %}"
10
+ tabindex="{% if active %}0{% else %}-1{% endif %}"
11
+ {% if disabled %}disabled aria-disabled="true"{% endif %}
12
+ type="button"
13
+ role="tab"
14
+ {{ attrs }}>
15
+ {{ text }} {{ slot }}
16
+ </button>
17
+ </li>
18
+ {# djlint:on #}
@@ -0,0 +1,11 @@
1
+ <c-vars id active show class />
2
+ {# djlint:off #}
3
+ <div id="{{ id }}"
4
+ class="tab-pane{% if active %} active{% endif %}{% if show %} show{% endif %} {{ class }}"
5
+ role="tabpanel"
6
+ aria-labelledby="{{ id }}-tab"
7
+ tabindex="{% if active %}0{% else %}-1{% endif %}"
8
+ {{ attrs }}>
9
+ {{ slot }}
10
+ </div>
11
+ {# djlint:on #}
@@ -0,0 +1,17 @@
1
+ <script>
2
+ // Initialize all toasts
3
+ document.addEventListener('DOMContentLoaded', function() {
4
+ var toastElList = [].slice.call(document.querySelectorAll('.toast'));
5
+ var toastList = toastElList.map(function(toastEl) {
6
+ return new bootstrap.Toast(toastEl);
7
+ });
8
+
9
+ // Auto-show toasts that don't have autohide disabled
10
+ toastList.forEach(function(toast) {
11
+ var toastEl = toast._element;
12
+ if (toastEl.dataset.bsAutohide !== 'false') {
13
+ toast.show();
14
+ }
15
+ });
16
+ });
17
+ </script>
@@ -0,0 +1,3 @@
1
+ <c-vars class />
2
+
3
+ <div class="toast-body {{ class }}">{{ slot }}</div>
@@ -0,0 +1,5 @@
1
+ <c-vars class />
2
+ <div class="toast-header {{ class }}">
3
+ {{ slot }}
4
+ <c-button.dismiss dismiss="toast" />
5
+ </div>
@@ -0,0 +1,9 @@
1
+ <c-vars :autohide="True" delay="5000" class />
2
+ <div class="toast {{ class }}"
3
+ role="alert"
4
+ aria-live="assertive"
5
+ aria-atomic="true"
6
+ {% if autohide %}data-bs-autohide="true" data-bs-delay="{{ delay }}"{% else %}data-bs-autohide="false"{% endif %}
7
+ {{ attrs }}>
8
+ {{ slot }}
9
+ </div>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Samuel Jennings
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.1
2
+ Name: django-cotton-bs5
3
+ Version: 0.2.1
4
+ Summary: Bootstrap 5 components for use with Django Cotton.
5
+ License: MIT
6
+ Author: Sam
7
+ Author-email: samuel.scott.jennings@gmail.com
8
+ Requires-Python: >=3.10,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Provides-Extra: django-compressor
15
+ Requires-Dist: django-compressor (>=4.5.1,<5.0.0) ; extra == "django-compressor"
16
+ Requires-Dist: django-cotton (>2.1)
17
+ Requires-Dist: django-libsass (>=0.9,<0.10)
18
+ Description-Content-Type: text/markdown
19
+
20
+ # Django Cotton BS5
21
+
22
+ Bootstrap 5 components for Django Cotton - A comprehensive library of reusable, modular components.
23
+
24
+ **Note:** This project is currently a work in progress. Users are encouraged to request new components or features via the [issue tracker](https://github.com/SamuelJennings/cotton-bs5/issues).
25
+
26
+ [View demo](https://samueljennings.github.io/cotton-bs5/)
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install cotton-bs5
32
+ ```
33
+
34
+ Add `cotton_bs5` to your `INSTALLED_APPS` in `settings.py`:
35
+
36
+ ```python
37
+ INSTALLED_APPS = [
38
+ ...
39
+ "django_cotton",
40
+ "cotton_bs5",
41
+ ...
42
+ ]
43
+ ```
44
+
45
+ ## Available Components
46
+
47
+ The following Bootstrap 5 components are currently available as Django Cotton components:
48
+
49
+ - **Alert** (`<c-alert>`) — Bootstrap alerts with variants, dismissible, slot/text support
50
+ - **Accordion** (`<c-accordion>`, `<c-accordion.item>`, `<c-accordion.header>`) — Collapsible accordion panels
51
+ - **Breadcrumbs** (`<c-breadcrumbs>`, `<c-breadcrumbs.item>`) — Navigation breadcrumbs
52
+ - **Button** (`<c-button>`) — Button/link with variants, outline, icon, slot/text
53
+ - **Button Group** (`<c-button_group>`) — Grouped buttons, vertical/size/label support
54
+ - **Card** (`<c-card>`, `<c-card.body>`, `<c-card.title>`) — Card container, body, and title
55
+ - **List Group** (`<c-list_group>`, `<c-list_group.item>`) — List group and items, horizontal/numbered/active/disabled
56
+ - **Modal** (`<c-modal>`, `<c-modal.title>`, `<c-modal.body>`) — Modal dialog, title, and body
57
+ - **Navbar** (`<c-navbar>`) — Responsive navigation bar with brand, expand, toggler
58
+ - **Progress** (`<c-progress>`) — Progress bar with value, min/max, variant, striped, animated, label
59
+ - **Spinner** (`<c-spinner>`) — Loading spinner, border/grow, size, variant, label
60
+ - **Table** (`<c-table>`) — Responsive table, striped, bordered, hover, small, variant, caption
61
+ - **Tabs** (`<c-tabs>`, `<c-tabs.item>`, `<c-tabs.pane>`) — Tab navigation and tab panes
62
+
63
+ More components are planned. Please request additional Bootstrap 5 components or features via the [issue tracker](https://github.com/SamuelJennings/cotton-bs5/issues).
64
+
65
+ ## Contributing
66
+
67
+ This library follows django-cotton conventions and Bootstrap 5 standards. When adding new components:
68
+
69
+ 1. Use `<c-vars />` for default values
70
+ 2. Include proper accessibility attributes
71
+ 3. Support all relevant Bootstrap 5 options
72
+ 4. Maintain consistent naming conventions
73
+ 5. Test with various configurations
74
+
75
+ ## License
76
+
77
+ MIT License - see [LICENSE](LICENSE) file for details.
78
+