@ulu/frontend 0.1.0-beta.2 → 0.1.0-beta.20

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 (225) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/dist/ulu-frontend.min.css +1 -1
  3. package/dist/ulu-frontend.min.js +18 -18
  4. package/docs-dev/changelog/index.html +5397 -0
  5. package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
  6. package/docs-dev/demos/accordion/index.html +636 -293
  7. package/docs-dev/demos/basic-hero/index.html +111 -0
  8. package/docs-dev/demos/button/index.html +636 -293
  9. package/docs-dev/demos/callout/index.html +661 -305
  10. package/docs-dev/demos/captioned-figure/index.html +636 -293
  11. package/docs-dev/demos/card/index.html +636 -293
  12. package/docs-dev/demos/css-icons/index.html +636 -293
  13. package/docs-dev/demos/data-grid/index.html +744 -481
  14. package/docs-dev/demos/data-table/index.html +661 -318
  15. package/docs-dev/demos/details-group/index.html +4994 -0
  16. package/docs-dev/demos/file-save/index.html +636 -293
  17. package/docs-dev/demos/flipcard/index.html +636 -293
  18. package/docs-dev/demos/form-theme/index.html +654 -324
  19. package/docs-dev/demos/hero/index.html +12 -4
  20. package/docs-dev/demos/image-grid/index.html +12 -4
  21. package/docs-dev/demos/index.html +636 -293
  22. package/docs-dev/demos/list-inline/index.html +4980 -0
  23. package/docs-dev/demos/list-inline.1/index.html +4727 -0
  24. package/docs-dev/demos/list-lines/index.html +4970 -0
  25. package/docs-dev/demos/menu-stack/index.html +655 -312
  26. package/docs-dev/demos/modals/index.html +636 -293
  27. package/docs-dev/demos/nav-strip/index.html +656 -349
  28. package/docs-dev/demos/overlay-section/index.html +636 -293
  29. package/docs-dev/demos/popovers/index.html +636 -293
  30. package/docs-dev/demos/print/index.html +636 -293
  31. package/docs-dev/demos/pull-quote/index.html +636 -293
  32. package/docs-dev/demos/rule/index.html +636 -293
  33. package/docs-dev/demos/scroll-slider/index.html +12 -4
  34. package/docs-dev/demos/scrollpoints/index.html +636 -293
  35. package/docs-dev/demos/slider/index.html +12 -4
  36. package/docs-dev/demos/spoke-spinner/index.html +636 -293
  37. package/docs-dev/demos/tabs/index.html +648 -293
  38. package/docs-dev/demos/tag/index.html +636 -293
  39. package/docs-dev/demos/theme-toggle/index.html +5039 -0
  40. package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
  41. package/docs-dev/demos/tiles/index.html +636 -293
  42. package/docs-dev/demos/tooltip/index.html +636 -293
  43. package/docs-dev/guide/building-stylesheet/index.html +636 -293
  44. package/docs-dev/guide/developing-ulu-scss-module/index.html +636 -293
  45. package/docs-dev/guide/index.html +637 -294
  46. package/docs-dev/guide/updates-and-changes/index.html +5033 -0
  47. package/docs-dev/index.html +641 -293
  48. package/docs-dev/javascript/events/index.html +633 -292
  49. package/docs-dev/javascript/index.html +636 -293
  50. package/docs-dev/javascript/settings/index.html +5094 -0
  51. package/docs-dev/javascript/ui-breakpoints/index.html +633 -292
  52. package/docs-dev/javascript/ui-collapsible/index.html +633 -292
  53. package/docs-dev/javascript/ui-details-group/index.html +5094 -0
  54. package/docs-dev/javascript/ui-dialog/index.html +633 -292
  55. package/docs-dev/javascript/ui-flipcard/index.html +633 -292
  56. package/docs-dev/javascript/ui-grid/index.html +633 -292
  57. package/docs-dev/javascript/ui-modal-builder/index.html +633 -292
  58. package/docs-dev/javascript/ui-overflow-scroller/index.html +633 -292
  59. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +633 -292
  60. package/docs-dev/javascript/ui-page/index.html +633 -292
  61. package/docs-dev/javascript/ui-popover/index.html +633 -292
  62. package/docs-dev/javascript/ui-print/index.html +633 -292
  63. package/docs-dev/javascript/ui-print-details/index.html +633 -292
  64. package/docs-dev/javascript/ui-programmatic-modal/index.html +633 -292
  65. package/docs-dev/javascript/ui-proxy-click/index.html +633 -292
  66. package/docs-dev/javascript/ui-resizer/index.html +633 -292
  67. package/docs-dev/javascript/ui-scroll-slider/index.html +633 -292
  68. package/docs-dev/javascript/ui-scrollpoint/index.html +633 -292
  69. package/docs-dev/javascript/ui-slider/index.html +633 -292
  70. package/docs-dev/javascript/ui-tabs/index.html +633 -292
  71. package/docs-dev/javascript/ui-theme-toggle/index.html +5178 -0
  72. package/docs-dev/javascript/ui-tooltip/index.html +633 -292
  73. package/docs-dev/javascript/utils-class-logger/index.html +633 -292
  74. package/docs-dev/javascript/utils-dom/index.html +697 -296
  75. package/docs-dev/javascript/utils-file-save/index.html +633 -292
  76. package/docs-dev/javascript/utils-floating-ui/index.html +633 -292
  77. package/docs-dev/javascript/utils-id/index.html +633 -292
  78. package/docs-dev/javascript/utils-pause-youtube-video/index.html +633 -292
  79. package/docs-dev/sass/base/color/index.html +633 -292
  80. package/docs-dev/sass/base/elements/index.html +633 -292
  81. package/docs-dev/sass/base/index/index.html +633 -292
  82. package/docs-dev/sass/base/index.html +636 -293
  83. package/docs-dev/sass/base/keyframes/index.html +633 -292
  84. package/docs-dev/sass/base/layout/index.html +633 -292
  85. package/docs-dev/sass/base/normalize/index.html +633 -292
  86. package/docs-dev/sass/base/print/index.html +633 -292
  87. package/docs-dev/sass/base/root/index.html +633 -292
  88. package/docs-dev/sass/base/typography/index.html +633 -292
  89. package/docs-dev/sass/components/accordion/index.html +638 -297
  90. package/docs-dev/sass/components/adaptive-spacing/index.html +633 -292
  91. package/docs-dev/sass/components/badge/index.html +641 -300
  92. package/docs-dev/sass/components/basic-hero/index.html +5145 -0
  93. package/docs-dev/sass/components/button/index.html +633 -292
  94. package/docs-dev/sass/components/button-verbose/index.html +634 -293
  95. package/docs-dev/sass/components/callout/index.html +658 -353
  96. package/docs-dev/sass/components/captioned-figure/index.html +756 -300
  97. package/docs-dev/sass/components/card/index.html +665 -309
  98. package/docs-dev/sass/components/card-grid/index.html +633 -292
  99. package/docs-dev/sass/components/css-icon/index.html +650 -302
  100. package/docs-dev/sass/components/data-grid/index.html +633 -292
  101. package/docs-dev/sass/components/data-table/index.html +829 -303
  102. package/docs-dev/sass/components/fill-context/index.html +633 -292
  103. package/docs-dev/sass/components/flipcard/index.html +641 -300
  104. package/docs-dev/sass/components/flipcard-grid/index.html +633 -292
  105. package/docs-dev/sass/components/form-theme/index.html +761 -319
  106. package/docs-dev/sass/components/hero/index.html +689 -300
  107. package/docs-dev/sass/components/horizontal-rule/index.html +633 -292
  108. package/docs-dev/sass/components/image-grid/index.html +633 -292
  109. package/docs-dev/sass/components/index/index.html +645 -302
  110. package/docs-dev/sass/components/index.html +636 -293
  111. package/docs-dev/sass/components/links/index.html +633 -292
  112. package/docs-dev/sass/components/list-inline/index.html +5159 -0
  113. package/docs-dev/sass/components/list-lines/index.html +665 -328
  114. package/docs-dev/sass/components/list-ordered/index.html +635 -294
  115. package/docs-dev/sass/components/list-unordered/index.html +633 -292
  116. package/docs-dev/sass/components/menu-stack/index.html +667 -313
  117. package/docs-dev/sass/components/modal/index.html +654 -306
  118. package/docs-dev/sass/components/nav-strip/index.html +645 -304
  119. package/docs-dev/sass/components/overlay-section/index.html +641 -300
  120. package/docs-dev/sass/components/pager/index.html +633 -292
  121. package/docs-dev/sass/components/placeholder-block/index.html +633 -292
  122. package/docs-dev/sass/components/popover/index.html +663 -292
  123. package/docs-dev/sass/components/pull-quote/index.html +645 -304
  124. package/docs-dev/sass/components/ratio-box/index.html +633 -292
  125. package/docs-dev/sass/components/rule/index.html +641 -300
  126. package/docs-dev/sass/components/scroll-slider/index.html +633 -292
  127. package/docs-dev/sass/components/skip-link/index.html +641 -300
  128. package/docs-dev/sass/components/slider/index.html +640 -299
  129. package/docs-dev/sass/components/spoke-spinner/index.html +633 -292
  130. package/docs-dev/sass/components/tabs/index.html +648 -300
  131. package/docs-dev/sass/components/tag/index.html +633 -292
  132. package/docs-dev/sass/components/tile-button/index.html +633 -292
  133. package/docs-dev/sass/components/tile-grid/index.html +633 -292
  134. package/docs-dev/sass/components/tile-grid-overlay/index.html +633 -292
  135. package/docs-dev/sass/components/vignette/index.html +647 -300
  136. package/docs-dev/sass/components/wysiwyg/index.html +633 -292
  137. package/docs-dev/sass/core/breakpoint/index.html +633 -292
  138. package/docs-dev/sass/core/button/index.html +633 -292
  139. package/docs-dev/sass/core/color/index.html +671 -323
  140. package/docs-dev/sass/core/cssvar/index.html +633 -292
  141. package/docs-dev/sass/core/element/index.html +633 -292
  142. package/docs-dev/sass/core/index.html +633 -292
  143. package/docs-dev/sass/core/layout/index.html +633 -292
  144. package/docs-dev/sass/core/path/index.html +633 -292
  145. package/docs-dev/sass/core/selector/index.html +633 -292
  146. package/docs-dev/sass/core/typography/index.html +633 -292
  147. package/docs-dev/sass/core/units/index.html +633 -292
  148. package/docs-dev/sass/core/utils/index.html +633 -292
  149. package/docs-dev/sass/helpers/color/index.html +633 -292
  150. package/docs-dev/sass/helpers/display/index.html +633 -292
  151. package/docs-dev/sass/helpers/index/index.html +633 -292
  152. package/docs-dev/sass/helpers/index.html +636 -293
  153. package/docs-dev/sass/helpers/print/index.html +633 -292
  154. package/docs-dev/sass/helpers/typography/index.html +633 -292
  155. package/docs-dev/sass/helpers/units/index.html +633 -292
  156. package/docs-dev/sass/helpers/utilities/index.html +633 -292
  157. package/docs-dev/sass/index.html +636 -293
  158. package/js/index.js +1 -0
  159. package/js/settings.js +78 -0
  160. package/js/ui/details-group.js +121 -0
  161. package/js/ui/index.js +1 -0
  162. package/js/ui/modal-builder.js +3 -2
  163. package/js/ui/overflow-scroller.js +5 -4
  164. package/js/ui/programmatic-modal.js +9 -3
  165. package/js/ui/slider.js +7 -6
  166. package/js/ui/theme-toggle.js +330 -89
  167. package/js/utils/dom.js +43 -1
  168. package/js/utils/font-awesome.js +18 -0
  169. package/js/utils/index.js +2 -1
  170. package/package.json +3 -2
  171. package/scss/_color.scss +9 -2
  172. package/scss/components/README.todos +14 -0
  173. package/scss/components/_accordion.scss +13 -13
  174. package/scss/components/_badge.scss +3 -2
  175. package/scss/components/_basic-hero.scss +112 -0
  176. package/scss/components/_button-verbose.scss +3 -2
  177. package/scss/components/_callout.scss +43 -54
  178. package/scss/components/_captioned-figure.scss +23 -5
  179. package/scss/components/_card-grid.scss +1 -1
  180. package/scss/components/_card.scss +52 -37
  181. package/scss/components/_css-icon.scss +16 -11
  182. package/scss/components/_data-table.scss +41 -4
  183. package/scss/components/_flipcard.scss +13 -12
  184. package/scss/components/_form-theme.scss +47 -47
  185. package/scss/components/_hero.scss +9 -0
  186. package/scss/components/_index.scss +12 -0
  187. package/scss/components/_list-inline.scss +80 -0
  188. package/scss/components/_list-lines.scss +44 -33
  189. package/scss/components/_list-ordered.scss +0 -1
  190. package/scss/components/_menu-stack.scss +42 -26
  191. package/scss/components/_modal.scss +23 -19
  192. package/scss/components/_nav-strip.scss +25 -16
  193. package/scss/components/_overlay-section.scss +2 -1
  194. package/scss/components/_pager.scss +6 -6
  195. package/scss/components/_placeholder-block.scss +4 -4
  196. package/scss/components/_popover.scss +38 -38
  197. package/scss/components/_pull-quote.scss +12 -12
  198. package/scss/components/_rule.scss +0 -1
  199. package/scss/components/_scroll-slider.scss +1 -1
  200. package/scss/components/_skip-link.scss +2 -1
  201. package/scss/components/_slider.scss +17 -38
  202. package/scss/components/_tabs.scss +42 -52
  203. package/scss/components/_tag.scss +1 -1
  204. package/scss/components/_vignette.scss +1 -0
  205. package/types/index.d.ts +1 -0
  206. package/types/settings.d.ts +38 -0
  207. package/types/settings.d.ts.map +1 -0
  208. package/types/ui/details-group.d.ts +43 -0
  209. package/types/ui/details-group.d.ts.map +1 -0
  210. package/types/ui/index.d.ts +1 -0
  211. package/types/ui/modal-builder.d.ts +2 -2
  212. package/types/ui/modal-builder.d.ts.map +1 -1
  213. package/types/ui/overflow-scroller.d.ts +2 -2
  214. package/types/ui/overflow-scroller.d.ts.map +1 -1
  215. package/types/ui/programmatic-modal.d.ts.map +1 -1
  216. package/types/ui/slider.d.ts +2 -2
  217. package/types/ui/slider.d.ts.map +1 -1
  218. package/types/ui/tabs.d.ts.map +1 -1
  219. package/types/ui/theme-toggle.d.ts +58 -7
  220. package/types/ui/theme-toggle.d.ts.map +1 -1
  221. package/types/utils/dom.d.ts +19 -1
  222. package/types/utils/dom.d.ts.map +1 -1
  223. package/types/utils/font-awesome.d.ts +5 -0
  224. package/types/utils/font-awesome.d.ts.map +1 -0
  225. package/types/utils/index.d.ts +1 -0
