@ulu/frontend 0.1.0-beta.66 → 0.1.0-beta.68

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 (164) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.dev.md +3 -3
  3. package/README.md +14 -4
  4. package/dist/ulu-frontend.min.css +1 -1
  5. package/docs-dev/changelog/index.html +66 -0
  6. package/docs-dev/demos/accordion/index.html +30 -0
  7. package/docs-dev/demos/badge/index.html +5265 -0
  8. package/docs-dev/demos/breakpoints-manager/index.html +30 -0
  9. package/docs-dev/demos/button/index.html +30 -0
  10. package/docs-dev/demos/button-verbose/index.html +30 -0
  11. package/docs-dev/demos/callout/index.html +30 -0
  12. package/docs-dev/demos/captioned-figure/index.html +30 -0
  13. package/docs-dev/demos/card/index.html +46 -16
  14. package/docs-dev/demos/card-grid/index.html +30 -0
  15. package/docs-dev/demos/counter-list/index.html +46 -0
  16. package/docs-dev/demos/css-icons/index.html +30 -0
  17. package/docs-dev/demos/data-grid/index.html +30 -0
  18. package/docs-dev/demos/data-table/index.html +130 -100
  19. package/docs-dev/demos/details-group/index.html +30 -0
  20. package/docs-dev/demos/file-save/index.html +30 -0
  21. package/docs-dev/demos/flipcard/index.html +30 -0
  22. package/docs-dev/demos/form-theme/index.html +30 -0
  23. package/docs-dev/demos/index.html +30 -0
  24. package/docs-dev/demos/list-inline/index.html +30 -0
  25. package/docs-dev/demos/list-lines/index.html +30 -0
  26. package/docs-dev/demos/menu-stack/index.html +30 -0
  27. package/docs-dev/demos/modals/index.html +30 -0
  28. package/docs-dev/demos/nav-strip/index.html +30 -0
  29. package/docs-dev/demos/overlay-section/index.html +30 -0
  30. package/docs-dev/demos/popovers/index.html +30 -0
  31. package/docs-dev/demos/print/index.html +30 -0
  32. package/docs-dev/demos/pull-quote/index.html +30 -0
  33. package/docs-dev/demos/rule/index.html +30 -0
  34. package/docs-dev/demos/scrollpoints/index.html +30 -0
  35. package/docs-dev/demos/spoke-spinner/index.html +30 -0
  36. package/docs-dev/demos/sticky-list/index.html +30 -0
  37. package/docs-dev/demos/tabs/index.html +30 -0
  38. package/docs-dev/demos/tag/index.html +30 -0
  39. package/docs-dev/demos/theme-toggle/index.html +30 -0
  40. package/docs-dev/demos/tiles/index.html +30 -0
  41. package/docs-dev/demos/tooltip/index.html +30 -0
  42. package/docs-dev/guide/building-stylesheet/index.html +30 -0
  43. package/docs-dev/guide/developing-ulu-scss-module/index.html +30 -0
  44. package/docs-dev/guide/index.html +30 -0
  45. package/docs-dev/index.html +30 -0
  46. package/docs-dev/javascript/events/index.html +30 -0
  47. package/docs-dev/javascript/index.html +30 -0
  48. package/docs-dev/javascript/settings/index.html +30 -0
  49. package/docs-dev/javascript/ui-breakpoints/index.html +30 -0
  50. package/docs-dev/javascript/ui-collapsible/index.html +30 -0
  51. package/docs-dev/javascript/ui-details-group/index.html +30 -0
  52. package/docs-dev/javascript/ui-dialog/index.html +30 -0
  53. package/docs-dev/javascript/ui-flipcard/index.html +30 -0
  54. package/docs-dev/javascript/ui-grid/index.html +30 -0
  55. package/docs-dev/javascript/ui-modal-builder/index.html +30 -0
  56. package/docs-dev/javascript/ui-overflow-scroller/index.html +30 -0
  57. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +30 -0
  58. package/docs-dev/javascript/ui-page/index.html +30 -0
  59. package/docs-dev/javascript/ui-popover/index.html +30 -0
  60. package/docs-dev/javascript/ui-print/index.html +30 -0
  61. package/docs-dev/javascript/ui-print-details/index.html +30 -0
  62. package/docs-dev/javascript/ui-programmatic-modal/index.html +30 -0
  63. package/docs-dev/javascript/ui-proxy-click/index.html +30 -0
  64. package/docs-dev/javascript/ui-resizer/index.html +30 -0
  65. package/docs-dev/javascript/ui-scroll-slider/index.html +30 -0
  66. package/docs-dev/javascript/ui-scrollpoint/index.html +30 -0
  67. package/docs-dev/javascript/ui-slider/index.html +30 -0
  68. package/docs-dev/javascript/ui-tabs/index.html +30 -0
  69. package/docs-dev/javascript/ui-theme-toggle/index.html +30 -0
  70. package/docs-dev/javascript/ui-tooltip/index.html +30 -0
  71. package/docs-dev/javascript/utils-class-logger/index.html +30 -0
  72. package/docs-dev/javascript/utils-css/index.html +30 -0
  73. package/docs-dev/javascript/utils-dom/index.html +30 -0
  74. package/docs-dev/javascript/utils-file-save/index.html +30 -0
  75. package/docs-dev/javascript/utils-floating-ui/index.html +30 -0
  76. package/docs-dev/javascript/utils-id/index.html +30 -0
  77. package/docs-dev/javascript/utils-pause-youtube-video/index.html +30 -0
  78. package/docs-dev/javascript/utils-system/index.html +30 -0
  79. package/docs-dev/sass/base/color/index.html +30 -0
  80. package/docs-dev/sass/base/elements/index.html +30 -0
  81. package/docs-dev/sass/base/index/index.html +30 -0
  82. package/docs-dev/sass/base/index.html +30 -0
  83. package/docs-dev/sass/base/keyframes/index.html +30 -0
  84. package/docs-dev/sass/base/layout/index.html +30 -0
  85. package/docs-dev/sass/base/normalize/index.html +30 -0
  86. package/docs-dev/sass/base/print/index.html +30 -0
  87. package/docs-dev/sass/base/root/index.html +30 -0
  88. package/docs-dev/sass/base/typography/index.html +30 -0
  89. package/docs-dev/sass/components/accordion/index.html +30 -0
  90. package/docs-dev/sass/components/adaptive-spacing/index.html +30 -0
  91. package/docs-dev/sass/components/badge/index.html +52 -11
  92. package/docs-dev/sass/components/basic-hero/index.html +30 -0
  93. package/docs-dev/sass/components/button/index.html +30 -0
  94. package/docs-dev/sass/components/button-verbose/index.html +30 -0
  95. package/docs-dev/sass/components/callout/index.html +30 -0
  96. package/docs-dev/sass/components/captioned-figure/index.html +30 -0
  97. package/docs-dev/sass/components/card/index.html +30 -0
  98. package/docs-dev/sass/components/card-grid/index.html +30 -0
  99. package/docs-dev/sass/components/counter-list/index.html +45 -8
  100. package/docs-dev/sass/components/css-icon/index.html +30 -0
  101. package/docs-dev/sass/components/data-grid/index.html +30 -0
  102. package/docs-dev/sass/components/data-table/index.html +30 -0
  103. package/docs-dev/sass/components/fill-context/index.html +30 -0
  104. package/docs-dev/sass/components/flipcard/index.html +30 -0
  105. package/docs-dev/sass/components/flipcard-grid/index.html +30 -0
  106. package/docs-dev/sass/components/form-theme/index.html +30 -0
  107. package/docs-dev/sass/components/hero/index.html +30 -0
  108. package/docs-dev/sass/components/horizontal-rule/index.html +30 -0
  109. package/docs-dev/sass/components/image-grid/index.html +30 -0
  110. package/docs-dev/sass/components/index/index.html +30 -0
  111. package/docs-dev/sass/components/index.html +30 -0
  112. package/docs-dev/sass/components/links/index.html +30 -0
  113. package/docs-dev/sass/components/list-inline/index.html +30 -0
  114. package/docs-dev/sass/components/list-lines/index.html +30 -0
  115. package/docs-dev/sass/components/list-ordered/index.html +30 -0
  116. package/docs-dev/sass/components/list-unordered/index.html +30 -0
  117. package/docs-dev/sass/components/menu-stack/index.html +30 -0
  118. package/docs-dev/sass/components/modal/index.html +30 -0
  119. package/docs-dev/sass/components/nav-strip/index.html +30 -0
  120. package/docs-dev/sass/components/overlay-section/index.html +30 -0
  121. package/docs-dev/sass/components/pager/index.html +30 -0
  122. package/docs-dev/sass/components/placeholder-block/index.html +30 -0
  123. package/docs-dev/sass/components/popover/index.html +30 -0
  124. package/docs-dev/sass/components/pull-quote/index.html +30 -0
  125. package/docs-dev/sass/components/ratio-box/index.html +30 -0
  126. package/docs-dev/sass/components/rule/index.html +30 -0
  127. package/docs-dev/sass/components/scroll-slider/index.html +30 -0
  128. package/docs-dev/sass/components/skip-link/index.html +30 -0
  129. package/docs-dev/sass/components/slider/index.html +30 -0
  130. package/docs-dev/sass/components/spoke-spinner/index.html +30 -0
  131. package/docs-dev/sass/components/sticky-list/index.html +30 -0
  132. package/docs-dev/sass/components/tabs/index.html +30 -0
  133. package/docs-dev/sass/components/tag/index.html +30 -0
  134. package/docs-dev/sass/components/tile-button/index.html +30 -0
  135. package/docs-dev/sass/components/tile-grid/index.html +30 -0
  136. package/docs-dev/sass/components/tile-grid-overlay/index.html +30 -0
  137. package/docs-dev/sass/components/vignette/index.html +30 -0
  138. package/docs-dev/sass/components/wysiwyg/index.html +30 -0
  139. package/docs-dev/sass/core/breakpoint/index.html +96 -28
  140. package/docs-dev/sass/core/button/index.html +30 -0
  141. package/docs-dev/sass/core/color/index.html +30 -0
  142. package/docs-dev/sass/core/cssvar/index.html +30 -0
  143. package/docs-dev/sass/core/element/index.html +30 -0
  144. package/docs-dev/sass/core/index.html +30 -0
  145. package/docs-dev/sass/core/layout/index.html +30 -0
  146. package/docs-dev/sass/core/path/index.html +30 -0
  147. package/docs-dev/sass/core/selector/index.html +30 -0
  148. package/docs-dev/sass/core/typography/index.html +30 -0
  149. package/docs-dev/sass/core/units/index.html +30 -0
  150. package/docs-dev/sass/core/utils/index.html +470 -193
  151. package/docs-dev/sass/helpers/color/index.html +30 -0
  152. package/docs-dev/sass/helpers/display/index.html +30 -0
  153. package/docs-dev/sass/helpers/index/index.html +30 -0
  154. package/docs-dev/sass/helpers/index.html +30 -0
  155. package/docs-dev/sass/helpers/typography/index.html +30 -0
  156. package/docs-dev/sass/helpers/units/index.html +30 -0
  157. package/docs-dev/sass/helpers/utilities/index.html +30 -0
  158. package/docs-dev/sass/index.html +30 -0
  159. package/package.json +11 -3
  160. package/scss/README.md +4 -0
  161. package/scss/_breakpoint.scss +28 -7
  162. package/scss/_utils.scss +140 -11
  163. package/scss/components/_badge.scss +23 -4
  164. package/scss/components/_counter-list.scss +21 -7
