@ulu/frontend 0.0.23 → 0.1.0-beta.1

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 (212) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/deprecated/js/drupal-programmatic-modal.js +91 -0
  3. package/{js/ui/modals.js → deprecated/js/micromodal-modals.js} +41 -67
  4. package/dist/ulu-frontend.min.css +1 -1
  5. package/dist/ulu-frontend.min.js +70 -1
  6. package/index.js +6 -1
  7. package/js/events/index.js +58 -7
  8. package/js/index.js +3 -7
  9. package/js/{helpers/css-breakpoint.js → ui/breakpoints.js} +9 -11
  10. package/js/ui/collapsible.js +195 -0
  11. package/js/ui/dialog.js +157 -0
  12. package/js/ui/dialog.todo +37 -0
  13. package/js/ui/flipcard.js +55 -11
  14. package/js/ui/grid.js +2 -47
  15. package/js/ui/index.js +21 -0
  16. package/js/ui/modal-builder.js +197 -0
  17. package/js/ui/overflow-scroller-pager.js +1 -1
  18. package/js/ui/overflow-scroller.js +8 -5
  19. package/js/ui/page.js +14 -0
  20. package/js/ui/popover.js +135 -0
  21. package/js/ui/print-details.js +44 -0
  22. package/js/ui/print.js +67 -0
  23. package/js/ui/programmatic-modal.js +79 -81
  24. package/js/ui/proxy-click.js +80 -0
  25. package/js/ui/resizer.js +3 -3
  26. package/js/ui/scroll-slider.js +56 -0
  27. package/js/ui/scrollpoint.js +300 -0
  28. package/js/ui/slider.js +72 -10
  29. package/js/ui/tabs.js +85 -58
  30. package/js/ui/theme-toggle.js +129 -0
  31. package/js/ui/tooltip.js +268 -67
  32. package/js/utils/{logger.js → class-logger.js} +6 -5
  33. package/js/utils/dom.js +122 -0
  34. package/js/utils/file-save.js +67 -0
  35. package/js/utils/floating-ui.js +83 -0
  36. package/js/utils/id.js +22 -0
  37. package/js/utils/index.js +7 -0
  38. package/js/{helpers → utils}/pause-youtube-video.js +1 -1
  39. package/package.json +33 -13
  40. package/resources/drupal/twig-macros/accordion.twig +99 -0
  41. package/resources/drupal/twig-macros/dropdown.twig +44 -0
  42. package/resources/drupal/twig-macros/flipcard.twig +69 -0
  43. package/resources/drupal/twig-macros/image.twig +30 -0
  44. package/resources/drupal/twig-macros/layout.twig +338 -0
  45. package/resources/drupal/twig-macros/slider.twig +214 -0
  46. package/resources/drupal/twig-macros/tabs.twig +84 -0
  47. package/scss/README.md +13 -1
  48. package/scss/_breakpoint.scss +69 -26
  49. package/scss/_button.scss +148 -57
  50. package/scss/_color.scss +46 -28
  51. package/scss/_cssvar.scss +103 -12
  52. package/scss/_element.scss +84 -67
  53. package/scss/_index.scss +0 -3
  54. package/scss/_layout.scss +57 -26
  55. package/scss/_path.scss +2 -2
  56. package/scss/_selector.scss +20 -11
  57. package/scss/_typography.scss +115 -82
  58. package/scss/_units.scss +14 -13
  59. package/scss/_utils.scss +280 -18
  60. package/scss/base/_color.scss +2 -1
  61. package/scss/base/_elements.scss +61 -35
  62. package/scss/base/_index.scss +60 -23
  63. package/scss/base/_keyframes.scss +115 -16
  64. package/scss/base/_layout.scss +10 -6
  65. package/scss/base/_normalize.scss +6 -122
  66. package/scss/base/_print.scss +49 -0
  67. package/scss/base/_root.scss +28 -0
  68. package/scss/base/_typography.scss +4 -1
  69. package/scss/components/_accordion.scss +217 -0
  70. package/scss/components/_adaptive-spacing.scss +148 -0
  71. package/scss/components/_badge.scss +17 -14
  72. package/scss/components/_button-verbose.scss +138 -0
  73. package/scss/components/_button.scss +9 -4
  74. package/scss/components/_callout.scss +175 -0
  75. package/scss/components/_captioned-figure.scss +173 -0
  76. package/scss/components/_card-grid.scss +75 -0
  77. package/scss/components/_card.scss +420 -0
  78. package/scss/components/_css-icon.scss +433 -0
  79. package/scss/{_grid.scss → components/_data-grid.scss} +100 -68
  80. package/scss/components/_data-table.scss +180 -0
  81. package/scss/components/_fill-context.scss +20 -22
  82. package/scss/components/_flipcard-grid.scss +66 -0
  83. package/scss/components/_flipcard.scss +304 -0
  84. package/scss/components/_form-theme.scss +633 -0
  85. package/scss/components/_hero.scss +183 -0
  86. package/scss/components/_horizontal-rule.scss +51 -0
  87. package/scss/components/_image-grid.scss +71 -0
  88. package/scss/components/_index.scss +276 -38
  89. package/scss/components/_links.scss +1 -1
  90. package/scss/components/_list-lines.scss +14 -3
  91. package/scss/components/_list-ordered.scss +3 -1
  92. package/scss/components/_list-unordered.scss +3 -1
  93. package/scss/components/_menu-stack.scss +245 -0
  94. package/scss/components/_modal.scss +495 -0
  95. package/scss/components/_nav-strip.scss +148 -0
  96. package/scss/components/_overlay-section.scss +122 -0
  97. package/scss/components/_pager.scss +168 -0
  98. package/scss/components/_placeholder-block.scss +121 -0
  99. package/scss/components/_popover.scss +263 -0
  100. package/scss/components/_pull-quote.scss +111 -0
  101. package/scss/components/_ratio-box.scss +64 -0
  102. package/scss/components/_rule.scss +12 -9
  103. package/scss/components/_scroll-slider.scss +204 -0
  104. package/scss/components/_skip-link.scss +92 -0
  105. package/scss/components/_slider.scss +241 -0
  106. package/scss/components/_spoke-spinner.scss +193 -0
  107. package/scss/components/_tabs.scss +179 -0
  108. package/scss/components/_tag.scss +156 -0
  109. package/scss/components/_tile-button.scss +131 -0
  110. package/scss/components/_tile-grid-overlay.scss +132 -0
  111. package/scss/components/_tile-grid.scss +172 -0
  112. package/scss/components/_vignette.scss +65 -0
  113. package/scss/components/_wysiwyg.scss +94 -0
  114. package/scss/helpers/_color.scss +1 -0
  115. package/scss/helpers/_display.scss +2 -1
  116. package/scss/helpers/_index.scss +45 -22
  117. package/scss/helpers/_print.scss +20 -43
  118. package/scss/helpers/_typography.scss +3 -0
  119. package/scss/helpers/_units.scss +10 -13
  120. package/scss/helpers/_utilities.scss +5 -1
  121. package/scss/stylesheets/base-styles.scss +7 -0
  122. package/scss/stylesheets/component-styles.scss +7 -0
  123. package/scss/stylesheets/helper-styles.scss +7 -0
  124. package/types/events/index.d.ts +1 -1
  125. package/types/events/index.d.ts.map +1 -1
  126. package/types/index.d.ts +2 -2
  127. package/types/{helpers/css-breakpoint.d.ts → ui/breakpoints.d.ts} +3 -3
  128. package/types/ui/breakpoints.d.ts.map +1 -0
  129. package/types/ui/collapsible.d.ts +67 -0
  130. package/types/ui/collapsible.d.ts.map +1 -0
  131. package/types/ui/dialog.d.ts +42 -0
  132. package/types/ui/dialog.d.ts.map +1 -0
  133. package/types/ui/flipcard.d.ts +8 -1
  134. package/types/ui/flipcard.d.ts.map +1 -1
  135. package/types/ui/grid.d.ts +0 -11
  136. package/types/ui/grid.d.ts.map +1 -1
  137. package/types/ui/index.d.ts +23 -0
  138. package/types/ui/index.d.ts.map +1 -0
  139. package/types/ui/modal-builder.d.ts +54 -0
  140. package/types/ui/modal-builder.d.ts.map +1 -0
  141. package/types/ui/overflow-scroller-pager.d.ts +1 -1
  142. package/types/ui/overflow-scroller-pager.d.ts.map +1 -1
  143. package/types/ui/overflow-scroller.d.ts +3 -1
  144. package/types/ui/overflow-scroller.d.ts.map +1 -1
  145. package/types/ui/page.d.ts +5 -0
  146. package/types/ui/page.d.ts.map +1 -0
  147. package/types/ui/popover.d.ts +40 -0
  148. package/types/ui/popover.d.ts.map +1 -0
  149. package/types/ui/print-details.d.ts +10 -0
  150. package/types/ui/print-details.d.ts.map +1 -0
  151. package/types/ui/print.d.ts +10 -0
  152. package/types/ui/print.d.ts.map +1 -0
  153. package/types/ui/programmatic-modal.d.ts +19 -1
  154. package/types/ui/programmatic-modal.d.ts.map +1 -1
  155. package/types/ui/proxy-click.d.ts +18 -0
  156. package/types/ui/proxy-click.d.ts.map +1 -0
  157. package/types/ui/resizer.d.ts +1 -1
  158. package/types/ui/resizer.d.ts.map +1 -1
  159. package/types/ui/scroll-slider.d.ts +13 -0
  160. package/types/ui/scroll-slider.d.ts.map +1 -0
  161. package/types/ui/scrollpoint.d.ts +133 -0
  162. package/types/ui/scrollpoint.d.ts.map +1 -0
  163. package/types/ui/slider.d.ts +14 -2
  164. package/types/ui/slider.d.ts.map +1 -1
  165. package/types/ui/tabs.d.ts +22 -0
  166. package/types/ui/tabs.d.ts.map +1 -1
  167. package/types/ui/theme-toggle.d.ts +14 -0
  168. package/types/ui/theme-toggle.d.ts.map +1 -0
  169. package/types/ui/tooltip.d.ts +92 -10
  170. package/types/ui/tooltip.d.ts.map +1 -1
  171. package/types/utils/{logger.d.ts → class-logger.d.ts} +1 -1
  172. package/types/utils/class-logger.d.ts.map +1 -0
  173. package/types/utils/dom.d.ts +48 -0
  174. package/types/utils/dom.d.ts.map +1 -0
  175. package/types/utils/file-save.d.ts +64 -0
  176. package/types/utils/file-save.d.ts.map +1 -0
  177. package/types/utils/floating-ui.d.ts +19 -0
  178. package/types/utils/floating-ui.d.ts.map +1 -0
  179. package/types/utils/id.d.ts +10 -0
  180. package/types/utils/id.d.ts.map +1 -0
  181. package/types/utils/index.d.ts +9 -0
  182. package/types/utils/index.d.ts.map +1 -0
  183. package/types/utils/pause-youtube-video.d.ts.map +1 -0
  184. package/js/helpers/file-save.js +0 -52
  185. package/js/helpers/scrollbar-width-property.js +0 -14
  186. package/project.todo +0 -22
  187. package/scss/_calculate.scss +0 -64
  188. package/scss/_utility.scss +0 -12
  189. package/types/helpers/css-breakpoint.d.ts.map +0 -1
  190. package/types/helpers/file-save.d.ts +0 -17
  191. package/types/helpers/file-save.d.ts.map +0 -1
  192. package/types/helpers/node-data-manager.d.ts +0 -45
  193. package/types/helpers/node-data-manager.d.ts.map +0 -1
  194. package/types/helpers/pause-youtube-video.d.ts.map +0 -1
  195. package/types/helpers/scrollbar-width-property.d.ts +0 -11
  196. package/types/helpers/scrollbar-width-property.d.ts.map +0 -1
  197. package/types/ui/modals.d.ts +0 -27
  198. package/types/ui/modals.d.ts.map +0 -1
  199. package/types/utils/logger.d.ts.map +0 -1
  200. package/vite.config.js +0 -36
  201. /package/{js/deprecated → deprecated/js}/doc-ready.js +0 -0
  202. /package/{js/deprecated → deprecated/js}/jquery-prototypes.js +0 -0
  203. /package/{js/deprecated → deprecated/js}/mini-collapsible-popper-positioning.js +0 -0
  204. /package/{js/deprecated → deprecated/js}/mini-collapsible.js +0 -0
  205. /package/{js/helpers → deprecated/js}/node-data-manager.js +0 -0
  206. /package/{js/deprecated → deprecated/js}/script-loader.js +0 -0
  207. /package/{js/deprecated → deprecated/js}/waypoints/README.md +0 -0
  208. /package/{js/deprecated → deprecated/js}/waypoints/anchor-menu.js +0 -0
  209. /package/{js/deprecated → deprecated/js}/waypoints/element-waypoint.js +0 -0
  210. /package/{js/deprecated → deprecated/js}/waypoints/examples/page-link-menu.md +0 -0
  211. /package/{js/deprecated → deprecated/js}/waypoints/state-in-attribute.js +0 -0
  212. /package/types/{helpers → utils}/pause-youtube-video.d.ts +0 -0
