@ministryofjustice/frontend 3.3.1 → 3.5.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/README.md +4 -10
- package/govuk-prototype-kit.config.json +5 -16
- package/moj/all.jquery.min.js +15 -4
- package/moj/all.js +2856 -2280
- package/moj/all.scss +2 -0
- package/moj/components/_all.scss +1 -0
- package/moj/components/action-bar/_action-bar.scss +4 -6
- package/moj/components/add-another/_add-another.scss +9 -7
- package/moj/components/add-another/add-another.js +128 -76
- package/moj/components/alert/README.md +0 -0
- package/moj/components/alert/_alert.scss +142 -0
- package/moj/components/alert/alert.js +482 -0
- package/moj/components/alert/alert.spec.helper.js +92 -0
- package/moj/components/alert/macro.njk +3 -0
- package/moj/components/alert/template.njk +83 -0
- package/moj/components/badge/_badge.scss +3 -4
- package/moj/components/banner/_banner.scss +5 -10
- package/moj/components/button-menu/_button-menu.scss +10 -9
- package/moj/components/button-menu/button-menu.js +348 -318
- package/moj/components/cookie-banner/_cookie-banner.scss +6 -5
- package/moj/components/currency-input/_currency-input.scss +4 -4
- package/moj/components/date-picker/README.md +14 -17
- package/moj/components/date-picker/_date-picker.scss +122 -106
- package/moj/components/date-picker/date-picker.js +927 -900
- package/moj/components/filter/README.md +1 -1
- package/moj/components/filter/_filter.scss +53 -75
- package/moj/components/filter-toggle-button/filter-toggle-button.js +122 -87
- package/moj/components/form-validator/form-validator.js +399 -156
- package/moj/components/header/_header.scss +17 -19
- package/moj/components/identity-bar/_identity-bar.scss +5 -5
- package/moj/components/interruption-card/_interruption-card.scss +2 -2
- package/moj/components/messages/_messages.scss +12 -19
- package/moj/components/multi-file-upload/README.md +1 -1
- package/moj/components/multi-file-upload/_multi-file-upload.scss +34 -30
- package/moj/components/multi-file-upload/multi-file-upload.js +454 -183
- package/moj/components/multi-select/_multi-select.scss +4 -3
- package/moj/components/multi-select/multi-select.js +106 -70
- package/moj/components/notification-badge/_notification-badge.scss +12 -12
- package/moj/components/organisation-switcher/_organisation-switcher.scss +1 -1
- package/moj/components/page-header-actions/_page-header-actions.scss +3 -2
- package/moj/components/pagination/_pagination.scss +26 -31
- package/moj/components/password-reveal/_password-reveal.scss +1 -2
- package/moj/components/password-reveal/password-reveal.js +63 -31
- package/moj/components/primary-navigation/_primary-navigation.scss +26 -29
- package/moj/components/progress-bar/_progress-bar.scss +21 -26
- package/moj/components/rich-text-editor/_rich-text-editor.scss +17 -16
- package/moj/components/rich-text-editor/rich-text-editor.js +186 -139
- package/moj/components/search/_search.scss +6 -4
- package/moj/components/search-toggle/search-toggle.js +83 -53
- package/moj/components/search-toggle/search-toggle.scss +21 -15
- package/moj/components/side-navigation/_side-navigation.scss +12 -21
- package/moj/components/sortable-table/_sortable-table.scss +25 -23
- package/moj/components/sortable-table/sortable-table.js +162 -119
- package/moj/components/sub-navigation/_sub-navigation.scss +24 -28
- package/moj/components/tag/_tag.scss +8 -9
- package/moj/components/task-list/_task-list.scss +8 -7
- package/moj/components/ticket-panel/_ticket-panel.scss +14 -6
- package/moj/components/timeline/_timeline.scss +18 -20
- package/moj/filters/all.js +28 -30
- package/moj/filters/prototype-kit-13-filters.js +2 -1
- package/moj/helpers/_all.scss +1 -0
- package/moj/helpers/_hidden.scss +1 -1
- package/moj/helpers/_links.scss +20 -0
- package/moj/helpers.js +218 -51
- package/moj/init.js +2 -2
- package/moj/moj-frontend.min.css +2 -2
- package/moj/moj-frontend.min.js +15 -4
- package/moj/objects/_filter-layout.scss +11 -10
- package/moj/objects/_scrollable-pane.scss +11 -14
- package/moj/settings/_colours.scss +5 -0
- package/moj/settings/_measurements.scss +0 -2
- package/moj/utilities/_hidden.scss +3 -3
- package/moj/utilities/_width-container.scss +1 -1
- package/moj/version.js +28 -1
- package/package.json +1 -1
- package/moj/all.spec.js +0 -22
- package/moj/components/button-menu/button-menu.spec.js +0 -361
- package/moj/components/date-picker/date-picker.spec.js +0 -1130
- package/moj/components/filter-toggle-button/filter-toggle-button.spec.js +0 -304
- package/moj/components/multi-select/multi-select.spec.js +0 -135
- package/moj/components/password-reveal/password-reveal.spec.js +0 -55
- package/moj/components/search-toggle/search-toggle.spec.js +0 -134
- package/moj/namespace.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
#Filters
|
|
1
|
+
#Filters
|
|
@@ -7,48 +7,48 @@
|
|
|
7
7
|
box-shadow: inset 0 0 0 1px govuk-colour("mid-grey");
|
|
8
8
|
|
|
9
9
|
&:focus {
|
|
10
|
-
box-shadow:
|
|
10
|
+
box-shadow:
|
|
11
|
+
0 -2px $govuk-focus-colour,
|
|
12
|
+
0 4px $govuk-focus-text-colour;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
|
|
15
16
|
.moj-filter__header {
|
|
17
|
+
padding: govuk-spacing(2) govuk-spacing(4);
|
|
16
18
|
background-color: govuk-colour("mid-grey");
|
|
17
19
|
font-size: 0; // Hide whitespace between elements
|
|
18
|
-
padding: govuk-spacing(2) govuk-spacing(4);
|
|
19
20
|
text-align: justify; // Trick to remove the need for floats
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
content:
|
|
22
|
+
&::after {
|
|
23
|
+
content: "";
|
|
23
24
|
display: inline-block;
|
|
24
25
|
width: 100%;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
[class^=govuk-heading-] {
|
|
28
|
+
[class^="govuk-heading-"] {
|
|
28
29
|
margin-bottom: 0;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
// JavaScript
|
|
35
34
|
.moj-filter__legend {
|
|
36
|
-
overflow: visible; // Override govuk to allow for focus style to be seen
|
|
37
35
|
width: 100%;
|
|
36
|
+
overflow: visible; // Override govuk to allow for focus style to be seen
|
|
38
37
|
|
|
39
38
|
button {
|
|
40
39
|
@include govuk-font($size: 24, $weight: bold);
|
|
41
|
-
|
|
40
|
+
appearance: none;
|
|
42
41
|
box-sizing: border-box;
|
|
43
|
-
border-radius: 0;
|
|
44
|
-
border: 0 none;
|
|
45
|
-
cursor: pointer; // Adam would not approve
|
|
46
42
|
display: block;
|
|
43
|
+
position: relative;
|
|
44
|
+
width: 100%;
|
|
47
45
|
margin: 0;
|
|
48
46
|
padding: 0;
|
|
49
|
-
|
|
47
|
+
border: 0 none;
|
|
48
|
+
border-radius: 0;
|
|
49
|
+
background-color: transparent;
|
|
50
50
|
text-align: left;
|
|
51
|
-
|
|
51
|
+
cursor: pointer; // Adam would not approve
|
|
52
52
|
-webkit-appearance: none;
|
|
53
53
|
|
|
54
54
|
// Fix unwanted button padding in Firefox
|
|
@@ -58,31 +58,24 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&::after {
|
|
61
|
-
background-image: url(#{$moj-images-path}icon-toggle-plus-minus.svg);
|
|
62
|
-
background-position: 0 0;
|
|
63
61
|
content: "";
|
|
64
62
|
display: block;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 50%;
|
|
65
|
+
right: 0;
|
|
66
|
+
width: 16px;
|
|
65
67
|
height: 16px;
|
|
66
68
|
margin-top: -8px; // Half the height of the icon
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&[aria-expanded="true"] {
|
|
72
|
-
&::after {
|
|
73
|
-
background-position: 16px 16px;
|
|
74
|
-
}
|
|
69
|
+
background-image: url(#{$moj-images-path}icon-toggle-plus-minus.svg);
|
|
70
|
+
background-position: 0 0;
|
|
75
71
|
}
|
|
76
72
|
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
&[aria-expanded="true"]::after {
|
|
74
|
+
background-position: 16px 16px;
|
|
79
75
|
}
|
|
80
|
-
|
|
81
76
|
}
|
|
82
|
-
|
|
83
77
|
}
|
|
84
78
|
|
|
85
|
-
|
|
86
79
|
.moj-filter__header-title,
|
|
87
80
|
.moj-filter__header-action {
|
|
88
81
|
display: inline-block;
|
|
@@ -90,24 +83,26 @@
|
|
|
90
83
|
vertical-align: middle;
|
|
91
84
|
}
|
|
92
85
|
|
|
93
|
-
|
|
94
86
|
.moj-filter__close {
|
|
87
|
+
@include govuk-font(19);
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding: 0;
|
|
90
|
+
border: none;
|
|
91
|
+
border-radius: 0;
|
|
95
92
|
// @include govuk-focusable;
|
|
96
93
|
color: govuk-colour("black");
|
|
97
|
-
cursor: pointer; // I know Adam won’t like this
|
|
98
94
|
background-color: transparent;
|
|
99
|
-
|
|
100
|
-
border-radius: 0;
|
|
101
|
-
margin: 0;
|
|
102
|
-
padding: 0;
|
|
95
|
+
cursor: pointer; // I know Adam won’t like this
|
|
103
96
|
-webkit-appearance: none;
|
|
104
|
-
|
|
97
|
+
appearance: none;
|
|
105
98
|
|
|
106
99
|
&:focus {
|
|
107
|
-
background-color: $govuk-focus-colour;
|
|
108
|
-
color: $govuk-focus-text-colour;
|
|
109
|
-
box-shadow: 0 -2px $govuk-focus-colour, 0 4px $govuk-focus-text-colour;
|
|
110
100
|
outline: none;
|
|
101
|
+
color: $govuk-focus-text-colour;
|
|
102
|
+
background-color: $govuk-focus-colour;
|
|
103
|
+
box-shadow:
|
|
104
|
+
0 -2px $govuk-focus-colour,
|
|
105
|
+
0 4px $govuk-focus-text-colour;
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
// Fix unwanted button padding in Firefox
|
|
@@ -117,50 +112,39 @@
|
|
|
117
112
|
}
|
|
118
113
|
|
|
119
114
|
&::before {
|
|
120
|
-
background-image: url(#{$moj-images-path}icon-close-cross-black.svg);
|
|
121
115
|
content: "";
|
|
122
116
|
display: inline-block;
|
|
123
|
-
height: 14px;
|
|
124
|
-
margin-right: govuk-spacing(1);
|
|
125
117
|
position: relative;
|
|
126
118
|
top: -1px; // Alignment tweak
|
|
127
|
-
vertical-align: middle;
|
|
128
119
|
width: 14px;
|
|
120
|
+
height: 14px;
|
|
121
|
+
margin-right: govuk-spacing(1);
|
|
122
|
+
background-image: url(#{$moj-images-path}icon-close-cross-black.svg);
|
|
123
|
+
vertical-align: middle;
|
|
129
124
|
}
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
.moj-filter__close {
|
|
135
|
-
@include govuk-font(19);
|
|
136
125
|
}
|
|
137
126
|
|
|
138
|
-
|
|
139
127
|
.moj-filter__selected {
|
|
128
|
+
padding: govuk-spacing(4);
|
|
140
129
|
background-color: govuk-colour("light-grey");
|
|
141
130
|
box-shadow: inset 0 0 0 1px govuk-colour("mid-grey");
|
|
142
|
-
padding: govuk-spacing(4);
|
|
143
131
|
|
|
144
132
|
ul:last-of-type {
|
|
145
133
|
margin-bottom: 0; // IE9 +
|
|
146
134
|
}
|
|
147
|
-
|
|
148
135
|
}
|
|
149
136
|
|
|
150
|
-
|
|
151
137
|
.moj-filter__selected-heading {
|
|
152
138
|
font-size: 0; // Hide whitespace between elements
|
|
153
139
|
text-align: justify; // Trick to remove the need for floats
|
|
154
140
|
|
|
155
|
-
|
|
156
|
-
content:
|
|
141
|
+
&::after {
|
|
142
|
+
content: "";
|
|
157
143
|
display: inline-block;
|
|
158
144
|
width: 100%;
|
|
159
145
|
}
|
|
160
|
-
|
|
161
146
|
}
|
|
162
147
|
|
|
163
|
-
|
|
164
148
|
.moj-filter__heading-title,
|
|
165
149
|
.moj-filter__heading-action {
|
|
166
150
|
@include govuk-font(16);
|
|
@@ -169,28 +153,25 @@
|
|
|
169
153
|
vertical-align: middle;
|
|
170
154
|
}
|
|
171
155
|
|
|
172
|
-
|
|
173
156
|
.moj-filter-tags {
|
|
174
|
-
font-size: 0;
|
|
175
157
|
margin-bottom: govuk-spacing(4); // Needs to adjust to 15px on mobile
|
|
176
158
|
padding-left: 0;
|
|
159
|
+
font-size: 0;
|
|
177
160
|
|
|
178
161
|
li {
|
|
179
162
|
display: inline-block;
|
|
180
163
|
margin-right: govuk-spacing(2);
|
|
181
164
|
}
|
|
182
|
-
|
|
183
165
|
}
|
|
184
166
|
|
|
185
|
-
|
|
186
167
|
.moj-filter__tag {
|
|
187
168
|
@include govuk-font(16);
|
|
188
|
-
background-color: govuk-colour("white");
|
|
189
|
-
border: 1px solid govuk-colour("black");
|
|
190
|
-
color: govuk-colour("black");
|
|
191
169
|
display: inline-block;
|
|
192
170
|
margin-top: govuk-spacing(1);
|
|
193
171
|
padding: govuk-spacing(1);
|
|
172
|
+
border: 1px solid govuk-colour("black");
|
|
173
|
+
color: govuk-colour("black");
|
|
174
|
+
background-color: govuk-colour("white");
|
|
194
175
|
text-decoration: none;
|
|
195
176
|
|
|
196
177
|
&:link,
|
|
@@ -204,35 +185,32 @@
|
|
|
204
185
|
}
|
|
205
186
|
|
|
206
187
|
&:hover {
|
|
207
|
-
background-color: govuk-colour("black");
|
|
208
188
|
color: govuk-colour("white");
|
|
189
|
+
background-color: govuk-colour("black");
|
|
209
190
|
}
|
|
210
191
|
|
|
211
|
-
|
|
212
|
-
background-image: url(#{$moj-images-path}icon-tag-remove-cross.svg);
|
|
192
|
+
&::after {
|
|
213
193
|
content: "";
|
|
214
194
|
display: inline-block;
|
|
215
|
-
|
|
195
|
+
width: 10px;
|
|
216
196
|
height: 10px;
|
|
217
197
|
margin-left: govuk-spacing(1);
|
|
198
|
+
background-image: url(#{$moj-images-path}icon-tag-remove-cross.svg);
|
|
199
|
+
font-weight: bold;
|
|
218
200
|
vertical-align: middle;
|
|
219
|
-
width: 10px;
|
|
220
201
|
}
|
|
221
202
|
|
|
222
|
-
&:hover
|
|
203
|
+
&:hover::after {
|
|
223
204
|
background-image: url(#{$moj-images-path}icon-tag-remove-cross-white.svg);
|
|
224
205
|
}
|
|
225
|
-
|
|
226
206
|
}
|
|
227
207
|
|
|
228
|
-
|
|
229
208
|
.moj-filter__options {
|
|
230
|
-
box-shadow: inset 0 0 0 1px govuk-colour("mid-grey");
|
|
231
209
|
margin-top: -1px;
|
|
232
210
|
padding: govuk-spacing(4);
|
|
211
|
+
box-shadow: inset 0 0 0 1px govuk-colour("mid-grey");
|
|
233
212
|
|
|
234
213
|
div:last-of-type {
|
|
235
214
|
margin-bottom: 0; // IE9 +
|
|
236
215
|
}
|
|
237
|
-
|
|
238
216
|
}
|
|
@@ -1,87 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MOJFrontend = factory());
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
|
+
|
|
7
|
+
function getDefaultExportFromCjs (x) {
|
|
8
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var _global_window_jQuery = window.jQuery;
|
|
12
|
+
|
|
13
|
+
var filterToggleButton$1;
|
|
14
|
+
var hasRequiredFilterToggleButton;
|
|
15
|
+
|
|
16
|
+
function requireFilterToggleButton () {
|
|
17
|
+
if (hasRequiredFilterToggleButton) return filterToggleButton$1;
|
|
18
|
+
hasRequiredFilterToggleButton = 1;
|
|
19
|
+
const $ = _global_window_jQuery;
|
|
20
|
+
|
|
21
|
+
function FilterToggleButton(options) {
|
|
22
|
+
this.options = options;
|
|
23
|
+
this.container = $(this.options.toggleButton.container);
|
|
24
|
+
this.filterContainer = $(this.options.filter.container);
|
|
25
|
+
|
|
26
|
+
this.createToggleButton();
|
|
27
|
+
this.setupResponsiveChecks();
|
|
28
|
+
this.filterContainer.attr('tabindex', '-1');
|
|
29
|
+
if (this.options.startHidden) {
|
|
30
|
+
this.hideMenu();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
FilterToggleButton.prototype.setupResponsiveChecks = function () {
|
|
35
|
+
this.mq = window.matchMedia(this.options.bigModeMediaQuery);
|
|
36
|
+
this.mq.addListener($.proxy(this, 'checkMode'));
|
|
37
|
+
this.checkMode(this.mq);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
FilterToggleButton.prototype.createToggleButton = function () {
|
|
41
|
+
this.menuButton = $(
|
|
42
|
+
`<button class="govuk-button ${this.options.toggleButton.classes}" type="button" aria-haspopup="true" aria-expanded="false">${this.options.toggleButton.showText}</button>`
|
|
43
|
+
);
|
|
44
|
+
this.menuButton.on('click', $.proxy(this, 'onMenuButtonClick'));
|
|
45
|
+
this.container.append(this.menuButton);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
FilterToggleButton.prototype.checkMode = function (mq) {
|
|
49
|
+
if (mq.matches) {
|
|
50
|
+
this.enableBigMode();
|
|
51
|
+
} else {
|
|
52
|
+
this.enableSmallMode();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
FilterToggleButton.prototype.enableBigMode = function () {
|
|
57
|
+
this.showMenu();
|
|
58
|
+
this.removeCloseButton();
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
FilterToggleButton.prototype.enableSmallMode = function () {
|
|
62
|
+
this.hideMenu();
|
|
63
|
+
this.addCloseButton();
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
FilterToggleButton.prototype.addCloseButton = function () {
|
|
67
|
+
if (this.options.closeButton) {
|
|
68
|
+
this.closeButton = $(
|
|
69
|
+
`<button class="moj-filter__close" type="button">${this.options.closeButton.text}</button>`
|
|
70
|
+
);
|
|
71
|
+
this.closeButton.on('click', $.proxy(this, 'onCloseClick'));
|
|
72
|
+
$(this.options.closeButton.container).append(this.closeButton);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
FilterToggleButton.prototype.onCloseClick = function () {
|
|
77
|
+
this.hideMenu();
|
|
78
|
+
this.menuButton.focus();
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
FilterToggleButton.prototype.removeCloseButton = function () {
|
|
82
|
+
if (this.closeButton) {
|
|
83
|
+
this.closeButton.remove();
|
|
84
|
+
this.closeButton = null;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
FilterToggleButton.prototype.hideMenu = function () {
|
|
89
|
+
this.menuButton.attr('aria-expanded', 'false');
|
|
90
|
+
this.filterContainer.addClass('moj-js-hidden');
|
|
91
|
+
this.menuButton.text(this.options.toggleButton.showText);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
FilterToggleButton.prototype.showMenu = function () {
|
|
95
|
+
this.menuButton.attr('aria-expanded', 'true');
|
|
96
|
+
this.filterContainer.removeClass('moj-js-hidden');
|
|
97
|
+
this.menuButton.text(this.options.toggleButton.hideText);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
FilterToggleButton.prototype.onMenuButtonClick = function () {
|
|
101
|
+
this.toggle();
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
FilterToggleButton.prototype.toggle = function () {
|
|
105
|
+
if (this.menuButton.attr('aria-expanded') === 'false') {
|
|
106
|
+
this.showMenu();
|
|
107
|
+
this.filterContainer.get(0).focus();
|
|
108
|
+
} else {
|
|
109
|
+
this.hideMenu();
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
filterToggleButton$1 = { FilterToggleButton };
|
|
114
|
+
return filterToggleButton$1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
var filterToggleButtonExports = requireFilterToggleButton();
|
|
118
|
+
var filterToggleButton = /*@__PURE__*/getDefaultExportFromCjs(filterToggleButtonExports);
|
|
119
|
+
|
|
120
|
+
return filterToggleButton;
|
|
121
|
+
|
|
122
|
+
}));
|