@ulu/frontend 0.1.0-beta.83 → 0.1.0-beta.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/docs-dev/assets/main.js +494 -7738
- package/docs-dev/assets/style.css +166 -221
- package/docs-dev/changelog/index.html +294 -3
- package/docs-dev/changelog/updates-and-changes/index.html +5109 -0
- package/docs-dev/demos/accordion/index.html +240 -0
- package/docs-dev/demos/badge/index.html +240 -0
- package/docs-dev/demos/breakpoints-manager/index.html +240 -0
- package/docs-dev/demos/button/index.html +240 -0
- package/docs-dev/demos/button-group/index.html +5502 -0
- package/docs-dev/demos/button-verbose/index.html +240 -0
- package/docs-dev/demos/callout/index.html +240 -0
- package/docs-dev/demos/captioned-figure/index.html +240 -0
- package/docs-dev/demos/card/index.html +256 -16
- package/docs-dev/demos/card-grid/index.html +240 -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 +240 -0
- package/docs-dev/demos/css-icons/index.html +240 -0
- package/docs-dev/demos/data-grid/index.html +240 -0
- package/docs-dev/demos/data-table/index.html +340 -100
- package/docs-dev/demos/details-group/index.html +240 -0
- package/docs-dev/demos/file-save/index.html +240 -0
- package/docs-dev/demos/flipcard/index.html +240 -0
- package/docs-dev/demos/form-theme/index.html +240 -0
- package/docs-dev/demos/headline-label/index.html +5472 -0
- package/docs-dev/demos/index.html +240 -0
- package/docs-dev/demos/list-inline/index.html +240 -0
- package/docs-dev/demos/list-inline.1/index.html +4727 -0
- package/docs-dev/demos/list-lines/index.html +240 -0
- package/docs-dev/demos/menu-stack/index.html +240 -0
- package/docs-dev/demos/modals/index.html +240 -0
- package/docs-dev/demos/nav-strip/index.html +240 -0
- package/docs-dev/demos/overlay-section/index.html +240 -0
- package/docs-dev/demos/panel/index.html +5532 -0
- package/docs-dev/demos/popovers/index.html +240 -0
- package/docs-dev/demos/print/index.html +240 -0
- package/docs-dev/demos/pull-quote/index.html +240 -0
- package/docs-dev/demos/rail/index.html +5568 -0
- package/docs-dev/demos/rule/index.html +240 -0
- package/docs-dev/demos/scrollpoints/index.html +240 -0
- package/docs-dev/demos/spoke-spinner/index.html +240 -0
- package/docs-dev/demos/sticky-list/index.html +240 -0
- package/docs-dev/demos/tabs/index.html +240 -0
- package/docs-dev/demos/tag/index.html +240 -0
- package/docs-dev/demos/theme-toggle/index.html +240 -0
- package/docs-dev/demos/tiles/index.html +240 -0
- package/docs-dev/demos/tooltip/index.html +240 -0
- package/docs-dev/guide/building-stylesheet/index.html +240 -0
- package/docs-dev/guide/developing-ulu-scss-module/index.html +240 -0
- package/docs-dev/guide/index.html +240 -0
- package/docs-dev/guide/updates-and-changes/index.html +5033 -0
- package/docs-dev/index.html +240 -0
- package/docs-dev/javascript/events/index.html +240 -0
- package/docs-dev/javascript/index.html +240 -0
- package/docs-dev/javascript/settings/index.html +240 -0
- package/docs-dev/javascript/ui-breakpoints/index.html +240 -0
- package/docs-dev/javascript/ui-collapsible/index.html +240 -0
- package/docs-dev/javascript/ui-details-group/index.html +240 -0
- package/docs-dev/javascript/ui-dialog/index.html +240 -0
- package/docs-dev/javascript/ui-flipcard/index.html +240 -0
- package/docs-dev/javascript/ui-grid/index.html +240 -0
- package/docs-dev/javascript/ui-modal-builder/index.html +240 -0
- package/docs-dev/javascript/ui-overflow-scroller/index.html +240 -0
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +240 -0
- package/docs-dev/javascript/ui-page/index.html +240 -0
- package/docs-dev/javascript/ui-popover/index.html +240 -0
- package/docs-dev/javascript/ui-print/index.html +240 -0
- package/docs-dev/javascript/ui-print-details/index.html +240 -0
- package/docs-dev/javascript/ui-programmatic-modal/index.html +240 -0
- package/docs-dev/javascript/ui-proxy-click/index.html +240 -0
- package/docs-dev/javascript/ui-resizer/index.html +240 -0
- package/docs-dev/javascript/ui-scroll-slider/index.html +240 -0
- package/docs-dev/javascript/ui-scrollpoint/index.html +240 -0
- package/docs-dev/javascript/ui-slider/index.html +240 -0
- package/docs-dev/javascript/ui-tabs/index.html +240 -0
- package/docs-dev/javascript/ui-theme-toggle/index.html +240 -0
- package/docs-dev/javascript/ui-tooltip/index.html +240 -0
- package/docs-dev/javascript/utils-class-logger/index.html +240 -0
- package/docs-dev/javascript/utils-css/index.html +240 -0
- package/docs-dev/javascript/utils-dom/index.html +240 -0
- package/docs-dev/javascript/utils-file-save/index.html +240 -0
- package/docs-dev/javascript/utils-floating-ui/index.html +240 -0
- package/docs-dev/javascript/utils-id/index.html +240 -0
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +240 -0
- package/docs-dev/javascript/utils-system/index.html +240 -0
- package/docs-dev/sass/base/color/index.html +240 -0
- package/docs-dev/sass/base/elements/index.html +240 -0
- package/docs-dev/sass/base/index/index.html +240 -0
- package/docs-dev/sass/base/index.html +240 -0
- package/docs-dev/sass/base/keyframes/index.html +240 -0
- package/docs-dev/sass/base/layout/index.html +240 -0
- package/docs-dev/sass/base/normalize/index.html +240 -0
- package/docs-dev/sass/base/print/index.html +240 -0
- package/docs-dev/sass/base/root/index.html +240 -0
- package/docs-dev/sass/base/typography/index.html +240 -0
- package/docs-dev/sass/components/accordion/index.html +240 -0
- package/docs-dev/sass/components/adaptive-spacing/index.html +240 -0
- package/docs-dev/sass/components/badge/index.html +240 -0
- package/docs-dev/sass/components/basic-hero/index.html +240 -0
- package/docs-dev/sass/components/button/index.html +240 -0
- package/docs-dev/sass/components/button-group/index.html +5653 -0
- package/docs-dev/sass/components/button-verbose/index.html +240 -0
- package/docs-dev/sass/components/callout/index.html +240 -0
- package/docs-dev/sass/components/captioned-figure/index.html +240 -0
- package/docs-dev/sass/components/card/index.html +240 -0
- package/docs-dev/sass/components/card-grid/index.html +240 -0
- package/docs-dev/sass/components/counter-list/index.html +240 -0
- package/docs-dev/sass/components/css-icon/index.html +240 -0
- package/docs-dev/sass/components/data-grid/index.html +254 -14
- package/docs-dev/sass/components/data-table/index.html +240 -0
- package/docs-dev/sass/components/fill-context/index.html +240 -0
- package/docs-dev/sass/components/flipcard/index.html +240 -0
- package/docs-dev/sass/components/flipcard-grid/index.html +240 -0
- package/docs-dev/sass/components/form-theme/index.html +240 -0
- package/docs-dev/sass/components/headline-label/index.html +5683 -0
- package/docs-dev/sass/components/hero/index.html +240 -0
- package/docs-dev/sass/components/horizontal-rule/index.html +240 -0
- package/docs-dev/sass/components/image-grid/index.html +240 -0
- package/docs-dev/sass/components/index/index.html +254 -10
- package/docs-dev/sass/components/index.html +240 -0
- package/docs-dev/sass/components/links/index.html +240 -0
- package/docs-dev/sass/components/list-inline/index.html +240 -0
- package/docs-dev/sass/components/list-lines/index.html +240 -0
- package/docs-dev/sass/components/list-ordered/index.html +240 -0
- package/docs-dev/sass/components/list-unordered/index.html +240 -0
- package/docs-dev/sass/components/menu-stack/index.html +240 -0
- package/docs-dev/sass/components/modal/index.html +240 -0
- package/docs-dev/sass/components/nav-strip/index.html +240 -0
- package/docs-dev/sass/components/overlay-section/index.html +240 -0
- package/docs-dev/sass/components/pager/index.html +240 -0
- package/docs-dev/sass/components/panel/index.html +5883 -0
- package/docs-dev/sass/components/placeholder-block/index.html +240 -0
- package/docs-dev/sass/components/popover/index.html +240 -0
- package/docs-dev/sass/components/pull-quote/index.html +240 -0
- package/docs-dev/sass/components/rail/index.html +5670 -0
- package/docs-dev/sass/components/ratio-box/index.html +240 -0
- package/docs-dev/sass/components/rule/index.html +240 -0
- package/docs-dev/sass/components/scroll-slider/index.html +240 -0
- package/docs-dev/sass/components/skip-link/index.html +240 -0
- package/docs-dev/sass/components/slider/index.html +240 -0
- package/docs-dev/sass/components/spoke-spinner/index.html +240 -0
- package/docs-dev/sass/components/sticky-list/index.html +240 -0
- package/docs-dev/sass/components/tabs/index.html +240 -0
- package/docs-dev/sass/components/tag/index.html +240 -0
- package/docs-dev/sass/components/tile-button/index.html +240 -0
- package/docs-dev/sass/components/tile-grid/index.html +240 -0
- package/docs-dev/sass/components/tile-grid-overlay/index.html +240 -0
- package/docs-dev/sass/components/vignette/index.html +240 -0
- package/docs-dev/sass/components/wysiwyg/index.html +240 -0
- package/docs-dev/sass/core/breakpoint/index.html +241 -1
- package/docs-dev/sass/core/button/index.html +272 -30
- package/docs-dev/sass/core/color/index.html +240 -0
- package/docs-dev/sass/core/cssvar/index.html +240 -0
- package/docs-dev/sass/core/element/index.html +346 -30
- package/docs-dev/sass/core/index.html +240 -0
- package/docs-dev/sass/core/layout/index.html +240 -0
- package/docs-dev/sass/core/path/index.html +240 -0
- package/docs-dev/sass/core/selector/index.html +240 -0
- package/docs-dev/sass/core/typography/index.html +240 -0
- package/docs-dev/sass/core/units/index.html +240 -0
- package/docs-dev/sass/core/utils/index.html +358 -76
- package/docs-dev/sass/helpers/color/index.html +240 -0
- package/docs-dev/sass/helpers/display/index.html +240 -0
- package/docs-dev/sass/helpers/index/index.html +240 -0
- package/docs-dev/sass/helpers/index.html +240 -0
- package/docs-dev/sass/helpers/typography/index.html +240 -0
- package/docs-dev/sass/helpers/units/index.html +240 -0
- package/docs-dev/sass/helpers/utilities/index.html +240 -0
- package/docs-dev/sass/index.html +240 -0
- package/package.json +1 -1
- package/scss/_breakpoint.scss +1 -1
- package/scss/_button.scss +7 -5
- package/scss/_element.scss +16 -0
- package/scss/_utils.scss +7 -0
- package/scss/components/_button-group.scss +90 -0
- package/scss/components/_data-grid.scss +0 -3
- package/scss/components/_headline-label.scss +83 -0
- package/scss/components/_index.scss +24 -0
- package/scss/components/_panel.scss +246 -0
- package/scss/components/_rail.scss +120 -0
- package/types/ui/index.d.ts +1 -1
- package/types/utils/index.d.ts +1 -1
package/scss/_button.scss
CHANGED
|
@@ -94,7 +94,7 @@ $config: (
|
|
|
94
94
|
|
|
95
95
|
$sizes: (
|
|
96
96
|
"small" : (
|
|
97
|
-
"padding": (0.35em
|
|
97
|
+
"padding": (0.35em 1em),
|
|
98
98
|
"min-width": 0,
|
|
99
99
|
"icon-size": 2rem,
|
|
100
100
|
"icon-font-size": 1rem
|
|
@@ -118,9 +118,9 @@ $styles: (
|
|
|
118
118
|
"border-color" : transparent,
|
|
119
119
|
"box-shadow" : none,
|
|
120
120
|
"hover" : (
|
|
121
|
-
"background-color" : "
|
|
122
|
-
"color" :
|
|
123
|
-
"border-color" :
|
|
121
|
+
"background-color" : "control-background",
|
|
122
|
+
"color" : "control",
|
|
123
|
+
"border-color" : "control-border",
|
|
124
124
|
)
|
|
125
125
|
),
|
|
126
126
|
"outline" : (
|
|
@@ -129,7 +129,9 @@ $styles: (
|
|
|
129
129
|
"border-color" : "rule-light",
|
|
130
130
|
"box-shadow" : none,
|
|
131
131
|
"hover" : (
|
|
132
|
-
"background-color" : "
|
|
132
|
+
"background-color" : "control-background",
|
|
133
|
+
"color" : "control",
|
|
134
|
+
"border-color" : "control-border",
|
|
133
135
|
)
|
|
134
136
|
),
|
|
135
137
|
) !default;
|
package/scss/_element.scss
CHANGED
|
@@ -124,11 +124,27 @@ $rule-margins: (
|
|
|
124
124
|
|
|
125
125
|
/// Get a rule style
|
|
126
126
|
/// @param {Map} $changes Map of changes
|
|
127
|
+
/// @return {CssValue} Rule style (css border value)
|
|
127
128
|
|
|
128
129
|
@function get-rule-style($name: "default") {
|
|
129
130
|
@return utils.require-map-get($rule-styles, $name, "element [rule style]");
|
|
130
131
|
}
|
|
131
132
|
|
|
133
|
+
/// Get an optional rule style (which is a border)
|
|
134
|
+
/// - If the value is a string we return the rule style, else we return the value
|
|
135
|
+
/// - Used for things where configuration for say a border can be a user defined border or a string (they want an existing rule-style)
|
|
136
|
+
/// - Except when passing "none"/none this will return as-is (since it's a border property)
|
|
137
|
+
/// @param {*} $value The value to check
|
|
138
|
+
/// @return {*} Rule style if string, else value
|
|
139
|
+
|
|
140
|
+
@function get-optional-rule-style($value) {
|
|
141
|
+
@if (meta.type-of($value) == "string") {
|
|
142
|
+
@return get-rule-style($value);
|
|
143
|
+
} @else {
|
|
144
|
+
@return $value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
132
148
|
/// Sets rule margin
|
|
133
149
|
/// @param {Map} $changes Map of changes
|
|
134
150
|
|
package/scss/_utils.scss
CHANGED
|
@@ -438,6 +438,13 @@ $config: (
|
|
|
438
438
|
@return $value;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
/// If the value passed is equal to true use the default, else return the value
|
|
442
|
+
/// @param {*} $value The value to check
|
|
443
|
+
/// @param {*} $default The value to return when true
|
|
444
|
+
@function default($value, $default) {
|
|
445
|
+
@return if($value == true, $default, $value);
|
|
446
|
+
}
|
|
447
|
+
|
|
441
448
|
/// Replaces all or one occurrence of a string within a string
|
|
442
449
|
/// @param {String} $string String to operate on
|
|
443
450
|
/// @param {String} $find String to find within string
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group button-group
|
|
3
|
+
/// Groups a set of buttons
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
@use "sass:map";
|
|
7
|
+
@use "sass:math";
|
|
8
|
+
|
|
9
|
+
@use "../selector";
|
|
10
|
+
@use "../utils";
|
|
11
|
+
@use "../color";
|
|
12
|
+
@use "../button";
|
|
13
|
+
|
|
14
|
+
/// Module Settings
|
|
15
|
+
/// @type Map
|
|
16
|
+
/// @prop {Dimension} gap [0.45em] Gap between buttons
|
|
17
|
+
/// @prop {Boolean} no-min-width [true] Buttons within the button group should have no min width
|
|
18
|
+
|
|
19
|
+
$config: (
|
|
20
|
+
"gap": 0.45em,
|
|
21
|
+
"no-min-width" : true
|
|
22
|
+
) !default;
|
|
23
|
+
|
|
24
|
+
/// Change modules $config
|
|
25
|
+
/// @param {Map} $changes Map of changes
|
|
26
|
+
/// @example scss
|
|
27
|
+
/// @include ulu.component-button-group-set(( "property" : value ));
|
|
28
|
+
|
|
29
|
+
@mixin set($changes) {
|
|
30
|
+
$config: map.merge($config, $changes) !global;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/// Get a config option
|
|
34
|
+
/// @param {Map} $name Name of property
|
|
35
|
+
/// @example scss
|
|
36
|
+
/// @include ulu.component-button-group-get("property");
|
|
37
|
+
|
|
38
|
+
@function get($name) {
|
|
39
|
+
@return utils.require-map-get($config, $name, "button-group [config]");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// Prints component styles
|
|
43
|
+
/// @demo button-group
|
|
44
|
+
/// @example scss
|
|
45
|
+
/// @include ulu.component-button-group-styles();
|
|
46
|
+
|
|
47
|
+
@mixin styles {
|
|
48
|
+
$prefix: selector.class("button-group");
|
|
49
|
+
$prefix-button: selector.class("button");
|
|
50
|
+
|
|
51
|
+
$button-radius: button.get("border-radius");
|
|
52
|
+
|
|
53
|
+
#{ $prefix } {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
gap: get("gap");
|
|
57
|
+
#{ $prefix-button } {
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
#{ $prefix }--joined {
|
|
62
|
+
flex-wrap: nowrap;
|
|
63
|
+
overflow-x: auto;
|
|
64
|
+
gap: 0;
|
|
65
|
+
// border-radius: button.get("border-radius");
|
|
66
|
+
#{ $prefix-button } {
|
|
67
|
+
position: relative; // To move to front when hover/active
|
|
68
|
+
border-radius: 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
margin-left: -(button.get("border-width"));
|
|
71
|
+
&:first-child {
|
|
72
|
+
border-top-left-radius: $button-radius;
|
|
73
|
+
border-bottom-left-radius: $button-radius;
|
|
74
|
+
margin-left: 0;
|
|
75
|
+
}
|
|
76
|
+
&:last-child {
|
|
77
|
+
border-top-right-radius: $button-radius;
|
|
78
|
+
border-bottom-right-radius: $button-radius;
|
|
79
|
+
}
|
|
80
|
+
#{ button.get("active-selector") } {
|
|
81
|
+
z-index: 2;
|
|
82
|
+
}
|
|
83
|
+
&:hover,
|
|
84
|
+
&:focus {
|
|
85
|
+
z-index: 2;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// @group headline-label
|
|
3
|
+
////
|
|
4
|
+
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
@use "sass:meta";
|
|
7
|
+
@use "../utils";
|
|
8
|
+
@use "../color";
|
|
9
|
+
@use "../typography";
|
|
10
|
+
|
|
11
|
+
// Used for function fallback
|
|
12
|
+
$-fallbacks: (
|
|
13
|
+
"font-weight" : (
|
|
14
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
15
|
+
"property" : "font-weight-bold"
|
|
16
|
+
),
|
|
17
|
+
"font-family" : (
|
|
18
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
19
|
+
"property" : "font-family-sans"
|
|
20
|
+
),
|
|
21
|
+
"line-height" : (
|
|
22
|
+
"function" : meta.get-function("get", false, "typography"),
|
|
23
|
+
"property" : "line-height-dense"
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
/// Module Settings
|
|
28
|
+
/// @type Map
|
|
29
|
+
/// @prop {Color} color [ulu.cssvar-use("color-accent")] The text color of the headline label.
|
|
30
|
+
/// @prop {Dimension} margin-bottom [0.2em] The bottom margin of the headline label.
|
|
31
|
+
/// @prop {String} font-weight [typography.get("font-weight-bold")] The font weight of the headline label.
|
|
32
|
+
/// @prop {String} font-family [typography.get("font-family-sans")] The font family of the headline label.
|
|
33
|
+
/// @prop {Dimension|Number} line-height [typography.get("line-height-dense")] The font family of the headline label.
|
|
34
|
+
/// @prop {String} text-transform [null] The font family of the headline label.
|
|
35
|
+
/// @prop {String} type-size ["small"] The typography size preset to use for the headline label (e.g., "small", "medium", "large"), Only uses the font-size value for size
|
|
36
|
+
|
|
37
|
+
$config: (
|
|
38
|
+
"color": "accent",
|
|
39
|
+
"margin-bottom": 0.2em,
|
|
40
|
+
"font-weight": true,
|
|
41
|
+
"font-family": true,
|
|
42
|
+
"line-height": true,
|
|
43
|
+
"text-transform" : null,
|
|
44
|
+
"type-size": "small"
|
|
45
|
+
) !default;
|
|
46
|
+
|
|
47
|
+
/// Change modules $config
|
|
48
|
+
/// @param {Map} $changes Map of changes
|
|
49
|
+
/// @example scss
|
|
50
|
+
/// @include ulu.component-headline-label-set(( "color" : red ));
|
|
51
|
+
|
|
52
|
+
@mixin set($changes) {
|
|
53
|
+
$config: map.merge($config, $changes) !global;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// Get a config option
|
|
57
|
+
/// @param {String} $name Name of property
|
|
58
|
+
/// @example scss
|
|
59
|
+
/// @include ulu.component-headline-label-get("color");
|
|
60
|
+
|
|
61
|
+
@function get($name) {
|
|
62
|
+
$value: utils.require-map-get($config, $name, "headline-label [config]");
|
|
63
|
+
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/// Prints component styles
|
|
67
|
+
/// @example scss
|
|
68
|
+
/// @include ulu.component-headline-label-styles();
|
|
69
|
+
|
|
70
|
+
@mixin styles {
|
|
71
|
+
.headline-label {
|
|
72
|
+
display: block;
|
|
73
|
+
margin-bottom: get("margin-bottom");
|
|
74
|
+
font-weight: get("font-weight");
|
|
75
|
+
font-family: get("font-family");
|
|
76
|
+
line-height: get("line-height");
|
|
77
|
+
text-transform: get("text-transform");
|
|
78
|
+
color: color.get(get("color"));
|
|
79
|
+
@if (get("type-size")) {
|
|
80
|
+
@include typography.size(get("type-size"), $only-font-size: true);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
@forward "badge" as badge-*;
|
|
9
9
|
@forward "basic-hero" as basic-hero-*;
|
|
10
10
|
@forward "button" as button-*;
|
|
11
|
+
@forward "button-group" as button-group-*;
|
|
11
12
|
@forward "button-verbose" as button-verbose-*;
|
|
12
13
|
@forward "callout" as callout-*;
|
|
13
14
|
@forward "card" as card-*;
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
@forward "flipcard" as flipcard-*;
|
|
21
22
|
@forward "flipcard-grid" as flipcard-grid-*;
|
|
22
23
|
@forward "form-theme" as form-theme-*;
|
|
24
|
+
@forward "headline-label" as headline-label-*;
|
|
23
25
|
@forward "horizontal-rule" as horizontal-rule-*;
|
|
24
26
|
@forward "image-grid" as image-grid-*;
|
|
25
27
|
@forward "links" as links-*;
|
|
@@ -32,9 +34,11 @@
|
|
|
32
34
|
@forward "nav-strip" as nav-strip-*;
|
|
33
35
|
@forward "overlay-section" as overlay-section-*;
|
|
34
36
|
@forward "pager" as pager-*;
|
|
37
|
+
@forward "panel" as panel-*;
|
|
35
38
|
@forward "placeholder-block" as placeholder-block-*;
|
|
36
39
|
@forward "pull-quote" as pull-quote-*;
|
|
37
40
|
@forward "popover" as popover-*;
|
|
41
|
+
@forward "rail" as rail-*;
|
|
38
42
|
@forward "ratio-box" as ratio-box-*;
|
|
39
43
|
@forward "rule" as rule-*;
|
|
40
44
|
@forward "scroll-slider" as scroll-slider-*;
|
|
@@ -60,6 +64,7 @@
|
|
|
60
64
|
@use "badge";
|
|
61
65
|
@use "basic-hero";
|
|
62
66
|
@use "button";
|
|
67
|
+
@use "button-group";
|
|
63
68
|
@use "button-verbose";
|
|
64
69
|
@use "callout";
|
|
65
70
|
@use "card";
|
|
@@ -72,6 +77,7 @@
|
|
|
72
77
|
@use "flipcard";
|
|
73
78
|
@use "flipcard-grid";
|
|
74
79
|
@use "form-theme";
|
|
80
|
+
@use "headline-label";
|
|
75
81
|
@use "horizontal-rule";
|
|
76
82
|
@use "image-grid";
|
|
77
83
|
@use "list-lines";
|
|
@@ -84,9 +90,11 @@
|
|
|
84
90
|
@use "nav-strip";
|
|
85
91
|
@use "overlay-section";
|
|
86
92
|
@use "pager";
|
|
93
|
+
@use "panel";
|
|
87
94
|
@use "placeholder-block";
|
|
88
95
|
@use "popover";
|
|
89
96
|
@use "pull-quote";
|
|
97
|
+
@use "rail";
|
|
90
98
|
@use "ratio-box";
|
|
91
99
|
@use "rule";
|
|
92
100
|
@use "scroll-slider";
|
|
@@ -113,6 +121,7 @@ $all-includes: (
|
|
|
113
121
|
"badge",
|
|
114
122
|
"basic-hero",
|
|
115
123
|
"button",
|
|
124
|
+
"button-group",
|
|
116
125
|
"button-verbose",
|
|
117
126
|
"callout",
|
|
118
127
|
"card",
|
|
@@ -125,6 +134,7 @@ $all-includes: (
|
|
|
125
134
|
"flipcard",
|
|
126
135
|
"flipcard-grid",
|
|
127
136
|
"form-theme",
|
|
137
|
+
"headline-label",
|
|
128
138
|
"horizontal-rule",
|
|
129
139
|
"image-grid",
|
|
130
140
|
"links",
|
|
@@ -137,7 +147,9 @@ $all-includes: (
|
|
|
137
147
|
"nav-strip",
|
|
138
148
|
"overlay-section",
|
|
139
149
|
"pager",
|
|
150
|
+
"panel",
|
|
140
151
|
"popover",
|
|
152
|
+
"rail",
|
|
141
153
|
"ratio-box",
|
|
142
154
|
"rule",
|
|
143
155
|
"scroll-slider",
|
|
@@ -202,6 +214,9 @@ $current-includes: $all-includes;
|
|
|
202
214
|
@if (list.index($includes, "button")) {
|
|
203
215
|
@include button.styles;
|
|
204
216
|
}
|
|
217
|
+
@if (list.index($includes, "button-group")) {
|
|
218
|
+
@include button-group.styles;
|
|
219
|
+
}
|
|
205
220
|
@if (list.index($includes, "button-verbose")) {
|
|
206
221
|
@include button-verbose.styles;
|
|
207
222
|
}
|
|
@@ -247,6 +262,9 @@ $current-includes: $all-includes;
|
|
|
247
262
|
@if (list.index($includes, "form-theme")) {
|
|
248
263
|
@include form-theme.styles;
|
|
249
264
|
}
|
|
265
|
+
@if (list.index($includes, "headline-label")) {
|
|
266
|
+
@include headline-label.styles;
|
|
267
|
+
}
|
|
250
268
|
@if (list.index($includes, "horizontal-rule")) {
|
|
251
269
|
@include horizontal-rule.styles;
|
|
252
270
|
}
|
|
@@ -283,6 +301,9 @@ $current-includes: $all-includes;
|
|
|
283
301
|
@if (list.index($includes, "pager")) {
|
|
284
302
|
@include pager.styles;
|
|
285
303
|
}
|
|
304
|
+
@if (list.index($includes, "panel")) {
|
|
305
|
+
@include panel.styles;
|
|
306
|
+
}
|
|
286
307
|
@if (list.index($includes, "placeholder-block")) {
|
|
287
308
|
@include placeholder-block.styles;
|
|
288
309
|
}
|
|
@@ -292,6 +313,9 @@ $current-includes: $all-includes;
|
|
|
292
313
|
@if (list.index($includes, "pull-quote")) {
|
|
293
314
|
@include pull-quote.styles;
|
|
294
315
|
}
|
|
316
|
+
@if (list.index($includes, "rail")) {
|
|
317
|
+
@include rail.styles;
|
|
318
|
+
}
|
|
295
319
|
@if (list.index($includes, "ratio-box")) {
|
|
296
320
|
@include ratio-box.styles;
|
|
297
321
|
}
|
|
@@ -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
|
+
}
|