@sb1/ffe-accordion 8.1.5 → 8.2.0
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/less/accordion.less +104 -0
- package/less/ffe-accordion.less +2 -125
- package/less/theme.less +15 -0
- package/package.json +2 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
.ffe-accordion {
|
|
2
|
+
width: 100%;
|
|
3
|
+
border: 1px solid transparent;
|
|
4
|
+
font-family: var(--ffe-g-font);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ffe-accordion-item {
|
|
8
|
+
margin-bottom: @ffe-spacing-xs;
|
|
9
|
+
transition: margin-bottom @ffe-transition-duration @ffe-ease-in-out-back;
|
|
10
|
+
box-shadow: 0 1px 4px rgb(38 38 38 / 30%);
|
|
11
|
+
border-radius: 16px;
|
|
12
|
+
border: 2px solid transparent;
|
|
13
|
+
background-color: var(--ffe-v-accordion-secondary-color);
|
|
14
|
+
|
|
15
|
+
&__heading {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__heading-button {
|
|
20
|
+
width: 100%;
|
|
21
|
+
background: none;
|
|
22
|
+
border: none;
|
|
23
|
+
padding: @ffe-spacing-sm;
|
|
24
|
+
font-family: var(--ffe-g-font-heading-small);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
outline: none;
|
|
27
|
+
color: var(--ffe-v-accordion-primary-color);
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
.ffe-accordion-item__heading-icon {
|
|
31
|
+
transition: fill @ffe-transition-duration @ffe-ease;
|
|
32
|
+
fill: var(--ffe-v-accordion-secondary-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ffe-accordion-item__heading-icon-wrapper {
|
|
36
|
+
transition: background-color @ffe-transition-duration @ffe-ease;
|
|
37
|
+
background-color: var(--ffe-v-accordion-primary-color);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:focus-visible {
|
|
42
|
+
outline: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__heading-button-content {
|
|
47
|
+
text-align: start;
|
|
48
|
+
width: 100%;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
gap: @ffe-spacing-xs;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__heading-icon-wrapper {
|
|
56
|
+
line-height: 0;
|
|
57
|
+
border: 1px solid var(--ffe-v-accordion-primary-color);
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
padding: 11px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__heading-icon {
|
|
63
|
+
flex: 0 0 auto;
|
|
64
|
+
fill: var(--ffe-v-accordion-primary-color);
|
|
65
|
+
width: 11px;
|
|
66
|
+
height: 11px;
|
|
67
|
+
transition: transform @ffe-transition-duration @ffe-ease-in-out-back;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__body {
|
|
71
|
+
padding: @ffe-spacing-xs @ffe-spacing-sm @ffe-spacing-md;
|
|
72
|
+
color: var(--ffe-v-accordion-body-text-color);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--open {
|
|
76
|
+
&:not(:last-of-type) {
|
|
77
|
+
margin-bottom: @ffe-spacing-md;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ffe-accordion-item__heading-icon {
|
|
81
|
+
transform: rotateZ(180deg);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&--focus {
|
|
86
|
+
border-color: var(--ffe-v-accordion-focus-border-color);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.native & {
|
|
91
|
+
@media (prefers-color-scheme: dark) {
|
|
92
|
+
.ffe-accordion-item {
|
|
93
|
+
&:hover {
|
|
94
|
+
.ffe-accordion-item__heading-icon {
|
|
95
|
+
fill: var(--ffe-v-accordion-secondary-color);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ffe-accordion-item__heading-icon-wrapper {
|
|
99
|
+
background-color: var(--ffe-v-accordion-primary-color);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
package/less/ffe-accordion.less
CHANGED
|
@@ -1,125 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
border: 1px solid transparent;
|
|
4
|
-
font-family: 'SpareBank1-regular', 'MuseoSans-500', arial, sans-serif;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.ffe-accordion-item {
|
|
8
|
-
margin-bottom: @ffe-spacing-xs;
|
|
9
|
-
transition: margin-bottom @ffe-transition-duration @ffe-ease-in-out-back;
|
|
10
|
-
box-shadow: 0 1px 4px rgb(38 38 38 / 30%);
|
|
11
|
-
border-radius: 16px;
|
|
12
|
-
border: 2px solid transparent;
|
|
13
|
-
background-color: @ffe-farge-hvit;
|
|
14
|
-
|
|
15
|
-
&__heading {
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&__heading-button {
|
|
20
|
-
width: 100%;
|
|
21
|
-
background: none;
|
|
22
|
-
border: none;
|
|
23
|
-
padding: @ffe-spacing-sm;
|
|
24
|
-
font-family: 'SpareBank1-medium', 'MuseoSansRounded-700', arial,
|
|
25
|
-
sans-serif;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
outline: none;
|
|
28
|
-
color: @ffe-farge-vann;
|
|
29
|
-
|
|
30
|
-
&:hover {
|
|
31
|
-
.ffe-accordion-item__heading-icon {
|
|
32
|
-
transition: fill @ffe-transition-duration @ffe-ease;
|
|
33
|
-
fill: @ffe-farge-hvit;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.ffe-accordion-item__heading-icon-wrapper {
|
|
37
|
-
transition: background-color @ffe-transition-duration @ffe-ease;
|
|
38
|
-
background-color: @ffe-farge-vann;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&:focus-visible {
|
|
43
|
-
outline: none;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&__heading-button-content {
|
|
48
|
-
text-align: start;
|
|
49
|
-
width: 100%;
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: space-between;
|
|
53
|
-
gap: @ffe-spacing-xs;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&__heading-icon-wrapper {
|
|
57
|
-
line-height: 0;
|
|
58
|
-
border: 1px solid @ffe-farge-vann;
|
|
59
|
-
border-radius: 50%;
|
|
60
|
-
padding: 11px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__heading-icon {
|
|
64
|
-
flex: 0 0 auto;
|
|
65
|
-
fill: @ffe-farge-vann;
|
|
66
|
-
width: 11px;
|
|
67
|
-
height: 11px;
|
|
68
|
-
transition: transform @ffe-transition-duration @ffe-ease-in-out-back;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&__body {
|
|
72
|
-
padding: @ffe-spacing-xs @ffe-spacing-sm @ffe-spacing-md;
|
|
73
|
-
color: @ffe-farge-svart;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&--open {
|
|
77
|
-
&:not(:last-of-type) {
|
|
78
|
-
margin-bottom: @ffe-spacing-md;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.ffe-accordion-item__heading-icon {
|
|
82
|
-
transform: rotateZ(180deg);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&--focus {
|
|
87
|
-
border-color: @ffe-farge-vann;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.native & {
|
|
92
|
-
@media (prefers-color-scheme: dark) {
|
|
93
|
-
.ffe-accordion-item {
|
|
94
|
-
background-color: @ffe-farge-natt;
|
|
95
|
-
|
|
96
|
-
&__heading-button {
|
|
97
|
-
color: @ffe-farge-frost;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&__body {
|
|
101
|
-
color: @ffe-farge-hvit;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.ffe-accordion-item__heading-icon {
|
|
105
|
-
fill: @ffe-farge-frost;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.ffe-accordion-item__heading-icon-wrapper {
|
|
109
|
-
border-color: @ffe-farge-frost;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:hover {
|
|
113
|
-
border-color: @ffe-farge-hvit;
|
|
114
|
-
|
|
115
|
-
.ffe-accordion-item__heading-icon {
|
|
116
|
-
fill: @ffe-farge-frost;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.ffe-accordion-item__heading-icon-wrapper {
|
|
120
|
-
background-color: transparent;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
1
|
+
@import 'theme';
|
|
2
|
+
@import 'accordion';
|
package/less/theme.less
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--ffe-v-accordion-primary-color: var(--ffe-farge-vann);
|
|
3
|
+
--ffe-v-accordion-secondary-color: var(--ffe-farge-hvit);
|
|
4
|
+
--ffe-v-accordion-body-text-color: var(--ffe-farge-svart);
|
|
5
|
+
--ffe-v-accordion-focus-border-color: var(--ffe-farge-vann);
|
|
6
|
+
|
|
7
|
+
@media (prefers-color-scheme: dark) {
|
|
8
|
+
.native {
|
|
9
|
+
--ffe-v-accordion-primary-color: var(--ffe-farge-frost);
|
|
10
|
+
--ffe-v-accordion-secondary-color: var(--ffe-farge-natt);
|
|
11
|
+
--ffe-v-accordion-body-text-color: var(--ffe-farge-hvit);
|
|
12
|
+
--ffe-v-accordion-focus-border-color: var(--ffe-farge-hvit);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-accordion",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Accordion component for FFE.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "a4c974536f61a9005b17d159ea53c20d0d3f71a9"
|
|
29
29
|
}
|