@ulu/frontend 0.1.0-beta.32 → 0.1.0-beta.33
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 +32 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +11 -11
- package/docs-dev/changelog/index.html +77 -8
- package/docs-dev/demos/accordion/index.html +8 -8
- package/docs-dev/demos/button/index.html +8 -8
- package/docs-dev/demos/button-verbose/index.html +8 -8
- package/docs-dev/demos/callout/index.html +26 -8
- package/docs-dev/demos/captioned-figure/index.html +8 -8
- package/docs-dev/demos/card/index.html +29 -33
- package/docs-dev/demos/card-grid/index.html +12 -12
- package/docs-dev/demos/css-icons/index.html +8 -8
- package/docs-dev/demos/data-grid/index.html +8 -8
- package/docs-dev/demos/data-table/index.html +33 -33
- package/docs-dev/demos/details-group/index.html +8 -8
- package/docs-dev/demos/file-save/index.html +8 -8
- package/docs-dev/demos/flipcard/index.html +8 -8
- package/docs-dev/demos/form-theme/index.html +8 -8
- package/docs-dev/demos/index.html +8 -8
- package/docs-dev/demos/list-inline/index.html +8 -8
- package/docs-dev/demos/list-lines/index.html +8 -8
- package/docs-dev/demos/menu-stack/index.html +8 -8
- package/docs-dev/demos/modals/index.html +8 -8
- package/docs-dev/demos/nav-strip/index.html +8 -8
- package/docs-dev/demos/overlay-section/index.html +8 -8
- package/docs-dev/demos/popovers/index.html +8 -8
- package/docs-dev/demos/print/index.html +8 -8
- package/docs-dev/demos/pull-quote/index.html +8 -8
- package/docs-dev/demos/rule/index.html +8 -8
- package/docs-dev/demos/scrollpoints/index.html +8 -8
- package/docs-dev/demos/spoke-spinner/index.html +8 -8
- package/docs-dev/demos/sticky-list/index.html +8 -8
- package/docs-dev/demos/tabs/index.html +8 -8
- package/docs-dev/demos/tag/index.html +8 -8
- package/docs-dev/demos/theme-toggle/index.html +8 -8
- package/docs-dev/demos/tiles/index.html +8 -8
- package/docs-dev/demos/tooltip/index.html +8 -8
- package/docs-dev/guide/building-stylesheet/index.html +8 -8
- package/docs-dev/guide/developing-ulu-scss-module/index.html +8 -8
- package/docs-dev/guide/index.html +8 -8
- package/docs-dev/index.html +8 -8
- package/docs-dev/javascript/events/index.html +8 -8
- package/docs-dev/javascript/index.html +8 -8
- package/docs-dev/javascript/settings/index.html +8 -8
- package/docs-dev/javascript/ui-breakpoints/index.html +8 -8
- package/docs-dev/javascript/ui-collapsible/index.html +8 -8
- package/docs-dev/javascript/ui-details-group/index.html +8 -8
- package/docs-dev/javascript/ui-dialog/index.html +8 -8
- package/docs-dev/javascript/ui-flipcard/index.html +8 -8
- package/docs-dev/javascript/ui-grid/index.html +8 -8
- package/docs-dev/javascript/ui-modal-builder/index.html +8 -8
- package/docs-dev/javascript/ui-overflow-scroller/index.html +8 -8
- package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +8 -8
- package/docs-dev/javascript/ui-page/index.html +8 -8
- package/docs-dev/javascript/ui-popover/index.html +8 -8
- package/docs-dev/javascript/ui-print/index.html +8 -8
- package/docs-dev/javascript/ui-print-details/index.html +8 -8
- package/docs-dev/javascript/ui-programmatic-modal/index.html +8 -8
- package/docs-dev/javascript/ui-proxy-click/index.html +8 -8
- package/docs-dev/javascript/ui-resizer/index.html +8 -8
- package/docs-dev/javascript/ui-scroll-slider/index.html +8 -8
- package/docs-dev/javascript/ui-scrollpoint/index.html +8 -8
- package/docs-dev/javascript/ui-slider/index.html +8 -8
- package/docs-dev/javascript/ui-tabs/index.html +8 -8
- package/docs-dev/javascript/ui-theme-toggle/index.html +8 -8
- package/docs-dev/javascript/ui-tooltip/index.html +8 -8
- package/docs-dev/javascript/utils-class-logger/index.html +8 -8
- package/docs-dev/javascript/utils-dom/index.html +8 -8
- package/docs-dev/javascript/utils-file-save/index.html +8 -8
- package/docs-dev/javascript/utils-floating-ui/index.html +8 -8
- package/docs-dev/javascript/utils-id/index.html +8 -8
- package/docs-dev/javascript/utils-pause-youtube-video/index.html +8 -8
- package/docs-dev/sass/base/color/index.html +8 -8
- package/docs-dev/sass/base/elements/index.html +8 -8
- package/docs-dev/sass/base/index/index.html +8 -8
- package/docs-dev/sass/base/index.html +8 -8
- package/docs-dev/sass/base/keyframes/index.html +8 -8
- package/docs-dev/sass/base/layout/index.html +8 -8
- package/docs-dev/sass/base/normalize/index.html +8 -8
- package/docs-dev/sass/base/print/index.html +8 -8
- package/docs-dev/sass/base/root/index.html +8 -8
- package/docs-dev/sass/base/typography/index.html +8 -8
- package/docs-dev/sass/components/accordion/index.html +8 -8
- package/docs-dev/sass/components/adaptive-spacing/index.html +8 -8
- package/docs-dev/sass/components/badge/index.html +8 -8
- package/docs-dev/sass/components/basic-hero/index.html +8 -8
- package/docs-dev/sass/components/button/index.html +8 -8
- package/docs-dev/sass/components/button-verbose/index.html +42 -37
- package/docs-dev/sass/components/callout/index.html +94 -35
- package/docs-dev/sass/components/captioned-figure/index.html +8 -8
- package/docs-dev/sass/components/card/index.html +8 -8
- package/docs-dev/sass/components/card-grid/index.html +8 -8
- package/docs-dev/sass/components/css-icon/index.html +8 -8
- package/docs-dev/sass/components/data-grid/index.html +8 -8
- package/docs-dev/sass/components/data-table/index.html +8 -8
- package/docs-dev/sass/components/fill-context/index.html +8 -8
- package/docs-dev/sass/components/flipcard/index.html +8 -8
- package/docs-dev/sass/components/flipcard-grid/index.html +8 -8
- package/docs-dev/sass/components/form-theme/index.html +8 -8
- package/docs-dev/sass/components/hero/index.html +8 -8
- package/docs-dev/sass/components/horizontal-rule/index.html +8 -8
- package/docs-dev/sass/components/image-grid/index.html +8 -8
- package/docs-dev/sass/components/index/index.html +8 -8
- package/docs-dev/sass/components/index.html +8 -8
- package/docs-dev/sass/components/links/index.html +8 -8
- package/docs-dev/sass/components/list-inline/index.html +8 -8
- package/docs-dev/sass/components/list-lines/index.html +8 -8
- package/docs-dev/sass/components/list-ordered/index.html +8 -8
- package/docs-dev/sass/components/list-unordered/index.html +8 -8
- package/docs-dev/sass/components/menu-stack/index.html +8 -8
- package/docs-dev/sass/components/modal/index.html +8 -8
- package/docs-dev/sass/components/nav-strip/index.html +8 -8
- package/docs-dev/sass/components/overlay-section/index.html +8 -8
- package/docs-dev/sass/components/pager/index.html +8 -8
- package/docs-dev/sass/components/placeholder-block/index.html +8 -8
- package/docs-dev/sass/components/popover/index.html +8 -8
- package/docs-dev/sass/components/pull-quote/index.html +8 -8
- package/docs-dev/sass/components/ratio-box/index.html +8 -8
- package/docs-dev/sass/components/rule/index.html +8 -8
- package/docs-dev/sass/components/scroll-slider/index.html +8 -8
- package/docs-dev/sass/components/skip-link/index.html +8 -8
- package/docs-dev/sass/components/slider/index.html +8 -8
- package/docs-dev/sass/components/spoke-spinner/index.html +10 -10
- package/docs-dev/sass/components/sticky-list/index.html +8 -8
- package/docs-dev/sass/components/tabs/index.html +8 -8
- package/docs-dev/sass/components/tag/index.html +10 -10
- package/docs-dev/sass/components/tile-button/index.html +8 -8
- package/docs-dev/sass/components/tile-grid/index.html +8 -8
- package/docs-dev/sass/components/tile-grid-overlay/index.html +8 -8
- package/docs-dev/sass/components/vignette/index.html +8 -8
- package/docs-dev/sass/components/wysiwyg/index.html +8 -8
- package/docs-dev/sass/core/breakpoint/index.html +8 -8
- package/docs-dev/sass/core/button/index.html +8 -8
- package/docs-dev/sass/core/color/index.html +8 -8
- package/docs-dev/sass/core/cssvar/index.html +8 -8
- package/docs-dev/sass/core/element/index.html +188 -47
- package/docs-dev/sass/core/index.html +8 -8
- package/docs-dev/sass/core/layout/index.html +64 -45
- package/docs-dev/sass/core/path/index.html +8 -8
- package/docs-dev/sass/core/selector/index.html +8 -8
- package/docs-dev/sass/core/typography/index.html +8 -8
- package/docs-dev/sass/core/units/index.html +8 -8
- package/docs-dev/sass/core/utils/index.html +272 -68
- package/docs-dev/sass/helpers/color/index.html +8 -8
- package/docs-dev/sass/helpers/display/index.html +8 -8
- package/docs-dev/sass/helpers/index/index.html +8 -8
- package/docs-dev/sass/helpers/index.html +8 -8
- package/docs-dev/sass/helpers/print/index.html +8 -8
- package/docs-dev/sass/helpers/typography/index.html +8 -8
- package/docs-dev/sass/helpers/units/index.html +8 -8
- package/docs-dev/sass/helpers/utilities/index.html +8 -8
- package/docs-dev/sass/index.html +8 -8
- package/js/ui/tooltip.js +2 -1
- package/package.json +1 -1
- package/scss/_element.scss +91 -0
- package/scss/_layout.scss +3 -1
- package/scss/_utils.scss +42 -0
- package/scss/components/_button-verbose.scss +41 -36
- package/scss/components/_callout.scss +113 -53
- package/types/ui/tooltip.d.ts.map +1 -1
|
@@ -48,11 +48,11 @@ $-fallbacks: (
|
|
|
48
48
|
/// @prop {String} title-color [link] Color of the title of the button.
|
|
49
49
|
/// @prop {String} title-color-hover [link-hover] Color of the title of the button when hovered or focused.
|
|
50
50
|
/// @prop {Dimension} title-margin [0.5em] Margin for the button's title.
|
|
51
|
-
/// @prop {Boolean}
|
|
52
|
-
/// @prop {Color}
|
|
53
|
-
/// @prop {
|
|
54
|
-
/// @prop {
|
|
55
|
-
/// @prop {
|
|
51
|
+
/// @prop {Boolean} cap [false] Enable left cap style
|
|
52
|
+
/// @prop {Color} cap-side ["left"] The side that gets the cap
|
|
53
|
+
/// @prop {Number} cap-match-radius [true] The cap should have be rounded to match the parent's border radius
|
|
54
|
+
/// @prop {Map} cap-options The options for cap (see element.cap for options)
|
|
55
|
+
/// @prop {Map} cap-options-hover The options for cap when hovered
|
|
56
56
|
|
|
57
57
|
$config: (
|
|
58
58
|
"background-color" : white,
|
|
@@ -69,16 +69,21 @@ $config: (
|
|
|
69
69
|
"margin" : 1em,
|
|
70
70
|
"margin-inline" : 0.75em,
|
|
71
71
|
"min-width": 20rem,
|
|
72
|
-
"padding-x": 0.
|
|
72
|
+
"padding-x": 0.75em,
|
|
73
73
|
"padding-y": 1em,
|
|
74
74
|
"title-color": "link",
|
|
75
75
|
"title-margin" : 0.5em,
|
|
76
76
|
"title-color-hover" : "link-hover",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
77
|
+
"cap" : false,
|
|
78
|
+
"cap-side" : "left",
|
|
79
|
+
"cap-match-radius" : true,
|
|
80
|
+
"cap-options" : (
|
|
81
|
+
"color" : "link",
|
|
82
|
+
"size" : 0.5rem,
|
|
83
|
+
),
|
|
84
|
+
"cap-options-hover" : (
|
|
85
|
+
"color" : "link-hover"
|
|
86
|
+
),
|
|
82
87
|
) !default;
|
|
83
88
|
|
|
84
89
|
/// Change modules $config
|
|
@@ -112,40 +117,30 @@ $config: (
|
|
|
112
117
|
|
|
113
118
|
@mixin styles {
|
|
114
119
|
$prefix: selector.class("button-verbose");
|
|
120
|
+
$padding-x: get("padding-x");
|
|
121
|
+
$padding-y: get("padding-y");
|
|
122
|
+
$padding-right: ($padding-x * 2) + 1em;
|
|
123
|
+
$cap-side: get("cap-side");
|
|
124
|
+
$cap-defaults: (
|
|
125
|
+
"border-radius" : if(get("cap-match-radius"), get("border-radius"), 0),
|
|
126
|
+
"padding-adjust" : if(utils.is-side($cap-side), $padding-x, $padding-y)
|
|
127
|
+
);
|
|
115
128
|
|
|
116
129
|
#{ $prefix } {
|
|
117
130
|
text-decoration: none;
|
|
118
131
|
border-radius: get("border-radius");
|
|
119
132
|
box-shadow: get("box-shadow");
|
|
120
133
|
line-height: get("line-height");
|
|
121
|
-
position: relative;
|
|
134
|
+
position: relative; // For cap and icon
|
|
122
135
|
display: block;
|
|
123
136
|
margin-bottom: get("margin");
|
|
124
137
|
max-width: 100%;
|
|
125
138
|
width: get("min-width");
|
|
126
139
|
background-color: color.get(get("background-color"));
|
|
127
|
-
padding:
|
|
128
|
-
padding-right: (get("padding-x") * 2) + 1em;
|
|
140
|
+
padding: $padding-y $padding-right $padding-y $padding-x;
|
|
129
141
|
color: color.get(get("color"));
|
|
130
142
|
text-align: left;
|
|
131
|
-
|
|
132
|
-
@if get("left-cap") {
|
|
133
|
-
padding-left: calc(get("padding-x") + get("left-cap-width"));
|
|
134
|
-
&::after {
|
|
135
|
-
content: "";
|
|
136
|
-
display: block;
|
|
137
|
-
position: absolute;
|
|
138
|
-
top: 0;
|
|
139
|
-
bottom: 0;
|
|
140
|
-
left: 0;
|
|
141
|
-
width: get("left-cap-width");
|
|
142
|
-
background-color: color.get(get("left-cap-color"));
|
|
143
|
-
@if get("left-cap-match-radius") {
|
|
144
|
-
border-top-left-radius: get("border-radius");
|
|
145
|
-
border-bottom-left-radius: get("border-radius");
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
143
|
+
|
|
149
144
|
&:hover {
|
|
150
145
|
color: color.get(get("color-hover"));
|
|
151
146
|
background-color: color.get(get("background-color-hover"));
|
|
@@ -160,9 +155,19 @@ $config: (
|
|
|
160
155
|
color: color.get(get("icon-color-hover"));
|
|
161
156
|
}
|
|
162
157
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
}
|
|
159
|
+
@if get("cap") {
|
|
160
|
+
@include element.cap(
|
|
161
|
+
$side: $cap-side,
|
|
162
|
+
$options: map.merge($cap-defaults, get("cap-options"))
|
|
163
|
+
);
|
|
164
|
+
@if get("cap-options-hover") {
|
|
165
|
+
&:hover,
|
|
166
|
+
&:focus {
|
|
167
|
+
@include element.cap-appearance(
|
|
168
|
+
$side: $cap-side,
|
|
169
|
+
$options: get("cap-options-hover")
|
|
170
|
+
);
|
|
166
171
|
}
|
|
167
172
|
}
|
|
168
173
|
}
|
|
@@ -180,7 +185,7 @@ $config: (
|
|
|
180
185
|
#{ $prefix }__icon {
|
|
181
186
|
position: absolute;
|
|
182
187
|
top: 50%;
|
|
183
|
-
right:
|
|
188
|
+
right: $padding-x;
|
|
184
189
|
transform: translateY(-50%);
|
|
185
190
|
font-size: get("icon-font-size");
|
|
186
191
|
color: color.get(get("icon-color"));
|
|
@@ -27,48 +27,51 @@ $-fallbacks: (
|
|
|
27
27
|
/// @prop {Boolean} border-radius [true] The border radius of the Callout.
|
|
28
28
|
/// @prop {Dimension} border-width [1px] The border width of the Callout.
|
|
29
29
|
/// @prop {CssValue} box-shadow [none] The box-shadow of the Callout.
|
|
30
|
-
/// @prop {Boolean}
|
|
31
|
-
/// @prop {
|
|
32
|
-
/// @prop {
|
|
30
|
+
/// @prop {Boolean} caps-disabled [false] If set will not output any cap styles for both base and styles
|
|
31
|
+
/// @prop {Boolean} cap [false] Toggles the use of caps on default callout
|
|
32
|
+
/// @prop {Boolean} cap-side ["left"] The side that gets the cap
|
|
33
|
+
/// @prop {Number} cap-match-radius [true] The cap should have be rounded to match the parent's border radius
|
|
34
|
+
/// @prop {Map} cap-options The options for cap (see element.cap for options)
|
|
33
35
|
/// @prop {Dimension} margin [2rem] Bottom margin of the Callout.
|
|
34
36
|
/// @prop {Dimension} padding [1.5rem] Padding of the Callout.
|
|
35
37
|
|
|
36
38
|
$config: (
|
|
37
39
|
"background-color" : rgb(240, 240, 240),
|
|
38
40
|
"border-color" : "rule-light",
|
|
39
|
-
"border-radius" :
|
|
41
|
+
"border-radius" : 6px,
|
|
40
42
|
"border-width" : 1px,
|
|
41
43
|
"box-shadow" : none,
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
44
|
+
"caps-disabled" : false,
|
|
45
|
+
"cap" : false,
|
|
46
|
+
"cap-side" : "left",
|
|
47
|
+
"cap-match-radius" : false,
|
|
48
|
+
"cap-options" : (
|
|
49
|
+
"color" : rgb(160, 160, 160),
|
|
50
|
+
"size" : 0.5rem,
|
|
51
|
+
),
|
|
45
52
|
"margin" : 2rem,
|
|
46
53
|
"padding" : 1.5rem,
|
|
47
54
|
) !default;
|
|
48
55
|
|
|
56
|
+
/// Styles Map (for unique variations/modifiers)
|
|
57
|
+
/// - Adjust this with set-styles
|
|
58
|
+
/// @type Map
|
|
59
|
+
|
|
49
60
|
$styles: (
|
|
50
61
|
"outline" : (
|
|
51
62
|
"background-color": transparent
|
|
52
63
|
),
|
|
53
64
|
"info" : (
|
|
54
65
|
"background-color" : "info-background",
|
|
55
|
-
"left-cap-color" : "info",
|
|
56
|
-
"left-cap" : true,
|
|
57
66
|
),
|
|
58
67
|
"warning" : (
|
|
59
68
|
"background-color" : "info-background",
|
|
60
|
-
"left-cap-color" : "info",
|
|
61
|
-
"left-cap" : true,
|
|
62
69
|
),
|
|
63
70
|
"success" : (
|
|
64
71
|
"background-color" : "success-background",
|
|
65
|
-
"left-cap-color" : "success",
|
|
66
|
-
"left-cap" : true,
|
|
67
72
|
),
|
|
68
73
|
"danger" : (
|
|
69
74
|
"background-color" : "danger-background",
|
|
70
|
-
"left-cap-color" : "danger",
|
|
71
|
-
"left-cap" : true,
|
|
72
75
|
),
|
|
73
76
|
) !default;
|
|
74
77
|
|
|
@@ -92,7 +95,8 @@ $styles: (
|
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
/// Set callout style variations
|
|
95
|
-
///
|
|
98
|
+
/// - Styles that modify padding when using mix-match caps on/off should be included last
|
|
99
|
+
/// @param {Map} $changes Map of changes (options for style include [background-color, color, border-color, border-radius, border-width, box-shadow, padding, cap, cap-options]
|
|
96
100
|
/// @param {String} $merge-mode Merge mode see utils.map-merge() [null|"deep"|"overwrite"]
|
|
97
101
|
|
|
98
102
|
@mixin set-styles($changes, $merge-mode: null) {
|
|
@@ -104,11 +108,17 @@ $styles: (
|
|
|
104
108
|
/// @include ulu.component-callout-styles();
|
|
105
109
|
|
|
106
110
|
@mixin styles {
|
|
107
|
-
$prefix: selector.class("callout");
|
|
108
|
-
|
|
111
|
+
$prefix: selector.class("callout");
|
|
112
|
+
$padding: get("padding");
|
|
113
|
+
$padding-info: utils.get-spacing($padding);
|
|
114
|
+
$cap-options: get("cap-options");
|
|
115
|
+
$cap-size: map.get($cap-options, "size");
|
|
116
|
+
$cap-side: get("cap-side");
|
|
117
|
+
|
|
109
118
|
#{ $prefix } {
|
|
119
|
+
position: relative; // For cap
|
|
110
120
|
background-color: color.get(get("background-color"));
|
|
111
|
-
padding:
|
|
121
|
+
padding: $padding;
|
|
112
122
|
border: get("border-width") solid color.get(get("border-color"));
|
|
113
123
|
margin-bottom: get("margin");
|
|
114
124
|
box-shadow: get("box-shadow");
|
|
@@ -116,48 +126,98 @@ $styles: (
|
|
|
116
126
|
& >:first-child {
|
|
117
127
|
margin-top: 0;
|
|
118
128
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
|
|
130
|
+
// If we have left cap on default we reuse this for all
|
|
131
|
+
// Else we will print it out manually for each unique style
|
|
132
|
+
@if (not get("caps-disabled")) {
|
|
133
|
+
$cap-defaults: (
|
|
134
|
+
"offset" : get("border-width"),
|
|
135
|
+
"border-radius" : if(get("cap-match-radius"), get("border-radius"), null),
|
|
136
|
+
// "padding-adjust" : map.get($padding-info, $cap-side)
|
|
137
|
+
);
|
|
138
|
+
@include element.cap(
|
|
139
|
+
$side: $cap-side,
|
|
140
|
+
$options: map.merge($cap-defaults, $cap-options)
|
|
141
|
+
);
|
|
126
142
|
}
|
|
127
|
-
|
|
128
|
-
|
|
143
|
+
|
|
144
|
+
// If the left cap is disabled we still include it's CSS but we hide it
|
|
145
|
+
// so that other styles of callouts can use it
|
|
146
|
+
@if (not get("cap")) {
|
|
147
|
+
&::before {
|
|
148
|
+
content: none;
|
|
149
|
+
}
|
|
150
|
+
// Since this is hidden and reused we need to not use padding adjust unless it
|
|
151
|
+
// was visible
|
|
152
|
+
} @else if ($cap-size) {
|
|
153
|
+
padding-#{ $cap-side }: calc(map.get($padding-info, $cap-side) + $cap-size);
|
|
129
154
|
}
|
|
130
155
|
}
|
|
156
|
+
|
|
157
|
+
@include -output-style-modifiers();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Output Each Style Modifier
|
|
161
|
+
// - Note if cap is not disabled this will just update appearance values of cap styling
|
|
162
|
+
@mixin -output-style-modifiers() {
|
|
163
|
+
$prefix: selector.class("callout");
|
|
164
|
+
$caps-enabled: not get("caps-disabled");
|
|
165
|
+
$cap-side: get("cap-side");
|
|
166
|
+
|
|
131
167
|
@each $name, $style in $styles {
|
|
132
|
-
$
|
|
168
|
+
$cap: map.get($style, "cap");
|
|
169
|
+
$padding: map.get($style, "padding");
|
|
170
|
+
$border-radius: map.get($style, "border-radius");
|
|
171
|
+
$background-color: map.get($style, "background-color");
|
|
172
|
+
$color: map.get($style, "color");
|
|
173
|
+
$border-color: map.get($style, "border-color");
|
|
174
|
+
$border-width: map.get($style, "border-width");
|
|
175
|
+
$box-shadow: map.get($style, "box-shadow");
|
|
176
|
+
$cap-match-radius: map.get($style, "cap-match-radius");
|
|
177
|
+
|
|
133
178
|
#{ $prefix }--#{ $name } {
|
|
134
|
-
background-color: color.get(
|
|
135
|
-
color: color.get(
|
|
136
|
-
border:
|
|
137
|
-
border-
|
|
138
|
-
border-
|
|
139
|
-
box-shadow:
|
|
140
|
-
padding:
|
|
141
|
-
|
|
179
|
+
background-color: color.get($background-color);
|
|
180
|
+
color: color.get($color);
|
|
181
|
+
border-radius: $border-radius;
|
|
182
|
+
border-color: color.get($border-color);
|
|
183
|
+
border-width: $border-width;
|
|
184
|
+
box-shadow: $box-shadow;
|
|
185
|
+
padding: $padding;
|
|
186
|
+
|
|
187
|
+
@if ($cap and $caps-enabled) {
|
|
188
|
+
$match-radius: utils.if-type("bool", $cap-match-radius, get("cap-match-radius"));
|
|
189
|
+
// Padding adjust always has to be set (since size could change or padding)
|
|
190
|
+
$padding-info: utils.get-spacing(if($padding, $padding, get("padding")));
|
|
191
|
+
$cap-radius: utils.if-type("number", $border-radius, get("border-radius"));
|
|
192
|
+
$cap-options: utils.ensure-map(map.get($style, "cap-options"));
|
|
193
|
+
$cap-defaults: (
|
|
194
|
+
"size" : map.get(get("cap-options"), "size"),
|
|
195
|
+
"padding-adjust" : map.get($padding-info, $cap-side),
|
|
196
|
+
"offset" : $border-width,
|
|
197
|
+
"border-radius" : if($match-radius, $cap-radius, null)
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
@include element.cap-appearance(
|
|
201
|
+
$side: $cap-side,
|
|
202
|
+
$options: map.merge($cap-defaults, $cap-options),
|
|
203
|
+
$before: true
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
// Because the main callout's cap may not be visible
|
|
142
207
|
&::before {
|
|
143
|
-
|
|
208
|
+
content: "";
|
|
209
|
+
}
|
|
210
|
+
// If set to false remove the cap (if enabled) and reset default cap padding adjust
|
|
211
|
+
} @else if ($cap == false and $caps-enabled) {
|
|
212
|
+
// if this style doesn't set padding
|
|
213
|
+
@if (not $padding) {
|
|
214
|
+
$padding-info: utils.get-spacing(get("padding"));
|
|
215
|
+
padding-#{ $cap-side }: map.get($padding-info, $cap-side);
|
|
216
|
+
}
|
|
217
|
+
&::before {
|
|
218
|
+
content: none;
|
|
144
219
|
}
|
|
145
|
-
}
|
|
146
|
-
@if map.get($style, "left-cap") and not get("left-cap") {
|
|
147
|
-
// if current style has left cap and the global callout does not. This prevents duplicate styles printing.
|
|
148
|
-
@include -left-cap();
|
|
149
220
|
}
|
|
150
221
|
}
|
|
151
222
|
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
@mixin -left-cap() {
|
|
155
|
-
$left-padding: get-spacing-left(get("padding"));
|
|
156
|
-
position: relative;
|
|
157
|
-
border-top-left-radius: 0;
|
|
158
|
-
border-bottom-left-radius: 0;
|
|
159
|
-
padding-left: get("left-cap-width") + $left-padding;
|
|
160
|
-
&::before {
|
|
161
|
-
content: "";
|
|
162
|
-
}
|
|
163
223
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../js/ui/tooltip.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH,6BAGC;AAED;;;;GAIG;AACH,8BAGC;AAED,
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../js/ui/tooltip.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH,6BAGC;AAED;;;;GAIG;AACH,8BAGC;AAED,oDAQC;AAED;;;;GAIG;AACH;IACE;;OAEG;IACH;QACE;;;;WAIG;;QAEH;;;WAGG;;;;;QAKH;;;WAGG;qBADO,SAAO,IAAI;QAGrB;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;oBADO,aAAc;QAGxB;;;WAGG;oBADO,aAAc;QAGxB;;;WAGG;;QAEH;;WAEG;;QAUH;;;WAGG;;MAIH;IACF,kCAEE;IACF,mEAaC;IAPC,aAA+D;IAC/D,qBAAyF;IACzF,cAA+B;IAC/B,aAAkB;IAClB,gBAAmB;IAIrB,cAIC;IACD,2BAKC;IACD,gBAGC;IACD,uBAcC;IACD,gCASC;IACD,6BAkBC;IACD,uBAiCC;IACD,wBAiBC;IACD,wCAmBC;IACD,sDAEC;IACD,+BAEC;IADC,0BAA4E;IAE9E,gCAKC;IACD,uBAEC;IACD,uBAEC;CACF"}
|