@ulu/frontend 0.1.0-beta.39 → 0.1.0-beta.40

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 (165) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/ulu-frontend.min.css +1 -1
  3. package/dist/ulu-frontend.min.js +14 -14
  4. package/docs-dev/changelog/index.html +107 -9
  5. package/docs-dev/demos/accordion/index.html +60 -0
  6. package/docs-dev/demos/breakpoints-manager/index.html +60 -0
  7. package/docs-dev/demos/button/index.html +60 -0
  8. package/docs-dev/demos/button-verbose/index.html +60 -0
  9. package/docs-dev/demos/callout/index.html +60 -0
  10. package/docs-dev/demos/captioned-figure/index.html +60 -0
  11. package/docs-dev/demos/card/index.html +76 -16
  12. package/docs-dev/demos/card-grid/index.html +60 -0
  13. package/docs-dev/demos/counter-list/index.html +5224 -0
  14. package/docs-dev/demos/css-icons/index.html +60 -0
  15. package/docs-dev/demos/data-grid/index.html +60 -0
  16. package/docs-dev/demos/data-table/index.html +160 -100
  17. package/docs-dev/demos/details-group/index.html +60 -0
  18. package/docs-dev/demos/file-save/index.html +60 -0
  19. package/docs-dev/demos/flipcard/index.html +60 -0
  20. package/docs-dev/demos/form-theme/index.html +60 -0
  21. package/docs-dev/demos/index.html +60 -0
  22. package/docs-dev/demos/list-inline/index.html +60 -0
  23. package/docs-dev/demos/list-lines/index.html +60 -0
  24. package/docs-dev/demos/menu-stack/index.html +60 -0
  25. package/docs-dev/demos/modals/index.html +68 -0
  26. package/docs-dev/demos/nav-strip/index.html +60 -0
  27. package/docs-dev/demos/overlay-section/index.html +60 -0
  28. package/docs-dev/demos/popovers/index.html +60 -0
  29. package/docs-dev/demos/print/index.html +60 -0
  30. package/docs-dev/demos/pull-quote/index.html +60 -0
  31. package/docs-dev/demos/rule/index.html +60 -0
  32. package/docs-dev/demos/scrollpoints/index.html +60 -0
  33. package/docs-dev/demos/spoke-spinner/index.html +60 -0
  34. package/docs-dev/demos/sticky-list/index.html +60 -0
  35. package/docs-dev/demos/tabs/index.html +60 -0
  36. package/docs-dev/demos/tag/index.html +60 -0
  37. package/docs-dev/demos/theme-toggle/index.html +60 -0
  38. package/docs-dev/demos/tiles/index.html +60 -0
  39. package/docs-dev/demos/tooltip/index.html +60 -0
  40. package/docs-dev/guide/building-stylesheet/index.html +60 -0
  41. package/docs-dev/guide/developing-ulu-scss-module/index.html +60 -0
  42. package/docs-dev/guide/index.html +60 -0
  43. package/docs-dev/index.html +60 -0
  44. package/docs-dev/javascript/events/index.html +60 -0
  45. package/docs-dev/javascript/index.html +60 -0
  46. package/docs-dev/javascript/settings/index.html +60 -0
  47. package/docs-dev/javascript/ui-breakpoints/index.html +60 -0
  48. package/docs-dev/javascript/ui-collapsible/index.html +60 -0
  49. package/docs-dev/javascript/ui-details-group/index.html +60 -0
  50. package/docs-dev/javascript/ui-dialog/index.html +60 -0
  51. package/docs-dev/javascript/ui-flipcard/index.html +60 -0
  52. package/docs-dev/javascript/ui-grid/index.html +60 -0
  53. package/docs-dev/javascript/ui-modal-builder/index.html +60 -0
  54. package/docs-dev/javascript/ui-overflow-scroller/index.html +60 -0
  55. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +60 -0
  56. package/docs-dev/javascript/ui-page/index.html +60 -0
  57. package/docs-dev/javascript/ui-popover/index.html +60 -0
  58. package/docs-dev/javascript/ui-print/index.html +60 -0
  59. package/docs-dev/javascript/ui-print-details/index.html +60 -0
  60. package/docs-dev/javascript/ui-programmatic-modal/index.html +60 -0
  61. package/docs-dev/javascript/ui-proxy-click/index.html +60 -0
  62. package/docs-dev/javascript/ui-resizer/index.html +60 -0
  63. package/docs-dev/javascript/ui-scroll-slider/index.html +60 -0
  64. package/docs-dev/javascript/ui-scrollpoint/index.html +60 -0
  65. package/docs-dev/javascript/ui-slider/index.html +60 -0
  66. package/docs-dev/javascript/ui-tabs/index.html +60 -0
  67. package/docs-dev/javascript/ui-theme-toggle/index.html +60 -0
  68. package/docs-dev/javascript/ui-tooltip/index.html +60 -0
  69. package/docs-dev/javascript/utils-class-logger/index.html +60 -0
  70. package/docs-dev/javascript/utils-css/index.html +60 -0
  71. package/docs-dev/javascript/utils-dom/index.html +105 -8
  72. package/docs-dev/javascript/utils-file-save/index.html +60 -0
  73. package/docs-dev/javascript/utils-floating-ui/index.html +60 -0
  74. package/docs-dev/javascript/utils-id/index.html +60 -0
  75. package/docs-dev/javascript/utils-pause-youtube-video/index.html +60 -0
  76. package/docs-dev/javascript/utils-system/index.html +60 -0
  77. package/docs-dev/sass/base/color/index.html +60 -0
  78. package/docs-dev/sass/base/elements/index.html +130 -70
  79. package/docs-dev/sass/base/index/index.html +116 -56
  80. package/docs-dev/sass/base/index.html +60 -0
  81. package/docs-dev/sass/base/keyframes/index.html +60 -0
  82. package/docs-dev/sass/base/layout/index.html +123 -63
  83. package/docs-dev/sass/base/normalize/index.html +60 -0
  84. package/docs-dev/sass/base/print/index.html +60 -0
  85. package/docs-dev/sass/base/root/index.html +60 -0
  86. package/docs-dev/sass/base/typography/index.html +60 -0
  87. package/docs-dev/sass/components/accordion/index.html +178 -118
  88. package/docs-dev/sass/components/adaptive-spacing/index.html +184 -124
  89. package/docs-dev/sass/components/badge/index.html +156 -96
  90. package/docs-dev/sass/components/basic-hero/index.html +122 -62
  91. package/docs-dev/sass/components/button/index.html +109 -49
  92. package/docs-dev/sass/components/button-verbose/index.html +188 -128
  93. package/docs-dev/sass/components/callout/index.html +223 -163
  94. package/docs-dev/sass/components/captioned-figure/index.html +174 -114
  95. package/docs-dev/sass/components/card/index.html +228 -168
  96. package/docs-dev/sass/components/card-grid/index.html +130 -70
  97. package/docs-dev/sass/components/counter-list/index.html +5458 -0
  98. package/docs-dev/sass/components/css-icon/index.html +200 -140
  99. package/docs-dev/sass/components/data-grid/index.html +227 -167
  100. package/docs-dev/sass/components/data-table/index.html +174 -114
  101. package/docs-dev/sass/components/fill-context/index.html +60 -0
  102. package/docs-dev/sass/components/flipcard/index.html +222 -162
  103. package/docs-dev/sass/components/flipcard-grid/index.html +117 -57
  104. package/docs-dev/sass/components/form-theme/index.html +497 -437
  105. package/docs-dev/sass/components/hero/index.html +167 -107
  106. package/docs-dev/sass/components/horizontal-rule/index.html +116 -56
  107. package/docs-dev/sass/components/image-grid/index.html +123 -63
  108. package/docs-dev/sass/components/index/index.html +161 -100
  109. package/docs-dev/sass/components/index.html +60 -0
  110. package/docs-dev/sass/components/links/index.html +60 -0
  111. package/docs-dev/sass/components/list-inline/index.html +137 -77
  112. package/docs-dev/sass/components/list-lines/index.html +158 -98
  113. package/docs-dev/sass/components/list-ordered/index.html +60 -0
  114. package/docs-dev/sass/components/list-unordered/index.html +60 -0
  115. package/docs-dev/sass/components/menu-stack/index.html +179 -119
  116. package/docs-dev/sass/components/modal/index.html +174 -114
  117. package/docs-dev/sass/components/nav-strip/index.html +174 -114
  118. package/docs-dev/sass/components/overlay-section/index.html +161 -101
  119. package/docs-dev/sass/components/pager/index.html +174 -114
  120. package/docs-dev/sass/components/placeholder-block/index.html +174 -114
  121. package/docs-dev/sass/components/popover/index.html +174 -114
  122. package/docs-dev/sass/components/pull-quote/index.html +174 -114
  123. package/docs-dev/sass/components/ratio-box/index.html +120 -60
  124. package/docs-dev/sass/components/rule/index.html +123 -63
  125. package/docs-dev/sass/components/scroll-slider/index.html +174 -114
  126. package/docs-dev/sass/components/skip-link/index.html +94 -34
  127. package/docs-dev/sass/components/slider/index.html +174 -114
  128. package/docs-dev/sass/components/spoke-spinner/index.html +116 -56
  129. package/docs-dev/sass/components/sticky-list/index.html +206 -146
  130. package/docs-dev/sass/components/tabs/index.html +174 -114
  131. package/docs-dev/sass/components/tag/index.html +221 -161
  132. package/docs-dev/sass/components/tile-button/index.html +161 -101
  133. package/docs-dev/sass/components/tile-grid/index.html +202 -142
  134. package/docs-dev/sass/components/tile-grid-overlay/index.html +97 -37
  135. package/docs-dev/sass/components/vignette/index.html +116 -56
  136. package/docs-dev/sass/components/wysiwyg/index.html +125 -65
  137. package/docs-dev/sass/core/breakpoint/index.html +160 -100
  138. package/docs-dev/sass/core/button/index.html +526 -466
  139. package/docs-dev/sass/core/color/index.html +217 -157
  140. package/docs-dev/sass/core/cssvar/index.html +109 -49
  141. package/docs-dev/sass/core/element/index.html +495 -435
  142. package/docs-dev/sass/core/index.html +60 -0
  143. package/docs-dev/sass/core/layout/index.html +167 -107
  144. package/docs-dev/sass/core/path/index.html +92 -32
  145. package/docs-dev/sass/core/selector/index.html +109 -49
  146. package/docs-dev/sass/core/typography/index.html +344 -284
  147. package/docs-dev/sass/core/units/index.html +141 -81
  148. package/docs-dev/sass/core/utils/index.html +130 -70
  149. package/docs-dev/sass/helpers/color/index.html +60 -0
  150. package/docs-dev/sass/helpers/display/index.html +60 -0
  151. package/docs-dev/sass/helpers/index/index.html +113 -53
  152. package/docs-dev/sass/helpers/index.html +60 -0
  153. package/docs-dev/sass/helpers/typography/index.html +60 -0
  154. package/docs-dev/sass/helpers/units/index.html +107 -47
  155. package/docs-dev/sass/helpers/utilities/index.html +60 -0
  156. package/docs-dev/sass/index.html +60 -0
  157. package/js/ui/dialog.js +28 -3
  158. package/js/utils/dom.js +14 -3
  159. package/package.json +2 -2
  160. package/scss/components/_counter-list.scss +133 -0
  161. package/scss/components/_index.scss +6 -0
  162. package/types/ui/dialog.d.ts +1 -0
  163. package/types/ui/dialog.d.ts.map +1 -1
  164. package/types/utils/dom.d.ts +11 -3
  165. package/types/utils/dom.d.ts.map +1 -1
