@ulu/frontend 0.2.0-beta.1 → 0.2.0-beta.11

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 (163) hide show
  1. package/dist/README.md +12 -0
  2. package/dist/{types/js → es}/core/component.d.ts +3 -9
  3. package/dist/es/core/component.d.ts.map +1 -0
  4. package/dist/es/core/component.js +134 -0
  5. package/dist/{types/js → es}/core/events.d.ts +1 -1
  6. package/dist/es/core/events.d.ts.map +1 -0
  7. package/dist/es/core/events.js +45 -0
  8. package/dist/es/core/index.d.ts +4 -0
  9. package/dist/{types/js/ui → es/core}/index.d.ts.map +1 -1
  10. package/dist/{types/js → es}/core/settings.d.ts +1 -1
  11. package/dist/es/core/settings.d.ts.map +1 -0
  12. package/dist/es/core/settings.js +44 -0
  13. package/dist/es/index.d.ts +4 -0
  14. package/dist/{types/js → es}/index.d.ts.map +1 -1
  15. package/dist/es/index.js +125 -0
  16. package/dist/{types/js → es}/ui/breakpoints.d.ts +5 -3
  17. package/dist/es/ui/breakpoints.d.ts.map +1 -0
  18. package/dist/es/ui/breakpoints.js +194 -0
  19. package/dist/{types/js → es}/ui/collapsible.d.ts +28 -7
  20. package/dist/es/ui/collapsible.d.ts.map +1 -0
  21. package/dist/es/ui/collapsible.js +140 -0
  22. package/dist/{types/js → es}/ui/details-group.d.ts +1 -1
  23. package/dist/es/ui/details-group.d.ts.map +1 -0
  24. package/dist/es/ui/details-group.js +49 -0
  25. package/dist/{types/js → es}/ui/dialog.d.ts +3 -3
  26. package/dist/es/ui/dialog.d.ts.map +1 -0
  27. package/dist/es/ui/dialog.js +112 -0
  28. package/dist/{types/js → es}/ui/flipcard.d.ts +1 -1
  29. package/dist/es/ui/flipcard.d.ts.map +1 -0
  30. package/dist/es/ui/flipcard.js +97 -0
  31. package/dist/{types/js → es}/ui/grid.d.ts +2 -2
  32. package/dist/es/ui/grid.d.ts.map +1 -0
  33. package/dist/es/ui/grid.js +18 -0
  34. package/dist/{types/js → es}/ui/index.d.ts +22 -21
  35. package/dist/{types/js/core → es/ui}/index.d.ts.map +1 -1
  36. package/dist/{types/js → es}/ui/modal-builder.d.ts +21 -16
  37. package/dist/es/ui/modal-builder.d.ts.map +1 -0
  38. package/dist/es/ui/modal-builder.js +136 -0
  39. package/dist/es/ui/overflow-scroller-pager.d.ts.map +1 -0
  40. package/dist/es/ui/overflow-scroller-pager.js +28 -0
  41. package/dist/{types/js → es}/ui/overflow-scroller.d.ts +3 -3
  42. package/dist/es/ui/overflow-scroller.d.ts.map +1 -0
  43. package/dist/es/ui/overflow-scroller.js +90 -0
  44. package/dist/es/ui/page.d.ts.map +1 -0
  45. package/dist/es/ui/page.js +7 -0
  46. package/dist/{types/js → es}/ui/popover.d.ts +3 -3
  47. package/dist/es/ui/popover.d.ts.map +1 -0
  48. package/dist/es/ui/popover.js +77 -0
  49. package/dist/es/ui/print-details.d.ts.map +1 -0
  50. package/dist/es/ui/print-details.js +22 -0
  51. package/dist/es/ui/print.d.ts.map +1 -0
  52. package/dist/es/ui/print.js +34 -0
  53. package/dist/{types/js → es}/ui/programmatic-modal.d.ts +1 -1
  54. package/dist/es/ui/programmatic-modal.d.ts.map +1 -0
  55. package/dist/es/ui/programmatic-modal.js +55 -0
  56. package/dist/{types/js → es}/ui/proxy-click.d.ts +4 -4
  57. package/dist/es/ui/proxy-click.d.ts.map +1 -0
  58. package/dist/es/ui/proxy-click.js +44 -0
  59. package/dist/{types/js → es}/ui/resizer.d.ts +16 -16
  60. package/dist/es/ui/resizer.d.ts.map +1 -0
  61. package/dist/es/ui/resizer.js +242 -0
  62. package/dist/{types/js → es}/ui/scroll-slider.d.ts +1 -1
  63. package/dist/es/ui/scroll-slider.d.ts.map +1 -0
  64. package/dist/es/ui/scroll-slider.js +29 -0
  65. package/dist/{types/js → es}/ui/scrollpoint.d.ts +79 -11
  66. package/dist/es/ui/scrollpoint.d.ts.map +1 -0
  67. package/dist/es/ui/scrollpoint.js +178 -0
  68. package/dist/{types/js → es}/ui/slider.d.ts +11 -8
  69. package/dist/es/ui/slider.d.ts.map +1 -0
  70. package/dist/es/ui/slider.js +290 -0
  71. package/dist/{types/js → es}/ui/tabs.d.ts +2 -2
  72. package/dist/es/ui/tabs.d.ts.map +1 -0
  73. package/dist/es/ui/tabs.js +64 -0
  74. package/dist/{types/js → es}/ui/theme-toggle.d.ts +4 -4
  75. package/dist/es/ui/theme-toggle.d.ts.map +1 -0
  76. package/dist/es/ui/theme-toggle.js +190 -0
  77. package/dist/{types/js → es}/ui/tooltip.d.ts +5 -5
  78. package/dist/es/ui/tooltip.d.ts.map +1 -0
  79. package/dist/es/ui/tooltip.js +184 -0
  80. package/dist/{types/js → es}/utils/class-logger.d.ts +4 -4
  81. package/dist/es/utils/class-logger.d.ts.map +1 -0
  82. package/dist/es/utils/class-logger.js +37 -0
  83. package/dist/es/utils/css.d.ts.map +1 -0
  84. package/dist/es/utils/css.js +6 -0
  85. package/dist/{types/js → es}/utils/dom.d.ts +1 -1
  86. package/dist/es/utils/dom.d.ts.map +1 -0
  87. package/dist/es/utils/dom.js +29 -0
  88. package/dist/es/utils/file-save.d.ts.map +1 -0
  89. package/dist/es/utils/file-save.js +46 -0
  90. package/dist/{types/js → es}/utils/floating-ui.d.ts +1 -1
  91. package/dist/es/utils/floating-ui.d.ts.map +1 -0
  92. package/dist/es/utils/floating-ui.js +46 -0
  93. package/dist/es/utils/font-awesome.d.ts.map +1 -0
  94. package/dist/es/utils/font-awesome.js +13 -0
  95. package/dist/es/utils/id.d.ts.map +1 -0
  96. package/dist/es/utils/id.js +11 -0
  97. package/dist/{types/js → es}/utils/index.d.ts +7 -7
  98. package/dist/{types/js → es}/utils/index.d.ts.map +1 -1
  99. package/dist/es/utils/pause-youtube-video.d.ts.map +1 -0
  100. package/dist/es/utils/pause-youtube-video.js +27 -0
  101. package/dist/umd/style.css +1 -0
  102. package/dist/umd/ulu-frontend.umd.js +70 -0
  103. package/lib/js/ui/breakpoints.js +13 -5
  104. package/lib/js/ui/index.js +4 -0
  105. package/lib/js/ui/modal-builder.js +5 -3
  106. package/lib/js/ui/slider.js +22 -13
  107. package/lib/scss/_element.scss +10 -4
  108. package/lib/scss/components/_accordion.scss +1 -7
  109. package/lib/scss/components/_button.scss +11 -2
  110. package/lib/scss/components/_card.scss +5 -6
  111. package/lib/scss/components/_form-theme.scss +3 -3
  112. package/lib/scss/components/_menu-stack.scss +1 -0
  113. package/lib/scss/components/_modal.scss +13 -13
  114. package/lib/scss/helpers/_utilities.scss +0 -3
  115. package/package.json +54 -45
  116. package/dist/style.css +0 -1
  117. package/dist/types/js/core/component.d.ts.map +0 -1
  118. package/dist/types/js/core/events.d.ts.map +0 -1
  119. package/dist/types/js/core/index.d.ts +0 -4
  120. package/dist/types/js/core/settings.d.ts.map +0 -1
  121. package/dist/types/js/index.d.ts +0 -4
  122. package/dist/types/js/ui/breakpoints.d.ts.map +0 -1
  123. package/dist/types/js/ui/collapsible.d.ts.map +0 -1
  124. package/dist/types/js/ui/details-group.d.ts.map +0 -1
  125. package/dist/types/js/ui/dialog.d.ts.map +0 -1
  126. package/dist/types/js/ui/flipcard.d.ts.map +0 -1
  127. package/dist/types/js/ui/grid.d.ts.map +0 -1
  128. package/dist/types/js/ui/modal-builder.d.ts.map +0 -1
  129. package/dist/types/js/ui/overflow-scroller-pager.d.ts.map +0 -1
  130. package/dist/types/js/ui/overflow-scroller.d.ts.map +0 -1
  131. package/dist/types/js/ui/page.d.ts.map +0 -1
  132. package/dist/types/js/ui/popover.d.ts.map +0 -1
  133. package/dist/types/js/ui/print-details.d.ts.map +0 -1
  134. package/dist/types/js/ui/print.d.ts.map +0 -1
  135. package/dist/types/js/ui/programmatic-modal.d.ts.map +0 -1
  136. package/dist/types/js/ui/proxy-click.d.ts.map +0 -1
  137. package/dist/types/js/ui/resizer.d.ts.map +0 -1
  138. package/dist/types/js/ui/scroll-slider.d.ts.map +0 -1
  139. package/dist/types/js/ui/scrollpoint.d.ts.map +0 -1
  140. package/dist/types/js/ui/slider.d.ts.map +0 -1
  141. package/dist/types/js/ui/tabs.d.ts.map +0 -1
  142. package/dist/types/js/ui/theme-toggle.d.ts.map +0 -1
  143. package/dist/types/js/ui/tooltip.d.ts.map +0 -1
  144. package/dist/types/js/utils/class-logger.d.ts.map +0 -1
  145. package/dist/types/js/utils/css.d.ts.map +0 -1
  146. package/dist/types/js/utils/dom.d.ts.map +0 -1
  147. package/dist/types/js/utils/file-save.d.ts.map +0 -1
  148. package/dist/types/js/utils/floating-ui.d.ts.map +0 -1
  149. package/dist/types/js/utils/font-awesome.d.ts.map +0 -1
  150. package/dist/types/js/utils/id.d.ts.map +0 -1
  151. package/dist/types/js/utils/pause-youtube-video.d.ts.map +0 -1
  152. package/dist/ulu-frontend.es.js +0 -5737
  153. package/dist/ulu-frontend.umd.js +0 -77
  154. package/lib/scss/components/_card-before-no-position-relative.TRASH.scss +0 -576
  155. /package/dist/{types/js → es}/ui/overflow-scroller-pager.d.ts +0 -0
  156. /package/dist/{types/js → es}/ui/page.d.ts +0 -0
  157. /package/dist/{types/js → es}/ui/print-details.d.ts +0 -0
  158. /package/dist/{types/js → es}/ui/print.d.ts +0 -0
  159. /package/dist/{types/js → es}/utils/css.d.ts +0 -0
  160. /package/dist/{types/js → es}/utils/file-save.d.ts +0 -0
  161. /package/dist/{types/js → es}/utils/font-awesome.d.ts +0 -0
  162. /package/dist/{types/js → es}/utils/id.d.ts +0 -0
  163. /package/dist/{types/js → es}/utils/pause-youtube-video.d.ts +0 -0
