@madgex/design-system 5.4.0 → 5.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/dist/_tokens/css/_tokens.css +1 -1
- package/dist/_tokens/js/_tokens-module.js +1 -1
- package/dist/_tokens/scss/_tokens.scss +1 -1
- package/dist/assets/icons-inline.svg +1 -1
- package/dist/assets/icons.json +1 -1
- package/dist/assets/icons.svg +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/index-fractal.js +1 -1
- package/dist/js/index.js +1 -1
- package/package.json +2 -2
- package/src/components/_macro-index.njk +1 -0
- package/src/components/accordion/accordion.config.js +13 -0
- package/src/components/accordion/accordion.js +10 -3
- package/src/components/card/card.scss +0 -1
- package/src/components/inputs/text-editor/README.md +67 -0
- package/src/components/inputs/text-editor/_macro.njk +3 -0
- package/src/components/inputs/text-editor/_template.njk +35 -0
- package/src/components/inputs/text-editor/text-editor.config.js +46 -0
- package/src/components/inputs/text-editor/text-editor.njk +13 -0
- package/src/components/inputs/text-editor/text-editor.scss +52 -0
- package/src/icons/list-bullets.SVG +1 -0
- package/src/icons/list-numbers.SVG +1 -0
- package/src/icons/redo.SVG +1 -0
- package/src/icons/text-bold.SVG +1 -0
- package/src/icons/text-italic.SVG +1 -0
- package/src/icons/text-strike-through.SVG +1 -0
- package/src/icons/text-underline.SVG +1 -0
- package/src/icons/undo.SVG +1 -0
- package/src/js/fractal-scripts/combobox.js +12 -8
- package/src/scss/components/__index.scss +1 -0
|
@@ -100,5 +100,18 @@ module.exports = {
|
|
|
100
100
|
id: 'mobile',
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
name: 'Starts expanded',
|
|
105
|
+
context: {
|
|
106
|
+
name: 'Starts expanded',
|
|
107
|
+
triggerLabel: 'View more categories',
|
|
108
|
+
triggerLabelActive: 'View less categories',
|
|
109
|
+
triggerNoJsHidden: true,
|
|
110
|
+
isExpanded: true,
|
|
111
|
+
content:
|
|
112
|
+
'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ligula erat, dignissim non sollicitudin ut, sagittis a sapien. Quisque eget arcu sed nulla tincidunt eleifend. Maecenas sit amet velit elit. Maecenas elementum venenatis sapien sit amet elementum. Pellentesque id mauris quis tortor suscipit posuere. Donec eu consectetur tortor. Mauris id scelerisque quam. Sed scelerisque ut est quis sollicitudin. <a href="#">Etiam semper tempor erat</a>, sed rhoncus ex malesuada non. Donec eu pellentesque odio. Vestibulum et suscipit risus, luctus semper nunc. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam eu est ac libero blandit egestas ac id tellus. Suspendisse pulvinar viverra ex, a varius ligula commodo at. Vivamus dignissim neque vitae est ultrices lobortis. Cras vel pulvinar erat.</p>',
|
|
113
|
+
id: 'expanded',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
103
116
|
],
|
|
104
117
|
};
|
|
@@ -99,7 +99,7 @@ const accordion = {
|
|
|
99
99
|
|
|
100
100
|
const toggleEvent = (e) => {
|
|
101
101
|
e.preventDefault();
|
|
102
|
-
accordion.toggleExpand(accordionProperties,
|
|
102
|
+
accordion.toggleExpand(accordionProperties, toggleEvent, e);
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
triggerButton.addEventListener('click', toggleEvent);
|
|
@@ -169,8 +169,15 @@ const accordion = {
|
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
171
|
|
|
172
|
-
toggleExpand: ({ triggerContainer, accordionContent, isNonClosing, isContentFirst },
|
|
173
|
-
|
|
172
|
+
toggleExpand: ({ triggerContainer, accordionContent, isNonClosing, isContentFirst }, toggleEvent, event) => {
|
|
173
|
+
let triggerButton;
|
|
174
|
+
|
|
175
|
+
if (event) {
|
|
176
|
+
triggerButton = event.target.closest(`.${accordionTriggerButtonClass}`);
|
|
177
|
+
} else {
|
|
178
|
+
triggerButton = triggerContainer.querySelector(`.${accordionTriggerButtonClass}`);
|
|
179
|
+
}
|
|
180
|
+
|
|
174
181
|
const triggerButtonLabel = triggerButton.querySelector(`.${accordionTriggerLabelClass}`);
|
|
175
182
|
|
|
176
183
|
// If closed
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
## Parameters - Nunjucks
|
|
2
|
+
|
|
3
|
+
- `id`: the id of the editor **required**
|
|
4
|
+
- `menuButtons`: Array of objects to customise the toolbar of the editor. The objects should contain the id of the button and its label. If no array is passed, the editor will get all the buttons by default with their label in english **optional**,
|
|
5
|
+
Example:
|
|
6
|
+
```
|
|
7
|
+
menuButtons: [
|
|
8
|
+
{
|
|
9
|
+
id: 'bold',
|
|
10
|
+
label: 'Bold',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 'italic',
|
|
14
|
+
label: 'Italic',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
```
|
|
18
|
+
Buttons currently available:
|
|
19
|
+
- `bold`
|
|
20
|
+
- `italic`
|
|
21
|
+
- `strike`
|
|
22
|
+
- `bulletList`
|
|
23
|
+
- `orderedList`
|
|
24
|
+
- `undo`
|
|
25
|
+
- `redo`
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
- `value`: default value for the editor **optional**
|
|
29
|
+
- `i18n`: Text to translate/customise (object) **optional**
|
|
30
|
+
```
|
|
31
|
+
i18n: {
|
|
32
|
+
requiredIcon: 'required', // visually hidden text for the required icon
|
|
33
|
+
toolbarLabel: 'Text formatting', // label for the toolbar explaining what the toolbar is about (default: Text formatting)
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Parameters used for `MdsInputLabel` and `MdsInputMessages` macros:
|
|
38
|
+
- `labelText`: the text used in the label **required**
|
|
39
|
+
- `tooltipMessage`: Toggles a tooltip with this message to appear alongside the label **optional**
|
|
40
|
+
- `optional`: Is the input optional, otherwise required **optional**,
|
|
41
|
+
- `hideLabel`: true/false - Add this parameter if you need to visually hide the label **optional**
|
|
42
|
+
**(please see accessibility notes below regarding the use of this parameter)**
|
|
43
|
+
- `helpText`: Helper text to display under the label **optional**,
|
|
44
|
+
- `validationError`: The error message provided by validation **optional**,
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
The editor has a textarea as a fallback that gets removed from the DOM when the custom element is loaded.
|
|
49
|
+
|
|
50
|
+
A hidden input has been added to the custom element so it can be used to retrieved the data in a form.
|
|
51
|
+
|
|
52
|
+
## Accessibility
|
|
53
|
+
|
|
54
|
+
Avoid using `hideLabel`. Only hide the label when there can be no mistake as to what the input is for, probably when there is only one input in the form.
|
|
55
|
+
|
|
56
|
+
The editor is using a `toolbar` role for its menu.
|
|
57
|
+
The keyboard interation is as followed:
|
|
58
|
+
* Tab and Shift + Tab: Move focus into and out of the toolbar. When focus moves into a toolbar:
|
|
59
|
+
- If focus is moving into the toolbar for the first time, focus is set on the first control that is not disabled.
|
|
60
|
+
- If the toolbar has previously contained focus, focus is optionally set on the control that last had focus. Otherwise, it is set on the first control that is not disabled.
|
|
61
|
+
|
|
62
|
+
* Left Arrow and Up Arrow: Moves focus to the previous control.
|
|
63
|
+
* Right Arrow and Down Arrow: Moves focus to the next control.
|
|
64
|
+
|
|
65
|
+
Reference: https://w3c.github.io/aria-practices/#toolbar
|
|
66
|
+
|
|
67
|
+
The editable part of the editor has an `aria-labelledby` referencing the label.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{% from "../label/_macro.njk" import MdsInputLabel %}
|
|
2
|
+
{% from "../_message/_macro.njk" import MdsInputMessages %}
|
|
3
|
+
{% from "../../icons/_macro.njk" import MdsIcon %}
|
|
4
|
+
|
|
5
|
+
<div class="mds-form-element mds-form-element--text-editor{% if params.state %} mds-form-element--{{params.state}}{% endif %}{% if params.classes %} {{params.classes}}{% endif %}" id="{{ params.id }}-container" data-test="text-editor{% if params.id %}-{{params.id}}{% endif %}">
|
|
6
|
+
{{ MdsInputLabel({
|
|
7
|
+
id: "text-editor-label-" + params.id,
|
|
8
|
+
labelText: params.labelText,
|
|
9
|
+
hideLabel: params.hideLabel,
|
|
10
|
+
inputId: params.id,
|
|
11
|
+
optional: params.optional,
|
|
12
|
+
tooltipMessage: params.tooltipMessage,
|
|
13
|
+
i18n: params.i18n
|
|
14
|
+
}) }}
|
|
15
|
+
{{ MdsInputMessages({
|
|
16
|
+
id: params.id,
|
|
17
|
+
helpText: params.helpText,
|
|
18
|
+
validationError: params.validationError
|
|
19
|
+
}) }}
|
|
20
|
+
<textarea
|
|
21
|
+
class="mds-form-control"
|
|
22
|
+
name="{{ params.id }}"
|
|
23
|
+
id="text-editor-fallback-{{ params.id }}"
|
|
24
|
+
>{#
|
|
25
|
+
#}{% if params.value %}{{params.value}}{% endif %}{#
|
|
26
|
+
#}</textarea>
|
|
27
|
+
|
|
28
|
+
<mds-text-editor
|
|
29
|
+
editorid="{{ params.id }}"
|
|
30
|
+
iconpath="{{ defaultIconPath }}"
|
|
31
|
+
{%- if params.menuButtons %} menu-buttons="{{ params.menuButtons | dump }}"{% endif -%}
|
|
32
|
+
{%- if params.i18n %} i18n="{{ params.i18n | dump }}"{% endif -%}
|
|
33
|
+
{%- if params.value %} value="{{ params.value }}"{% endif -%}>
|
|
34
|
+
</mds-text-editor>
|
|
35
|
+
</div>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
title: 'Text Editor',
|
|
3
|
+
meta: { status: { njk: 'wip' } },
|
|
4
|
+
context: {
|
|
5
|
+
variantTitle: 'Default editor',
|
|
6
|
+
id: 'default-editor',
|
|
7
|
+
labelText: 'Write your job description',
|
|
8
|
+
i18n: {
|
|
9
|
+
requiredIcon: 'required',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
variants: [
|
|
13
|
+
{
|
|
14
|
+
name: 'Custom toolbar and translated editor',
|
|
15
|
+
context: {
|
|
16
|
+
variantTitle: 'Custom toolbar and translated editor',
|
|
17
|
+
id: 'custom-toolbar',
|
|
18
|
+
labelText: 'Ajouter un commentaire',
|
|
19
|
+
menuButtons: [
|
|
20
|
+
{
|
|
21
|
+
id: 'bold',
|
|
22
|
+
label: 'Gras',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'italic',
|
|
26
|
+
label: 'Italique',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
i18n: {
|
|
30
|
+
requiredIcon: 'obligatoire',
|
|
31
|
+
toolbarLabel: 'Mise en forme du texte',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Prefilled editor',
|
|
37
|
+
context: {
|
|
38
|
+
variantTitle: 'Prefilled editor',
|
|
39
|
+
id: 'prefilled-editor',
|
|
40
|
+
labelText: 'Add a job description',
|
|
41
|
+
value:
|
|
42
|
+
'<p>Lorem ipsum dolor sit amet, <strong>consectetur adipiscing</strong> elit.<br>Phasellus malesuada dui elit, at congue risus varius in.</p><p>Duis mollis <em>"lorem lectus"</em>, eget tincidunt dui dictum non.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% from "./inputs/text-editor/_macro.njk" import MdsTextEditor %}
|
|
2
|
+
|
|
3
|
+
<h2>{{ variantTitle }}</h2>
|
|
4
|
+
|
|
5
|
+
{{ MdsTextEditor({
|
|
6
|
+
id: id,
|
|
7
|
+
labelText: labelText,
|
|
8
|
+
menuButtons: menuButtons,
|
|
9
|
+
i18n: i18n,
|
|
10
|
+
value: value
|
|
11
|
+
}) }}
|
|
12
|
+
|
|
13
|
+
<div class="mds-margin-top-b10"></div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.mds-text-editor {
|
|
2
|
+
width: 100%;
|
|
3
|
+
border-radius: $mds-size-border-radius-base;
|
|
4
|
+
border: $mds-size-border-width-base solid $mds-color-input-border;
|
|
5
|
+
@extend .mds-font-body-copy;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mds-text-editor__menu {
|
|
9
|
+
border-bottom: $mds-size-border-width-base solid $mds-color-input-border;
|
|
10
|
+
padding: $mds-size-baseline;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.mds-text-editor__button {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
user-select: none;
|
|
16
|
+
-webkit-appearance: none;
|
|
17
|
+
width: auto;
|
|
18
|
+
border: $mds-size-border-width-base solid transparent;
|
|
19
|
+
@extend .mds-border-radius;
|
|
20
|
+
background: $mds-color-neutral-white;
|
|
21
|
+
padding: $mds-size-baseline ($mds-size-baseline * 2);
|
|
22
|
+
margin-right: $mds-size-baseline;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
text-align: center;
|
|
25
|
+
color: $mds-color-neutral-black;
|
|
26
|
+
|
|
27
|
+
&:hover,
|
|
28
|
+
&:focus,
|
|
29
|
+
&--active {
|
|
30
|
+
background: $mds-color-neutral-lighter;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--active {
|
|
34
|
+
border-color: $mds-color-neutral-black;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[aria-disabled="true"],
|
|
38
|
+
&[aria-disabled="true"]:hover {
|
|
39
|
+
color: $mds-color-input-disabled-label;
|
|
40
|
+
background: none;
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mds-text-editor__content {
|
|
46
|
+
padding: $mds-size-baseline * 3;
|
|
47
|
+
min-height: 150px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ProseMirror:focus {
|
|
51
|
+
outline: 0;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><g><circle cx="2.5" cy="4" r="2.5" fill="#000000"></circle><path d="M8.5,5H23a1,1,0,0,0,0-2H8.5a1,1,0,0,0,0,2Z" fill="#000000"></path><circle cx="2.5" cy="12" r="2.5" fill="#000000"></circle><path d="M23,11H8.5a1,1,0,0,0,0,2H23a1,1,0,0,0,0-2Z" fill="#000000"></path><circle cx="2.5" cy="20" r="2.5" fill="#000000"></circle><path d="M23,19H8.5a1,1,0,0,0,0,2H23a1,1,0,0,0,0-2Z" fill="#000000"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><g><path d="M7.75,4.5h15a1,1,0,0,0,0-2h-15a1,1,0,0,0,0,2Z" fill="#000000"></path><path d="M22.75,11h-15a1,1,0,0,0,0,2h15a1,1,0,0,0,0-2Z" fill="#000000"></path><path d="M22.75,19.5h-15a1,1,0,0,0,0,2h15a1,1,0,0,0,0-2Z" fill="#000000"></path><path d="M2.21,17.25A2,2,0,0,0,.28,18.73a.75.75,0,0,0,1.45.39.5.5,0,0,1,.48-.37.5.5,0,0,1,.5.5.5.5,0,0,1-.5.5.75.75,0,0,0,0,1.5.5.5,0,0,1,.5.5.5.5,0,0,1-1,.13.75.75,0,1,0-1.44.41,2,2,0,0,0,3.92-.54,1.94,1.94,0,0,0-.34-1.11.28.28,0,0,1,0-.28,1.94,1.94,0,0,0,.34-1.11A2,2,0,0,0,2.21,17.25Z" fill="#000000"></path><path d="M4.25,10.75a2,2,0,0,0-4,0A.76.76,0,0,0,1,11.5a.76.76,0,0,0,.75-.75.5.5,0,0,1,1,0,1,1,0,0,1-.23.64L.41,14a.76.76,0,0,0-.09.79.76.76,0,0,0,.68.43H3.5a.75.75,0,0,0,0-1.5H3.08a.25.25,0,0,1-.22-.14.24.24,0,0,1,0-.27l.81-1A2.59,2.59,0,0,0,4.25,10.75Z" fill="#000000"></path><path d="M4,5.25H3.75A.25.25,0,0,1,3.5,5V1.62A1.38,1.38,0,0,0,2.12.25H1.5a.75.75,0,0,0,0,1.5h.25A.25.25,0,0,1,2,2V5a.25.25,0,0,1-.25.25H1.5a.75.75,0,0,0,0,1.5H4a.75.75,0,0,0,0-1.5Z" fill="#000000"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><path d="M22.61.16a.51.51,0,0,0-.55.11L19.47,2.86a.24.24,0,0,1-.29.05,12.54,12.54,0,0,0-13,.86A12.25,12.25,0,0,0,6.1,23.63a1.25,1.25,0,0,0,.73.24,1.22,1.22,0,0,0,1-.51,1.25,1.25,0,0,0-.27-1.75,9.74,9.74,0,0,1,.1-15.8,10,10,0,0,1,9.46-1.1.26.26,0,0,1,.16.18.25.25,0,0,1-.07.22L15.37,7a.49.49,0,0,0-.11.55.5.5,0,0,0,.46.31h6.7a.51.51,0,0,0,.5-.5V.62A.51.51,0,0,0,22.61.16Z" fill="#000000"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><path d="M17.19,11A6.27,6.27,0,0,0,12.84.25H4.3a1.25,1.25,0,0,0,0,2.5h1A.25.25,0,0,1,5.56,3V21a.25.25,0,0,1-.25.25h-1a1.25,1.25,0,0,0,0,2.5h10A6.74,6.74,0,0,0,17.19,11ZM12.84,2.75a3.76,3.76,0,0,1,0,7.52H8.31A.25.25,0,0,1,8.06,10V3a.25.25,0,0,1,.25-.25Zm1.42,18.5H8.31A.25.25,0,0,1,8.06,21V13a.25.25,0,0,1,.25-.25h5.95a4.24,4.24,0,0,1,0,8.48Z" fill="#000000"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><path d="M22.5.25H14.86a1.25,1.25,0,0,0,0,2.5H16a.26.26,0,0,1,.22.13.25.25,0,0,1,0,.25L4.78,21a.5.5,0,0,1-.42.23H1.5a1.25,1.25,0,0,0,0,2.5H9.14a1.25,1.25,0,0,0,0-2.5H8.05a.26.26,0,0,1-.22-.13.27.27,0,0,1,0-.26L19.22,3a.5.5,0,0,1,.42-.23H22.5a1.25,1.25,0,0,0,0-2.5Z" fill="#000000"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><path d="M23.75,13A1.25,1.25,0,0,0,22.5,11.7H13.56a.49.49,0,0,1-.28-.09c-.72-.51-1.48-1-2.22-1.43C8.27,8.46,6.57,7.28,6.57,5.32c0-2.24,2.21-2.57,3.52-2.57a4.53,4.53,0,0,1,3.08.76,2.69,2.69,0,0,1,.45,2v.29a1.25,1.25,0,0,0,2.5,0V5.53A4.89,4.89,0,0,0,15,1.76C14,.74,12.36.25,10.09.25c-3.66,0-6,2-6,5.07,0,2.77,1.89,4.51,4,5.92a.26.26,0,0,1,.1.28.25.25,0,0,1-.24.18H1.5a1.25,1.25,0,0,0,0,2.5h11a.27.27,0,0,1,.16.06,4.36,4.36,0,0,1,1.93,3.47c0,3.26-3.43,3.52-4.48,3.52-1.81,0-3.14-.41-3.83-1.17a3.4,3.4,0,0,1-.65-2.71,1.25,1.25,0,1,0-2.49-.24A5.75,5.75,0,0,0,4.4,21.75c1.2,1.33,3.12,2,5.69,2,4.17,0,7-2.42,7-6a6,6,0,0,0-.85-3.15.23.23,0,0,1,0-.25.23.23,0,0,1,.21-.13H22.5A1.25,1.25,0,0,0,23.75,13Z" fill="#000000"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><g><path d="M22.5,21.25H1.5a1.25,1.25,0,0,0,0,2.5h21a1.25,1.25,0,0,0,0-2.5Z" fill="#000000"></path><path d="M2,2.75H3.34A.25.25,0,0,1,3.59,3v8.52a8.41,8.41,0,0,0,16.82,0V3a.25.25,0,0,1,.25-.25H22a1.25,1.25,0,0,0,0-2.5H16.3a1.25,1.25,0,0,0,0,2.5h1.36a.25.25,0,0,1,.25.25v8.52a5.91,5.91,0,0,1-11.82,0V3a.25.25,0,0,1,.25-.25H7.7a1.25,1.25,0,0,0,0-2.5H2a1.25,1.25,0,0,0,0,2.5Z" fill="#000000"></path></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><path d="M17.79,3.77a12.54,12.54,0,0,0-13-.86.24.24,0,0,1-.29-.05L1.94.27A.53.53,0,0,0,1.39.16a.51.51,0,0,0-.31.46v6.7a.51.51,0,0,0,.5.5h6.7a.5.5,0,0,0,.46-.31A.49.49,0,0,0,8.63,7L6.78,5.11a.22.22,0,0,1-.06-.22.23.23,0,0,1,.15-.18,9.94,9.94,0,0,1,9.46,1.1,9.74,9.74,0,0,1,.1,15.8,1.25,1.25,0,0,0-.27,1.75,1.22,1.22,0,0,0,1,.51,1.25,1.25,0,0,0,.73-.24,12.25,12.25,0,0,0-.11-19.86Z" fill="#000000"></path></svg>
|
|
@@ -28,20 +28,24 @@ function setSalaryHiddenField() {
|
|
|
28
28
|
const comboBoxEl = document.querySelector(`[data-combobox-id="salary-selection"] mds-combobox`);
|
|
29
29
|
const hiddenInputEl = document.querySelector('#salary-selection-hidden-input');
|
|
30
30
|
|
|
31
|
-
comboBoxEl
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
if (comboBoxEl && hiddenInputEl) {
|
|
32
|
+
comboBoxEl.addEventListener('select-option', () => {
|
|
33
|
+
console.log('Setting #salary-selection-hidden-input..');
|
|
34
|
+
hiddenInputEl.value = hiddenInputEl.value === 'flip' ? 'flop' : 'flip';
|
|
35
|
+
});
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
function clearSalaryHiddenField() {
|
|
38
40
|
const comboBoxEl = document.querySelector(`[data-combobox-id="salary-selection"] mds-combobox`);
|
|
39
41
|
const hiddenInputEl = document.querySelector('#salary-selection-hidden-input');
|
|
40
42
|
|
|
41
|
-
comboBoxEl
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
if (comboBoxEl && hiddenInputEl) {
|
|
44
|
+
comboBoxEl.addEventListener('clear-all', () => {
|
|
45
|
+
console.log('Clearing #salary-selection-hidden-input..');
|
|
46
|
+
hiddenInputEl.value = '';
|
|
47
|
+
});
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
function bindToApi() {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@import '../../components/inputs/file-upload/file-upload';
|
|
14
14
|
@import '../../components/inputs/textarea/textarea';
|
|
15
15
|
@import '../../components/inputs/checkbox-pill/checkbox-pill';
|
|
16
|
+
@import '../../components/inputs/text-editor/text-editor';
|
|
16
17
|
@import '../../components/modal/modal';
|
|
17
18
|
@import '../../components/skip-link/skip-link';
|
|
18
19
|
@import '../../components/inputs/input-number/input-number';
|