@ulu/frontend 0.1.0-beta.12 → 0.1.0-beta.121
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 +717 -0
- package/GEMINI.md +9 -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 +832 -421
- 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 +629 -233
- package/docs-dev/changelog/index.html +7613 -0
- package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
- package/docs-dev/demos/accordion/index.html +1496 -358
- package/docs-dev/demos/badge/index.html +5895 -0
- package/docs-dev/demos/badge-stack/index.html +5876 -0
- package/docs-dev/demos/basic-hero/index.html +111 -0
- package/docs-dev/demos/breadcrumb/index.html +5930 -0
- package/docs-dev/demos/breakpoints-manager/index.html +5906 -0
- package/docs-dev/demos/button/index.html +1537 -343
- package/docs-dev/demos/button-group/index.html +5892 -0
- package/docs-dev/demos/button-verbose/index.html +5898 -0
- package/docs-dev/demos/callout/index.html +1559 -379
- package/docs-dev/demos/captioned-figure/index.html +1492 -339
- package/docs-dev/demos/card/index.html +1592 -800
- package/docs-dev/demos/card-grid/index.html +6017 -0
- package/docs-dev/demos/card-new/index.html +5088 -0
- package/docs-dev/demos/card-old/index.html +5223 -0
- package/docs-dev/demos/card.1/index.html +5223 -0
- package/docs-dev/demos/card.TRASH/index.html +5541 -0
- package/docs-dev/demos/counter-list/index.html +5900 -0
- package/docs-dev/demos/css-icons/index.html +1556 -380
- package/docs-dev/demos/data-grid/index.html +1492 -339
- package/docs-dev/demos/data-table/index.html +1634 -348
- package/docs-dev/demos/definition-list/index.html +6011 -0
- package/docs-dev/demos/details-group/index.html +5927 -0
- package/docs-dev/demos/donut-chart/index.html +5874 -0
- package/docs-dev/demos/file-save/index.html +1492 -339
- package/docs-dev/demos/flipcard/index.html +1492 -339
- package/docs-dev/demos/form-theme/index.html +1500 -347
- package/docs-dev/demos/headline-label/index.html +5862 -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 +1493 -340
- package/docs-dev/demos/list-inline/index.html +1492 -339
- package/docs-dev/demos/list-lines/index.html +1492 -339
- package/docs-dev/demos/menu-stack/index.html +1652 -378
- package/docs-dev/demos/modals/index.html +1642 -366
- package/docs-dev/demos/nav-strip/index.html +1492 -339
- package/docs-dev/demos/overlay-section/index.html +1611 -388
- package/docs-dev/demos/panel/index.html +5922 -0
- package/docs-dev/demos/popovers/index.html +1752 -357
- package/docs-dev/demos/print/index.html +1492 -339
- package/docs-dev/demos/progress-bar/index.html +6030 -0
- package/docs-dev/demos/progress-circle/index.html +6197 -0
- package/docs-dev/demos/progress-donut/index.html +6107 -0
- package/docs-dev/demos/pull-quote/index.html +1492 -339
- package/docs-dev/demos/rail/index.html +5970 -0
- package/docs-dev/demos/rule/index.html +1509 -344
- package/docs-dev/demos/scroll-slider/index.html +72 -106
- package/docs-dev/demos/scrollpoints/index.html +1493 -340
- package/docs-dev/demos/skeleton/index.html +5918 -0
- package/docs-dev/demos/slider/index.html +12 -4
- package/docs-dev/demos/spoke-spinner/index.html +1492 -339
- package/docs-dev/demos/sticky-list/index.html +5883 -0
- package/docs-dev/demos/tabs/index.html +1565 -376
- package/docs-dev/demos/tag/index.html +1510 -345
- package/docs-dev/demos/theme-toggle/index.html +5939 -0
- package/docs-dev/demos/tile-grid-overlay/index.html +12 -4
- package/docs-dev/demos/tiles/index.html +1492 -339
- package/docs-dev/demos/tooltip/index.html +1492 -339
- package/docs-dev/demos/wysiwyg/index.html +5912 -0
- package/docs-dev/guide/building-stylesheet/index.html +1492 -339
- package/docs-dev/guide/developing-ulu-scss-module/index.html +1492 -339
- package/docs-dev/guide/index.html +1492 -339
- package/docs-dev/guide/updates-and-changes/index.html +5033 -0
- package/docs-dev/index.html +1492 -339
- package/docs-dev/javascript/events/index.html +1567 -376
- package/docs-dev/javascript/index.html +1492 -339
- package/docs-dev/javascript/settings/index.html +6065 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +1506 -355
- package/docs-dev/javascript/ui-collapsible/index.html +1491 -340
- package/docs-dev/javascript/ui-details-group/index.html +5982 -0
- package/docs-dev/javascript/ui-dialog/index.html +1523 -357
- package/docs-dev/javascript/ui-flipcard/index.html +1552 -345
- package/docs-dev/javascript/ui-grid/index.html +1538 -413
- package/docs-dev/javascript/ui-modal-builder/index.html +1761 -470
- package/docs-dev/javascript/ui-overflow-scroller/index.html +1491 -340
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +1491 -340
- package/docs-dev/javascript/ui-page/index.html +1491 -340
- package/docs-dev/javascript/ui-popover/index.html +1501 -354
- package/docs-dev/javascript/ui-print/index.html +1489 -346
- package/docs-dev/javascript/ui-print-details/index.html +1491 -340
- package/docs-dev/javascript/ui-programmatic-modal/index.html +1491 -340
- package/docs-dev/javascript/ui-proxy-click/index.html +1591 -355
- package/docs-dev/javascript/ui-resizer/index.html +1850 -434
- package/docs-dev/javascript/ui-scroll-slider/index.html +1531 -348
- package/docs-dev/javascript/ui-scrollpoint/index.html +1501 -357
- package/docs-dev/javascript/ui-slider/index.html +1708 -366
- package/docs-dev/javascript/ui-tabs/index.html +1523 -409
- package/docs-dev/javascript/ui-theme-toggle/index.html +6070 -0
- package/docs-dev/javascript/ui-tooltip/index.html +1501 -354
- package/docs-dev/javascript/utils-class-logger/index.html +1492 -341
- package/docs-dev/javascript/utils-css/index.html +5884 -0
- package/docs-dev/javascript/utils-dom/index.html +1523 -452
- package/docs-dev/javascript/utils-file-save/index.html +1491 -340
- package/docs-dev/javascript/utils-floating-ui/index.html +1491 -340
- package/docs-dev/javascript/utils-id/index.html +1491 -340
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +1491 -340
- package/docs-dev/javascript/utils-system/index.html +6187 -0
- package/docs-dev/sass/base/color/index.html +1491 -340
- package/docs-dev/sass/base/elements/index.html +1492 -341
- package/docs-dev/sass/base/index/index.html +1492 -341
- package/docs-dev/sass/base/index.html +1492 -339
- package/docs-dev/sass/base/keyframes/index.html +1492 -341
- package/docs-dev/sass/base/layout/index.html +1492 -341
- package/docs-dev/sass/base/normalize/index.html +1491 -340
- package/docs-dev/sass/base/print/index.html +1492 -341
- package/docs-dev/sass/base/root/index.html +1495 -344
- package/docs-dev/sass/base/typography/index.html +1491 -340
- package/docs-dev/sass/components/accordion/index.html +1628 -436
- package/docs-dev/sass/components/adaptive-spacing/index.html +1491 -340
- package/docs-dev/sass/components/badge/index.html +1522 -353
- package/docs-dev/sass/components/badge-stack/index.html +6051 -0
- package/docs-dev/sass/components/basic-hero/index.html +6045 -0
- package/docs-dev/sass/components/breadcrumb/index.html +6092 -0
- package/docs-dev/sass/components/button/index.html +1491 -340
- package/docs-dev/sass/components/button-group/index.html +6043 -0
- package/docs-dev/sass/components/button-verbose/index.html +1613 -387
- package/docs-dev/sass/components/callout/index.html +1598 -388
- package/docs-dev/sass/components/captioned-figure/index.html +1491 -340
- package/docs-dev/sass/components/card/index.html +1601 -393
- package/docs-dev/sass/components/card-grid/index.html +1491 -340
- package/docs-dev/sass/components/counter-list/index.html +6127 -0
- package/docs-dev/sass/components/css-icon/index.html +1492 -341
- package/docs-dev/sass/components/data-grid/index.html +1511 -353
- package/docs-dev/sass/components/data-table/index.html +1510 -352
- package/docs-dev/sass/components/definition-list/index.html +6107 -0
- package/docs-dev/sass/components/fill-context/index.html +1491 -340
- package/docs-dev/sass/components/flipcard/index.html +1569 -387
- package/docs-dev/sass/components/flipcard-grid/index.html +1491 -340
- package/docs-dev/sass/components/form-theme/index.html +1718 -572
- package/docs-dev/sass/components/headline-label/index.html +6073 -0
- package/docs-dev/sass/components/hero/index.html +1499 -348
- package/docs-dev/sass/components/horizontal-rule/index.html +1491 -340
- package/docs-dev/sass/components/image-grid/index.html +1491 -340
- package/docs-dev/sass/components/index/index.html +1514 -349
- package/docs-dev/sass/components/index.html +1492 -339
- package/docs-dev/sass/components/links/index.html +1491 -340
- package/docs-dev/sass/components/list-inline/index.html +1491 -340
- package/docs-dev/sass/components/list-lines/index.html +1491 -340
- package/docs-dev/sass/components/list-ordered/index.html +1491 -340
- package/docs-dev/sass/components/list-unordered/index.html +1491 -340
- package/docs-dev/sass/components/menu-stack/index.html +1578 -378
- package/docs-dev/sass/components/modal/index.html +1576 -390
- package/docs-dev/sass/components/nav-strip/index.html +1499 -348
- package/docs-dev/sass/components/overlay-section/index.html +1499 -348
- package/docs-dev/sass/components/pager/index.html +1491 -340
- package/docs-dev/sass/components/panel/index.html +6273 -0
- package/docs-dev/sass/components/placeholder-block/index.html +1491 -340
- package/docs-dev/sass/components/popover/index.html +1561 -404
- package/docs-dev/sass/components/progress-bar/index.html +6252 -0
- package/docs-dev/sass/components/progress-circle/index.html +6144 -0
- package/docs-dev/sass/components/pull-quote/index.html +1491 -340
- package/docs-dev/sass/components/rail/index.html +6063 -0
- package/docs-dev/sass/components/ratio-box/index.html +1499 -348
- package/docs-dev/sass/components/rule/index.html +1492 -341
- package/docs-dev/sass/components/scroll-slider/index.html +1501 -362
- package/docs-dev/sass/components/skeleton/index.html +6101 -0
- package/docs-dev/sass/components/skip-link/index.html +1491 -340
- package/docs-dev/sass/components/slider/index.html +1581 -442
- package/docs-dev/sass/components/spoke-spinner/index.html +1493 -342
- package/docs-dev/sass/components/sticky-list/index.html +6263 -0
- package/docs-dev/sass/components/table-sticky/index.html +5707 -0
- package/docs-dev/sass/components/tabs/index.html +1519 -353
- package/docs-dev/sass/components/tag/index.html +1648 -403
- package/docs-dev/sass/components/tile-button/index.html +1491 -340
- package/docs-dev/sass/components/tile-grid/index.html +1491 -340
- package/docs-dev/sass/components/tile-grid-overlay/index.html +1491 -340
- package/docs-dev/sass/components/vignette/index.html +1499 -348
- package/docs-dev/sass/components/wysiwyg/index.html +1524 -355
- package/docs-dev/sass/core/breakpoint/index.html +1577 -374
- package/docs-dev/sass/core/button/index.html +1523 -370
- package/docs-dev/sass/core/color/index.html +1768 -485
- package/docs-dev/sass/core/cssvar/index.html +1491 -340
- package/docs-dev/sass/core/element/index.html +1837 -404
- package/docs-dev/sass/core/index.html +1491 -340
- package/docs-dev/sass/core/layout/index.html +1582 -412
- package/docs-dev/sass/core/path/index.html +1491 -340
- package/docs-dev/sass/core/selector/index.html +1491 -340
- package/docs-dev/sass/core/typography/index.html +1657 -448
- package/docs-dev/sass/core/units/index.html +1499 -342
- package/docs-dev/sass/core/utils/index.html +2781 -481
- package/docs-dev/sass/helpers/color/index.html +1491 -340
- package/docs-dev/sass/helpers/display/index.html +1492 -341
- package/docs-dev/sass/helpers/index/index.html +1491 -340
- package/docs-dev/sass/helpers/index.html +1492 -339
- package/docs-dev/sass/helpers/print/index.html +759 -298
- package/docs-dev/sass/helpers/typography/index.html +1491 -340
- package/docs-dev/sass/helpers/units/index.html +1491 -340
- package/docs-dev/sass/helpers/utilities/index.html +1495 -340
- package/docs-dev/sass/index.html +1492 -339
- 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 +24 -9
- package/scss/README.md +9 -0
- package/scss/_breakpoint.scss +39 -5
- package/scss/_button.scss +7 -5
- package/scss/_color.scss +71 -40
- package/scss/_element.scss +124 -2
- package/scss/_layout.scss +7 -8
- package/scss/_typography.scss +15 -0
- package/scss/_units.scss +3 -2
- package/scss/_utils.scss +387 -16
- package/scss/base/_elements.scss +0 -1
- package/scss/base/_index.scss +1 -1
- package/scss/base/_keyframes.scss +15 -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/_accordion.scss +167 -110
- package/scss/components/_badge-stack.scss +84 -0
- package/scss/components/_badge.scss +30 -7
- package/scss/components/_basic-hero.scss +112 -0
- package/scss/components/_breadcrumb.scss +110 -0
- package/scss/components/_button-group.scss +90 -0
- package/scss/components/_button-verbose.scss +100 -18
- package/scss/components/_callout.scss +112 -53
- package/scss/components/_card-grid.scss +5 -2
- package/scss/components/_card.scss +216 -87
- package/scss/components/_counter-list.scss +151 -0
- package/scss/components/_css-icon.scss +27 -17
- package/scss/components/_data-grid.scss +55 -12
- package/scss/components/_data-table.scss +3 -0
- package/scss/components/_definition-list.scss +178 -0
- package/scss/components/_flipcard.scss +8 -3
- package/scss/components/_form-theme.scss +106 -95
- package/scss/components/_headline-label.scss +83 -0
- package/scss/components/_hero.scss +3 -10
- package/scss/components/_index.scss +79 -0
- package/scss/components/_menu-stack.scss +87 -23
- package/scss/components/_modal.scss +51 -23
- 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 +139 -38
- package/scss/components/_progress-bar.scss +260 -0
- package/scss/components/_progress-circle.scss +175 -0
- package/scss/components/_pull-quote.scss +1 -1
- package/scss/components/_rail.scss +127 -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/_skeleton.scss +126 -0
- 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/_tag.scss +49 -7
- package/scss/components/_vignette.scss +2 -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 +62 -34
- 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 +1 -0
- 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 +1 -0
- package/types/utils/system.d.ts +113 -0
- package/types/utils/system.d.ts.map +1 -0
|
@@ -4,70 +4,92 @@
|
|
|
4
4
|
////
|
|
5
5
|
|
|
6
6
|
@use "sass:map";
|
|
7
|
+
@use "sass:meta";
|
|
7
8
|
@use "sass:math";
|
|
8
9
|
|
|
9
10
|
@use "../selector";
|
|
10
11
|
@use "../utils";
|
|
11
12
|
@use "../color";
|
|
12
13
|
@use "../typography";
|
|
14
|
+
@use "../element";
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
// Used for function fallback
|
|
18
|
+
$-fallbacks: (
|
|
19
|
+
"border-radius" : (
|
|
20
|
+
"function" : meta.get-function("get", false, "element"),
|
|
21
|
+
"property" : "border-radius"
|
|
22
|
+
),
|
|
23
|
+
);
|
|
13
24
|
|
|
14
25
|
/// Module Settings
|
|
15
26
|
/// @type Map
|
|
16
|
-
/// @prop {Color} background-color [
|
|
17
|
-
/// @prop {Color} background-color-open [
|
|
18
|
-
/// @prop {String} border-color ["rule"]
|
|
19
|
-
/// @prop {Number} border-radius [
|
|
20
|
-
/// @prop {Dimension} border-width [1px] The width of the borders of the accordions
|
|
21
|
-
/// @prop {CssValue} box-shadow [none] Adds a box shadow to accordion container
|
|
22
|
-
/// @prop {Dimension} margin [
|
|
27
|
+
/// @prop {Color} background-color [background] This is the background color of the accordion before it is expanded.
|
|
28
|
+
/// @prop {Color} background-color-open [white] This is the background color of the accordion when it is expanded. This will change the background color of the accordion's summary as well as the details.
|
|
29
|
+
/// @prop {String} border-color ["rule-light"] The color of the accordion border.
|
|
30
|
+
/// @prop {Boolean|Number} border-radius [true] This applies a rounding of edges for the accordion. If there are multiple accordions in a stack, this will only apply to the top of the first accordion and the bottom of the last accordion.
|
|
31
|
+
/// @prop {Dimension} border-width [1px] The width of the borders of the accordions.
|
|
32
|
+
/// @prop {CssValue} box-shadow [none] Adds a box shadow to accordion container.
|
|
33
|
+
/// @prop {Dimension} margin [(1.5em 0)] This is the margin above and below the accordion. Multiple Accordions will stack. See margin-between below.
|
|
23
34
|
/// @prop {Dimension} margin-between [0] This adds a margin between adjacent accordions. By default, accordions do not have any net margin between each other.
|
|
24
|
-
/// @prop {Dimension} padding-x [1.5em] Singular value for the left and right padding
|
|
25
|
-
/// @prop {Dimension} padding-y [1.5em] Singular value for the top and bottom padding
|
|
35
|
+
/// @prop {Dimension} padding-x [1.5em] Singular value for the left and right padding.
|
|
36
|
+
/// @prop {Dimension} padding-y [1.5em] Singular value for the top and bottom padding.
|
|
26
37
|
/// @prop {Color} icon-background-color [transparent] The background color of the icon.
|
|
27
38
|
/// @prop {Color} icon-background-color-hover [transparent] The background color of the icon when hovered or focused.
|
|
28
39
|
/// @prop {Number} icon-border-radius [50%] The border-radius of the icon.
|
|
29
40
|
/// @prop {String} icon-color [link] Color of the icon. This uses color.scss, so the value of this option should be a color variable from color.scss.
|
|
30
41
|
/// @prop {String} icon-color-hover [link-hover] Color of the icon when hovered or focused on. This uses color.scss, so the value of this options should be a color variable from color.scss.
|
|
31
|
-
/// @prop {Dimension} icon-font-size [
|
|
42
|
+
/// @prop {Dimension} icon-font-size [1em] The font-size of the icon.
|
|
43
|
+
/// @prop {Dimension} icon-margin [1em] The margin to the left of the icon.
|
|
32
44
|
/// @prop {Dimension} icon-size [auto] The size of the icon. Used as the base in the flex property.
|
|
33
|
-
/// @prop {Dimension} icon-stroke-width [0.15em]
|
|
34
|
-
/// @prop {Color} summary-background-color [
|
|
45
|
+
/// @prop {Dimension} icon-stroke-width [0.15em] The stroke width of the icon.
|
|
46
|
+
/// @prop {Color} summary-background-color [#f6f6f6] The background color for the summary (toggle button) of the accordion.
|
|
47
|
+
/// @prop {Color} summary-background-color-hover [null] The background color for the summary (toggle button) of the accordion when hovered.
|
|
35
48
|
/// @prop {Color} summary-color [null] The color of the text in the accordion summary.
|
|
36
49
|
/// @prop {Color} summary-color-hover [null] The color of the text in the accordion summary when hovering or focusing on it.
|
|
37
50
|
/// @prop {Dimension} summary-line-height [null] Adjusts the line height of the summary element.
|
|
38
|
-
/// @prop {Dimension} summary-padding-y [
|
|
39
|
-
/// @prop {
|
|
40
|
-
/// @prop {
|
|
41
|
-
/// @prop {
|
|
51
|
+
/// @prop {Dimension} summary-padding-y [1em] The vertical padding of the summary.
|
|
52
|
+
/// @prop {String|Boolean} summary-type-size ["large"] The typography size of the text in the accordion summary. Can be a boolean to disable.
|
|
53
|
+
/// @prop {Boolean} summary-border-enabled [true] Whether the summary has a border when the accordion is open.
|
|
54
|
+
/// @prop {Color} summary-border-color [rule-light] The color of the summary border.
|
|
55
|
+
/// @prop {Dimension} summary-border-width [1px] The width of the summary border.
|
|
56
|
+
/// @prop {Dimension} transparent-content-padding [(0.25em 0)] The padding of the content area for transparent accordions.
|
|
57
|
+
/// @prop {Dimension} borderless-margin-between [0.5em] Margin between accordions when using no-border modifier.
|
|
58
|
+
/// @prop {String} active-selector ['.is-active'] The selector used for the active state of a non-<details> accordion.
|
|
42
59
|
|
|
43
60
|
$config: (
|
|
44
|
-
"background-color":
|
|
45
|
-
"background-color-open":
|
|
46
|
-
"border-color":
|
|
47
|
-
"border-radius":
|
|
48
|
-
"border-width":
|
|
49
|
-
"box-shadow":
|
|
50
|
-
"margin":
|
|
51
|
-
"margin-between":
|
|
52
|
-
"padding-x":
|
|
53
|
-
"padding-y":
|
|
54
|
-
"icon-background-color":
|
|
55
|
-
"icon-background-color-hover":
|
|
56
|
-
"icon-border-radius":
|
|
57
|
-
"icon-color":
|
|
58
|
-
"icon-color-hover":
|
|
59
|
-
"icon-font-size":
|
|
60
|
-
"icon-
|
|
61
|
-
"icon-
|
|
62
|
-
"
|
|
63
|
-
"summary-color":
|
|
61
|
+
"background-color": "background",
|
|
62
|
+
"background-color-open": white,
|
|
63
|
+
"border-color": "rule-light",
|
|
64
|
+
"border-radius": true,
|
|
65
|
+
"border-width": 1px,
|
|
66
|
+
"box-shadow": none,
|
|
67
|
+
"margin": (1.5em 0),
|
|
68
|
+
"margin-between": 0,
|
|
69
|
+
"padding-x": 1.25em,
|
|
70
|
+
"padding-y": 1.25em,
|
|
71
|
+
"icon-background-color": transparent,
|
|
72
|
+
"icon-background-color-hover": transparent,
|
|
73
|
+
"icon-border-radius": 50%,
|
|
74
|
+
"icon-color": "link",
|
|
75
|
+
"icon-color-hover": "link-hover",
|
|
76
|
+
"icon-font-size": 1em,
|
|
77
|
+
"icon-margin": 1em,
|
|
78
|
+
"icon-size": auto,
|
|
79
|
+
"icon-stroke-width": 0.15em,
|
|
80
|
+
"summary-background-color": #f6f6f6,
|
|
81
|
+
"summary-color": null,
|
|
64
82
|
"summary-background-color-hover": null,
|
|
65
|
-
"summary-color-hover":
|
|
66
|
-
"summary-line-height":
|
|
67
|
-
"summary-padding-y":
|
|
68
|
-
"summary-type-size":
|
|
69
|
-
"
|
|
70
|
-
"
|
|
83
|
+
"summary-color-hover": null,
|
|
84
|
+
"summary-line-height": null,
|
|
85
|
+
"summary-padding-y": 1em,
|
|
86
|
+
"summary-type-size": false,
|
|
87
|
+
"summary-border-enabled": true,
|
|
88
|
+
"summary-border-color": "rule-light",
|
|
89
|
+
"summary-border-width": 1px,
|
|
90
|
+
"transparent-content-padding": (1em 0),
|
|
91
|
+
"borderless-margin-between": 0.5em,
|
|
92
|
+
"active-selector": ".is-active"
|
|
71
93
|
) !default;
|
|
72
94
|
|
|
73
95
|
/// Change modules $config
|
|
@@ -85,7 +107,8 @@ $config: (
|
|
|
85
107
|
/// @include ulu.component-accordion-get("property");
|
|
86
108
|
|
|
87
109
|
@function get($name) {
|
|
88
|
-
|
|
110
|
+
$value: utils.require-map-get($config, $name, "accordion [config]");
|
|
111
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
89
112
|
}
|
|
90
113
|
|
|
91
114
|
/// Prints component styles
|
|
@@ -95,72 +118,88 @@ $config: (
|
|
|
95
118
|
|
|
96
119
|
@mixin styles {
|
|
97
120
|
$prefix: selector.class("accordion");
|
|
98
|
-
|
|
121
|
+
$active-selector: get("active-selector");
|
|
122
|
+
$padding-x: get("padding-x");
|
|
99
123
|
$border: get("border-width") solid color.get(get("border-color"));
|
|
100
124
|
|
|
101
125
|
// When not one of our custom classed details components
|
|
102
126
|
#{ $prefix } {
|
|
103
|
-
position: relative; // For
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
padding-right: get("padding-x");
|
|
107
|
-
margin-top: get("margin");
|
|
108
|
-
margin-bottom: get("margin");
|
|
127
|
+
position: relative; // For pushing to the top when in accordion groups
|
|
128
|
+
padding: 0;
|
|
129
|
+
margin: get("margin");
|
|
109
130
|
border: $border;
|
|
110
131
|
background-color: color.get(get("background-color"));
|
|
111
132
|
box-shadow: get("box-shadow");
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
border-bottom-left-radius: get("border-radius");
|
|
118
|
-
border-bottom-right-radius: get("border-radius");
|
|
133
|
+
border-radius: get("border-radius");
|
|
134
|
+
|
|
135
|
+
// Sibling before sets the gap
|
|
136
|
+
& + #{ $prefix } {
|
|
137
|
+
margin-top: 0;
|
|
119
138
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
139
|
+
|
|
140
|
+
// If no space get rid of border radiuses
|
|
141
|
+
@if (get("margin-between") == 0) {
|
|
142
|
+
&:has(+ #{ $prefix }) {
|
|
143
|
+
border-bottom-left-radius: 0;
|
|
144
|
+
border-bottom-right-radius: 0;
|
|
145
|
+
margin-bottom: 0;
|
|
146
|
+
}
|
|
147
|
+
& + #{ $prefix } {
|
|
148
|
+
border-top-left-radius: 0;
|
|
149
|
+
border-top-right-radius: 0;
|
|
150
|
+
margin-top: -(get("border-width")); // Pull border over top
|
|
151
|
+
}
|
|
152
|
+
} @else {
|
|
153
|
+
&:has(+ #{ $prefix }) {
|
|
154
|
+
margin-bottom: get("margin-between");
|
|
155
|
+
}
|
|
124
156
|
}
|
|
157
|
+
|
|
125
158
|
&[open],
|
|
126
|
-
|
|
159
|
+
&#{ $active-selector } {
|
|
127
160
|
background-color: color.get(get("background-color-open"));
|
|
128
|
-
|
|
129
|
-
z-index: 2; // Above child details
|
|
161
|
+
z-index: 2; // Above other details/accordions
|
|
130
162
|
> #{ $prefix }__summary {
|
|
131
|
-
margin-bottom: get("padding-y");
|
|
132
163
|
border-bottom-left-radius: 0;
|
|
133
164
|
border-bottom-right-radius: 0;
|
|
134
|
-
|
|
165
|
+
|
|
166
|
+
@if (get("summary-border-enabled")) {
|
|
167
|
+
&::after {
|
|
168
|
+
content: "";
|
|
169
|
+
position: absolute;
|
|
170
|
+
top: 100%;
|
|
171
|
+
left: 0;
|
|
172
|
+
right: 0;
|
|
173
|
+
height: get("summary-border-width");
|
|
174
|
+
background-color: color.get(get("summary-border-color"));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
135
177
|
}
|
|
136
178
|
}
|
|
137
179
|
}
|
|
138
180
|
#{ $prefix }__summary {
|
|
181
|
+
position: relative; // For pseudo border (done this way for animations)
|
|
182
|
+
display: flex;
|
|
183
|
+
list-style: none; // Remove the default arrow (old safari?)
|
|
184
|
+
width: 100%; // For <button>
|
|
139
185
|
background-color: color.get(get("summary-background-color"));
|
|
140
186
|
color: color.get(get("summary-color"));
|
|
141
|
-
margin-left: -(get("padding-x"));
|
|
142
|
-
margin-right: -(get("padding-x"));
|
|
143
187
|
line-height: get("summary-line-height");
|
|
144
|
-
padding: get("summary-padding-y")
|
|
145
|
-
|
|
188
|
+
padding: get("summary-padding-y") $padding-x;
|
|
189
|
+
border-radius: get("border-radius");
|
|
146
190
|
font-weight: bold;
|
|
147
191
|
cursor: pointer;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
content: "";
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
@if (get("summary-type-size")) {
|
|
161
|
-
@include typography.size(get("summary-type-size"));
|
|
192
|
+
align-items: center;
|
|
193
|
+
|
|
194
|
+
@include typography.optional-size(get("summary-type-size"), $only-font-size: true);
|
|
195
|
+
|
|
196
|
+
&::-webkit-details-marker,
|
|
197
|
+
&::marker {
|
|
198
|
+
display: none;
|
|
199
|
+
content: "";
|
|
162
200
|
}
|
|
163
|
-
&:hover
|
|
201
|
+
&:hover,
|
|
202
|
+
&:focus {
|
|
164
203
|
background-color: color.get(get("summary-background-color-hover"));
|
|
165
204
|
color: color.get(get("summary-color-hover"));
|
|
166
205
|
#{ $prefix }__icon {
|
|
@@ -170,48 +209,66 @@ $config: (
|
|
|
170
209
|
}
|
|
171
210
|
}
|
|
172
211
|
#{ $prefix }__icon {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
173
215
|
flex: 0 0 get("icon-size");
|
|
174
216
|
color: color.get(get("icon-color"));
|
|
175
|
-
margin-left:
|
|
176
|
-
|
|
217
|
+
margin-left: auto;
|
|
218
|
+
padding-left: get("icon-margin");
|
|
177
219
|
background-color: color.get(get("icon-background-color"));
|
|
178
220
|
border-radius: get("icon-border-radius");
|
|
179
221
|
width: get("icon-size");
|
|
180
222
|
height: get("icon-size");
|
|
181
223
|
font-size: get("icon-font-size");
|
|
182
224
|
line-height: 1;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
225
|
+
}
|
|
226
|
+
#{ $prefix }__content {
|
|
227
|
+
padding: get("padding-y") $padding-x;
|
|
228
|
+
border-bottom-left-radius: get("border-radius");
|
|
229
|
+
border-bottom-right-radius: get("border-radius");
|
|
187
230
|
}
|
|
188
231
|
#{ $prefix }--transparent {
|
|
189
232
|
border-left: none;
|
|
190
233
|
border-right: none;
|
|
191
|
-
background-color: transparent;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
padding: get("transparent-padding-y") get("transparent-padding-x");
|
|
198
|
-
background-color: transparent;
|
|
199
|
-
border: none;
|
|
200
|
-
}
|
|
201
|
-
&[open],
|
|
202
|
-
&.is-active {
|
|
203
|
-
background-color: transparent;
|
|
204
|
-
> #{ $prefix }__summary{
|
|
205
|
-
border-bottom: none;
|
|
234
|
+
background-color: transparent !important;
|
|
235
|
+
border-radius: 0;
|
|
236
|
+
|
|
237
|
+
// Transparent always collapses space
|
|
238
|
+
@if (get("margin-between") != 0) {
|
|
239
|
+
&:has(+ #{ $prefix }) {
|
|
206
240
|
margin-bottom: 0;
|
|
207
241
|
}
|
|
242
|
+
& + #{ $prefix } {
|
|
243
|
+
margin-top: -(get("border-width")); // Pull border over top
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
> #{ $prefix }__summary,
|
|
247
|
+
> #{ $prefix }__content {
|
|
248
|
+
padding-left: 0;
|
|
249
|
+
padding-right: 0;
|
|
250
|
+
background-color: transparent;
|
|
251
|
+
border: none !important;
|
|
252
|
+
border-radius: 0 !important;
|
|
253
|
+
}
|
|
254
|
+
> #{ $prefix }__content {
|
|
255
|
+
padding: get("transparent-content-padding");
|
|
208
256
|
}
|
|
209
257
|
}
|
|
210
|
-
#{ $prefix }--
|
|
258
|
+
#{ $prefix }--borderless {
|
|
211
259
|
border: none;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
260
|
+
&:has(+ #{ $prefix }) {
|
|
261
|
+
margin-bottom: 0;
|
|
262
|
+
}
|
|
263
|
+
& + #{ $prefix }--borderless {
|
|
264
|
+
margin-top: calc(get("borderless-margin-between") - get("border-width"));
|
|
265
|
+
}
|
|
266
|
+
&[open],
|
|
267
|
+
&#{ $active-selector } {
|
|
268
|
+
& > #{ $prefix }__summary {
|
|
269
|
+
border-radius: get("border-radius");
|
|
270
|
+
border-bottom: none;
|
|
271
|
+
}
|
|
215
272
|
}
|
|
216
273
|
}
|
|
217
274
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group badge-stack
|
|
3
|
+
/// Stacks badges
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
@use "../utils";
|
|
8
|
+
@use "../selector";
|
|
9
|
+
@use "../color";
|
|
10
|
+
@use "badge";
|
|
11
|
+
|
|
12
|
+
/// Module Settings
|
|
13
|
+
/// @type Map
|
|
14
|
+
/// @prop {Dimension} width [10rem] Width of the badge stack
|
|
15
|
+
/// @prop {Dimension} overlap [-5px] Right margin for stacked items
|
|
16
|
+
/// @prop {Dimension} border-width [3px] Border width for stacked items
|
|
17
|
+
|
|
18
|
+
$config: (
|
|
19
|
+
"width": 10rem,
|
|
20
|
+
"overlap": -5px,
|
|
21
|
+
"border-width": 3px,
|
|
22
|
+
"border-color" : "accent"
|
|
23
|
+
) !default;
|
|
24
|
+
|
|
25
|
+
/// Change modules $config
|
|
26
|
+
/// @param {Map} $changes Map of changes
|
|
27
|
+
/// @example scss
|
|
28
|
+
/// @include ulu.component-badge-stack-set(( "property" : value ));
|
|
29
|
+
|
|
30
|
+
@mixin set($changes) {
|
|
31
|
+
$config: map.merge($config, $changes) !global;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/// Get a config option
|
|
35
|
+
/// @param {Map} $name Name of property
|
|
36
|
+
/// @example scss
|
|
37
|
+
/// @include ulu.component-badge-stack-get("property");
|
|
38
|
+
|
|
39
|
+
@function get($name) {
|
|
40
|
+
@return utils.require-map-get($config, $name, "badge-stack [config]");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// Prints component styles
|
|
44
|
+
/// @demo badge-stack
|
|
45
|
+
/// @example scss
|
|
46
|
+
/// @include ulu.component-badge-stack-styles();
|
|
47
|
+
|
|
48
|
+
@mixin styles {
|
|
49
|
+
$prefix: selector.class("badge-stack");
|
|
50
|
+
$prefix-badge: selector.class("badge");
|
|
51
|
+
|
|
52
|
+
#{ $prefix } {
|
|
53
|
+
width: get("width");
|
|
54
|
+
display: flex;
|
|
55
|
+
}
|
|
56
|
+
#{ $prefix }__item {
|
|
57
|
+
flex: 0 1 min-content;
|
|
58
|
+
margin-right: get("overlap");
|
|
59
|
+
|
|
60
|
+
#{ $prefix-badge }__inner {
|
|
61
|
+
// box-shadow: ulu.element-get("box-shadow");
|
|
62
|
+
position: relative;
|
|
63
|
+
&:before {
|
|
64
|
+
content: '';
|
|
65
|
+
display: block;
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: -1px;
|
|
68
|
+
bottom: -1px;
|
|
69
|
+
left: -1px;
|
|
70
|
+
right: -1px;
|
|
71
|
+
border-radius: badge.get("border-radius");
|
|
72
|
+
border: get("border-width") solid color.get(get("border-color"));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
#{ $prefix-badge } {
|
|
76
|
+
&:focus,
|
|
77
|
+
&:hover {
|
|
78
|
+
#{ $prefix-badge }__inner {
|
|
79
|
+
z-index: 2;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -3,11 +3,21 @@
|
|
|
3
3
|
/// Outputs badge component stylesheet
|
|
4
4
|
////
|
|
5
5
|
|
|
6
|
+
@use "sass:meta";
|
|
6
7
|
@use "sass:map";
|
|
7
8
|
@use "../utils";
|
|
8
9
|
@use "../selector";
|
|
10
|
+
@use "../typography";
|
|
9
11
|
@use "../color";
|
|
10
12
|
|
|
13
|
+
// Used for function fallback
|
|
14
|
+
$-fallbacks: (
|
|
15
|
+
"font-family" : (
|
|
16
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
17
|
+
"property" : "font-family-sans"
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
|
|
11
21
|
/// Module Settings
|
|
12
22
|
/// @type Map
|
|
13
23
|
/// @prop {Number} background-color [gray] Background color (if no image)
|
|
@@ -15,20 +25,28 @@
|
|
|
15
25
|
/// @prop {Number} color [black] Type color
|
|
16
26
|
/// @prop {Number} font-size [1.3rem] Font size (basic ie. 1.3rem) for badge
|
|
17
27
|
/// @prop {Number} font-weight [bold] Font weight
|
|
18
|
-
/// @prop {
|
|
28
|
+
/// @prop {Number} font-family [true] Specify font family, defaults to typography font-family-sans
|
|
19
29
|
/// @prop {Number} width [10rem] Width of badge (default size)
|
|
30
|
+
/// @prop {Number} hover-scale [1.2] Scale of badge (if clickable) on hover (enlarges badge)
|
|
31
|
+
/// @prop {List} sizes [Object] List of other sizes (large by default), each size is a map of (width, font-size)
|
|
20
32
|
|
|
21
33
|
$config: (
|
|
22
34
|
"background-color": gray,
|
|
23
35
|
"border-radius": 50%,
|
|
24
36
|
"color": black,
|
|
25
|
-
"font-size": 1.
|
|
37
|
+
"font-size": 1.5rem,
|
|
26
38
|
"font-weight": bold,
|
|
27
|
-
"
|
|
39
|
+
"font-family": true,
|
|
40
|
+
"width": 7rem,
|
|
41
|
+
"hover-scale": 1.2,
|
|
28
42
|
"sizes" : (
|
|
43
|
+
"small" : (
|
|
44
|
+
"font-size" : 1.2rem,
|
|
45
|
+
"width" : 5rem
|
|
46
|
+
),
|
|
29
47
|
"large" : (
|
|
30
48
|
"font-size" : 2.75rem,
|
|
31
|
-
"width" :
|
|
49
|
+
"width" : 9rem
|
|
32
50
|
)
|
|
33
51
|
)
|
|
34
52
|
) !default;
|
|
@@ -48,7 +66,8 @@ $config: (
|
|
|
48
66
|
/// @include ulu.component-badge-get("property");
|
|
49
67
|
|
|
50
68
|
@function get($name) {
|
|
51
|
-
|
|
69
|
+
$value: utils.require-map-get($config, $name, "badge [config]");
|
|
70
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
52
71
|
}
|
|
53
72
|
|
|
54
73
|
/// Output badge component styles
|
|
@@ -77,6 +96,7 @@ $config: (
|
|
|
77
96
|
flex: 0 0 get("width");
|
|
78
97
|
font-size: get("font-size");
|
|
79
98
|
font-weight: get("font-weight");
|
|
99
|
+
font-family: get("font-family");
|
|
80
100
|
}
|
|
81
101
|
#{ $prefix }__inner {
|
|
82
102
|
display: block;
|
|
@@ -99,11 +119,13 @@ $config: (
|
|
|
99
119
|
color: color.get(get("color"));
|
|
100
120
|
}
|
|
101
121
|
}
|
|
102
|
-
#{ $prefix }--clickable
|
|
122
|
+
#{ $prefix }--clickable,
|
|
123
|
+
button#{ $prefix },
|
|
124
|
+
a#{ $prefix } {
|
|
103
125
|
&:hover,
|
|
104
126
|
&:focus {
|
|
105
127
|
#{ $prefix }__inner {
|
|
106
|
-
transform: scale(
|
|
128
|
+
transform: scale(get("hover-scale"));
|
|
107
129
|
}
|
|
108
130
|
}
|
|
109
131
|
}
|
|
@@ -118,6 +140,7 @@ $config: (
|
|
|
118
140
|
width: 100%;
|
|
119
141
|
height: 100%;
|
|
120
142
|
object-fit: cover;
|
|
143
|
+
margin: 0 !important;
|
|
121
144
|
}
|
|
122
145
|
|
|
123
146
|
@each $name, $props in get("sizes") {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group basic-hero
|
|
3
|
+
/// Basic styling for a hero
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
@use "sass:math";
|
|
8
|
+
@use "sass:meta";
|
|
9
|
+
@use "sass:list";
|
|
10
|
+
|
|
11
|
+
@use "../breakpoint";
|
|
12
|
+
@use "../selector";
|
|
13
|
+
@use "../utils";
|
|
14
|
+
@use "../typography";
|
|
15
|
+
@use "../color";
|
|
16
|
+
|
|
17
|
+
// Used for function fallback
|
|
18
|
+
$-fallbacks: (
|
|
19
|
+
"main-max-width" : (
|
|
20
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
21
|
+
"property" : "max-width"
|
|
22
|
+
),
|
|
23
|
+
"main-min-width" : (
|
|
24
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
25
|
+
"property" : "max-width-small"
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
/// Module Settings
|
|
30
|
+
/// @type Map
|
|
31
|
+
/// @prop {CssValue} text-align [center] Alignment of text within hero.
|
|
32
|
+
/// @prop {Color} background-color ["color-hero-background"] Background color of the hero
|
|
33
|
+
|
|
34
|
+
$config: (
|
|
35
|
+
"background-color" : "background-gray",
|
|
36
|
+
"padding-top": 3rem,
|
|
37
|
+
"padding-bottom" : 2rem,
|
|
38
|
+
"gap" : (4rem 2rem),
|
|
39
|
+
"main-max-width" : true,
|
|
40
|
+
"main-min-width" : true,
|
|
41
|
+
"media-max-width" : 20rem,
|
|
42
|
+
"media-vertical-align" : center
|
|
43
|
+
) !default;
|
|
44
|
+
|
|
45
|
+
/// Change modules $config
|
|
46
|
+
/// @param {Map} $changes Map of changes
|
|
47
|
+
/// @example scss
|
|
48
|
+
/// @include ulu.component-basic-hero-set(( "property" : value ));
|
|
49
|
+
|
|
50
|
+
@mixin set($changes) {
|
|
51
|
+
$config: map.merge($config, $changes) !global;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/// Get a config option
|
|
55
|
+
/// @param {Map} $name Name of property
|
|
56
|
+
/// @example scss
|
|
57
|
+
/// @include ulu.component-basic-hero-get("property");
|
|
58
|
+
|
|
59
|
+
@function get($name) {
|
|
60
|
+
$value: utils.require-map-get($config, $name, "basic-hero [config]");
|
|
61
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// Prints component styles
|
|
65
|
+
/// @example scss
|
|
66
|
+
/// @include ulu.component-basic-hero-styles();
|
|
67
|
+
|
|
68
|
+
@mixin styles {
|
|
69
|
+
$prefix: selector.class("basic-hero");
|
|
70
|
+
|
|
71
|
+
#{ $prefix } {
|
|
72
|
+
background-color: color.get(get("background-color"));
|
|
73
|
+
}
|
|
74
|
+
#{ $prefix }__content {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: stretch;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
gap: get("gap");
|
|
80
|
+
padding-top: get("padding-top");
|
|
81
|
+
padding-bottom: get("padding-bottom");
|
|
82
|
+
}
|
|
83
|
+
#{ $prefix }__content-main {
|
|
84
|
+
$min-width: if(get("main-min-width"), get("main-min-width"), get("main-max-width"));
|
|
85
|
+
// Using max/min-width so that we don't need to add selectors to change flex-basis
|
|
86
|
+
// when centered. Using flex-basis: 0 to allow flexbox to decide the items width
|
|
87
|
+
// allows it to expand/shrink within. min(100%... Never larger than parent
|
|
88
|
+
min-width: min(100%, $min-width);
|
|
89
|
+
max-width: get("main-max-width");
|
|
90
|
+
flex-shrink: 1;
|
|
91
|
+
flex-grow: 1;
|
|
92
|
+
flex-basis: 0;
|
|
93
|
+
}
|
|
94
|
+
#{ $prefix }__content-media {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
align-self: get("media-vertical-align");
|
|
98
|
+
justify-content: center;
|
|
99
|
+
flex: 0 0 auto;
|
|
100
|
+
width: min(100%, get("media-max-width"));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Modifiers
|
|
104
|
+
#{ $prefix }--center {
|
|
105
|
+
#{ $prefix }__content {
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
flex-wrap: nowrap;
|
|
108
|
+
text-align: center;
|
|
109
|
+
align-items: center;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|