@ulu/frontend 0.1.0-beta.5 → 0.1.0-beta.50
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 +382 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +28 -27
- 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 +0 -0
- package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
- package/docs-dev/demos/accordion/index.html +0 -4809
- package/docs-dev/demos/basic-hero/index.html +0 -0
- package/docs-dev/demos/breakpoints-manager/index.html +0 -0
- package/docs-dev/demos/button/index.html +0 -4621
- package/docs-dev/demos/button-verbose/index.html +0 -0
- package/docs-dev/demos/callout/index.html +0 -4661
- package/docs-dev/demos/captioned-figure/index.html +0 -4683
- package/docs-dev/demos/card/index.html +0 -5040
- package/docs-dev/demos/card-grid/index.html +0 -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 +0 -0
- package/docs-dev/demos/css-icons/index.html +0 -5272
- package/docs-dev/demos/data-grid/index.html +0 -5606
- package/docs-dev/demos/data-table/index.html +0 -4697
- package/docs-dev/demos/details-group/index.html +0 -0
- package/docs-dev/demos/file-save/index.html +0 -4672
- package/docs-dev/demos/flipcard/index.html +0 -5221
- package/docs-dev/demos/form-theme/index.html +0 -4852
- package/docs-dev/demos/hero/index.html +0 -301
- package/docs-dev/demos/image-grid/index.html +0 -157
- package/docs-dev/demos/index.html +0 -4610
- package/docs-dev/demos/list-inline/index.html +0 -0
- package/docs-dev/demos/list-inline.1/index.html +4727 -0
- package/docs-dev/demos/list-lines/index.html +0 -0
- package/docs-dev/demos/menu-stack/index.html +0 -4751
- package/docs-dev/demos/modals/index.html +0 -4718
- package/docs-dev/demos/nav-strip/index.html +0 -4722
- package/docs-dev/demos/overlay-section/index.html +0 -4628
- package/docs-dev/demos/popovers/index.html +0 -4628
- package/docs-dev/demos/print/index.html +0 -4630
- package/docs-dev/demos/pull-quote/index.html +0 -4629
- package/docs-dev/demos/rule/index.html +0 -4679
- package/docs-dev/demos/scroll-slider/index.html +0 -204
- package/docs-dev/demos/scrollpoints/index.html +0 -4648
- package/docs-dev/demos/slider/index.html +0 -164
- package/docs-dev/demos/spoke-spinner/index.html +0 -4625
- package/docs-dev/demos/sticky-list/index.html +0 -0
- package/docs-dev/demos/tabs/index.html +0 -4714
- package/docs-dev/demos/tag/index.html +0 -4630
- package/docs-dev/demos/theme-toggle/index.html +0 -0
- package/docs-dev/demos/tile-grid-overlay/index.html +0 -382
- package/docs-dev/demos/tiles/index.html +0 -4879
- package/docs-dev/demos/tooltip/index.html +0 -4658
- package/docs-dev/guide/building-stylesheet/index.html +0 -4679
- package/docs-dev/guide/developing-ulu-scss-module/index.html +0 -4731
- package/docs-dev/guide/index.html +0 -4612
- package/docs-dev/guide/updates-and-changes/index.html +5033 -0
- package/docs-dev/index.html +0 -4659
- package/docs-dev/javascript/events/index.html +0 -4770
- package/docs-dev/javascript/index.html +0 -4625
- package/docs-dev/javascript/settings/index.html +0 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +0 -5070
- package/docs-dev/javascript/ui-collapsible/index.html +0 -4737
- package/docs-dev/javascript/ui-details-group/index.html +0 -0
- package/docs-dev/javascript/ui-dialog/index.html +0 -4771
- package/docs-dev/javascript/ui-flipcard/index.html +0 -4621
- package/docs-dev/javascript/ui-grid/index.html +0 -4678
- package/docs-dev/javascript/ui-modal-builder/index.html +0 -4760
- package/docs-dev/javascript/ui-overflow-scroller/index.html +0 -4610
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +0 -4628
- package/docs-dev/javascript/ui-page/index.html +0 -4625
- package/docs-dev/javascript/ui-popover/index.html +0 -4664
- package/docs-dev/javascript/ui-print/index.html +0 -4677
- package/docs-dev/javascript/ui-print-details/index.html +0 -4640
- package/docs-dev/javascript/ui-programmatic-modal/index.html +0 -4610
- package/docs-dev/javascript/ui-proxy-click/index.html +990 -324
- package/docs-dev/javascript/ui-resizer/index.html +901 -320
- package/docs-dev/javascript/ui-scroll-slider/index.html +0 -4639
- package/docs-dev/javascript/ui-scrollpoint/index.html +0 -4857
- package/docs-dev/javascript/ui-slider/index.html +1099 -327
- package/docs-dev/javascript/ui-tabs/index.html +914 -370
- package/docs-dev/javascript/ui-theme-toggle/index.html +5410 -0
- package/docs-dev/javascript/ui-tooltip/index.html +940 -363
- package/docs-dev/javascript/utils-class-logger/index.html +901 -320
- package/docs-dev/javascript/utils-css/index.html +5224 -0
- package/docs-dev/javascript/utils-dom/index.html +1054 -339
- package/docs-dev/javascript/utils-file-save/index.html +901 -320
- package/docs-dev/javascript/utils-floating-ui/index.html +901 -320
- package/docs-dev/javascript/utils-id/index.html +901 -320
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +901 -320
- package/docs-dev/javascript/utils-system/index.html +5527 -0
- package/docs-dev/sass/base/color/index.html +0 -4643
- package/docs-dev/sass/base/elements/index.html +0 -4814
- package/docs-dev/sass/base/index/index.html +0 -4813
- package/docs-dev/sass/base/index.html +0 -4619
- package/docs-dev/sass/base/keyframes/index.html +0 -4645
- package/docs-dev/sass/base/layout/index.html +0 -4805
- package/docs-dev/sass/base/normalize/index.html +0 -4653
- package/docs-dev/sass/base/print/index.html +0 -4649
- package/docs-dev/sass/base/root/index.html +0 -4669
- package/docs-dev/sass/base/typography/index.html +0 -4669
- package/docs-dev/sass/components/accordion/index.html +0 -4971
- package/docs-dev/sass/components/adaptive-spacing/index.html +0 -4914
- package/docs-dev/sass/components/badge/index.html +0 -4862
- package/docs-dev/sass/components/basic-hero/index.html +0 -0
- package/docs-dev/sass/components/button/index.html +0 -4798
- package/docs-dev/sass/components/button-verbose/index.html +0 -4910
- package/docs-dev/sass/components/callout/index.html +0 -4937
- package/docs-dev/sass/components/captioned-figure/index.html +0 -4788
- package/docs-dev/sass/components/card/index.html +0 -5146
- package/docs-dev/sass/components/card-grid/index.html +0 -4812
- package/docs-dev/sass/components/counter-list/index.html +0 -0
- package/docs-dev/sass/components/css-icon/index.html +0 -4909
- package/docs-dev/sass/components/data-grid/index.html +0 -5044
- package/docs-dev/sass/components/data-table/index.html +0 -4795
- package/docs-dev/sass/components/fill-context/index.html +0 -4678
- package/docs-dev/sass/components/flipcard/index.html +0 -4948
- package/docs-dev/sass/components/flipcard-grid/index.html +0 -4799
- package/docs-dev/sass/components/form-theme/index.html +0 -5428
- package/docs-dev/sass/components/hero/index.html +0 -4800
- package/docs-dev/sass/components/horizontal-rule/index.html +0 -4797
- package/docs-dev/sass/components/image-grid/index.html +0 -4804
- package/docs-dev/sass/components/index/index.html +0 -4848
- package/docs-dev/sass/components/index.html +0 -4619
- package/docs-dev/sass/components/links/index.html +0 -4648
- package/docs-dev/sass/components/list-inline/index.html +0 -0
- package/docs-dev/sass/components/list-lines/index.html +0 -4843
- package/docs-dev/sass/components/list-ordered/index.html +0 -4644
- package/docs-dev/sass/components/list-unordered/index.html +0 -4648
- package/docs-dev/sass/components/menu-stack/index.html +0 -4978
- package/docs-dev/sass/components/modal/index.html +0 -5025
- package/docs-dev/sass/components/nav-strip/index.html +0 -4898
- package/docs-dev/sass/components/overlay-section/index.html +0 -4842
- package/docs-dev/sass/components/pager/index.html +0 -4960
- package/docs-dev/sass/components/placeholder-block/index.html +0 -4882
- package/docs-dev/sass/components/popover/index.html +0 -4957
- package/docs-dev/sass/components/pull-quote/index.html +0 -4856
- package/docs-dev/sass/components/ratio-box/index.html +0 -4802
- package/docs-dev/sass/components/rule/index.html +0 -4804
- package/docs-dev/sass/components/scroll-slider/index.html +0 -4915
- package/docs-dev/sass/components/skip-link/index.html +0 -4788
- package/docs-dev/sass/components/slider/index.html +0 -4924
- package/docs-dev/sass/components/spoke-spinner/index.html +0 -4862
- package/docs-dev/sass/components/sticky-list/index.html +0 -0
- package/docs-dev/sass/components/tabs/index.html +0 -4938
- package/docs-dev/sass/components/tag/index.html +0 -4963
- package/docs-dev/sass/components/tile-button/index.html +0 -4843
- package/docs-dev/sass/components/tile-grid/index.html +0 -4978
- package/docs-dev/sass/components/tile-grid-overlay/index.html +0 -4779
- package/docs-dev/sass/components/vignette/index.html +0 -4792
- package/docs-dev/sass/components/wysiwyg/index.html +0 -4808
- package/docs-dev/sass/core/breakpoint/index.html +0 -5401
- package/docs-dev/sass/core/button/index.html +0 -5535
- package/docs-dev/sass/core/color/index.html +0 -5385
- package/docs-dev/sass/core/cssvar/index.html +0 -5410
- package/docs-dev/sass/core/element/index.html +0 -5533
- package/docs-dev/sass/core/index.html +0 -4608
- package/docs-dev/sass/core/layout/index.html +0 -5368
- package/docs-dev/sass/core/path/index.html +0 -4777
- package/docs-dev/sass/core/selector/index.html +0 -4856
- package/docs-dev/sass/core/typography/index.html +0 -5782
- package/docs-dev/sass/core/units/index.html +0 -4815
- package/docs-dev/sass/core/utils/index.html +0 -6256
- package/docs-dev/sass/helpers/color/index.html +0 -4643
- package/docs-dev/sass/helpers/display/index.html +0 -4648
- package/docs-dev/sass/helpers/index/index.html +0 -4810
- package/docs-dev/sass/helpers/index.html +0 -4619
- package/docs-dev/sass/helpers/print/index.html +843 -292
- package/docs-dev/sass/helpers/typography/index.html +0 -4671
- package/docs-dev/sass/helpers/units/index.html +0 -4817
- package/docs-dev/sass/helpers/utilities/index.html +0 -4648
- package/docs-dev/sass/index.html +0 -4670
- package/js/index.js +1 -0
- package/js/settings.js +95 -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 +90 -42
- 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 +45 -54
- package/js/ui/overflow-scroller.js +6 -4
- 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/scroll-slider.js +24 -30
- package/js/ui/scrollpoint.js +28 -64
- package/js/ui/slider.js +61 -62
- package/js/ui/tabs.js +23 -36
- package/js/ui/theme-toggle.js +331 -94
- package/js/ui/tooltip.js +27 -32
- package/js/utils/css.js +13 -0
- package/js/utils/dom.js +85 -8
- package/js/utils/font-awesome.js +18 -0
- package/js/utils/index.js +2 -1
- package/js/utils/system.js +154 -0
- package/package.json +14 -8
- package/scss/_breakpoint.scss +16 -3
- package/scss/_color.scss +37 -5
- package/scss/_element.scss +94 -2
- package/scss/_layout.scss +7 -8
- package/scss/_units.scss +3 -2
- package/scss/_utils.scss +248 -13
- package/scss/components/README.todos +14 -0
- package/scss/components/_accordion.scss +18 -20
- package/scss/components/_badge.scss +3 -2
- package/scss/components/_basic-hero.scss +112 -0
- package/scss/components/_button-verbose.scss +102 -20
- package/scss/components/_callout.scss +127 -79
- package/scss/components/_captioned-figure.scss +23 -5
- package/scss/components/_card-grid.scss +1 -1
- package/scss/components/_card.scss +261 -88
- package/scss/components/_counter-list.scss +133 -0
- package/scss/components/_css-icon.scss +33 -28
- package/scss/components/_data-grid.scss +38 -9
- package/scss/components/_data-table.scss +44 -4
- package/scss/components/_flipcard.scss +21 -15
- package/scss/components/_form-theme.scss +146 -135
- package/scss/components/_hero.scss +12 -10
- package/scss/components/_index.scss +24 -0
- package/scss/components/_list-inline.scss +80 -0
- package/scss/components/_list-lines.scss +44 -33
- package/scss/components/_list-ordered.scss +0 -1
- package/scss/components/_menu-stack.scss +42 -26
- package/scss/components/_modal.scss +29 -19
- package/scss/components/_nav-strip.scss +5 -1
- package/scss/components/_overlay-section.scss +4 -6
- package/scss/components/_pager.scss +6 -6
- package/scss/components/_placeholder-block.scss +4 -4
- package/scss/components/_popover.scss +174 -73
- package/scss/components/_pull-quote.scss +13 -13
- package/scss/components/_ratio-box.scss +2 -5
- package/scss/components/_rule.scss +1 -1
- package/scss/components/_scroll-slider.scss +2 -6
- package/scss/components/_skip-link.scss +2 -1
- package/scss/components/_slider.scss +18 -38
- package/scss/components/_spoke-spinner.scss +2 -2
- package/scss/components/_sticky-list.scss +206 -0
- package/scss/components/_tabs.scss +4 -2
- package/scss/components/_tag.scss +1 -1
- package/scss/components/_vignette.scss +3 -5
- package/scss/helpers/_display.scss +15 -18
- package/scss/helpers/_print.scss +12 -7
- package/scss/helpers/_utilities.scss +42 -32
- package/types/index.d.ts +1 -0
- package/types/settings.d.ts +66 -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 +8 -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/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 +24 -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 +45 -6
- 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
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
@use "../breakpoint";
|
|
10
10
|
@use "../utils";
|
|
11
11
|
@use "../selector";
|
|
12
|
+
@use "../color";
|
|
13
|
+
@use "../layout";
|
|
12
14
|
|
|
13
15
|
// todo
|
|
14
16
|
// sass color adjust for smooth transition. Add a comment for this if we can’t get to this
|
|
@@ -18,7 +20,6 @@
|
|
|
18
20
|
/// @prop {Dimension} padding [2rem] The padding for the image icon
|
|
19
21
|
/// @prop {Dimension} margin-y [3rem] Top and bottom margin for the card.
|
|
20
22
|
/// @prop {Dimension} border-radius [5rem] The border radius of the card.
|
|
21
|
-
/// @prop {String} horizontal-breakpoint [small] The breakpoint used to change the card to vertical if using the card--horizontal styling. Uses ulu's breakpoint module.
|
|
22
23
|
/// @prop {CssValue} box-shadow [null] The box-shadow for the card.
|
|
23
24
|
/// @prop {CssValue} box-shadow-hover [null] The box-shadow for the card when hovered or focused.
|
|
24
25
|
/// @prop {Color} color [null] The type color of the card.
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
/// @prop {Color} background-color [white] The background color of the card.
|
|
30
31
|
/// @prop {Color} background-color-hover [rgb(242, 244, 246)] The background color of the card when hovered or focused.
|
|
31
32
|
/// @prop {Dimension} max-width [28rem] The max-width of the card.
|
|
32
|
-
/// @prop {Dimension} body-min-height [
|
|
33
|
+
/// @prop {Dimension} body-min-height [8rem] the min-height of the card body.
|
|
33
34
|
/// @prop {CssValue} border [1px solid #ccc] The card border.
|
|
34
35
|
/// @prop {CssValue} border-hover [2px solid #278cca] The card border when hovered or focused.
|
|
35
36
|
/// @prop {Dimension} header-margin [0.75em] The margin for the card header.
|
|
@@ -57,9 +58,18 @@
|
|
|
57
58
|
/// @prop {Boolean} image-transition-enabled [true] Enable or disable the image transition.
|
|
58
59
|
/// @prop {Time} image-transition-duration [350ms] The duration of the image transition.
|
|
59
60
|
/// @prop {CssValue} image-transition-timing-function [ease-in-out] The timing function for the image transition.
|
|
61
|
+
/// @prop {Number} image-fit-padding [1rem] Padding on inside of image when using image fit modifier
|
|
62
|
+
/// @prop {CssValue} image-fit-filter [drop-shadow(0 0px 8px rgba(0, 0, 0, 0.2))] Filter to use on image when using image fit modifier
|
|
63
|
+
/// @prop {List} image-icon-max-width [10rem] Max width for image when using the modifier on the .card__image--icon
|
|
60
64
|
/// @prop {List} image-transition-properties [(transform, filter)] The properties for the image transitions.
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
/// @prop {String} horizontal-breakpoint [small] The breakpoint used to change the card to vertical if using the card--horizontal styling. Uses ulu's breakpoint module.
|
|
66
|
+
/// @prop {Unit} horizontal-min-height [10rem] Minimum height when horizontal
|
|
67
|
+
/// @prop {Unit} horizontal-max-width [40rem] Maximum width when horizontal
|
|
68
|
+
/// @prop {Unit} horizontal-body-max-width [80rem] The max-width of body when horizontal
|
|
69
|
+
/// @prop {Boolean} aside-rule [false] Whether or not to have a rule separating body and aside
|
|
70
|
+
/// @prop {CssUnit} aside-rule-width [1px] Size of rule
|
|
71
|
+
/// @prop {CssUnit} aside-rule-color ["rule-light"] Color of rule
|
|
72
|
+
/// @prop {CssUnit} aside-rule-background-color [transparent] Color of aside background color
|
|
63
73
|
|
|
64
74
|
$config: (
|
|
65
75
|
"background-color" : white,
|
|
@@ -78,18 +88,25 @@ $config: (
|
|
|
78
88
|
"footer-padding-y" : 0.25rem,
|
|
79
89
|
"footer-min-height" : 2.5rem,
|
|
80
90
|
"horizontal-breakpoint" : "small",
|
|
91
|
+
"horizontal-image-width" : min(33%, 20rem),
|
|
92
|
+
"horizontal-body-max-width" : 40rem,
|
|
93
|
+
"horizontal-min-height" : 20rem,
|
|
94
|
+
"horizontal-max-width" : 80rem,
|
|
81
95
|
"header-margin" : 0.75em,
|
|
82
96
|
"image-ratio" : 56.25%,
|
|
83
97
|
"image-aspect-ratio": list.slash(5, 3),
|
|
84
|
-
"image-background-color" : rgb(
|
|
98
|
+
"image-background-color" : rgb(238, 238, 238),
|
|
85
99
|
"image-border" : null, // For when you have a margin
|
|
86
100
|
"image-filter-hover" : null,
|
|
87
101
|
"image-margin" : null,
|
|
102
|
+
"image-icon-max-width" : 8rem,
|
|
88
103
|
"image-transform-hover" : null,
|
|
89
104
|
"image-transition-duration" : 350ms,
|
|
90
105
|
"image-transition-enabled" : true,
|
|
91
106
|
"image-transition-properties" : (transform, filter),
|
|
92
107
|
"image-transition-timing-function" : ease-in-out,
|
|
108
|
+
"image-fit-padding" : 1rem,
|
|
109
|
+
"image-fit-filter" : drop-shadow(0 0px 8px rgba(0, 0, 0, 0.3)),
|
|
93
110
|
"margin-y" : 3rem,
|
|
94
111
|
"max-width" : 28rem,
|
|
95
112
|
"padding" : 2rem,
|
|
@@ -109,7 +126,12 @@ $config: (
|
|
|
109
126
|
"overlay-background-color": rgba(0, 0, 0, 0.6),
|
|
110
127
|
"overlay-shading": true,
|
|
111
128
|
"overlay-body-padding-y": 1rem,
|
|
112
|
-
|
|
129
|
+
// new below
|
|
130
|
+
"aside-rule" : false,
|
|
131
|
+
"aside-rule-width" : 1px,
|
|
132
|
+
"aside-background-color" : transparent,
|
|
133
|
+
"aside-rule-color": "rule-light",
|
|
134
|
+
) !default;
|
|
113
135
|
|
|
114
136
|
/// Change modules $config
|
|
115
137
|
/// @param {Map} $changes Map of changes
|
|
@@ -137,19 +159,34 @@ $config: (
|
|
|
137
159
|
|
|
138
160
|
@mixin when-clickable($hover: false) {
|
|
139
161
|
$prefix: selector.class("card");
|
|
162
|
+
// When proxy click enabled
|
|
140
163
|
@if (get("clickable-card-enabled") and get("clickable-card-selector")) {
|
|
141
|
-
#{ $prefix }
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
} @else {
|
|
164
|
+
#{ $prefix }#{ get("clickable-card-selector") },
|
|
165
|
+
a#{ $prefix },
|
|
166
|
+
button#{ $prefix },
|
|
167
|
+
#{ $prefix }--clickable {
|
|
168
|
+
@if ($hover) {
|
|
169
|
+
#{ get("clickable-card-interact-selector") } {
|
|
148
170
|
@content;
|
|
149
171
|
}
|
|
172
|
+
} @else {
|
|
173
|
+
@content;
|
|
150
174
|
}
|
|
151
175
|
}
|
|
152
|
-
|
|
176
|
+
// Without proxy click (only if interactive)
|
|
177
|
+
} @else {
|
|
178
|
+
a#{ $prefix },
|
|
179
|
+
button#{ $prefix },
|
|
180
|
+
#{ $prefix }--clickable {
|
|
181
|
+
@if ($hover) {
|
|
182
|
+
#{ get("clickable-card-interact-selector") } {
|
|
183
|
+
@content;
|
|
184
|
+
}
|
|
185
|
+
} @else {
|
|
186
|
+
@content;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
153
190
|
}
|
|
154
191
|
|
|
155
192
|
|
|
@@ -167,8 +204,8 @@ $config: (
|
|
|
167
204
|
$prefix: selector.class("card");
|
|
168
205
|
|
|
169
206
|
#{ $prefix } {
|
|
170
|
-
color: get("color");
|
|
171
|
-
background-color: get("background-color");
|
|
207
|
+
color: color.get(get("color"));
|
|
208
|
+
background-color: color.get(get("background-color"));
|
|
172
209
|
border-radius: get("border-radius");
|
|
173
210
|
box-shadow: get("box-shadow");
|
|
174
211
|
margin-top: get("margin-y");
|
|
@@ -178,34 +215,30 @@ $config: (
|
|
|
178
215
|
flex-direction: column;
|
|
179
216
|
justify-content: flex-end;
|
|
180
217
|
max-width: get("max-width");
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
border-radius: get("border-radius");
|
|
193
|
-
z-index: 4;
|
|
194
|
-
pointer-events: none;
|
|
195
|
-
}
|
|
218
|
+
// Not absolutely necessary, incase we want to remove in future
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
|
|
221
|
+
// Border is on pseudo so that it's on top of image/etc
|
|
222
|
+
&::after {
|
|
223
|
+
@include layout.absolute-fill();
|
|
224
|
+
content: if(get("border"), "", null);
|
|
225
|
+
border: get("border");
|
|
226
|
+
border-radius: get("border-radius");
|
|
227
|
+
z-index: 4;
|
|
228
|
+
pointer-events: none;
|
|
196
229
|
}
|
|
197
230
|
}
|
|
198
231
|
|
|
199
232
|
@include when-clickable($hover: true) {
|
|
200
|
-
background-color: get("background-color-hover");
|
|
201
|
-
color: get("color-hover");
|
|
233
|
+
background-color: color.get(get("background-color-hover"));
|
|
234
|
+
color: color.get(get("color-hover"));
|
|
202
235
|
box-shadow: get("box-shadow-hover");
|
|
203
236
|
|
|
204
237
|
@if (get("border-hover") or get("overlay-background-color-hover")) {
|
|
205
|
-
|
|
238
|
+
&::after {
|
|
206
239
|
content: "";
|
|
207
240
|
border: get("border-hover");
|
|
208
|
-
background-color: get("overlay-background-color-hover");
|
|
241
|
+
background-color: color.get(get("overlay-background-color-hover"));
|
|
209
242
|
}
|
|
210
243
|
}
|
|
211
244
|
}
|
|
@@ -222,24 +255,25 @@ $config: (
|
|
|
222
255
|
}
|
|
223
256
|
|
|
224
257
|
#{ $prefix }__title {
|
|
225
|
-
color: get("title-color");
|
|
258
|
+
color: color.get(get("title-color"));
|
|
226
259
|
margin-bottom: get("title-margin");
|
|
227
260
|
display: block;
|
|
228
261
|
font-weight: get("title-font-weight");
|
|
229
|
-
@if get("title-color-hover") {
|
|
230
|
-
&:hover,
|
|
231
|
-
&:focus {
|
|
232
|
-
color: get("title-color-hover");
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
262
|
#{ $prefix }__title-link {
|
|
236
263
|
all: unset;
|
|
264
|
+
cursor: pointer;
|
|
265
|
+
@if get("title-color-hover") {
|
|
266
|
+
&:hover,
|
|
267
|
+
&:focus {
|
|
268
|
+
color: color.get(get("title-color-hover"));
|
|
269
|
+
}
|
|
270
|
+
}
|
|
237
271
|
}
|
|
238
272
|
}
|
|
239
273
|
@if get("title-color-hover") {
|
|
240
274
|
@include when-clickable($hover: true) {
|
|
241
275
|
#{ $prefix }__title {
|
|
242
|
-
color: get("title-color-hover");
|
|
276
|
+
color: color.get(get("title-color-hover"));
|
|
243
277
|
}
|
|
244
278
|
}
|
|
245
279
|
}
|
|
@@ -257,7 +291,7 @@ $config: (
|
|
|
257
291
|
// padding-top: get("image-ratio"); // 9:16
|
|
258
292
|
margin: get("image-margin");
|
|
259
293
|
border: get("image-border");
|
|
260
|
-
background-color: get("image-background-color");
|
|
294
|
+
background-color: color.get(get("image-background-color"));
|
|
261
295
|
border-top-right-radius: get("border-radius");
|
|
262
296
|
border-top-left-radius: get("border-radius");
|
|
263
297
|
aspect-ratio: get("image-aspect-ratio");
|
|
@@ -265,11 +299,7 @@ $config: (
|
|
|
265
299
|
}
|
|
266
300
|
#{ $prefix }__image img,
|
|
267
301
|
#{ $prefix}__image-media {
|
|
268
|
-
|
|
269
|
-
top: 0;
|
|
270
|
-
left: 0;
|
|
271
|
-
width: 100%;
|
|
272
|
-
height: 100%;
|
|
302
|
+
@include layout.absolute-fill(true);
|
|
273
303
|
border: 0;
|
|
274
304
|
object-fit: cover;
|
|
275
305
|
transform-origin: center center;
|
|
@@ -288,21 +318,28 @@ $config: (
|
|
|
288
318
|
}
|
|
289
319
|
}
|
|
290
320
|
}
|
|
291
|
-
|
|
292
|
-
#{ $prefix }__footer
|
|
293
|
-
|
|
321
|
+
|
|
322
|
+
#{ $prefix }__footer {
|
|
323
|
+
padding: get("padding");
|
|
324
|
+
}
|
|
325
|
+
#{ $prefix }__main {
|
|
326
|
+
padding: get("padding");
|
|
327
|
+
}
|
|
328
|
+
#{ $prefix }__aside {
|
|
329
|
+
position: relative;
|
|
294
330
|
padding: get("padding");
|
|
295
331
|
}
|
|
296
332
|
|
|
297
333
|
#{ $prefix }__image--icon {
|
|
298
|
-
background-color: transparent;
|
|
334
|
+
// background-color: transparent;
|
|
299
335
|
display: flex;
|
|
300
336
|
align-items: center;
|
|
301
337
|
justify-content: center;
|
|
338
|
+
// padding: 2rem;
|
|
302
339
|
img {
|
|
303
340
|
position: static;
|
|
304
341
|
display: block;
|
|
305
|
-
max-width:
|
|
342
|
+
max-width: get("image-icon-max-width");
|
|
306
343
|
height: auto;
|
|
307
344
|
top: auto;
|
|
308
345
|
left: auto;
|
|
@@ -314,9 +351,25 @@ $config: (
|
|
|
314
351
|
z-index: 2; // Above image
|
|
315
352
|
}
|
|
316
353
|
#{ $prefix }__body {
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-direction: column;
|
|
317
356
|
flex-grow: 1;
|
|
318
357
|
min-height: get("body-min-height");
|
|
319
358
|
}
|
|
359
|
+
@if(get("aside-rule")) {
|
|
360
|
+
#{ $prefix }__aside {
|
|
361
|
+
background-color: color.get(get("aside-background-color"));
|
|
362
|
+
}
|
|
363
|
+
#{ $prefix }__aside::after {
|
|
364
|
+
content: "";
|
|
365
|
+
position: absolute;
|
|
366
|
+
top: calc(0rem - get("aside-rule-width") / 2);
|
|
367
|
+
left: get("padding");
|
|
368
|
+
right: get("padding");
|
|
369
|
+
height: get("aside-rule-width");
|
|
370
|
+
background-color: color.get(get("aside-rule-color"));
|
|
371
|
+
}
|
|
372
|
+
}
|
|
320
373
|
// For actions/messages
|
|
321
374
|
// - Layout as flex with min height to support buttons
|
|
322
375
|
// and text without relying so much on padding
|
|
@@ -340,11 +393,17 @@ $config: (
|
|
|
340
393
|
position: relative;
|
|
341
394
|
flex-grow: 0;
|
|
342
395
|
z-index: 2;
|
|
343
|
-
color: get("color-overlay");
|
|
344
|
-
background-color: get("overlay-background-color");
|
|
396
|
+
color: color.get(get("color-overlay"));
|
|
397
|
+
background-color: color.get(get("overlay-background-color"));
|
|
345
398
|
min-height: 0;
|
|
346
399
|
padding-top: get("overlay-body-padding-y");
|
|
347
400
|
padding-bottom: get("overlay-body-padding-y");
|
|
401
|
+
|
|
402
|
+
&:not(:has(~ #{ $prefix }__footer)) {
|
|
403
|
+
border-bottom-left-radius: get("border-radius");
|
|
404
|
+
border-bottom-right-radius: get("border-radius");
|
|
405
|
+
}
|
|
406
|
+
|
|
348
407
|
@if (get("overlay-shading")) {
|
|
349
408
|
margin-top: 4rem;
|
|
350
409
|
&::before {
|
|
@@ -359,21 +418,26 @@ $config: (
|
|
|
359
418
|
}
|
|
360
419
|
}
|
|
361
420
|
#{ $prefix }__footer {
|
|
362
|
-
background-color: get("overlay-background-color");
|
|
363
|
-
color: get("color-overlay");
|
|
421
|
+
background-color: color.get(get("overlay-background-color"));
|
|
422
|
+
color: color.get(get("color-overlay"));
|
|
423
|
+
border-bottom-left-radius: get("border-radius");
|
|
424
|
+
border-bottom-right-radius: get("border-radius");
|
|
425
|
+
}
|
|
426
|
+
#{ $prefix }__body,
|
|
427
|
+
#{ $prefix }__footer {
|
|
428
|
+
&:last-child {
|
|
429
|
+
border-bottom-left-radius: get("border-radius");
|
|
430
|
+
border-bottom-right-radius: get("border-radius");
|
|
431
|
+
}
|
|
364
432
|
}
|
|
365
433
|
#{ $prefix }__title {
|
|
366
|
-
color: get("color-overlay");
|
|
434
|
+
color: color.get(get("color-overlay"));
|
|
367
435
|
}
|
|
368
436
|
#{ $prefix }__image {
|
|
369
|
-
|
|
370
|
-
top: 0;
|
|
371
|
-
left: 0;
|
|
372
|
-
bottom: 0;
|
|
373
|
-
right: 0;
|
|
437
|
+
@include layout.absolute-fill();
|
|
374
438
|
overflow: hidden;
|
|
375
439
|
padding-top: 0;
|
|
376
|
-
background-color: rgb(255, 255, 255);
|
|
440
|
+
background-color: color.get(rgb(255, 255, 255));
|
|
377
441
|
border-radius: get("border-radius");
|
|
378
442
|
aspect-ratio: auto;
|
|
379
443
|
img {
|
|
@@ -384,40 +448,149 @@ $config: (
|
|
|
384
448
|
border: 0;
|
|
385
449
|
object-fit: cover;
|
|
386
450
|
&::before {
|
|
387
|
-
|
|
451
|
+
@include layout.absolute-fill(true);
|
|
388
452
|
display: block;
|
|
389
|
-
top: 0;
|
|
390
|
-
bottom: 0;
|
|
391
|
-
left: 0;
|
|
392
|
-
right: 0;
|
|
393
453
|
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.9));
|
|
394
454
|
}
|
|
395
455
|
}
|
|
396
456
|
}
|
|
397
457
|
}
|
|
398
458
|
|
|
459
|
+
// Incase this modifier is being used to hide the image
|
|
460
|
+
// not just to tell the component how to layout without image
|
|
461
|
+
// - Use case is hiding image when you can't control the output
|
|
462
|
+
// of the inside of the card (printed no matter what). We had
|
|
463
|
+
// this happen in HHRC, including this extra CSS for that
|
|
464
|
+
#{ $prefix }--no-image {
|
|
465
|
+
#{ $prefix }__image {
|
|
466
|
+
display: none;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
#{ $prefix }--image-fit {
|
|
470
|
+
#{ $prefix }__image {
|
|
471
|
+
img {
|
|
472
|
+
padding: get("image-fit-padding");
|
|
473
|
+
object-fit: contain;
|
|
474
|
+
object-position: top center;
|
|
475
|
+
filter: get("image-fit-filter");
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
#{ $prefix }--fill {
|
|
480
|
+
max-width: none;
|
|
481
|
+
height: 100%;
|
|
482
|
+
margin: 0;
|
|
483
|
+
}
|
|
484
|
+
|
|
399
485
|
@if (get("horizontal-breakpoint")) {
|
|
400
486
|
@include breakpoint.min(get("horizontal-breakpoint")) {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
487
|
+
@include -horizontal-card-styles();
|
|
488
|
+
}
|
|
489
|
+
} @else {
|
|
490
|
+
@include -horizontal-card-styles();
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
@mixin -horizontal-card-styles() {
|
|
495
|
+
$prefix: selector.class("card");
|
|
496
|
+
|
|
497
|
+
#{ $prefix }--horizontal {
|
|
498
|
+
display: grid;
|
|
499
|
+
grid-template-columns: get("horizontal-image-width") 1fr;
|
|
500
|
+
// Creating the two rows (body and footer), if one is missing it's height will be 0
|
|
501
|
+
// Cannot use gap with the grid as it will create space when a row isn't needed
|
|
502
|
+
grid-template-rows: auto auto;
|
|
503
|
+
min-height: get("horizontal-min-height");
|
|
504
|
+
max-width: get("horizontal-max-width");
|
|
505
|
+
|
|
506
|
+
// When no footer remove extra row
|
|
507
|
+
&:not(:has(> #{ $prefix }__footer)) {
|
|
508
|
+
grid-template-rows: auto;
|
|
509
|
+
}
|
|
510
|
+
#{ $prefix }__image {
|
|
511
|
+
grid-column: 1 / 2;
|
|
512
|
+
grid-row: 1 / -1;
|
|
513
|
+
aspect-ratio: auto;
|
|
514
|
+
border-top-right-radius: 0;
|
|
515
|
+
border-bottom-left-radius: get("border-radius");
|
|
516
|
+
}
|
|
517
|
+
#{ $prefix }__body,
|
|
518
|
+
#{ $prefix }__footer {
|
|
519
|
+
grid-column: 2 / 3;
|
|
520
|
+
}
|
|
521
|
+
#{ $prefix }__body {
|
|
522
|
+
flex-direction: row;
|
|
523
|
+
max-width: get("horizontal-body-max-width");
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
@if(get("aside-rule")) {
|
|
527
|
+
#{ $prefix }__main {
|
|
528
|
+
flex: 1 1 60%;
|
|
529
|
+
}
|
|
530
|
+
#{ $prefix }__aside {
|
|
531
|
+
flex: 1 1 40%;
|
|
532
|
+
height: 100%;
|
|
533
|
+
// flex-basis: 40%;
|
|
534
|
+
// min-width: 40%;
|
|
419
535
|
}
|
|
536
|
+
#{ $prefix }__aside::after {
|
|
537
|
+
content: "";
|
|
538
|
+
position: absolute;
|
|
539
|
+
top: get("padding");
|
|
540
|
+
left: calc(0rem - get("aside-rule-width") / 2);
|
|
541
|
+
height: calc(100% - get("padding") - get("padding"));
|
|
542
|
+
width: get("aside-rule-width");
|
|
543
|
+
background-color: get("aside-rule-color");
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// For modern browsers
|
|
548
|
+
// Optionally use no-image modifier for older browser support
|
|
549
|
+
&:not(:has(#{ $prefix }__image)) {
|
|
550
|
+
@include -card-horizontal-no-image-styles();
|
|
551
|
+
}
|
|
552
|
+
&#{ $prefix }--no-image {
|
|
553
|
+
@include -card-horizontal-no-image-styles();
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
#{ $prefix }--horizontal-center {
|
|
557
|
+
#{ $prefix }__body {
|
|
558
|
+
align-self: center;
|
|
420
559
|
}
|
|
421
560
|
}
|
|
422
561
|
}
|
|
423
562
|
|
|
563
|
+
@mixin -card-horizontal-no-image-styles() {
|
|
564
|
+
$prefix: selector.class("card");
|
|
565
|
+
grid-template-columns: 1fr;
|
|
566
|
+
#{ $prefix }__body,
|
|
567
|
+
#{ $prefix }__footer {
|
|
568
|
+
grid-column: 1 / 2;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// OLD CSS FOR HORIZONTAL
|
|
573
|
+
// #{ $prefix }--horizontal {
|
|
574
|
+
// display: flex;
|
|
575
|
+
// flex-direction: row;
|
|
576
|
+
// justify-content: center;
|
|
577
|
+
// align-items: center;
|
|
578
|
+
// #{ $prefix }__image {
|
|
579
|
+
// align-self: stretch;
|
|
580
|
+
// border-top-right-radius: 0;
|
|
581
|
+
// border-bottom-left-radius: get("border-radius");
|
|
582
|
+
// width: get("horizontal-image-width");
|
|
583
|
+
// flex: 0 0 get("horizontal-image-width");
|
|
584
|
+
// // max-width: 30rem;
|
|
585
|
+
// // min-height: 28rem;
|
|
586
|
+
// // padding-top: 0;
|
|
587
|
+
// }
|
|
588
|
+
// #{ $prefix }__body {
|
|
589
|
+
// display: flex;
|
|
590
|
+
// flex: 1;
|
|
591
|
+
// flex-direction: column;
|
|
592
|
+
// justify-content: center;
|
|
593
|
+
// max-width: get("horizontal-body-max-width");
|
|
594
|
+
// }
|
|
595
|
+
// }
|
|
596
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group counter-list
|
|
3
|
+
/// Outputs a styled list with counters
|
|
4
|
+
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
@use "../utils";
|
|
7
|
+
@use "../selector";
|
|
8
|
+
@use "../color";
|
|
9
|
+
@use "../breakpoint";
|
|
10
|
+
|
|
11
|
+
/// Module Settings
|
|
12
|
+
/// @type Map
|
|
13
|
+
/// @prop {List} margin [(2rem 0)] The top and bottom margin of the list.
|
|
14
|
+
/// @prop {List} item-margin [(0, 0, 1rem, 0)] The margin applied to each list item.
|
|
15
|
+
/// @prop {Keyword} align-items [baseline] How to align the counter (flexbox align-items values)
|
|
16
|
+
/// @prop {Length} counter-width [2.4em] The width and height (if height is falsy)
|
|
17
|
+
/// @prop {Length} counter-height [null] The height (optional)
|
|
18
|
+
/// @prop {Length} counter-gap [1em] The gap between the counter and the list item content.
|
|
19
|
+
/// @prop {String} counter-style [numeric] The list-style-type used for the counter.
|
|
20
|
+
/// @prop {Keyword|Percentage} counter-border-radius [50%] The border-radius of the counter element.
|
|
21
|
+
/// @prop {Length} counter-font-size [1.2em] The font-size of the counter text.
|
|
22
|
+
/// @prop {String} counter-color [white] The text color of the counter. Accepts color names or hex codes.
|
|
23
|
+
/// @prop {String} counter-background-color ["accent"] The background color of the counter. Refers to a color in the color module.
|
|
24
|
+
|
|
25
|
+
$config: (
|
|
26
|
+
"margin" : (2rem 0),
|
|
27
|
+
"item-margin" : (0, 0, 1rem, 0),
|
|
28
|
+
"align-items" : baseline,
|
|
29
|
+
"counter-width" : 2.4em,
|
|
30
|
+
"counter-height" : null,
|
|
31
|
+
"counter-gap" : 1em,
|
|
32
|
+
"counter-style" : numeric,
|
|
33
|
+
"counter-border-radius" : 50%,
|
|
34
|
+
"counter-font-size" : 1.2em,
|
|
35
|
+
"counter-color" : white,
|
|
36
|
+
"counter-background-color" : "accent",
|
|
37
|
+
) !default;
|
|
38
|
+
|
|
39
|
+
/// Change modules $config
|
|
40
|
+
/// @param {Map} $changes Map of changes
|
|
41
|
+
/// @example scss
|
|
42
|
+
/// @include ulu.component-counter-list-set(( "property" : value ));
|
|
43
|
+
|
|
44
|
+
@mixin set($changes) {
|
|
45
|
+
$config: map.merge($config, $changes) !global;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// Get a config option
|
|
49
|
+
/// @param {Map} $name Name of property
|
|
50
|
+
/// @example scss
|
|
51
|
+
/// @include ulu.component-counter-list-get("property");
|
|
52
|
+
|
|
53
|
+
@function get($name) {
|
|
54
|
+
@return utils.require-map-get($config, $name, "counter-list [config]");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/// Output counter-list component styles
|
|
58
|
+
/// @demo counter-list
|
|
59
|
+
/// @example html {preview}
|
|
60
|
+
/// <ol class="counter-list">
|
|
61
|
+
/// <li class="counter-list__item">This is a item that will get counted</li>
|
|
62
|
+
/// <li class="counter-list__item">Another item that has more content to show line wrapping. Lorem ipsum et depsi anu. Dolor et anu.</li>
|
|
63
|
+
/// <li class="counter-list__item">Small Amount of Text</li>
|
|
64
|
+
/// </ol>
|
|
65
|
+
|
|
66
|
+
@mixin styles {
|
|
67
|
+
$prefix: selector.class("counter-list");
|
|
68
|
+
$width: get("counter-width");
|
|
69
|
+
$height: utils.fallback(get("counter-height"), $width);
|
|
70
|
+
|
|
71
|
+
#{ $prefix } {
|
|
72
|
+
margin: get("margin");
|
|
73
|
+
counter-reset: ulu-counter-list;
|
|
74
|
+
|
|
75
|
+
& > li,
|
|
76
|
+
& > #{ $prefix }__item {
|
|
77
|
+
display: flex;
|
|
78
|
+
gap: get("counter-gap");
|
|
79
|
+
align-items: get("align-items");
|
|
80
|
+
margin: get("item-margin");
|
|
81
|
+
min-height: $height;
|
|
82
|
+
&::before {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
width: $width;
|
|
87
|
+
height: $height;
|
|
88
|
+
flex: 0 0 $width;
|
|
89
|
+
counter-increment: ulu-counter-list;
|
|
90
|
+
content: counter(ulu-counter-list, get("counter-style"));
|
|
91
|
+
font-size: get("counter-font-size");
|
|
92
|
+
color: color.get(get("counter-color"));
|
|
93
|
+
background-color: color.get(get("counter-background-color"));
|
|
94
|
+
border-radius: get("counter-border-radius");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Keeping this could be useful
|
|
98
|
+
// but we need to think about how its setup
|
|
99
|
+
// - Probably should be a modifier (choice)
|
|
100
|
+
// - May need either option for how align-items is set (flex-start vs center)
|
|
101
|
+
// - This could be useful when used in grid
|
|
102
|
+
// - May need to be pervasive and not linked to a breakpoint (alternate style)
|
|
103
|
+
// - It's also just useful to know you could override the layout like this
|
|
104
|
+
// to get useful variations (maybe we don't need to include it but users
|
|
105
|
+
// can do specific)
|
|
106
|
+
// @if ( get("counter-mobile-toggle") ) {
|
|
107
|
+
// @include breakpoint.max("small") {
|
|
108
|
+
// padding-left: 0;
|
|
109
|
+
// padding-top: calc(get("counter-width") + get("counter-gap-mobile"));
|
|
110
|
+
// flex-direction: column;
|
|
111
|
+
// align-items: center;
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Modifiers
|
|
118
|
+
#{ $prefix }--alphabetical {
|
|
119
|
+
& > li::before,
|
|
120
|
+
& > #{ $prefix }__item::before {
|
|
121
|
+
content: counter(ulu-counter-list, upper-alpha);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
#{ $prefix }--numeric {
|
|
125
|
+
& > li::before,
|
|
126
|
+
& > #{ $prefix }__item::before {
|
|
127
|
+
content: counter(ulu-counter-list, numeric);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
#{ $prefix }--no-reset {
|
|
131
|
+
counter-reset: none;
|
|
132
|
+
}
|
|
133
|
+
}
|