@@ -0,0 +1,94 @@
1
+ ////
2
+ /// @group wysiwyg
3
+ ////
4
+ /// For auto formatting general HTML elements (used around editor/body text). This selector can't currently be changed.
5
+
6
+ @use "sass:list";
7
+ @use "sass:map";
8
+
9
+ @use "../element";
10
+ @use "../typography";
11
+ @use "../utils";
12
+
13
+
14
+ /// Module Settings
15
+ /// @type Map
16
+ /// @prop {List} img-excluded-selectors [(".wysiwyg__exclude",)]
17
+ /// @prop {List} ul-excluded-selectors [(".list-lines", ".wysiwyg__exclude")]
18
+ /// @prop {Map} headline-sizes [Map]
19
+
20
+ $config: (
21
+ "img-excluded-selectors" : (".wysiwyg__exclude",),
22
+ "ul-excluded-selectors" : (".list-lines", ".wysiwyg__exclude"),
23
+ "headline-sizes" : (
24
+ "h2" : "h2",
25
+ "h3" : "h3",
26
+ "h4" : "h4",
27
+ "h5" : "h5",
28
+ "h6" : "h6",
29
+ )
30
+ ) !default;
31
+
32
+ /// Change modules $config
33
+ /// @param {Map} $changes Map of changes
34
+ /// @example scss
35
+ /// @include ulu.component-wysiwyg-set(( "property" : value ));
36
+
37
+ @mixin set($changes) {
38
+ $config: map.merge($config, $changes) !global;
39
+ }
40
+
41
+ /// Get a config option
42
+ /// @param {Map} $name Name of property
43
+ /// @example scss
44
+ /// @include ulu.component-wysiwyg-get("property");
45
+
46
+ @function get($name) {
47
+ @return utils.require-map-get($config, $name, "component-wysiwyg [config]");
48
+ }
49
+
50
+ /// Output component stylesheet
51
+ /// - Note this is setup so that it can be used for separate stylesheets (ie. tinyMCE or ckeditor)
52
+ /// @example scss
53
+ /// @include ulu.component-wysiwyg-styles(true);
54
+ /// // Output not in selector (for editor stylesheet/preview)
55
+ /// @include ulu.component-wysiwyg-styles(false);
56
+
57
+ @mixin styles($in-selector: true) {
58
+ @if ($in-selector) {
59
+ .wysiwyg {
60
+ @include _styles;
61
+ }
62
+ } @else {
63
+ @include _styles;
64
+ }
65
+ }
66
+
67
+ // Internal mixin
68
+ @mixin _styles() {
69
+ $ul-excludes: list.join(get("ul-excluded-selectors"), (), $separator: comma);
70
+ $img-excludes: list.join(get("img-excluded-selectors"), (), $separator: comma);
71
+
72
+ a:not([class]) {
73
+ @include element.link($visited: true, $active: true);
74
+ }
75
+ ul:not(#{ $ul-excludes }) {
76
+ @include element.styles-unordered-list();
77
+ }
78
+ ol {
79
+ @include element.styles-ordered-list(inherit);
80
+ }
81
+ ul,
82
+ ol {
83
+ margin-bottom: element.get("margin");
84
+ }
85
+ @each $element, $size in get("headline-sizes") {
86
+ #{ $element } {
87
+ @include typography.size($size);
88
+ }
89
+ }
90
+ img:not(#{ $img-excludes }) {
91
+ margin-bottom: element.get("margin");
92
+ margin-top: element.get("margin");
93
+ }
94
+ }
@@ -1,5 +1,6 @@
1
1
  ////
