django-cotton-bs5 0.2.1__tar.gz

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. django_cotton_bs5-0.2.1/LICENSE +21 -0
  2. django_cotton_bs5-0.2.1/PKG-INFO +78 -0
  3. django_cotton_bs5-0.2.1/README.md +58 -0
  4. django_cotton_bs5-0.2.1/cotton_bs5/__init__.py +0 -0
  5. django_cotton_bs5-0.2.1/cotton_bs5/apps.py +5 -0
  6. django_cotton_bs5-0.2.1/cotton_bs5/static/_variables.scss +61 -0
  7. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_accordion.scss +158 -0
  8. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_alert.scss +68 -0
  9. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_badge.scss +38 -0
  10. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_breadcrumb.scss +40 -0
  11. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_button-group.scss +142 -0
  12. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_buttons.scss +216 -0
  13. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_card.scss +239 -0
  14. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_carousel.scss +236 -0
  15. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_close.scss +63 -0
  16. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_containers.scss +41 -0
  17. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_dropdown.scss +250 -0
  18. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_forms.scss +9 -0
  19. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_functions.scss +302 -0
  20. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_grid.scss +39 -0
  21. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_helpers.scss +12 -0
  22. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_images.scss +42 -0
  23. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_list-group.scss +197 -0
  24. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_maps.scss +174 -0
  25. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_mixins.scss +42 -0
  26. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_modal.scss +236 -0
  27. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_nav.scss +197 -0
  28. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_navbar.scss +289 -0
  29. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_offcanvas.scss +143 -0
  30. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_pagination.scss +109 -0
  31. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_placeholders.scss +51 -0
  32. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_popover.scss +196 -0
  33. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_progress.scss +68 -0
  34. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_reboot.scss +611 -0
  35. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_root.scss +187 -0
  36. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_spinners.scss +85 -0
  37. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_tables.scss +171 -0
  38. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_toasts.scss +73 -0
  39. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_tooltip.scss +119 -0
  40. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_transitions.scss +27 -0
  41. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_type.scss +106 -0
  42. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_utilities.scss +806 -0
  43. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_variables-dark.scss +87 -0
  44. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/_variables.scss +1751 -0
  45. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/bootstrap-grid.scss +62 -0
  46. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/bootstrap-reboot.scss +10 -0
  47. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/bootstrap-utilities.scss +19 -0
  48. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/bootstrap.scss +52 -0
  49. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_floating-labels.scss +95 -0
  50. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_form-check.scss +189 -0
  51. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_form-control.scss +214 -0
  52. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_form-range.scss +91 -0
  53. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_form-select.scss +80 -0
  54. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_form-text.scss +11 -0
  55. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_input-group.scss +132 -0
  56. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_labels.scss +36 -0
  57. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/forms/_validation.scss +12 -0
  58. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_clearfix.scss +3 -0
  59. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_color-bg.scss +7 -0
  60. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_colored-links.scss +30 -0
  61. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_focus-ring.scss +5 -0
  62. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_icon-link.scss +25 -0
  63. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_position.scss +36 -0
  64. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_ratio.scss +26 -0
  65. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_stacks.scss +15 -0
  66. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_stretched-link.scss +15 -0
  67. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_text-truncation.scss +7 -0
  68. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_visually-hidden.scss +8 -0
  69. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/helpers/_vr.scss +8 -0
  70. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_alert.scss +18 -0
  71. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_backdrop.scss +14 -0
  72. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_banner.scss +7 -0
  73. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_border-radius.scss +78 -0
  74. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_box-shadow.scss +18 -0
  75. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_breakpoints.scss +127 -0
  76. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_buttons.scss +70 -0
  77. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_caret.scss +69 -0
  78. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_clearfix.scss +9 -0
  79. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_color-mode.scss +21 -0
  80. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_color-scheme.scss +7 -0
  81. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_container.scss +11 -0
  82. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_deprecate.scss +10 -0
  83. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_forms.scss +163 -0
  84. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_gradients.scss +47 -0
  85. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_grid.scss +151 -0
  86. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_image.scss +16 -0
  87. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_list-group.scss +26 -0
  88. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_lists.scss +7 -0
  89. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_pagination.scss +10 -0
  90. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_reset-text.scss +17 -0
  91. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_resize.scss +6 -0
  92. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_table-variants.scss +24 -0
  93. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_text-truncate.scss +8 -0
  94. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_transition.scss +26 -0
  95. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_utilities.scss +97 -0
  96. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/mixins/_visually-hidden.scss +33 -0
  97. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/utilities/_api.scss +47 -0
  98. django_cotton_bs5-0.2.1/cotton_bs5/static/bs5/vendor/_rfs.scss +348 -0
  99. django_cotton_bs5-0.2.1/cotton_bs5/static/stylesheet.scss +120 -0
  100. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/accordion/body.html +6 -0
  101. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/accordion/header.html +12 -0
  102. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/accordion/index.html +6 -0
  103. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/accordion/item.html +8 -0
  104. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/alert.html +11 -0
  105. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/badge.html +6 -0
  106. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/breadcrumbs/index.html +9 -0
  107. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/breadcrumbs/item.html +13 -0
  108. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/button/dismiss.html +9 -0
  109. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/button/index.html +15 -0
  110. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/button_group.html +9 -0
  111. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/card/body.html +4 -0
  112. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/card/footer.html +4 -0
  113. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/card/header.html +4 -0
  114. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/card/index.html +13 -0
  115. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/card/subtitle.html +2 -0
  116. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/card/title.html +2 -0
  117. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/carousel/button.html +9 -0
  118. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/carousel/caption.html +4 -0
  119. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/carousel/index.html +12 -0
  120. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/carousel/item.html +5 -0
  121. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/collapse.html +11 -0
  122. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/dropdown/divider.html +1 -0
  123. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/dropdown/header.html +4 -0
  124. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/dropdown/index.html +11 -0
  125. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/dropdown/item.html +15 -0
  126. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/dropdown/toggle.html +15 -0
  127. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/grid/col.html +5 -0
  128. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/grid/index.html +5 -0
  129. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/list_group/index.html +11 -0
  130. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/list_group/item.html +9 -0
  131. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/modal/body.html +1 -0
  132. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/modal/footer.html +3 -0
  133. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/modal/header.html +8 -0
  134. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/modal/index.html +23 -0
  135. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/modal/title.html +3 -0
  136. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/nav/index.html +5 -0
  137. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/nav/link.html +4 -0
  138. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/navbar/index.html +26 -0
  139. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/navbar/link.html +9 -0
  140. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/navbar/links.html +4 -0
  141. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/offcanvas/body.html +2 -0
  142. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/offcanvas/footer.html +6 -0
  143. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/offcanvas/header.html +5 -0
  144. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/offcanvas/index.html +7 -0
  145. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/offcanvas/title.html +2 -0
  146. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/pagination/index.html +6 -0
  147. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/pagination/link.html +14 -0
  148. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/placeholder.html +4 -0
  149. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/progress.html +24 -0
  150. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/ratio.html +5 -0
  151. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/spinner.html +9 -0
  152. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/table.html +15 -0
  153. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/tabs/content.html +4 -0
  154. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/tabs/index.html +13 -0
  155. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/tabs/item.html +18 -0
  156. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/tabs/pane.html +11 -0
  157. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/toast/activate.html +17 -0
  158. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/toast/body.html +3 -0
  159. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/toast/header.html +5 -0
  160. django_cotton_bs5-0.2.1/cotton_bs5/templates/cotton/toast/index.html +9 -0
  161. django_cotton_bs5-0.2.1/pyproject.toml +224 -0
