@ulu/frontend 0.0.23 → 0.1.0-beta.0
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/deprecated/js/drupal-programmatic-modal.js +91 -0
- package/{js/ui/modals.js → deprecated/js/micromodal-modals.js} +41 -67
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +70 -1
- package/index.js +6 -1
- package/js/events/index.js +58 -7
- package/js/index.js +3 -7
- package/js/{helpers/css-breakpoint.js → ui/breakpoints.js} +9 -11
- package/js/ui/collapsible.js +195 -0
- package/js/ui/dialog.js +157 -0
- package/js/ui/dialog.todo +37 -0
- package/js/ui/flipcard.js +55 -11
- package/js/ui/grid.js +2 -47
- package/js/ui/index.js +21 -0
- package/js/ui/modal-builder.js +197 -0
- package/js/ui/overflow-scroller-pager.js +1 -1
- package/js/ui/overflow-scroller.js +8 -5
- package/js/ui/page.js +14 -0
- package/js/ui/popover.js +135 -0
- package/js/ui/print-details.js +44 -0
- package/js/ui/print.js +67 -0
- package/js/ui/programmatic-modal.js +79 -81
- package/js/ui/proxy-click.js +80 -0
- package/js/ui/resizer.js +3 -3
- package/js/ui/scroll-slider.js +56 -0
- package/js/ui/scrollpoint.js +300 -0
- package/js/ui/slider.js +72 -10
- package/js/ui/tabs.js +85 -58
- package/js/ui/theme-toggle.js +129 -0
- package/js/ui/tooltip.js +268 -67
- package/js/utils/{logger.js → class-logger.js} +6 -5
- package/js/utils/dom.js +122 -0
- package/js/utils/file-save.js +67 -0
- package/js/utils/floating-ui.js +83 -0
- package/js/utils/id.js +22 -0
- package/js/utils/index.js +7 -0
- package/js/{helpers → utils}/pause-youtube-video.js +1 -1
- package/package.json +32 -11
- package/resources/drupal/twig-macros/accordion.twig +99 -0
- package/resources/drupal/twig-macros/dropdown.twig +44 -0
- package/resources/drupal/twig-macros/flipcard.twig +69 -0
- package/resources/drupal/twig-macros/image.twig +30 -0
- package/resources/drupal/twig-macros/layout.twig +338 -0
- package/resources/drupal/twig-macros/slider.twig +214 -0
- package/resources/drupal/twig-macros/tabs.twig +84 -0
- package/scss/README.md +13 -1
- package/scss/_breakpoint.scss +69 -26
- package/scss/_button.scss +148 -57
- package/scss/_color.scss +46 -28
- package/scss/_cssvar.scss +103 -12
- package/scss/_element.scss +84 -67
- package/scss/_index.scss +0 -3
- package/scss/_layout.scss +57 -26
- package/scss/_path.scss +2 -2
- package/scss/_selector.scss +20 -11
- package/scss/_typography.scss +115 -82
- package/scss/_units.scss +14 -13
- package/scss/_utils.scss +280 -18
- package/scss/base/_color.scss +2 -1
- package/scss/base/_elements.scss +61 -35
- package/scss/base/_index.scss +60 -23
- package/scss/base/_keyframes.scss +115 -16
- package/scss/base/_layout.scss +10 -6
- package/scss/base/_normalize.scss +6 -122
- package/scss/base/_print.scss +49 -0
- package/scss/base/_root.scss +28 -0
- package/scss/base/_typography.scss +4 -1
- package/scss/components/_accordion.scss +217 -0
- package/scss/components/_adaptive-spacing.scss +148 -0
- package/scss/components/_badge.scss +17 -14
- package/scss/components/_button-verbose.scss +138 -0
- package/scss/components/_button.scss +9 -4
- package/scss/components/_callout.scss +175 -0
- package/scss/components/_captioned-figure.scss +173 -0
- package/scss/components/_card-grid.scss +75 -0
- package/scss/components/_card.scss +420 -0
- package/scss/components/_css-icon.scss +433 -0
- package/scss/{_grid.scss → components/_data-grid.scss} +100 -68
- package/scss/components/_data-table.scss +180 -0
- package/scss/components/_fill-context.scss +20 -22
- package/scss/components/_flipcard-grid.scss +66 -0
- package/scss/components/_flipcard.scss +304 -0
- package/scss/components/_form-theme.scss +633 -0
- package/scss/components/_hero.scss +183 -0
- package/scss/components/_horizontal-rule.scss +51 -0
- package/scss/components/_image-grid.scss +71 -0
- package/scss/components/_index.scss +276 -38
- package/scss/components/_links.scss +1 -1
- package/scss/components/_list-lines.scss +14 -3
- package/scss/components/_list-ordered.scss +3 -1
- package/scss/components/_list-unordered.scss +3 -1
- package/scss/components/_menu-stack.scss +245 -0
- package/scss/components/_modal.scss +495 -0
- package/scss/components/_nav-strip.scss +148 -0
- package/scss/components/_overlay-section.scss +122 -0
- package/scss/components/_pager.scss +168 -0
- package/scss/components/_placeholder-block.scss +121 -0
- package/scss/components/_popover.scss +263 -0
- package/scss/components/_pull-quote.scss +111 -0
- package/scss/components/_ratio-box.scss +64 -0
- package/scss/components/_rule.scss +12 -9
- package/scss/components/_scroll-slider.scss +204 -0
- package/scss/components/_skip-link.scss +92 -0
- package/scss/components/_slider.scss +241 -0
- package/scss/components/_spoke-spinner.scss +193 -0
- package/scss/components/_tabs.scss +179 -0
- package/scss/components/_tag.scss +142 -0
- package/scss/components/_tile-button.scss +131 -0
- package/scss/components/_tile-grid-overlay.scss +132 -0
- package/scss/components/_tile-grid.scss +172 -0
- package/scss/components/_vignette.scss +65 -0
- package/scss/components/_wysiwyg.scss +94 -0
- package/scss/helpers/_color.scss +1 -0
- package/scss/helpers/_display.scss +2 -1
- package/scss/helpers/_index.scss +45 -22
- package/scss/helpers/_print.scss +20 -43
- package/scss/helpers/_typography.scss +3 -0
- package/scss/helpers/_units.scss +10 -13
- package/scss/helpers/_utilities.scss +5 -1
- package/scss/stylesheets/base-styles.scss +7 -0
- package/scss/stylesheets/component-styles.scss +7 -0
- package/scss/stylesheets/helper-styles.scss +7 -0
- package/types/events/index.d.ts +1 -1
- package/types/events/index.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/{helpers/css-breakpoint.d.ts → ui/breakpoints.d.ts} +3 -3
- package/types/ui/breakpoints.d.ts.map +1 -0
- package/types/ui/collapsible.d.ts +67 -0
- package/types/ui/collapsible.d.ts.map +1 -0
- package/types/ui/dialog.d.ts +42 -0
- package/types/ui/dialog.d.ts.map +1 -0
- package/types/ui/flipcard.d.ts +8 -1
- package/types/ui/flipcard.d.ts.map +1 -1
- package/types/ui/grid.d.ts +0 -11
- package/types/ui/grid.d.ts.map +1 -1
- package/types/ui/index.d.ts +23 -0
- package/types/ui/index.d.ts.map +1 -0
- package/types/ui/modal-builder.d.ts +54 -0
- package/types/ui/modal-builder.d.ts.map +1 -0
- package/types/ui/overflow-scroller-pager.d.ts +1 -1
- package/types/ui/overflow-scroller-pager.d.ts.map +1 -1
- package/types/ui/overflow-scroller.d.ts +3 -1
- package/types/ui/overflow-scroller.d.ts.map +1 -1
- package/types/ui/page.d.ts +5 -0
- package/types/ui/page.d.ts.map +1 -0
- package/types/ui/popover.d.ts +40 -0
- package/types/ui/popover.d.ts.map +1 -0
- package/types/ui/print-details.d.ts +10 -0
- package/types/ui/print-details.d.ts.map +1 -0
- package/types/ui/print.d.ts +10 -0
- package/types/ui/print.d.ts.map +1 -0
- package/types/ui/programmatic-modal.d.ts +19 -1
- package/types/ui/programmatic-modal.d.ts.map +1 -1
- package/types/ui/proxy-click.d.ts +18 -0
- package/types/ui/proxy-click.d.ts.map +1 -0
- package/types/ui/resizer.d.ts +1 -1
- package/types/ui/resizer.d.ts.map +1 -1
- package/types/ui/scroll-slider.d.ts +13 -0
- package/types/ui/scroll-slider.d.ts.map +1 -0
- package/types/ui/scrollpoint.d.ts +133 -0
- package/types/ui/scrollpoint.d.ts.map +1 -0
- package/types/ui/slider.d.ts +14 -2
- package/types/ui/slider.d.ts.map +1 -1
- package/types/ui/tabs.d.ts +22 -0
- package/types/ui/tabs.d.ts.map +1 -1
- package/types/ui/theme-toggle.d.ts +14 -0
- package/types/ui/theme-toggle.d.ts.map +1 -0
- package/types/ui/tooltip.d.ts +92 -10
- package/types/ui/tooltip.d.ts.map +1 -1
- package/types/utils/{logger.d.ts → class-logger.d.ts} +1 -1
- package/types/utils/class-logger.d.ts.map +1 -0
- package/types/utils/dom.d.ts +48 -0
- package/types/utils/dom.d.ts.map +1 -0
- package/types/utils/file-save.d.ts +64 -0
- package/types/utils/file-save.d.ts.map +1 -0
- package/types/utils/floating-ui.d.ts +19 -0
- package/types/utils/floating-ui.d.ts.map +1 -0
- package/types/utils/id.d.ts +10 -0
- package/types/utils/id.d.ts.map +1 -0
- package/types/utils/index.d.ts +9 -0
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/pause-youtube-video.d.ts.map +1 -0
- package/js/helpers/file-save.js +0 -52
- package/js/helpers/scrollbar-width-property.js +0 -14
- package/project.todo +0 -22
- package/scss/_calculate.scss +0 -64
- package/scss/_utility.scss +0 -12
- package/types/helpers/css-breakpoint.d.ts.map +0 -1
- package/types/helpers/file-save.d.ts +0 -17
- package/types/helpers/file-save.d.ts.map +0 -1
- package/types/helpers/node-data-manager.d.ts +0 -45
- package/types/helpers/node-data-manager.d.ts.map +0 -1
- package/types/helpers/pause-youtube-video.d.ts.map +0 -1
- package/types/helpers/scrollbar-width-property.d.ts +0 -11
- package/types/helpers/scrollbar-width-property.d.ts.map +0 -1
- package/types/ui/modals.d.ts +0 -27
- package/types/ui/modals.d.ts.map +0 -1
- package/types/utils/logger.d.ts.map +0 -1
- package/vite.config.js +0 -36
- /package/{js/deprecated → deprecated/js}/doc-ready.js +0 -0
- /package/{js/deprecated → deprecated/js}/jquery-prototypes.js +0 -0
- /package/{js/deprecated → deprecated/js}/mini-collapsible-popper-positioning.js +0 -0
- /package/{js/deprecated → deprecated/js}/mini-collapsible.js +0 -0
- /package/{js/helpers → deprecated/js}/node-data-manager.js +0 -0
- /package/{js/deprecated → deprecated/js}/script-loader.js +0 -0
- /package/{js/deprecated → deprecated/js}/waypoints/README.md +0 -0
- /package/{js/deprecated → deprecated/js}/waypoints/anchor-menu.js +0 -0
- /package/{js/deprecated → deprecated/js}/waypoints/element-waypoint.js +0 -0
- /package/{js/deprecated → deprecated/js}/waypoints/examples/page-link-menu.md +0 -0
- /package/{js/deprecated → deprecated/js}/waypoints/state-in-attribute.js +0 -0
- /package/types/{helpers → utils}/pause-youtube-video.d.ts +0 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group card
|
|
3
|
+
/// A versatile container for displaying and summarizing individual items, entities, or resources in a visually appealing and concise format
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
@use 'sass:list';
|
|
8
|
+
|
|
9
|
+
@use "../breakpoint";
|
|
10
|
+
@use "../utils";
|
|
11
|
+
@use "../selector";
|
|
12
|
+
|
|
13
|
+
// todo
|
|
14
|
+
// sass color adjust for smooth transition. Add a comment for this if we can’t get to this
|
|
15
|
+
|
|
16
|
+
/// Module Settings
|
|
17
|
+
/// @type Map
|
|
18
|
+
/// @prop {Dimension} padding [2rem] The padding for the image icon
|
|
19
|
+
/// @prop {Dimension} margin-y [3rem] Top and bottom margin for the card.
|
|
20
|
+
/// @prop {Dimension} border-radius [5rem] The border radius of the card.
|
|
21
|
+
/// @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.
|
|
22
|
+
/// @prop {CssValue} box-shadow [null] The box-shadow for the card.
|
|
23
|
+
/// @prop {CssValue} box-shadow-hover [null] The box-shadow for the card when hovered or focused.
|
|
24
|
+
/// @prop {Color} color [null] The type color of the card.
|
|
25
|
+
/// @prop {Color} color-hover [null] The type color of the card when hovered or focused.
|
|
26
|
+
/// @prop {Color} color-overlay [white] The type color of the card when using card--overlay.
|
|
27
|
+
/// @prop {Color} color-overlay-hover [null] The type color of the card when hovered or focused and when using card--overlay.
|
|
28
|
+
/// @prop {Color} overlay-background-color [rgba(0, 0, 0, 0.6)] The background color for the text box when using card--overlay.
|
|
29
|
+
/// @prop {Color} background-color [white] The background color of the card.
|
|
30
|
+
/// @prop {Color} background-color-hover [rgb(242, 244, 246)] The background color of the card when hovered or focused.
|
|
31
|
+
/// @prop {Dimension} max-width [28rem] The max-width of the card.
|
|
32
|
+
/// @prop {Dimension} body-min-height [10rem] the min-height of the card body.
|
|
33
|
+
/// @prop {CssValue} border [1px solid #ccc] The card border.
|
|
34
|
+
/// @prop {CssValue} border-hover [2px solid #278cca] The card border when hovered or focused.
|
|
35
|
+
/// @prop {Dimension} header-margin [0.75em] The margin for the card header.
|
|
36
|
+
/// @prop {Color} title-color [null] The type color of the title.
|
|
37
|
+
/// @prop {Color} title-color-hover [null] The type color of the title (if link/button) when hovered or focused
|
|
38
|
+
/// @prop {Dimension} title-margin [0] The margin for the title.
|
|
39
|
+
/// @prop {CssValue} title-font-weight [bold] The font weight for the title.
|
|
40
|
+
/// @prop {Number} image-ratio [56.25%] The image ratio for the card image.
|
|
41
|
+
/// @prop {Color} image-background-color [rgb(197, 197, 197)] The background color behind the image.
|
|
42
|
+
/// @prop {Dimension} image-margin [null] The margin for the image.
|
|
43
|
+
/// @prop {Dimension} image-border [null] // For when you have a margin, the border for the image.
|
|
44
|
+
/// @prop {CssValue} image-transform-hover [null] Animation for the image when hovered or focused.
|
|
45
|
+
/// @prop {CssValue} image-filter-hover [null] Filter for the image when hovered or focused.
|
|
46
|
+
/// @prop {Color} overlay-background-color-hover [null] The color of the pseudo-element when using proxy click.
|
|
47
|
+
/// @prop {Boolean} clickable-card-enabled [true] Enable or disable proxy click.
|
|
48
|
+
/// @prop {String} clickable-card-selector [data-ulu-proxy-click-init] The selector for proxy-click.js to find the card and implement the clickable card script.
|
|
49
|
+
/// @prop {String} clickable-card-interact-selector [&:hover, &:focus-within] The selectors for the cards being interacted with.
|
|
50
|
+
/// @prop {Dimension} footer-padding-y [0.25rem] The top and bottom padding for the footer.
|
|
51
|
+
/// @prop {Dimension} footer-min-height [2.5rem] The min height for the footer
|
|
52
|
+
/// @prop {String} prefix [card] The class name used to add card styling.
|
|
53
|
+
/// @prop {Boolean} transition-enabled [true] Enable or disable transition for card.
|
|
54
|
+
/// @prop {CssValue} transition-timing-function [ease-in-out] The timing function for the card animation.
|
|
55
|
+
/// @prop {Time} transition-duration [200ms] The animation duration for the card animation.
|
|
56
|
+
/// @prop {List} transition-properties [(border-color, background-color, color, box-shadow, transform)] The properties for the card animation.
|
|
57
|
+
/// @prop {Boolean} image-transition-enabled [true] Enable or disable the image transition.
|
|
58
|
+
/// @prop {Time} image-transition-duration [350ms] The duration of the image transition.
|
|
59
|
+
/// @prop {CssValue} image-transition-timing-function [ease-in-out] The timing function for the image transition.
|
|
60
|
+
/// @prop {List} image-transition-properties [(transform, filter)] The properties for the image transitions.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
$config: (
|
|
65
|
+
"background-color" : white,
|
|
66
|
+
"background-color-hover" : rgb(242, 244, 246),
|
|
67
|
+
"body-min-height" : 10rem,
|
|
68
|
+
"border" : 1px solid #ccc,
|
|
69
|
+
"border-hover" : 2px solid #278cca,
|
|
70
|
+
"border-radius" : 5px,
|
|
71
|
+
"box-shadow" : null,
|
|
72
|
+
"box-shadow-hover" : null,
|
|
73
|
+
"clickable-card-enabled" : true,
|
|
74
|
+
"clickable-card-selector" : "[data-ulu-proxy-click-init]",
|
|
75
|
+
"clickable-card-interact-selector" : "&:hover, &:focus-within",
|
|
76
|
+
"color" : null,
|
|
77
|
+
"color-hover" : null,
|
|
78
|
+
"footer-padding-y" : 0.25rem,
|
|
79
|
+
"footer-min-height" : 2.5rem,
|
|
80
|
+
"horizontal-breakpoint" : "small",
|
|
81
|
+
"header-margin" : 0.75em,
|
|
82
|
+
"image-ratio" : 56.25%,
|
|
83
|
+
"image-aspect-ratio": list.slash(5, 3),
|
|
84
|
+
"image-background-color" : rgb(197, 197, 197),
|
|
85
|
+
"image-border" : null, // For when you have a margin
|
|
86
|
+
"image-filter-hover" : null,
|
|
87
|
+
"image-margin" : null,
|
|
88
|
+
"image-transform-hover" : null,
|
|
89
|
+
"image-transition-duration" : 350ms,
|
|
90
|
+
"image-transition-enabled" : true,
|
|
91
|
+
"image-transition-properties" : (transform, filter),
|
|
92
|
+
"image-transition-timing-function" : ease-in-out,
|
|
93
|
+
"margin-y" : 3rem,
|
|
94
|
+
"max-width" : 28rem,
|
|
95
|
+
"padding" : 2rem,
|
|
96
|
+
"title-color" : null,
|
|
97
|
+
"title-color-hover" : null,
|
|
98
|
+
"title-color-card-hover" : null,
|
|
99
|
+
"title-margin" : 1rem,
|
|
100
|
+
"title-font-weight" : bold,
|
|
101
|
+
"transition-enabled": true,
|
|
102
|
+
"transition-timing-function" : ease-in-out,
|
|
103
|
+
"transition-duration" : 200ms,
|
|
104
|
+
"transition-properties" : (border-color, background-color, color, box-shadow, transform),
|
|
105
|
+
"overlay-aspect-ratio": list.slash(4, 3),
|
|
106
|
+
"overlay-background-color-hover" : null,
|
|
107
|
+
"color-overlay" : white,
|
|
108
|
+
"color-overlay-hover" : null,
|
|
109
|
+
"overlay-background-color": rgba(0, 0, 0, 0.6),
|
|
110
|
+
"overlay-shading": true,
|
|
111
|
+
"overlay-body-padding-y": 1rem,
|
|
112
|
+
) !default;
|
|
113
|
+
|
|
114
|
+
/// Change modules $config
|
|
115
|
+
/// @param {Map} $changes Map of changes
|
|
116
|
+
/// @example
|
|
117
|
+
/// @include ulu.component-card-set(( "property" : value ));
|
|
118
|
+
|
|
119
|
+
@mixin set($changes) {
|
|
120
|
+
$config: map.merge($config, $changes) !global;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/// Get a config option
|
|
124
|
+
/// @param {Map} $name Name of property
|
|
125
|
+
/// @example
|
|
126
|
+
/// @include ulu.component-card-get(( "property" : value ));
|
|
127
|
+
|
|
128
|
+
@function get($name) {
|
|
129
|
+
@return utils.require-map-get($config, $name, "card [config]");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/// Mixin styles for card when it has proxy click enabled and is being interacted with (hover/focus)
|
|
133
|
+
/// @param {Boolean} $hover [false] Apply styles when the card is being hover/focused within, else applies styles to rest state of a clickable card (one who has a proxy click setup)
|
|
134
|
+
|
|
135
|
+
@mixin when-clickable($hover: false) {
|
|
136
|
+
$prefix: selector.class("card");
|
|
137
|
+
@if (get("clickable-card-enabled") and get("clickable-card-selector")) {
|
|
138
|
+
#{ $prefix } {
|
|
139
|
+
&#{ get("clickable-card-selector") } {
|
|
140
|
+
@if ($hover) {
|
|
141
|
+
#{ get("clickable-card-interact-selector") } {
|
|
142
|
+
@content;
|
|
143
|
+
}
|
|
144
|
+
} @else {
|
|
145
|
+
@content;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@mixin shared-transition-styles() {
|
|
154
|
+
transition-duration: get("transition-duration");
|
|
155
|
+
transition-timing-function: get("transition-timing-function");
|
|
156
|
+
}
|
|
157
|
+
/// Prints component styles
|
|
158
|
+
/// @demo card
|
|
159
|
+
/// @example scss
|
|
160
|
+
/// @example
|
|
161
|
+
/// @include ulu.component-card-styles();
|
|
162
|
+
|
|
163
|
+
@mixin styles {
|
|
164
|
+
$prefix: selector.class("card");
|
|
165
|
+
|
|
166
|
+
#{ $prefix } {
|
|
167
|
+
color: get("color");
|
|
168
|
+
background-color: get("background-color");
|
|
169
|
+
border-radius: get("border-radius");
|
|
170
|
+
box-shadow: get("box-shadow");
|
|
171
|
+
margin-top: get("margin-y");
|
|
172
|
+
margin-bottom: get("margin-y");
|
|
173
|
+
position: relative;
|
|
174
|
+
display: flex; // Reorder image
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
justify-content: flex-end;
|
|
177
|
+
max-width: get("max-width");
|
|
178
|
+
}
|
|
179
|
+
@if (get("border") or get("border-hover") or get("overlay-background-color-hover")) {
|
|
180
|
+
@include when-clickable($hover: false) {
|
|
181
|
+
&:after {
|
|
182
|
+
position: absolute;
|
|
183
|
+
content: if(get("border"), "", false);
|
|
184
|
+
top: 0;
|
|
185
|
+
bottom: 0;
|
|
186
|
+
right: 0;
|
|
187
|
+
left: 0;
|
|
188
|
+
border: get("border");
|
|
189
|
+
border-radius: get("border-radius");
|
|
190
|
+
z-index: 4;
|
|
191
|
+
pointer-events: none;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@include when-clickable($hover: true) {
|
|
197
|
+
background-color: get("background-color-hover");
|
|
198
|
+
color: get("color-hover");
|
|
199
|
+
box-shadow: get("box-shadow-hover");
|
|
200
|
+
|
|
201
|
+
@if (get("border-hover") or get("overlay-background-color-hover")) {
|
|
202
|
+
&:after {
|
|
203
|
+
content: "";
|
|
204
|
+
border: get("border-hover");
|
|
205
|
+
background-color: get("overlay-background-color-hover");
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Setting transitions regardless of clickable card selector
|
|
211
|
+
// This shouldn't interfere since styles aren't changed if not clickable (ie. .card [border-color, etc])
|
|
212
|
+
@if get("transition-enabled") {
|
|
213
|
+
#{ $prefix },
|
|
214
|
+
#{ $prefix }::after,
|
|
215
|
+
#{ $prefix }__title {
|
|
216
|
+
@include shared-transition-styles();
|
|
217
|
+
transition-property: get("transition-properties");
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
#{ $prefix }__title {
|
|
222
|
+
color: get("title-color");
|
|
223
|
+
margin-bottom: get("title-margin");
|
|
224
|
+
display: block;
|
|
225
|
+
font-weight: get("title-font-weight");
|
|
226
|
+
@if get("title-color-hover") {
|
|
227
|
+
&:hover,
|
|
228
|
+
&:focus {
|
|
229
|
+
color: get("title-color-hover");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
#{ $prefix }__title-link {
|
|
233
|
+
all: unset;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
@if get("title-color-hover") {
|
|
237
|
+
@include when-clickable($hover: true) {
|
|
238
|
+
#{ $prefix }__title {
|
|
239
|
+
color: get("title-color-hover");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
#{ $prefix }__header + #{ $prefix }__content {
|
|
245
|
+
margin-top: get("header-margin");
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Fix since sometimes these have nested markup sometimes just raw text
|
|
249
|
+
#{ $prefix }__image {
|
|
250
|
+
order: -1;
|
|
251
|
+
position: relative;
|
|
252
|
+
z-index: 1;
|
|
253
|
+
overflow: hidden;
|
|
254
|
+
// padding-top: get("image-ratio"); // 9:16
|
|
255
|
+
margin: get("image-margin");
|
|
256
|
+
border: get("image-border");
|
|
257
|
+
background-color: get("image-background-color");
|
|
258
|
+
border-top-right-radius: get("border-radius");
|
|
259
|
+
border-top-left-radius: get("border-radius");
|
|
260
|
+
aspect-ratio: get("image-aspect-ratio");
|
|
261
|
+
width: 100%;
|
|
262
|
+
}
|
|
263
|
+
#{ $prefix }__image img,
|
|
264
|
+
#{ $prefix}__image-media {
|
|
265
|
+
position: absolute;
|
|
266
|
+
top: 0;
|
|
267
|
+
left: 0;
|
|
268
|
+
width: 100%;
|
|
269
|
+
height: 100%;
|
|
270
|
+
border: 0;
|
|
271
|
+
object-fit: cover;
|
|
272
|
+
transform-origin: center center;
|
|
273
|
+
@if (get("image-transition-enabled")) {
|
|
274
|
+
transition-duration: get("image-transition-duration");
|
|
275
|
+
transition-timing-function: get("image-transition-timing-function");
|
|
276
|
+
transition-property: get("image-transition-properties");
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
@if (get("image-transform-hover") or get("image-filter-hover")) {
|
|
280
|
+
@include when-clickable($hover: true) {
|
|
281
|
+
#{ $prefix }__image img,
|
|
282
|
+
#{ $prefix}__image-media {
|
|
283
|
+
transform: get("image-transform-hover");
|
|
284
|
+
filter: get("image-filter-hover");
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
#{ $prefix }__body,
|
|
289
|
+
#{ $prefix }__footer,
|
|
290
|
+
#{ $prefix }__image--icon {
|
|
291
|
+
padding: get("padding");
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
#{ $prefix }__image--icon {
|
|
295
|
+
background-color: transparent;
|
|
296
|
+
display: flex;
|
|
297
|
+
align-items: center;
|
|
298
|
+
justify-content: center;
|
|
299
|
+
img {
|
|
300
|
+
position: static;
|
|
301
|
+
display: block;
|
|
302
|
+
max-width: 30rem;
|
|
303
|
+
height: auto;
|
|
304
|
+
top: auto;
|
|
305
|
+
left: auto;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
#{ $prefix }__body,
|
|
309
|
+
#{ $prefix }__footer {
|
|
310
|
+
position: relative;
|
|
311
|
+
z-index: 2; // Above image
|
|
312
|
+
}
|
|
313
|
+
#{ $prefix }__body {
|
|
314
|
+
flex-grow: 1;
|
|
315
|
+
min-height: get("body-min-height");
|
|
316
|
+
}
|
|
317
|
+
// For actions/messages
|
|
318
|
+
// - Layout as flex with min height to support buttons
|
|
319
|
+
// and text without relying so much on padding
|
|
320
|
+
#{ $prefix }__footer {
|
|
321
|
+
flex: 0;
|
|
322
|
+
z-index: 4;
|
|
323
|
+
padding-top: get("footer-padding-y");
|
|
324
|
+
padding-bottom: get("footer-padding-y");
|
|
325
|
+
min-height: get("footer-min-height");
|
|
326
|
+
display: flex;
|
|
327
|
+
align-items: center;
|
|
328
|
+
justify-content: flex-end;
|
|
329
|
+
}
|
|
330
|
+
// body + footer {
|
|
331
|
+
// means body keeps before pseudo element while footer loses it
|
|
332
|
+
#{ $prefix }--overlay {
|
|
333
|
+
// overflow: hidden;
|
|
334
|
+
aspect-ratio: get("overlay-aspect-ratio");
|
|
335
|
+
height: min-content;
|
|
336
|
+
#{ $prefix }__body {
|
|
337
|
+
position: relative;
|
|
338
|
+
flex-grow: 0;
|
|
339
|
+
z-index: 2;
|
|
340
|
+
color: get("color-overlay");
|
|
341
|
+
background-color: get("overlay-background-color");
|
|
342
|
+
min-height: 0;
|
|
343
|
+
padding-top: get("overlay-body-padding-y");
|
|
344
|
+
padding-bottom: get("overlay-body-padding-y");
|
|
345
|
+
@if (get("overlay-shading")) {
|
|
346
|
+
margin-top: 4rem;
|
|
347
|
+
&::before {
|
|
348
|
+
content: "";
|
|
349
|
+
position: absolute;
|
|
350
|
+
bottom: 100%;
|
|
351
|
+
left: 0;
|
|
352
|
+
right: 0;
|
|
353
|
+
height: 4rem;
|
|
354
|
+
background: linear-gradient(to top, get("overlay-background-color") 0%, rgba(0, 0, 0, 0));
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
#{ $prefix }__footer {
|
|
359
|
+
background-color: get("overlay-background-color");
|
|
360
|
+
color: get("color-overlay");
|
|
361
|
+
}
|
|
362
|
+
#{ $prefix }__title {
|
|
363
|
+
color: get("color-overlay");
|
|
364
|
+
}
|
|
365
|
+
#{ $prefix }__image {
|
|
366
|
+
position: absolute;
|
|
367
|
+
top: 0;
|
|
368
|
+
left: 0;
|
|
369
|
+
bottom: 0;
|
|
370
|
+
right: 0;
|
|
371
|
+
overflow: hidden;
|
|
372
|
+
padding-top: 0;
|
|
373
|
+
background-color: rgb(255, 255, 255);
|
|
374
|
+
border-radius: get("border-radius");
|
|
375
|
+
aspect-ratio: auto;
|
|
376
|
+
img {
|
|
377
|
+
z-index: 1;
|
|
378
|
+
position: relative;
|
|
379
|
+
width: 100%;
|
|
380
|
+
height: 100%;
|
|
381
|
+
border: 0;
|
|
382
|
+
object-fit: cover;
|
|
383
|
+
&::before {
|
|
384
|
+
position: absolute;
|
|
385
|
+
display: block;
|
|
386
|
+
top: 0;
|
|
387
|
+
bottom: 0;
|
|
388
|
+
left: 0;
|
|
389
|
+
right: 0;
|
|
390
|
+
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.9));
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
@if (get("horizontal-breakpoint")) {
|
|
397
|
+
@include breakpoint.min(get("horizontal-breakpoint")) {
|
|
398
|
+
#{ $prefix }--horizontal {
|
|
399
|
+
display: flex;
|
|
400
|
+
justify-content: center;
|
|
401
|
+
align-items: center;
|
|
402
|
+
#{ $prefix }__image {
|
|
403
|
+
width: 33%;
|
|
404
|
+
flex: 0 1 33%;
|
|
405
|
+
// max-width: 30rem;
|
|
406
|
+
min-height: 28rem;
|
|
407
|
+
// padding-top: 0;
|
|
408
|
+
}
|
|
409
|
+
#{ $prefix }__body {
|
|
410
|
+
display: flex;
|
|
411
|
+
flex: 1;
|
|
412
|
+
flex-direction: column;
|
|
413
|
+
justify-content: center;
|
|
414
|
+
max-width: 80rem;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|