@@ -286,6 +286,21 @@
286
286
  </li>
287
287
 
288
288
 
289
+ <li class="nav-tree__item ">
290
+
291
+ <a class="nav-tree__link " href="/frontend/demos/counter-list/">
292
+
293
+
294
+ <span class="nav-tree__text">
295
+ Counter List
296
+ </span>
297
+
298
+ </a>
299
+
300
+
301
+ </li>
302
+
303
+
289
304
  <li class="nav-tree__item ">
290
305
 
291
306
  <a class="nav-tree__link " href="/frontend/demos/css-icons/">
@@ -1335,6 +1350,21 @@
1335
1350
  </li>
1336
1351
 
1337
1352
 
1353
+ <li class="nav-tree__item ">
1354
+
1355
+ <a class="nav-tree__link " href="/frontend/sass/components/counter-list/">
1356
+
1357
+
1358
+ <span class="nav-tree__text">
1359
+ Counter-list
1360
+ </span>
1361
+
1362
+ </a>
1363
+
1364
+
1365
+ </li>
1366
+
1367
+
1338
1368
  <li class="nav-tree__item ">
1339
1369
 
1340
1370
  <a class="nav-tree__link " href="/frontend/sass/components/css-icon/">
@@ -2802,6 +2832,21 @@
2802
2832
  </li>