2
2
  /// @group color
3
+ /// Output color helper classes
3
4
  ////
4
5
 
5
6
  @use "../utils";
@@ -1,17 +1,18 @@
1
1
  ////
2
2
  /// @group display
3
+ /// Output display related helper stylesheet
3
4
  ////
4
5
 
5
6
  @use "sass:map";
6
7
 
7
8
  @use "../utils";
8
- @use "../utility";
9
9
  @use "../layout";
10
10
  @use "../element";
11
11
  @use "../breakpoint";
12
12
  @use "../selector";
13
13
 
14
14
  /// Print utilities helper styles
15
+ /// - Such as hidden, display-block, hidden-visually, and display helpers that for all breakpoints
15
16
  /// @example scss
16
17
  /// @include ulu.helper-display-styles();
17
18
 
@@ -1,5 +1,6 @@
1
1
  ////
2
- /// @group all
2
+ /// @group index
3
+ /// Outputs helper stylesheets (overriding stylesheets that should be output after base and components)
3
4
  ////
4
5
 
5
6
  @forward "typography" as typography-*;
@@ -9,7 +10,8 @@
9
10
  @forward "units" as units-*;
10
11
  @forward "color" as color-*;
11
12
 
12
- @use "sass:map";
13
+ @use "sass:list";
14
+
13
15
  @use "../utils";
