@ilo-org/styles 1.16.0 → 1.17.1
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/css/components/accordion.css +1 -1
- package/css/components/audioplayer.css +1 -1
- package/css/components/blockquote.css +1 -1
- package/css/components/callout.css +1 -1
- package/css/components/cardgroup.css +1 -1
- package/css/components/checkbox.css +1 -1
- package/css/components/contextmenu.css +1 -1
- package/css/components/datepicker.css +1 -1
- package/css/components/fieldset.css +1 -1
- package/css/components/file-upload.css +1 -1
- package/css/components/form.css +1 -1
- package/css/components/formcontrol.css +1 -1
- package/css/components/hero.css +1 -1
- package/css/components/herocard.css +1 -1
- package/css/components/image.css +1 -1
- package/css/components/input.css +1 -1
- package/css/components/link.css +1 -1
- package/css/components/list.css +1 -1
- package/css/components/logogrid.css +1 -1
- package/css/components/navigation.css +1 -1
- package/css/components/pagination.css +1 -1
- package/css/components/radio.css +1 -1
- package/css/components/richtext.css +1 -1
- package/css/components/searchfield.css +1 -1
- package/css/components/table.css +1 -1
- package/css/components/textarea.css +1 -1
- package/css/components/video.css +1 -1
- package/css/global.css.map +1 -1
- package/css/index.css +13 -25
- package/css/index.css.map +1 -1
- package/css/monorepo.css +13 -25
- package/css/monorepo.css.map +1 -1
- package/package.json +12 -9
- package/scss/_animation-mixins.scss +22 -0
- package/scss/_animations.scss +3 -19
- package/scss/_functions.scss +12 -6
- package/scss/_helpers.scss +12 -0
- package/scss/_mixins.scss +21 -8
- package/scss/components/_accordion.scss +2 -2
- package/scss/components/_audioplayer.scss +1 -1
- package/scss/components/_blockquote.scss +2 -2
- package/scss/components/_breadcrumb.scss +2 -2
- package/scss/components/_button.scss +3 -3
- package/scss/components/_callout.scss +2 -2
- package/scss/components/_card.scss +1 -1
- package/scss/components/_cardgroup.scss +1 -1
- package/scss/components/_checkbox.scss +1 -1
- package/scss/components/_container.scss +2 -2
- package/scss/components/_contextmenu.scss +1 -1
- package/scss/components/_datacard.scss +1 -1
- package/scss/components/_datepicker.scss +2 -1
- package/scss/components/_detailcard.scss +1 -1
- package/scss/components/_dropdown.scss +2 -2
- package/scss/components/_empty.scss +2 -2
- package/scss/components/_factlistcard.scss +1 -1
- package/scss/components/_featurecard.scss +1 -1
- package/scss/components/_fieldset.scss +1 -1
- package/scss/components/_file-upload.scss +1 -1
- package/scss/components/_footer.scss +2 -2
- package/scss/components/_form.scss +1 -1
- package/scss/components/_formcontrol.scss +1 -1
- package/scss/components/_hero.scss +1 -1
- package/scss/components/_herocard.scss +1 -1
- package/scss/components/_image.scss +1 -1
- package/scss/components/_input.scss +1 -1
- package/scss/components/_languagetoggle.scss +2 -2
- package/scss/components/_linklist.scss +2 -2
- package/scss/components/_list.scss +1 -1
- package/scss/components/_loading.scss +2 -2
- package/scss/components/_logogrid.scss +1 -1
- package/scss/components/_modal.scss +2 -2
- package/scss/components/_multilinkcard.scss +1 -1
- package/scss/components/_navigation.scss +208 -85
- package/scss/components/_notification.scss +5 -4
- package/scss/components/_pagination.scss +1 -1
- package/scss/components/_profile.scss +2 -2
- package/scss/components/_promocard.scss +1 -1
- package/scss/components/_radio.scss +1 -1
- package/scss/components/_readmore.scss +2 -2
- package/scss/components/_richtext.scss +3 -3
- package/scss/components/_scorecard.scss +1 -1
- package/scss/components/_searchfield.scss +1 -1
- package/scss/components/_socialmedia.scss +2 -2
- package/scss/components/_statcard.scss +1 -1
- package/scss/components/_status.scss +1 -1
- package/scss/components/_table.scss +25 -8
- package/scss/components/_tableofcontents.scss +1 -1
- package/scss/components/_tabs.scss +1 -1
- package/scss/components/_tag.scss +1 -1
- package/scss/components/_textarea.scss +1 -1
- package/scss/components/_textcard.scss +1 -1
- package/scss/components/_toggle.scss +1 -1
- package/scss/components/_tooltip.scss +1 -1
- package/scss/components/_video.scss +33 -16
- package/scss/components/navigation/_nav-compact.scss +2 -2
- package/scss/components/navigation/_nav-complex.scss +2 -2
- package/scss/components/navigation/_nav-main.scss +2 -2
- package/scss/components/navigation/internal/_nav-dropdown.scss +2 -2
- package/scss/components/navigation/internal/_nav-grid.scss +2 -2
- package/scss/components/navigation/internal/_nav-menu.scss +3 -3
- package/scss/components/navigation/internal/_nav-shared.scss +2 -2
- package/scss/components/navigation/internal/mobile/_nav-mobile-drawer.scss +2 -2
- package/scss/components/navigation/internal/mobile/_nav-mobile-menu.scss +2 -2
- package/scss/components/navigation/internal/mobile/_nav-mobile.scss +2 -2
- package/scss/components/photogallery/_expandable-caption.scss +2 -2
- package/scss/components/photogallery/_lightbox.scss +2 -2
- package/scss/components/photogallery/_lightboxgallery.scss +2 -2
- package/scss/components/photogallery/_photogallery-controls.scss +2 -2
- package/scss/components/photogallery/_photogallery-thumbnails.scss +2 -2
- package/scss/components/photogallery/_photogallery.scss +2 -2
- package/scss/theme/_breakpoints.scss +4 -3
- package/scss/theme/_foundation.scss +7 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/styles",
|
|
3
3
|
"description": "Styles for products using ILO's Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.17.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/international-labour-organization/designsystem.git",
|
|
@@ -37,25 +37,28 @@
|
|
|
37
37
|
},
|
|
38
38
|
"license": "Apache-2.0",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@ilo-org/
|
|
41
|
-
"@ilo-org/
|
|
40
|
+
"@ilo-org/fonts": "2.0.1",
|
|
41
|
+
"@ilo-org/icons": "2.4.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"cssnano": "^7.0.6",
|
|
45
|
-
"del": "^
|
|
46
|
-
"gulp": "^
|
|
45
|
+
"del": "^8.0.1",
|
|
46
|
+
"gulp": "^5.0.1",
|
|
47
47
|
"gulp-clean-css": "^4.3.0",
|
|
48
|
-
"gulp-postcss": "^
|
|
49
|
-
"gulp-rename": "^2.
|
|
50
|
-
"gulp-sass": "^
|
|
48
|
+
"gulp-postcss": "^10.0.0",
|
|
49
|
+
"gulp-rename": "^2.1.0",
|
|
50
|
+
"gulp-sass": "^6.0.1",
|
|
51
51
|
"gulp-sourcemaps": "^3.0.0",
|
|
52
|
-
"
|
|
52
|
+
"postcss": "^8.5.6",
|
|
53
|
+
"sass": "^1.62.1",
|
|
54
|
+
"vitest": "^2.0.5"
|
|
53
55
|
},
|
|
54
56
|
"scripts": {
|
|
55
57
|
"build:lib": "gulp",
|
|
56
58
|
"format": "prettier --check . --ignore-path ../../.prettierignore",
|
|
57
59
|
"format:fix": "prettier --write . --ignore-path ../../.prettierignore",
|
|
58
60
|
"lint": "eslint",
|
|
61
|
+
"test": "vitest",
|
|
59
62
|
"lint:fix": "eslint --fix"
|
|
60
63
|
}
|
|
61
64
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//*------------------------------------*\
|
|
2
|
+
// $ANIMATION MIXINS
|
|
3
|
+
//*------------------------------------*/
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
|
|
6
|
+
/// Applies the global transition to any transitionable property
|
|
7
|
+
/// @param {String} $properties - the name of the property on which to transition
|
|
8
|
+
/// @return {CSS} transition for the given properties
|
|
9
|
+
@mixin globaltransition($properties) {
|
|
10
|
+
transition-property: string.unquote($properties);
|
|
11
|
+
transition-duration: 150ms;
|
|
12
|
+
transition-timing-function: ease-out;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// Animation for loading skeletons
|
|
16
|
+
@mixin pulse-animation() {
|
|
17
|
+
animation-name: pulse;
|
|
18
|
+
animation-delay: 0.5s;
|
|
19
|
+
animation-duration: 2s;
|
|
20
|
+
animation-timing-function: ease-in-out;
|
|
21
|
+
animation-iteration-count: infinite;
|
|
22
|
+
}
|
package/scss/_animations.scss
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
/// Applies the global transition to any transitionable property
|
|
5
|
-
/// @param {String} $properties - the name of the property on which to transition
|
|
6
|
-
/// @return {CSS} transition for the given properties
|
|
7
|
-
@mixin globaltransition($properties) {
|
|
8
|
-
transition-property: unquote($properties);
|
|
9
|
-
transition-duration: 150ms;
|
|
10
|
-
transition-timing-function: ease-out;
|
|
11
|
-
}
|
|
1
|
+
// Animation mixins live in their own module so that consumers can use them
|
|
2
|
+
// without pulling in the keyframes below. Re-forwarded here for back-compat.
|
|
3
|
+
@forward "animation-mixins";
|
|
12
4
|
|
|
13
5
|
// ======================================
|
|
14
6
|
// Animation of empty gradient
|
|
@@ -37,14 +29,6 @@
|
|
|
37
29
|
// ======================================
|
|
38
30
|
// Animation for loading skeletons
|
|
39
31
|
// ======================================
|
|
40
|
-
@mixin pulse-animation() {
|
|
41
|
-
animation-name: pulse;
|
|
42
|
-
animation-delay: 0.5s;
|
|
43
|
-
animation-duration: 2s;
|
|
44
|
-
animation-timing-function: ease-in-out;
|
|
45
|
-
animation-iteration-count: infinite;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
32
|
@keyframes pulse {
|
|
49
33
|
0% {
|
|
50
34
|
opacity: 1;
|
package/scss/_functions.scss
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
@use "sass:string";
|
|
4
|
+
@use "sass:list";
|
|
1
5
|
@use "./config" as *;
|
|
2
6
|
|
|
3
7
|
//*------------------------------------*\
|
|
@@ -10,12 +14,12 @@
|
|
|
10
14
|
@use "sass:math";
|
|
11
15
|
|
|
12
16
|
@function str-replace($string: "", $search, $replace: "") {
|
|
13
|
-
@if type-of($string) ==string {
|
|
14
|
-
$index:
|
|
17
|
+
@if meta.type-of($string) ==string {
|
|
18
|
+
$index: string.index($string, $search);
|
|
15
19
|
@if $index {
|
|
16
|
-
@return
|
|
20
|
+
@return string.slice($string, 1, $index - 1) + $replace +
|
|
17
21
|
str-replace(
|
|
18
|
-
|
|
22
|
+
string.slice($string, $index + string.length($search)),
|
|
19
23
|
$search,
|
|
20
24
|
$replace
|
|
21
25
|
);
|
|
@@ -43,7 +47,7 @@
|
|
|
43
47
|
// @return {*} - value in rems, with $font-size-default as base
|
|
44
48
|
// ======================================
|
|
45
49
|
@function px-to-rem($px) {
|
|
46
|
-
@if index($px, "%") {
|
|
50
|
+
@if list.index($px, "%") {
|
|
47
51
|
@return $px;
|
|
48
52
|
} @else {
|
|
49
53
|
@return math.div(strip-units($px), strip-units($base-font-size)) * 1rem;
|
|
@@ -72,9 +76,11 @@
|
|
|
72
76
|
// Encode color strings
|
|
73
77
|
//
|
|
74
78
|
// Useful for using color variables with inline CSS SVGs
|
|
79
|
+
// @deprecated - will be removed in future versions
|
|
75
80
|
// =========================================
|
|
76
81
|
@function colortodataurlicon($name, $color) {
|
|
77
|
-
|
|
82
|
+
@warn "The function colortodataurlicon is deprecated and will be removed in future versions.";
|
|
83
|
+
$icon: map.get($icons, $name);
|
|
78
84
|
$fill: "currentColor";
|
|
79
85
|
$output: str-replace($icon, $fill, $color);
|
|
80
86
|
@return $output;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//*------------------------------------*\
|
|
2
|
+
// $HELPERS — public Sass API
|
|
3
|
+
// Functions and mixins only.
|
|
4
|
+
// Guaranteed to emit no CSS.
|
|
5
|
+
// Consumers reach this file as `@use "@ilo-org/styles/scss/helpers"` or,
|
|
6
|
+
// because @ilo-org/react & @ilo-org/twig republishes scss/ under styles/scss/, as
|
|
7
|
+
// `@use "@ilo-org/<package>/styles/scss/helpers"`.
|
|
8
|
+
//*------------------------------------*/
|
|
9
|
+
|
|
10
|
+
@forward "functions";
|
|
11
|
+
|
|
12
|
+
@forward "mixins" hide dataurlicon;
|
package/scss/_mixins.scss
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
//*------------------------------------*\
|
|
2
2
|
// $MIXINS
|
|
3
3
|
//*------------------------------------*/
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
@use "sass:map";
|
|
4
6
|
@use "icons" as *;
|
|
5
7
|
@use "functions" as *;
|
|
6
|
-
@use "
|
|
8
|
+
@use "animation-mixins" as *;
|
|
7
9
|
@use "theme/breakpoints" as *;
|
|
8
10
|
|
|
9
11
|
// ======================================
|
|
@@ -30,15 +32,15 @@
|
|
|
30
32
|
// ======================================
|
|
31
33
|
|
|
32
34
|
@mixin breakpoint($breakpoint, $max: false) {
|
|
33
|
-
@if map
|
|
35
|
+
@if map.has-key($breakpoints-foundation, $breakpoint) {
|
|
34
36
|
@if not $max {
|
|
35
|
-
@media screen and (min-width: map
|
|
37
|
+
@media screen and (min-width: map.get($breakpoints-foundation, $breakpoint)) {
|
|
36
38
|
@content;
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
@if $max {
|
|
41
|
-
@media screen and (max-width: #{map
|
|
43
|
+
@media screen and (max-width: #{map.get($breakpoints-foundation, $breakpoint) - 1px}) {
|
|
42
44
|
@content;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -47,10 +49,11 @@
|
|
|
47
49
|
|
|
48
50
|
// ======================================
|
|
49
51
|
// Data URL Icon
|
|
50
|
-
// @
|
|
52
|
+
// @deprecated - will be removed in future versions
|
|
51
53
|
// ======================================
|
|
52
54
|
|
|
53
55
|
@mixin dataurlicon($name, $color: $color-base-neutrals-black) {
|
|
56
|
+
@warn "ILO Design System: the dataurlicon mixin is deprecated and will be removed in future versions. Use the icon mixin instead";
|
|
54
57
|
background-image: url("#{colortodataurlicon($name, $color)}");
|
|
55
58
|
background-repeat: no-repeat;
|
|
56
59
|
}
|
|
@@ -59,13 +62,23 @@
|
|
|
59
62
|
// Icon
|
|
60
63
|
// ======================================
|
|
61
64
|
|
|
62
|
-
@mixin icon($name, $color: black) {
|
|
63
|
-
$icon: map
|
|
65
|
+
@mixin icon($name, $color: black, $size: null, $position: null) {
|
|
66
|
+
$icon: map.get($icons, $name);
|
|
64
67
|
mask-image: url("#{$icon}");
|
|
65
68
|
mask-repeat: no-repeat;
|
|
66
69
|
-webkit-mask-image: url("#{$icon}");
|
|
67
70
|
-webkit-mask-repeat: no-repeat;
|
|
68
71
|
background-color: $color;
|
|
72
|
+
|
|
73
|
+
@if $size {
|
|
74
|
+
mask-size: $size;
|
|
75
|
+
-webkit-mask-size: $size;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@if $position {
|
|
79
|
+
mask-position: $position;
|
|
80
|
+
-webkit-mask-position: $position;
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
|
|
71
84
|
// ======================================
|
|
@@ -288,7 +301,7 @@
|
|
|
288
301
|
"heading-4" or
|
|
289
302
|
$variant ==
|
|
290
303
|
"blockquote" or
|
|
291
|
-
|
|
304
|
+
string.index($variant, "highlight") !=
|
|
292
305
|
null
|
|
293
306
|
{
|
|
294
307
|
font-family: var(--ilo-fonts-display);
|