2803
2833
 
2804
2834
 
2835
+ <li class="nav-tree__item ">
2836
+
2837
+ <a class="nav-tree__link " href="/frontend/demos/counter-list/">
2838
+
2839
+
2840
+ <span class="nav-tree__text">
2841
+ Counter List
2842
+ </span>
2843
+
2844
+ </a>
2845
+
2846
+
2847
+ </li>
2848
+
2849
+
2805
2850
  <li class="nav-tree__item ">
2806
2851
 
2807
2852
  <a class="nav-tree__link " href="/frontend/demos/css-icons/">
@@ -3851,6 +3896,21 @@
3851
3896
  </li>
3852
3897
 
3853
3898
 
3899
+ <li class="nav-tree__item ">
3900
+
3901
+ <a class="nav-tree__link " href="/frontend/sass/components/counter-list/">
3902
+
3903
+
3904
+ <span class="nav-tree__text">
3905
+ Counter-list
3906
+ </span>
3907
+
3908
+ </a>
3909
+
3910
+
3911
+ </li>
3912
+
3913
+
3854
3914
  <li class="nav-tree__item ">
3855
3915
 
3856
3916
  <a class="nav-tree__link " href="/frontend/sass/components/css-icon/">
@@ -5106,15 +5166,6 @@
5106
5166
  <div class="toc">
5107
5167
  <ol>
5108
5168
 
5109
- <li><a href="#variables">Variables</a>
5110
-
5111
- <ol>
5112
-
5113
- <li><a href="#variable-config">$config</a>
5114
- </li>
5115
- </ol>
5116
- </li>
5117
-
5118
5169
  <li><a href="#mixins">Mixins</a>
5119
5170
 
