@ulu/frontend 0.1.0-beta.9 → 0.1.0-beta.90
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 +606 -0
- package/README.dev.md +3 -3
- package/README.md +14 -4
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +36 -29
- package/docs-dev/.nojekyll +1 -0
- package/docs-dev/assets/main.js +8290 -635
- package/docs-dev/assets/placeholder/icon-calendar.svg +1 -0
- package/docs-dev/assets/placeholder/icon-check.svg +1 -0
- package/docs-dev/assets/style.css +789 -338
- package/docs-dev/changelog/index.html +6985 -0
- package/docs-dev/demos/accordion/index.html +1126 -334
- package/docs-dev/demos/badge/index.html +5535 -0
- package/docs-dev/demos/basic-hero/index.html +111 -0
- package/docs-dev/demos/breakpoints-manager/index.html +5546 -0
- package/docs-dev/demos/button/index.html +1172 -338
- package/docs-dev/demos/button-group/index.html +5532 -0
- package/docs-dev/demos/button-verbose/index.html +5538 -0
- package/docs-dev/demos/callout/index.html +1177 -344
- package/docs-dev/demos/captioned-figure/index.html +1120 -327
- package/docs-dev/demos/card/index.html +1186 -754
- package/docs-dev/demos/card-grid/index.html +5657 -0
- package/docs-dev/demos/counter-list/index.html +5540 -0
- package/docs-dev/demos/css-icons/index.html +1148 -332
- package/docs-dev/demos/data-grid/index.html +1120 -327
- package/docs-dev/demos/data-table/index.html +1298 -372
- package/docs-dev/demos/details-group/index.html +5567 -0
- package/docs-dev/demos/file-save/index.html +1120 -327
- package/docs-dev/demos/flipcard/index.html +1120 -327
- package/docs-dev/demos/form-theme/index.html +1144 -364
- package/docs-dev/demos/headline-label/index.html +5502 -0
- 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 +1121 -328
- package/docs-dev/demos/list-inline/index.html +1120 -327
- package/docs-dev/demos/list-lines/index.html +1120 -327
- package/docs-dev/demos/menu-stack/index.html +1159 -351
- package/docs-dev/demos/modals/index.html +1259 -343
- package/docs-dev/demos/nav-strip/index.html +1120 -327
- package/docs-dev/demos/overlay-section/index.html +1205 -342
- package/docs-dev/demos/panel/index.html +5562 -0
- package/docs-dev/demos/popovers/index.html +1368 -333
- package/docs-dev/demos/print/index.html +1120 -327
- package/docs-dev/demos/pull-quote/index.html +1120 -327
- package/docs-dev/demos/rail/index.html +5598 -0
- package/docs-dev/demos/rule/index.html +1137 -332
- package/docs-dev/demos/scroll-slider/index.html +72 -106
- package/docs-dev/demos/scrollpoints/index.html +1121 -328
- package/docs-dev/demos/slider/index.html +12 -4
- package/docs-dev/demos/spoke-spinner/index.html +1120 -327
- package/docs-dev/demos/{list-inline.1 → sticky-list}/index.html +1159 -363
- package/docs-dev/demos/tabs/index.html +1156 -327
- package/docs-dev/demos/tag/index.html +1120 -327
- package/docs-dev/demos/theme-toggle/index.html +5579 -0
- package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
- package/docs-dev/demos/tiles/index.html +1120 -327
- package/docs-dev/demos/tooltip/index.html +1120 -327
- package/docs-dev/demos/wysiwyg/index.html +5552 -0
- package/docs-dev/guide/building-stylesheet/index.html +1120 -327
- package/docs-dev/guide/developing-ulu-scss-module/index.html +1120 -327
- package/docs-dev/guide/index.html +1120 -327
- package/docs-dev/index.html +1120 -327
- package/docs-dev/javascript/events/index.html +1158 -327
- package/docs-dev/javascript/index.html +1120 -327
- package/docs-dev/javascript/settings/index.html +5705 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +1134 -343
- package/docs-dev/javascript/ui-collapsible/index.html +1119 -328
- package/docs-dev/javascript/ui-details-group/index.html +5622 -0
- package/docs-dev/javascript/ui-dialog/index.html +1151 -345
- package/docs-dev/javascript/ui-flipcard/index.html +1180 -333
- package/docs-dev/javascript/ui-grid/index.html +1130 -365
- package/docs-dev/javascript/ui-modal-builder/index.html +1303 -372
- package/docs-dev/javascript/ui-overflow-scroller/index.html +1119 -328
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +1119 -328
- package/docs-dev/javascript/ui-page/index.html +1119 -328
- package/docs-dev/javascript/ui-popover/index.html +1129 -342
- package/docs-dev/javascript/ui-print/index.html +1117 -334
- package/docs-dev/javascript/ui-print-details/index.html +1119 -328
- package/docs-dev/javascript/ui-programmatic-modal/index.html +1119 -328
- package/docs-dev/javascript/ui-proxy-click/index.html +1208 -332
- package/docs-dev/javascript/ui-resizer/index.html +1400 -344
- package/docs-dev/javascript/ui-scroll-slider/index.html +1159 -336
- package/docs-dev/javascript/ui-scrollpoint/index.html +1129 -345
- package/docs-dev/javascript/ui-slider/index.html +1317 -335
- package/docs-dev/javascript/ui-tabs/index.html +1138 -384
- package/docs-dev/javascript/ui-theme-toggle/index.html +5710 -0
- package/docs-dev/javascript/ui-tooltip/index.html +1136 -349
- package/docs-dev/javascript/utils-class-logger/index.html +1120 -329
- package/docs-dev/javascript/utils-css/index.html +5524 -0
- package/docs-dev/javascript/utils-dom/index.html +1153 -442
- package/docs-dev/javascript/utils-file-save/index.html +1119 -328
- package/docs-dev/javascript/utils-floating-ui/index.html +1119 -328
- package/docs-dev/javascript/utils-id/index.html +1119 -328
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +1119 -328
- package/docs-dev/javascript/utils-system/index.html +5827 -0
- package/docs-dev/sass/base/color/index.html +1119 -328
- package/docs-dev/sass/base/elements/index.html +1127 -336
- package/docs-dev/sass/base/index/index.html +1119 -328
- package/docs-dev/sass/base/index.html +1120 -327
- package/docs-dev/sass/base/keyframes/index.html +1120 -329
- package/docs-dev/sass/base/layout/index.html +1119 -328
- package/docs-dev/sass/base/normalize/index.html +1119 -328
- package/docs-dev/sass/base/print/index.html +1119 -328
- package/docs-dev/sass/base/root/index.html +1119 -328
- package/docs-dev/sass/base/typography/index.html +1119 -328
- package/docs-dev/sass/components/accordion/index.html +1142 -344
- package/docs-dev/sass/components/adaptive-spacing/index.html +1119 -328
- package/docs-dev/sass/components/badge/index.html +1145 -343
- package/docs-dev/sass/components/basic-hero/index.html +5685 -0
- package/docs-dev/sass/components/button/index.html +1119 -328
- package/docs-dev/sass/components/button-group/index.html +5683 -0
- package/docs-dev/sass/components/button-verbose/index.html +1205 -339
- package/docs-dev/sass/components/callout/index.html +1224 -414
- package/docs-dev/sass/components/captioned-figure/index.html +1243 -337
- package/docs-dev/sass/components/card/index.html +1215 -352
- package/docs-dev/sass/components/card-grid/index.html +1119 -328
- package/docs-dev/sass/components/counter-list/index.html +5767 -0
- package/docs-dev/sass/components/css-icon/index.html +1140 -342
- package/docs-dev/sass/components/data-grid/index.html +1139 -341
- package/docs-dev/sass/components/data-table/index.html +1327 -346
- package/docs-dev/sass/components/fill-context/index.html +1119 -328
- package/docs-dev/sass/components/flipcard/index.html +1161 -339
- package/docs-dev/sass/components/flipcard-grid/index.html +1119 -328
- package/docs-dev/sass/components/form-theme/index.html +1334 -447
- package/docs-dev/sass/components/headline-label/index.html +5713 -0
- package/docs-dev/sass/components/hero/index.html +1179 -340
- package/docs-dev/sass/components/horizontal-rule/index.html +1119 -328
- package/docs-dev/sass/components/image-grid/index.html +1119 -328
- package/docs-dev/sass/components/index/index.html +1136 -338
- package/docs-dev/sass/components/index.html +1120 -327
- package/docs-dev/sass/components/links/index.html +1119 -328
- package/docs-dev/sass/components/list-inline/index.html +1119 -328
- package/docs-dev/sass/components/list-lines/index.html +1119 -328
- package/docs-dev/sass/components/list-ordered/index.html +1119 -328
- package/docs-dev/sass/components/list-unordered/index.html +1119 -328
- package/docs-dev/sass/components/menu-stack/index.html +1156 -352
- package/docs-dev/sass/components/modal/index.html +1173 -347
- package/docs-dev/sass/components/nav-strip/index.html +1127 -336
- package/docs-dev/sass/components/overlay-section/index.html +1127 -336
- package/docs-dev/sass/components/pager/index.html +1119 -328
- package/docs-dev/sass/components/panel/index.html +5913 -0
- package/docs-dev/sass/components/placeholder-block/index.html +1119 -328
- package/docs-dev/sass/components/popover/index.html +1179 -352
- package/docs-dev/sass/components/pull-quote/index.html +1131 -340
- package/docs-dev/sass/components/rail/index.html +5700 -0
- package/docs-dev/sass/components/ratio-box/index.html +1127 -336
- package/docs-dev/sass/components/rule/index.html +1120 -329
- package/docs-dev/sass/components/scroll-slider/index.html +1129 -350
- package/docs-dev/sass/components/skip-link/index.html +1119 -328
- package/docs-dev/sass/components/slider/index.html +1173 -394
- package/docs-dev/sass/components/spoke-spinner/index.html +1121 -330
- package/docs-dev/sass/components/sticky-list/index.html +5903 -0
- package/docs-dev/sass/components/table-sticky/index.html +5677 -0
- package/docs-dev/sass/components/tabs/index.html +1154 -348
- package/docs-dev/sass/components/tag/index.html +1121 -330
- package/docs-dev/sass/components/tile-button/index.html +1119 -328
- package/docs-dev/sass/components/tile-grid/index.html +1119 -328
- package/docs-dev/sass/components/tile-grid-overlay/index.html +1119 -328
- package/docs-dev/sass/components/vignette/index.html +1131 -334
- package/docs-dev/sass/components/wysiwyg/index.html +1159 -350
- package/docs-dev/sass/core/breakpoint/index.html +1212 -369
- package/docs-dev/sass/core/button/index.html +1151 -358
- package/docs-dev/sass/core/color/index.html +1291 -368
- package/docs-dev/sass/core/cssvar/index.html +1119 -328
- package/docs-dev/sass/core/element/index.html +1440 -367
- package/docs-dev/sass/core/index.html +1119 -328
- package/docs-dev/sass/core/layout/index.html +1173 -363
- package/docs-dev/sass/core/path/index.html +1119 -328
- package/docs-dev/sass/core/selector/index.html +1119 -328
- package/docs-dev/sass/core/typography/index.html +1119 -328
- package/docs-dev/sass/core/units/index.html +1127 -330
- package/docs-dev/sass/core/utils/index.html +2389 -449
- package/docs-dev/sass/helpers/color/index.html +1119 -328
- package/docs-dev/sass/helpers/display/index.html +1120 -329
- package/docs-dev/sass/helpers/index/index.html +1119 -328
- package/docs-dev/sass/helpers/index.html +1120 -327
- package/docs-dev/sass/helpers/print/index.html +759 -298
- package/docs-dev/sass/helpers/typography/index.html +1119 -328
- package/docs-dev/sass/helpers/units/index.html +1119 -328
- package/docs-dev/sass/helpers/utilities/index.html +1121 -330
- package/docs-dev/sass/index.html +1120 -327
- package/js/events/index.js +17 -5
- package/js/index.js +1 -0
- package/js/settings.js +97 -0
- package/js/ui/breakpoints.js +19 -16
- package/js/ui/collapsible.js +8 -1
- package/js/ui/details-group.js +112 -0
- package/js/ui/dialog.js +103 -44
- package/js/ui/dialog.todo +2 -36
- package/js/ui/flipcard.js +37 -57
- package/js/ui/grid.js +15 -13
- package/js/ui/index.js +1 -0
- package/js/ui/modal-builder.js +127 -70
- package/js/ui/overflow-scroller.js +6 -4
- package/js/ui/page.js +2 -2
- package/js/ui/popover.js +38 -38
- package/js/ui/print.js +16 -25
- package/js/ui/programmatic-modal.js +9 -3
- package/js/ui/proxy-click.js +50 -36
- package/js/ui/resizer.js +408 -39
- package/js/ui/scroll-slider.js +24 -30
- package/js/ui/scrollpoint.js +29 -64
- package/js/ui/slider.js +108 -63
- package/js/ui/tabs.js +23 -36
- package/js/ui/theme-toggle.js +332 -94
- package/js/ui/tooltip.js +27 -32
- package/js/utils/class-logger.js +3 -3
- package/js/utils/css.js +13 -0
- package/js/utils/dom.js +23 -64
- package/js/utils/font-awesome.js +19 -0
- package/js/utils/index.js +2 -1
- package/js/utils/system.js +155 -0
- package/package.json +23 -8
- package/scss/README.md +4 -0
- package/scss/_breakpoint.scss +39 -5
- package/scss/_button.scss +7 -5
- package/scss/_color.scss +40 -9
- package/scss/_element.scss +124 -2
- package/scss/_layout.scss +7 -8
- package/scss/_units.scss +3 -2
- package/scss/_utils.scss +387 -16
- package/scss/base/_elements.scss +0 -1
- package/scss/base/_keyframes.scss +10 -0
- package/scss/base/_layout.scss +1 -0
- package/scss/base/_print.scss +2 -0
- package/scss/base/_root.scss +2 -0
- package/scss/components/README.todos +14 -0
- package/scss/components/_accordion.scss +33 -19
- package/scss/components/_badge.scss +23 -4
- package/scss/components/_basic-hero.scss +112 -0
- package/scss/components/_button-group.scss +90 -0
- package/scss/components/_button-verbose.scss +100 -18
- package/scss/components/_callout.scss +125 -78
- package/scss/components/_captioned-figure.scss +17 -0
- package/scss/components/_card-grid.scss +1 -1
- package/scss/components/_card.scss +228 -66
- package/scss/components/_counter-list.scss +151 -0
- package/scss/components/_css-icon.scss +35 -21
- package/scss/components/_data-grid.scss +55 -12
- package/scss/components/_data-table.scss +39 -3
- package/scss/components/_flipcard.scss +8 -3
- package/scss/components/_form-theme.scss +119 -108
- package/scss/components/_headline-label.scss +83 -0
- package/scss/components/_hero.scss +12 -10
- package/scss/components/_index.scss +42 -0
- package/scss/components/_menu-stack.scss +42 -26
- package/scss/components/_modal.scss +58 -29
- package/scss/components/_nav-strip.scss +2 -0
- package/scss/components/_overlay-section.scss +2 -5
- package/scss/components/_panel.scss +246 -0
- package/scss/components/_popover.scss +165 -64
- package/scss/components/_pull-quote.scss +13 -13
- package/scss/components/_rail.scss +120 -0
- package/scss/components/_ratio-box.scss +2 -5
- package/scss/components/_rule.scss +1 -0
- package/scss/components/_scroll-slider.scss +1 -5
- package/scss/components/_slider.scss +49 -72
- package/scss/components/_spoke-spinner.scss +2 -2
- package/scss/components/_sticky-list.scss +206 -0
- package/scss/components/_tabs.scss +22 -4
- package/scss/components/_vignette.scss +3 -5
- package/scss/components/_wysiwyg.scss +21 -13
- package/scss/helpers/_display.scss +15 -18
- package/scss/helpers/_print.scss +12 -7
- package/scss/helpers/_utilities.scss +42 -32
- package/types/events/index.d.ts +10 -1
- package/types/events/index.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/settings.d.ts +70 -0
- package/types/settings.d.ts.map +1 -0
- package/types/ui/breakpoints.d.ts +14 -14
- package/types/ui/breakpoints.d.ts.map +1 -1
- package/types/ui/collapsible.d.ts.map +1 -1
- package/types/ui/details-group.d.ts +38 -0
- package/types/ui/details-group.d.ts.map +1 -0
- package/types/ui/dialog.d.ts +20 -14
- package/types/ui/dialog.d.ts.map +1 -1
- package/types/ui/flipcard.d.ts +16 -10
- package/types/ui/flipcard.d.ts.map +1 -1
- package/types/ui/grid.d.ts +4 -6
- package/types/ui/grid.d.ts.map +1 -1
- package/types/ui/index.d.ts +2 -1
- package/types/ui/modal-builder.d.ts +116 -11
- 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/popover.d.ts +6 -7
- package/types/ui/popover.d.ts.map +1 -1
- package/types/ui/print.d.ts +0 -4
- package/types/ui/print.d.ts.map +1 -1
- package/types/ui/programmatic-modal.d.ts.map +1 -1
- package/types/ui/proxy-click.d.ts +19 -3
- package/types/ui/proxy-click.d.ts.map +1 -1
- package/types/ui/resizer.d.ts +116 -16
- package/types/ui/resizer.d.ts.map +1 -1
- package/types/ui/scroll-slider.d.ts +5 -7
- package/types/ui/scroll-slider.d.ts.map +1 -1
- package/types/ui/scrollpoint.d.ts +3 -8
- package/types/ui/scrollpoint.d.ts.map +1 -1
- package/types/ui/slider.d.ts +33 -14
- package/types/ui/slider.d.ts.map +1 -1
- package/types/ui/tabs.d.ts +6 -8
- package/types/ui/tabs.d.ts.map +1 -1
- package/types/ui/theme-toggle.d.ts +51 -7
- package/types/ui/theme-toggle.d.ts.map +1 -1
- package/types/ui/tooltip.d.ts +3 -5
- package/types/ui/tooltip.d.ts.map +1 -1
- package/types/utils/css.d.ts +11 -0
- package/types/utils/css.d.ts.map +1 -0
- package/types/utils/dom.d.ts +12 -32
- 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 +2 -1
- package/types/utils/system.d.ts +113 -0
- package/types/utils/system.d.ts.map +1 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group panel
|
|
3
|
+
/// A structured container for content with distinct header, body, and footer sections that can bleed to the edges.
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
@use "sass:list";
|
|
8
|
+
@use "sass:meta";
|
|
9
|
+
|
|
10
|
+
@use "../utils";
|
|
11
|
+
@use "../selector";
|
|
12
|
+
@use "../color";
|
|
13
|
+
@use "../element";
|
|
14
|
+
@use "../breakpoint";
|
|
15
|
+
|
|
16
|
+
// Used for function fallback
|
|
17
|
+
$-fallbacks: (
|
|
18
|
+
"box-shadow" : (
|
|
19
|
+
"function" : meta.get-function("get", false, "element"),
|
|
20
|
+
"property" : "box-shadow"
|
|
21
|
+
),
|
|
22
|
+
"border-radius" : (
|
|
23
|
+
"function" : meta.get-function("get", false, "element"),
|
|
24
|
+
"property" : "border-radius"
|
|
25
|
+
),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/// Module Settings
|
|
29
|
+
/// @type Map
|
|
30
|
+
/// @prop {Color} background-color [rgb(255, 255, 255)] The background color of the panel
|
|
31
|
+
/// @prop {Color} border [null] Set border to panel
|
|
32
|
+
/// @prop {Dimension} border-radius [element.$config.border-radius] The border radius of the panel
|
|
33
|
+
/// @prop {CssValue} box-shadow [element.$config.box-shadow] The box-shadow of the panel
|
|
34
|
+
/// @prop {Dimension} margin-bottom [1.5rem] The bottom margin of the panel
|
|
35
|
+
/// @prop {CssValue} overflow [null] Value for overflow, not included by default as it interferes with position sticky, but could be useful for cropping if that's needed (can be set on rows too)
|
|
36
|
+
|
|
37
|
+
$config: (
|
|
38
|
+
"background-color" : rgb(255, 255, 255),
|
|
39
|
+
"border" : null,
|
|
40
|
+
"border-radius" : true,
|
|
41
|
+
"box-shadow" : true,
|
|
42
|
+
"margin-bottom" : 1.5em,
|
|
43
|
+
"overflow" : null,
|
|
44
|
+
) !default;
|
|
45
|
+
|
|
46
|
+
/// Styles Map (for unique variations/modifiers)
|
|
47
|
+
/// - Use this map to define distinct visual styles for the panel
|
|
48
|
+
/// - This map is two levels the first level is the name of the modifier (see default below).
|
|
49
|
+
/// This will become the modifier for the pane; so ("transparent" : (...)) = .panel--transparent.
|
|
50
|
+
/// The second level is that modifier row modifiers (ie. panel__row--header) (see row options below)
|
|
51
|
+
/// - Keyword "default" means without modifier for both parent and row configs
|
|
52
|
+
/// - For example "default" as panel container modifier name will mean
|
|
53
|
+
/// styles for this without any modifiers
|
|
54
|
+
/// - In a panels row config (second level) "default" will refer to the non-modified row (ie .panel__row)
|
|
55
|
+
/// - Order matters, default should be first
|
|
56
|
+
/// - Row Options
|
|
57
|
+
/// - Each row can have the following options:
|
|
58
|
+
/// overflow: Set overflow property if needed,
|
|
59
|
+
/// aspect-ratio,
|
|
60
|
+
/// height,
|
|
61
|
+
/// min-height,
|
|
62
|
+
/// padding,
|
|
63
|
+
/// margin: Can be used to create gap between container and row
|
|
64
|
+
/// background-color,
|
|
65
|
+
/// font-weight,
|
|
66
|
+
/// font-family,
|
|
67
|
+
/// color,
|
|
68
|
+
/// box-shadow,
|
|
69
|
+
/// grow: Default the panel will grow to fill the containers height, passing false disables this
|
|
70
|
+
/// border-top: If a string is passed it will resolved as an element rule style
|
|
71
|
+
/// border-bottom: If a string is passed it will resolved as an element rule style
|
|
72
|
+
/// @type Map
|
|
73
|
+
|
|
74
|
+
$styles: (
|
|
75
|
+
"default" : (
|
|
76
|
+
"default" : (
|
|
77
|
+
"padding": 1em,
|
|
78
|
+
),
|
|
79
|
+
"header" : (
|
|
80
|
+
"padding" : (0.75em 1em),
|
|
81
|
+
"background-color" : #e7e7e7,
|
|
82
|
+
"border-bottom" : "default",
|
|
83
|
+
"font-weight" : bold,
|
|
84
|
+
"grow" : false,
|
|
85
|
+
"breakpoints" : (
|
|
86
|
+
"small" : (
|
|
87
|
+
"direction" : "max",
|
|
88
|
+
"padding" : (0.25em 0.5em)
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
),
|
|
92
|
+
"footer" : (
|
|
93
|
+
"padding" : (0.5em 1em),
|
|
94
|
+
"background-color" : #f4f4f4,
|
|
95
|
+
"border-top" : "default",
|
|
96
|
+
"grow" : false
|
|
97
|
+
),
|
|
98
|
+
"separator-top" : (
|
|
99
|
+
"border-top" : "light",
|
|
100
|
+
),
|
|
101
|
+
"separator-bottom" : (
|
|
102
|
+
"border-bottom" : "light",
|
|
103
|
+
)
|
|
104
|
+
),
|
|
105
|
+
"transparent" : (
|
|
106
|
+
"default" : (
|
|
107
|
+
"padding" : (1em 0),
|
|
108
|
+
"margin" : (0 1em),
|
|
109
|
+
),
|
|
110
|
+
"header" : (
|
|
111
|
+
"padding" : (1em 0),
|
|
112
|
+
"margin" : (0 1em),
|
|
113
|
+
"background-color" : transparent,
|
|
114
|
+
"grow" : false
|
|
115
|
+
),
|
|
116
|
+
"footer" : (
|
|
117
|
+
"padding" : (1em 0),
|
|
118
|
+
"margin" : (0 1em),
|
|
119
|
+
"background-color" : transparent,
|
|
120
|
+
"grow" : false
|
|
121
|
+
)
|
|
122
|
+
),
|
|
123
|
+
"compact" : (
|
|
124
|
+
"default" : (
|
|
125
|
+
"padding" : (0.25em 0.5em)
|
|
126
|
+
),
|
|
127
|
+
"header" : (
|
|
128
|
+
"padding" : (0.25em 0.5em)
|
|
129
|
+
),
|
|
130
|
+
"body" : (
|
|
131
|
+
"padding" : (0.5em 1em)
|
|
132
|
+
)
|
|
133
|
+
)
|
|
134
|
+
) !default;
|
|
135
|
+
|
|
136
|
+
/// Change modules $config
|
|
137
|
+
/// @param {Map} $changes Map of changes
|
|
138
|
+
/// @example scss
|
|
139
|
+
/// @include ulu.component-panel-set(( "property" : value ));
|
|
140
|
+
@mixin set($changes) {
|
|
141
|
+
$config: map.merge($config, $changes) !global;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/// Get a config option
|
|
145
|
+
/// @param {Map} $name Name of property
|
|
146
|
+
/// @example scss
|
|
147
|
+
/// @include ulu.component-panel-get("property");
|
|
148
|
+
@function get($name) {
|
|
149
|
+
$value: utils.require-map-get($config, $name, "panel [config]");
|
|
150
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/// Set style variations
|
|
154
|
+
/// - See $styles for more information on map properties/structure
|
|
155
|
+
/// @param {Map} $changes Map of changes (options for style include all config properties)
|
|
156
|
+
/// @param {String} $merge-mode Merge mode see utils.map-merge() [null|"deep"|"overwrite"]
|
|
157
|
+
@mixin set-styles($changes, $merge-mode: null) {
|
|
158
|
+
$styles: utils.map-merge($styles, $changes, $merge-mode) !global;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/// Output component styles
|
|
162
|
+
/// @example scss
|
|
163
|
+
/// @include ulu.component-panel-styles();
|
|
164
|
+
@mixin styles {
|
|
165
|
+
$prefix: selector.class("panel");
|
|
166
|
+
|
|
167
|
+
#{ $prefix } {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
overflow: get("overflow");
|
|
171
|
+
background-color: get("background-color");
|
|
172
|
+
box-shadow: get("box-shadow");
|
|
173
|
+
border: get("border");
|
|
174
|
+
border-radius: get("border-radius");
|
|
175
|
+
}
|
|
176
|
+
#{ $prefix }__row {
|
|
177
|
+
&:first-child {
|
|
178
|
+
border-top-left-radius: get("border-radius");
|
|
179
|
+
border-top-right-radius: get("border-radius");
|
|
180
|
+
}
|
|
181
|
+
&:last-child {
|
|
182
|
+
border-bottom-left-radius: get("border-radius");
|
|
183
|
+
border-bottom-right-radius: get("border-radius");
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@each $modifier, $rows in $styles {
|
|
188
|
+
@if ($modifier == "default") {
|
|
189
|
+
@each $row-name, $props in $rows {
|
|
190
|
+
@if ($row-name == "default") {
|
|
191
|
+
#{ $prefix }__row {
|
|
192
|
+
@include create-row-style($props);
|
|
193
|
+
}
|
|
194
|
+
} @else {
|
|
195
|
+
#{ $prefix }__row--#{ $row-name } {
|
|
196
|
+
@include create-row-style($props);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
} @else {
|
|
201
|
+
#{ $prefix }--#{ $modifier } {
|
|
202
|
+
@each $row-name, $props in $rows {
|
|
203
|
+
@if ($row-name == "default") {
|
|
204
|
+
#{ $prefix }__row {
|
|
205
|
+
@include create-row-style($props);
|
|
206
|
+
}
|
|
207
|
+
} @else {
|
|
208
|
+
#{ $prefix }__row--#{ $row-name } {
|
|
209
|
+
@include create-row-style($props);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/// Create row styles
|
|
219
|
+
/// @param {Map} $props - Row Options
|
|
220
|
+
@mixin create-row-style($props) {
|
|
221
|
+
overflow: map.get($props, "overflow");
|
|
222
|
+
aspect-ratio: map.get($props, "aspect-ratio");
|
|
223
|
+
height: map.get($props, "height");
|
|
224
|
+
min-height: map.get($props, "min-height");
|
|
225
|
+
padding: map.get($props, "padding");
|
|
226
|
+
margin: map.get($props, "margin");
|
|
227
|
+
background-color: color.get(map.get($props, "background-color"));
|
|
228
|
+
font-weight: map.get($props, "font-weight");
|
|
229
|
+
font-family: map.get($props, "font-family");
|
|
230
|
+
color: color.get(map.get($props, "color"));
|
|
231
|
+
box-shadow: map.get($props, "box-shadow");
|
|
232
|
+
flex-grow: if(map.get($props, "grow") == false, 0, 1); // Default is grow
|
|
233
|
+
border-top: element.get-optional-rule-style(map.get($props, "border-top"));
|
|
234
|
+
border-bottom: element.get-optional-rule-style(map.get($props, "border-bottom"));
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
// Allow passing breakpoint maps
|
|
238
|
+
$breakpoints: map.get($props, "breakpoints");
|
|
239
|
+
$b-options: ( "directionRequired" : true );
|
|
240
|
+
|
|
241
|
+
@if ($breakpoints and list.length($breakpoints)) {
|
|
242
|
+
@include breakpoint.from-each($breakpoints, $b-options) using ($b-props) {
|
|
243
|
+
@include create-row-style($b-props);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -29,38 +29,41 @@ $-fallbacks: (
|
|
|
29
29
|
|
|
30
30
|
/// Module Settings
|
|
31
31
|
/// @type Map
|
|
32
|
-
/// @prop {Dimension} arrow-size [16px]
|
|
33
|
-
/// @prop {
|
|
34
|
-
/// @prop {
|
|
35
|
-
/// @prop {Color} color [
|
|
36
|
-
/// @prop {Dimension}
|
|
37
|
-
/// @prop {
|
|
38
|
-
/// @prop {Dimension}
|
|
39
|
-
/// @prop {Dimension}
|
|
40
|
-
/// @prop {Dimension}
|
|
41
|
-
/// @prop {
|
|
42
|
-
/// @prop {
|
|
43
|
-
/// @prop {
|
|
44
|
-
/// @prop {
|
|
45
|
-
/// @prop {Color} header-background-color [#ccc]
|
|
46
|
-
/// @prop {Color} header-color [null]
|
|
47
|
-
/// @prop {Color} header-media-background-color [black]
|
|
48
|
-
/// @prop {Dimension} header-padding-y [0.25rem]
|
|
49
|
-
/// @prop {Color} footer-background-color [#ccc]
|
|
50
|
-
/// @prop {Color} footer-
|
|
51
|
-
/// @prop {
|
|
52
|
-
/// @prop {Dimension} footer-padding-y
|
|
53
|
-
/// @prop {
|
|
54
|
-
/// @prop {Color} tooltip-color [
|
|
55
|
-
/// @prop {
|
|
56
|
-
/// @prop {Dimension} tooltip-
|
|
57
|
-
/// @prop {Dimension} tooltip-
|
|
58
|
-
/// @prop {Dimension} width [
|
|
59
|
-
/// @prop {Dimension} width
|
|
60
|
-
/// @prop {Dimension} width-large
|
|
32
|
+
/// @prop {Dimension} arrow-size [16px] Size of the dropdown arrow.
|
|
33
|
+
/// @prop {Boolean} arrow-box-shadow [true] When true the arrow will get the popover's box shadow. Note if the box shadow is not a list (for example custom property), the mask won't be calculated from the box-shadow (use arrow-box-shadow-extent to specify manually)
|
|
34
|
+
/// @prop {Number} arrow-box-shadow-extent [null] If set will determine the amount of overlap added to the arrow mask, else it's calculated automatically by the box-shadow option (can be used if box-shadow is custom property)
|
|
35
|
+
/// @prop {Color} background-color [white] Background color of the popover.
|
|
36
|
+
/// @prop {Dimension} border-radius [6px] Border radius of the popover.
|
|
37
|
+
/// @prop {Color} color [inherit] Text color of the popover.
|
|
38
|
+
/// @prop {Dimension} max-width [90vw] Max width of the popover.
|
|
39
|
+
/// @prop {Dimension} max-height [25rem] Max height of the popover.
|
|
40
|
+
/// @prop {Dimension} padding [1rem] Padding of the popover.
|
|
41
|
+
/// @prop {Dimension} padding-large [2rem] Padding of the popover if using "--large" or "--large-x" styling.
|
|
42
|
+
/// @prop {Dimension} type-size [null] Font size of the popover.
|
|
43
|
+
/// @prop {Number} z-index [true] z-index of the popover.
|
|
44
|
+
/// @prop {CssValue} box-shadow [true] Box shadow of the popover.
|
|
45
|
+
/// @prop {Color} header-background-color [#ccc] Background color of the popover header
|
|
46
|
+
/// @prop {Color} header-color [null] Text color for the header.
|
|
47
|
+
/// @prop {Color} header-media-background-color [black] background color for header media.
|
|
48
|
+
/// @prop {Dimension} header-padding-y [0.25rem] Vertical padding of the header.
|
|
49
|
+
/// @prop {Color} footer-background-color [#ccc] Background color of the footer.
|
|
50
|
+
/// @prop {Color} footer-border-top [1px solid #dfdfdf] Optional border used to separate the content from footer
|
|
51
|
+
/// @prop {Color} footer-color [null] Text color of the footer.
|
|
52
|
+
/// @prop {Dimension} footer-padding-y [0.25rem] Vertical padding of the footer.
|
|
53
|
+
/// @prop {Dimension} footer-padding-y-large [0.5rem] Vertical padding of the footer if using "--large" or "--large-x" styling.
|
|
54
|
+
/// @prop {Color} tooltip-background-color [white] Background color of the tooltip.
|
|
55
|
+
/// @prop {Color} tooltip-color [null] Font color of the tooltip.
|
|
56
|
+
/// @prop {Dimension} tooltip-max-width [20rem] Max width of the tooltip.
|
|
57
|
+
/// @prop {Dimension} tooltip-padding [0.5rem] Padding of the tooltip.
|
|
58
|
+
/// @prop {Dimension} tooltip-width [auto] Width of the tooltip.
|
|
59
|
+
/// @prop {Dimension} width [15rem] Width of the popover.
|
|
60
|
+
/// @prop {Dimension} width-large [30rem] Width of the popover if using "--large".
|
|
61
|
+
/// @prop {Dimension} width-large-x [50rem] Width of the popover if using "--large-x".
|
|
61
62
|
|
|
62
63
|
$config: (
|
|
63
64
|
"arrow-size" : 16px,
|
|
65
|
+
"arrow-box-shadow" : true,
|
|
66
|
+
"arrow-box-shadow-extent" : null,
|
|
64
67
|
"background-color" : white,
|
|
65
68
|
"border-radius" : 6px,
|
|
66
69
|
"color" : inherit,
|
|
@@ -70,14 +73,12 @@ $config: (
|
|
|
70
73
|
"padding-large" : 2rem,
|
|
71
74
|
"type-size" : null,
|
|
72
75
|
"z-index" : true,
|
|
73
|
-
|
|
74
76
|
"box-shadow" : true,
|
|
75
|
-
"box-shadow-footer" : 0 0 4px,
|
|
76
|
-
"box-shadow-footer-color" : "box-shadow",
|
|
77
77
|
"header-background-color" : #ccc,
|
|
78
78
|
"header-color" : null,
|
|
79
79
|
"header-media-background-color": black,
|
|
80
80
|
"header-padding-y" : 0.25rem,
|
|
81
|
+
"footer-border-top" : 1px solid #dfdfdf,
|
|
81
82
|
"footer-background-color" : #ccc,
|
|
82
83
|
"footer-color" : null,
|
|
83
84
|
"footer-padding-y" : 0.25rem,
|
|
@@ -117,39 +118,9 @@ $config: (
|
|
|
117
118
|
|
|
118
119
|
@mixin styles {
|
|
119
120
|
$prefix: selector.class("popover");
|
|
120
|
-
$arrow-size-half: math.div(get("arrow-size"), 2);
|
|
121
121
|
|
|
122
122
|
@if (get("arrow-size")) {
|
|
123
|
-
|
|
124
|
-
display: block;
|
|
125
|
-
visibility: hidden;
|
|
126
|
-
z-index: 1;
|
|
127
|
-
&,
|
|
128
|
-
&:before {
|
|
129
|
-
position: absolute;
|
|
130
|
-
width: get("arrow-size");
|
|
131
|
-
height: get("arrow-size");
|
|
132
|
-
background: inherit;
|
|
133
|
-
}
|
|
134
|
-
&:before {
|
|
135
|
-
visibility: visible;
|
|
136
|
-
content: '';
|
|
137
|
-
transform: rotate(45deg);
|
|
138
|
-
// box-shadow: $box-shadow;
|
|
139
|
-
}
|
|
140
|
-
[data-placement^='top'] > & {
|
|
141
|
-
bottom: -($arrow-size-half);
|
|
142
|
-
}
|
|
143
|
-
[data-placement^='bottom'] > & {
|
|
144
|
-
top: -($arrow-size-half);
|
|
145
|
-
}
|
|
146
|
-
[data-placement^='left'] > & {
|
|
147
|
-
right: -($arrow-size-half);
|
|
148
|
-
}
|
|
149
|
-
[data-placement^='right'] > & {
|
|
150
|
-
left: -($arrow-size-half);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
123
|
+
@include -arrow-styles();
|
|
153
124
|
}
|
|
154
125
|
// Default position is on the right of the container (Popper handles positioning)
|
|
155
126
|
#{ $prefix } {
|
|
@@ -197,7 +168,7 @@ $config: (
|
|
|
197
168
|
background-color: color.get(get("header-media-background-color"));
|
|
198
169
|
}
|
|
199
170
|
#{ $prefix }__footer {
|
|
200
|
-
|
|
171
|
+
border-top: get("footer-border-top");
|
|
201
172
|
padding: get("footer-padding-y") get("padding");
|
|
202
173
|
color: color.get(get("footer-color"));
|
|
203
174
|
background-color: color.get(get("footer-background-color"));
|
|
@@ -260,4 +231,134 @@ $config: (
|
|
|
260
231
|
}
|
|
261
232
|
}
|
|
262
233
|
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@mixin -arrow-styles() {
|
|
237
|
+
@if get("arrow-box-shadow") {
|
|
238
|
+
@include -arrow-styles-with-box-shadow();
|
|
239
|
+
} @else {
|
|
240
|
+
@include -arrow-styles-simple();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Internal mixin for original arrow styles without box-shadow
|
|
245
|
+
@mixin -arrow-styles-simple() {
|
|
246
|
+
$prefix: selector.class("popover");
|
|
247
|
+
$size: get("arrow-size");
|
|
248
|
+
$half: math.div($size, 2);
|
|
249
|
+
|
|
250
|
+
#{ $prefix }__arrow {
|
|
251
|
+
visibility: hidden;
|
|
252
|
+
z-index: 1;
|
|
253
|
+
&,
|
|
254
|
+
&::before {
|
|
255
|
+
display: block;
|
|
256
|
+
position: absolute;
|
|
257
|
+
width: $size;
|
|
258
|
+
height: $size;
|
|
259
|
+
background: inherit;
|
|
260
|
+
}
|
|
261
|
+
&::before {
|
|
262
|
+
visibility: visible;
|
|
263
|
+
content: '';
|
|
264
|
+
transform: rotate(45deg);
|
|
265
|
+
}
|
|
266
|
+
[data-placement^="top"] > & {
|
|
267
|
+
bottom: -($half);
|
|
268
|
+
}
|
|
269
|
+
[data-placement^="bottom"] > & {
|
|
270
|
+
top: -($half);
|
|
271
|
+
}
|
|
272
|
+
[data-placement^="left"] > & {
|
|
273
|
+
right: -($half);
|
|
274
|
+
}
|
|
275
|
+
[data-placement^="right"] > & {
|
|
276
|
+
left: -($half);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
// Account for footer and change arrow color when positioned next to it
|
|
280
|
+
#{ $prefix }__footer ~ #{ $prefix }__arrow {
|
|
281
|
+
[data-placement^="top"] > & {
|
|
282
|
+
&::before {
|
|
283
|
+
background-color: get("footer-background-color");
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Internal mixin for arrow styles when using the mask (extra pseudo element)
|
|
290
|
+
@mixin -arrow-styles-with-box-shadow() {
|
|
291
|
+
$prefix: selector.class("popover");
|
|
292
|
+
$box-shadow: get("box-shadow");
|
|
293
|
+
$size: get("arrow-size");
|
|
294
|
+
$half: math.div($size, 2);
|
|
295
|
+
$size-info: utils.number-info($size);
|
|
296
|
+
$unitless: map.get($size-info, "value");
|
|
297
|
+
$unit: map.get($size-info, "unit");
|
|
298
|
+
$hypotenuse: utils.hypotenuse($unitless, $unitless);
|
|
299
|
+
$hypotenuse-half: math.div($hypotenuse, 2);
|
|
300
|
+
$manual-extent: get("arrow-box-shadow-extent");
|
|
301
|
+
$shadow-extent: if(
|
|
302
|
+
$manual-extent,
|
|
303
|
+
$manual-extent,
|
|
304
|
+
if(utils.is-list($box-shadow), utils.box-shadow-extent($box-shadow), 5px)
|
|
305
|
+
);
|
|
306
|
+
$overlap: utils.strip-unit($shadow-extent);
|
|
307
|
+
$mask-height: utils.add-unit($hypotenuse-half + $overlap, $unit);
|
|
308
|
+
$mask-width: utils.add-unit($hypotenuse + $overlap, $unit);
|
|
309
|
+
|
|
310
|
+
#{ $prefix }__arrow {
|
|
311
|
+
visibility: hidden;
|
|
312
|
+
z-index: 1;
|
|
313
|
+
&,
|
|
314
|
+
&::before,
|
|
315
|
+
&::after {
|
|
316
|
+
display: block;
|
|
317
|
+
position: absolute;
|
|
318
|
+
width: $size;
|
|
319
|
+
height: $size;
|
|
320
|
+
background: inherit;
|
|
321
|
+
}
|
|
322
|
+
&::before,
|
|
323
|
+
&::after {
|
|
324
|
+
visibility: visible;
|
|
325
|
+
content: '';
|
|
326
|
+
}
|
|
327
|
+
&::before {
|
|
328
|
+
box-shadow: get("box-shadow");
|
|
329
|
+
transform: rotate(45deg);
|
|
330
|
+
}
|
|
331
|
+
// Masking shape
|
|
332
|
+
&::after {
|
|
333
|
+
top: 50%;
|
|
334
|
+
left: 50%;
|
|
335
|
+
transform: translateX(-50%);
|
|
336
|
+
height: $mask-height;
|
|
337
|
+
width: $mask-width;
|
|
338
|
+
}
|
|
339
|
+
[data-placement^="top"] > & {
|
|
340
|
+
bottom: -($half);
|
|
341
|
+
transform: rotate(180deg); // Rotate w. mask
|
|
342
|
+
}
|
|
343
|
+
[data-placement^="bottom"] > & {
|
|
344
|
+
top: -($half);
|
|
345
|
+
}
|
|
346
|
+
[data-placement^="left"] > & {
|
|
347
|
+
right: -($half);
|
|
348
|
+
transform: rotate(90deg); // Rotate w. mask
|
|
349
|
+
}
|
|
350
|
+
[data-placement^="right"] > & {
|
|
351
|
+
left: -($half);
|
|
352
|
+
transform: rotate(-90deg); // Rotate w. mask
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
// Account for footer and change arrow color when positioned next to it
|
|
356
|
+
#{ $prefix }__footer ~ #{ $prefix }__arrow {
|
|
357
|
+
[data-placement^="top"] > & {
|
|
358
|
+
&::before,
|
|
359
|
+
&::after {
|
|
360
|
+
background-color: get("footer-background-color");
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
263
364
|
}
|
|
@@ -21,18 +21,18 @@ $-fallbacks: (
|
|
|
21
21
|
|
|
22
22
|
/// Module Settings
|
|
23
23
|
/// @type Map
|
|
24
|
-
/// @prop {} body-line-height [true]
|
|
25
|
-
/// @prop {} image-margin-bottom [1rem]
|
|
26
|
-
/// @prop {} image-margin-top [2.5rem]
|
|
27
|
-
/// @prop {} name-margin-bottom [1rem]
|
|
28
|
-
/// @prop {} padding-y [2em]
|
|
29
|
-
/// @prop {} title-font-style [italic]
|
|
30
|
-
/// @prop {} quote-mark-character ["\201c"]
|
|
31
|
-
/// @prop {} quote-mark-color [null]
|
|
32
|
-
/// @prop {} quote-mark-font-family ["Georgia"]
|
|
33
|
-
/// @prop {} quote-mark-font-size [3.75em]
|
|
34
|
-
/// @prop {} quote-mark-enabled [true]
|
|
35
|
-
/// @prop {} quote-mark-line-height [0.35]
|
|
24
|
+
/// @prop {Number} body-line-height [true]
|
|
25
|
+
/// @prop {Dimension} image-margin-bottom [1rem]
|
|
26
|
+
/// @prop {Dimension} image-margin-top [2.5rem]
|
|
27
|
+
/// @prop {Dimension} name-margin-bottom [1rem]
|
|
28
|
+
/// @prop {Dimension} padding-y [2em]
|
|
29
|
+
/// @prop {CssValue} title-font-style [italic]
|
|
30
|
+
/// @prop {String} quote-mark-character ["\201c"]
|
|
31
|
+
/// @prop {Color} quote-mark-color [null]
|
|
32
|
+
/// @prop {String} quote-mark-font-family ["Georgia"]
|
|
33
|
+
/// @prop {Dimension} quote-mark-font-size [3.75em]
|
|
34
|
+
/// @prop {Boolean} quote-mark-enabled [true]
|
|
35
|
+
/// @prop {Number} quote-mark-line-height [0.35]
|
|
36
36
|
|
|
37
37
|
$config: (
|
|
38
38
|
"body-line-height" : true,
|
|
@@ -83,7 +83,7 @@ $config: (
|
|
|
83
83
|
#{ $prefix }__body {
|
|
84
84
|
line-height: get("body-line-height");
|
|
85
85
|
@if (get("quote-mark-enabled")) {
|
|
86
|
-
|
|
86
|
+
&::before {
|
|
87
87
|
display: block;
|
|
88
88
|
position: relative;
|
|
89
89
|
// content: open-quote;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group rail
|
|
3
|
+
////
|
|
4
|
+
/// A horizontal, flexible container for arranging diverse inline elements.
|
|
5
|
+
/// It provides a consistent layout for icons, labels, buttons, or other
|
|
6
|
+
/// modular components, aligning content to either end or centering it.
|
|
7
|
+
/// Item spacing is controlled via margins, allowing for individual item gap adjustments.
|
|
8
|
+
|
|
9
|
+
@use "sass:map";
|
|
10
|
+
@use "sass:meta";
|
|
11
|
+
@use "sass:math";
|
|
12
|
+
|
|
13
|
+
@use "../utils";
|
|
14
|
+
@use "../color";
|
|
15
|
+
@use "../selector";
|
|
16
|
+
@use "../layout";
|
|
17
|
+
@use "../element";
|
|
18
|
+
|
|
19
|
+
// Used for function fallback
|
|
20
|
+
$-fallbacks: (
|
|
21
|
+
"separator" : (
|
|
22
|
+
"function" : meta.get-function("get-rule-style", false, "element"),
|
|
23
|
+
"arguments" : ("light",)
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/// Module Settings
|
|
29
|
+
/// @type Map
|
|
30
|
+
/// @prop {Dimension} gap [1em] The default space between items in the rail
|
|
31
|
+
/// @prop {Map} gap-modifiers [("small" : 0.5em, "large" : 2em )] Alternate gaps (use child modifiers .rail__item--gap-[name], these apply gap changes between the item and the item before it
|
|
32
|
+
/// @prop {Dimension} margin-bottom [1em] The default space after rail
|
|
33
|
+
/// @prop {CssValue} separator [true] Pass border property for separator, defaults to element rule style light
|
|
34
|
+
|
|
35
|
+
$config: (
|
|
36
|
+
"gap" : 1em,
|
|
37
|
+
"margin-bottom" : 1em,
|
|
38
|
+
"separator" : true,
|
|
39
|
+
"gap-modifiers": (
|
|
40
|
+
"small" : 0.5em,
|
|
41
|
+
"none" : 0,
|
|
42
|
+
"large" : 2em
|
|
43
|
+
),
|
|
44
|
+
) !default;
|
|
45
|
+
|
|
46
|
+
/// Change modules $config
|
|
47
|
+
/// @param {Map} $changes Map of changes
|
|
48
|
+
/// @example scss
|
|
49
|
+
/// @include ulu.component-rail-set(( "gap" : 1.5em ));
|
|
50
|
+
|
|
51
|
+
@mixin set($changes) {
|
|
52
|
+
$config: map.merge($config, $changes) !global;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/// Get a config option
|
|
56
|
+
/// @param {Map} $name Name of property
|
|
57
|
+
/// @example scss
|
|
58
|
+
/// @include ulu.component-rail-get("gap");
|
|
59
|
+
|
|
60
|
+
@function get($name) {
|
|
61
|
+
$value: utils.require-map-get($config, $name, "rail [config]");
|
|
62
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/// Prints component styles
|
|
66
|
+
/// @example scss
|
|
67
|
+
/// @include ulu.component-rail-styles();
|
|
68
|
+
|
|
69
|
+
@mixin styles {
|
|
70
|
+
$prefix: selector.class("rail");
|
|
71
|
+
$gap: get("gap");
|
|
72
|
+
|
|
73
|
+
#{ $prefix } {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
gap: $gap;
|
|
78
|
+
margin-bottom: get("margin-bottom");
|
|
79
|
+
max-width: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Modifiers
|
|
83
|
+
// - Note: Originally had mods for each type of flexbox layout
|
|
84
|
+
// simplified to just agnostic naming and only what is currently needed
|
|
85
|
+
// can update this in the future to add more alignment options if
|
|
86
|
+
// use cases come up
|
|
87
|
+
|
|
88
|
+
#{ $prefix }--justified {
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
}
|
|
91
|
+
#{ $prefix }--baseline {
|
|
92
|
+
align-items: baseline;
|
|
93
|
+
}
|
|
94
|
+
#{ $prefix }--nowrap {
|
|
95
|
+
flex-wrap: nowrap;
|
|
96
|
+
overflow-x: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Item level modifiers
|
|
100
|
+
#{ $prefix }__item--pull {
|
|
101
|
+
margin-inline-start: auto;
|
|
102
|
+
}
|
|
103
|
+
#{ $prefix }__item--separator {
|
|
104
|
+
border-inline-start: get("separator");
|
|
105
|
+
padding-inline-start: $gap;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@each $name, $value in get("gap-modifiers") {
|
|
109
|
+
|
|
110
|
+
$calc-gap: $value - $gap;
|
|
111
|
+
|
|
112
|
+
#{ $prefix }__item--gap-#{ $name } {
|
|
113
|
+
margin-inline-start: $calc-gap;
|
|
114
|
+
|
|
115
|
+
&#{ $prefix }__item--separator {
|
|
116
|
+
padding-inline-start: $value;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|