@internetstiftelsen/styleguide 5.1.14-beta.0.5 → 5.1.14
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 +1 -2
- package/src/app.scss +0 -1
- package/src/atoms/progress/_progress.scss +0 -28
- package/src/atoms/progress/progress.config.js +1 -2
- package/src/atoms/progress/progress.js +4 -9
- package/src/components.js +0 -1
- package/src/molecules/table/_table.scss +1 -1
- package/src/organisms/header/_header.scss +0 -1
- package/src/organisms/selectable/_selectable.scss +5 -60
- package/src/molecules/table-advanced/_table-advanced.scss +0 -14
- package/src/molecules/table-advanced/table-advanced.js +0 -44
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetstiftelsen/styleguide",
|
|
3
|
-
"version": "5.1.14
|
|
3
|
+
"version": "5.1.14",
|
|
4
4
|
"main": "dist/components.js",
|
|
5
5
|
"ports": {
|
|
6
6
|
"fractal": "3000"
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"@tiptap/extension-paragraph": "^3.4.4",
|
|
69
69
|
"@tiptap/extension-text": "^3.4.4",
|
|
70
70
|
"a11y-toggle": "^2.1.0",
|
|
71
|
-
"ag-grid-community": "^34.2.0",
|
|
72
71
|
"focus-trap": "^7.6.5",
|
|
73
72
|
"glider-js": "^1.7.9",
|
|
74
73
|
"lodash": "^4.17.21",
|
package/src/app.scss
CHANGED
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
@use 'molecules/form-control/form-control';
|
|
51
51
|
@use 'molecules/alert/alert';
|
|
52
52
|
@use 'molecules/table/table';
|
|
53
|
-
@use 'molecules/table-advanced/table-advanced';
|
|
54
53
|
@use 'molecules/system-error/system-error';
|
|
55
54
|
@use 'molecules/info-box/info-box';
|
|
56
55
|
@use 'molecules/share/share';
|
|
@@ -89,8 +89,6 @@
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
@include bem.m(heat) {
|
|
92
|
-
position: relative;
|
|
93
|
-
|
|
94
92
|
&[value]::-webkit-progress-value,
|
|
95
93
|
&[value]::-webkit-meter-optimum-value {
|
|
96
94
|
border-radius: 0;
|
|
@@ -106,21 +104,6 @@
|
|
|
106
104
|
background-size: var(--progressbar-width) 100%; /* The value is calculated by JS and set in the DOM */
|
|
107
105
|
background-repeat: no-repeat;
|
|
108
106
|
}
|
|
109
|
-
|
|
110
|
-
&::after {
|
|
111
|
-
position: absolute;
|
|
112
|
-
top: 50%;
|
|
113
|
-
left: var(--progressbar-width-percent);
|
|
114
|
-
content: attr(data-value) '%';
|
|
115
|
-
display: block;
|
|
116
|
-
color: colors.$color-cyberspace;
|
|
117
|
-
transform: translateX(-100%) translateY(-50%);
|
|
118
|
-
padding-right: func.rhythm(1);
|
|
119
|
-
color: colors.$color-snow;
|
|
120
|
-
text-shadow: 0 0 5px colors.$color-cyberspace;
|
|
121
|
-
font-size: var.$size-base * 1.2;
|
|
122
|
-
line-height: 1;
|
|
123
|
-
}
|
|
124
107
|
}
|
|
125
108
|
}
|
|
126
109
|
|
|
@@ -136,15 +119,4 @@
|
|
|
136
119
|
@include bem.m(large) {
|
|
137
120
|
font-size: var.$size-base * 1.5;
|
|
138
121
|
}
|
|
139
|
-
|
|
140
|
-
@include bem.m(hidden) {
|
|
141
|
-
span {
|
|
142
|
-
@include mixin.visuallyhidden;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
> progress,
|
|
146
|
-
> meter {
|
|
147
|
-
margin-left: 0;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
122
|
}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
const progressbars = document.querySelectorAll('[data-width-progress]')
|
|
1
|
+
const progressbars = document.querySelectorAll('[data-width-progress]')
|
|
2
2
|
|
|
3
|
-
if (progressbars
|
|
3
|
+
if (progressbars) {
|
|
4
4
|
function progressBarWidths() {
|
|
5
|
-
progressbars.forEach((container) => {
|
|
5
|
+
progressbars.forEach((container, index) => {
|
|
6
6
|
const width = container.offsetWidth;
|
|
7
|
-
|
|
8
|
-
const max = +container.getAttribute('max') || 100;
|
|
9
|
-
const percent = Math.round((value / max * 100) / 2) * 2;
|
|
10
|
-
|
|
11
|
-
document.documentElement.style.setProperty('--progressbar-width', width + 'px');
|
|
12
|
-
document.documentElement.style.setProperty('--progressbar-width-percent', percent + '%');
|
|
7
|
+
document.documentElement.style.setProperty(`--progressbar-width`, width + 'px');
|
|
13
8
|
});
|
|
14
9
|
}
|
|
15
10
|
|
package/src/components.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
@use "sass:color";
|
|
3
|
-
@use "sass:math";
|
|
4
3
|
@use '../../configurations/mixins' as mixin;
|
|
5
4
|
@use '../../configurations/extends';
|
|
6
5
|
@use '../../configurations/bem' as bem;
|
|
@@ -14,23 +13,10 @@
|
|
|
14
13
|
display: none;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
fieldset button {
|
|
18
|
-
margin-bottom: func.rhythm(1);
|
|
19
|
-
|
|
20
|
-
@include breakpoint.bp-up(md) {
|
|
21
|
-
margin-bottom: 0;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
16
|
@include bem.e(item) {
|
|
26
17
|
border-top: 1px solid colors.$color-concrete;
|
|
27
|
-
padding-top: func.rhythm(
|
|
28
|
-
margin-top: func.rhythm(
|
|
29
|
-
|
|
30
|
-
@include breakpoint.bp-up(lg) {
|
|
31
|
-
padding-top: func.rhythm(4);
|
|
32
|
-
margin-top: func.rhythm(3);
|
|
33
|
-
}
|
|
18
|
+
padding-top: func.rhythm(4);
|
|
19
|
+
margin-top: func.rhythm(3);
|
|
34
20
|
|
|
35
21
|
.js &:not(:first-child):not([aria-hidden]) {
|
|
36
22
|
display: none;
|
|
@@ -38,13 +24,10 @@
|
|
|
38
24
|
}
|
|
39
25
|
|
|
40
26
|
@include bem.m(padded) {
|
|
41
|
-
padding: func.rhythm(
|
|
27
|
+
padding: func.rhythm(1);
|
|
42
28
|
|
|
43
|
-
@include
|
|
44
|
-
|
|
45
|
-
padding-left: 0;
|
|
46
|
-
padding-right: 0;
|
|
47
|
-
}
|
|
29
|
+
@include breakpoint.bp-up(md) {
|
|
30
|
+
padding: func.rhythm(2);
|
|
48
31
|
}
|
|
49
32
|
}
|
|
50
33
|
|
|
@@ -59,42 +42,4 @@
|
|
|
59
42
|
@include bem.m(shadow-large) {
|
|
60
43
|
@include mixin.card-shadow(colors.$color-cyberspace, 0.2);
|
|
61
44
|
}
|
|
62
|
-
|
|
63
|
-
@include bem.m(article-indent) {
|
|
64
|
-
@include breakpoint.bp-up(lg) {
|
|
65
|
-
@include bem.e(item) {
|
|
66
|
-
> p:not(.preamble),
|
|
67
|
-
> h2,
|
|
68
|
-
> h3,
|
|
69
|
-
> h4,
|
|
70
|
-
> h5,
|
|
71
|
-
> h6,
|
|
72
|
-
> ul,
|
|
73
|
-
> ol,
|
|
74
|
-
> .wp-block-image > figure,
|
|
75
|
-
> figure,
|
|
76
|
-
> blockquote {
|
|
77
|
-
&:not(.alignfull):not(.alignleft):not(.alignright):not(.alignwide):not(.wp-block-iis-hero) {
|
|
78
|
-
max-width: 46.364%;
|
|
79
|
-
margin-right: math.div(var.$grid-gutter-width, 2);
|
|
80
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
> [class*='meta'] {
|
|
85
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
> p.preamble {
|
|
89
|
-
max-width: 46.364%;
|
|
90
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.wp-block-iis-info {
|
|
94
|
-
max-width: calc(46.364% + #{(var.$indent * 2)});
|
|
95
|
-
margin-left: calc(var.$indent * 2 - func.rhythm(2));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
45
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
@use '../../configurations/variables' as var;
|
|
3
|
-
|
|
4
|
-
body {
|
|
5
|
-
height: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:root {
|
|
9
|
-
--ag-header-font-family: 'Roboto Mono Regular', monospace;
|
|
10
|
-
--ag-font-family: 'HK Grotesk', sans-serif;
|
|
11
|
-
--ag-cell-font-family: 'HK Grotesk', sans-serif;
|
|
12
|
-
--ag-header-font-size: 15px;
|
|
13
|
-
--ag-font-size: 16px;
|
|
14
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as agGrid from "ag-grid-community";
|
|
2
|
-
import {
|
|
3
|
-
ModuleRegistry,
|
|
4
|
-
AllCommunityModule
|
|
5
|
-
} from 'ag-grid-community';
|
|
6
|
-
|
|
7
|
-
ModuleRegistry.registerModules([
|
|
8
|
-
AllCommunityModule,
|
|
9
|
-
]);
|
|
10
|
-
|
|
11
|
-
let gridApi;
|
|
12
|
-
|
|
13
|
-
const gridOptions = {
|
|
14
|
-
columnDefs: [
|
|
15
|
-
{ field: "athlete", width: 150 },
|
|
16
|
-
{ field: "age", width: 90 },
|
|
17
|
-
{ field: "country", width: 150 },
|
|
18
|
-
{ field: "year", width: 90 },
|
|
19
|
-
{ field: "date", width: 150 },
|
|
20
|
-
{ field: "sport", width: 150 },
|
|
21
|
-
{ field: "gold", width: 100 },
|
|
22
|
-
{ field: "silver", width: 100 },
|
|
23
|
-
{ field: "bronze", width: 100 },
|
|
24
|
-
{ field: "total", width: 100 },
|
|
25
|
-
],
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
(function fillLarge() {
|
|
29
|
-
setWidthAndHeight("100%");
|
|
30
|
-
})();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
function setWidthAndHeight(size) {
|
|
34
|
-
const eGridDiv = document.querySelector("#myGrid");
|
|
35
|
-
eGridDiv.style.setProperty("width", size);
|
|
36
|
-
eGridDiv.style.setProperty("height", size);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const gridDiv = document.querySelector("#myGrid");
|
|
40
|
-
gridApi = agGrid.createGrid(gridDiv, gridOptions);
|
|
41
|
-
|
|
42
|
-
fetch("https://www.ag-grid.com/example-assets/olympic-winners.json")
|
|
43
|
-
.then((response) => response.json())
|
|
44
|
-
.then((data) => gridApi.setGridOption("rowData", data));
|