5120
5171
  <ol>
@@ -5136,6 +5187,15 @@
5136
5187
 
5137
5188
  <li><a href="#function-get">get()</a>
5138
5189
  </li>
5190
+ </ol>
5191
+ </li>
5192
+
5193
+ <li><a href="#variables">Variables</a>
5194
+
5195
+ <ol>
5196
+
5197
+ <li><a href="#variable-config">$config</a>
5198
+ </li>
5139
5199
  </ol>
5140
5200
  </li>
5141
5201
  </ol>
@@ -5153,44 +5213,6 @@
5153
5213
  <div class="type-large">
5154
5214
  <p>Output unit helper stylesheet</p>
5155
5215
  </div>
5156
- <h2 id="variables" tabindex="-1">Variables</h2>
5157
- <div class="sassdoc-item-header">
5158
- <h3 id="variable-config" tabindex="-1">$config</h3>
5159
- <div class="sassdoc-item-header__labels">
5160
- <span class="tag tag--primary"><strong>Variable</strong></span> <span class="tag"><strong>Type</strong>: Map</span>
5161
- </div>
5162
- </div>
5163
- <p>Module Settings</p>
5164
- <pre class="language-scss"><code class="language-scss"><span class="pjs-token pjs-property"><span class="pjs-token pjs-variable">$config</span></span><span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-punctuation">(</span>
5165
- <span class="pjs-token pjs-string">"sides"</span><span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-punctuation">(</span><span class="pjs-token pjs-string">"top"</span><span class="pjs-token pjs-punctuation">,</span> <span class="pjs-token pjs-string">"bottom"</span><span class="pjs-token pjs-punctuation">,</span> <span class="pjs-token pjs-string">"left"</span><span class="pjs-token pjs-punctuation">,</span> <span class="pjs-token pjs-string">"right"</span><span class="pjs-token pjs-punctuation">)</span>
5166
- <span class="pjs-token pjs-punctuation">)</span><span class="pjs-token pjs-punctuation">;</span></code></pre>
5167
- <details>
5168
- <summary>File Information</summary>
5169
- <ul>
5170
- <li><strong>File:</strong> _units.scss</li>
5171
- <li><strong>Group:</strong> units</li>
5172
- <li><strong>Type:</strong> variable</li>
5173
- <li><strong>Lines (comments):</strong> 12-14</li>
5174
- <li><strong>Lines (code):</strong> 16-18</li>
5175
- </ul>
5176
- </details>
5177
- <h4 id="map-properties" tabindex="-1">Map Properties</h4>
5178
- <table>
5179
- <thead>
5180
- <tr>
5181
- <th style="text-align:left">Name</th>
5182
- <th style="text-align:left">Type</th>
5183
- <th style="text-align:left">Description</th>
5184
- </tr>
5185
- </thead>
5186
- <tbody>
5187
- <tr>
5188
- <td style="text-align:left">$config.sides</td>
5189
- <td style="text-align:left">Number</td>
5190
- <td style="text-align:left">Sides to print for helper classes (ie. reduce output of unneeded sides)</td>
5191
- </tr>
5192
- </tbody>
5193
- </table>
5194
5216
  <h2 id="mixins" tabindex="-1">Mixins</h2>
5195
5217
  <div class="sassdoc-item-header">
5196
5218
  <h3 id="mixin-set" tabindex="-1">set()</h3>
@@ -5321,6 +5343,44 @@
5321
5343
  <ul>
5322
5344
  <li><a href="/frontend/sass/helpers/units/#variable-config">$config</a></li>
5323
5345
  </ul>
5346
+ <h2 id="variables" tabindex="-1">Variables</h2>
5347
+ <div class="sassdoc-item-header">
5348
+ <h3 id="variable-config" tabindex="-1">$config</h3>
5349
+ <div class="sassdoc-item-header__labels">
5350
+ <span class="tag tag--primary"><strong>Variable</strong></span> <span class="tag"><strong>Type</strong>: Map</span>
5351
+ </div>
5352
+ </div>
5353
+ <p>Module Settings</p>
5354
+ <pre class="language-scss"><code class="language-scss"><span class="pjs-token pjs-property"><span class="pjs-token pjs-variable">$config</span></span><span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-punctuation">(</span>
5355
+ <span class="pjs-token pjs-string">"sides"</span><span class="pjs-token pjs-punctuation">:</span> <span class="pjs-token pjs-punctuation">(</span><span class="pjs-token pjs-string">"top"</span><span class="pjs-token pjs-punctuation">,</span> <span class="pjs-token pjs-string">"bottom"</span><span class="pjs-token pjs-punctuation">,</span> <span class="pjs-token pjs-string">"left"</span><span class="pjs-token pjs-punctuation">,</span> <span class="pjs-token pjs-string">"right"</span><span class="pjs-token pjs-punctuation">)</span>
5356
+ <span class="pjs-token pjs-punctuation">)</span><span class="pjs-token pjs-punctuation">;</span></code></pre>
5357
+ <details>
5358
+ <summary>File Information</summary>
5359
+ <ul>
5360
+ <li><strong>File:</strong> _units.scss</li>
5361
+ <li><strong>Group:</strong> units</li>
5362
+ <li><strong>Type:</strong> variable</li>
5363
+ <li><strong>Lines (comments):</strong> 12-14</li>
5364
+ <li><strong>Lines (code):</strong> 16-18</li>
5365
+ </ul>
5366
+ </details>
5367
+ <h4 id="map-properties" tabindex="-1">Map Properties</h4>
5368
+ <table>
5369
+ <thead>
5370
+ <tr>
5371
+ <th style="text-align:left">Name</th>
5372
+ <th style="text-align:left">Type</th>
5373
+ <th style="text-align:left">Description</th>
5374
+ </tr>
5375
+ </thead>
5376
+ <tbody>
5377
+ <tr>
5378
+ <td style="text-align:left">$config.sides</td>
5379
+ <td style="text-align:left">Number</td>
5380
+ <td style="text-align:left">Sides to print for helper classes (ie. reduce output of unneeded sides)</td>
5381
+ </tr>
5382
+ </tbody>
5383
+ </table>
5324
5384
 
