accrete 0.0.121__py3-none-any.whl → 0.0.123__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 (201) hide show
  1. accrete/contrib/country/__init__.py +0 -0
  2. accrete/contrib/country/admin.py +11 -0
  3. accrete/contrib/country/apps.py +6 -0
  4. accrete/contrib/country/migrations/0001_initial.py +33 -0
  5. accrete/contrib/country/migrations/0002_auto_20250219_1759.py +286 -0
  6. accrete/contrib/country/migrations/__init__.py +0 -0
  7. accrete/contrib/country/models.py +42 -0
  8. accrete/contrib/ui/static/bulma/README.md +4 -4
  9. accrete/contrib/ui/static/bulma/bulma.scss +1 -1
  10. accrete/contrib/ui/static/bulma/css/bulma.css +57 -49
  11. accrete/contrib/ui/static/bulma/css/bulma.css.map +1 -1
  12. accrete/contrib/ui/static/bulma/css/bulma.min.css +2 -2
  13. accrete/contrib/ui/static/bulma/css/versions/bulma-no-dark-mode.css +25 -17
  14. accrete/contrib/ui/static/bulma/css/versions/bulma-no-dark-mode.css.map +1 -1
  15. accrete/contrib/ui/static/bulma/css/versions/bulma-no-dark-mode.min.css +2 -2
  16. accrete/contrib/ui/static/bulma/css/versions/bulma-no-helpers-prefixed.css +2813 -2
  17. accrete/contrib/ui/static/bulma/css/versions/bulma-no-helpers-prefixed.css.map +1 -1
  18. accrete/contrib/ui/static/bulma/css/versions/bulma-no-helpers-prefixed.min.css +2 -2
  19. accrete/contrib/ui/static/bulma/css/versions/bulma-no-helpers.css +2813 -2
  20. accrete/contrib/ui/static/bulma/css/versions/bulma-no-helpers.css.map +1 -1
  21. accrete/contrib/ui/static/bulma/css/versions/bulma-no-helpers.min.css +2 -2
  22. accrete/contrib/ui/static/bulma/{versions → css/versions}/bulma-prefixed.css +1974 -1966
  23. accrete/contrib/ui/static/bulma/css/versions/{bulma-prefixed.min.css.map → bulma-prefixed.css.map} +1 -1
  24. accrete/contrib/ui/static/bulma/css/versions/bulma-prefixed.min.css +2 -21550
  25. accrete/contrib/ui/static/bulma/package.json +6 -6
  26. accrete/contrib/ui/static/bulma/sass/elements/button.scss +6 -0
  27. accrete/contrib/ui/static/bulma/sass/elements/image.scss +4 -2
  28. accrete/contrib/ui/static/bulma/sass/elements/title.scss +4 -2
  29. accrete/contrib/ui/static/bulma/sass/form/input-textarea.scss +3 -1
  30. accrete/contrib/ui/static/bulma/sass/form/shared.scss +7 -5
  31. accrete/contrib/ui/static/bulma/sass/helpers/aspect-ratio.scss +5 -3
  32. accrete/contrib/ui/static/bulma/sass/helpers/border.scss +1 -1
  33. accrete/contrib/ui/static/bulma/sass/helpers/color.scss +40 -40
  34. accrete/contrib/ui/static/bulma/sass/helpers/flexbox.scss +7 -7
  35. accrete/contrib/ui/static/bulma/sass/helpers/float.scss +7 -7
  36. accrete/contrib/ui/static/bulma/sass/helpers/gap.scss +3 -3
  37. accrete/contrib/ui/static/bulma/sass/helpers/other.scss +4 -4
  38. accrete/contrib/ui/static/bulma/sass/helpers/overflow.scss +4 -4
  39. accrete/contrib/ui/static/bulma/sass/helpers/position.scss +4 -4
  40. accrete/contrib/ui/static/bulma/sass/helpers/spacing.scss +6 -6
  41. accrete/contrib/ui/static/bulma/sass/helpers/typography.scss +29 -27
  42. accrete/contrib/ui/static/bulma/sass/helpers/visibility.scss +61 -61
  43. accrete/contrib/ui/static/bulma/sass/layout/hero.scss +6 -3
  44. accrete/contrib/ui/static/bulma/sass/themes/dark.scss +2 -1
  45. accrete/contrib/ui/static/bulma/sass/themes/light.scss +6 -5
  46. accrete/contrib/ui/static/bulma/sass/utilities/css-variables.scss +98 -22
  47. accrete/contrib/ui/static/bulma/sass/utilities/functions.scss +100 -48
  48. accrete/contrib/ui/static/bulma/sass/utilities/mixins.scss +5 -3
  49. accrete/contrib/ui/static/bulma/versions/bulma-no-dark-mode.scss +1 -1
  50. accrete/contrib/ui/static/bulma/versions/bulma-no-helpers-prefixed.scss +2 -1
  51. accrete/contrib/ui/static/bulma/versions/bulma-no-helpers.scss +2 -1
  52. accrete/contrib/ui/static/bulma/versions/bulma-prefixed.scss +1 -1
  53. accrete/contrib/ui/static/css/.sass-cache/15adf1eed05371361b08787c918a7f18fc15be79/accrete.scssc +0 -0
  54. accrete/contrib/ui/static/css/accrete.css +23 -21561
  55. accrete/contrib/ui/static/css/accrete.css.map +7 -1
  56. accrete/contrib/ui/static/css/accrete.scss +284 -284
  57. accrete/contrib/ui/templates/ui/layout.html +2 -2
  58. accrete/contrib/user/forms.py +9 -1
  59. accrete/contrib/user/migrations/0002_user_theme.py +18 -0
  60. accrete/contrib/user/models.py +10 -0
  61. accrete/contrib/user/templates/user/user_form.html +9 -4
  62. accrete/contrib/user/views.py +7 -4
  63. accrete/fields.py +129 -0
  64. {accrete-0.0.121.dist-info → accrete-0.0.123.dist-info}/METADATA +1 -1
  65. {accrete-0.0.121.dist-info → accrete-0.0.123.dist-info}/RECORD +67 -191
  66. accrete/contrib/ui/static/bulma/bulma.css +0 -21551
  67. accrete/contrib/ui/static/bulma/bulma.css.map +0 -1
  68. accrete/contrib/ui/static/bulma/css/versions/bulma-prefixed.min.min.css +0 -3
  69. accrete/contrib/ui/static/bulma/sass/base/animations.css +0 -15
  70. accrete/contrib/ui/static/bulma/sass/base/animations.css.map +0 -1
  71. accrete/contrib/ui/static/bulma/sass/base/generic.css +0 -196
  72. accrete/contrib/ui/static/bulma/sass/base/generic.css.map +0 -1
  73. accrete/contrib/ui/static/bulma/sass/base/minireset.css +0 -82
  74. accrete/contrib/ui/static/bulma/sass/base/minireset.css.map +0 -1
  75. accrete/contrib/ui/static/bulma/sass/base/skeleton.css +0 -113
  76. accrete/contrib/ui/static/bulma/sass/base/skeleton.css.map +0 -1
  77. accrete/contrib/ui/static/bulma/sass/components/breadcrumb.css +0 -108
  78. accrete/contrib/ui/static/bulma/sass/components/breadcrumb.css.map +0 -1
  79. accrete/contrib/ui/static/bulma/sass/components/card.css +0 -130
  80. accrete/contrib/ui/static/bulma/sass/components/card.css.map +0 -1
  81. accrete/contrib/ui/static/bulma/sass/components/dropdown.css +0 -119
  82. accrete/contrib/ui/static/bulma/sass/components/dropdown.css.map +0 -1
  83. accrete/contrib/ui/static/bulma/sass/components/menu.css +0 -119
  84. accrete/contrib/ui/static/bulma/sass/components/menu.css.map +0 -1
  85. accrete/contrib/ui/static/bulma/sass/components/message.css +0 -191
  86. accrete/contrib/ui/static/bulma/sass/components/message.css.map +0 -1
  87. accrete/contrib/ui/static/bulma/sass/components/modal.css +0 -194
  88. accrete/contrib/ui/static/bulma/sass/components/modal.css.map +0 -1
  89. accrete/contrib/ui/static/bulma/sass/components/navbar.css +0 -768
  90. accrete/contrib/ui/static/bulma/sass/components/navbar.css.map +0 -1
  91. accrete/contrib/ui/static/bulma/sass/components/pagination.css +0 -302
  92. accrete/contrib/ui/static/bulma/sass/components/pagination.css.map +0 -1
  93. accrete/contrib/ui/static/bulma/sass/components/panel.css +0 -224
  94. accrete/contrib/ui/static/bulma/sass/components/panel.css.map +0 -1
  95. accrete/contrib/ui/static/bulma/sass/components/tabs.css +0 -192
  96. accrete/contrib/ui/static/bulma/sass/components/tabs.css.map +0 -1
  97. accrete/contrib/ui/static/bulma/sass/elements/block.css +0 -17
  98. accrete/contrib/ui/static/bulma/sass/elements/block.css.map +0 -1
  99. accrete/contrib/ui/static/bulma/sass/elements/box.css +0 -43
  100. accrete/contrib/ui/static/bulma/sass/elements/box.css.map +0 -1
  101. accrete/contrib/ui/static/bulma/sass/elements/button.css +0 -685
  102. accrete/contrib/ui/static/bulma/sass/elements/button.css.map +0 -1
  103. accrete/contrib/ui/static/bulma/sass/elements/content.css +0 -208
  104. accrete/contrib/ui/static/bulma/sass/elements/content.css.map +0 -1
  105. accrete/contrib/ui/static/bulma/sass/elements/delete.css +0 -60
  106. accrete/contrib/ui/static/bulma/sass/elements/delete.css.map +0 -1
  107. accrete/contrib/ui/static/bulma/sass/elements/icon.css +0 -51
  108. accrete/contrib/ui/static/bulma/sass/elements/icon.css.map +0 -1
  109. accrete/contrib/ui/static/bulma/sass/elements/image.css +0 -253
  110. accrete/contrib/ui/static/bulma/sass/elements/image.css.map +0 -1
  111. accrete/contrib/ui/static/bulma/sass/elements/loader.css +0 -14
  112. accrete/contrib/ui/static/bulma/sass/elements/loader.css.map +0 -1
  113. accrete/contrib/ui/static/bulma/sass/elements/notification.css +0 -213
  114. accrete/contrib/ui/static/bulma/sass/elements/notification.css.map +0 -1
  115. accrete/contrib/ui/static/bulma/sass/elements/progress.css +0 -119
  116. accrete/contrib/ui/static/bulma/sass/elements/progress.css.map +0 -1
  117. accrete/contrib/ui/static/bulma/sass/elements/table.css +0 -294
  118. accrete/contrib/ui/static/bulma/sass/elements/table.css.map +0 -1
  119. accrete/contrib/ui/static/bulma/sass/elements/tag.css +0 -252
  120. accrete/contrib/ui/static/bulma/sass/elements/tag.css.map +0 -1
  121. accrete/contrib/ui/static/bulma/sass/elements/title.css +0 -131
  122. accrete/contrib/ui/static/bulma/sass/elements/title.css.map +0 -1
  123. accrete/contrib/ui/static/bulma/sass/form/checkbox-radio.css +0 -72
  124. accrete/contrib/ui/static/bulma/sass/form/checkbox-radio.css.map +0 -1
  125. accrete/contrib/ui/static/bulma/sass/form/file.css +0 -374
  126. accrete/contrib/ui/static/bulma/sass/form/file.css.map +0 -1
  127. accrete/contrib/ui/static/bulma/sass/form/input-textarea.css +0 -284
  128. accrete/contrib/ui/static/bulma/sass/form/input-textarea.css.map +0 -1
  129. accrete/contrib/ui/static/bulma/sass/form/select.css +0 -347
  130. accrete/contrib/ui/static/bulma/sass/form/select.css.map +0 -1
  131. accrete/contrib/ui/static/bulma/sass/form/shared.css +0 -48
  132. accrete/contrib/ui/static/bulma/sass/form/shared.css.map +0 -1
  133. accrete/contrib/ui/static/bulma/sass/form/tools.css +0 -356
  134. accrete/contrib/ui/static/bulma/sass/form/tools.css.map +0 -1
  135. accrete/contrib/ui/static/bulma/sass/grid/columns-v2.css +0 -1635
  136. accrete/contrib/ui/static/bulma/sass/grid/columns-v2.css.map +0 -1
  137. accrete/contrib/ui/static/bulma/sass/grid/columns.css +0 -1652
  138. accrete/contrib/ui/static/bulma/sass/grid/columns.css.map +0 -1
  139. accrete/contrib/ui/static/bulma/sass/grid/grid.css +0 -3011
  140. accrete/contrib/ui/static/bulma/sass/grid/grid.css.map +0 -1
  141. accrete/contrib/ui/static/bulma/sass/helpers/aspect-ratio.css +0 -61
  142. accrete/contrib/ui/static/bulma/sass/helpers/aspect-ratio.css.map +0 -1
  143. accrete/contrib/ui/static/bulma/sass/helpers/border.css +0 -17
  144. accrete/contrib/ui/static/bulma/sass/helpers/border.css.map +0 -1
  145. accrete/contrib/ui/static/bulma/sass/helpers/color.css +0 -5582
  146. accrete/contrib/ui/static/bulma/sass/helpers/color.css.map +0 -1
  147. accrete/contrib/ui/static/bulma/sass/helpers/flexbox.css +0 -217
  148. accrete/contrib/ui/static/bulma/sass/helpers/flexbox.css.map +0 -1
  149. accrete/contrib/ui/static/bulma/sass/helpers/float.css +0 -37
  150. accrete/contrib/ui/static/bulma/sass/helpers/float.css.map +0 -1
  151. accrete/contrib/ui/static/bulma/sass/helpers/gap.css +0 -209
  152. accrete/contrib/ui/static/bulma/sass/helpers/gap.css.map +0 -1
  153. accrete/contrib/ui/static/bulma/sass/helpers/other.css +0 -34
  154. accrete/contrib/ui/static/bulma/sass/helpers/other.css.map +0 -1
  155. accrete/contrib/ui/static/bulma/sass/helpers/overflow.css +0 -65
  156. accrete/contrib/ui/static/bulma/sass/helpers/overflow.css.map +0 -1
  157. accrete/contrib/ui/static/bulma/sass/helpers/position.css +0 -45
  158. accrete/contrib/ui/static/bulma/sass/helpers/position.css.map +0 -1
  159. accrete/contrib/ui/static/bulma/sass/helpers/spacing.css +0 -489
  160. accrete/contrib/ui/static/bulma/sass/helpers/spacing.css.map +0 -1
  161. accrete/contrib/ui/static/bulma/sass/helpers/typography.css +0 -423
  162. accrete/contrib/ui/static/bulma/sass/helpers/typography.css.map +0 -1
  163. accrete/contrib/ui/static/bulma/sass/helpers/visibility.css +0 -485
  164. accrete/contrib/ui/static/bulma/sass/helpers/visibility.css.map +0 -1
  165. accrete/contrib/ui/static/bulma/sass/layout/footer.css +0 -9
  166. accrete/contrib/ui/static/bulma/sass/layout/footer.css.map +0 -1
  167. accrete/contrib/ui/static/bulma/sass/layout/hero.css +0 -534
  168. accrete/contrib/ui/static/bulma/sass/layout/hero.css.map +0 -1
  169. accrete/contrib/ui/static/bulma/sass/layout/level.css +0 -102
  170. accrete/contrib/ui/static/bulma/sass/layout/level.css.map +0 -1
  171. accrete/contrib/ui/static/bulma/sass/layout/media.css +0 -90
  172. accrete/contrib/ui/static/bulma/sass/layout/media.css.map +0 -1
  173. accrete/contrib/ui/static/bulma/sass/layout/section.css +0 -23
  174. accrete/contrib/ui/static/bulma/sass/layout/section.css.map +0 -1
  175. accrete/contrib/ui/static/bulma/sass/themes/dark.css +0 -3
  176. accrete/contrib/ui/static/bulma/sass/themes/dark.css.map +0 -1
  177. accrete/contrib/ui/static/bulma/sass/themes/light.css +0 -3
  178. accrete/contrib/ui/static/bulma/sass/themes/light.css.map +0 -1
  179. accrete/contrib/ui/static/bulma/sass/themes/setup.css +0 -3
  180. accrete/contrib/ui/static/bulma/sass/themes/setup.css.map +0 -1
  181. accrete/contrib/ui/static/bulma/sass/utilities/controls.css +0 -13
  182. accrete/contrib/ui/static/bulma/sass/utilities/controls.css.map +0 -1
  183. accrete/contrib/ui/static/bulma/sass/utilities/css-variables.css +0 -3
  184. accrete/contrib/ui/static/bulma/sass/utilities/css-variables.css.map +0 -1
  185. accrete/contrib/ui/static/bulma/sass/utilities/derived-variables.css +0 -3
  186. accrete/contrib/ui/static/bulma/sass/utilities/derived-variables.css.map +0 -1
  187. accrete/contrib/ui/static/bulma/sass/utilities/extends.css +0 -13
  188. accrete/contrib/ui/static/bulma/sass/utilities/extends.css.map +0 -1
  189. accrete/contrib/ui/static/bulma/sass/utilities/initial-variables.css +0 -3
  190. accrete/contrib/ui/static/bulma/sass/utilities/initial-variables.css.map +0 -1
  191. accrete/contrib/ui/static/bulma/sass/utilities/mixins.css +0 -3
  192. accrete/contrib/ui/static/bulma/sass/utilities/mixins.css.map +0 -1
  193. accrete/contrib/ui/static/bulma/versions/bulma-no-dark-mode.css +0 -19648
  194. accrete/contrib/ui/static/bulma/versions/bulma-no-dark-mode.css.map +0 -1
  195. accrete/contrib/ui/static/bulma/versions/bulma-no-helpers-prefixed.css +0 -11136
  196. accrete/contrib/ui/static/bulma/versions/bulma-no-helpers-prefixed.css.map +0 -1
  197. accrete/contrib/ui/static/bulma/versions/bulma-no-helpers.css +0 -11136
  198. accrete/contrib/ui/static/bulma/versions/bulma-no-helpers.css.map +0 -1
  199. accrete/contrib/ui/static/bulma/versions/bulma-prefixed.css.map +0 -1
  200. {accrete-0.0.121.dist-info → accrete-0.0.123.dist-info}/WHEEL +0 -0
  201. {accrete-0.0.121.dist-info → accrete-0.0.123.dist-info}/licenses/LICENSE +0 -0