@@ -4,6 +4,7 @@
4
4
 
5
5
  // Pass breakpoints from CSS to stylesheet, use this to attach behaviors on breakpoints
6
6
  import { removeArrayElement } from "@ulu/utils/array.js";
7
+ import { isBrowser } from "@ulu/utils/browser/dom.js";
7
8
  import { getCoreEventName } from "../core/events.js";
8
9
  import { wrapSettingString } from "../core/settings.js";
9
10
  import { getCustomProperty } from "../utils/css.js";
@@ -11,11 +12,6 @@ import { log, logError } from "../utils/class-logger.js";
11
12
 
12
13
  const getDefaultCustomProperty = prefix => getCustomProperty(prefix, "breakpoint");
13
14
 
14
- // Resize Handler to update breakpoints for all instances (Called after resize finished)
15
- window.addEventListener(getCoreEventName("pageResized"), () => {
16
- BreakpointManager.instances.forEach(i => i.update());
17
- });
18
-
19
15
  /**
20
16
  * @class
21
17
  * Class that provides method for retrieving and acting on breakpoints passed
@@ -23,6 +19,17 @@ window.addEventListener(getCoreEventName("pageResized"), () => {
23
19
  */
24
20
  export class BreakpointManager {
25
21
  static instances = [];
22
+ static globalsInitialized = false;
23
+
24
+ static _initializeGlobals() {
25
+ if (BreakpointManager.globalsInitialized || !isBrowser()) {
26
+ return;
27
+ }
28
+ window.addEventListener(getCoreEventName("pageResized"), () => {
29
+ BreakpointManager.instances.forEach(i => i.update());
30
+ });
31
+ BreakpointManager.globalsInitialized = true;
32
+ }
26
33
  static defaults = {
27
34
  element: document?.documentElement,
28
35
  valueFromPseudo: false,
@@ -41,6 +48,7 @@ export class BreakpointManager {
41
48
  * @param {String} config.pseudoSelector Change pseudo selector used to get the breakpoint from the pseudo's content property
42
49
  */
43
50
  constructor(config) {
51
+ BreakpointManager._initializeGlobals();
44
52
  Object.assign(this, BreakpointManager.defaults, config);
45
53
  this.active = null;
46
54
  this.previous = null;
@@ -78,6 +78,10 @@ export {
78
78
  setDefaults as modalBuilderSetDefaults,
79
79
  } from "./modal-builder.js";
80
80
 
81
+ export {
82
+ ProgrammaticModalManager
83
+ } from "./programmatic-modal.js";
84
+
81
85
  export {
82
86
  OverflowScroller
83
87
  } from "./overflow-scroller.js";
@@ -41,7 +41,8 @@ export const initializer = new ComponentInitializer({
41
41
  * @property {boolean} noMinHeight - If `true`, the modal will not have a minimum height. Defaults to `false`.
42
42
  * @property {string} class - Additional CSS class(es) to add to the modal. Defaults to `""`.
43
43
  * @property {string} baseClass - The base CSS class for the modal elements. Defaults to `"modal"`.
44
- * @property {string} classCloseIcon - The class name for the close icon. Uses the wrapped setting string.
44
+ * @property {string} classClose - The class name for the close button. Defaults to 'button button--icon' styling.
45
+ * @property {string} classCloseIcon - The class name for the close icon. Defaults to 'button__icon' styling. Uses the wrapped setting string.
45
46
  * @property {string} classResizerIcon - The class name for the resizer icon. Uses the wrapped setting string.
46
47
  * @property {string|Node} footerElement - Element or selector to use as the footer (will be moved to dialog on creation, used for DOM API)
47
48
  * @property {string|Node} footerHtml - Markup to use in the footer
@@ -76,7 +77,8 @@ export const defaults = {
76
77
  baseClass: "modal",
77
78
  footerElement: null,
78
79
  footerHtml: null,
79
- classCloseIcon: wrapSettingString("iconClassClose"),
80
+ classClose: "button button--icon",
81
+ classCloseIcon: wrapSettingString("iconClassClose", (v) => `${v} button__icon`),
80
82
  classResizerIcon: wrapSettingString("iconClassDragX"),
81
83
  classResizerIconBoth: wrapSettingString("iconClassDragBoth"),
82
84
  debug: false,
@@ -124,7 +126,7 @@ export const defaults = {
124
126
  }
125
127
  <span class="${ baseClass }__title-text">${ config.title }</span>
126
128
  </h2>
127
- <button class="${ baseClass }__close" aria-label="Close modal" ${ closeAttribute } autofocus>
129
+ <button class="${ baseClass }__close ${ config.classClose }" aria-label="Close modal" ${ closeAttribute } autofocus>
128
130
  ${ config.templateCloseIcon(config) }
129
131
  </button>
130
132
  </header>
@@ -32,7 +32,6 @@
32
32
 
33
33
  import { ComponentInitializer } from "../core/component.js";
34
34
  import { wrapSettingString } from "../core/settings.js";
35
- import maintain from 'ally.js/maintain/_maintain';
36
35
  import { hasRequiredProps } from '@ulu/utils/object.js';
37
36
  import { trimWhitespace } from "@ulu/utils/string.js";
38
37
  import { debounce } from "@ulu/utils/performance.js";
@@ -53,17 +52,9 @@ const attrSelectorControlContext = initializer.attributeSelector("control-contex
53
52
  const attrSelectorSlide = initializer.attributeSelector("slide");
54
53
 
55
54
  const instances = [];
56
- const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
57
55
  const eventOnce = { once: true };
58
56
  const cssDuration = d => `${ d }ms`;
59
57
 
60
- // Resize handlers for all slider instances, Load event to avoid triggering
61
- addEventListener('load', () => {
62
- addEventListener('resize', debounce(() => {
63
- Slider.instances.forEach(i => i.handleResize());
64
- }, 250));
65
- });
66
-
67
58
  const requiredElements = [
68
59
  "container",
69
60
  "trackContainer",
@@ -112,6 +103,22 @@ export function setupSlider(container, options) {
112
103
  */
113
104
  export class Slider {
114
105
  static instances = [];
106
+ static globalsInitialized = false;
107
+ static reduceMotion = false;
108
+
109
+ static _initializeGlobals() {
110
+ if (Slider.globalsInitialized) {
111
+ return;
112
+ }
113
+ // Load event to avoid triggering before page is ready
114
+ addEventListener('load', () => {
115
+ addEventListener('resize', debounce(() => {
116
+ Slider.instances.forEach(i => i.handleResize());
117
+ }, 250));
118
+ });
119
+ Slider.reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
120
+ Slider.globalsInitialized = true;
121
+ }
115
122
  /**
116
123
  * Default options for slider
117
124
  */
@@ -133,6 +140,7 @@ export class Slider {
133
140
  }
134
141
  }
135
142
  constructor(elements, config) {
143
+ Slider._initializeGlobals();
136
144
  const options = Object.assign({}, Slider.defaults, config);
137
145
  this.options = options;
138
146
  this.slide = null;
@@ -161,8 +169,8 @@ export class Slider {
161
169
  ...this.createNav(elements.navContext || elements.container)
162
170
  };
163
171
  // Choose the appropriate transition method
164
- this.transition = options.transition ? options.transitionFade || reduceMotion
165
- ? this.fadeTransition : this.slideTransition : this.noTransition;
172
+ this.transition = options.transition ? options.transitionFade || Slider.reduceMotion ?
173
+ this.fadeTransition : this.slideTransition : this.noTransition;
166
174
  this.setup();
167
175
  this.goto(0, null, "init");
168
176
  log(this, "Slider Instance Created", this);
@@ -383,8 +391,9 @@ export class Slider {
383
391
  }
384
392
 
385
393
  // Make all slide interactive elements inert
386
- const lockInteractives = maintain.disabled({ context: this.elements.track });
394
+ this.elements.track.inert = true;
387
395
  this.transitioning = true;
396
+
388
397
  // Set classes first just feels better
389
398
  if (old) old.navButton.classList.remove(activeClass);
390
399
  slide.navButton.classList.add(activeClass);
@@ -394,8 +403,8 @@ export class Slider {
394
403
  this.index = index;
395
404
  this.slide = slide;
396
405
  this.transitioning = false;
406
+ this.elements.track.inert = false;
397
407
  elements.container.classList.remove(transitionClass);
398
- lockInteractives.disengage();
399
408
  if (!isInit) {
400
409
  slide.element.focus();
401
410
  this.emit("goto", [event, index, slide]);
@@ -71,7 +71,7 @@ $config: (
71
71
  "ul-list-style-type-3": square,
72
72
  "cap-color" : "accent",
73
73
  "cap-size" : 5px,
74
- "icon-centered-vertical-offset" : 0.05em,
74
+ "icon-centered-vertical-offset" : 0.02em,
75
75
  ) !default;
76
76
 
77
77
  /// Rule style map, redefine defaults or add to
@@ -415,6 +415,12 @@ $rule-margins: (
415
415
  }
416
416
  }
417
417
 
418
- @mixin icon-vert-translate($adjustment : get("icon-centered-vertical-offset")) {
419
- transform: translateY($adjustment);
420
- }
418
+ /// Remove default details arrow from the summary element
419
+ @mixin summary-remove-marker() {
420
+ list-style: none; // Remove the default arrow (old safari?)
421
+ &::-webkit-details-marker,
422
+ &::marker {
423
+ display: none;
424
+ content: "";
425
+ }
426
+ }
@@ -180,7 +180,6 @@ $config: (
180
180
  #{ $prefix }__summary {
181
181
  position: relative; // For pseudo border (done this way for animations)
182
182
  display: flex;
183
- list-style: none; // Remove the default arrow (old safari?)
184
183
  width: 100%; // For <button>
185
184
  background-color: color.get(get("summary-background-color"));
186
185
  color: color.get(get("summary-color"));
@@ -192,12 +191,7 @@ $config: (
192
191
  align-items: center;
193
192
 
194
193
  @include typography.optional-size(get("summary-type-size"), $only-font-size: true);
195
-
196
- &::-webkit-details-marker,
197
- &::marker {
198
- display: none;
199
- content: "";
200
- }
194
+ @include element.summary-remove-marker;
201
195
  &:hover,
202
196
  &:focus {
203
197
  background-color: color.get(get("summary-background-color-hover"));
@@ -22,7 +22,7 @@ $-fallbacks: (
22
22
 
23
23
  $config: (
24
24
  "icon-margin" : 0.5em,
25
- "icon-centered-vertical-offset": 0
25
+ "icon-centered-vertical-offset": true
26
26
  ) !default;
27
27
 
28
28
  /// Change modules $config
@@ -63,7 +63,6 @@ $config: (
63
63
  @include button.default();
64
64
  }
65
65
  #{ $prefix }__icon {
66
- @include element.icon-vert-translate(get("icon-centered-vertical-offset"));
67
66
  &:first-child {
68
67
  margin-right: get("icon-margin");
69
68
  }
@@ -96,6 +95,16 @@ $config: (
96
95
  width: button.get("icon-size");
97
96
  height: button.get("icon-size");
98
97
  padding: 0 !important;
98
+
99
+ #{ $prefix }__icon {
100
+ transform: translatey(get("icon-centered-vertical-offset"));
101
+ &:first-child {
102
+ margin-right: 0;
103
+ }
104
+ &:last-child {
105
+ margin-left: 0;
106
+ }
107
+ }
99
108
  }
100
109
 
101
110
  @each $size, $values in button.$sizes {
@@ -57,7 +57,7 @@
57
57
  /// @prop {Dimension} footer-min-height [2.5rem] The min height for the footer
58
58
  /// @prop {CssValue} footer-justify [flex-end] Flex alignment of footer items (on end by default)
59
59
  /// @prop {Dimension} footer-inline-padding [0.5rem] The padding for the footer when using the 'footer-inline' modifier.
60
- /// @prop {Color} footer-background-color [#dedede] The background color of the footer.
60
+ /// @prop {Color} footer-background-color [null] The background color of the footer.
61
61
  /// @prop {String} horizontal-enabled [false] Enable the output of horizontal related layout modifiers
62
62
  /// @prop {String} horizontal-persist-enabled [false] Enable the output of horizontal-persist related layout modifiers
63
63
  /// @prop {String} horizontal-breakpoint [small] The breakpoint used to change the card to vertical if using the card--horizontal styling. Uses ulu's breakpoint module.
@@ -131,11 +131,11 @@ $config: (
131
131
  "image-icon-max-width": 8rem,
132
132
 
133
133
  // Footer
134
- "footer-padding-y": 0.25rem,
134
+ "footer-padding-y": 0.5rem,
135
135
  "footer-min-height": 2.5rem,
136
136
  "footer-justify": flex-end,
137
137
  "footer-inline-padding": 0.5rem,
138
- "footer-background-color": #dedede,
138
+ "footer-background-color": null,
139
139
 
140
140
  // Horizontal
141
141
  "horizontal-enabled" : false,
@@ -165,7 +165,7 @@ $config: (
165
165
  "overlay-body-padding-y": 1rem
166
166
  ) !default;
167
167
 
168
- /// Change modules $config
168
+ /// Change modules $config
169
169
  /// @param {Map} $changes Map of changes
170
170
  /// @example scss
171
171
  /// @include ulu.component-card-set(( "property" : value ));
@@ -195,6 +195,7 @@ $config: (
195
195
  #{ $prefix } {
196
196
  display: grid;
197
197
  grid-template-columns: 1fr;
198
+ grid-template-rows: auto 1fr auto;
198
199
  max-width: get("max-width");
199
200
  margin-top: get("margin-y");
200
201
  margin-bottom: get("margin-y");
@@ -232,7 +233,6 @@ $config: (
232
233
  grid-column: 1;
233
234
  display: flex;
234
235
  flex-direction: column;
235
- flex-grow: 1;
236
236
  min-height: get("body-min-height");
237
237
  }
238
238
  #{ $prefix }__main {
@@ -242,7 +242,6 @@ $config: (
242
242
  grid-column: 1;
243
243
  display: flex;
244
244
  align-items: center;
245
- flex: 0;
246
245
  padding-top: get("footer-padding-y");
247
246
  padding-bottom: get("footer-padding-y");
248
247
  min-height: get("footer-min-height");
@@ -80,7 +80,7 @@ $-fallbacks: (
80
80
  /// @prop {Color} check-input-mark-color-checked [null] Check input color when checked.
81
81
  /// @prop {Color} check-input-mark-color-indeterminate [null] Check input color when indeterminate.
82
82
  /// @prop {Number} check-input-disabled-opacity [0.6] Opacity of the check input when disabled.
83
- /// @prop {Dimension} check-input-border-radius [null] Checkbox input border radius.
83
+ /// @prop {Dimension} check-input-border-radius [0] Checkbox input border radius.
84
84
  /// @prop {Color} description-color [false] Color of help text.
85
85
  /// @prop {CssValue} description-margin [(0.25em 0)] Margin for help text.
86
86
  /// @prop {Dimension} description-max-width [25em] Max width of help text.
@@ -164,7 +164,7 @@ $config: (
164
164
  "check-input-mark-color-checked" : null,
165
165
  "check-input-mark-color-indeterminate" : null,
166
166
  "check-input-disabled-opacity" : 0.6,
167
- "check-input-border-radius" : null,
167
+ "check-input-border-radius" : 0,
168
168
  "description-color" : false,
169
169
  "description-margin" : (0.25em 0),
170
170
  "description-max-width" : 25em,
@@ -427,7 +427,7 @@ $config: (
427
427
  }
428
428
  [type="checkbox"] {
429
429
  &::before {
430
- border-radius: -fallback("check-input-border-radius", "input-border-radius");
430
+ border-radius: get("check-input-border-radius");
431
431
  }
432
432
  &::after {
433
433
  border-radius: 0;
@@ -296,6 +296,7 @@ $styles: (
296
296
  justify-content: space-between;
297
297
  align-items: center;
298
298
  cursor: pointer;
299
+ @include element.summary-remove-marker;
299
300
  }
300
301
 
301
302
  // Modifiers
@@ -48,11 +48,12 @@ $-fallbacks: (
48
48
  /// @prop {CssValue} animation-timing-function [cubic-bezier(0, 0, .2, 1)] The animation timing menu of the modal.
49
49
  /// @prop {Color} close-background-color [white] Background color for the modal close icon.
50
50
  /// @prop {Close} close-background-color-hover [blue] Background color for the modal close icon when hovered or focused.
51
+ /// @prop {Color} close-border-color [null] Border color of the modal__close element. Overrides button border color if using button styling. Fallback to close-background-color.
52
+ /// @prop {Color} close-border-color-hover [null] Border color hover of the modal__close element. Overrides button border color if using button styling. Fallback to close-background-color-hover.
53
+ /// @prop {Color} close-box-shadow [none] Box-shadow of the modal__close element. Overrides button border color if using button styling. Defaults to remove box-shadow styling.
51
54
  /// @prop {Color} close-color [black] Type color for the modal close icon.
52
55
  /// @prop {Color} close-color-hover [black] Type color for the modal close icon when hovered or focused.
53
- /// @prop {Dimension} close-font-size [1.2rem] Font-siz of of the modal close icon font size.
54
56
  /// @prop {Dimension} close-margin [0.5rem] The margin for the modal close icon.
55
- /// @prop {Dimension} close-size [2.5rem] Size of the modal close icon.
56
57
  /// @prop {Color} header-background-color [black] Background color for the header.
57
58
  /// @prop {CssValue} header-border-bottom [none] Bottom-border on the modal header.
58
59
  /// @prop {Color} header-color [white] Type color of the header.
@@ -91,12 +92,13 @@ $config: (
91
92
  "animation-timing-function" : cubic-bezier(0, 0, .2, 1),
92
93
  "close-background-color": white,
93
94
  "close-background-color-hover": blue,
95
+ "close-border-color": null,
96
+ "close-border-color-hover": null,
97
+ "close-box-shadow": none,
94
98
  "close-color": black,
95
99
  "close-color-hover": black,
96
- "close-font-size": 1.2rem,
97
100
  "close-margin": 0.5rem,
98
101
  "close-icon-vertical-offset" : true,
99
- "close-size": 2.5rem,
100
102
  "header-background-color": black,
101
103
  "header-border-bottom": none,
102
104
  "header-color": white,
@@ -230,23 +232,21 @@ $config: (
230
232
  #{ $prefix }__close {
231
233
  margin: 0 0 0 get("close-margin");
232
234
  flex: 0 0 auto;
233
- font-size: get("close-font-size");
234
- width: get("close-size");
235
- height: get("close-size");
236
235
  background-color: color.get(get("close-background-color"));
237
- border-radius: 50%;
238
- display: flex;
239
- align-items: center;
240
- justify-content: center;
236
+ border-color: color.get(utils.fallback(get("close-border-color"), get("close-background-color")));
241
237
  color: color.get(get("close-color"));
242
- &:hover {
238
+ box-shadow: get("close-box-shadow");
239
+ &:hover,
240
+ &:focus {
243
241
  background-color: color.get(get("close-background-color-hover"));
244
242
  color: color.get(get("close-color-hover"));
243
+ border-color: color.get(utils.fallback(get("close-border-color-hover"), get("close-background-color-hover")));
244
+ // need border-color-hover use utils fallback
245
245
  }
246
246
  }
247
247
 
248
248
  #{ $prefix }__close-icon {
249
- @include element.icon-vert-translate(get("close-icon-vertical-offset"));
249
+ // transform: translatey(get("close-icon-vertical-offset"));
250
250
  }
251
251
 
252
252
  #{ $prefix }__resizer {
@@ -140,7 +140,4 @@
140
140
  margin-right: typography.get("space-size");
141
141
  }
142
142
  }
143
- .icon-vert-translate {
144
- @include element.icon-vert-translate();
145
- }
146
143
  }
package/package.json CHANGED
@@ -1,41 +1,38 @@
1
1
  {
2
2
  "name": "@ulu/frontend",
3
- "version": "0.2.0-beta.1",
4
- "description": "A versatile SCSS and JavaScript component library offering configurable, accessible components and flexible integration into any project, with SCSS modules suitable for modern JS frameworks.",
3
+ "version": "0.2.0-beta.11",
4
+ "description": "A framework-agnostic frontend toolkit providing a modular, tree-shakable library of accessible components and utilities. Designed for seamless integration, it features a highly configurable SCSS system for any environment and vanilla JavaScript modules optimized for traditional websites and content management systems.",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
8
8
  "lib"
9
9
  ],
10
- "main": "./dist/ulu-frontend.umd.js",
11
- "module": "./dist/ulu-frontend.es.js",
12
- "types": "./dist/types/index.d.ts",
10
+ "main": "./dist/umd/ulu-frontend.umd.js",
11
+ "module": "./dist/es/index.js",
12
+ "types": "./dist/es/index.d.ts",
13
13
  "exports": {
14
14
  ".": {
15
- "import": "./dist/ulu-frontend.es.js",
16
- "require": "./dist/ulu-frontend.umd.js",
17
- "types": "./dist/types/index.d.ts"
15
+ "import": "./dist/es/index.js",
16
+ "require": "./dist/umd/ulu-frontend.umd.js",
17
+ "types": "./dist/es/index.d.ts"
18
18
  },
19
- "./style.css": "./dist/style.css",
19
+ "./style.css": "./dist/umd/style.css",
20
20
  "./scss/*.scss": "./lib/scss/*.scss",
21
21
  "./scss/*": "./lib/scss/*",
22
22
  "./scss": "./lib/scss/index.scss",
23
- "./js/*": "./lib/js/*",
24
- "./js/*.js": "./lib/js/*.js"
25
- },
26
- "typesVersions": {
27
- "*": {
28
- "js/*": [
29
- "./dist/types/*"
30
- ]
23
+ "./js/*": {
24
+ "import": "./dist/es/*",
25
+ "types": "./dist/es/*"
31
26
  }
32
27
  },
28
+ "sideEffects": [
29
+ "dist/es/core/events.js",
30
+ "dist/umd/ulu-frontend.umd.js"
31
+ ],
33
32
  "scripts": {
34
- "clean": "rm -rf dist",
35
- "build": "npm run clean && npm run build:es && npm run build:umd && npm run types",
36
- "build:es": "vite build",
33
+ "build": "npm run build:es && npm run build:umd",
34
+ "build:es": "BUILD_FORMAT=es vite build",
37
35
  "build:umd": "BUILD_FORMAT=umd vite build",
38
- "types": "npx tsc",
39
36
  "docs": "npx @11ty/eleventy --serve --config=docs.eleventy.js",
40
37
  "docs:incremental": "npx @11ty/eleventy --serve --incremental --config=docs.eleventy.js",
41
38
  "docs:nogen": "NO_DOC_GEN=true npx @11ty/eleventy --serve --incremental --config=docs.eleventy.js",
@@ -52,28 +49,35 @@
52
49
  "url": "git+https://github.com/Jscherbe/frontend.git"
53
50
  },
54
51
  "keywords": [
55
- "SCSS",
56
- "sass",
52
+ "a11y",
53
+ "accessibility",
57
54
  "breakpoints",
58
- "theme",
59
- "modules",
60
- "javascript",
61
- "framework",
62
- "mixin",
55
+ "cms",
63
56
  "components",
64
- "HTML",
65
- "frontend framework",
57
+ "composable",
66
58
  "css",
67
- "utilities",
68
- "design system",
59
+ "design-system",
60
+ "framework-agnostic",
61
+ "frontend",
62
+ "frontend-framework",
63
+ "HTML",
64
+ "integration",
65
+ "javascript",
66
+ "modular",
67
+ "responsive-design",
68
+ "sass",
69
+ "scss",
70
+ "theme",
71
+ "theming",
69
72
  "toolkit",
70
- "accessibility",
73
+ "tree-shaking",
71
74
  "ui",
72
- "user interface",
73
- "responsive design"
75
+ "user-interface",
76
+ "utilities",
77
+ "vanilla-js"
74
78
  ],
75
79
  "authors": {
76
- "name": "Joe Scherben, Informatics Studio",
80
+ "name": "Joe Scherben",
77
81
  "email": "jscherbe@gmail.com"
78
82
  },
79
83
  "license": "MIT",
@@ -81,17 +85,26 @@
81
85
  "url": "https://github.com/Jscherbe/frontend/issues"
82
86
  },
83
87
  "homepage": "https://github.com/Jscherbe/frontend#readme",
88
+ "peerDependencies": {
89
+ "@floating-ui/dom": "^1.6.5",
90
+ "@ulu/utils": "^0.0.34",
91
+ "aria-tablist": "^1.2.2",
92
+ "swipe-listener": "^1.3.0"
93
+ },
84
94
  "devDependencies": {
85
95
  "@11ty/eleventy": "^3.0.0-alpha.6",
86
96
  "@11ty/eleventy-navigation": "^0.3.5",
87
97
  "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
98
+ "@floating-ui/dom": "^1.6.5",
88
99
  "@fortawesome/fontawesome-free": "^6.5.2",
89
100
  "@ulu/markdown-output-utils": "^0.0.6",
90
101
  "@ulu/sassdoc-to-markdown": "^0.0.16",
102
+ "@ulu/utils": "^0.0.34",
91
103
  "@ulu/vite-config-cms-theme": "^0.0.10",
92
104
  "@ulu/vitepress-auto-menus": "^0.0.3",
93
105
  "@ulu/vitepress-sassdoc": "^0.0.9",
94
106
  "algoliasearch": "^4.23.3",
107
+ "aria-tablist": "^1.2.2",
95
108
  "autoprefixer": "^10.4.16",
96
109
  "chokidar": "^3.6.0",
97
110
  "eleventy-plugin-nesting-toc": "^1.3.0",
@@ -102,18 +115,14 @@
102
115
  "markdown-it-anchor": "^8.6.7",
103
116
  "markdown-it-attrs": "^4.1.6",
104
117
  "micromodal": "^0.4.10",
118
+ "rollup-plugin-peer-deps-external": "^2.2.4",
105
119
  "sass-embedded": "^1.81.0",
106
120
  "sharp": "^0.33.4",
107
121
  "svgo": "^3.3.2",
122
+ "swipe-listener": "^1.3.0",
108
123
  "twig": "^1.17.1",
109
124
  "typescript": "^5.3.3",
110
- "vite": "^5.4.11"
111
- },
112
- "dependencies": {
113
- "@floating-ui/dom": "^1.6.5",
114
- "@ulu/utils": "^0.0.30",
115
- "ally.js": "^1.4.1",
116
- "aria-tablist": "^1.2.2",
117
- "swipe-listener": "^1.3.0"
125
+ "vite": "^5.4.11",
126
+ "vite-plugin-dts": "^4.5.4"
118
127
  }
119
- }
128
+ }