5325
5385
  </div>
5326
5386
  </div>
@@ -286,6 +286,21 @@
286
286
  </li>
287
287
 
288
288
 
289
+ <li class="nav-tree__item ">
290
+
291
+ <a class="nav-tree__link " href="/frontend/demos/counter-list/">
292
+
293
+
294
+ <span class="nav-tree__text">
295
+ Counter List
296
+ </span>
297
+
298
+ </a>
299
+
300
+
301
+ </li>
302
+
303
+
289
304
  <li class="nav-tree__item ">
290
305
 
291
306
  <a class="nav-tree__link " href="/frontend/demos/css-icons/">
@@ -1335,6 +1350,21 @@
1335
1350
  </li>
1336
1351
 
1337
1352
 
1353
+ <li class="nav-tree__item ">
1354
+
1355
+ <a class="nav-tree__link " href="/frontend/sass/components/counter-list/">
1356
+
1357
+
1358
+ <span class="nav-tree__text">
1359
+ Counter-list
1360
+ </span>
1361
+
1362
+ </a>
1363
+
1364
+
1365
+ </li>
1366
+
1367
+
1338
1368
  <li class="nav-tree__item ">
1339
1369
 
1340
1370
  <a class="nav-tree__link " href="/frontend/sass/components/css-icon/">
@@ -2802,6 +2832,21 @@
2802
2832
  </li>
2803
2833
 
2804
2834
 
2835
+ <li class="nav-tree__item ">
2836
+
2837
+ <a class="nav-tree__link " href="/frontend/demos/counter-list/">
2838
+
2839
+
2840
+ <span class="nav-tree__text">
2841
+ Counter List
2842
+ </span>
2843
+
2844
+ </a>
2845
+
2846
+
2847
+ </li>
2848
+
2849
+
2805
2850
  <li class="nav-tree__item ">
2806
2851
 
2807
2852
  <a class="nav-tree__link " href="/frontend/demos/css-icons/">
@@ -3851,6 +3896,21 @@
3851
3896
  </li>
3852
3897
 
3853
3898
 
3899
+ <li class="nav-tree__item ">
3900
+
3901
+ <a class="nav-tree__link " href="/frontend/sass/components/counter-list/">
3902
+
3903
+
3904
+ <span class="nav-tree__text">
3905
+ Counter-list
3906
+ </span>
3907
+
3908
+ </a>
3909
+
3910
+
3911
+ </li>
3912
+
3913
+
3854
3914
  <li class="nav-tree__item ">
3855
3915
 
3856
3916
  <a class="nav-tree__link " href="/frontend/sass/components/css-icon/">
@@ -286,6 +286,21 @@
286
286
  </li>
287
287
 
288
288
 
289
+ <li class="nav-tree__item ">
290
+
291
+ <a class="nav-tree__link " href="/frontend/demos/counter-list/">
292
+
293
+
294
+ <span class="nav-tree__text">
295
+ Counter List
296
+ </span>
297
+
298
+ </a>
299
+
300
+
301
+ </li>
302
+
303
+
289
304
  <li class="nav-tree__item ">
290
305
 
291
306
  <a class="nav-tree__link " href="/frontend/demos/css-icons/">
@@ -1335,6 +1350,21 @@
1335
1350
  </li>
1336
1351
 
1337
1352
 
1353
+ <li class="nav-tree__item ">
1354
+
1355
+ <a class="nav-tree__link " href="/frontend/sass/components/counter-list/">
1356
+
1357
+
1358
+ <span class="nav-tree__text">
1359
+ Counter-list
1360
+ </span>
1361
+
1362
+ </a>
1363
+
1364
+
1365
+ </li>
1366
+
1367
+
1338
1368
  <li class="nav-tree__item ">
1339
1369
 