14
16
  @use "typography";
15
17
  @use "display";
@@ -18,45 +20,66 @@
18
20
  @use "print";
19
21
  @use "color";
20
22
 
21
- // Used to check against user's includes
23
+ /// Default includes, all modules
24
+ /// @type List
22
25
 
23
- $-all-includes: (
24
- "typography" : true,
25
- "units" : true,
26
- "display" : true,
27
- "utilities" : true,
28
- "print" : true,
29
- "color" : true
26
+ $all-includes: (
27
+ "typography",
28
+ "units",
29
+ "display",
30
+ "utilities",
31
+ "print",
32
+ "color"
30
33
  );
31
34
 
35
+ /// Current included modules (for output when using styles), defaults to all
36
+ /// @type List
37
+
38
+ $current-includes: $all-includes;
39
+
40
+ /// Change default includes (when user prints modules)
41
+ /// - This available as configuration so that it can be configured (to allow easily copying configuration)
42
+ /// @param {List} $includes List of modules by name to be included when styles are printed
43
+
44
+ @mixin set-includes($includes) {
45
+ @include utils.require-list-contains($all-includes, $includes, "helpers.set-includes", true);
46
+ $current-includes: $includes !global;
47
+ }
48
+
49
+ /// Exclude certain items from includes
50
+ /// @param {List} $excludes List of item names
51
+
52
+ @mixin set-excludes($excludes) {
53
+ $current-includes: utils.list-without($current-includes, $excludes) !global;
54
+ }
55
+
32
56
  /// Prints all Helper styles
33
57
  /// @name helper-styles
34
- /// @param {List} $includes AA list of changes to this module's includes
58
+ /// @param {List} $includes [$all-includes] A list of components to include (defaults to all)
35
59
  /// @example scss
36
60
  /// @include ulu.helper-styles();
37
61
 
38
- @mixin styles($includes: null) {
62
+ @mixin styles($includes: $current-includes) {
39
63
  @include utils.file-header("helpers");
40
- @if $includes {
41
- @include utils.require-list-contains($-all-includes, $includes);
42
- $-all-includes: map.merge($-all-includes, $includes) !global;
43
- }
44
- @if (map.get($-all-includes, "typography")) {
64
+
65
+ @include utils.require-list-contains($all-includes, $includes, "helpers.$includes", true);
66
+
67
+ @if (list.index($includes, "typography")) {
45
68
  @include typography.styles;
46
69
  }
47
- @if (map.get($-all-includes, "units")) {
70
+ @if (list.index($includes, "units")) {
48
71
  @include units.styles;
49
72
  }
50
- @if (map.get($-all-includes, "display")) {
73
+ @if (list.index($includes, "display")) {
51
74
  @include display.styles;
52
75
  }
53
- @if (map.get($-all-includes, "utilities")) {
76
+ @if (list.index($includes, "utilities")) {
54
77
  @include utilities.styles;
55
78
  }
56
- @if (map.get($-all-includes, "print")) {
79
+ @if (list.index($includes, "print")) {
57
80
  @include print.styles;
58
81
  }
59
- @if (map.get($-all-includes, "color")) {
82
+ @if (list.index($includes, "color")) {
60
83
  @include color.styles;
61
84
  }
62
85
  }
@@ -1,58 +1,35 @@
1
1
  ////
2
2
  /// @group print
3
+ /// Output print helper stylesheet
3
4
  ////
4
5
 
5
6
  /// Printed Media Styles
7
+ /// - Includes (.print-exact, .no-print, .print-only, .print-invert)
6
8
  /// @example scss
7
9
  /// @include ulu.helper-print-styles();
8
10
 
9
11
  @mixin styles {
10
- // Note: this is an old framework stylesheet (may be outdated)
11
- @media (print) {
12
- .no-print {
13
- display: none;
14
- }
15
- * {
16
- background: transparent !important;
17
- color: black !important;
18
- box-shadow: none !important;
19
- text-shadow: none !important;
20
- filter: none !important;
21
- }
22
-
23
- /* Black prints faster: h5bp.com/s */
24
- a,
25
- a:visited {
26
- text-decoration: underline;
27
- }
28
-
29
- /* Don't show links for images, or javascript/internal links */
30
- pre,
31
- blockquote {
32
- border: 1px solid #999;
33
- page-break-inside: avoid;
34
- }
35
12
 
36
- /*thead {
37
- display: table-header-group;
38
- }*/
39
-
40
- /* h5bp.com/t */
41
- tr, img {
42
- page-break-inside: avoid;
43
- }
44
- img {
45
- max-width: 100% !important;
13
+ .print-exact {
14
+ print-color-adjust: exact;
15
+ -webkit-print-color-adjust: exact;
16
+ }
17
+ .no-print {
18
+ @media print {
19
+ display: none !important;
46
20
  }
47
- p,
48
- h2,
49
- h3 {
50
- orphans: 3;
51
- widows: 3;
21
+ }
22
+ .print-only {
23
+ @media screen {
24
+ display: none !important;
52
25
  }
53
- h2,
54
- h3 {
55
- page-break-after: avoid;
26
+ }
27
+ // Utility for making dark backgrounds print "ok"
28
+ // - Grayscale added because colors are flipped
29
+ // - Rotating colors doesn't really work
30
+ .print-invert {
31
+ @media print {
32
+ filter: invert(1) saturate(0);
56
33
  }
57
34
  }
58
35
  }
@@ -1,5 +1,6 @@
1
1
  ////
2
2
  /// @group typography
3
+ /// Output all typography helper classes
3
4
  ////
4
5
 
5
6
  @use "sass:map";
@@ -8,6 +9,8 @@
8
9
  @use "../typography";
9
10
 
10
11
  /// Prints Typography Helper styles
12
+ /// - Outputs all typography sizes that specify "helper-class"
13
+ /// - Outputs general typography helper classes (.type-bold, .line-height-dense, etc)
11
14
  /// @example scss
12
15
  /// @include ulu.helper-typography-styles();
13
16
  /// @example html {preview} Example of type size as helper prefixed
@@ -1,5 +1,6 @@
1
1
  ////
2
2
  /// @group units
3
+ /// Output unit helper stylesheet
3
4
  ////
4
5
 
5
6
  @use "sass:map";
@@ -10,7 +11,7 @@
10
11
 
11
12
  /// Module Settings
12
13
  /// @type Map
13
- /// @prop {Number} $config.sides Sides to print for helper classes (ie. reduce output of uneeded sides)
14
+ /// @prop {Number} $config.sides Sides to print for helper classes (ie. reduce output of unneeded sides)
14
15
 
15
16
  $config: (
16
17
  "sides": ("top", "bottom", "left", "right")
@@ -18,22 +19,23 @@ $config: (
18
19
 
19
20
  /// Change modules $config
20
21
  /// @param {Map} $changes Map of changes
21
- /// @example scss - General example, replace module-name with module's name
22
- /// @include module-name.set(( "property" : value ));
22
+ /// @example scss - General example
23
+ /// @include ulu.helper-units-set(( "property" : value ));
24
+
23
25
  @mixin set($changes) {
24
26
  $config: map.merge($config, $changes) !global;
25
27
  }
26
28
 
27
29
  /// Get a config option
28
30
  /// @param {Map} $name Name of property
29
- /// @example scss - General example, replace module-name with module's name
30
- /// @include module-name.get("property");
31
+ /// @example scss - General example
32
+ /// @include ulu.helper-units-get("property");
31
33
 
32
34
  @function get($name) {
33
35
  @return utils.require-map-get($config, $name, "units [config]");
34
36
  }
35
37
 
36
- /// Prints all unit helper classes
38
+ /// Output all unit helper classes
37
39
 
38
40
  @mixin styles {
39
41
  @include utils.file-header('helpers', 'leading');
@@ -42,7 +44,8 @@ $config: (
42
44
  }
43
45
 
44
46
  /// Creates the unit classes with all variations (from unit presets)
45
- /// - This can be used by itself if not outputing .styles() or if you wanted to change the default prefixes
47
+ /// - This can be used by itself if not outputting .styles() or if you wanted to change the default prefixes
48
+
46
49
  @mixin create-property-classes($property, $prefix, $isMargin: false) {
47
50
  // On all sides
48
51
  #{ $prefix } {
@@ -60,12 +63,6 @@ $config: (
60
63
  #{ $prefix }-#{ $side } {
61
64
  #{ $full-prop }: units.get(1);
62
65
  }
63
- // Duplicates utilities, unnessasary
64
- // @if ($isMargin) {
65
- // #{ $prefix }-#{ $side }-auto {
66
- // #{ $full-prop }: auto;
67
- // }
68
- // }
69
66
  @each $name, $value in units.$config {
70
67
  #{ $prefix }-#{ $side }-#{ $name } {
71
68
  #{ $full-prop }: units.get($name);
@@ -1,12 +1,13 @@
1
1
  ////
2
2
  /// @group utilities
3
+ /// Output general utility helper classes
3
4
  ////
4
5
 
5
6
  @use "../utils";
6
- @use "../utility";
7
7
  @use "../layout";
8
8
 
9
9
  /// Print utilities helper styles
10
+ /// - Includes classes like (.crop-margins, .no-scroll-y, .image-full-width, etc)
10
11
  /// @example scss
11
12
  /// @include ulu.helper-utilities-styles();
12
13
 
@@ -104,6 +105,9 @@
104
105
  .align-self-baseline {
105
106
  align-self: baseline;
106
107
  }
108
+ .overflow-hidden {
109
+ overflow: hidden;
110
+ }
107
111
  // .justify-self-center {
108
112
  // justify-self: center;
109
113
  // }
@@ -0,0 +1,7 @@
1
+ ////
2
+ /// @group base
3
+ /// This module prints base styles, providing a convenient way to include them in stylesheets via @use. It offers the same functionality as the base-styles() mixin. hello worlds
4
+ ////
5
+
6
+ @use "../base";
7
+ @include base.styles();
@@ -0,0 +1,7 @@
1
+ ////
2
+ /// @group components
3
+ /// This module prints component styles, providing a convenient way to include them in stylesheets via @use. It offers the same functionality as the component-styles() mixin.
4
+ ////
5
+
6
+ @use "../components";
7
+ @include components.styles();
@@ -0,0 +1,7 @@
1
+ ////
2
+ /// @group helpers
3
+ /// This module prints helper styles, providing a convenient way to include them in stylesheets via @use. It offers the same functionality as the helper-styles() mixin.
4
+ ////
5
+
6
+ @use "../helpers";
7
+ @include helpers.styles();
@@ -9,7 +9,7 @@
9
9
  */
10
10
  export function dispatch(type: string, context: Node): void;
11
11
  /**
12
- * Handles the actual event names being used (future could namespace)
12
+ * Namespaced event
13
13
  * @param {String} type Type of event to get the actual event name for
14
14
  * @returns {String}
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/events/index.js"],"names":[],"mappings":"AAoBA;;;;;;;;GAQG;AACH,gDANW,IAAI,QAYd;AAED;;;;GAIG;AACH,8CAEC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/events/index.js"],"names":[],"mappings":"AA6CA;;;;;;;;GAQG;AACH,gDANW,IAAI,QAYd;AAED;;;;GAIG;AACH,8CAEC"}
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { CssBreakpoints } from "./helpers/css-breakpoint.js";
2
1
  export * as events from "./events/index.js";
3
- export * as grid from "./ui/grid.js";
2
+ export * as ui from "./ui/index.js";
3
+ export * as utils from "./utils/index.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -3,7 +3,7 @@
3
3
  * Class that provides method for retrieving and acting on breakpoints passed
4
4
  * from CSS (using element psuedo content prop)
5
5
  */
6
- export class CssBreakpoints {
6
+ export class BreakpointManager {
7
7
  static instances: any[];
8
8
  static defaults: {
9
9
  element: HTMLElement;
@@ -70,7 +70,6 @@ export class CssBreakpoints {
70
70
  */
71
71
  at(name: string): Breakpoint;
72
72
  }
73
- export default CssBreakpoints;
74
73
  /**
75
74
  * @class
76
75
  * Single breakpoint management
@@ -153,4 +152,5 @@ declare class BreakpointDirection {
153
152
  */
154
153
  remove(handler: any): void;
155
154
  }
156
- //# sourceMappingURL=css-breakpoint.d.ts.map
155
+ export {};
156
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../js/ui/breakpoints.js"],"names":[],"mappings":"AAeA;;;;GAIG;AACH;IACE,wBAAsB;IACtB;;;;;;;MAOC;IACD;;;;;;;OAOG;IACH;QANyB,KAAK;QACL,cAAc;QACd,eAAe;QAChB,OAAO,EAApB,IAAI;QACW,cAAc;OAevC;IAXC,YAAkB;IAClB,cAAoB;IACpB,iBAAuB;IACvB,wBAA2B;IAC3B,mBAAyB;IACzB,gBAAqB;IACrB,yBAA2B;IAM7B;;;;;OAKG;IACH,mCAEC;IACD;;;OAGG;IACH,yCAEC;IACD;;OAEG;IACH,gCAEC;IACD;;OAEG;IACH,kCAEC;IACD;;OAEG;IACH,wBAMC;IACD;;OAEG;IACH,eA6CC;IACD;;;;OAIG;IACH,kBAFY,UAAU,CAQrB;CACF;AAsED;;;GAGG;AACH;IACE,qCAQC;IAPC;;;;MAIC;IACD,cAAuB;IACvB,UAAgB;IAElB;;;;;OAKG;IACH,wDAEC;IACD;;;;;OAKG;IACH,6BAEC;IACD;;;;;OAKG;IACH,6BAEC;IACD;;;OAGG;IACH,8BAEC;IACD;;;;OAIG;IACH,mDAGC;IAED,yBAGC;CACF;AAnID;;;GAGG;AACH;IACE,6CAMC;IALC,eAA0B;IAC1B,gBAAmB;IACnB,UAAY;IACZ,WAAa;IACb,gBAA4B;IAE9B;;OAEG;IACH,sBAMC;IACD;;OAEG;IACH,4BAIC;IACD;;OAEG;IACH,+BAEC;IACD;;;;;OAKG;IACH,aAJW,cAAe,QAiBzB;IACD;;OAEG;IACH,2BAQC;CACF"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Class for accessible hide/show components
3
+ */
4
+ export class Collapsible {
5
+ static defaults: {
6
+ clickOutsideCloses: boolean;
7
+ focusoutCloses: boolean;
8
+ escapeCloses: boolean;
9
+ /**
10
+ * The module won't attach the handlers (you need to do it yourself)
11
+ */
12
+ selfManaged: boolean;
13
+ /**
14
+ * This collapsible starts in open state
15
+ */
16
+ startOpen: boolean;
17
+ /**
18
+ * Open/active state class
19
+ */
20
+ openClass: string;
21
+ /**
22
+ * Output debug info
23
+ */
24
+ debug: boolean;
25
+ onChange(_ctx: any): void;
26
+ };
27
+ /**
28
+ * @param {Object} elements Elements object
29
+ * @param {Node} elements.trigger Trigger button/element that opens/closes collapsible
30
+ * @param {Node} elements.content The content element that the trigger reveals
31
+ * @param {Object} config Configuration options (see defaults)
32
+ * @returns {Object} Collapsible instance
33
+ */
34
+ constructor(elements: {
35
+ trigger: Node;
36
+ content: Node;
37
+ }, config: any);
38
+ elements: {
39
+ trigger: Node;
40
+ content: Node;
41
+ };
42
+ options: any;
43
+ isOpen: boolean;
44
+ handlers: {};
45
+ attachHandlers(): void;
46
+ clickHandler: (event: any) => void;
47
+ focusoutHandler: (event: any) => void;
48
+ removeHandlers(): void;
49
+ onClick(event: any): void;
50
+ destroy(): void;
51
+ debugLog(...msgs: any[]): void;
52
+ setup(): void;
53
+ createEvent(name: any, detail: any): CustomEvent<any>;
54
+ setState(isOpen: any, event: any): void;
55
+ /**
56
+ * Setup handlers needed for closing once open
57
+ */
58
+ setupTemporaryHandlers(): void;
59
+ /**
60
+ * Destroy handlers attached for closing once open
61
+ */
62
+ destroyTemporaryHandlers(): void;
63
+ open(event: any): void;
64
+ close(event: any): void;
65
+ toggle(event: any): void;
66
+ }
67
+ //# sourceMappingURL=collapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../js/ui/collapsible.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;IACE;;;;QAME;;WAEG;;QAGH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;MAKH;IACF;;;;;;OAMG;IACH;QAL0B,OAAO,EAAtB,IAAI;QACW,OAAO,EAAtB,IAAI;oBAsBd;IAXC;iBAZS,IAAI;iBACJ,IAAI;MAWW;IACxB,aAAsB;IACtB,gBAAmB;IACnB,aAAkB;IASpB,uBAaC;IAVC,mCAEC;IACD,sCAIC;IAIH,uBAIC;IACD,0BAEC;IACD,gBAGC;IACD,+BAIC;IACD,cAOC;IACD,sDAEC;IACD,wCAqBC;IACD;;OAEG;IACH,+BAoBC;IACD;;OAEG;IACH,iCAQC;IACD,uBAEC;IACD,wBAEC;IACD,yBAEC;CAqBF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @param {Object} options Change options used as default for dialogs, can then be overriden by data attribute settings on element
3
+ */
4
+ export function setDefaults(options: any): void;
5
+ /**
6
+ * Initialize everything in document
7
+ * - This will only initialize elements once, it is safe to call on page changes
8
+ */
9
+ export function init(): void;
10
+ /**
11
+ * Setup dialogs and triggers
12
+ */
13
+ export function setup(): void;
14
+ /**
15
+ * Setup click handlers on a trigger
16
+ * @param {Node} trigger
17
+ */
18
+ export function setupTrigger(trigger: Node): void;
19
+ /**
20
+ * Setup click handlers for a dialog
21
+ * @param {Node} dialog
22
+ */
23
+ export function setupDialog(dialog: Node): void;
24
+ /**
25
+ * For a given dialog, get it's options (from data attribute)
26
+ * @param {Node} dialog
27
+ * @returns {Object}
28
+ */
29
+ export function getDialogOptions(dialog: Node): any;
30
+ export namespace attrs {
31
+ let init: string;
32
+ let dialog: string;
33
+ let trigger: string;
34
+ let close: string;
35
+ }
36
+ export namespace defaults {
37
+ let nonModal: boolean;
38
+ let documentEnd: boolean;
39
+ let clickOutsideCloses: boolean;
40
+ let pauseVideos: boolean;
41
+ }
42
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../js/ui/dialog.js"],"names":[],"mappings":"AAkDA;;GAEG;AACH,gDAEC;AAED;;;GAGG;AACH,6BAGC;AAED;;GAEG;AACH,8BAOC;AAED;;;GAGG;AACH,sCAFW,IAAI,QAoBd;AAED;;;GAGG;AACH,oCAFW,IAAI,QA0Bd;AAED;;;;GAIG;AACH,yCAHW,IAAI,OAMd"}
@@ -1,3 +1,5 @@
1
+ export function init(): void;
2
+ export function setup(): void;
1
3
  export class Flipcard {
2
4
  static instances: any[];
3
5
  static defaults: {
@@ -34,5 +36,10 @@ export class Flipcard {
34
36
  containerCss(): string;
35
37
  panelCss(zIndex?: number): string;
36
38
  }
37
- export default Flipcard;
39
+ export namespace attrs {
40
+ let init: string;
41
+ let flipcard: string;
42
+ let front: string;
43
+ let back: string;
44
+ }
38
45
  //# sourceMappingURL=flipcard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flipcard.d.ts","sourceRoot":"","sources":["../../js/ui/flipcard.js"],"names":[],"mappings":"AAgBA;IACE,wBAAsB;IACtB;;;;;;;MAOC;IACD,iFAgBC;IAZC,aAA2D;IAI3D,eAA+B;IAC/B;;;;MAA0C;IAC1C,gBAAmB;IACnB,YAA6D;IAC7D,kBAA0D;IAK5D,eAEC;IACD,cAqCC;IACD;;;OAGG;IACH;;aAQC;IACD,0BAGC;IACD,+BAIC;IACD,iCASC;IACD,uBAWC;IACD,kCAKC;CACF"}
1
+ {"version":3,"file":"flipcard.d.ts","sourceRoot":"","sources":["../../js/ui/flipcard.js"],"names":[],"mappings":"AAmJA,6BAGC;AAED,8BAGC;AAjJD;IACE,wBAAsB;IACtB;;;;;;;MAOE;IACF,iFAgBC;IAZC,aAA2D;IAI3D,eAA+B;IAC/B;;;;MAA0C;IAC1C,gBAAmB;IACnB,YAA6D;IAC7D,kBAA0D;IAK5D,eAEC;IACD,cAqCC;IACD;;;OAGG;IACH;;aAQC;IACD,0BAGC;IACD,+BAIC;IACD,iCASC;IACD,uBAWC;IACD,kCAKC;CACF"}
@@ -10,15 +10,4 @@ export function init(selector: string, classes: any): void;
10
10
  * @param {Object} classes Classes (optional) @see setPositionClasses
11
11
  */
12
12
  export function setup(selector: string, classes: any): void;
13
- /**
14
- * Sets up the positonal classes that would come from the equal
15
- * height module. Needs to be rerun by user when layout changes
16
- * or new instances are added to the screen
17
- * - Used for gutter crops
18
- * - Used for rule placement
19
- * - **Devs** Remember that default classes should match sass defaults
20
- * @param {Node} parent The grid parent <data-grid="">
21
- * @param {Object} classes Override the default equal heights classes
22
- */
23
- export function setPositionClasses(parent: Node, classes?: any): void;
24
13
  //# sourceMappingURL=grid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../js/ui/grid.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,2DAIC;AAED;;;;GAIG;AACH,4DAEC;AAED;;;;;;;;;GASG;AACH,2CAHa,IAAI,uBAqChB"}
1
+ {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../js/ui/grid.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,2DAIC;AAED;;;;GAIG;AACH,4DAEC"}