@ulu/frontend 0.0.3 → 0.0.5
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/package.json +11 -10
- package/scss/_grid.scss +0 -1
- package/scss/_typography.scss +0 -1
- package/scss/helpers/_units.scss +1 -6
- package/scss/stylesheets/full.scss +1 -4
- package/trash/js-old/deprecated/doc-ready.js +0 -28
- package/trash/js-old/deprecated/jquery-prototypes.js +0 -309
- package/trash/js-old/deprecated/mini-collapsible-popper-positioning.js +0 -126
- package/trash/js-old/deprecated/mini-collapsible.js +0 -607
- package/trash/js-old/deprecated/script-loader.js +0 -60
- package/trash/js-old/events/index.js +0 -42
- package/trash/js-old/helpers/css-breakpoint.js +0 -247
- package/trash/js-old/helpers/file-save.js +0 -48
- package/trash/js-old/helpers/node-data-manager.js +0 -74
- package/trash/js-old/helpers/pause-youtube-video.js +0 -42
- package/trash/js-old/index.js +0 -15
- package/trash/js-old/polyfills/element-closest.js +0 -17
- package/trash/js-old/ui/flipcard.js +0 -202
- package/trash/js-old/ui/grid.js +0 -67
- package/trash/js-old/ui/modals.js +0 -219
- package/trash/js-old/ui/programmatic-modal.js +0 -91
- package/trash/js-old/ui/resizer.js +0 -60
- package/trash/js-old/ui/slider.js +0 -469
- package/trash/js-old/ui/tabs.js +0 -109
- package/trash/js-old/ui/tooltip.js +0 -82
- package/trash/js-old/utils/array.js +0 -28
- package/trash/js-old/utils/dom.js +0 -122
- package/trash/js-old/utils/logger.js +0 -69
- package/trash/js-old/utils/object.js +0 -22
- package/trash/js-old/utils/performance.js +0 -43
- package/trash/js-old/utils/regex.js +0 -10
- package/trash/js-old/utils/string.js +0 -107
- package/trash/js-old/waypoints/README.md +0 -3
- package/trash/js-old/waypoints/anchor-menu.js +0 -76
- package/trash/js-old/waypoints/element-waypoint.js +0 -75
- package/trash/js-old/waypoints/examples/page-link-menu.md +0 -106
- package/trash/js-old/waypoints/state-in-attribute.js +0 -32
- package/trash/js-old-230729/deprecated/doc-ready.js +0 -28
- package/trash/js-old-230729/deprecated/jquery-prototypes.js +0 -309
- package/trash/js-old-230729/deprecated/mini-collapsible-popper-positioning.js +0 -126
- package/trash/js-old-230729/deprecated/mini-collapsible.js +0 -607
- package/trash/js-old-230729/deprecated/script-loader.js +0 -60
- package/trash/js-old-230729/events/index.js +0 -42
- package/trash/js-old-230729/helpers/css-breakpoint.js +0 -247
- package/trash/js-old-230729/helpers/file-save.js +0 -48
- package/trash/js-old-230729/helpers/node-data-manager.js +0 -74
- package/trash/js-old-230729/helpers/pause-youtube-video.js +0 -42
- package/trash/js-old-230729/helpers/scrollbar-width-property.js +0 -10
- package/trash/js-old-230729/index.js +0 -15
- package/trash/js-old-230729/polyfills/element-closest.js +0 -17
- package/trash/js-old-230729/ui/flipcard.js +0 -202
- package/trash/js-old-230729/ui/grid.js +0 -67
- package/trash/js-old-230729/ui/modals.js +0 -219
- package/trash/js-old-230729/ui/overflow-scroller-pager.js +0 -58
- package/trash/js-old-230729/ui/overflow-scroller.js +0 -160
- package/trash/js-old-230729/ui/programmatic-modal.js +0 -91
- package/trash/js-old-230729/ui/resizer.js +0 -60
- package/trash/js-old-230729/ui/slider.js +0 -468
- package/trash/js-old-230729/ui/tabs.js +0 -109
- package/trash/js-old-230729/ui/tooltip.js +0 -82
- package/trash/js-old-230729/utils/array.js +0 -28
- package/trash/js-old-230729/utils/dom.js +0 -122
- package/trash/js-old-230729/utils/logger.js +0 -69
- package/trash/js-old-230729/utils/object.js +0 -22
- package/trash/js-old-230729/utils/performance.js +0 -43
- package/trash/js-old-230729/utils/regex.js +0 -10
- package/trash/js-old-230729/utils/string.js +0 -107
- package/trash/js-old-230729/waypoints/README.md +0 -3
- package/trash/js-old-230729/waypoints/anchor-menu.js +0 -76
- package/trash/js-old-230729/waypoints/element-waypoint.js +0 -75
- package/trash/js-old-230729/waypoints/examples/page-link-menu.md +0 -106
- package/trash/js-old-230729/waypoints/state-in-attribute.js +0 -32
- package/trash/logo-1.svg +0 -13
- package/trash/logo.svg +0 -16
- package/trash/scss-before-cqc-update/README.md +0 -58
- package/trash/scss-before-cqc-update/_breakpoint.scss +0 -190
- package/trash/scss-before-cqc-update/_button.scss +0 -229
- package/trash/scss-before-cqc-update/_calculate.scss +0 -65
- package/trash/scss-before-cqc-update/_color.scss +0 -211
- package/trash/scss-before-cqc-update/_cssvar.scss +0 -116
- package/trash/scss-before-cqc-update/_element.scss +0 -275
- package/trash/scss-before-cqc-update/_index.scss +0 -29
- package/trash/scss-before-cqc-update/_layout.scss +0 -247
- package/trash/scss-before-cqc-update/_path.scss +0 -59
- package/trash/scss-before-cqc-update/_selector.scss +0 -82
- package/trash/scss-before-cqc-update/_typography.scss +0 -322
- package/trash/scss-before-cqc-update/_units.scss +0 -48
- package/trash/scss-before-cqc-update/_utility.scss +0 -13
- package/trash/scss-before-cqc-update/_utils.scss +0 -211
- package/trash/scss-before-cqc-update/base/_color.scss +0 -14
- package/trash/scss-before-cqc-update/base/_elements.scss +0 -189
- package/trash/scss-before-cqc-update/base/_index.scss +0 -63
- package/trash/scss-before-cqc-update/base/_keyframes.scss +0 -74
- package/trash/scss-before-cqc-update/base/_layout.scss +0 -88
- package/trash/scss-before-cqc-update/base/_normalize.scss +0 -316
- package/trash/scss-before-cqc-update/base/_typography.scss +0 -42
- package/trash/scss-before-cqc-update/components/README.md +0 -5
- package/trash/scss-before-cqc-update/components/README.todos +0 -15
- package/trash/scss-before-cqc-update/components/_button.scss +0 -96
- package/trash/scss-before-cqc-update/components/_grid.scss +0 -671
- package/trash/scss-before-cqc-update/components/_index.scss +0 -70
- package/trash/scss-before-cqc-update/components/_links.scss +0 -35
- package/trash/scss-before-cqc-update/components/_list-lines.scss +0 -74
- package/trash/scss-before-cqc-update/components/_list-ordered.scss +0 -17
- package/trash/scss-before-cqc-update/components/_list-unordered.scss +0 -22
- package/trash/scss-before-cqc-update/components/_rule.scss +0 -94
- package/trash/scss-before-cqc-update/helpers/_color.scss +0 -15
- package/trash/scss-before-cqc-update/helpers/_display.scss +0 -73
- package/trash/scss-before-cqc-update/helpers/_index.scss +0 -68
- package/trash/scss-before-cqc-update/helpers/_print.scss +0 -59
- package/trash/scss-before-cqc-update/helpers/_typography.scss +0 -73
- package/trash/scss-before-cqc-update/helpers/_units.scss +0 -79
- package/trash/scss-before-cqc-update/helpers/_utilities.scss +0 -88
- package/trash/scss-before-cqc-update/stylesheets/README.md +0 -3
- package/trash/scss-before-cqc-update/stylesheets/full.scss +0 -17
- package/trash/scss-old/README.md +0 -58
- package/trash/scss-old/_breakpoint.scss +0 -140
- package/trash/scss-old/_button.scss +0 -223
- package/trash/scss-old/_calculate.scss +0 -64
- package/trash/scss-old/_color.scss +0 -200
- package/trash/scss-old/_element.scss +0 -262
- package/trash/scss-old/_grid.scss +0 -558
- package/trash/scss-old/_index.scss +0 -25
- package/trash/scss-old/_layout.scss +0 -170
- package/trash/scss-old/_path.scss +0 -58
- package/trash/scss-old/_selector.scss +0 -81
- package/trash/scss-old/_typography.scss +0 -320
- package/trash/scss-old/_units.scss +0 -47
- package/trash/scss-old/_utility.scss +0 -12
- package/trash/scss-old/_utils.scss +0 -186
- package/trash/scss-old/base/_color.scss +0 -13
- package/trash/scss-old/base/_elements.scss +0 -183
- package/trash/scss-old/base/_index.scss +0 -62
- package/trash/scss-old/base/_keyframes.scss +0 -74
- package/trash/scss-old/base/_layout.scss +0 -81
- package/trash/scss-old/base/_normalize.scss +0 -316
- package/trash/scss-old/base/_typography.scss +0 -42
- package/trash/scss-old/components/README.md +0 -5
- package/trash/scss-old/components/README.todos +0 -15
- package/trash/scss-old/components/_button.scss +0 -74
- package/trash/scss-old/components/_index.scss +0 -63
- package/trash/scss-old/components/_links.scss +0 -34
- package/trash/scss-old/components/_list-lines.scss +0 -73
- package/trash/scss-old/components/_list-ordered.scss +0 -16
- package/trash/scss-old/components/_list-unordered.scss +0 -21
- package/trash/scss-old/components/_rule.scss +0 -84
- package/trash/scss-old/helpers/_color.scss +0 -14
- package/trash/scss-old/helpers/_display.scss +0 -68
- package/trash/scss-old/helpers/_index.scss +0 -67
- package/trash/scss-old/helpers/_print.scss +0 -59
- package/trash/scss-old/helpers/_typography.scss +0 -73
- package/trash/scss-old/helpers/_units.scss +0 -68
- package/trash/scss-old/helpers/_utilities.scss +0 -82
- package/trash/scss-old/packages/README.md +0 -3
- package/trash/scss-old/packages/everything.scss +0 -17
- package/trash/scss-old-2/README.md +0 -58
- package/trash/scss-old-2/_breakpoint.scss +0 -139
- package/trash/scss-old-2/_button.scss +0 -223
- package/trash/scss-old-2/_calculate.scss +0 -64
- package/trash/scss-old-2/_color.scss +0 -202
- package/trash/scss-old-2/_element.scss +0 -263
- package/trash/scss-old-2/_grid.scss +0 -558
- package/trash/scss-old-2/_index.scss +0 -25
- package/trash/scss-old-2/_layout.scss +0 -170
- package/trash/scss-old-2/_path.scss +0 -58
- package/trash/scss-old-2/_selector.scss +0 -81
- package/trash/scss-old-2/_typography.scss +0 -320
- package/trash/scss-old-2/_units.scss +0 -47
- package/trash/scss-old-2/_utility.scss +0 -12
- package/trash/scss-old-2/_utils.scss +0 -186
- package/trash/scss-old-2/base/_color.scss +0 -13
- package/trash/scss-old-2/base/_elements.scss +0 -182
- package/trash/scss-old-2/base/_index.scss +0 -62
- package/trash/scss-old-2/base/_keyframes.scss +0 -73
- package/trash/scss-old-2/base/_layout.scss +0 -83
- package/trash/scss-old-2/base/_normalize.scss +0 -315
- package/trash/scss-old-2/base/_typography.scss +0 -41
- package/trash/scss-old-2/components/README.md +0 -5
- package/trash/scss-old-2/components/README.todos +0 -15
- package/trash/scss-old-2/components/_button.scss +0 -95
- package/trash/scss-old-2/components/_index.scss +0 -63
- package/trash/scss-old-2/components/_links.scss +0 -33
- package/trash/scss-old-2/components/_list-lines.scss +0 -73
- package/trash/scss-old-2/components/_list-ordered.scss +0 -16
- package/trash/scss-old-2/components/_list-unordered.scss +0 -21
- package/trash/scss-old-2/components/_rule.scss +0 -84
- package/trash/scss-old-2/helpers/_color.scss +0 -14
- package/trash/scss-old-2/helpers/_display.scss +0 -67
- package/trash/scss-old-2/helpers/_index.scss +0 -67
- package/trash/scss-old-2/helpers/_print.scss +0 -58
- package/trash/scss-old-2/helpers/_typography.scss +0 -72
- package/trash/scss-old-2/helpers/_units.scss +0 -68
- package/trash/scss-old-2/helpers/_utilities.scss +0 -81
- package/trash/scss-old-2/packages/README.md +0 -3
- package/trash/scss-old-2/packages/everything.scss +0 -17
- package/trash/scss-old-230729/README.md +0 -58
- package/trash/scss-old-230729/_breakpoint.scss +0 -139
- package/trash/scss-old-230729/_button.scss +0 -223
- package/trash/scss-old-230729/_calculate.scss +0 -64
- package/trash/scss-old-230729/_color.scss +0 -202
- package/trash/scss-old-230729/_element.scss +0 -273
- package/trash/scss-old-230729/_grid.scss +0 -694
- package/trash/scss-old-230729/_index.scss +0 -25
- package/trash/scss-old-230729/_layout.scss +0 -193
- package/trash/scss-old-230729/_path.scss +0 -58
- package/trash/scss-old-230729/_selector.scss +0 -81
- package/trash/scss-old-230729/_typography.scss +0 -320
- package/trash/scss-old-230729/_units.scss +0 -47
- package/trash/scss-old-230729/_utility.scss +0 -12
- package/trash/scss-old-230729/_utils.scss +0 -186
- package/trash/scss-old-230729/base/_color.scss +0 -13
- package/trash/scss-old-230729/base/_elements.scss +0 -188
- package/trash/scss-old-230729/base/_index.scss +0 -62
- package/trash/scss-old-230729/base/_keyframes.scss +0 -73
- package/trash/scss-old-230729/base/_layout.scss +0 -83
- package/trash/scss-old-230729/base/_normalize.scss +0 -315
- package/trash/scss-old-230729/base/_typography.scss +0 -41
- package/trash/scss-old-230729/components/README.md +0 -5
- package/trash/scss-old-230729/components/README.todos +0 -15
- package/trash/scss-old-230729/components/_button.scss +0 -95
- package/trash/scss-old-230729/components/_index.scss +0 -63
- package/trash/scss-old-230729/components/_links.scss +0 -34
- package/trash/scss-old-230729/components/_list-lines.scss +0 -73
- package/trash/scss-old-230729/components/_list-ordered.scss +0 -16
- package/trash/scss-old-230729/components/_list-unordered.scss +0 -21
- package/trash/scss-old-230729/components/_rule.scss +0 -93
- package/trash/scss-old-230729/helpers/_color.scss +0 -14
- package/trash/scss-old-230729/helpers/_display.scss +0 -73
- package/trash/scss-old-230729/helpers/_index.scss +0 -67
- package/trash/scss-old-230729/helpers/_print.scss +0 -58
- package/trash/scss-old-230729/helpers/_typography.scss +0 -72
- package/trash/scss-old-230729/helpers/_units.scss +0 -68
- package/trash/scss-old-230729/helpers/_utilities.scss +0 -87
- package/trash/scss-old-230729/packages/README.md +0 -3
- package/trash/scss-old-230729/packages/everything.scss +0 -17
- package/trash/vue/directives/background-image-url.js +0 -12
- package/trash/vue/helpers/add-required-components.js +0 -14
- package/trash/vue/ui/CollapsibleRegion/CollapsibleRegion.vue +0 -277
- package/trash/vue/ui/CollapsibleRegion/Demo.vue +0 -101
- package/trash/vue/ui/Dropdown/Dropdown.vue +0 -184
- package/trash/vue/ui/Modals/components/Modal.vue +0 -49
- package/trash/vue/ui/Modals/components/Modals.vue +0 -103
- package/trash/vue/ui/Modals/plugin.js +0 -215
- package/trash/vue/ui/Modals/readme.note +0 -10
- package/trash/vue/ui/Modals/reference/example-usage.vue +0 -27
- package/trash/vue/ui/Modals/reference/wcag-example/dialog.js +0 -324
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// @group breakpoint
|
|
3
|
-
////
|
|
4
|
-
|
|
5
|
-
@use "sass:map";
|
|
6
|
-
@use "calculate";
|
|
7
|
-
@use "utils";
|
|
8
|
-
|
|
9
|
-
/// Module Settings
|
|
10
|
-
/// @type Map
|
|
11
|
-
/// @prop {Number} $config.base Assumed pixel base, can change based on users font settings so this is just o get us in the ballpark). Note this is not the base font size but the user agent's or user's browser preferernce. This number is just being used for calculating estimated em sizes from average base. Since pixels are easier to understand but since we allow the user to set their font size. All of our css is relative to that, including most of the layout (rems, other relative units)
|
|
12
|
-
/// @prop {Number} $config.gap The amount to offset min from max media queries incase you are using both (ie prevent overlap)
|
|
13
|
-
/// @prop {String} $config.null-name The name of the space from 0 to the first breakpoint (doesn't really matter) used when passing breakpoints to JS via content property
|
|
14
|
-
/// @prop {String} $config.default the name of the breakpont that is considered the major change (ie desktop to mobile) used by other modules/components
|
|
15
|
-
|
|
16
|
-
$config: (
|
|
17
|
-
"base": 16px,
|
|
18
|
-
"gap": 0.01em,
|
|
19
|
-
"null-name": "none",
|
|
20
|
-
"default" : "small"
|
|
21
|
-
) !default;
|
|
22
|
-
|
|
23
|
-
/// Change modules $config
|
|
24
|
-
/// @param {Map} $changes Map of changes
|
|
25
|
-
/// @include module-name.set(( "property" : value ));
|
|
26
|
-
@mixin set($changes) {
|
|
27
|
-
$config: map.merge($config, $changes) !global;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/// Get a config option
|
|
31
|
-
/// @param {Map} $name Name of property
|
|
32
|
-
/// @include module-name.get("property");
|
|
33
|
-
|
|
34
|
-
@function get($name) {
|
|
35
|
-
@return utils.require-map-get($config, $name, 'breakpoint [config]');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/// The default breakpoint sizes (targets are not precise, using em's)
|
|
40
|
-
/// @type Map
|
|
41
|
-
|
|
42
|
-
$sizes: (
|
|
43
|
-
"small" : calculate.pixel-to-em(680px, get("base")),
|
|
44
|
-
"medium" : calculate.pixel-to-em(1200px, get("base")),
|
|
45
|
-
"large" : calculate.pixel-to-em(1500px, get("base"))
|
|
46
|
-
) !default;
|
|
47
|
-
|
|
48
|
-
/// Update the breakpoint sizes map
|
|
49
|
-
/// @param {Map} $changes A map to merge into the breakpoints map
|
|
50
|
-
/// @example scss Changing the medium breakpoint and adding jumbo
|
|
51
|
-
/// @include breakpoints.set((
|
|
52
|
-
/// "medium" : 50em,
|
|
53
|
-
/// "jumbo" : 100em
|
|
54
|
-
/// ));
|
|
55
|
-
|
|
56
|
-
@mixin set($changes) {
|
|
57
|
-
$sizes: map.merge($sizes, $changes) !global;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@function exists($name) {
|
|
61
|
-
$size: map.get($sizes, $name);
|
|
62
|
-
@return if($size != null, true, false);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/// Create a media query that matches the min-width for a given size
|
|
66
|
-
/// @param {Number} $size The name of the breakpoint bsize
|
|
67
|
-
/// @example scss
|
|
68
|
-
/// @include breakpoints.min("small") {
|
|
69
|
-
/// // Your styles
|
|
70
|
-
/// }
|
|
71
|
-
|
|
72
|
-
@mixin min($size) {
|
|
73
|
-
// Adding the small fraction to prevent overlap
|
|
74
|
-
$min: utils.require-map-get($sizes, $size, "breakpoints");
|
|
75
|
-
@media screen and (min-width: $min) {
|
|
76
|
-
@content;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/// Create a media query that matches the max-width for a given size
|
|
81
|
-
/// @param {Number} $size The name of the breakpoint size
|
|
82
|
-
/// @example scss
|
|
83
|
-
/// @include breakpoints.max("medium") {
|
|
84
|
-
/// // Your styles
|
|
85
|
-
/// }
|
|
86
|
-
|
|
87
|
-
@mixin max($size) {
|
|
88
|
-
// Adding the small fraction to prevent overlap
|
|
89
|
-
$max: utils.require-map-get($sizes, $size) - get("gap");
|
|
90
|
-
@media screen and (max-width: $max) {
|
|
91
|
-
@content;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/// Create a media query that matches the min-width and max-width sizes
|
|
96
|
-
/// @param {Number} $size The name of the breakpoint size
|
|
97
|
-
/// @example scss
|
|
98
|
-
/// @include breakpoints.min-max("small", "medium") {
|
|
99
|
-
/// // Your styles
|
|
100
|
-
/// }
|
|
101
|
-
|
|
102
|
-
@mixin min-max($size-min, $size-max) {
|
|
103
|
-
// Adding the small fraction to prevent overlap
|
|
104
|
-
$min: utils.require-map-get($sizes, $size-min, "breakpoints");
|
|
105
|
-
$max: utils.require-map-get($sizes, $size-max, "breakpoints") - get("gap");
|
|
106
|
-
@media screen and (min-width: $min) and (max-width: $max) {
|
|
107
|
-
@content;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@mixin from($name, $direction: "min") {
|
|
112
|
-
@if ($direction == "min" or $direction == "up") {
|
|
113
|
-
@include min($name) {
|
|
114
|
-
@content;
|
|
115
|
-
}
|
|
116
|
-
} @else if ($direction == "max" or $direction == "down") {
|
|
117
|
-
@include max($name) {
|
|
118
|
-
@content;
|
|
119
|
-
}
|
|
120
|
-
} @else {
|
|
121
|
-
@error "ULU: Mixin error (breakpoint.from), incorrect argument '$direction' use either (min, max, up, down)";
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/// Attaches breakpoints to an element psuedo content for access via script
|
|
127
|
-
/// Use with ulu/js/breakpoints. Breakpoints always min-width (upwards)
|
|
128
|
-
|
|
129
|
-
@mixin embed-for-scripts() {
|
|
130
|
-
&:before {
|
|
131
|
-
display: none;
|
|
132
|
-
content: get("null-name");
|
|
133
|
-
@each $size, $breakpoint in $sizes {
|
|
134
|
-
@include min($size) {
|
|
135
|
-
content: $size;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// @group button
|
|
3
|
-
////
|
|
4
|
-
|
|
5
|
-
/// Version: 1.0.1
|
|
6
|
-
|
|
7
|
-
@use "sass:map";
|
|
8
|
-
@use "sass:meta";
|
|
9
|
-
@use "sass:string";
|
|
10
|
-
|
|
11
|
-
@use "color";
|
|
12
|
-
@use "element";
|
|
13
|
-
@use "typography";
|
|
14
|
-
@use "utils";
|
|
15
|
-
|
|
16
|
-
// Used for function fallback
|
|
17
|
-
$-element-get: meta.get-function("get", false, "element");
|
|
18
|
-
$-fallbacks: (
|
|
19
|
-
"box-shadow" : $-element-get
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
/// Module Settings
|
|
23
|
-
/// @type Map
|
|
24
|
-
|
|
25
|
-
$config: (
|
|
26
|
-
"padding": (0.75em 1.5em),
|
|
27
|
-
"background-color": color.tint(black, 30%),
|
|
28
|
-
"background-color-hover": black,
|
|
29
|
-
"font-family": inherit,
|
|
30
|
-
"font-weight": bold,
|
|
31
|
-
"line-height": 1.1,
|
|
32
|
-
"letter-spacing": 0.02em,
|
|
33
|
-
"text-transform": normal,
|
|
34
|
-
"text-shadow": none,
|
|
35
|
-
"font-size": "base",
|
|
36
|
-
"color": white,
|
|
37
|
-
"color-hover": white,
|
|
38
|
-
"box-shadow": true,
|
|
39
|
-
"border-radius": 2rem,
|
|
40
|
-
"border-width": 0,
|
|
41
|
-
"border-color": transparent,
|
|
42
|
-
"border-color-hover": transparent,
|
|
43
|
-
"margin": (0.45em 0.5em 0.45em 0),
|
|
44
|
-
"min-width": 9rem,
|
|
45
|
-
"icon-size": 2.5rem,
|
|
46
|
-
"icon-font-size": 1.38rem,
|
|
47
|
-
"icon-border-radius": 50%,
|
|
48
|
-
"text-decoration" : none
|
|
49
|
-
) !default;
|
|
50
|
-
|
|
51
|
-
/// Button sizes
|
|
52
|
-
/// @type Map
|
|
53
|
-
|
|
54
|
-
$sizes: (
|
|
55
|
-
"small" : (
|
|
56
|
-
"padding": (0.35em 1.5em),
|
|
57
|
-
"min-width": 0,
|
|
58
|
-
"icon-size": 2rem,
|
|
59
|
-
"icon-font-size": 1rem
|
|
60
|
-
),
|
|
61
|
-
"large" : (
|
|
62
|
-
"padding": (1em 2em),
|
|
63
|
-
"min-width": 11rem,
|
|
64
|
-
"icon-size": 3.5rem
|
|
65
|
-
)
|
|
66
|
-
) !default;
|
|
67
|
-
|
|
68
|
-
/// Button styles
|
|
69
|
-
/// @type Map
|
|
70
|
-
|
|
71
|
-
$styles: (
|
|
72
|
-
"transparent" : (
|
|
73
|
-
"background-color" : transparent,
|
|
74
|
-
"color" : "type",
|
|
75
|
-
"border-color" : transparent,
|
|
76
|
-
"box-shadow" : none,
|
|
77
|
-
"hover" : (
|
|
78
|
-
"background-color" : "white",
|
|
79
|
-
"color" : inherit,
|
|
80
|
-
"border-color" : transparent,
|
|
81
|
-
)
|
|
82
|
-
),
|
|
83
|
-
"outline" : (
|
|
84
|
-
"background-color" : transparent,
|
|
85
|
-
"color" : "type",
|
|
86
|
-
"border-color" : "rule",
|
|
87
|
-
"box-shadow" : none,
|
|
88
|
-
"hover" : (
|
|
89
|
-
"background-color" : "white",
|
|
90
|
-
)
|
|
91
|
-
),
|
|
92
|
-
) !default;
|
|
93
|
-
|
|
94
|
-
/// Change modules $config
|
|
95
|
-
/// @param {Map} $changes Map of changes
|
|
96
|
-
/// @example scss - General example, replace module-name with module's name
|
|
97
|
-
/// @include module-name.set(( "property" : value ));
|
|
98
|
-
|
|
99
|
-
@mixin set($changes) {
|
|
100
|
-
$config: map.merge($config, $changes) !global;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/// Get a config option
|
|
104
|
-
/// @param {Map} $name Name of property
|
|
105
|
-
/// @example scss - General example, replace module-name with module's name
|
|
106
|
-
/// @include module-name.get("property");
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
@function get($name) {
|
|
110
|
-
$value: utils.require-map-get($config, $name, "button [config]");
|
|
111
|
-
@return utils.function-fallback($name, $value, $-fallbacks);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@mixin set-styles($changes, $deep: false, $overwrite: false) {
|
|
115
|
-
$styles: utils.map-merge-or-overwrite($styles, $changes, $deep, $overwrite) !global;
|
|
116
|
-
}
|
|
117
|
-
@mixin set-sizes($changes, $deep: false, $overwrite: false) {
|
|
118
|
-
$sizes: utils.map-merge-or-overwrite($sizes, $changes, $deep, $overwrite) !global;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@mixin reset() {
|
|
122
|
-
text-transform: none;
|
|
123
|
-
text-align: inherit;
|
|
124
|
-
background-color: transparent;
|
|
125
|
-
border: transparent;
|
|
126
|
-
border-radius: 0;
|
|
127
|
-
margin: 0;
|
|
128
|
-
padding: 0;
|
|
129
|
-
appearance: none;
|
|
130
|
-
color: inherit;
|
|
131
|
-
cursor: pointer;
|
|
132
|
-
}
|
|
133
|
-
@mixin default($with-reset: false) {
|
|
134
|
-
$font-size: get("font-size");
|
|
135
|
-
@if ($with-reset) {
|
|
136
|
-
@include reset();
|
|
137
|
-
}
|
|
138
|
-
display: inline-block;
|
|
139
|
-
text-transform: get("text-transform");
|
|
140
|
-
text-align: center;
|
|
141
|
-
text-shadow: get("text-shadow");
|
|
142
|
-
vertical-align: middle;
|
|
143
|
-
font-family: get("font-family");
|
|
144
|
-
font-weight: get("font-weight");
|
|
145
|
-
font-size: if(get("font-size"), typography.font-size(get("font-size")), null);
|
|
146
|
-
@if ($font-size) {
|
|
147
|
-
@include typography.size($font-size, null, true);
|
|
148
|
-
}
|
|
149
|
-
border-radius: get("border-radius");
|
|
150
|
-
background-clip: padding-box;
|
|
151
|
-
padding: get("padding");
|
|
152
|
-
line-height: get("line-height");
|
|
153
|
-
letter-spacing: get("letter-spacing");
|
|
154
|
-
box-shadow: get("box-shadow");
|
|
155
|
-
margin: get("margin");
|
|
156
|
-
min-width: get("min-width");
|
|
157
|
-
max-width: 100%; // Questionable, not sure if it's needed
|
|
158
|
-
// Should override link visted coloring
|
|
159
|
-
&,
|
|
160
|
-
&:visited {
|
|
161
|
-
color: color.get(get("color"));
|
|
162
|
-
border: get("border-width") solid get("border-color");
|
|
163
|
-
background-color: get("background-color");
|
|
164
|
-
text-decoration: get("text-decoration");
|
|
165
|
-
}
|
|
166
|
-
&:last-child {
|
|
167
|
-
margin-right: 0;
|
|
168
|
-
}
|
|
169
|
-
&:hover {
|
|
170
|
-
color: get("color-hover");
|
|
171
|
-
background-color: get("background-color-hover");
|
|
172
|
-
border-color: get("border-color-hover");
|
|
173
|
-
text-decoration: get("text-decoration");
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@mixin size($name) {
|
|
178
|
-
$size: utils.require-map-get($sizes, $name, 'button [size]');
|
|
179
|
-
$font-size: map.get($size, "font-size");
|
|
180
|
-
padding: map.get($size, "padding");
|
|
181
|
-
border-radius: map.get($size, "border-radius");
|
|
182
|
-
border-width: map.get($size, "border-width");
|
|
183
|
-
min-width: map.get($size, "min-width");
|
|
184
|
-
@if $font-size {
|
|
185
|
-
@include typography.size($font-size)
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
@function get-style-value($name, $prop, $for-hover: false) {
|
|
190
|
-
$is-color-prop: string.index($prop, "color");
|
|
191
|
-
$style: utils.require-map-get($styles, $name, 'button [color value]');
|
|
192
|
-
$hover: map.get($style, "hover");
|
|
193
|
-
$hover: if($hover, $hover, ());
|
|
194
|
-
$from: if($for-hover, $hover, $style);
|
|
195
|
-
$value: map.get($from, $prop);
|
|
196
|
-
$value: if($value, $value, map.get($style, $prop)); // Fallback to parent (if hover)
|
|
197
|
-
|
|
198
|
-
@if (meta.type-of($value) == "string" and $is-color-prop and $value != "inherit" and $value != "transparent") {
|
|
199
|
-
@return color.get($value);
|
|
200
|
-
} @else {
|
|
201
|
-
@return $value;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
@mixin style($name) {
|
|
206
|
-
&,
|
|
207
|
-
&:visited {
|
|
208
|
-
background-color: get-style-value($name, "background-color", false);
|
|
209
|
-
color: get-style-value($name, "color", false);
|
|
210
|
-
border-color: get-style-value($name, "border-color", false);
|
|
211
|
-
border-width: get-style-value($name, "border-width", false);
|
|
212
|
-
box-shadow: get-style-value($name, "box-shadow", false);
|
|
213
|
-
text-decoration: get-style-value($name, "text-decoration", false);
|
|
214
|
-
font-weight: get-style-value($name, "font-weight", false);
|
|
215
|
-
}
|
|
216
|
-
&:hover {
|
|
217
|
-
background-color: get-style-value($name, "background-color", true);
|
|
218
|
-
color: get-style-value($name, "color", true);
|
|
219
|
-
border-color: get-style-value($name, "border-color", true);
|
|
220
|
-
box-shadow: get-style-value($name, "box-shadow", true);
|
|
221
|
-
text-decoration: get-style-value($name, "text-decoration", true);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// @group calculate
|
|
3
|
-
////
|
|
4
|
-
|
|
5
|
-
@use "sass:math";
|
|
6
|
-
@use "sass:map";
|
|
7
|
-
@use "utils";
|
|
8
|
-
|
|
9
|
-
/// Module Settings
|
|
10
|
-
/// @type Map
|
|
11
|
-
/// @prop {Number} $config.responsive-change Default responsive amount to modify items using responsive-property mixin
|
|
12
|
-
|
|
13
|
-
$config: (
|
|
14
|
-
"responsive-change": 0.5vw
|
|
15
|
-
) !default;
|
|
16
|
-
|
|
17
|
-
/// Change modules $config
|
|
18
|
-
/// @param {Map} $changes Map of changes
|
|
19
|
-
/// @include module-name.set(( "property" : value ));
|
|
20
|
-
@mixin set($changes) {
|
|
21
|
-
$config: map.merge($config, $changes) !global;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/// Get a config option
|
|
25
|
-
/// @param {Map} $name Name of property
|
|
26
|
-
/// @include module-name.get("property");
|
|
27
|
-
|
|
28
|
-
@function get($name) {
|
|
29
|
-
@return utils.require-map-get($config, $name, "calculate [config]");
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/// Calculate the size of something at a given scale (percentage/exponential)
|
|
33
|
-
/// @param {Number} $base The number the scale starts at
|
|
34
|
-
/// @param {Number} $ratio The amount the scale changes over one set
|
|
35
|
-
/// @param {Number} $sizes The number of steps in the scale
|
|
36
|
-
/// @param {Number} $size The step you are trying to calculate
|
|
37
|
-
/// @return {Number}
|
|
38
|
-
|
|
39
|
-
@function ratio-scale-size($base, $ratio, $sizes, $size) {
|
|
40
|
-
@return $base * math.pow($ratio, math.div($size, $sizes));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/// Convert from pixel to em
|
|
44
|
-
/// @param {Number} $pixels The number the scale starts at
|
|
45
|
-
/// @param {Number} $base How many pixels equal 1em
|
|
46
|
-
/// @return {Number} Em Conversion
|
|
47
|
-
|
|
48
|
-
@function pixel-to-em($pixels, $base: 16px) {
|
|
49
|
-
@return math.div($pixels, $base) + 1em;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/// Provides user with a fallback for a calc that's just an enhancement
|
|
53
|
-
/// @param {String} $property The CSS property to set
|
|
54
|
-
/// @param {*} $value The value to set on the property
|
|
55
|
-
/// @param {Css} $responsive-change The amount to change (vw or vh units) (combined with unit past)
|
|
56
|
-
|
|
57
|
-
@mixin responsive-property(
|
|
58
|
-
$property,
|
|
59
|
-
$value,
|
|
60
|
-
$responsive-change: get("responsive-change")
|
|
61
|
-
) {
|
|
62
|
-
#{ $property } : $value;
|
|
63
|
-
#{ $property } : calc(#{ $value } + #{ $responsive-change });
|
|
64
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
////
|
|
2
|
-
/// @group color
|
|
3
|
-
////
|
|
4
|
-
|
|
5
|
-
@use "sass:map";
|
|
6
|
-
@use "sass:meta";
|
|
7
|
-
@use "utils";
|
|
8
|
-
@use "selector";
|
|
9
|
-
|
|
10
|
-
/// The color palette map, can be extended or modified with set() and accessed with get()
|
|
11
|
-
/// @type map
|
|
12
|
-
|
|
13
|
-
$palette: (
|
|
14
|
-
"black": black,
|
|
15
|
-
"white": white,
|
|
16
|
-
"type": black,
|
|
17
|
-
"focus": blue,
|
|
18
|
-
"error": red,
|
|
19
|
-
"accent": orange,
|
|
20
|
-
"selected" : green,
|
|
21
|
-
"box-shadow": rgba(0, 0, 0, 0.349),
|
|
22
|
-
"box-shadow:hover" : rgba(0, 0, 0, 0.5),
|
|
23
|
-
"rule": gray,
|
|
24
|
-
"rule-light": lightgray,
|
|
25
|
-
"link": blue,
|
|
26
|
-
"link:hover": darkblue,
|
|
27
|
-
"link:active": darkblue,
|
|
28
|
-
"link:visited": purple,
|
|
29
|
-
"bullet": inherit
|
|
30
|
-
) !default;
|
|
31
|
-
|
|
32
|
-
/// Pairs of background-color and color definitions
|
|
33
|
-
/// @type map
|
|
34
|
-
/// @prop {Number|String} $contexts.name.background-color Color value or name of color in $palette
|
|
35
|
-
/// @prop {Number|String} $contexts.name.color Color value or name of color in $palette
|
|
36
|
-
/// @prop {Boolean} $contexts.name.base-class Print this value in the base module as a class (if base prints)
|
|
37
|
-
|
|
38
|
-
$contexts: (
|
|
39
|
-
"dark" : (
|
|
40
|
-
"background-color" : "black",
|
|
41
|
-
"color" : "white",
|
|
42
|
-
"base-class" : true
|
|
43
|
-
),
|
|
44
|
-
"light" : (
|
|
45
|
-
"background-color" : "white",
|
|
46
|
-
"color" : "black",
|
|
47
|
-
"base-class" : true
|
|
48
|
-
),
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
/// Palette entries that are output as classes when using all-color-class-styles
|
|
52
|
-
$color-classes: (
|
|
53
|
-
"black" : true,
|
|
54
|
-
"white" : true,
|
|
55
|
-
"type": true
|
|
56
|
-
) !default;
|
|
57
|
-
|
|
58
|
-
/// Used to override or extend the color palette
|
|
59
|
-
/// @param {Map} $changes A map to merge into the color palette
|
|
60
|
-
/// @example scss Setting the error and type color
|
|
61
|
-
/// @include color.set((
|
|
62
|
-
/// "type" : #444,
|
|
63
|
-
/// "error" : orange,
|
|
64
|
-
/// ));
|
|
65
|
-
|
|
66
|
-
@mixin set($changes) {
|
|
67
|
-
$palette: map.merge($palette, $changes) !global;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/// Get a color from the palette by name
|
|
71
|
-
/// @param {String} $name Name of color to get
|
|
72
|
-
/// @return {Color}
|
|
73
|
-
|
|
74
|
-
@function get($name) {
|
|
75
|
-
// Allow non lookup if the value is already a color (helps with code flow)
|
|
76
|
-
@if (meta.type-of($name) == "color") {
|
|
77
|
-
@return $name;
|
|
78
|
-
} @else if ($name == "inherit") {
|
|
79
|
-
@return $name;
|
|
80
|
-
} @else {
|
|
81
|
-
@return utils.require-map-get($palette, $name, 'color');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/// Set ouput classes for all-color-class-styles
|
|
86
|
-
/// @param {Map} $changes Map of changes (you can disable defaults this way)
|
|
87
|
-
|
|
88
|
-
@mixin set-color-classes($changes) {
|
|
89
|
-
$color-classes: map.merge($color-classes, $changes) !global;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@function exists($name) {
|
|
93
|
-
$color: map.get($palette, $name);
|
|
94
|
-
@return if($color != null, true, false);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/// Set color contexts
|
|
98
|
-
/// @param {Map} $changes A map to merge
|
|
99
|
-
/// @param {Map} $deep Use deep merge
|
|
100
|
-
/// @param {Map} $overwrite Overwrite the completly (cannot be used with deep)
|
|
101
|
-
/// @example scss Overwriting contexts
|
|
102
|
-
/// @include color.set-contexts((
|
|
103
|
-
/// "dark" : (
|
|
104
|
-
/// "background-color" : red,
|
|
105
|
-
/// "color" : white,
|
|
106
|
-
/// )
|
|
107
|
-
/// ), false, true);
|
|
108
|
-
|
|
109
|
-
@mixin set-contexts($changes, $deep: false, $overwrite: false) {
|
|
110
|
-
$contexts: utils.map-merge-or-overwrite($contexts, $changes, $deep, $overwrite) !global;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/// Get a context by name
|
|
114
|
-
/// @param {String} $name Name of context
|
|
115
|
-
/// @return {Map}
|
|
116
|
-
|
|
117
|
-
@function get-context($name) {
|
|
118
|
-
@return utils.require-map-get($contexts, $name, 'context');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/// Get a context's value'
|
|
122
|
-
/// @param {String} $name Name of context
|
|
123
|
-
/// @param {String} $prop The property to get
|
|
124
|
-
/// @return {Color}
|
|
125
|
-
|
|
126
|
-
@function get-context-value($name, $prop) {
|
|
127
|
-
$context: get-context($name);
|
|
128
|
-
$value: map.get($context, $prop);
|
|
129
|
-
// Get from pallete by name
|
|
130
|
-
@if (meta.type-of($value) == "string") {
|
|
131
|
-
$value: get($value);
|
|
132
|
-
}
|
|
133
|
-
@return $value;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/// Prints contexts styles
|
|
137
|
-
/// @param {String} $name Name of context
|
|
138
|
-
|
|
139
|
-
@mixin context-styles($name) {
|
|
140
|
-
$context: get-context($name);
|
|
141
|
-
background-color: get-context-value($name, "background-color");
|
|
142
|
-
background: map.get($context, "background"); // Allow gradients/images
|
|
143
|
-
background-image: map.get($context, "background-image"); // Allow gradients/images
|
|
144
|
-
color: get-context-value($name, "color");
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/// Lighten a color using the default white by a percentage
|
|
148
|
-
/// @param {Color, String} $color Color/palette color name to apply to tint
|
|
149
|
-
/// @param {Number} $percentage Percentage
|
|
150
|
-
/// @return {Color}
|
|
151
|
-
/// @author
|
|
152
|
-
/// @link https://css-tricks.com/snippets/sass/tint-shade-functions/ Modified from source (CSS Tricks, Kitty Giraudel)
|
|
153
|
-
|
|
154
|
-
@function tint($color, $percentage) {
|
|
155
|
-
@return mix(get("white"), get($color), $percentage);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/// Darken a color with the default black by a percentage
|
|
159
|
-
/// @param {Color, String} $color Color/palette color name to shade
|
|
160
|
-
/// @param {Number} $percentage Percentage to shade
|
|
161
|
-
/// @return {Color}
|
|
162
|
-
/// @author Kitty Giraudel
|
|
163
|
-
/// @link https://css-tricks.com/snippets/sass/tint-shade-functions/ Modified from source (CSS Tricks, Kitty Giraudel)
|
|
164
|
-
|
|
165
|
-
@function shade($color, $percentage) {
|
|
166
|
-
@return mix(get("black"), get($color), $percentage);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/// Prints all context styles
|
|
170
|
-
/// @param {String} $with-prop Checks the specific context for a certain prop (has to be truthy)(used for output in helper/base color modules)
|
|
171
|
-
/// @example scss
|
|
172
|
-
/// @include ulu.all-context-styles();
|
|
173
|
-
/// @example raw Example of a color-context
|
|
174
|
-
/// <div class="color-context-dark" style="padding: 1rem">
|
|
175
|
-
//// Some text in dark context
|
|
176
|
-
//// </div>
|
|
177
|
-
@mixin all-context-styles($with-prop: null) {
|
|
178
|
-
$prefix: selector.class("color-context");
|
|
179
|
-
@each $name, $context in $contexts {
|
|
180
|
-
@if (not $with-prop or map.get($context, $with-prop)) {
|
|
181
|
-
#{ $prefix }-#{ $name } {
|
|
182
|
-
@include context-styles($name);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/// Outputs all color classes
|
|
189
|
-
/// @example scss
|
|
190
|
-
/// @include ulu.all-color-class-styles();
|
|
191
|
-
/// @example raw Example of a color-context
|
|
192
|
-
/// <span class="color-name">Some text</span>
|
|
193
|
-
@mixin all-color-class-styles() {
|
|
194
|
-
$prefix: selector.class("color");
|
|
195
|
-
@each $name, $output in $color-classes {
|
|
196
|
-
@if ($output) {
|
|
197
|
-
#{ $prefix }-#{ $name } {
|
|
198
|
-
color: get($name);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|