1340
1370
  <a class="nav-tree__link " href="/frontend/sass/components/css-icon/">
@@ -2802,6 +2832,21 @@
2802
2832
  </li>
2803
2833
 
2804
2834
 
2835
+ <li class="nav-tree__item ">
2836
+
2837
+ <a class="nav-tree__link " href="/frontend/demos/counter-list/">
2838
+
2839
+
2840
+ <span class="nav-tree__text">
2841
+ Counter List
2842
+ </span>
2843
+
2844
+ </a>
2845
+
2846
+
2847
+ </li>
2848
+
2849
+
2805
2850
  <li class="nav-tree__item ">
2806
2851
 
2807
2852
  <a class="nav-tree__link " href="/frontend/demos/css-icons/">
@@ -3851,6 +3896,21 @@
3851
3896
  </li>
3852
3897
 
3853
3898
 
3899
+ <li class="nav-tree__item ">
3900
+
3901
+ <a class="nav-tree__link " href="/frontend/sass/components/counter-list/">
3902
+
3903
+
3904
+ <span class="nav-tree__text">
3905
+ Counter-list
3906
+ </span>
3907
+
3908
+ </a>
3909
+
3910
+
3911
+ </li>
3912
+
3913
+
3854
3914
  <li class="nav-tree__item ">
3855
3915
 
3856
3916
  <a class="nav-tree__link " href="/frontend/sass/components/css-icon/">
package/js/ui/dialog.js CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { ComponentInitializer } from "../utils/system.js";
6
- import { wasClickOutside } from "../utils/dom.js";
6
+ import { wasClickOutside, getScrollbarWidth } from "../utils/dom.js";
7
7
  import { pauseVideos as pauseYoutubeVideos, prepVideos as prepYoutubeVideos } from "../utils/pause-youtube-video.js";
8
8
 
9
9
  /**
@@ -47,6 +47,11 @@ export const defaults = {
47
47
  * When open and not non-modal, the body is prevented from scrolling (defaults to true).
48
48
  */
49
49
  preventScroll: true,
50
+ /**
51
+ * Compensate for layout shift when preventing scroll. Which adds padding equal to scrollbars
52
+ * width while dialog is open
53
+ */
54
+ preventScrollShift: true,
50
55
  };
51
56
 
52
57
 