@@ -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
+
@@ -0,0 +1,58 @@
1
+ # Django Cotton BS5
2
+
3
+ Bootstrap 5 components for Django Cotton - A comprehensive library of reusable, modular components.
4
+
5
+ **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).
6
+
7
+ [View demo](https://samueljennings.github.io/cotton-bs5/)
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install cotton-bs5
13
+ ```
14
+
15
+ Add `cotton_bs5` to your `INSTALLED_APPS` in `settings.py`:
16
+
17
+ ```python
18
+ INSTALLED_APPS = [
19
+ ...
20
+ "django_cotton",
21
+ "cotton_bs5",
22
+ ...
23
+ ]
24
+ ```
25
+
26
+ ## Available Components
27
+
28
+ The following Bootstrap 5 components are currently available as Django Cotton components:
29
+
30
+ - **Alert** (`<c-alert>`) — Bootstrap alerts with variants, dismissible, slot/text support
31
+ - **Accordion** (`<c-accordion>`, `<c-accordion.item>`, `<c-accordion.header>`) — Collapsible accordion panels
32
+ - **Breadcrumbs** (`<c-breadcrumbs>`, `<c-breadcrumbs.item>`) — Navigation breadcrumbs
33
+ - **Button** (`<c-button>`) — Button/link with variants, outline, icon, slot/text
34
+ - **Button Group** (`<c-button_group>`) — Grouped buttons, vertical/size/label support
35
+ - **Card** (`<c-card>`, `<c-card.body>`, `<c-card.title>`) — Card container, body, and title
36
+ - **List Group** (`<c-list_group>`, `<c-list_group.item>`) — List group and items, horizontal/numbered/active/disabled
37
+ - **Modal** (`<c-modal>`, `<c-modal.title>`, `<c-modal.body>`) — Modal dialog, title, and body
38
+ - **Navbar** (`<c-navbar>`) — Responsive navigation bar with brand, expand, toggler
39
+ - **Progress** (`<c-progress>`) — Progress bar with value, min/max, variant, striped, animated, label
40
+ - **Spinner** (`<c-spinner>`) — Loading spinner, border/grow, size, variant, label
41
+ - **Table** (`<c-table>`) — Responsive table, striped, bordered, hover, small, variant, caption
42
+ - **Tabs** (`<c-tabs>`, `<c-tabs.item>`, `<c-tabs.pane>`) — Tab navigation and tab panes
43
+
44
+ More components are planned. Please request additional Bootstrap 5 components or features via the [issue tracker](https://github.com/SamuelJennings/cotton-bs5/issues).
45
+
46
+ ## Contributing
47
+
48
+ This library follows django-cotton conventions and Bootstrap 5 standards. When adding new components:
49
+
50
+ 1. Use `<c-vars />` for default values
51
+ 2. Include proper accessibility attributes
52
+ 3. Support all relevant Bootstrap 5 options
53
+ 4. Maintain consistent naming conventions
54
+ 5. Test with various configurations
55
+
56
+ ## License
57
+
58
+ MIT License - see [LICENSE](LICENSE) file for details.
File without changes
@@ -0,0 +1,5 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class CottonBS5Config(AppConfig):
5
+ name = "cotton_bs5"
@@ -0,0 +1,61 @@
1
+ $font-family-sans-serif: 'Poppins', sans-serif;
2
+ $font-family-base: 'Poppins', sans-serif;
3
+
4
+ // // Blue & Green Theme
5
+ // $primary: #4A90E2; // Soft Blue
6
+ // $secondary: #50E3C2; // Light Green
7
+ // $warning: #F8E71C; // Lemon Yellow
8
+ // $light: #FFFFFF; // White
9
+ // $dark: #2A2A2A; // Dark Gray for text
10
+
11
+ // Teal & Orange Theme
12
+ $primary: #00A896; // Teal
13
+ // $secondary: #FF9F1C; // Soft Orange
14
+ $light: #F4F4F9; // Off-White
15
+ $dark: #4A4A4A; // Charcoal
16
+ $warning: #FF9F1C; // Soft Orange (also used as an accent color)
17
+ $train: #651b9e; // Teal (also used as an accent color)
18
+ // // Navy & Gold Theme
19
+ // $primary: #002855; // Navy Blue
20
+ // $secondary: #FFD166; // Golden Yellow
21
+ // $light: #E0E1DD; // Light Gray
22
+ // $dark: #2A2A2A; // Dark Gray for text
23
+ // $warning: #FFD166; // Golden Yellow (also as an accent color)
24
+
25
+ // // Purple & Mint Theme
26
+ // $primary: #9B5DE5; // Light Purple
27
+ // $secondary: #00F5D4; // Mint
28
+ // $warning: #F15BB5; // Coral
29
+ // $light: #FEE440; // Cream
30
+ // $dark: #2A2A2A; // Dark Gray for text
31
+
32
+ // // Monochramatic Blues & Bright Accents
33
+ // $primary: #0D3B66; // Dark Blue
34
+ // $secondary: #3F88C5; // Medium Blue
35
+ // $info: #85C7F2; // Light Blue
36
+ // $warning: #F4D35E; // Bright Yellow
37
+ // $light: #FFFFFF; // White
38
+
39
+
40
+ // $border-radius: 1rem;
41
+ // $border-radius: 0;
42
+ $enable-shadows: false;
43
+ $enable-gradients: false;
44
+ // $body-emphasis-color: $secondary;
45
+ // $nav-underline-link-active-color: var(--#{$prefix}emphasis-color);
46
+ // defaults
47
+ // $container-max-widths: (
48
+ // sm: 540px,
49
+ // md: 720px,
50
+ // lg: 960px,
51
+ // xl: 1140px,
52
+ // xxl: 1320px
53
+ // );
54
+
55
+ // $container-max-widths: (
56
+ // sm: 540px,
57
+ // md: 720px,
58
+ // lg: 960px,
59
+ // // xl: 960px,
60
+ // // xxl: 960px
61
+ // );
@@ -0,0 +1,158 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .accordion {
6
+ // scss-docs-start accordion-css-vars
7
+ --#{$prefix}accordion-color: #{$accordion-color};
8
+ --#{$prefix}accordion-bg: #{$accordion-bg};
9
+ --#{$prefix}accordion-transition: #{$accordion-transition};
10
+ --#{$prefix}accordion-border-color: #{$accordion-border-color};
11
+ --#{$prefix}accordion-border-width: #{$accordion-border-width};
12
+ --#{$prefix}accordion-border-radius: #{$accordion-border-radius};
13
+ --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
14
+ --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
15
+ --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
16
+ --#{$prefix}accordion-btn-color: #{$accordion-button-color};
17
+ --#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
18
+ --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
19
+ --#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
20
+ --#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
21
+ --#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
22
+ --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
23
+ --#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
24
+ --#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
25
+ --#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
26
+ --#{$prefix}accordion-active-color: #{$accordion-button-active-color};
27
+ --#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
28
+ // scss-docs-end accordion-css-vars
29
+ }
30
+
31
+ .accordion-button {
32
+ position: relative;
33
+ display: flex;
34
+ align-items: center;
35
+ width: 100%;
36
+ padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
37
+ @include font-size($font-size-base);
38
+ color: var(--#{$prefix}accordion-btn-color);
39
+ text-align: left; // Reset button style
40
+ background-color: var(--#{$prefix}accordion-btn-bg);
41
+ border: 0;
42
+ @include border-radius(0);
43
+ overflow-anchor: none;
44
+ @include transition(var(--#{$prefix}accordion-transition));
45
+
46
+ &:not(.collapsed) {
47
+ color: var(--#{$prefix}accordion-active-color);
48
+ background-color: var(--#{$prefix}accordion-active-bg);
49
+ box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
50
+
51
+ &::after {
52
+ background-image: var(--#{$prefix}accordion-btn-active-icon);
53
+ transform: var(--#{$prefix}accordion-btn-icon-transform);
54
+ }
55
+ }
56
+
57
+ // Accordion icon
58
+ &::after {
59
+ flex-shrink: 0;
60
+ width: var(--#{$prefix}accordion-btn-icon-width);
61
+ height: var(--#{$prefix}accordion-btn-icon-width);
62
+ margin-left: auto;
63
+ content: "";
64
+ background-image: var(--#{$prefix}accordion-btn-icon);
65
+ background-repeat: no-repeat;
66
+ background-size: var(--#{$prefix}accordion-btn-icon-width);
67
+ @include transition(var(--#{$prefix}accordion-btn-icon-transition));
68
+ }
69
+
70
+ &:hover {
71
+ z-index: 2;
72
+ }
73
+
74
+ &:focus {
75
+ z-index: 3;
76
+ outline: 0;
77
+ box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
78
+ }
79
+ }
80
+
81
+ .accordion-header {
82
+ margin-bottom: 0;
83
+ }
84
+
85
+ .accordion-item {
86
+ color: var(--#{$prefix}accordion-color);
87
+ background-color: var(--#{$prefix}accordion-bg);
88
+ border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
89
+
90
+ &:first-of-type {
91
+ @include border-top-radius(var(--#{$prefix}accordion-border-radius));
92
+
93
+ > .accordion-header .accordion-button {
94
+ @include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
95
+ }
96
+ }
97
+
98
+ &:not(:first-of-type) {
99
+ border-top: 0;
100
+ }
101
+
102
+ // Only set a border-radius on the last item if the accordion is collapsed
103
+ &:last-of-type {
104
+ @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
105
+
106
+ > .accordion-header .accordion-button {
107
+ &.collapsed {
108
+ @include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
109
+ }
110
+ }
111
+
112
+ > .accordion-collapse {
113
+ @include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
114
+ }
115
+ }
116
+ }
117
+
118
+ .accordion-body {
119
+ padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
120
+ }
121
+
122
+
123
+ // Flush accordion items
124
+ //
125
+ // Remove borders and border-radius to keep accordion items edge-to-edge.
126
+
127
+ .accordion-flush {
128
+ > .accordion-item {
129
+ border-right: 0;
130
+ border-left: 0;
131
+ @include border-radius(0);
132
+
133
+ &:first-child { border-top: 0; }
134
+ &:last-child { border-bottom: 0; }
135
+
136
+ // stylelint-disable selector-max-class
137
+ > .accordion-header .accordion-button {
138
+ &,
139
+ &.collapsed {
140
+ @include border-radius(0);
141
+ }
142
+ }
143
+ // stylelint-enable selector-max-class
144
+
145
+ > .accordion-collapse {
146
+ @include border-radius(0);
147
+ }
148
+ }
149
+ }
150
+
151
+ @if $enable-dark-mode {
152
+ @include color-mode(dark) {
153
+ .accordion-button::after {
154
+ --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)};
155
+ --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon-dark)};
156
+ }
157
+ }
158
+ }
@@ -0,0 +1,68 @@
1
+ //
2
+ // Base styles
3
+ //
4
+
5
+ .alert {
6
+ // scss-docs-start alert-css-vars
7
+ --#{$prefix}alert-bg: transparent;
8
+ --#{$prefix}alert-padding-x: #{$alert-padding-x};
9
+ --#{$prefix}alert-padding-y: #{$alert-padding-y};
10
+ --#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
11
+ --#{$prefix}alert-color: inherit;
12
+ --#{$prefix}alert-border-color: transparent;
13
+ --#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
14
+ --#{$prefix}alert-border-radius: #{$alert-border-radius};
15
+ --#{$prefix}alert-link-color: inherit;
16
+ // scss-docs-end alert-css-vars
17
+
18
+ position: relative;
19
+ padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x);
20
+ margin-bottom: var(--#{$prefix}alert-margin-bottom);
21
+ color: var(--#{$prefix}alert-color);
22
+ background-color: var(--#{$prefix}alert-bg);
23
+ border: var(--#{$prefix}alert-border);
24
+ @include border-radius(var(--#{$prefix}alert-border-radius));
25
+ }
26
+
27
+ // Headings for larger alerts
28
+ .alert-heading {
29
+ // Specified to prevent conflicts of changing $headings-color
30
+ color: inherit;
31
+ }
32
+
33
+ // Provide class for links that match alerts
34
+ .alert-link {
35
+ font-weight: $alert-link-font-weight;
36
+ color: var(--#{$prefix}alert-link-color);
37
+ }
38
+
39
+
40
+ // Dismissible alerts
41
+ //
42
+ // Expand the right padding and account for the close button's positioning.
43
+
44
+ .alert-dismissible {
45
+ padding-right: $alert-dismissible-padding-r;
46
+
47
+ // Adjust close link position
48
+ .btn-close {
49
+ position: absolute;
50
+ top: 0;
51
+ right: 0;
52
+ z-index: $stretched-link-z-index + 1;
53
+ padding: $alert-padding-y * 1.25 $alert-padding-x;
54
+ }
55
+ }
56
+
57
+
58
+ // scss-docs-start alert-modifiers
59
+ // Generate contextual modifier classes for colorizing the alert
60
+ @each $state in map-keys($theme-colors) {
61
+ .alert-#{$state} {
62
+ --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis);
63
+ --#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle);
64
+ --#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle);
65
+ --#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text-emphasis);
66
+ }
67
+ }
68
+ // scss-docs-end alert-modifiers
@@ -0,0 +1,38 @@
1
+ // Base class
2
+ //
3
+ // Requires one of the contextual, color modifier classes for `color` and
4
+ // `background-color`.
5
+
6
+ .badge {
7
+ // scss-docs-start badge-css-vars
8
+ --#{$prefix}badge-padding-x: #{$badge-padding-x};
9
+ --#{$prefix}badge-padding-y: #{$badge-padding-y};
10
+ @include rfs($badge-font-size, --#{$prefix}badge-font-size);
11
+ --#{$prefix}badge-font-weight: #{$badge-font-weight};
12
+ --#{$prefix}badge-color: #{$badge-color};
13
+ --#{$prefix}badge-border-radius: #{$badge-border-radius};
14
+ // scss-docs-end badge-css-vars
15
+
16
+ display: inline-block;
17
+ padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
18
+ @include font-size(var(--#{$prefix}badge-font-size));
19
+ font-weight: var(--#{$prefix}badge-font-weight);
20
+ line-height: 1;
21
+ color: var(--#{$prefix}badge-color);
22
+ text-align: center;
23
+ white-space: nowrap;
24
+ vertical-align: baseline;
25
+ @include border-radius(var(--#{$prefix}badge-border-radius));
26
+ @include gradient-bg();
27
+
28
+ // Empty badges collapse automatically
29
+ &:empty {
30
+ display: none;
31
+ }
32
+ }
33
+
34
+ // Quick fix for badges in buttons
35
+ .btn .badge {
36
+ position: relative;
37
+ top: -1px;
38
+ }
@@ -0,0 +1,40 @@
1
+ .breadcrumb {
2
+ // scss-docs-start breadcrumb-css-vars
3
+ --#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x};
4
+ --#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y};
5
+ --#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom};
6
+ @include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size);
7
+ --#{$prefix}breadcrumb-bg: #{$breadcrumb-bg};
8
+ --#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius};
9
+ --#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color};
10
+ --#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x};
11
+ --#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color};
12
+ // scss-docs-end breadcrumb-css-vars
13
+
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x);
17
+ margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom);
18
+ @include font-size(var(--#{$prefix}breadcrumb-font-size));
19
+ list-style: none;
20
+ background-color: var(--#{$prefix}breadcrumb-bg);
21
+ @include border-radius(var(--#{$prefix}breadcrumb-border-radius));
22
+ }
23
+
24
+ .breadcrumb-item {
25
+ // The separator between breadcrumbs (by default, a forward-slash: "/")
26
+ + .breadcrumb-item {
27
+ padding-left: var(--#{$prefix}breadcrumb-item-padding-x);
28
+
29
+ &::before {
30
+ float: left; // Suppress inline spacings and underlining of the separator
31
+ padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
32
+ color: var(--#{$prefix}breadcrumb-divider-color);
33
+ content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
34
+ }
35
+ }
36
+
37
+ &.active {
38
+ color: var(--#{$prefix}breadcrumb-item-active-color);
39
+ }
40
+ }
@@ -0,0 +1,142 @@
1
+ // Make the div behave like a button
2
+ .btn-group,
3
+ .btn-group-vertical {
4
+ position: relative;
5
+ display: inline-flex;
6
+ vertical-align: middle; // match .btn alignment given font-size hack above
7
+
8
+ > .btn {
9
+ position: relative;
10
+ flex: 1 1 auto;
11
+ }
12
+
13
+ // Bring the hover, focused, and "active" buttons to the front to overlay
14
+ // the borders properly
15
+ > .btn-check:checked + .btn,
16
+ > .btn-check:focus + .btn,
17
+ > .btn:hover,
18
+ > .btn:focus,
19
+ > .btn:active,
20
+ > .btn.active {
21
+ z-index: 1;
22
+ }
23
+ }
24
+
25
+ // Optional: Group multiple button groups together for a toolbar
26
+ .btn-toolbar {
27
+ display: flex;
28
+ flex-wrap: wrap;
29
+ justify-content: flex-start;
30
+
31
+ .input-group {
32
+ width: auto;
33
+ }
34
+ }
35
+
36
+ .btn-group {
37
+ @include border-radius($btn-border-radius);
38
+
39
+ // Prevent double borders when buttons are next to each other
40
+ > :not(.btn-check:first-child) + .btn,
41
+ > .btn-group:not(:first-child) {
42
+ margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
43
+ }
44
+
45
+ // Reset rounded corners
46
+ > .btn:not(:last-child):not(.dropdown-toggle),
47
+ > .btn.dropdown-toggle-split:first-child,
48
+ > .btn-group:not(:last-child) > .btn {
49
+ @include border-end-radius(0);
50
+ }
51
+
52
+ // The left radius should be 0 if the button is:
53
+ // - the "third or more" child
54
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
55
+ // - part of a btn-group which isn't the first child
56
+ > .btn:nth-child(n + 3),
57
+ > :not(.btn-check) + .btn,
58
+ > .btn-group:not(:first-child) > .btn {
59
+ @include border-start-radius(0);
60
+ }
61
+ }
62
+
63
+ // Sizing
64
+ //
65
+ // Remix the default button sizing classes into new ones for easier manipulation.
66
+
67
+ .btn-group-sm > .btn { @extend .btn-sm; }
68
+ .btn-group-lg > .btn { @extend .btn-lg; }
69
+
70
+
71
+ //
72
+ // Split button dropdowns
73
+ //
74
+
75
+ .dropdown-toggle-split {
76
+ padding-right: $btn-padding-x * .75;
77
+ padding-left: $btn-padding-x * .75;
78
+
79
+ &::after,
80
+ .dropup &::after,
81
+ .dropend &::after {
82
+ margin-left: 0;
83
+ }
84
+
85
+ .dropstart &::before {
86
+ margin-right: 0;
87
+ }
88
+ }
89
+
90
+ .btn-sm + .dropdown-toggle-split {
91
+ padding-right: $btn-padding-x-sm * .75;
92
+ padding-left: $btn-padding-x-sm * .75;
93
+ }
94
+
95
+ .btn-lg + .dropdown-toggle-split {
96
+ padding-right: $btn-padding-x-lg * .75;
97
+ padding-left: $btn-padding-x-lg * .75;
98
+ }
99
+
100
+
101
+ // The clickable button for toggling the menu
102
+ // Set the same inset shadow as the :active state
103
+ .btn-group.show .dropdown-toggle {
104
+ @include box-shadow($btn-active-box-shadow);
105
+
106
+ // Show no shadow for `.btn-link` since it has no other button styles.
107
+ &.btn-link {
108
+ @include box-shadow(none);
109
+ }
110
+ }
111
+
112
+
113
+ //
114
+ // Vertical button groups
115
+ //
116
+
117
+ .btn-group-vertical {
118
+ flex-direction: column;
119
+ align-items: flex-start;
120
+ justify-content: center;
121
+
122
+ > .btn,
123
+ > .btn-group {
124
+ width: 100%;
125
+ }
126
+
127
+ > .btn:not(:first-child),
128
+ > .btn-group:not(:first-child) {
129
+ margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
130
+ }
131
+
132
+ // Reset rounded corners
133
+ > .btn:not(:last-child):not(.dropdown-toggle),
134
+ > .btn-group:not(:last-child) > .btn {
135
+ @include border-bottom-radius(0);
136
+ }
137
+
138
+ > .btn ~ .btn,
139
+ > .btn-group:not(:first-child) > .btn {
140
+ @include border-top-radius(0);
141
+ }
142
+ }