@mozaic-ds/web-components 1.6.0 → 1.7.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/Condition20.js +1 -1
- package/dist/attributes.js +1 -1
- package/dist/branches.js +1 -1
- package/dist/branches.js.map +1 -1
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +2 -0
- package/dist/components/accordionlist/AccordionList.js +2 -2
- package/dist/components/accordionlistItem/AccordionListItem.js +2 -2
- package/dist/components/actionbottombar/ActionBottomBar.js +2 -2
- package/dist/components/actionlistbox/ActionListbox.js +2 -2
- package/dist/components/actionlistbox/ActionListbox.svelte +1 -1
- package/dist/components/actionlistboxitem/ActionListboxItem.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/builtinmenu/BuiltInMenu.js +2 -2
- package/dist/components/builtinmenuitem/BuiltInMenuItem.js +2 -2
- package/dist/components/button/Button.js +1 -1
- package/dist/components/callout/Callout.js +2 -2
- package/dist/components/carousel/Carousel.js +2 -2
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.js +1 -1
- package/dist/components/checklistmenu/CheckListMenu.js +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.js +2 -2
- package/dist/components/combobox/Combobox.js +4 -0
- package/dist/components/combobox/Combobox.js.map +1 -0
- package/dist/components/combobox/Combobox.spec.js +186 -0
- package/dist/components/combobox/Combobox.stories.d.ts +17 -0
- package/dist/components/combobox/Combobox.stories.d.ts.map +1 -0
- package/dist/components/combobox/Combobox.stories.js +126 -0
- package/dist/components/combobox/Combobox.svelte +415 -0
- package/dist/components/combobox/Combobox.svelte.d.ts +99 -0
- package/dist/components/combobox/Combobox.svelte.d.ts.map +1 -0
- package/dist/components/combobox/README.md +38 -0
- package/dist/components/container/Container.js +2 -2
- package/dist/components/datepicker/Datepicker.js +3 -3
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/Datepicker.svelte +2 -1
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/drawer/Drawer.js +4 -4
- package/dist/components/drawer/Drawer.svelte +2 -1
- package/dist/components/field/Field.js +1 -1
- package/dist/components/fileuploader/FileUploader.js +2 -2
- package/dist/components/fileuploader/FileUploader.js.map +1 -1
- package/dist/components/fileuploader/FileUploader.svelte +1 -4
- package/dist/components/fileuploaderitem/FileUploaderItem.js +3 -3
- package/dist/components/fileuploaderitem/FileUploaderItem.svelte +1 -4
- package/dist/components/flag/Flag.js +2 -2
- package/dist/components/iconbutton/IconButton.js +2 -2
- package/dist/components/kpiitem/KpiItem.js +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js +2 -2
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js +2 -2
- package/dist/components/link/Link.js +1 -1
- package/dist/components/loader/Loader.js +2 -2
- package/dist/components/loadingoverlay/LoadingOverlay.js +2 -2
- package/dist/components/loadingoverlay/LoadingOverlay.svelte +1 -1
- package/dist/components/modal/Modal.js +4 -4
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.spec.js +3 -1
- package/dist/components/modal/Modal.svelte +9 -3
- package/dist/components/modal/Modal.svelte.d.ts +4 -0
- package/dist/components/modal/Modal.svelte.d.ts.map +1 -1
- package/dist/components/modal/README.md +1 -0
- package/dist/components/navigationindicator/NavigationIndicator.js +2 -2
- package/dist/components/numberbadge/NumberBadge.js +2 -2
- package/dist/components/optionlistbox/OptionListbox.js +23 -0
- package/dist/components/optionlistbox/OptionListbox.js.map +1 -0
- package/dist/components/optionlistbox/OptionListbox.spec.js +350 -0
- package/dist/components/optionlistbox/OptionListbox.svelte +566 -0
- package/dist/components/optionlistbox/OptionListbox.svelte.d.ts +92 -0
- package/dist/components/optionlistbox/OptionListbox.svelte.d.ts.map +1 -0
- package/dist/components/optionlistbox/README.md +38 -0
- package/dist/components/overlay/Overlay.js +2 -2
- package/dist/components/overlay/Overlay.svelte +2 -2
- package/dist/components/pageheader/PageHeader.js +1 -1
- package/dist/components/pagination/Pagination.js +4 -4
- package/dist/components/passwordinput/PasswordInput.js +3 -3
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.svelte +2 -1
- package/dist/components/phonenumber/PhoneNumber.js +4 -4
- package/dist/components/phonenumber/PhoneNumber.js.map +1 -1
- package/dist/components/phonenumber/PhoneNumber.svelte +3 -2
- package/dist/components/pincode/Pincode.js +2 -2
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/quantityselector/QuantitySelector.js +2 -2
- package/dist/components/quantityselector/QuantitySelector.svelte +1 -1
- package/dist/components/radio/Radio.js +2 -2
- package/dist/components/radiogroup/RadioGroup.js +2 -2
- package/dist/components/segmentedcontrol/README.md +6 -3
- package/dist/components/segmentedcontrol/SegmentedControl.js +2 -2
- package/dist/components/segmentedcontrol/SegmentedControl.js.map +1 -1
- package/dist/components/segmentedcontrol/SegmentedControl.spec.js +60 -23
- package/dist/components/segmentedcontrol/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/components/segmentedcontrol/SegmentedControl.stories.js +6 -1
- package/dist/components/segmentedcontrol/SegmentedControl.svelte +23 -10
- package/dist/components/segmentedcontrol/SegmentedControl.svelte.d.ts +10 -3
- package/dist/components/segmentedcontrol/SegmentedControl.svelte.d.ts.map +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/sidebarexpandableitem/SidebarExpandableItem.js +2 -2
- package/dist/components/sidebarfooter/SidebarFooter.js +1 -1
- package/dist/components/sidebarfooter/_SidebarFooterMenu.js +2 -2
- package/dist/components/sidebarheader/SidebarHeader.js +1 -1
- package/dist/components/sidebarnavitem/SidebarNavItem.js +2 -2
- package/dist/components/sidebarshortcutitem/SidebarShortcutItem.js +1 -1
- package/dist/components/sidebarshortcuts/SidebarShortcuts.js +2 -2
- package/dist/components/starrating/StarRating.js +2 -2
- package/dist/components/statusbadge/StatusBadge.js +2 -2
- package/dist/components/statusdot/StatusDot.js +2 -2
- package/dist/components/statusmessage/StatusMessage.js +2 -2
- package/dist/components/statusmessage/StatusMessage.js.map +1 -1
- package/dist/components/statusmessage/StatusMessage.svelte +5 -0
- package/dist/components/statusnotification/StatusNotification.js +2 -2
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.svelte +5 -0
- package/dist/components/stepperbottombar/StepperBottomBar.js +1 -1
- package/dist/components/steppercompact/StepperCompact.js +2 -2
- package/dist/components/stepperinline/README.md +6 -2
- package/dist/components/stepperinline/StepperInline.js +2 -2
- package/dist/components/stepperinline/StepperInline.js.map +1 -1
- package/dist/components/stepperinline/StepperInline.spec.js +57 -23
- package/dist/components/stepperinline/StepperInline.stories.d.ts.map +1 -1
- package/dist/components/stepperinline/StepperInline.stories.js +6 -11
- package/dist/components/stepperinline/StepperInline.svelte +23 -10
- package/dist/components/stepperinline/StepperInline.svelte.d.ts +10 -2
- package/dist/components/stepperinline/StepperInline.svelte.d.ts.map +1 -1
- package/dist/components/stepperstacked/README.md +15 -0
- package/dist/components/stepperstacked/StepperStacked.js +18 -0
- package/dist/components/stepperstacked/StepperStacked.js.map +1 -0
- package/dist/components/stepperstacked/StepperStacked.spec.js +138 -0
- package/dist/components/stepperstacked/StepperStacked.stories.d.ts +8 -0
- package/dist/components/stepperstacked/StepperStacked.stories.d.ts.map +1 -0
- package/dist/components/stepperstacked/StepperStacked.stories.js +33 -0
- package/dist/components/stepperstacked/StepperStacked.svelte +214 -0
- package/dist/components/stepperstacked/StepperStacked.svelte.d.ts +35 -0
- package/dist/components/stepperstacked/StepperStacked.svelte.d.ts.map +1 -0
- package/dist/components/tab/README.md +1 -0
- package/dist/components/tab/Tab.js +2 -2
- package/dist/components/tab/Tab.js.map +1 -1
- package/dist/components/tab/Tab.svelte +17 -1
- package/dist/components/tab/Tab.svelte.d.ts +4 -0
- package/dist/components/tab/Tab.svelte.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/Tabs.stories.d.ts +1 -0
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +10 -0
- package/dist/components/tag/README.md +1 -0
- package/dist/components/tag/Tag.js +2 -2
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/tag/Tag.svelte +7 -0
- package/dist/components/tag/Tag.svelte.d.ts +4 -0
- package/dist/components/tag/Tag.svelte.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +2 -2
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/Textarea.svelte +1 -0
- package/dist/components/textinput/README.md +1 -0
- package/dist/components/textinput/Textinput.js +4 -4
- package/dist/components/textinput/Textinput.js.map +1 -1
- package/dist/components/textinput/Textinput.stories.d.ts.map +1 -1
- package/dist/components/textinput/Textinput.stories.js +1 -0
- package/dist/components/textinput/Textinput.svelte +5 -1
- package/dist/components/textinput/Textinput.svelte.d.ts +2 -1
- package/dist/components/textinput/Textinput.svelte.d.ts.map +1 -1
- package/dist/components/tile/Tile.js +1 -1
- package/dist/components/tileclickable/TileClickable.js +1 -1
- package/dist/components/tileexpandable/TileExpandable.js +1 -1
- package/dist/components/tileselectable/TileSelectable.js +2 -2
- package/dist/components/toaster/Toaster.js +3 -3
- package/dist/components/toaster/Toaster.js.map +1 -1
- package/dist/components/toaster/Toaster.svelte +6 -1
- package/dist/components/toggle/Toggle.js +1 -1
- package/dist/components/togglegroup/ToggleGroup.js +2 -2
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/custom-element.js +3 -3
- package/dist/custom-element.js.map +1 -1
- package/dist/documentation/DarkMode.mdx +115 -0
- package/dist/each.js +1 -1
- package/dist/each.js.map +1 -1
- package/dist/floating-item.svelte.js +1 -1
- package/dist/if.js +1 -1
- package/dist/if.js.map +1 -1
- package/dist/index-client.js +1 -1
- package/dist/input.js +1 -1
- package/dist/main.d.ts +3 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -1
- package/dist/svelte-component.js +1 -1
- package/dist/svelte-component.js.map +1 -1
- package/dist/svelte-element.js +1 -1
- package/dist/this.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
<svelte:options
|
|
2
|
+
customElement={{
|
|
3
|
+
tag: 'm-combobox',
|
|
4
|
+
props: {
|
|
5
|
+
multiple: { reflect: true, type: 'Boolean', attribute: 'multiple' },
|
|
6
|
+
compact: { reflect: true, type: 'Boolean', attribute: 'compact' },
|
|
7
|
+
disabled: { reflect: true, type: 'Boolean', attribute: 'disabled' },
|
|
8
|
+
readonly: { reflect: true, type: 'Boolean', attribute: 'readonly' },
|
|
9
|
+
invalid: { reflect: true, type: 'Boolean', attribute: 'invalid' },
|
|
10
|
+
clearable: { reflect: true, type: 'Boolean', attribute: 'clearable' },
|
|
11
|
+
search: { reflect: true, type: 'Boolean', attribute: 'search' },
|
|
12
|
+
actions: { reflect: true, type: 'Boolean', attribute: 'actions' },
|
|
13
|
+
checkablesections: { reflect: true, type: 'Boolean', attribute: 'checkablesections' },
|
|
14
|
+
},
|
|
15
|
+
}}
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { onDestroy } from 'svelte';
|
|
20
|
+
import OptionListbox, { type ListboxOption } from '../optionlistbox/OptionListbox.svelte';
|
|
21
|
+
import { ChevronDown24, CrossCircleFilled24 } from '@mozaic-ds/icons-svelte';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A combobox is an input field that allows users to select an option from a dropdown list or enter a custom value. It combines the functionality of a text input and a dropdown menu, providing flexibility and ease of use in forms and user interfaces.
|
|
25
|
+
* @slot optionPrefix - Use this slot to add a prefix to options.
|
|
26
|
+
* @event update:open {CustomEvent<boolean>} - Emitted when the listbox is opened or closed.
|
|
27
|
+
*/
|
|
28
|
+
interface Props {
|
|
29
|
+
/**
|
|
30
|
+
* The current selected value(s) of the combobox.
|
|
31
|
+
*/
|
|
32
|
+
value: string | number | null | (string | number)[];
|
|
33
|
+
/**
|
|
34
|
+
* Enable multiple value mode.
|
|
35
|
+
*/
|
|
36
|
+
multiple?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Size of the combobox: small ('s') or medium ('m').
|
|
39
|
+
*/
|
|
40
|
+
size?: 's' | 'm';
|
|
41
|
+
/**
|
|
42
|
+
* Disable the combobox input.
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Make the combobox read-only.
|
|
47
|
+
*/
|
|
48
|
+
readonly?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Mark the combobox as invalid.
|
|
51
|
+
*/
|
|
52
|
+
invalid?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Show a clear value button.
|
|
55
|
+
*/
|
|
56
|
+
clearable?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Enable the search input inside the listbox.
|
|
59
|
+
*/
|
|
60
|
+
search?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Show select all / clear buttons when multiple.
|
|
63
|
+
*/
|
|
64
|
+
actions?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Enable checkable section headers in the listbox.
|
|
67
|
+
*/
|
|
68
|
+
checkablesections?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Placeholder text when no value is selected.
|
|
71
|
+
*/
|
|
72
|
+
placeholder?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Label for the selected items counter.
|
|
75
|
+
*/
|
|
76
|
+
counterlabel?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Placeholder text for the search input.
|
|
79
|
+
*/
|
|
80
|
+
searchplaceholder?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Label for the "Select all" button.
|
|
83
|
+
*/
|
|
84
|
+
selectlabel?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Label for the "Clear value" button.
|
|
87
|
+
*/
|
|
88
|
+
clearlabel?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Array of options to display in the listbox.
|
|
91
|
+
*/
|
|
92
|
+
options: Array<ListboxOption>;
|
|
93
|
+
/**
|
|
94
|
+
* Callback to trigger when the listbox is opened or closed.
|
|
95
|
+
*/
|
|
96
|
+
onopen?: (value: boolean) => void;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let {
|
|
100
|
+
value = $bindable(),
|
|
101
|
+
multiple,
|
|
102
|
+
size = 'm',
|
|
103
|
+
disabled,
|
|
104
|
+
readonly,
|
|
105
|
+
invalid,
|
|
106
|
+
clearable,
|
|
107
|
+
search,
|
|
108
|
+
actions,
|
|
109
|
+
checkablesections,
|
|
110
|
+
placeholder = 'Select an option',
|
|
111
|
+
counterlabel = '99 selected',
|
|
112
|
+
searchplaceholder = 'Find an option...',
|
|
113
|
+
selectlabel = 'Select all',
|
|
114
|
+
clearlabel = 'Clear',
|
|
115
|
+
options,
|
|
116
|
+
onopen,
|
|
117
|
+
}: Props = $props();
|
|
118
|
+
|
|
119
|
+
const id = crypto.randomUUID();
|
|
120
|
+
|
|
121
|
+
let combobox: HTMLElement;
|
|
122
|
+
let listbox: InstanceType<typeof OptionListbox> | null = $state(null);
|
|
123
|
+
let listboxEl: HTMLElement | null | undefined = $state(null);
|
|
124
|
+
let comboboxControl: HTMLElement;
|
|
125
|
+
|
|
126
|
+
let isOpen = $state(false);
|
|
127
|
+
|
|
128
|
+
let activeIndex = $state(-1);
|
|
129
|
+
|
|
130
|
+
const activeDescendantId = $derived.by(() => {
|
|
131
|
+
return activeIndex >= 0 ? `option-${id}-${activeIndex}` : undefined;
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const selectionLabel = $derived.by(() => {
|
|
135
|
+
if (Array.isArray(value)) {
|
|
136
|
+
if (!value.length) return placeholder;
|
|
137
|
+
return (value as (string | number)[]).join(', ');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return options.find((option) => option.value === value)?.label || placeholder;
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const hasValue = $derived.by(() =>
|
|
144
|
+
multiple ? !!(value as (string | number)[]).length : !!value,
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
function handleClickOutside(event: MouseEvent) {
|
|
148
|
+
const path = event.composedPath ? event.composedPath() : [];
|
|
149
|
+
if (!path.includes(combobox) && !path.includes(listboxEl!)) {
|
|
150
|
+
close();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function open() {
|
|
155
|
+
isOpen = true;
|
|
156
|
+
handleOpen();
|
|
157
|
+
document.addEventListener('click', handleClickOutside);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function close() {
|
|
161
|
+
isOpen = false;
|
|
162
|
+
handleOpen();
|
|
163
|
+
document.removeEventListener('click', handleClickOutside);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function toggleListbox() {
|
|
167
|
+
return isOpen ? close() : open();
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function handleOpen() {
|
|
171
|
+
onopen?.(isOpen);
|
|
172
|
+
|
|
173
|
+
combobox.dispatchEvent(new CustomEvent('update:open', { bubbles: true, composed: true }));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
onDestroy(() => {
|
|
177
|
+
document.removeEventListener('click', handleClickOutside);
|
|
178
|
+
});
|
|
179
|
+
</script>
|
|
180
|
+
|
|
181
|
+
<div
|
|
182
|
+
bind:this={combobox}
|
|
183
|
+
class={{
|
|
184
|
+
'mc-combobox': true,
|
|
185
|
+
'mc-combobox--open': isOpen,
|
|
186
|
+
'mc-combobox--multiple': multiple,
|
|
187
|
+
'mc-combobox--invalid': invalid,
|
|
188
|
+
'mc-combobox--s': size === 's',
|
|
189
|
+
'mc-combobox--disabled': disabled,
|
|
190
|
+
'mc-combobox--readonly': readonly,
|
|
191
|
+
}}
|
|
192
|
+
>
|
|
193
|
+
<div class="mc-combobox__input">
|
|
194
|
+
<button
|
|
195
|
+
bind:this={comboboxControl}
|
|
196
|
+
aria-expanded={isOpen}
|
|
197
|
+
aria-haspopup="listbox"
|
|
198
|
+
aria-controls={`listbox-${id}`}
|
|
199
|
+
{disabled}
|
|
200
|
+
class="mc-combobox__control"
|
|
201
|
+
aria-label="Combobox input"
|
|
202
|
+
onclick={toggleListbox}
|
|
203
|
+
{...search
|
|
204
|
+
? {}
|
|
205
|
+
: {
|
|
206
|
+
role: 'combobox',
|
|
207
|
+
'aria-activedescendant': activeDescendantId,
|
|
208
|
+
onkeydown: listbox?.handleKeydown,
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
211
|
+
{selectionLabel}
|
|
212
|
+
</button>
|
|
213
|
+
{#if multiple}
|
|
214
|
+
<span class="mc-combobox__counter">
|
|
215
|
+
{counterlabel}
|
|
216
|
+
</span>
|
|
217
|
+
{/if}
|
|
218
|
+
|
|
219
|
+
{#if clearable && hasValue}
|
|
220
|
+
<button
|
|
221
|
+
type="button"
|
|
222
|
+
class="mc-combobox__clear"
|
|
223
|
+
aria-label="Clear value"
|
|
224
|
+
onclick={() => listbox?.clearSelection()}
|
|
225
|
+
>
|
|
226
|
+
<CrossCircleFilled24 />
|
|
227
|
+
</button>
|
|
228
|
+
{/if}
|
|
229
|
+
|
|
230
|
+
<button
|
|
231
|
+
type="button"
|
|
232
|
+
tabindex={-1}
|
|
233
|
+
class="mc-combobox__icon"
|
|
234
|
+
aria-label="Expand options list"
|
|
235
|
+
onclick={toggleListbox}
|
|
236
|
+
>
|
|
237
|
+
<ChevronDown24 />
|
|
238
|
+
</button>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div class="mc-combobox__listbox">
|
|
242
|
+
<OptionListbox
|
|
243
|
+
bind:this={listbox}
|
|
244
|
+
bind:element={listboxEl}
|
|
245
|
+
bind:value
|
|
246
|
+
{id}
|
|
247
|
+
open={isOpen}
|
|
248
|
+
{multiple}
|
|
249
|
+
{search}
|
|
250
|
+
{actions}
|
|
251
|
+
{checkablesections}
|
|
252
|
+
{searchplaceholder}
|
|
253
|
+
{selectlabel}
|
|
254
|
+
{clearlabel}
|
|
255
|
+
{options}
|
|
256
|
+
activeindex={activeIndex}
|
|
257
|
+
onopen={open}
|
|
258
|
+
onclose={() => {
|
|
259
|
+
close();
|
|
260
|
+
comboboxControl?.focus();
|
|
261
|
+
}}
|
|
262
|
+
>
|
|
263
|
+
<slot name="optionPrefix" slot="optionPrefix" />
|
|
264
|
+
</OptionListbox>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<style>/**
|
|
269
|
+
* Do not edit directly, this file was auto-generated.
|
|
270
|
+
*/
|
|
271
|
+
.mc-combobox {
|
|
272
|
+
position: relative;
|
|
273
|
+
width: 18.75rem;
|
|
274
|
+
}
|
|
275
|
+
.mc-combobox__input {
|
|
276
|
+
transition: box-shadow 200ms ease;
|
|
277
|
+
background-color: var(--forms-color-background-default, #ffffff);
|
|
278
|
+
border: var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);
|
|
279
|
+
border-radius: var(--forms-border-radius, 0.25rem);
|
|
280
|
+
transition: all ease 200ms;
|
|
281
|
+
color: var(--forms-color-text-default, #000000);
|
|
282
|
+
display: block;
|
|
283
|
+
width: 100%;
|
|
284
|
+
display: flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
gap: 0.5rem;
|
|
287
|
+
box-sizing: border-box;
|
|
288
|
+
}
|
|
289
|
+
.mc-combobox__input:focus-within {
|
|
290
|
+
box-shadow: 0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));
|
|
291
|
+
outline: 0.125rem solid transparent;
|
|
292
|
+
outline-offset: 0.125rem;
|
|
293
|
+
}
|
|
294
|
+
.mc-combobox__input:hover:not(:focus-within) {
|
|
295
|
+
border-color: var(--forms-color-border-hover, #4d4d4d);
|
|
296
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-hover, #4d4d4d);
|
|
297
|
+
}
|
|
298
|
+
.mc-combobox__input:has(.mc-combobox__control:disabled) {
|
|
299
|
+
background-color: var(--forms-color-background-disabled, #d9d9d9);
|
|
300
|
+
cursor: not-allowed;
|
|
301
|
+
border-color: transparent;
|
|
302
|
+
box-shadow: none;
|
|
303
|
+
color: var(--forms-color-text-disabled, #737373);
|
|
304
|
+
pointer-events: none;
|
|
305
|
+
}
|
|
306
|
+
.mc-combobox__input .mc-combobox__control {
|
|
307
|
+
text-align: left;
|
|
308
|
+
font-size: var(--font-size-150, 1rem);
|
|
309
|
+
font-weight: var(--font-weight-regular, 400);
|
|
310
|
+
color: var(--forms-color-text-default, #000000);
|
|
311
|
+
background-color: transparent;
|
|
312
|
+
border: none;
|
|
313
|
+
padding-left: 0.75rem;
|
|
314
|
+
padding-right: 0;
|
|
315
|
+
flex-grow: 1;
|
|
316
|
+
height: 3rem;
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
overflow: hidden;
|
|
319
|
+
text-overflow: ellipsis;
|
|
320
|
+
white-space: nowrap;
|
|
321
|
+
}
|
|
322
|
+
.mc-combobox__input .mc-combobox__control:focus-within {
|
|
323
|
+
outline: none;
|
|
324
|
+
}
|
|
325
|
+
.mc-combobox__icon {
|
|
326
|
+
border: none;
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
cursor: pointer;
|
|
330
|
+
padding-right: 0.75rem;
|
|
331
|
+
background: none;
|
|
332
|
+
color: var(--forms-color-icon-interactive, #000000);
|
|
333
|
+
fill: currentcolor;
|
|
334
|
+
}
|
|
335
|
+
.mc-combobox__clear {
|
|
336
|
+
padding: 0;
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
justify-content: center;
|
|
340
|
+
border: none;
|
|
341
|
+
background: none;
|
|
342
|
+
cursor: pointer;
|
|
343
|
+
color: var(--forms-color-icon-clear, #666666);
|
|
344
|
+
fill: currentcolor;
|
|
345
|
+
}
|
|
346
|
+
.mc-combobox__counter {
|
|
347
|
+
height: 1.5rem;
|
|
348
|
+
display: flex;
|
|
349
|
+
flex-shrink: 0;
|
|
350
|
+
align-items: center;
|
|
351
|
+
justify-content: center;
|
|
352
|
+
padding: 0 0.5rem;
|
|
353
|
+
border-radius: var(--border-radius-l, 1rem);
|
|
354
|
+
background-color: var(--forms-color-selection-counter-background, #464e63);
|
|
355
|
+
font-weight: var(--font-weight-regular, 400);
|
|
356
|
+
font-size: var(--font-size-50, 0.75rem);
|
|
357
|
+
line-height: var(--line-height-s, 1.3);
|
|
358
|
+
color: var(--forms-color-selection-counter-text, #ffffff);
|
|
359
|
+
}
|
|
360
|
+
.mc-combobox__listbox {
|
|
361
|
+
position: absolute;
|
|
362
|
+
left: 0;
|
|
363
|
+
top: calc(100% + 0.25rem);
|
|
364
|
+
visibility: hidden;
|
|
365
|
+
opacity: 0;
|
|
366
|
+
box-shadow: var(--shadow-bottom-s-x, 0px) var(--shadow-bottom-s-y, 5px) var(--shadow-bottom-s-blur, 10px) var(--shadow-bottom-s-spread, -2px) rgba(0, 0, 0, var(--shadow-bottom-s-opacity, 20%));
|
|
367
|
+
border: var(--border-width-s, 0.0625rem) solid var(--color-border-primary, #cccccc);
|
|
368
|
+
border-radius: var(--border-radius-m, 0.5rem);
|
|
369
|
+
width: 100%;
|
|
370
|
+
z-index: 10;
|
|
371
|
+
background-color: var(--color-background-primary, #ffffff);
|
|
372
|
+
pointer-events: all;
|
|
373
|
+
}
|
|
374
|
+
.mc-combobox--open .mc-combobox__listbox {
|
|
375
|
+
visibility: visible;
|
|
376
|
+
opacity: 1;
|
|
377
|
+
}
|
|
378
|
+
.mc-combobox--s .mc-combobox__control {
|
|
379
|
+
height: 2rem;
|
|
380
|
+
font-size: var(--font-size-100, 0.875rem);
|
|
381
|
+
padding-left: 0.5rem;
|
|
382
|
+
}
|
|
383
|
+
.mc-combobox--s .mc-combobox__icon {
|
|
384
|
+
padding-right: 0.5rem;
|
|
385
|
+
}
|
|
386
|
+
.mc-combobox--s .mc-combobox__clear {
|
|
387
|
+
width: 1.25rem;
|
|
388
|
+
height: 1.25rem;
|
|
389
|
+
}
|
|
390
|
+
.mc-combobox--invalid .mc-combobox__input {
|
|
391
|
+
border-color: var(--forms-color-border-invalid, #ea302d);
|
|
392
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);
|
|
393
|
+
}
|
|
394
|
+
.mc-combobox--invalid .mc-combobox__input:hover:not(:focus-within) {
|
|
395
|
+
border-color: var(--forms-color-border-invalid-hover, #c61112);
|
|
396
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);
|
|
397
|
+
}
|
|
398
|
+
.mc-combobox--disabled .mc-combobox__input {
|
|
399
|
+
background-color: var(--forms-color-background-disabled, #d9d9d9);
|
|
400
|
+
cursor: not-allowed;
|
|
401
|
+
border-color: transparent;
|
|
402
|
+
box-shadow: none;
|
|
403
|
+
color: var(--forms-color-text-disabled, #737373);
|
|
404
|
+
pointer-events: none;
|
|
405
|
+
}
|
|
406
|
+
.mc-combobox--disabled .mc-combobox__control {
|
|
407
|
+
color: var(--forms-color-text-disabled, #737373);
|
|
408
|
+
}
|
|
409
|
+
.mc-combobox--disabled .mc-combobox__icon {
|
|
410
|
+
color: var(--forms-color-icon-disabled, #737373);
|
|
411
|
+
}
|
|
412
|
+
.mc-combobox--readonly .mc-combobox__input {
|
|
413
|
+
border-color: var(--forms-color-border-read-only, #cccccc);
|
|
414
|
+
pointer-events: none;
|
|
415
|
+
}</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type ListboxOption } from '../optionlistbox/OptionListbox.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* A combobox is an input field that allows users to select an option from a dropdown list or enter a custom value. It combines the functionality of a text input and a dropdown menu, providing flexibility and ease of use in forms and user interfaces.
|
|
4
|
+
* @slot optionPrefix - Use this slot to add a prefix to options.
|
|
5
|
+
* @event update:open {CustomEvent<boolean>} - Emitted when the listbox is opened or closed.
|
|
6
|
+
*/
|
|
7
|
+
interface Props {
|
|
8
|
+
/**
|
|
9
|
+
* The current selected value(s) of the combobox.
|
|
10
|
+
*/
|
|
11
|
+
value: string | number | null | (string | number)[];
|
|
12
|
+
/**
|
|
13
|
+
* Enable multiple value mode.
|
|
14
|
+
*/
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Size of the combobox: small ('s') or medium ('m').
|
|
18
|
+
*/
|
|
19
|
+
size?: 's' | 'm';
|
|
20
|
+
/**
|
|
21
|
+
* Disable the combobox input.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Make the combobox read-only.
|
|
26
|
+
*/
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Mark the combobox as invalid.
|
|
30
|
+
*/
|
|
31
|
+
invalid?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Show a clear value button.
|
|
34
|
+
*/
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Enable the search input inside the listbox.
|
|
38
|
+
*/
|
|
39
|
+
search?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Show select all / clear buttons when multiple.
|
|
42
|
+
*/
|
|
43
|
+
actions?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Enable checkable section headers in the listbox.
|
|
46
|
+
*/
|
|
47
|
+
checkablesections?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Placeholder text when no value is selected.
|
|
50
|
+
*/
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Label for the selected items counter.
|
|
54
|
+
*/
|
|
55
|
+
counterlabel?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Placeholder text for the search input.
|
|
58
|
+
*/
|
|
59
|
+
searchplaceholder?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Label for the "Select all" button.
|
|
62
|
+
*/
|
|
63
|
+
selectlabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Label for the "Clear value" button.
|
|
66
|
+
*/
|
|
67
|
+
clearlabel?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Array of options to display in the listbox.
|
|
70
|
+
*/
|
|
71
|
+
options: Array<ListboxOption>;
|
|
72
|
+
/**
|
|
73
|
+
* Callback to trigger when the listbox is opened or closed.
|
|
74
|
+
*/
|
|
75
|
+
onopen?: (value: boolean) => void;
|
|
76
|
+
}
|
|
77
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
78
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
79
|
+
$$bindings?: Bindings;
|
|
80
|
+
} & Exports;
|
|
81
|
+
(internal: unknown, props: Props & {
|
|
82
|
+
$$events?: Events;
|
|
83
|
+
$$slots?: Slots;
|
|
84
|
+
}): Exports & {
|
|
85
|
+
$set?: any;
|
|
86
|
+
$on?: any;
|
|
87
|
+
};
|
|
88
|
+
z_$$bindings?: Bindings;
|
|
89
|
+
}
|
|
90
|
+
declare const Combobox: $$__sveltets_2_IsomorphicComponent<Props, {
|
|
91
|
+
[evt: string]: CustomEvent<any>;
|
|
92
|
+
}, {
|
|
93
|
+
optionPrefix: {
|
|
94
|
+
slot: string;
|
|
95
|
+
};
|
|
96
|
+
}, {}, "value">;
|
|
97
|
+
type Combobox = InstanceType<typeof Combobox>;
|
|
98
|
+
export default Combobox;
|
|
99
|
+
//# sourceMappingURL=Combobox.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/Combobox.svelte.ts"],"names":[],"mappings":"AAIA,OAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAIxF;;;;GAIG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC;AA0JH,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAUD,QAAA,MAAM,QAAQ;;;;;;eAAqF,CAAC;AAClF,KAAK,QAAQ,GAAG,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# `m-combobox`
|
|
2
|
+
|
|
3
|
+
A combobox is an input field that allows users to select an option from a dropdown list or enter a custom value. It combines the functionality of a text input and a dropdown menu, providing flexibility and ease of use in forms and user interfaces.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `value*` | The current selected value(s) of the combobox. | `string` `number` `null` `(string` `number)[]` | `$bindable()` |
|
|
10
|
+
| `multiple` | Enable multiple value mode. | `boolean` | |
|
|
11
|
+
| `size` | Size of the combobox: small ('s') or medium ('m'). | `'s'` `'m'` | `m` |
|
|
12
|
+
| `disabled` | Disable the combobox input. | `boolean` | |
|
|
13
|
+
| `readonly` | Make the combobox read-only. | `boolean` | |
|
|
14
|
+
| `invalid` | Mark the combobox as invalid. | `boolean` | |
|
|
15
|
+
| `clearable` | Show a clear value button. | `boolean` | |
|
|
16
|
+
| `search` | Enable the search input inside the listbox. | `boolean` | |
|
|
17
|
+
| `actions` | Show select all / clear buttons when multiple. | `boolean` | |
|
|
18
|
+
| `checkablesections` | Enable checkable section headers in the listbox. | `boolean` | |
|
|
19
|
+
| `placeholder` | Placeholder text when no value is selected. | `string` | `Select an option` |
|
|
20
|
+
| `counterlabel` | Label for the selected items counter. | `string` | `99 selected` |
|
|
21
|
+
| `searchplaceholder` | Placeholder text for the search input. | `string` | `Find an option...` |
|
|
22
|
+
| `selectlabel` | Label for the "Select all" button. | `string` | `Select all` |
|
|
23
|
+
| `clearlabel` | Label for the "Clear value" button. | `string` | `Clear` |
|
|
24
|
+
| `options*` | Array of options to display in the listbox. | `Array<ListboxOption>` | |
|
|
25
|
+
| `onopen` | Callback to trigger when the listbox is opened or closed. | `(value: boolean) => void` | |
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
|
|
29
|
+
| Name | Description |
|
|
30
|
+
|------|-------------|
|
|
31
|
+
| `optionPrefix` | Use this slot to add a prefix to options. |
|
|
32
|
+
|
|
33
|
+
## Events
|
|
34
|
+
|
|
35
|
+
| Name | Description | Type |
|
|
36
|
+
|------|------|-------------|
|
|
37
|
+
| `update:open` | Emitted when the listbox is opened or closed. | `CustomEvent<boolean>` |
|
|
38
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as o,e as s,a as r,p as m,t as c,b as p,d as u,f,
|
|
1
|
+
import{c as o,e as s,a as r,p as m,t as c,b as p,d as u,f,h,m as v,r as x,j as b,l as y}from"../../custom-element.js";import{s as w}from"../../slot.js";var g=f("<div><!></div>");const _={hash:"svelte-1oy286b",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/.ml-container.svelte-1oy286b {padding-inline:1rem;width:100%;box-sizing:border-box;margin-inline:auto;}
|
|
4
4
|
@media (width >= 680px) {.ml-container.svelte-1oy286b {padding-inline:1.5rem;}
|
|
@@ -10,5 +10,5 @@ import{c as o,e as s,a as r,p as m,t as c,b as p,d as u,f,j as h,i as v,r as x,s
|
|
|
10
10
|
@media (width >= 1920px) {.ml-container.svelte-1oy286b {max-width:1480px;}
|
|
11
11
|
}.ml-container--fluid.svelte-1oy286b {max-width:none;}
|
|
12
12
|
@media (width >= 1024px) {.ml-container--fluid.svelte-1oy286b {padding-inline:2.5rem;}
|
|
13
|
-
}`};function j(
|
|
13
|
+
}`};function j(i,t){s(t,!0),r(i,_);let n=m(t,"fluid",7);var a={get fluid(){return n()},set fluid(d){n(d),v()}},e=g(),l=h(e);return w(l,t,"default",{},null),x(e),c(()=>b(e,1,y(["ml-container",n()&&"ml-container--fluid"]),"svelte-1oy286b")),p(i,e),u(a)}customElements.define("m-container",o(j,{fluid:{attribute:"fluid",reflect:!0,type:"Boolean"}},["default"],[],{mode:"open"}));
|
|
14
14
|
//# sourceMappingURL=Container.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{o as Z,c as D,e as F,a as L,p as r,
|
|
1
|
+
import{o as Z,c as D,e as F,a as L,p as r,s as j,t as V,b as k,d as N,f as H,n as S,h as n,m as o,r as c,k as Y,u as q,j as A,l as G}from"../../custom-element.js";import{i as I}from"../../if.js";import{a as J}from"../../attributes.js";import{c as K}from"../../input.js";import{c as O}from"../../custom-element-forward-events.js";import{e as P}from"../../Condition20.js";import"../../branches.js";var Q=H('<div class="mc-datepicker__controls-options mc-controls-options svelte-xj4ivh"><button type="button" class="mc-controls-options__button svelte-xj4ivh"><!> <span class="mc-controls-options__label svelte-xj4ivh"> </span></button></div>'),R=H("<div><input/> <!></div>");const T={hash:"svelte-xj4ivh",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
|
-
/* stylelint-disable string-no-newline */.mc-text-input.svelte-xj4ivh {transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;color:var(--forms-color-text-default, #000000);display:block;width:100%;height:3rem;
|
|
4
|
+
/* stylelint-disable string-no-newline */.mc-text-input.svelte-xj4ivh {transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;color:var(--forms-color-text-default, #000000);display:block;width:100%;height:3rem;display:flex;align-items:center;gap:0.5rem;box-sizing:border-box;}.mc-text-input__control.svelte-xj4ivh {background-color:transparent;border-width:0;font-family:inherit;outline:none;}.mc-text-input__control.svelte-xj4ivh {padding:0.75rem 0.6875rem;font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);color:var(--forms-color-text-default, #000000);flex-grow:1;}.mc-text-input__control.svelte-xj4ivh::placeholder {color:var(--forms-color-placeholder, #666666);}.mc-text-input__addon.svelte-xj4ivh {font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-semi-bold, 600);color:var(--forms-color-text-default, #000000);}.mc-text-input__icon.svelte-xj4ivh {fill:var(--forms-color-icon-default, #666666);height:1.5rem;width:1.5rem;flex-shrink:0;}.mc-text-input.svelte-xj4ivh:focus-within {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-text-input.svelte-xj4ivh:hover:not(:focus-within) {border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-hover, #4d4d4d);}.mc-text-input.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none;}.mc-text-input.svelte-xj4ivh:has(input[readonly]:where(.svelte-xj4ivh)) {border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none;}.mc-text-input.svelte-xj4ivh:has(.mc-text-input__icon:where(.svelte-xj4ivh)), .mc-text-input.svelte-xj4ivh:has(.mc-text-input__addon:where(.svelte-xj4ivh)) {padding-inline-start:0.6875rem;}.mc-text-input.svelte-xj4ivh:has(.mc-text-input__icon:where(.svelte-xj4ivh)) .mc-text-input__control:where(.svelte-xj4ivh), .mc-text-input.svelte-xj4ivh:has(.mc-text-input__addon:where(.svelte-xj4ivh)) .mc-text-input__control:where(.svelte-xj4ivh) {padding-inline-start:0;}.mc-text-input.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)), .mc-text-input.svelte-xj4ivh:has(.mc-text-input__addon:where(.svelte-xj4ivh)) {padding-inline-end:0.6875rem;}.mc-text-input.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) .mc-text-input__control:where(.svelte-xj4ivh), .mc-text-input.svelte-xj4ivh:has(.mc-text-input__addon:where(.svelte-xj4ivh)) .mc-text-input__control:where(.svelte-xj4ivh) {padding-inline-end:0;}.mc-text-input--s.svelte-xj4ivh {height:2rem;}.mc-text-input--s.svelte-xj4ivh .mc-text-input__control:where(.svelte-xj4ivh) {padding:0.375rem 0.6875rem;font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);}.mc-text-input--s.svelte-xj4ivh:has(.mc-text-input__icon:where(.svelte-xj4ivh)) {padding-inline-start:0.4375rem;}.mc-text-input--s.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) {padding-inline-end:0.4375rem;}.mc-text-input.is-invalid.svelte-xj4ivh {border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);}.mc-text-input.is-invalid.svelte-xj4ivh:hover:not(:focus-within) {border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);}.mc-text-input.svelte-xj4ivh :where(.svelte-xj4ivh) {box-sizing:border-box;}
|
|
5
5
|
|
|
6
|
-
/* stylelint-enable string-no-newline */.mc-datepicker.svelte-xj4ivh {border-radius:var(--border-radius-s, 0.25rem);position:relative;}.mc-datepicker__control.svelte-xj4ivh {font-family:var(--font-family, LeroyMerlin), sans-serif;background-repeat:no-repeat;background-position:right 0.75rem center;display:block;padding:0 0.75rem;}.mc-datepicker__control.svelte-xj4ivh::-webkit-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.svelte-xj4ivh::-moz-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.svelte-xj4ivh::after {content:"";pointer-events:none;position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);width:1rem;height:1rem;background-color:var(--forms-color-icon-interactive, #000000);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-datepicker__control.is-invalid.svelte-xj4ivh {border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);}.mc-datepicker__control.is-invalid.svelte-xj4ivh:hover:not(:focus-within) {border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);}.mc-datepicker__control.svelte-xj4ivh:disabled {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker__control.svelte-xj4ivh:disabled::after {background-color:var(--forms-color-icon-disabled, #737373);}.mc-datepicker__control.svelte-xj4ivh:disabled:hover:not(:focus-within) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) {padding-inline-end:0;}.mc-datepicker.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:all;cursor:not-allowed;}.mc-datepicker.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled):hover {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker--s.svelte-xj4ivh .mc-datepicker__control:where(.svelte-xj4ivh) {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-datepicker--s.svelte-xj4ivh .mc-datepicker__control:where(.svelte-xj4ivh):disabled {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-datepicker__controls-options.svelte-xj4ivh {position:absolute;right:2.75rem;top:0.75rem;}.mc-controls-options.svelte-xj4ivh {align-items:center;display:inline-flex;justify-content:center;gap:0.5rem;}.mc-controls-options__button.svelte-xj4ivh {background-color:transparent;border-width:0;color:initial;font-family:inherit;outline:none;appearance:none;cursor:pointer;padding:0;border-radius:var(--border-radius-full, 100%);}.mc-controls-options__button.svelte-xj4ivh:hover .mc-controls-options__icon:where(.svelte-xj4ivh) {fill:var(--forms-color-icon-clear-hover, #4d4d4d);}.mc-controls-options__button.svelte-xj4ivh:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-controls-options__icon.svelte-xj4ivh {fill:var(--forms-color-icon-clear, #666666);}.mc-controls-options__button.svelte-xj4ivh, .mc-controls-options__icon.svelte-xj4ivh {height:1.5rem;width:1.5rem;}.mc-controls-options__label.svelte-xj4ivh {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}.mc-controls-options__unit.svelte-xj4ivh {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-semi-bold, 600);color:var(--forms-color-text-default, #000000);}`};function U(g,t){F(t,!0),L(g,T);let v=r(t,"id",7),d=r(t,"name",7),i=r(t,"value",15),a=r(t,"isinvalid",7),h=r(t,"disabled",7),s=r(t,"size",7,"m"),m=r(t,"readonly",7),u=r(t,"isclearable",7),p=r(t,"clearlabel",7,"clear content"),y=S(t,["$$slots","$$events","$$legacy","$$host","id","name","value","isinvalid","disabled","size","readonly","isclearable","clearlabel"]);const z=()=>i("");var E={get id(){return v()},set id(e){v(e),o()},get name(){return d()},set name(e){d(e),o()},get value(){return i()},set value(e){i(e),o()},get isinvalid(){return a()},set isinvalid(e){a(e),o()},get disabled(){return h()},set disabled(e){h(e),o()},get size(){return s()},set size(e="m"){s(e),o()},get readonly(){return m()},set readonly(e){m(e),o()},get isclearable(){return u()},set isclearable(e){u(e),o()},get clearlabel(){return p()},set clearlabel(e="clear content"){p(e),o()}},l=R(),x=n(l);J(x,()=>({class:"mc-datepicker__control mc-text-input__control",type:"date",id:v(),name:d(),disabled:h(),readonly:m(),"aria-invalid":a(),...y}),void 0,void 0,void 0,"svelte-xj4ivh",!0);var C=j(x,2);{var M=e=>{var b=Q(),f=n(b),w=n(f);P(w,{className:"mc-controls-options__icon"});var _=j(w,2),B=n(_,!0);c(_),c(f),c(b),V(()=>Y(B,p())),q("click",f,z),k(e,b)};I(C,e=>{u()&&i()&&e(M)})}return c(l),V(()=>A(l,1,G(["mc-datepicker mc-text-input",`mc-text-input--${s()}`,`mc-datepicker--${s()}`,a()&&"is-invalid"]),"svelte-xj4ivh")),K(x,i),k(g,l),N(E)}Z(["click"]);customElements.define("m-datepicker",D(U,{isinvalid:{attribute:"isinvalid",reflect:!0,type:"Boolean"},disabled:{attribute:"disabled",reflect:!0,type:"Boolean"},readonly:{attribute:"readonly",reflect:!0,type:"Boolean"},isclearable:{attribute:"isclearable",reflect:!0,type:"Boolean"},id:{},name:{},value:{},size:{},clearlabel:{}},[],[],{mode:"open"},O));
|
|
6
|
+
/* stylelint-enable string-no-newline */.mc-datepicker.svelte-xj4ivh {border-radius:var(--border-radius-s, 0.25rem);position:relative;}.mc-datepicker__control.svelte-xj4ivh {font-family:var(--font-family, LeroyMerlin), sans-serif;background-repeat:no-repeat;background-position:right 0.75rem center;display:block;padding:0 0.75rem;}.mc-datepicker__control.svelte-xj4ivh::-webkit-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.svelte-xj4ivh::-moz-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.svelte-xj4ivh::after {content:"";pointer-events:none;position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);width:1rem;height:1rem;background-color:var(--forms-color-icon-interactive, #000000);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-datepicker__control.is-invalid.svelte-xj4ivh {border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);}.mc-datepicker__control.is-invalid.svelte-xj4ivh:hover:not(:focus-within) {border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);}.mc-datepicker__control.svelte-xj4ivh:disabled {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E") no-repeat center/contain;background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker__control.svelte-xj4ivh:disabled::after {background-color:var(--forms-color-icon-disabled, #737373);}.mc-datepicker__control.svelte-xj4ivh:disabled:hover:not(:focus-within) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) {padding-inline-end:0;}.mc-datepicker.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:all;cursor:not-allowed;}.mc-datepicker.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled):hover {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker--s.svelte-xj4ivh .mc-datepicker__control:where(.svelte-xj4ivh) {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-datepicker--s.svelte-xj4ivh .mc-datepicker__control:where(.svelte-xj4ivh):disabled {mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E") no-repeat center/contain;}.mc-datepicker__controls-options.svelte-xj4ivh {position:absolute;right:2.75rem;top:0.75rem;}.mc-controls-options.svelte-xj4ivh {align-items:center;display:inline-flex;justify-content:center;gap:0.5rem;}.mc-controls-options__button.svelte-xj4ivh {background-color:transparent;border-width:0;color:initial;font-family:inherit;outline:none;appearance:none;cursor:pointer;padding:0;border-radius:var(--border-radius-full, 100%);}.mc-controls-options__button.svelte-xj4ivh:hover .mc-controls-options__icon:where(.svelte-xj4ivh) {fill:var(--forms-color-icon-clear-hover, #4d4d4d);}.mc-controls-options__button.svelte-xj4ivh:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-controls-options__icon.svelte-xj4ivh {fill:var(--forms-color-icon-clear, #666666);color:var(--forms-color-icon-clear, #666666);}.mc-controls-options__button.svelte-xj4ivh, .mc-controls-options__icon.svelte-xj4ivh {height:1.5rem;width:1.5rem;}.mc-controls-options__label.svelte-xj4ivh {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}.mc-controls-options__unit.svelte-xj4ivh {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-semi-bold, 600);color:var(--forms-color-text-default, #000000);}`};function U(g,t){F(t,!0),L(g,T);let v=r(t,"id",7),d=r(t,"name",7),i=r(t,"value",15),a=r(t,"isinvalid",7),h=r(t,"disabled",7),l=r(t,"size",7,"m"),m=r(t,"readonly",7),u=r(t,"isclearable",7),p=r(t,"clearlabel",7,"clear content"),y=S(t,["$$slots","$$events","$$legacy","$$host","id","name","value","isinvalid","disabled","size","readonly","isclearable","clearlabel"]);const z=()=>i("");var E={get id(){return v()},set id(e){v(e),o()},get name(){return d()},set name(e){d(e),o()},get value(){return i()},set value(e){i(e),o()},get isinvalid(){return a()},set isinvalid(e){a(e),o()},get disabled(){return h()},set disabled(e){h(e),o()},get size(){return l()},set size(e="m"){l(e),o()},get readonly(){return m()},set readonly(e){m(e),o()},get isclearable(){return u()},set isclearable(e){u(e),o()},get clearlabel(){return p()},set clearlabel(e="clear content"){p(e),o()}},s=R(),x=n(s);J(x,()=>({class:"mc-datepicker__control mc-text-input__control",type:"date",id:v(),name:d(),disabled:h(),readonly:m(),"aria-invalid":a(),...y}),void 0,void 0,void 0,"svelte-xj4ivh",!0);var C=j(x,2);{var M=e=>{var b=Q(),f=n(b),w=n(f);P(w,{className:"mc-controls-options__icon"});var _=j(w,2),B=n(_,!0);c(_),c(f),c(b),V(()=>Y(B,p())),q("click",f,z),k(e,b)};I(C,e=>{u()&&i()&&e(M)})}return c(s),V(()=>A(s,1,G(["mc-datepicker mc-text-input",`mc-text-input--${l()}`,`mc-datepicker--${l()}`,a()&&"is-invalid"]),"svelte-xj4ivh")),K(x,i),k(g,s),N(E)}Z(["click"]);customElements.define("m-datepicker",D(U,{isinvalid:{attribute:"isinvalid",reflect:!0,type:"Boolean"},disabled:{attribute:"disabled",reflect:!0,type:"Boolean"},readonly:{attribute:"readonly",reflect:!0,type:"Boolean"},isclearable:{attribute:"isclearable",reflect:!0,type:"Boolean"},id:{},name:{},value:{},size:{},clearlabel:{}},[],[],{mode:"open"},O));
|
|
7
7
|
//# sourceMappingURL=Datepicker.js.map
|