@@ -48,16 +48,35 @@
48
48
  @mixin register-rgb($name, $value) {
49
49
  @include register-var(
50
50
  $name,
51
- (red($value), green($value), blue($value)),
51
+ (
52
+ color.channel($value, "red", $space: rgb),
53
+ color.channel($value, "green", $space: rgb),
54
+ color.channel($value, "blue", $space: rgb)
55
+ ),
52
56
  "",
53
57
  "-rgb"
54
58
  );
55
59
  }
56
60
 
57
61
  @mixin register-hsl($name, $value) {
58
- @include register-var($name, round(hue($value)), "", "-h");
59
- @include register-var($name, round(saturation($value)), "", "-s");
60
- @include register-var($name, round(lightness($value)), "", "-l");
62
+ @include register-var(
63
+ $name,
64
+ math.round(color.channel($value, "hue", $space: hsl)),
65
+ "",
66
+ "-h"
67
+ );
68
+ @include register-var(
69
+ $name,
70
+ math.round(color.channel($value, "saturation", $space: hsl)),
71
+ "",
72
+ "-s"
73
+ );
74
+ @include register-var(
75
+ $name,
76
+ math.round(color.channel($value, "lightness", $space: hsl)),
77
+ "",
78
+ "-l"
79
+ );
61
80
  }