package/scss/_utils.scss CHANGED
@@ -34,12 +34,11 @@ $config: (
34
34
 
35
35
  /// Get a config option
36
36
  /// @param {Map} $name Name of property
37
- /// @compiler
38
- /// @use "index" as ulu;
39
37
  /// @example scss {compile} Example usage
40
38
  /// .test-em-to-pixel {
41
39
  /// width: ulu.utils-get("pixel-em-base");
42
40
  /// }
41
+ /// @return {Dimension}
43
42
 
44
43
  @function get($name) {
45
44
  @return require-map-get($config, $name, 'utils');
@@ -50,14 +49,12 @@ $config: (
50
49
  /// @param {Map} $map The map to get the value from
51
50
  /// @param {String} $key The key in the map to get value from
52
51
  /// @param {String} $context The context of using this function for debugging help
53
- /// @return {*} The value from the map
54
- /// @compiler
55
- /// @use "index" as ulu;
56
52
  /// @example scss {compile} Example usage
57
53
  /// .test-require-map {
58
54
  /// $test-map: ("test-font-size": 12px);
59
55
  /// font-size: ulu.utils-require-map-get($test-map, "test-font-size");
60
56
  /// }
57
+ /// @return {*} The value from the map
61
58
 
62
59
  @function require-map-get($map, $key, $context: "unknown") {
63
60
  // $value: map.get($map, $key);
@@ -104,6 +101,21 @@ $config: (
104
101
  /// Returns true if we should include something (map of booleans)
105
102
  /// @param {String} $name Name of item to see if it's included
106
103
  /// @param {Map} $includes Map of includes
104
+ /// @example scss {compile} Example usage
105
+ /// $include-styles : (
106
+ /// "h2" : true,
107
+ /// "h3" : false
108
+ /// );
109
+ /// @if(ulu.utils-included("h2", $include-styles)) {
110
+ /// h2 {
111
+ /// font-size: 24px;
112
+ /// }
113
+ /// }
114
+ /// @if(ulu.utils-included("h3", $include-styles)) {
115
+ /// h3 {
116
+ /// font-size: 18px;
117
+ /// }
118
+ /// }
107
119
 
108
120
  @function included($name, $includes) {
109
121
  $value: map.get($includes, $name);
@@ -124,10 +136,21 @@ $config: (
124
136
  }
125
137
  }
126
138
 
127
- // Provide a default when value type is not correct
139
+ /// Provide a default when value type is not correct
128
140
  /// @param {String} $type type of value it should be
129
141
  /// @param {String} $value the value to provide if it is that type
130
142
  /// @param {String} $fallback the fallback value
143
+ /// @example scss {compile} Example usage
144
+ /// $user-accent-color: #FE5F55;
145
+ /// $user-error-color: "##C6ECAE";
146
+ /// $default-color: #777DA7;
147
+ /// .accent-color {
148
+ /// background-color: ulu.utils-if-type("color", $user-accent-color, $default-color);
149
+ /// }
150
+ /// .error-color {
151
+ /// background-color: ulu.utils-if-type("color", $user-error-color, $default-color);
152
+ /// }
153
+ /// @return {CssValue} Returns the value or the fallback.
131
154
 
132
155
  @function if-type($type, $value, $fallback) {
133
156
  @if meta.type-of($value) == $type {
@@ -137,9 +160,19 @@ $config: (
137
160
  }
138
161
  }
139
162
 
140
- // Returns number unit info, and strips the unit
163
+ /// Returns number unit info, and strips the unit
141
164
  /// @param {String} $number Number to get meta info for
142
165
  /// @return {Map} With properties (unit, value, invalid [true/false if not number])
166
+ /// @example scss {compile} Example usage
167
+ /// $size-info: ulu.utils-number-info(24px);
168
+ /// $size-info-invalid: ulu.utils-number-info("Twenty Four Pixels");
169
+ /// .number-info-result {
170
+ /// content: meta.inspect($size-info);
171
+ /// }
172
+ /// .number-info-invalid-result {
173
+ /// content: meta.inspect($size-info-invalid);
174
+ /// }
175
+ ///
143
176
 
144
177
  @function number-info($number, $errors: false) {
145
178
 
@@ -167,6 +200,14 @@ $config: (
167
200
  /// @param {Number} $number The unitless number to add unit to
168
201
  /// @param {String} $unit The unit to add to number
169
202
  /// @return {String} Number with unit attached (can't be used in maths)
203
+ /// @example scss {compile} Example usage
204
+ /// $number: 12;
205
+ /// $unit: "px";
206
+ /// $number-with-unit: ulu.utils-add-unit($number, $unit);
207
+ /// .add-unit-result {
208
+ /// content: $number-with-unit;
209
+ /// }
210
+ ///
170
211
 
171
212
  @function add-unit($number, $unit) {
172
213
  @return $number + string.unquote($unit);
@@ -176,7 +217,18 @@ $config: (
176
217
  /// @param {Number} $number
177
218
  /// @param {String} $other-number
178
219
  /// @return {Boolean} Whether they have the same unit type
179
- // Could be made into multiple arguments in future if needed
220
+ /// Could be made into multiple arguments in future if needed
221
+ /// @example scss {compile} Example usage
222
+ /// $number-1: 12px;
223
+ /// $number-2: 12px;
224
+ /// $number-3: 12rem;
225
+ /// .positive-result {
226
+ /// content: ulu.utils-units-match($number-1, $number-2);
227
+ /// }
228
+ /// .negative-result {
229
+ /// content: ulu.utils-units-match($number-1, $number-3);
230
+ /// }
231
+ ///
180
232
 
181
233
  @function units-match($number, $other-number) {
182
234
  @return math.unit($number) == math.unit($other-number);
@@ -186,7 +238,34 @@ $config: (
186
238
  /// @param {Map} $original Source map
187
239
  /// @param {Map} $changes Changes to merge into source map
188
240
  /// @param {String} $mode How to merge changes (merge [defualt], deep, or overwrite)
189
- /// @return {Map} New map with changes
241
+ /// @example scss {compile} Example usage
242
+ /// $map-1: (
243
+ /// "inner-map" : (
244
+ /// "color" : "green",
245
+ /// "secondary-color" : "green"
246
+ /// ),
247
+ /// "color" : "green",
248
+ /// "secondary-color" : "green"
249
+ /// );
250
+ /// $map-2: (
251
+ /// "inner-map" : (
252
+ /// "color" : "red"
253
+ /// ),
254
+ /// "color" : "red",
255
+ /// );
256
+ /// .result-default {
257
+ /// $merged-map: ulu.utils-map-merge($map-1, $map-2);
258
+ /// content: meta.inspect($merged-map);
259
+ /// }
260
+ /// .result-deep {
261
+ /// $merged-map-deep: ulu.utils-map-merge($map-1, $map-2, "deep");
262
+ /// content: meta.inspect($merged-map-deep);
263
+ /// }
264
+ /// .result-overwrite {
265
+ /// $merged-map-overwrite: ulu.utils-map-merge($map-1, $map-2, "overwrite");
266
+ /// content: meta.inspect($merged-map-overwrite);
267
+ /// }
268
+ ///
190
269
 
191
270
  @function map-merge($original, $changes, $mode: null) {
192
271
  @if ($mode == "deep") {
@@ -202,6 +281,20 @@ $config: (
202
281
  /// @param {Map} $map Source map
203
282
  /// @param {String} $key Property to check for
204
283
  /// @return {Boolean}
284
+ /// @example scss {compile} Example usage
285
+ /// $map-1 : (
286
+ /// "has-key" : true
287
+ /// );
288
+ /// $map-2 : (
289
+ /// "missing-key" : true
290
+ /// );
291
+ /// .map-1 {
292
+ /// content: ulu.utils-map-has($map-1, "has-key");
293
+ /// }
294
+ /// .map-2 {
295
+ /// content: ulu.utils-map-has($map-2, "has-key");
296
+ /// }
297
+ ///
205
298
 
206
299
  @function map-has($map, $key) {
207
300
  @if (meta.type-of($map) != "map") {
@@ -225,6 +318,17 @@ $config: (
225
318
 
226
319
  /// Utility for providing fallbacks, the first truthy value (non false or null) will be returned
227
320
  /// @return {*} The first truthy value
321
+ /// @example scss {compile} Example usage
322
+ /// $fallback-text: "No input received";
323
+ /// .user-name:after {
324
+ /// $user-name: "Johnny";
325
+ /// content: ulu.utils-fallback($user-name, $fallback-text);
326
+ /// }
327
+ /// .user-birthdate:after {
328
+ /// $user-birthdate: null;
329
+ /// content: ulu.utils-fallback($user-birthdate, $fallback-text);
330
+ /// }
331
+ ///
228
332
 
229
333
  @function fallback($args...) {
230
334
  @each $arg in $args {
@@ -236,6 +340,19 @@ $config: (
236
340
  }
237
341
 
238
342
  /// Provides fallback values from the same map
343
+ /// @return {*}
344
+ /// @example scss {compile} Example usage
345
+ /// $map: (
346
+ /// "name": doug,
347
+ /// "gpa": "3",
348
+ /// "grade": "B",
349
+ /// );
350
+ /// .fallback-map {
351
+ /// // iterates through properties until it finds one that is a key in the map.
352
+ /// content: ulu.utils-map-fallback($map, "gpa", "grade", "average");
353
+ /// }
354
+ ///
355
+
239
356
  @function map-fallback($map, $properties...) {
240
357
  @each $prop in $properties {
241
358
  $value: map.get($map, $prop);
@@ -252,6 +369,18 @@ $config: (
252
369
  /// @param {List} $keys The list of keys to check for
253
370
  /// @param {List} $options Options for how this behaves
254
371
  /// @param {List} $options.with-value Requires that at least one of the map entries from the list has a value other than null
372
+ /// @example scss {compile} Example usage
373
+ /// $map : (
374
+ /// "has-key" : true
375
+ /// );
376
+ /// $keys : (
377
+ /// "has-key",
378
+ /// "needs-key",
379
+ /// );
380
+ /// .map-contains-any-result {
381
+ /// content: ulu.utils-map-contains-any($map, $keys);
382
+ /// }
383
+ ///
255
384
  @function map-contains-any($map, $keys, $options: ()) {
256
385
  @if (meta.type-of($map) != "map") {
257
386
  @error "map-contains-any(): Incorrect type for $map (should be map)";
@@ -278,6 +407,8 @@ $config: (
278
407
  /// @param {*} $value The value that may need the fallback
279
408
  /// @param {Map} $lookup Map of properties to functions (use sass:meta > meta.get-function to populate)
280
409
  /// @return {*} The user's original value, or if the value is true get the default value from the provided function
410
+ /// @example scss {compile} Example usage
411
+ ///
281
412
 
282
413
  @function function-fallback($prop, $value, $lookup) {
283
414
  $arguments: null;
@@ -484,8 +615,6 @@ $config: (
484
615
  /// Strips the unit from the number
485
616
  /// - Normally this shouldn't be needed
486
617
  /// @link https://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass/12335841#12335841 Original source (Miriam Suzanne)
487
- /// @compiler
488
- /// @use "index" as ulu;
489
618
  /// @example scss {compile} Example usage
490
619
  /// .test {
491
620
  /// line-height: ulu.utils-strip-unit(4rem);
@@ -3,11 +3,21 @@
3
3
  /// Outputs badge component stylesheet
4
4
  ////
5
5
 
6
+ @use "sass:meta";
6
7
  @use "sass:map";
7
8
  @use "../utils";
8
9
  @use "../selector";
10
+ @use "../typography";
9
11
  @use "../color";
10
12
 
13
+ // Used for function fallback
14
+ $-fallbacks: (
15
+ "font-family" : (
16
+ "function" : meta.get-function("get", false, "typography"),
17
+ "property" : "font-family-sans"
18
+ )
19
+ );
20
+
11
21
  /// Module Settings
12
22
  /// @type Map
13
23
  /// @prop {Number} background-color [gray] Background color (if no image)
@@ -15,6 +25,7 @@
15
25
  /// @prop {Number} color [black] Type color
16
26
  /// @prop {Number} font-size [1.3rem] Font size (basic ie. 1.3rem) for badge
17
27
  /// @prop {Number} font-weight [bold] Font weight
28
+ /// @prop {Number} font-family [true] Specify font family, defaults to typography font-family-sans
18
29
  /// @prop {List} sizes [Object] List of other sizes (large by default), each size is a map of (width, font-size)
19
30
  /// @prop {Number} width [10rem] Width of badge (default size)
20
31
 
@@ -22,13 +33,18 @@ $config: (
22
33
  "background-color": gray,
23
34
  "border-radius": 50%,
24
35
  "color": black,
25
- "font-size": 1.3rem,
36
+ "font-size": 1.5rem,
26
37
  "font-weight": bold,
27
- "width": 10rem,
38
+ "font-family": true,
39
+ "width": 7rem,
28
40
  "sizes" : (
41
+ "small" : (
42
+ "font-size" : 1.2rem,
43
+ "width" : 5rem
44
+ ),
29
45
  "large" : (
30
46
  "font-size" : 2.75rem,
31
- "width" : 6rem
47
+ "width" : 9rem
32
48
  )
33
49
  )
34
50
  ) !default;
@@ -48,7 +64,8 @@ $config: (
48
64
  /// @include ulu.component-badge-get("property");
49
65
 
50
66
  @function get($name) {
51
- @return utils.require-map-get($config, $name, "badge [config]");
67
+ $value: utils.require-map-get($config, $name, "badge [config]");
68
+ @return utils.function-fallback($name, $value, $-fallbacks);
52
69
  }
53
70
 
54
71
  /// Output badge component styles
@@ -77,6 +94,7 @@ $config: (
77
94
  flex: 0 0 get("width");
78
95
  font-size: get("font-size");
79
96
  font-weight: get("font-weight");
97
+ font-family: get("font-family");
80
98
  }
81
99
  #{ $prefix }__inner {
82
100
  display: block;
@@ -118,6 +136,7 @@ $config: (
118
136
  width: 100%;
119
137
  height: 100%;
120
138
  object-fit: cover;
139
+ margin: 0 !important;
121
140
  }
122
141
 
123
142
  @each $name, $props in get("sizes") {
@@ -3,6 +3,8 @@
3
3
  /// Outputs a styled list with counters
4
4
 
5
5
  @use "sass:map";
6
+ @use "sass:selector" as sassSelector;
7
+
6
8
  @use "../utils";
7
9
  @use "../selector";
8
10
  @use "../color";
@@ -21,6 +23,7 @@
21
23
  /// @prop {CssUnit} counter-font-size [1.2em] The font-size of the counter text.
22
24
  /// @prop {Color|String} counter-color [white] The text color of the counter. Accepts color names or hex codes.
23
25
  /// @prop {Color|String} counter-background-color ["accent"] The background color of the counter. Refers to a color in the color module.
26
+ /// @prop {String} extra-selector [null] Additional selectors to include table styling.
24
27
 
25
28
  $config: (
26
29
  "margin" : (2rem 0),
@@ -36,6 +39,7 @@ $config: (
36
39
  "counter-font-family" : null,
37
40
  "counter-color" : white,
38
41
  "counter-background-color" : "accent",
42
+ "extra-selector" : null
39
43
  ) !default;
40
44
 
41
45
  /// Change modules $config
@@ -67,16 +71,26 @@ $config: (
67
71
 
68
72
  @mixin styles {
69
73
  $prefix: selector.class("counter-list");
70
- $width: get("counter-width");
71
- $height: utils.fallback(get("counter-height"), $width);
74
+ $prefix-item: sassSelector.parse("#{ $prefix }__item");
75
+ $extra-selector: get("extra-selector");
76
+
77
+ $selector: $prefix;
78
+ $selector-item: sassSelector.parse("#{ $prefix } > li, #{ $prefix-item }");
72
79
 
73
- #{ $prefix } {
80
+ @if ($extra-selector) {
81
+ $selector: sassSelector.parse("#{ $prefix }, #{ $extra-selector }");
82
+ $selector-item: sassSelector.parse("#{ $selector-item }, #{ $extra-selector } > li");
83
+ }
84
+
85
+ #{ $selector } {
74
86
  margin: get("margin");
75
87
  counter-reset: ulu-counter-list;
76
88
  }
77
89
 
78
- #{ $prefix } > li,
79
- #{ $prefix }__item {
90
+ #{ $selector-item } {
91
+ $width: get("counter-width");
92
+ $height: utils.fallback(get("counter-height"), $width);
93
+
80
94
  display: flex;
81
95
  gap: get("counter-gap");
82
96
  align-items: get("align-items");
@@ -121,13 +135,13 @@ $config: (
121
135
  // Modifiers
122
136
  #{ $prefix }--alphabetical {
123
137
  & > li::before,
124
- & > #{ $prefix }__item::before {
138
+ & > #{ $prefix-item }::before {
125
139
  content: counter(ulu-counter-list, upper-alpha);
126
140
  }
127
141
  }
128
142
  #{ $prefix }--numeric {
129
143
  & > li::before,
130
- & > #{ $prefix }__item::before {
144
+ & > #{ $prefix-item }::before {
131
145
  content: counter(ulu-counter-list, numeric);
132
146
  }
133
147
  }