@@ -95,7 +100,15 @@ export function init() {
95
100
  export function setupTrigger(trigger, dialogId) {
96
101
  trigger.addEventListener("click", handleTrigger);
97
102
 
98
- function handleTrigger() {
103
+ function handleTrigger(event) {
104
+
105
+ // If a link is used (not recommended) we need to prevent
106
+ // the page from scrolling
107
+ const closestLink = event.target.closest("a");
108
+ if (closestLink) {
109
+ event.preventDefault();
110
+ }
111
+
99
112
  const dialog = document.getElementById(dialogId);
100
113
  if (!dialog) {
101
114
  console.error("Could not locate dialog (id)", dialogId);
@@ -130,10 +143,22 @@ export function setupDialog(dialog, userOptions) {
130
143
  // Allow preventScroll if it is a modal dialog
131
144
  // Caching value of overflow before setting so we don't assume what it's initial value is
132
145
  if (!options.nonModal && options.preventScroll) {
146
+
133
147
  let overflowValue = body.style.overflow;
148
+ let paddingRightValue = body.style.paddingRight;
149
+
134
150
  dialog.addEventListener("toggle", (event) => {
135
151
  const isOpen = event.newState === "open";
136
- if (isOpen) overflowValue = body.style.overflow;
152
+ if (isOpen) {
153
+ overflowValue = body.style.overflow;
154
+ paddingRightValue = body.style.paddingRight;
155
+ }
156
+
157
+ // This will compensate for scrollbar jump (if user has it enabled)
158
+ if (options.preventScrollShift) {
159
+ body.style.paddingRight = isOpen ? `${ getScrollbarWidth() }px` : paddingRightValue;
160
+ }
161
+
137
162
  body.style.overflow = isOpen ? "hidden" : overflowValue;
138
163
  });
139
164
  }
package/js/utils/dom.js CHANGED
@@ -166,11 +166,22 @@ export function resolveClasses(classes) {
166
166
 
167
167
  /**
168
168
  * Sets a CSS custom property equal to the scrollbar width
169
- * @param {Node} element The element that is the child of a scrollabel container
170
- * @param {Node} container The container that can be scrolled
169
+ * @param {HTMLElement} [element=document.body] -The element that is the child of a scrollable container
170
+ * @param {Window|HTMLElement} [container=window] - The container that can be scrolled
171
171
  * @param {Stirng} propName Custom property to set
172
172
  */
173
173
  export function addScrollbarProperty(element = document.body, container = window, propName = "--ulu-scrollbar-width") {
174
- const scrollbarWidth = container.innerWidth - element.clientWidth;
174
+ const scrollbarWidth = getScrollbarWidth(element, container);
175
175
  element.style.setProperty(propName, `${ scrollbarWidth }px`);
176
+ }
177
+
178
+ /**
179
+ * Calculates the width of the scrollbar.
180
+ *
181
+ * @param {HTMLElement} [element=document.body] -The element that is the child of a scrollable container
182
+ * @param {Window|HTMLElement} [container=window] - The container that can be scrolled
183
+ * @returns {number} The width of the scrollbar in pixels.
184
+ */
185
+ export function getScrollbarWidth(element = document.body, container = window) {
186
+ return container.innerWidth - element.clientWidth;
176
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulu/frontend",
3
- "version": "0.1.0-beta.39",
3
+ "version": "0.1.0-beta.40",
4
4
  "description": "Modular Sass Theming Library",
5
5
  "browser": "js/index.js",
6
6
  "main": "index.js",
@@ -63,7 +63,7 @@
63
63
  "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
64
64
  "@fortawesome/fontawesome-free": "^6.5.2",
65
65
  "@ulu/markdown-output-utils": "^0.0.6",
66
- "@ulu/sassdoc-to-markdown": "^0.0.15",
66
+ "@ulu/sassdoc-to-markdown": "^0.0.16",
67
67
  "@ulu/vite-config-cms-theme": "^0.0.10",
68
68
  "@ulu/vitepress-auto-menus": "^0.0.3",
69
69
  "@ulu/vitepress-sassdoc": "^0.0.9",
@@ -0,0 +1,133 @@
1
+ ////
2
+ /// @group counter-list
3
+ /// Outputs a styled list with counters
4
+
5
+ @use "sass:map";
6
+ @use "../utils";
7
+ @use "../selector";
8
+ @use "../color";
9
+ @use "../breakpoint";
10
+
11
+ /// Module Settings
12
+ /// @type Map
13
+ /// @prop {List} margin [(2rem 0)] The top and bottom margin of the list.
14
+ /// @prop {List} item-margin [(0, 0, 1rem, 0)] The margin applied to each list item.
15
+ /// @prop {Keyword} align-items [baseline] How to align the counter (flexbox align-items values)
16
+ /// @prop {Length} counter-width [2.4em] The width and height (if height is falsy)
17
+ /// @prop {Length} counter-height [null] The height (optional)
18
+ /// @prop {Length} counter-gap [1em] The gap between the counter and the list item content.
19
+ /// @prop {String} counter-style [numeric] The list-style-type used for the counter.
20
+ /// @prop {Keyword|Percentage} counter-border-radius [50%] The border-radius of the counter element.
21
+ /// @prop {Length} counter-font-size [1.2em] The font-size of the counter text.
22
+ /// @prop {String} counter-color [white] The text color of the counter. Accepts color names or hex codes.
23
+ /// @prop {String} counter-background-color ["accent"] The background color of the counter. Refers to a color in the color module.
24
+
25
+ $config: (
26
+ "margin" : (2rem 0),
27
+ "item-margin" : (0, 0, 1rem, 0),
28
+ "align-items" : baseline,
29
+ "counter-width" : 2.4em,
30
+ "counter-height" : null,
31
+ "counter-gap" : 1em,
32
+ "counter-style" : numeric,
33
+ "counter-border-radius" : 50%,
34
+ "counter-font-size" : 1.2em,
35
+ "counter-color" : white,
36
+ "counter-background-color" : "accent",
37
+ ) !default;
38
+
39
+ /// Change modules $config
40
+ /// @param {Map} $changes Map of changes
41
+ /// @example scss
42
+ /// @include ulu.component-counter-list-set(( "property" : value ));
43
+
44
+ @mixin set($changes) {
45
+ $config: map.merge($config, $changes) !global;
46
+ }
47
+
48
+ /// Get a config option
49
+ /// @param {Map} $name Name of property
50
+ /// @example scss
51
+ /// @include ulu.component-counter-list-get("property");
52
+
53
+ @function get($name) {
54
+ @return utils.require-map-get($config, $name, "counter-list [config]");
55
+ }
56
+
57
+ /// Output counter-list component styles
58
+ /// @demo counter-list
59
+ /// @example html {preview}
60
+ /// <ol class="counter-list">
61
+ /// <li class="counter-list__item">This is a item that will get counted</li>
62
+ /// <li class="counter-list__item">Another item that has more content to show line wrapping. Lorem ipsum et depsi anu. Dolor et anu.</li>
63
+ /// <li class="counter-list__item">Small Amount of Text</li>
64
+ /// </ol>
65
+
66
+ @mixin styles {
67
+ $prefix: selector.class("counter-list");
68
+ $width: get("counter-width");
69
+ $height: utils.fallback(get("counter-height"), $width);
70
+
71
+ #{ $prefix } {
72
+ margin: get("margin");
73
+ counter-reset: ulu-counter-list;
74
+
75
+ & > li,
76
+ & > #{ $prefix }__item {
77
+ display: flex;
78
+ gap: get("counter-gap");
79
+ align-items: get("align-items");
80
+ margin: get("item-margin");
81
+ min-height: $height;
82
+ &::before {
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ width: $width;
87
+ height: $height;
88
+ flex: 0 0 $width;
89
+ counter-increment: ulu-counter-list;
90
+ content: counter(ulu-counter-list, get("counter-style"));
91
+ font-size: get("counter-font-size");
92
+ color: color.get(get("counter-color"));
93
+ background-color: color.get(get("counter-background-color"));
94
+ border-radius: get("counter-border-radius");
95
+ }
96
+
97
+ // Keeping this could be useful
98
+ // but we need to think about how its setup
99
+ // - Probably should be a modifier (choice)
100
+ // - May need either option for how align-items is set (flex-start vs center)
101
+ // - This could be useful when used in grid
102
+ // - May need to be pervasive and not linked to a breakpoint (alternate style)
103
+ // - It's also just useful to know you could override the layout like this
104
+ // to get useful variations (maybe we don't need to include it but users
105
+ // can do specific)
106
+ // @if ( get("counter-mobile-toggle") ) {
107
+ // @include breakpoint.max("small") {
108
+ // padding-left: 0;
109
+ // padding-top: calc(get("counter-width") + get("counter-gap-mobile"));
110
+ // flex-direction: column;
111
+ // align-items: center;
112
+ // }
113
+ // }
114
+ }
115
+ }
116
+
117
+ // Modifiers
118
+ #{ $prefix }--alphabetical {
119
+ & > li::before,
120
+ & > #{ $prefix }__item::before {
121
+ content: counter(ulu-counter-list, upper-alpha);
122
+ }
123
+ }
124
+ #{ $prefix }--numeric {
125
+ & > li::before,
126
+ & > #{ $prefix }__item::before {
127
+ content: counter(ulu-counter-list, numeric);
128
+ }
129
+ }
130
+ #{ $prefix }--no-reset {
131
+ counter-reset: none;
132
+ }
133
+ }
@@ -12,6 +12,7 @@
12
12
  @forward "callout" as callout-*;
13
13
  @forward "card" as card-*;
14
14
  @forward "card-grid" as card-grid-*;
15
+ @forward "counter-list" as counter-list-*;
15
16
  @forward "css-icon" as css-icon-*;
16
17
  @forward "data-grid" as data-grid-*;
17
18
  @forward "data-table" as data-table-*;
@@ -63,6 +64,7 @@
63
64
  @use "callout";
64
65
  @use "card";
65
66
  @use "card-grid";
67
+ @use "counter-list";
66
68
  @use "css-icon";
67
69
  @use "data-grid";
68
70
  @use "data-table";
@@ -115,6 +117,7 @@ $all-includes: (
115
117
  "callout",
116
118
  "card",
117
119
  "card-grid",
120
+ "counter-list",
118
121
  "css-icon",
119
122
  "data-grid",
120
123
  "data-table",
@@ -220,6 +223,9 @@ $current-includes: $all-includes;
220
223
  @if (list.index($includes, "card-grid")) {
221
224
  @include card-grid.styles;
222
225
  }
226
+ @if (list.index($includes, "counter-list")) {
227
+ @include counter-list.styles;
228
+ }
223
229
  @if (list.index($includes, "css-icon")) {
224
230
  @include css-icon.styles;
225
231
  }
@@ -42,6 +42,7 @@ export namespace defaults {
42
42
  let clickOutsideCloses: boolean;
43
43
  let pauseVideos: boolean;
44
44
  let preventScroll: boolean;
45
+ let preventScrollShift: boolean;
45
46
  }
46
47
  import { ComponentInitializer } from "../utils/system.js";
47
48
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../js/ui/dialog.js"],"names":[],"mappings":"AAuDA;;GAEG;AACH,gDAEC;AAED;;;GAGG;AACH,6BAqBC;AAED;;;;GAIG;AACH,sCAHW,IAAI,0BAmBd;AAED;;;GAGG;AACH,oCAFW,IAAI,0BAuCd;AAED;;;;GAIG;AACH,yCAHW,IAAI,OAKd;AA1JD;;GAEG;AACH,8CAA+C;AAE/C;;GAEG;AACH,+CAAuF;AAEvF;;GAEG;AACH,oCAAgE;;;;;;;;qCAjB3B,oBAAoB"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../js/ui/dialog.js"],"names":[],"mappings":"AA4DA;;GAEG;AACH,gDAEC;AAED;;;GAGG;AACH,6BAqBC;AAED;;;;GAIG;AACH,sCAHW,IAAI,0BA2Bd;AAED;;;GAGG;AACH,oCAFW,IAAI,0BAmDd;AAED;;;;GAIG;AACH,yCAHW,IAAI,OAKd;AAnLD;;GAEG;AACH,8CAA+C;AAE/C;;GAEG;AACH,+CAAuF;AAEvF;;GAEG;AACH,oCAAgE;;;;;;;;;qCAjB3B,oBAAoB"}