62
81
 
63
82
  @mixin generate-on-scheme-colors($name, $base, $scheme-main) {
@@ -76,7 +95,11 @@
76
95
  @if $ratio > 5 {
77
96
  $found-decent-color: true;
78
97
  } @else {
79
- $on-scheme-color: lighten($on-scheme-color, 5%);
98
+ $on-scheme-color: color.adjust(
99
+ $on-scheme-color,
100
+ $lightness: 5%,
101
+ $space: hsl
102
+ );
80
103
  $fg-lum: fn.bulmaColorLuminance($on-scheme-color);
81
104
  }
82
105
  }
@@ -87,13 +110,21 @@
87
110
  @if $ratio > 5 {
88
111
  $found-decent-color: true;
89
112
  } @else {
90
- $on-scheme-color: darken($on-scheme-color, 5%);
113
+ $on-scheme-color: color.adjust(
114
+ $on-scheme-color,
115
+ $lightness: -5%,
116
+ $space: hsl
117
+ );
91
118
  $fg-lum: fn.bulmaColorLuminance($on-scheme-color);
92
119
  }
93
120
  }
94
121
  }
95
122
 
96
- $on-scheme-lightness: lightness($on-scheme-color);
123
+ $on-scheme-lightness: color.channel(
124
+ $on-scheme-color,
125
+ "lightness",
126
+ $space: hsl
127
+ );
97
128
  @include register-var($name, $on-scheme-lightness, "", "-on-scheme-l");