@@ -13,8 +13,8 @@
13
13
 
14
14
  /// Module Settings
15
15
  /// @type Map
16
- /// @prop {Color} background-color [white] This is the background color of the accordion before it is expanded.
17
- /// @prop {Color} background-color-open [#F7F8F7] This is the background color of the accordion before it is expanded. This will change the background color of the accordion's summary as well as the details.
16
+ /// @prop {Color} background-color [accordion-background] This is the background color of the accordion before it is expanded.
17
+ /// @prop {Color} background-color-open [accordion-background-open] This is the background color of the accordion before it is expanded. This will change the background color of the accordion's summary as well as the details.
18
18
  /// @prop {String} border-color ["rule"]
19
19
  /// @prop {Number} border-radius [0] This applies a rounding of edges for the accordion. If there are multiple accordions in a stack, this will only apply to the top of the first accordion and the bottom of the last accordion.
20
20
  /// @prop {Dimension} border-width [1px] The width of the borders of the accordions
@@ -41,8 +41,8 @@
41
41
  /// @prop {Dimension} transparent-padding-x [0] The upper and lower padding of the transparent summary.
42
42
 
43
43
  $config: (
44
- "background-color": white,
45
- "background-color-open": #F7F8F7,
44
+ "background-color": "background",
45
+ "background-color-open": "background-gray",
46
46
  "border-color": "rule",
47
47
  "border-radius": 0,
48
48
  "border-width": 1px,
@@ -59,7 +59,7 @@ $config: (
59
59
  "icon-font-size": 1.5rem,
60
60
  "icon-size": auto,
61
61
  "icon-stroke-width": 0.15em,
62
- "summary-background-color": white,
62
+ "summary-background-color": "white",
63
63
  "summary-color": null,
64
64
  "summary-background-color-hover": null,
65
65
  "summary-color-hover": null,
@@ -107,7 +107,7 @@ $config: (
107
107
  margin-top: get("margin");
108
108
  margin-bottom: get("margin");
109
109
  border: $border;
110
- background-color: get("background-color");
110
+ background-color: color.get(get("background-color"));
111
111
  box-shadow: get("box-shadow");
112
112
  &:first-of-type {
113
113
  border-top-left-radius: get("border-radius");
@@ -124,7 +124,7 @@ $config: (
124
124
  }
125
125
  &[open],
126
126
  &.is-active {
127
- background-color: get("background-color-open");
127
+ background-color: color.get(get("background-color-open"));
128
128
  padding-bottom: get("padding-y");
129
129
  z-index: 2; // Above child details
130
130
  > #{ $prefix }__summary {
@@ -136,8 +136,8 @@ $config: (
136
136
  }
137
137
  }
138
138
  #{ $prefix }__summary {
139
- background-color: get("summary-background-color");
140
- color: get("summary-color");
139
+ background-color: color.get(get("summary-background-color"));
140
+ color: color.get(get("summary-color"));
141
141
  margin-left: -(get("padding-x"));
142
142
  margin-right: -(get("padding-x"));
143
143
  line-height: get("summary-line-height");
@@ -161,10 +161,10 @@ $config: (
161
161
  @include typography.size(get("summary-type-size"));
162
162
  }
163
163
  &:hover {
164
- background-color: get("summary-background-color-hover");
165
- color: get("summary-color-hover");
164
+ background-color: color.get(get("summary-background-color-hover"));
165
+ color: color.get(get("summary-color-hover"));
166
166
  #{ $prefix }__icon {
167
- background-color: get("icon-background-color-hover");
167
+ background-color: color.get(get("icon-background-color-hover"));
168
168
  color: color.get(get("icon-color-hover"));
169
169
  }
170
170
  }
@@ -174,7 +174,7 @@ $config: (
174
174
  color: color.get(get("icon-color"));
175
175
  margin-left: 0.5em;
176
176
  order: 3;
177
- background-color: get("icon-background-color");
177
+ background-color: color.get(get("icon-background-color"));
178
178
  border-radius: get("icon-border-radius");
179
179
  width: get("icon-size");
180
180
  height: get("icon-size");
@@ -6,6 +6,7 @@
6
6
  @use "sass:map";
7
7
  @use "../utils";
8
8
  @use "../selector";
9
+ @use "../color";
9
10
 
10
11
  /// Module Settings
11
12
  /// @type Map
@@ -94,8 +95,8 @@ $config: (
94
95
  &:hover,
95
96
  &:focus,
96
97
  &:visited {
97
- background-color: get("background-color");
98
- color: get("color");
98
+ background-color: color.get(get("background-color"));
99
+ color: color.get(get("color"));
99
100
  }
100
101
  }
101
102
  #{ $prefix }--clickable {
@@ -0,0 +1,112 @@
1
+ ////
2
+ /// @group basic-hero
3
+ /// Basic styling for a hero
4
+ ////
5
+
6
+ @use "sass:map";
7
+ @use "sass:math";
8
+ @use "sass:meta";
9
+ @use "sass:list";
10
+
11
+ @use "../breakpoint";
12
+ @use "../selector";
13
+ @use "../utils";
14
+ @use "../typography";
15
+ @use "../color";
16
+
17
+ // Used for function fallback
18
+ $-fallbacks: (
19
+ "main-max-width" : (
20
+ "function" : meta.get-function("get", false, "typography"),
21
+ "property" : "max-width"
22
+ ),
23
+ "main-min-width" : (
24
+ "function" : meta.get-function("get", false, "typography"),
25
+ "property" : "max-width-small"
26
+ ),
27
+ );
28
+
29
+ /// Module Settings
30
+ /// @type Map
31
+ /// @prop {CssValue} text-align [center] Alignment of text within hero.
32
+ /// @prop {Color} background-color ["color-hero-background"] Background color of the hero
33
+
34
+ $config: (
35
+ "background-color" : "background-gray",
36
+ "padding-top": 3rem,
37
+ "padding-bottom" : 2rem,
38
+ "gap" : (4rem 2rem),
39
+ "main-max-width" : true,
40
+ "main-min-width" : true,
41
+ "media-max-width" : 20rem,
42
+ "media-vertical-align" : center
43
+ ) !default;
44
+
45
+ /// Change modules $config
46
+ /// @param {Map} $changes Map of changes
47
+ /// @example scss
48
+ /// @include ulu.component-basic-hero-set(( "property" : value ));
49
+
50
+ @mixin set($changes) {
51
+ $config: map.merge($config, $changes) !global;
52
+ }
53
+
54
+ /// Get a config option
55
+ /// @param {Map} $name Name of property
56
+ /// @example scss
57
+ /// @include ulu.component-basic-hero-get("property");
58
+
59
+ @function get($name) {
60
+ $value: utils.require-map-get($config, $name, "basic-hero [config]");
61
+ @return utils.function-fallback($name, $value, $-fallbacks);
62
+ }
63
+
64
+ /// Prints component styles
65
+ /// @example scss
66
+ /// @include ulu.component-basic-hero-styles();
67
+
68
+ @mixin styles {
69
+ $prefix: selector.class("basic-hero");
70
+
71
+ #{ $prefix } {
72
+ background-color: color.get(get("background-color"));
73
+ }
74
+ #{ $prefix }__content {
75
+ display: flex;
76
+ align-items: stretch;
77
+ flex-wrap: wrap;
78
+ justify-content: space-between;
79
+ gap: get("gap");
80
+ padding-top: get("padding-top");
81
+ padding-bottom: get("padding-bottom");
82
+ }
83
+ #{ $prefix }__content-main {
84
+ $min-width: if(get("main-min-width"), get("main-min-width"), get("main-max-width"));
85
+ // Using max/min-width so that we don't need to add selectors to change flex-basis
86
+ // when centered. Using flex-basis: 0 to allow flexbox to decide the items width
87
+ // allows it to expand/shrink within. min(100%... Never larger than parent
88
+ min-width: min(100%, $min-width);
89
+ max-width: get("main-max-width");
90
+ flex-shrink: 1;
91
+ flex-grow: 1;
92
+ flex-basis: 0;
93
+ }
94
+ #{ $prefix }__content-media {
95
+ display: flex;
96
+ align-items: center;
97
+ align-self: get("media-vertical-align");
98
+ justify-content: center;
99
+ flex: 0 0 auto;
100
+ width: min(100%, get("media-max-width"));
101
+ }
102
+
103
+ // Modifiers
104
+ #{ $prefix }--center {
105
+ #{ $prefix }__content {
106
+ flex-direction: column;
107
+ flex-wrap: nowrap;
108
+ text-align: center;
109
+ align-items: center;
110
+ }
111
+ }
112
+ }
@@ -102,10 +102,11 @@ $config: (
102
102
  margin-bottom: get("margin");
103
103
  max-width: 100%;
104
104
  width: get("min-width");
105
- background-color: get("background-color");
105
+ background-color: color.get(get("background-color"));
106
106
  padding: get("padding-y") get("padding-x");
107
107
  padding-right: (get("padding-x") * 2) + 1em;
108
108
  color: color.get(get("color"));
109
+ text-align: left;
109
110
  &:hover {
110
111
  color: color.get(get("color-hover"));
111
112
  background-color: color.get(get("background-color-hover"));
@@ -126,7 +127,7 @@ $config: (
126
127
  right: get("padding-x");
127
128
  transform: translateY(-50%);
128
129
  font-size: get("icon-font-size");
129
- color: get("icon-color");
130
+ color: color.get(get("icon-color"));
130
131
  }
131
132
  .button-verbose--inline {
132
133
  display: inline-block;
@@ -10,13 +10,10 @@
10
10
  @use "../utils";
11
11
  @use "../selector";
12
12
  @use "../element";
13
+ @use "../color";
13
14
 
14
15
  // Used for function fallback
15
16
  $-fallbacks: (
16
- "border" : (
17
- "function" : meta.get-function("get-rule-style", false, "element"),
18
- "property" : "light"
19
- ),
20
17
  "border-radius" : (
21
18
  "function" : meta.get-function("get", false, "element"),
22
19
  "property" : "border-radius"
@@ -26,8 +23,9 @@ $-fallbacks: (
26
23
  /// Module Settings
27
24
  /// @type Map
28
25
  /// @prop {Color} background-color [rgb(240, 240, 240)] The background color of the Callout.
29
- /// @prop {Boolean} border [true] The border of the Callout.
26
+ /// @prop {Color} border-color ["rule-light"] The border color of the Callout.
30
27
  /// @prop {Boolean} border-radius [true] The border radius of the Callout.
28
+ /// @prop {Dimension} border-width [1px] The border width of the Callout.
31
29
  /// @prop {CssValue} box-shadow [none] The box-shadow of the Callout.
32
30
  /// @prop {Boolean} left-cap [false] Toggles the use of left caps in styled callouts.
33
31
  /// @prop {Color} left-cap-color [green] Color of the left cap.
@@ -37,58 +35,41 @@ $-fallbacks: (
37
35
 
38
36
  $config: (
39
37
  "background-color" : rgb(240, 240, 240),
40
- "border" : true,
38
+ "border-color" : "rule-light",
41
39
  "border-radius" : true,
40
+ "border-width" : 1px,
42
41
  "box-shadow" : none,
43
- "left-cap" : false,
44
- "left-cap-color" : green,
42
+ "left-cap" : true,
43
+ "left-cap-color" : rgb(160, 160, 160),
45
44
  "left-cap-width" : 0.5rem,
46
45
  "margin" : 2rem,
47
46
  "padding" : 1.5rem,
48
47
  ) !default;
49
48
 
50
49
  $styles: (
51
- "background-dark" : (
52
- "background-color" : rgb(240, 240, 240)
53
- ),
54
50
  "outline" : (
55
51
  "background-color": transparent
56
52
  ),
57
- "light" : (
58
- "background-color" : white,
59
- "border-color" : gray
60
- ),
61
- "informative" : (
62
- "background-color" : #e7f6f8,
63
- "left-cap-color" : #00bde3,
53
+ "info" : (
54
+ "background-color" : "info-background",
55
+ "left-cap-color" : "info",
64
56
  "left-cap" : true,
65
- "left-cap-width": 0.5rem
66
57
  ),
67
58
  "warning" : (
68
- "background-color" : #faf3d1,
69
- "left-cap-color" : #ffbe2e,
59
+ "background-color" : "info-background",
60
+ "left-cap-color" : "info",
70
61
  "left-cap" : true,
71
- "left-cap-width": 0.5rem
72
62
  ),
73
63
  "success" : (
74
- "background-color" : #ecf3ec,
75
- "left-cap-color" : #00a91c,
64
+ "background-color" : "success-background",
65
+ "left-cap-color" : "success",
76
66
  "left-cap" : true,
77
- "left-cap-width": 0.5rem
78
67
  ),
79
68
  "danger" : (
80
- "background-color" : #f4e3db,
81
- "left-cap-color" : #d54309,
69
+ "background-color" : "danger-background",
70
+ "left-cap-color" : "danger",
82
71
  "left-cap" : true,
83
- "left-cap-width": 0.5rem
84
72
  ),
85
- "emergency" : (
86
- "background-color" : #9c3d10,
87
- "left-cap-color" : #9c3d10,
88
- "left-cap" : true,
89
- "color" : white,
90
- "left-cap-width": 0.5rem
91
- )
92
73
  ) !default;
93
74
 
94
75
  /// Change modules $config
@@ -118,22 +99,14 @@ $styles: (
118
99
  $styles: utils.map-merge($styles, $changes, $merge-mode) !global;
119
100
  }
120
101
 
121
- /// Output styling for a callout that adds a left cap
122
- /// @param {Dimension} $width The width of the left cap
123
- /// @param {Color} $color The left cap color
124
-
125
- @mixin left-cap($width: get("left-cap-width"), $color: get("left-cap-color")) {
102
+ @mixin -left-cap($color: get("left-cap-color")) {
103
+ $left-padding: get-spacing-left(get("padding"));
126
104
  position: relative;
127
105
  border-top-left-radius: 0;
128
106
  border-bottom-left-radius: 0;
107
+ padding-left: get("left-cap-width") + $left-padding;
129
108
  &::before {
130
- position: absolute;
131
109
  content: "";
132
- left: 0;
133
- top: 0;
134
- bottom: 0;
135
- width: $width;
136
- background-color: $color;
137
110
  }
138
111
  }
139
112
 
@@ -143,32 +116,48 @@ $styles: (
143
116
 
144
117
  @mixin styles {
145
118
  $prefix: selector.class("callout");
146
-
119
+
147
120
  #{ $prefix } {
148
- background-color: get("background-color");
121
+ background-color: color.get(get("background-color"));
149
122
  padding: get("padding");
150
- border: get("border");
123
+ border: get("border-width") solid color.get(get("border-color"));
151
124
  margin-bottom: get("margin");
152
125
  box-shadow: get("box-shadow");
153
126
  border-radius: get("border-radius");
154
127
  & >:first-child {
155
128
  margin-top: 0;
156
129
  }
130
+ &::before {
131
+ position: absolute;
132
+ left: 0 - get("border-width");
133
+ top: 0 - get("border-width");
134
+ bottom: 0 - get("border-width");
135
+ width: get("left-cap-width");
136
+ background-color: color.get(get("left-cap-color"));
137
+ }
157
138
  @if get("left-cap") {
158
- @include left-cap();
139
+ @include -left-cap();
140
+ &::before {
141
+ content: "";
142
+ }
159
143
  }
160
144
  }
161
145
  @each $name, $style in $styles {
162
146
  #{ $prefix }--#{ $name } {
163
- background-color: map.get($style, "background-color");
164
- color: map.get($style, "color");
147
+ background-color: color.get(map.get($style, "background-color"));
148
+ color: color.get(map.get($style, "color"));
165
149
  border: map.get($style, "border");
166
150
  border-radius: map.get($style, "border-radius");
167
- border-color: map.get($style, "border-color");
151
+ border-color: color.get(map.get($style, "border-color"));
168
152
  box-shadow: map.get($style, "box-shadow");
169
153
  padding: map.get($style, "padding");
154
+ &::before {
155
+ background-color: color.get(map.get($style, "left-cap-color"));
156
+ }
170
157
  @if map.get($style, "left-cap") {
171
- @include left-cap( map.get($style, "left-cap-width"), map.get($style, "left-cap-color"));
158
+ @if not get("left-cap") {
159
+ @include -left-cap();
160
+ }
172
161
  }
173
162
  }
174
163
  }
@@ -10,6 +10,7 @@
10
10
  @use "../utils";
11
11
  @use "../element";
12
12
  @use "../typography";
13
+ @use "../color";
13
14
 
14
15
  // Used for function fallback
15
16
  $-fallbacks: (
@@ -29,6 +30,23 @@ $-fallbacks: (
29
30
 
30
31
  /// Module Settings
31
32
  /// @type Map
33
+ /// @prop {Boolean} text-alignment-matches [false] Toggles matching alignment.
34
+ /// @prop {Boolean} text-alignment-matches-center-only [true] Toggles matching alignment, but only if center.
35
+ /// @prop {Color} background-color [white] Background color of the component.
36
+ /// @prop {CssValue} box-shadow [true] Box shadow the captioned figure.
37
+ /// @prop {Dimension} margin-bottom [true] Bottom margin of the captioned figure.
38
+ /// @prop {Number} line-height [true] Line height of the captioned figure caption.
39
+ /// @prop {Dimension} caption-padding [0.5em] Padding of the captioned figure caption.
40
+ /// @prop {Color} color [null] Font color of the captioned figure caption.
41
+ /// @prop {String} type-size ["small"] Font size of the captioned figure caption.
42
+ /// @prop {Dimension} caption-max-width [min(100%, 15em)] Max width of the captioned figure caption.
43
+ /// @prop {Color} caption-background-color [rgba(255,255,255,0.7)] background color of the captioned figure caption.
44
+ /// @prop {CssValue} caption-backdrop-filter [blur(2px)] Filter of the backdrop of the captioned figure.
45
+ /// @prop {Color} traditional-caption-color [null] Traditional style for font color.
46
+ /// @prop {Color} traditional-caption-background-color [transparent] Traditional style for caption background color.
47
+ /// @prop {Dimension} traditional-caption-padding [0.5em] Traditional style for caption padding.
48
+ /// @prop {Dimension} traditional-caption-max-width [35em] Traditional style for caption max width.
49
+ /// @prop {CssValue} traditional-caption-text-align [right] Traditional style for caption text-align.
32
50
 
33
51
  $config: (
34
52
  "text-alignment-matches" : false,
@@ -82,7 +100,7 @@ $config: (
82
100
  display: block;
83
101
  position: relative;
84
102
  margin-bottom: get("margin-bottom");
85
- background-color: get("background-color");
103
+ background-color: color.get(get("background-color"));
86
104
  > img {
87
105
  width: 100%;
88
106
  height: auto;
@@ -101,20 +119,20 @@ $config: (
101
119
  }
102
120
  #{ $prefix }__caption {
103
121
  position: absolute;
104
- color: get("color");
122
+ color: color.get(get("color"));
105
123
  @include typography.size(get("type-size"), $only-font-size: true);
106
124
  line-height: get("line-height");
107
125
  max-width: get("caption-max-width");
108
- background-color: get("caption-background-color");
126
+ background-color: color.get(get("caption-background-color"));
109
127
  padding: get("caption-padding");
110
128
  backdrop-filter: get("caption-backdrop-filter");
111
129
  }
112
130
  #{ $prefix }--traditional {
113
131
  #{ $prefix }__caption {
114
132
  position: static;
115
- color: get("traditional-caption-color");
133
+ color: color.get(get("traditional-caption-color"));
116
134
  max-width: get("traditional-caption-max-width");
117
- background-color: get("traditional-caption-background-color");
135
+ background-color: color.get(get("traditional-caption-background-color"));
118
136
  padding: get("traditional-caption-padding");
119
137
  text-align: get("traditional-caption-text-align");
120
138
  @if (get("traditional-caption-text-align") == right) {
@@ -51,7 +51,7 @@ $config: (
51
51
 
52
52
  #{ $prefix } {
53
53
  display: grid;
54
- grid-template-columns: get("template-columns");
54
+ grid-template-columns: get("template-columns");
55
55
  grid-auto-rows: 1fr;
56
56
  gap: get("gap");
57
57
  margin: get("gap") 0;