@madgex/design-system 1.59.3 → 1.60.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/coverage/cobertura-coverage.xml +10 -10
- package/coverage/components/accordion/accordion.js.html +1 -1
- package/coverage/components/accordion/index.html +1 -1
- package/coverage/components/inputs/combobox/combobox.js.html +1 -1
- package/coverage/components/inputs/combobox/index.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/index.html +1 -1
- package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
- package/coverage/components/inputs/file-upload/index.html +1 -1
- package/coverage/components/inputs/multi-select/index.html +1 -1
- package/coverage/components/inputs/multi-select/multi-select.js.html +1 -1
- package/coverage/components/inputs/multi-select/vue-components/MultiSelect.vue.html +31 -4
- package/coverage/components/inputs/multi-select/vue-components/MultiSelectCheckbox.vue.html +1 -1
- package/coverage/components/inputs/multi-select/vue-components/MultiSelectCheckboxGroup.vue.html +1 -1
- package/coverage/components/inputs/multi-select/vue-components/index.html +1 -1
- package/coverage/components/inputs/textarea/character-count.js.html +1 -1
- package/coverage/components/inputs/textarea/index.html +1 -1
- package/coverage/components/modal/index.html +1 -1
- package/coverage/components/modal/modal.js.html +1 -1
- package/coverage/components/notification/index.html +1 -1
- package/coverage/components/notification/notification.js.html +1 -1
- package/coverage/components/popover/index.html +1 -1
- package/coverage/components/popover/popover.js.html +1 -1
- package/coverage/components/switch-state/index.html +1 -1
- package/coverage/components/switch-state/switch-state.js.html +1 -1
- package/coverage/components/tabs/index.html +1 -1
- package/coverage/components/tabs/tabs.js.html +1 -1
- package/coverage/index.html +1 -1
- package/coverage/js/common.js.html +1 -1
- package/coverage/js/fractal-scripts/combobox.js.html +1 -1
- package/coverage/js/fractal-scripts/index.html +1 -1
- package/coverage/js/fractal-scripts/notification.js.html +1 -1
- package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
- package/coverage/js/index-fractal.js.html +1 -1
- package/coverage/js/index-polyfills.js.html +1 -1
- package/coverage/js/index-vue.js.html +1 -1
- package/coverage/js/index.html +1 -1
- package/coverage/js/index.js.html +1 -1
- package/coverage/js/polyfills/arrayPrototypeFind.js.html +1 -1
- package/coverage/js/polyfills/closest.js.html +1 -1
- package/coverage/js/polyfills/index.html +1 -1
- package/coverage/js/polyfills/objectAssign.js.html +1 -1
- package/coverage/js/polyfills/remove.js.html +1 -1
- package/coverage/tokens/_config.js.html +1 -1
- package/coverage/tokens/index.html +1 -1
- 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.json +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/index.js +5 -5
- package/package.json +1 -1
- package/src/components/inputs/file-upload/file-upload.scss +3 -3
- package/src/components/inputs/multi-select/_template.njk +6 -3
- package/src/components/inputs/multi-select/multi-select.config.js +12 -0
- package/src/components/inputs/multi-select/multi-select.scss +8 -0
- package/src/components/inputs/multi-select/vue-components/MultiSelect.vue +10 -1
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.js .mds-form-element--file-supported
|
|
65
|
+
.js .mds-form-element--file-supported.mds-file-upload__prompt {
|
|
66
66
|
display: flex;
|
|
67
67
|
align-items: center;
|
|
68
68
|
justify-content: center;
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
@include z-index;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.js .mds-form-element--file-supported
|
|
89
|
+
.js .mds-form-element--file-supported.mds-form-element--selected-file {
|
|
90
90
|
@include mq($from: $mds-size-breakpoint-md) {
|
|
91
91
|
width: 50%;
|
|
92
92
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.js .mds-form-element--file-supported
|
|
126
|
+
.js .mds-form-element--file-supported.mds-form-element--dragover {
|
|
127
127
|
& .mds-file-upload__input {
|
|
128
128
|
background-color: $mds-color-neutral-white;
|
|
129
129
|
}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
{% endif %}
|
|
17
17
|
{% endmacro %}
|
|
18
18
|
|
|
19
|
+
{% set maxBorderlessSize = 7 %}
|
|
20
|
+
|
|
19
21
|
<div class="mds-form-element mds-form-element--multiselect js-mds-multiselect{% if params.state %} mds-form-element--{{params.state}}{% endif %}" data-test="multiselect">
|
|
20
22
|
<fieldset>
|
|
21
23
|
{{ MdsInputLabel({
|
|
@@ -31,13 +33,14 @@
|
|
|
31
33
|
helpText: params.helpText,
|
|
32
34
|
validationError: params.validationError
|
|
33
35
|
}) }}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
{# This length check doesn't take into account the total including children since that was never required. If we need to do that down the line, we will need to rethink this #}
|
|
38
|
+
<div class="mds-form-element__fallback mds-multiselect{% if params.terms and params.terms.length < maxBorderlessSize %} mds-multiselect--borderless{% endif %}">
|
|
36
39
|
{{ MdsMultiSelectCheckboxGroup(params.terms, params.name) }}
|
|
37
40
|
</div>
|
|
38
41
|
|
|
39
42
|
{# Leave the custom element at the bottom so it has access to the above elements on render #}
|
|
40
|
-
<mds-multiselect name="{{params.name}}" labeltext="{{ params.labelText }}" optional="{{params.optional}}" iconpath="{{defaultIconPath}}"></mds-multiselect>
|
|
43
|
+
<mds-multiselect name="{{params.name}}" labeltext="{{ params.labelText }}" optional="{{params.optional}}" iconpath="{{defaultIconPath}}" maxborderlesssize="{{maxBorderlessSize}}"></mds-multiselect>
|
|
41
44
|
</fieldset>
|
|
42
45
|
</div>
|
|
43
46
|
|
|
@@ -147,5 +147,17 @@ module.exports = {
|
|
|
147
147
|
],
|
|
148
148
|
},
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
name: 'Less than 7 options',
|
|
152
|
+
context: {
|
|
153
|
+
name: 'Role',
|
|
154
|
+
terms: [
|
|
155
|
+
{ id: 7, label: 'Academic Pharmacist', terms: [] },
|
|
156
|
+
{ id: 1, label: 'Community Pharmacist', terms: [] },
|
|
157
|
+
{ id: 10, label: 'Dispensing Assistant', terms: [] },
|
|
158
|
+
{ id: 4, label: 'Hospital Pharmacist', selected: true, terms: [] },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
150
162
|
],
|
|
151
163
|
};
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
overflow-y: auto;
|
|
7
7
|
padding: $mds-size-baseline * 2;
|
|
8
8
|
|
|
9
|
+
&--borderless {
|
|
10
|
+
border-color: transparent;
|
|
11
|
+
min-height: 0;
|
|
12
|
+
max-height: initial;
|
|
13
|
+
padding-left: 0;
|
|
14
|
+
padding-right: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
&__checkbox {
|
|
10
18
|
margin-bottom: $mds-size-baseline;
|
|
11
19
|
& input {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
<!--This length check doesn't take into account the total including children since that was never required. If we need to do that down the line, we will need to rethink this-->
|
|
1
2
|
<template>
|
|
2
|
-
<div
|
|
3
|
+
<div
|
|
4
|
+
class="mds-multiselect"
|
|
5
|
+
:class="availableOptions.length < maxborderlesssize ? 'mds-multiselect--borderless' : ''"
|
|
6
|
+
:data-multiselect-id="name"
|
|
7
|
+
>
|
|
3
8
|
<MultiSelectCheckboxGroup :name="name" :options="availableOptions" :testId="`${name}-group`" />
|
|
4
9
|
</div>
|
|
5
10
|
</template>
|
|
@@ -29,6 +34,10 @@ export default {
|
|
|
29
34
|
type: String,
|
|
30
35
|
default: '/assets/icons.svg',
|
|
31
36
|
},
|
|
37
|
+
maxborderlesssize: {
|
|
38
|
+
type: Number,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
32
41
|
},
|
|
33
42
|
provide() {
|
|
34
43
|
return {
|