@ulu/frontend 0.0.23 → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- 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 +33 -13
- 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 +156 -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,495 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group modal
|
|
3
|
+
////
|
|
4
|
+
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
@use "sass:meta";
|
|
7
|
+
|
|
8
|
+
@use "../color";
|
|
9
|
+
@use "../element";
|
|
10
|
+
@use "../layout";
|
|
11
|
+
@use "../typography";
|
|
12
|
+
@use "../selector";
|
|
13
|
+
@use "../utils";
|
|
14
|
+
|
|
15
|
+
// Used for function fallback
|
|
16
|
+
$-fallbacks: (
|
|
17
|
+
"backdrop-color" : (
|
|
18
|
+
"function" : meta.get-function("get", false, "element"),
|
|
19
|
+
"property" : "backdrop-color"
|
|
20
|
+
),
|
|
21
|
+
"box-shadow" : (
|
|
22
|
+
"function" : meta.get-function("get", false, "element"),
|
|
23
|
+
"property" : "box-shadow-above",
|
|
24
|
+
),
|
|
25
|
+
"border-radius" : (
|
|
26
|
+
"function" : meta.get-function("get", false, "element"),
|
|
27
|
+
"property" : "border-radius-large",
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
// todo [joe-check] for config options should items like 'dark-background-color' be 'background-color-dark' instead? Line 94
|
|
32
|
+
|
|
33
|
+
/// Module Settings
|
|
34
|
+
/// @type Map
|
|
35
|
+
/// @prop {CssValue} backdrop-blur [4px] Determines the blur of the backdrop.
|
|
36
|
+
/// @prop {Color} backdrop-color [true] The unblurred background color outside the modal. If set to true, will use the element.scss property for backdrop-color.
|
|
37
|
+
/// @prop {Color} background-color [white] The background color of the modal.
|
|
38
|
+
/// @prop {Dimension} body-padding [1rem] The padding of the body content.
|
|
39
|
+
/// @prop {CssValue} border-radius [true] The border radius of the modal. If set to true, will use the element.scss property for border-radius-large.
|
|
40
|
+
/// @prop {CssValue} box-shadow [true] Determines the box-shadow of the modal. If set to true, will use the element.scss property for backdrop-color.
|
|
41
|
+
/// @prop {Dimension} height [340px] The min-height of the modal.
|
|
42
|
+
/// @prop {Dimension} height-no-header [100px] The min-height of the modal.
|
|
43
|
+
/// @prop {Dimension} width [60rem] The width of the Modal
|
|
44
|
+
/// @prop {Time} animation-duration [300ms] Animation duration for the modal opening.
|
|
45
|
+
/// @prop {Time} animation-duration-exit [150ms] Animation duration for the modal closing.
|
|
46
|
+
/// @prop {CssValue} animation-timing-function [cubic-bezier(0, 0, .2, 1)] The animation timing menu of the modal.
|
|
47
|
+
/// @prop {Color} close-background-color [white] Background color for the modal close icon.
|
|
48
|
+
/// @prop {Close} close-background-color-hover [blue] Background color for the modal close icon when hovered or focused.
|
|
49
|
+
/// @prop {Color} close-color [black] Type color for the modal close icon.
|
|
50
|
+
/// @prop {Color} close-color-hover [black] Type color for the modal close icon when hovered or focused.
|
|
51
|
+
/// @prop {Dimension} close-font-size [1.2rem] Font-siz of of the modal close icon font size.
|
|
52
|
+
/// @prop {Dimension} close-margin [0.5rem] The margin for the modal close icon.
|
|
53
|
+
/// @prop {Dimension} close-size [2.5rem] Size of the modal close icon.
|
|
54
|
+
/// @prop {} dark-background-color [false] @joe-check unused
|
|
55
|
+
/// @prop {} dark-color [white] @joe-check unused
|
|
56
|
+
/// @prop {} dark-header-background-color [false] @joe-check unused
|
|
57
|
+
/// @prop {} dark-header-border-bottom [false] @joe-check unused
|
|
58
|
+
/// @prop {} dark-header-color [false] @joe-check unused
|
|
59
|
+
/// @prop {Color} header-background-color [black] Background color for the header.
|
|
60
|
+
/// @prop {CssValue} header-border-bottom [none] Bottom-border on the modal header.
|
|
61
|
+
/// @prop {Color} header-color [white] Type color of the header.
|
|
62
|
+
/// @prop {Dimension} header-padding [1rem] The padding of the modal header.
|
|
63
|
+
/// @prop {Color} resizer-background-color [rgb(221, 221, 221)] The background color of the resizer.
|
|
64
|
+
/// @prop {Color} resizer-background-color-hover [rgb(66, 66, 66)] The background color of the resizer when hovered or focused.
|
|
65
|
+
/// @prop {Color} resizer-color [black] The type color of the resizer.
|
|
66
|
+
/// @prop {Color} resizer-color-hover [black] The type color of the resizer when hovered or focused.
|
|
67
|
+
/// @prop {Dimension} resizer-width [1rem] The width of the resizer.
|
|
68
|
+
/// @prop {Color} title-color [white] Type color of the title.
|
|
69
|
+
/// @prop {CssValue} title-font-weight [bold] Font weight of the title.
|
|
70
|
+
/// @prop {Dimension} title-icon-margin [0.5em] The margin of the title icon
|
|
71
|
+
/// @prop {String} title-size [large] The font-size of the title. This uses typography.scss, so the value of this options should be a variable from typography.scss.
|
|
72
|
+
/// @prop {CssValue} title-text-transform [null] Transform option for the title.
|
|
73
|
+
/// @prop {Map} sizes [Map] Size options to enable unique stylings.
|
|
74
|
+
|
|
75
|
+
$config: (
|
|
76
|
+
"backdrop-color" : true,
|
|
77
|
+
"backdrop-blur" : 4px,
|
|
78
|
+
"background-color": white,
|
|
79
|
+
"body-padding": 1rem,
|
|
80
|
+
"border-radius" : true,
|
|
81
|
+
"box-shadow" : true,
|
|
82
|
+
"height": 340px,
|
|
83
|
+
"height-no-header": 100px,
|
|
84
|
+
"width": 60rem,
|
|
85
|
+
|
|
86
|
+
"animation-duration" : 300ms,
|
|
87
|
+
"animation-duration-exit" : 150ms,
|
|
88
|
+
"animation-timing-function" : cubic-bezier(0, 0, .2, 1),
|
|
89
|
+
"close-background-color": white,
|
|
90
|
+
"close-background-color-hover": blue,
|
|
91
|
+
"close-color": black,
|
|
92
|
+
"close-color-hover": black,
|
|
93
|
+
"close-font-size": 1.2rem,
|
|
94
|
+
"close-margin": 0.5rem,
|
|
95
|
+
"close-size": 2.5rem,
|
|
96
|
+
"dark-background-color" : false,
|
|
97
|
+
"dark-color" : white,
|
|
98
|
+
"dark-header-border-bottom" : false,
|
|
99
|
+
"dark-header-background-color" : false,
|
|
100
|
+
"dark-header-color" : false,
|
|
101
|
+
"header-background-color": black,
|
|
102
|
+
"header-border-bottom": none,
|
|
103
|
+
"header-color": white,
|
|
104
|
+
"header-padding": 1rem,
|
|
105
|
+
"resizer-background-color": rgb(221, 221, 221),
|
|
106
|
+
"resizer-background-color-hover": rgb(66, 66, 66),
|
|
107
|
+
"resizer-color": black,
|
|
108
|
+
"resizer-color-hover": black,
|
|
109
|
+
"resizer-width": 1rem,
|
|
110
|
+
"title-color": white,
|
|
111
|
+
"title-font-weight": bold,
|
|
112
|
+
"title-icon-margin" : 0.5em,
|
|
113
|
+
"title-size" : "large",
|
|
114
|
+
"title-text-transform" : null,
|
|
115
|
+
"sizes" : (
|
|
116
|
+
"small" : 30rem,
|
|
117
|
+
"large" : 80rem
|
|
118
|
+
),
|
|
119
|
+
) !default;
|
|
120
|
+
|
|
121
|
+
/// Change modules $config
|
|
122
|
+
/// @param {Map} $changes Map of changes
|
|
123
|
+
/// @example scss
|
|
124
|
+
/// @example
|
|
125
|
+
/// @include ulu.component-modal-set(( "property" : value ));
|
|
126
|
+
|
|
127
|
+
@mixin set($changes) {
|
|
128
|
+
$config: map.merge($config, $changes) !global;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/// Get a config option
|
|
132
|
+
/// @param {Map} $name Name of property
|
|
133
|
+
/// @example
|
|
134
|
+
/// @include ulu.component-modal-get("property");
|
|
135
|
+
|
|
136
|
+
@function get($name) {
|
|
137
|
+
$value: utils.require-map-get($config, $name, "component-modal [config]");
|
|
138
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/// Prints modal component styles
|
|
142
|
+
/// @example scss
|
|
143
|
+
/// @include ulu.component-modal-styles();
|
|
144
|
+
|
|
145
|
+
@mixin styles {
|
|
146
|
+
$prefix: selector.class("modal");
|
|
147
|
+
|
|
148
|
+
// // Before it's moved
|
|
149
|
+
[data-ulu-modal-builder] {
|
|
150
|
+
display: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
#{ $prefix } {
|
|
154
|
+
// Required for click outside
|
|
155
|
+
position: fixed;
|
|
156
|
+
// Important: If you use the margin layout system (ie. auto) on dialogs they
|
|
157
|
+
// can't animate out correctly (thinking it jumps from dialog display system
|
|
158
|
+
// to normal block and doesn't work. This ALSO affects the z-index (seems to move from top-layer to normal layer). Z-index is for close
|
|
159
|
+
top: 50%;
|
|
160
|
+
left: 50%;
|
|
161
|
+
transform: translate(-50%, -50%);
|
|
162
|
+
z-index: layout.get("z-index-fixed") + 1;
|
|
163
|
+
margin: 0;
|
|
164
|
+
padding: 0;
|
|
165
|
+
border: 0;
|
|
166
|
+
width: get("width");
|
|
167
|
+
min-width: 200px; // For resizing minimum width
|
|
168
|
+
min-height: get("height");
|
|
169
|
+
max-height: 100vh;
|
|
170
|
+
max-width: 100%;
|
|
171
|
+
overflow-y: hidden;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
box-shadow: get("box-shadow");
|
|
174
|
+
border-radius: get("border-radius");
|
|
175
|
+
background-color: get("background-color");
|
|
176
|
+
box-sizing: border-box;
|
|
177
|
+
animation: uluModalCenterOut get("animation-duration-exit") get("animation-timing-function");
|
|
178
|
+
&[open] {
|
|
179
|
+
animation: uluModalCenterIn get("animation-duration") get("animation-timing-function");
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
}
|
|
183
|
+
&::backdrop {
|
|
184
|
+
background: get("backdrop-color");
|
|
185
|
+
backdrop-filter: blur(get("backdrop-blur"));
|
|
186
|
+
animation: uluModalBackdropIn get("animation-duration") get("animation-timing-function");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
#{ $prefix }__header {
|
|
190
|
+
display: flex;
|
|
191
|
+
justify-content: space-between;
|
|
192
|
+
align-items: center;
|
|
193
|
+
flex: 0;
|
|
194
|
+
padding: get("header-padding");
|
|
195
|
+
border-bottom: get("header-border-bottom");
|
|
196
|
+
background-color: get("header-background-color");
|
|
197
|
+
color: get("header-color");
|
|
198
|
+
}
|
|
199
|
+
#{ $prefix }__body {
|
|
200
|
+
flex: 1;
|
|
201
|
+
overflow: auto;
|
|
202
|
+
padding: get("body-padding");
|
|
203
|
+
}
|
|
204
|
+
#{ $prefix }__title {
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: baseline;
|
|
207
|
+
margin: 0;
|
|
208
|
+
color: color.get(get("title-color"));
|
|
209
|
+
font-weight: get("title-font-weight");
|
|
210
|
+
text-transform: get("title-text-transform");
|
|
211
|
+
@if (get("title-size")) {
|
|
212
|
+
@include typography.size(get("title-size"), $only-font-size: true);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
#{ $prefix }__title-icon {
|
|
216
|
+
margin-right: get("title-icon-margin");
|
|
217
|
+
}
|
|
218
|
+
#{ $prefix }__close {
|
|
219
|
+
margin: 0 0 0 get("close-margin");
|
|
220
|
+
flex: 0 0 auto;
|
|
221
|
+
font-size: get("close-font-size");
|
|
222
|
+
width: get("close-size");
|
|
223
|
+
height: get("close-size");
|
|
224
|
+
background-color: get("close-background-color");
|
|
225
|
+
border-radius: 50%;
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
justify-content: center;
|
|
229
|
+
color: get("close-color");
|
|
230
|
+
&:hover {
|
|
231
|
+
background-color: get("close-background-color-hover");
|
|
232
|
+
color: get("close-color-hover");
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
#{ $prefix }__resizer {
|
|
236
|
+
position: absolute;
|
|
237
|
+
top: 0;
|
|
238
|
+
bottom: 0;
|
|
239
|
+
left: 0;
|
|
240
|
+
width: get("resizer-width");
|
|
241
|
+
display: block;
|
|
242
|
+
cursor: col-resize;
|
|
243
|
+
background-color: get("resizer-background-color");
|
|
244
|
+
display: flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
justify-content: center;
|
|
247
|
+
transition-property: background-color, color;
|
|
248
|
+
transition-duration: 300ms;
|
|
249
|
+
transition-delay: 100ms;
|
|
250
|
+
color: get("resizer-color");
|
|
251
|
+
&:hover {
|
|
252
|
+
color: get("resizer-color-hover");
|
|
253
|
+
background-color: get("resizer-background-color-hover");
|
|
254
|
+
}
|
|
255
|
+
#{ $prefix }--left & {
|
|
256
|
+
left: auto;
|
|
257
|
+
right: 0;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
#{ $prefix }__content {
|
|
261
|
+
margin-top: 2rem;
|
|
262
|
+
margin-bottom: 2rem;
|
|
263
|
+
line-height: 1.5;
|
|
264
|
+
color: rgba(0,0,0,.8);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Modifiers
|
|
268
|
+
@each $name, $size-width in get("sizes") {
|
|
269
|
+
#{ $prefix }--#{ $name } {
|
|
270
|
+
width: $size-width;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
#{ $prefix }--right,
|
|
274
|
+
#{ $prefix }--left {
|
|
275
|
+
border-radius: 0;
|
|
276
|
+
height: 100vh;
|
|
277
|
+
top: 0;
|
|
278
|
+
bottom: 0;
|
|
279
|
+
transform: none;
|
|
280
|
+
}
|
|
281
|
+
#{ $prefix }--top {
|
|
282
|
+
top: 0;
|
|
283
|
+
border-top-right-radius: 0;
|
|
284
|
+
border-top-left-radius: 0;
|
|
285
|
+
transform: translateX(-50%);
|
|
286
|
+
animation: uluModalTopOut get("animation-duration-exit") get("animation-timing-function");
|
|
287
|
+
&[open] {
|
|
288
|
+
animation: uluModalTopIn get("animation-duration") get("animation-timing-function");
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
#{ $prefix }--bottom {
|
|
292
|
+
top: auto;
|
|
293
|
+
bottom: 0;
|
|
294
|
+
transform: translateX(-50%);
|
|
295
|
+
border-bottom-left-radius: 0;
|
|
296
|
+
border-bottom-right-radius: 0;
|
|
297
|
+
animation: uluModalBottomOut get("animation-duration-exit") get("animation-timing-function");
|
|
298
|
+
&[open] {
|
|
299
|
+
animation: uluModalBottomIn get("animation-duration") get("animation-timing-function");
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
#{ $prefix }--right {
|
|
303
|
+
right: 0;
|
|
304
|
+
left: auto;
|
|
305
|
+
animation: uluModalRightOut get("animation-duration-exit") get("animation-timing-function");
|
|
306
|
+
&[open] {
|
|
307
|
+
animation: uluModalRightIn get("animation-duration") get("animation-timing-function");
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
#{ $prefix }--left {
|
|
311
|
+
left: 0;
|
|
312
|
+
animation: uluModalLeftOut get("animation-duration-exit") get("animation-timing-function");
|
|
313
|
+
&[open] {
|
|
314
|
+
animation: uluModalLeftIn get("animation-duration") get("animation-timing-function");
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
#{ $prefix }--no-header {
|
|
318
|
+
min-height: get("height-no-header");
|
|
319
|
+
}
|
|
320
|
+
#{ $prefix }--no-backdrop {
|
|
321
|
+
&::backdrop {
|
|
322
|
+
display: none;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
#{ $prefix }--resize {
|
|
326
|
+
&#{ $prefix }--center {
|
|
327
|
+
resize: both;
|
|
328
|
+
}
|
|
329
|
+
&#{ $prefix }--right {
|
|
330
|
+
padding-left: get("resizer-width");
|
|
331
|
+
}
|
|
332
|
+
&#{ $prefix }--left {
|
|
333
|
+
padding-right: get("resizer-width");
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
#{ $prefix }--body-fills {
|
|
337
|
+
#{ $prefix }__header {
|
|
338
|
+
border-bottom: none;
|
|
339
|
+
}
|
|
340
|
+
#{ $prefix }__body {
|
|
341
|
+
padding: 0;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
#{ $prefix }--no-min-height {
|
|
346
|
+
min-height: 0;
|
|
347
|
+
}
|
|
348
|
+
// Will display as content when printing
|
|
349
|
+
// NOTE: This will not work with native dialog
|
|
350
|
+
// Printing works with modal printer by cloning mechanism
|
|
351
|
+
// .modal--print {
|
|
352
|
+
// @media screen {
|
|
353
|
+
// display: block !important;
|
|
354
|
+
// position: static;
|
|
355
|
+
// top: auto;
|
|
356
|
+
// left: auto;
|
|
357
|
+
// right: auto;
|
|
358
|
+
// bottom: auto;
|
|
359
|
+
// width: auto;
|
|
360
|
+
// max-width: none;
|
|
361
|
+
// }
|
|
362
|
+
// }
|
|
363
|
+
|
|
364
|
+
@keyframes uluModalBackdropIn {
|
|
365
|
+
0% {
|
|
366
|
+
background-color: rgba(0, 0, 0, 0);
|
|
367
|
+
backdrop-filter: blur(0);
|
|
368
|
+
}
|
|
369
|
+
100% {
|
|
370
|
+
background-color: get("backdrop-color");
|
|
371
|
+
backdrop-filter: blur(get("backdrop-blur"));
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
@keyframes uluModalCenterIn {
|
|
375
|
+
from {
|
|
376
|
+
opacity: 0;
|
|
377
|
+
transform: translate(-50%, -40%);
|
|
378
|
+
display: none;
|
|
379
|
+
}
|
|
380
|
+
to {
|
|
381
|
+
opacity: 1;
|
|
382
|
+
transform: translate(-50%, -50%);
|
|
383
|
+
display: block;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
@keyframes uluModalCenterOut {
|
|
387
|
+
from {
|
|
388
|
+
opacity: 1;
|
|
389
|
+
display: block;
|
|
390
|
+
transform: translate(-50%, -50%);
|
|
391
|
+
}
|
|
392
|
+
to {
|
|
393
|
+
opacity: 0;
|
|
394
|
+
display: none;
|
|
395
|
+
transform: translate(-50%, 40%);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
@keyframes uluModalTopIn {
|
|
399
|
+
from {
|
|
400
|
+
opacity: 0;
|
|
401
|
+
transform: translate(-50%, -15%);
|
|
402
|
+
display: none;
|
|
403
|
+
}
|
|
404
|
+
to {
|
|
405
|
+
opacity: 1;
|
|
406
|
+
transform: translate(-50%, 0);
|
|
407
|
+
display: block;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
@keyframes uluModalTopOut {
|
|
411
|
+
from {
|
|
412
|
+
opacity: 1;
|
|
413
|
+
display: block;
|
|
414
|
+
transform: translate(-50%, 0);
|
|
415
|
+
}
|
|
416
|
+
to {
|
|
417
|
+
opacity: 0;
|
|
418
|
+
display: none;
|
|
419
|
+
transform: translate(-50%, -15%);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
@keyframes uluModalBottomIn {
|
|
423
|
+
from {
|
|
424
|
+
opacity: 0;
|
|
425
|
+
transform: translate(-50%, 15%);
|
|
426
|
+
display: none;
|
|
427
|
+
}
|
|
428
|
+
to {
|
|
429
|
+
opacity: 1;
|
|
430
|
+
transform: translate(-50%, 0);
|
|
431
|
+
display: block;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
@keyframes uluModalBottomOut {
|
|
435
|
+
from {
|
|
436
|
+
opacity: 1;
|
|
437
|
+
display: block;
|
|
438
|
+
transform: translate(-50%, 0);
|
|
439
|
+
}
|
|
440
|
+
to {
|
|
441
|
+
opacity: 0;
|
|
442
|
+
display: none;
|
|
443
|
+
transform: translate(-50%, 15%);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
@keyframes uluModalLeftIn {
|
|
447
|
+
from {
|
|
448
|
+
opacity: 0;
|
|
449
|
+
transform: translateX(-15%);
|
|
450
|
+
display: none;
|
|
451
|
+
}
|
|
452
|
+
to {
|
|
453
|
+
opacity: 1;
|
|
454
|
+
transform: translateX(0);
|
|
455
|
+
display: block;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
@keyframes uluModalLeftOut {
|
|
459
|
+
from {
|
|
460
|
+
opacity: 1;
|
|
461
|
+
display: block;
|
|
462
|
+
transform: translateX(0);
|
|
463
|
+
}
|
|
464
|
+
to {
|
|
465
|
+
opacity: 0;
|
|
466
|
+
display: none;
|
|
467
|
+
transform: translateX(-15%);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
@keyframes uluModalRightIn {
|
|
471
|
+
from {
|
|
472
|
+
opacity: 0;
|
|
473
|
+
transform: translateX(15%);
|
|
474
|
+
display: none;
|
|
475
|
+
}
|
|
476
|
+
to {
|
|
477
|
+
opacity: 1;
|
|
478
|
+
transform: translateX(0);
|
|
479
|
+
display: block;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
@keyframes uluModalRightOut {
|
|
483
|
+
from {
|
|
484
|
+
opacity: 1;
|
|
485
|
+
display: block;
|
|
486
|
+
transform: translateX(0);
|
|
487
|
+
}
|
|
488
|
+
to {
|
|
489
|
+
opacity: 0;
|
|
490
|
+
display: none;
|
|
491
|
+
transform: translateX(15%);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group nav-strip
|
|
3
|
+
////
|
|
4
|
+
/// A horizontal navigation strip or rail that displays a list of links to
|
|
5
|
+
/// different pages or sections of a website. The active link, indicating the
|
|
6
|
+
/// current page or section, is visually emphasized with an underline.
|
|
7
|
+
|
|
8
|
+
@use "sass:map";
|
|
9
|
+
|
|
10
|
+
@use "../utils";
|
|
11
|
+
@use "../color";
|
|
12
|
+
@use "../selector";
|
|
13
|
+
@use "../typography";
|
|
14
|
+
|
|
15
|
+
/// Module Settings
|
|
16
|
+
/// @type Map
|
|
17
|
+
/// @prop {String} activeSelector [.is-active] Selector that portrays active status.
|
|
18
|
+
/// @prop {Color} color [null] Type color for the nav-strip.
|
|
19
|
+
/// @prop {Color} color-active [null] Type color for the nav-strip when active.
|
|
20
|
+
/// @prop {Color} color-hover [null] Type color for the nav-strip when hovered or focused.
|
|
21
|
+
/// @prop {CssValue} font-weight [null] Font weight of navstrip.
|
|
22
|
+
/// @prop {Dimension} margin-between [2.25em] Margin between nav-strip items.
|
|
23
|
+
/// @prop {Boolean} nowrap [true] Disables the word wrap.
|
|
24
|
+
/// @prop {Dimension} padding-x [0] Horizontal padding for the nav-strip links.
|
|
25
|
+
/// @prop {Dimension} padding-y [0.3em] Vertical padding for the nav-strip links.
|
|
26
|
+
/// @prop {Dimension} padding-y-ruled [null] Vertical padding for the nav-strip links when using nav-strip--rule.
|
|
27
|
+
/// @prop {Color} underline-color [orange] Underline color when link is active.
|
|
28
|
+
/// @prop {Dimension} underline-size [3px] Size of the underline.
|
|
29
|
+
/// @prop {Color} underline-color-hover [gray] Color of the underline when hovered or focused.
|
|
30
|
+
/// @prop {String} rule-color [rule] Rule color. Uses rule.scss so the value of this options should be a variable from rule.scss.
|
|
31
|
+
/// @prop {Dimension} rule-size [3px] Size of the nav-strip rule.
|
|
32
|
+
/// @prop {Dimension} rule-offset [-3px] Offset the rule for the navstrip.
|
|
33
|
+
|
|
34
|
+
$config: (
|
|
35
|
+
"activeSelector" : "&.is-active, &.has-active",
|
|
36
|
+
"color" : null,
|
|
37
|
+
"color-active" : null,
|
|
38
|
+
"color-hover" : null,
|
|
39
|
+
"font-weight" : null,
|
|
40
|
+
"margin-between" : 2.25em,
|
|
41
|
+
"padding-x" : 0,
|
|
42
|
+
"padding-y" : 0.3em,
|
|
43
|
+
"padding-y-ruled" : null,
|
|
44
|
+
"nowrap" : true,
|
|
45
|
+
"rule-color" : "rule",
|
|
46
|
+
"rule-offset" : -3px,
|
|
47
|
+
"rule-size" : 3px,
|
|
48
|
+
"underline-color" : orange,
|
|
49
|
+
"underline-color-hover" : gray,
|
|
50
|
+
"underline-size" : 3px,
|
|
51
|
+
) !default;
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/// Change modules $config
|
|
55
|
+
/// @param {Map} $changes Map of changes
|
|
56
|
+
/// @example
|
|
57
|
+
/// @include ulu.component-nav-strip-set(( "property" : value ));
|
|
58
|
+
|
|
59
|
+
@mixin set($changes) {
|
|
60
|
+
$config: map.merge($config, $changes) !global;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/// Get a config option
|
|
64
|
+
/// @param {Map} $name Name of property
|
|
65
|
+
/// @example
|
|
66
|
+
/// @include ulu.component-nav-strip-get("property");
|
|
67
|
+
|
|
68
|
+
@function get($name) {
|
|
69
|
+
@return utils.require-map-get($config, $name, "card [config]");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/// Prints component styles
|
|
73
|
+
/// @example
|
|
74
|
+
/// @include ulu.component-nav-strip-styles();
|
|
75
|
+
|
|
76
|
+
@mixin styles {
|
|
77
|
+
$prefix: selector.class("nav-strip");
|
|
78
|
+
|
|
79
|
+
// Original thought to not limit to direct child
|
|
80
|
+
// auto is for when we don't have control over markup
|
|
81
|
+
// The list descendants will be selected that way but the list is
|
|
82
|
+
// currently selecting any list/list-item
|
|
83
|
+
#{ $prefix }__list,
|
|
84
|
+
#{ $prefix }--auto ul {
|
|
85
|
+
display: flex;
|
|
86
|
+
line-height: typography.get("line-height-dense");
|
|
87
|
+
}
|
|
88
|
+
#{ $prefix }__item,
|
|
89
|
+
#{ $prefix }--auto li {
|
|
90
|
+
margin-right: get("margin-between");
|
|
91
|
+
// layout flex since items inside may not be the same height
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: flex-end;
|
|
94
|
+
&:last-child {
|
|
95
|
+
margin-right: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
#{ $prefix }__link,
|
|
100
|
+
#{ $prefix }--auto li > a,
|
|
101
|
+
#{ $prefix }--auto li > button {
|
|
102
|
+
display: block;
|
|
103
|
+
color: get("color");
|
|
104
|
+
padding: get("padding-y") get("padding-x");
|
|
105
|
+
border-top: get("underline-size") solid transparent;
|
|
106
|
+
border-bottom: get("underline-size") solid transparent;
|
|
107
|
+
font-weight: get("font-weight");
|
|
108
|
+
@if (get("nowrap")) {
|
|
109
|
+
white-space: nowrap;
|
|
110
|
+
}
|
|
111
|
+
&:hover,
|
|
112
|
+
&:focus {
|
|
113
|
+
border-bottom-color: get("underline-color-hover");
|
|
114
|
+
color: get("color-hover");
|
|
115
|
+
}
|
|
116
|
+
#{ get("activeSelector") } {
|
|
117
|
+
border-bottom-color: get("underline-color");
|
|
118
|
+
color: get("color-active");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Modifiers
|
|
123
|
+
#{ $prefix }--right {
|
|
124
|
+
#{ $prefix }__list,
|
|
125
|
+
&#{ $prefix }--auto ul {
|
|
126
|
+
justify-content: flex-end;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
#{ $prefix }--center {
|
|
130
|
+
#{ $prefix }__list,
|
|
131
|
+
&#{ $prefix }--auto ul {
|
|
132
|
+
justify-content: center;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
#{ $prefix }--rule {
|
|
136
|
+
#{ $prefix }__list,
|
|
137
|
+
&#{ $prefix }--auto ul {
|
|
138
|
+
border-bottom: get("rule-size") solid color.get(get("rule-color"));
|
|
139
|
+
}
|
|
140
|
+
#{ $prefix }__link,
|
|
141
|
+
&#{ $prefix }--auto li > a,
|
|
142
|
+
&#{ $prefix }--auto li > button {
|
|
143
|
+
margin-bottom: get("rule-offset");
|
|
144
|
+
padding-top: get("padding-y-ruled");
|
|
145
|
+
padding-bottom: get("padding-y-ruled");
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|