@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.
- package/CHANGELOG.md +133 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +18 -18
- package/docs-dev/changelog/index.html +5397 -0
- package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
- package/docs-dev/demos/accordion/index.html +636 -293
- package/docs-dev/demos/basic-hero/index.html +111 -0
- package/docs-dev/demos/button/index.html +636 -293
- package/docs-dev/demos/callout/index.html +661 -305
- package/docs-dev/demos/captioned-figure/index.html +636 -293
- package/docs-dev/demos/card/index.html +636 -293
- package/docs-dev/demos/css-icons/index.html +636 -293
- package/docs-dev/demos/data-grid/index.html +744 -481
- package/docs-dev/demos/data-table/index.html +661 -318
- package/docs-dev/demos/details-group/index.html +4994 -0
- package/docs-dev/demos/file-save/index.html +636 -293
- package/docs-dev/demos/flipcard/index.html +636 -293
- package/docs-dev/demos/form-theme/index.html +654 -324
- package/docs-dev/demos/hero/index.html +12 -4
- package/docs-dev/demos/image-grid/index.html +12 -4
- package/docs-dev/demos/index.html +636 -293
- package/docs-dev/demos/list-inline/index.html +4980 -0
- package/docs-dev/demos/list-inline.1/index.html +4727 -0
- package/docs-dev/demos/list-lines/index.html +4970 -0
- package/docs-dev/demos/menu-stack/index.html +655 -312
- package/docs-dev/demos/modals/index.html +636 -293
- package/docs-dev/demos/nav-strip/index.html +656 -349
- package/docs-dev/demos/overlay-section/index.html +636 -293
- package/docs-dev/demos/popovers/index.html +636 -293
- package/docs-dev/demos/print/index.html +636 -293
- package/docs-dev/demos/pull-quote/index.html +636 -293
- package/docs-dev/demos/rule/index.html +636 -293
- package/docs-dev/demos/scroll-slider/index.html +12 -4
- package/docs-dev/demos/scrollpoints/index.html +636 -293
- package/docs-dev/demos/slider/index.html +12 -4
- package/docs-dev/demos/spoke-spinner/index.html +636 -293
- package/docs-dev/demos/tabs/index.html +648 -293
- package/docs-dev/demos/tag/index.html +636 -293
- package/docs-dev/demos/theme-toggle/index.html +5039 -0
- package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
- package/docs-dev/demos/tiles/index.html +636 -293
- package/docs-dev/demos/tooltip/index.html +636 -293
- package/docs-dev/guide/building-stylesheet/index.html +636 -293
- package/docs-dev/guide/developing-ulu-scss-module/index.html +636 -293
- package/docs-dev/guide/index.html +637 -294
- package/docs-dev/guide/updates-and-changes/index.html +5033 -0
- package/docs-dev/index.html +641 -293
- package/docs-dev/javascript/events/index.html +633 -292
- package/docs-dev/javascript/index.html +636 -293
- package/docs-dev/javascript/settings/index.html +5094 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +633 -292
- package/docs-dev/javascript/ui-collapsible/index.html +633 -292
- package/docs-dev/javascript/ui-details-group/index.html +5094 -0
- package/docs-dev/javascript/ui-dialog/index.html +633 -292
- package/docs-dev/javascript/ui-flipcard/index.html +633 -292
- package/docs-dev/javascript/ui-grid/index.html +633 -292
- package/docs-dev/javascript/ui-modal-builder/index.html +633 -292
- package/docs-dev/javascript/ui-overflow-scroller/index.html +633 -292
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +633 -292
- package/docs-dev/javascript/ui-page/index.html +633 -292
- package/docs-dev/javascript/ui-popover/index.html +633 -292
- package/docs-dev/javascript/ui-print/index.html +633 -292
- package/docs-dev/javascript/ui-print-details/index.html +633 -292
- package/docs-dev/javascript/ui-programmatic-modal/index.html +633 -292
- package/docs-dev/javascript/ui-proxy-click/index.html +633 -292
- package/docs-dev/javascript/ui-resizer/index.html +633 -292
- package/docs-dev/javascript/ui-scroll-slider/index.html +633 -292
- package/docs-dev/javascript/ui-scrollpoint/index.html +633 -292
- package/docs-dev/javascript/ui-slider/index.html +633 -292
- package/docs-dev/javascript/ui-tabs/index.html +633 -292
- package/docs-dev/javascript/ui-theme-toggle/index.html +5178 -0
- package/docs-dev/javascript/ui-tooltip/index.html +633 -292
- package/docs-dev/javascript/utils-class-logger/index.html +633 -292
- package/docs-dev/javascript/utils-dom/index.html +697 -296
- package/docs-dev/javascript/utils-file-save/index.html +633 -292
- package/docs-dev/javascript/utils-floating-ui/index.html +633 -292
- package/docs-dev/javascript/utils-id/index.html +633 -292
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +633 -292
- package/docs-dev/sass/base/color/index.html +633 -292
- package/docs-dev/sass/base/elements/index.html +633 -292
- package/docs-dev/sass/base/index/index.html +633 -292
- package/docs-dev/sass/base/index.html +636 -293
- package/docs-dev/sass/base/keyframes/index.html +633 -292
- package/docs-dev/sass/base/layout/index.html +633 -292
- package/docs-dev/sass/base/normalize/index.html +633 -292
- package/docs-dev/sass/base/print/index.html +633 -292
- package/docs-dev/sass/base/root/index.html +633 -292
- package/docs-dev/sass/base/typography/index.html +633 -292
- package/docs-dev/sass/components/accordion/index.html +638 -297
- package/docs-dev/sass/components/adaptive-spacing/index.html +633 -292
- package/docs-dev/sass/components/badge/index.html +641 -300
- package/docs-dev/sass/components/basic-hero/index.html +5145 -0
- package/docs-dev/sass/components/button/index.html +633 -292
- package/docs-dev/sass/components/button-verbose/index.html +634 -293
- package/docs-dev/sass/components/callout/index.html +658 -353
- package/docs-dev/sass/components/captioned-figure/index.html +756 -300
- package/docs-dev/sass/components/card/index.html +665 -309
- package/docs-dev/sass/components/card-grid/index.html +633 -292
- package/docs-dev/sass/components/css-icon/index.html +650 -302
- package/docs-dev/sass/components/data-grid/index.html +633 -292
- package/docs-dev/sass/components/data-table/index.html +829 -303
- package/docs-dev/sass/components/fill-context/index.html +633 -292
- package/docs-dev/sass/components/flipcard/index.html +641 -300
- package/docs-dev/sass/components/flipcard-grid/index.html +633 -292
- package/docs-dev/sass/components/form-theme/index.html +761 -319
- package/docs-dev/sass/components/hero/index.html +689 -300
- package/docs-dev/sass/components/horizontal-rule/index.html +633 -292
- package/docs-dev/sass/components/image-grid/index.html +633 -292
- package/docs-dev/sass/components/index/index.html +645 -302
- package/docs-dev/sass/components/index.html +636 -293
- package/docs-dev/sass/components/links/index.html +633 -292
- package/docs-dev/sass/components/list-inline/index.html +5159 -0
- package/docs-dev/sass/components/list-lines/index.html +665 -328
- package/docs-dev/sass/components/list-ordered/index.html +635 -294
- package/docs-dev/sass/components/list-unordered/index.html +633 -292
- package/docs-dev/sass/components/menu-stack/index.html +667 -313
- package/docs-dev/sass/components/modal/index.html +654 -306
- package/docs-dev/sass/components/nav-strip/index.html +645 -304
- package/docs-dev/sass/components/overlay-section/index.html +641 -300
- package/docs-dev/sass/components/pager/index.html +633 -292
- package/docs-dev/sass/components/placeholder-block/index.html +633 -292
- package/docs-dev/sass/components/popover/index.html +663 -292
- package/docs-dev/sass/components/pull-quote/index.html +645 -304
- package/docs-dev/sass/components/ratio-box/index.html +633 -292
- package/docs-dev/sass/components/rule/index.html +641 -300
- package/docs-dev/sass/components/scroll-slider/index.html +633 -292
- package/docs-dev/sass/components/skip-link/index.html +641 -300
- package/docs-dev/sass/components/slider/index.html +640 -299
- package/docs-dev/sass/components/spoke-spinner/index.html +633 -292
- package/docs-dev/sass/components/tabs/index.html +648 -300
- package/docs-dev/sass/components/tag/index.html +633 -292
- package/docs-dev/sass/components/tile-button/index.html +633 -292
- package/docs-dev/sass/components/tile-grid/index.html +633 -292
- package/docs-dev/sass/components/tile-grid-overlay/index.html +633 -292
- package/docs-dev/sass/components/vignette/index.html +647 -300
- package/docs-dev/sass/components/wysiwyg/index.html +633 -292
- package/docs-dev/sass/core/breakpoint/index.html +633 -292
- package/docs-dev/sass/core/button/index.html +633 -292
- package/docs-dev/sass/core/color/index.html +671 -323
- package/docs-dev/sass/core/cssvar/index.html +633 -292
- package/docs-dev/sass/core/element/index.html +633 -292
- package/docs-dev/sass/core/index.html +633 -292
- package/docs-dev/sass/core/layout/index.html +633 -292
- package/docs-dev/sass/core/path/index.html +633 -292
- package/docs-dev/sass/core/selector/index.html +633 -292
- package/docs-dev/sass/core/typography/index.html +633 -292
- package/docs-dev/sass/core/units/index.html +633 -292
- package/docs-dev/sass/core/utils/index.html +633 -292
- package/docs-dev/sass/helpers/color/index.html +633 -292
- package/docs-dev/sass/helpers/display/index.html +633 -292
- package/docs-dev/sass/helpers/index/index.html +633 -292
- package/docs-dev/sass/helpers/index.html +636 -293
- package/docs-dev/sass/helpers/print/index.html +633 -292
- package/docs-dev/sass/helpers/typography/index.html +633 -292
- package/docs-dev/sass/helpers/units/index.html +633 -292
- package/docs-dev/sass/helpers/utilities/index.html +633 -292
- package/docs-dev/sass/index.html +636 -293
- package/js/index.js +1 -0
- package/js/settings.js +78 -0
- package/js/ui/details-group.js +121 -0
- package/js/ui/index.js +1 -0
- package/js/ui/modal-builder.js +3 -2
- package/js/ui/overflow-scroller.js +5 -4
- package/js/ui/programmatic-modal.js +9 -3
- package/js/ui/slider.js +7 -6
- package/js/ui/theme-toggle.js +330 -89
- package/js/utils/dom.js +43 -1
- package/js/utils/font-awesome.js +18 -0
- package/js/utils/index.js +2 -1
- package/package.json +3 -2
- package/scss/_color.scss +9 -2
- package/scss/components/README.todos +14 -0
- package/scss/components/_accordion.scss +13 -13
- package/scss/components/_badge.scss +3 -2
- package/scss/components/_basic-hero.scss +112 -0
- package/scss/components/_button-verbose.scss +3 -2
- package/scss/components/_callout.scss +43 -54
- package/scss/components/_captioned-figure.scss +23 -5
- package/scss/components/_card-grid.scss +1 -1
- package/scss/components/_card.scss +52 -37
- package/scss/components/_css-icon.scss +16 -11
- package/scss/components/_data-table.scss +41 -4
- package/scss/components/_flipcard.scss +13 -12
- package/scss/components/_form-theme.scss +47 -47
- package/scss/components/_hero.scss +9 -0
- package/scss/components/_index.scss +12 -0
- package/scss/components/_list-inline.scss +80 -0
- package/scss/components/_list-lines.scss +44 -33
- package/scss/components/_list-ordered.scss +0 -1
- package/scss/components/_menu-stack.scss +42 -26
- package/scss/components/_modal.scss +23 -19
- package/scss/components/_nav-strip.scss +25 -16
- package/scss/components/_overlay-section.scss +2 -1
- package/scss/components/_pager.scss +6 -6
- package/scss/components/_placeholder-block.scss +4 -4
- package/scss/components/_popover.scss +38 -38
- package/scss/components/_pull-quote.scss +12 -12
- package/scss/components/_rule.scss +0 -1
- package/scss/components/_scroll-slider.scss +1 -1
- package/scss/components/_skip-link.scss +2 -1
- package/scss/components/_slider.scss +17 -38
- package/scss/components/_tabs.scss +42 -52
- package/scss/components/_tag.scss +1 -1
- package/scss/components/_vignette.scss +1 -0
- package/types/index.d.ts +1 -0
- package/types/settings.d.ts +38 -0
- package/types/settings.d.ts.map +1 -0
- package/types/ui/details-group.d.ts +43 -0
- package/types/ui/details-group.d.ts.map +1 -0
- package/types/ui/index.d.ts +1 -0
- package/types/ui/modal-builder.d.ts +2 -2
- package/types/ui/modal-builder.d.ts.map +1 -1
- package/types/ui/overflow-scroller.d.ts +2 -2
- package/types/ui/overflow-scroller.d.ts.map +1 -1
- package/types/ui/programmatic-modal.d.ts.map +1 -1
- package/types/ui/slider.d.ts +2 -2
- package/types/ui/slider.d.ts.map +1 -1
- package/types/ui/tabs.d.ts.map +1 -1
- package/types/ui/theme-toggle.d.ts +58 -7
- package/types/ui/theme-toggle.d.ts.map +1 -1
- package/types/utils/dom.d.ts +19 -1
- package/types/utils/dom.d.ts.map +1 -1
- package/types/utils/font-awesome.d.ts +5 -0
- package/types/utils/font-awesome.d.ts.map +1 -0
- 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 [
|
|
17
|
-
/// @prop {Color} background-color-open [
|
|
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":
|
|
45
|
-
"background-color-open":
|
|
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 {
|
|
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" :
|
|
38
|
+
"border-color" : "rule-light",
|
|
41
39
|
"border-radius" : true,
|
|
40
|
+
"border-width" : 1px,
|
|
42
41
|
"box-shadow" : none,
|
|
43
|
-
"left-cap" :
|
|
44
|
-
"left-cap-color" :
|
|
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
|
-
"
|
|
58
|
-
"background-color" :
|
|
59
|
-
"
|
|
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" :
|
|
69
|
-
"left-cap-color" :
|
|
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" :
|
|
75
|
-
"left-cap-color" :
|
|
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" :
|
|
81
|
-
"left-cap-color" :
|
|
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
|
-
|
|
122
|
-
|
|
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
|
-
@
|
|
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) {
|