98
129
  $on-scheme-l: getVar($name, "", "-on-scheme-l");
99
130
  @include register-var(
@@ -110,16 +141,28 @@
110
141
  @if ($scheme-main-brightness == "bright") {
111
142
  @while (fn.bulmaEnoughContrast($on-scheme-color, #fff) == false) {
112
143
  // We're on a light background, so we'll darken the test color step by step.
113
- $on-scheme-color: darken($on-scheme-color, 5%);
144
+ $on-scheme-color: color.adjust(
145
+ $on-scheme-color,
146
+ $lightness: -5%,
147
+ $space: hsl
148
+ );
114
149
  }
115
150
  } @else {
116
151
  @while (fn.bulmaEnoughContrast($on-scheme-color, #000) == false) {
117
152
  // We're on a dark background, so we'll lighten the test color step by step.
118
- $on-scheme-color: lighten($on-scheme-color, 5%);
153
+ $on-scheme-color: color.adjust(
154
+ $on-scheme-color,
155
+ $lightness: 5%,
156
+ $space: hsl
157
+ );
119
158
  }
120
159
  }
121
160
 
122
- $on-scheme-lightness: lightness($on-scheme-color);
161
+ $on-scheme-lightness: color.channel(
162
+ $on-scheme-color,
163
+ "lightness",
164
+ $space: hsl
165
+ );
123
166
  @include register-var($name, $on-scheme-lightness, "", "-on-scheme-l");
124
167
  }
125
168
 
@@ -135,7 +178,12 @@
135
178
  @include register-base-color($name, $base);
136
179
 
137
180
  @if $invert {
138
- @include register-var($name, lightness($invert), "", "-invert-l");
181
+ @include register-var(
182
+ $name,
183
+ color.channel($invert, "lightness", $space: hsl),
184
+ "",
185
+ "-invert-l"
186
+ );
139
187
  @include register-var("#{$name}-invert", $invert);
140
188
  }
141
189
  }
@@ -148,11 +196,11 @@
148
196
  $light: null,
149
197
  $dark: null
150
198
  ) {
151
- $h: round(hue($base)); // Hue
152
- $s: round(saturation($base)); // Saturation
153
- $l: round(lightness($base)); // Lightness
199
+ $h:math.round(color.channel($base, "hue", $space: hsl)); // Hue
200
+ $s:math.round(color.channel($base, "saturation", $space: hsl)); // Saturation
201
+ $l:math.round(color.channel($base, "lightness", $space: hsl)); // Lightness
154
202
  $base-lum: fn.bulmaColorLuminance($base);
155
- $l-base: round($l % 10); // Get lightness second digit: 53% -> 3%
203
+ $l-base: math.round($l % 10); // Get lightness second digit: 53% -> 3%
156
204
  $l-0: 0%; // 5% or less
157
205
  $l-5: 5%; // More than 5%
158
206
  $a: 1; // Alpha
@@ -160,7 +208,7 @@
160
208
 
161
209
  // Calculate digits like "40" for the scheme-main
162
210
  $scheme-l-0: 0%;
163
- $scheme-l-base: round($scheme-main-l % 10);
211
+ $scheme-l-base: math.round($scheme-main-l % 10);
164
212
  $closest-5: math.round(math.div($scheme-main-l, 5)) * 5;
165
213
  $pct-to-int: math.div($closest-5, 100%) * 100;
166
214
  $scheme-main-digits: #{$pct-to-int};
@@ -254,7 +302,10 @@
254
302
  // Source: https://www.w3.org/TR/WCAG20-TECHS/G17.html
255
303
  $fg-lum: fn.bulmaColorLuminance($foreground);
256
304
 
257
- @if (lightness($foreground) > lightness($background)) {
305
+ @if (
306
+ color.channel($foreground, "lightness", $space: hsl) >
307
+ color.channel($background, "lightness", $space: hsl)
308
+ ) {
258
309
  $is-light-fg: true;
259
310
  $ratio: math.div(($fg-lum + 0.05), ($bg-lum + 0.05));
260
311
  } @else {
@@ -323,7 +374,12 @@
323
374
 
324
375
  // If an invert color is provided by the user
325
376
  @if $invert {
326
- @include register-var($name, lightness($invert), "", "-invert-l");
377
+ @include register-var(
378
+ $name,
379
+ color.channel($invert, "lightness", $space: hsl),
380
+ "",
381
+ "-invert-l"
382
+ );
327
383
  @include register-var("#{$name}-invert", $invert);
328
384
  } @else {
329
385
  $base-invert-l-digits: map.get($combos, $base-digits);
@@ -343,13 +399,33 @@
343
399
 
344
400
  // Good color on light background (90% lightness)
345
401
  @if $light and $dark {
346
- @include register-var($name, lightness($light), "", "-light-l");
347
- @include register-var($name, lightness($light), "", "-dark-invert-l");
402
+ @include register-var(
403
+ $name,
404
+ color.channel($light, "lightness", $space: hsl),
405
+ "",
406
+ "-light-l"
407
+ );
408
+ @include register-var(
409
+ $name,
410
+ color.channel($light, "lightness", $space: hsl),
411
+ "",
412
+ "-dark-invert-l"
413
+ );
348
414
  @include register-var("#{$name}-light", $light);
349
415
  @include register-var("#{$name}-dark-invert", $light);
350
416
 
351
- @include register-var($name, lightness($dark), "", "-dark-l");
352
- @include register-var($name, lightness($dark), "", "-light-invert-l");
417
+ @include register-var(
418
+ $name,
419
+ color.channel($dark, "lightness", $space: hsl),
420
+ "",
421
+ "-dark-l"
422
+ );
423
+ @include register-var(
424
+ $name,
425
+ color.channel($dark, "lightness", $space: hsl),
426
+ "",
427
+ "-light-invert-l"
428
+ );
353
429
  @include register-var("#{$name}-dark", $dark);
354
430
  @include register-var("#{$name}-light-invert", $dark);
355
431
  } @else {
@@ -1,20 +1,29 @@
1
+ @use "sass:color";
1
2
  @use "sass:list";
3
+ @use "sass:map";
2
4
  @use "sass:math";
5
+ @use "sass:meta";
6
+ @use "sass:string";
3
7
 
4
8
  @function mergeColorMaps($bulma-colors, $custom-colors) {
5
9
  // We return at least Bulma's hard-coded colors
6
10
  $merged-colors: $bulma-colors;
7
11
 
8
12
  // We want a map as input
9
- @if type-of($custom-colors) == "map" {
13
+ @if meta.type-of($custom-colors) == "map" {
10
14
  @each $name, $components in $custom-colors {
11
15
  // The color name should be a string
12
16
  // and the components either a single color
13
17
  // or a colors list with at least one element
14
- @if type-of($name) ==
18
+ @if meta.type-of($name) ==
15
19
  "string" and
16
- (type-of($components) == "list" or type-of($components) == "color") and
17
- length($components) >=
20
+ (
21
+ meta.type-of($components) ==
22
+ "list" or
23
+ meta.type-of($components) ==
24
+ "color"
25
+ ) and
26
+ list.length($components) >=
18
27
  1
19
28
  {
20
29
  $color-base: null;
@@ -25,22 +34,22 @@
25
34
 
26
35
  // The param can either be a single color
27
36
  // or a list of 2 colors
28
- @if type-of($components) == "color" {
37
+ @if meta.type-of($components) == "color" {
29
38
  $color-base: $components;
30
39
  $color-invert: bulmaFindColorInvert($color-base);
31
40
  $color-light: bulmaFindLightColor($color-base);
32
41
  $color-dark: bulmaFindDarkColor($color-base);
33
- } @else if type-of($components) == "list" {
42
+ } @else if meta.type-of($components) == "list" {
34
43
  $color-base: list.nth($components, 1);
35
44
 
36
45
  // If Invert, Light and Dark are provided
37
- @if length($components) > 3 {
46
+ @if list.length($components) > 3 {
38
47
  $color-invert: list.nth($components, 2);
39
48
  $color-light: list.nth($components, 3);
40
49
  $color-dark: list.nth($components, 4);
41
50
 
42
51
  // If only Invert and Light are provided
43
- } @else if length($components) > 2 {
52
+ } @else if list.length($components) > 2 {
44
53
  $color-invert: list.nth($components, 2);
45
54
  $color-light: list.nth($components, 3);
46
55
  $color-dark: bulmaFindDarkColor($color-base);
@@ -56,11 +65,11 @@
56
65
  $value: $color-base, $color-invert, $color-light, $color-dark;
57
66
 
58
67
  // We only want to merge the map if the color base is an actual color
59
- @if type-of($color-base) == "color" {
68
+ @if meta.type-of($color-base) == "color" {
60
69
  // We merge this colors elements as map with Bulma's colors map
61
70
  // (we can override them this way, no multiple definition for the same name)
62
71
  // $merged-colors: map_merge($merged-colors, ($name: ($color-base, $color-invert, $color-light, $color-dark)))
63
- $merged-colors: map_merge(
72
+ $merged-colors: map.merge(
64
73
  $merged-colors,
65
74
  (
66
75
  $name: $value,
@@ -91,14 +100,14 @@
91
100
  }
92
101
 
93
102
  @function bulmaColorLuminance($color) {
94
- @if type-of($color) != "color" {
103
+ @if meta.type-of($color) != "color" {
95
104
  @return 0.55;
96
105
  }
97
106
 
98
107
  $color-rgb: (
99
- "red": red($color),
100
- "green": green($color),
101
- "blue": blue($color),
108
+ "red": color.channel($color, "red", $space: rgb),
109
+ "green": color.channel($color, "green", $space: rgb),
110
+ "blue": color.channel($color, "blue", $space: rgb),
102
111
  );
103
112
 
104
113
  @each $name, $value in $color-rgb {
@@ -112,7 +121,7 @@
112
121
  $value: powerNumber($value, 2);
113
122
  }
114
123
 
115
- $color-rgb: map-merge(
124
+ $color-rgb: map.merge(
116
125
  $color-rgb,
117
126
  (
118
127
  $name: $value,
@@ -120,8 +129,8 @@
120
129
  );
121
130
  }
122
131
 
123
- @return map-get($color-rgb, "red") * 0.2126 + map-get($color-rgb, "green") *
124
- 0.7152 + map-get($color-rgb, "blue") * 0.0722;
132
+ @return map.get($color-rgb, "red") * 0.2126 + map.get($color-rgb, "green") *
133
+ 0.7152 + map.get($color-rgb, "blue") * 0.0722;
125
134
  }
126
135
 
127
136
  @function bulmaFindColorInvert($color) {
@@ -133,33 +142,33 @@
133
142
  }
134
143
 
135
144
  @function bulmaFindLightColor($color, $l: 96%) {
136
- @if type-of($color) == "color" {
145
+ @if meta.type-of($color) == "color" {
137
146
  $l: 96%;
138
147
 
139
- @if lightness($color) > 96% {
140
- $l: lightness($color);
148
+ @if color.channel($color, "lightness", $space: hsl) > 96% {
149
+ $l: color.channel($color, "lightness", $space: hsl);
141
150
  }
142
151
 
143
- @return change-color($color, $lightness: $l);
152
+ @return color.change($color, $lightness: $l);
144
153
  }
145
154
 
146
155
  @return $background;
147
156
  }
148
157
 
149
158
  @function bulmaFindDarkColor($color, $base-l: 29%) {
150
- @if type-of($color) == "color" {
159
+ @if meta.type-of($color) == "color" {
151
160
  $luminance: bulmaColorLuminance($color);
152
161
  $luminance-delta: 0.53 - $luminance;
153
- $target-l: round($base-l + $luminance-delta * 53);
162
+ $target-l: math.round($base-l + $luminance-delta * 53);
154
163
 
155
- @return change-color($color, $lightness: max($base-l, $target-l));
164
+ @return color.change($color, $lightness: max($base-l, $target-l));
156
165
  }
157
166
 
158
167
  @return $text-strong;
159
168
  }
160
169
 
161
170
  @function bulmaRgba($color, $alpha) {
162
- @if type-of($color) != "color" {
171
+ @if meta.type-of($color) != "color" {
163
172
  @return $color;
164
173
  }
165
174
 
@@ -167,27 +176,37 @@
167
176
  }
168
177
 
169
178
  @function bulmaDarken($color, $amount) {
170
- @if type-of($color) != "color" {
179
+ @if meta.type-of($color) != "color" {
171
180
  @return $color;
172
181
  }
173
182
 
174
- @return darken($color, $amount);
183
+ @return color.adjust($color, $lightness: -$amount, $space: hsl);
175
184
  }
176
185
 
177
186
  @function bulmaLighten($color, $amount) {
178
- @if type-of($color) != "color" {
187
+ @if meta.type-of($color) != "color" {
179
188
  @return $color;
180
189
  }
181
190
 
182
- @return lighten($color, $amount);
191
+ @return color.adjust($color, $lightness: $amount, $space: hsl);
183
192
  }
184
193
 
185
194
  @function bulmaColorBrightness($n) {
186
- $color-brightness: round(
187
- math.div((red($n) * 299) + (green($n) * 587) + (blue($n) * 114), 1000)
195
+ $color-brightness: math.round(
196
+ math.div(
197
+ (color.channel($n, "red", $space: rgb) * 299) +
198
+ (color.channel($n, "green", $space: rgb) * 587) +
199
+ (color.channel($n, "blue", $space: rgb) * 114),
200
+ 1000
201
+ )
188
202
  );
189
- $light-color: round(
190
- math.div((red(#ffffff) * 299) + (green(#ffffff) * 587) + (blue(#ffffff) * 114), 1000)
203
+ $light-color: math.round(
204
+ math.div(
205
+ (color.channel(#ffffff, "red", $space: rgb) * 299) +
206
+ (color.channel(#ffffff, "green", $space: rgb) * 587) +
207
+ (color.channel(#ffffff, "blue", $space: rgb) * 114),
208
+ 1000
209
+ )
191
210
  );
192
211
 
193
212
  @if abs($color-brightness) < math.div($light-color, 2) {
@@ -198,12 +217,42 @@
198
217
  }
199
218
 
200
219
  @function bulmaEnoughContrast($foreground, $background) {
201
- $r: (max(red($foreground), red($background))) -
202
- (min(red($foreground), red($background)));
203
- $g: (max(green($foreground), green($background))) -
204
- (min(green($foreground), green($background)));
205
- $b: (max(blue($foreground), blue($background))) -
206
- (min(blue($foreground), blue($background)));
220
+ $r: (
221
+ max(
222
+ color.channel($foreground, "red", $space: rgb),
223
+ color.channel($background, "red", $space: rgb)
224
+ )
225
+ ) -
226
+ (
227
+ min(
228
+ color.channel($foreground, "red", $space: rgb),
229
+ color.channel($background, "red", $space: rgb)
230
+ )
231
+ );
232
+ $g: (
233
+ max(
234
+ color.channel($foreground, "green", $space: rgb),
235
+ color.channel($background, "green", $space: rgb)
236
+ )
237
+ ) -
238
+ (
239
+ min(
240
+ color.channel($foreground, "green", $space: rgb),
241
+ color.channel($background, "green", $space: rgb)
242
+ )
243
+ );
244
+ $b: (
245
+ max(
246
+ color.channel($foreground, "blue", $space: rgb),
247
+ color.channel($background, "blue", $space: rgb)
248
+ )
249
+ ) -
250
+ (
251
+ min(
252
+ color.channel($foreground, "blue", $space: rgb),
253
+ color.channel($background, "blue", $space: rgb)
254
+ )
255
+ );
207
256
  $sum-rgb: $r + $g + $b;
208
257
 
209
258
  @if $sum-rgb < 500 {
@@ -215,15 +264,15 @@
215
264
 
216
265
  // By Cory Simmons https://corysimmons.com/
217
266
  @function bulmaStringToNumber($value) {
218
- @if type-of($value) == "number" {
267
+ @if meta.type-of($value) == "number" {
219
268
  @return $value;
220
- } @else if type-of($value) != "string" {
269
+ } @else if meta.type-of($value) != "string" {
221
270
  $_: log("Value for `to-number` should be a number or a string.");
222
271
  }
223
272
 
224
273
  $result: 0;
225
274
  $digits: 0;
226
- $minus: str-slice($value, 1, 1) == "-";
275
+ $minus: string.slice($value, 1, 1) == "-";
227
276
  $numbers: (
228
277
  "0": 0,
229
278
  "1": 1,
@@ -237,20 +286,23 @@
237
286
  "9": 9,
238
287
  );
239
288
 
240
- @for $i from if($minus, 2, 1) through str-length($value) {
241
- $character: str-slice($value, $i, $i);
289
+ @for $i from if($minus, 2, 1) through string.length($value) {
290
+ $character: string.slice($value, $i, $i);
242
291
 
243
- @if not(index(map-keys($numbers), $character) or $character == ".") {
244
- @return to-length(if($minus, -$result, $result), str-slice($value, $i));
292
+ @if not(list.index(map.keys($numbers), $character) or $character == ".") {
293
+ @return to-length(
294
+ if($minus, -$result, $result),
295
+ string.slice($value, $i)
296
+ );
245
297
  }
246
298
 
247
299
  @if $character == "." {
248
300
  $digits: 1;
249
301
  } @else if $digits == 0 {
250
- $result: $result * 10 + map-get($numbers, $character);
302
+ $result: $result * 10 + map.get($numbers, $character);
251
303
  } @else {
252
304
  $digits: $digits * 10;
253
- $result: $result + map-get($numbers, $character) / $digits;
305
+ $result: $result + map.get($numbers, $character) / $digits;
254
306
  }
255
307
  }
256
308
 
@@ -1,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  @use "initial-variables" as iv;
2
4
  @use "css-variables" as cv;
3
5
 
@@ -360,11 +362,11 @@
360
362
  }
361
363
 
362
364
  @mixin breakpoint($name) {
363
- $breakpoint: map-get(iv.$breakpoints, $name);
365
+ $breakpoint: map.get(iv.$breakpoints, $name);
364
366
 
365
367
  @if $breakpoint {
366
- $from: map-get($breakpoint, "from");
367
- $until: map-get($breakpoint, "until");
368
+ $from: map.get($breakpoint, "from");
369
+ $until: map.get($breakpoint, "until");
368
370
 
369
371
  @if $from and $until {
370
372
  @include between($from, $until) {
@@ -1,6 +1,6 @@
1
1
  @charset "utf-8";
2
2
 
3
- /*! bulma.io v1.0.2 | MIT License | github.com/jgthms/bulma */
3
+ /*! bulma.io v1.0.3 | MIT License | github.com/jgthms/bulma */
4
4
  @forward "../sass/utilities";
5
5
  @forward "../sass/base";
6
6
  @forward "../sass/elements";
@@ -1,9 +1,10 @@
1
1
  @charset "utf-8";
2
2
 
3
- /*! bulma.io v1.0.2 | MIT License | github.com/jgthms/bulma */
3
+ /*! bulma.io v1.0.3 | MIT License | github.com/jgthms/bulma */
4
4
  @use "../sass/utilities" with (
5
5
  $class-prefix: "bulma-"
6
6
  );
7
+ @forward "../sass/themes";
7
8
  @forward "../sass/base";
8
9
  @forward "../sass/elements";
9
10
  @forward "../sass/form";
@@ -1,7 +1,8 @@
1
1
  @charset "utf-8";
2
2
 
3
- /*! bulma.io v1.0.2 | MIT License | github.com/jgthms/bulma */
3
+ /*! bulma.io v1.0.3 | MIT License | github.com/jgthms/bulma */
4
4
  @forward "../sass/utilities";
5
+ @forward "../sass/themes";
5
6
  @forward "../sass/base";
6
7
  @forward "../sass/elements";
7
8
  @forward "../sass/form";
@@ -1,6 +1,6 @@
1
1
  @charset "utf-8";
2
2
 
3
- /*! bulma.io v1.0.2 | MIT License | github.com/jgthms/bulma */
3
+ /*! bulma.io v1.0.3 | MIT License | github.com/jgthms/bulma */
4
4
  @use "../sass" with (
5
5
  $class-prefix: "bulma-"
6
6
  );