@mozaic-ds/web-components 0.5.0 → 0.6.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/package.json +3 -3
- package/public/ClickOutside-63071e7a.js +1 -15
- package/public/ClickOutside-63071e7a.js.map +1 -1
- package/public/DataTableDefaultAction.nested-4da4dc44.js +1 -759
- package/public/DataTableDefaultAction.nested-4da4dc44.js.map +1 -1
- package/public/DataTableUtilities-60220c78.js +1 -370
- package/public/DataTableUtilities-60220c78.js.map +1 -1
- package/public/EventForward-8492ff62.js +1 -109
- package/public/EventForward-8492ff62.js.map +1 -1
- package/public/EventHandler-02058705.js +1 -15
- package/public/EventHandler-02058705.js.map +1 -1
- package/public/adeo/components/layer/Layer.js +1 -1
- package/public/adeo/components/layer/Layer.js.map +1 -1
- package/public/adeo/components/layer/Layer.svelte +2 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/adeo/components/phonenumber/PhoneNumber.svelte +72 -9
- package/public/adeo/components/quantityselector/QuantitySelector.js +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/adeo/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/array-5b770a93.js +1 -13
- package/public/array-5b770a93.js.map +1 -1
- package/public/axis-fbc0f7b5.js +1 -174
- package/public/axis-fbc0f7b5.js.map +1 -1
- package/public/band-d7a07d2c.js +1 -186
- package/public/band-d7a07d2c.js.map +1 -1
- package/public/bricoman/components/chart/Donut.js +1 -1
- package/public/bricoman/components/header/Header.js +1 -1
- package/public/bricoman/components/hero/Hero.js +1 -1
- package/public/bricoman/components/layer/Layer.js +1 -1
- package/public/bricoman/components/layer/Layer.js.map +1 -1
- package/public/bricoman/components/layer/Layer.svelte +2 -1
- package/public/bricoman/components/listbox/Listbox.js +1 -1
- package/public/bricoman/components/listbox/Listbox.nested.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/bricoman/components/phonenumber/PhoneNumber.svelte +72 -9
- package/public/bricoman/components/price/Price.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/bricoman/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/components/accordion/Accordion.js +1 -365
- package/public/components/accordion/Accordion.js.map +1 -1
- package/public/components/autocomplete/Autocomplete.js +1 -1515
- package/public/components/autocomplete/Autocomplete.js.map +1 -1
- package/public/components/badge/Badge.js +1 -155
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.nested.js +1 -101
- package/public/components/badge/Badge.nested.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.js +1 -372
- package/public/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/public/components/breadcrumb/Breadcrumb.nested.js +1 -319
- package/public/components/breadcrumb/Breadcrumb.nested.js.map +1 -1
- package/public/components/button/Button.js +1 -1138
- package/public/components/button/Button.js.map +1 -1
- package/public/components/card/Card.js +1 -369
- package/public/components/card/Card.js.map +1 -1
- package/public/components/chart/BarChart.js +1 -582
- package/public/components/chart/BarChart.js.map +1 -1
- package/public/components/chart/Donut.js +1 -1189
- package/public/components/chart/Donut.js.map +1 -1
- package/public/components/chart/GroupedBarChart.js +1 -750
- package/public/components/chart/GroupedBarChart.js.map +1 -1
- package/public/components/chart/LineChart.js +1 -1731
- package/public/components/chart/LineChart.js.map +1 -1
- package/public/components/chart/Radar.js +1 -729
- package/public/components/chart/Radar.js.map +1 -1
- package/public/components/chart/StackedBarChart.js +1 -745
- package/public/components/chart/StackedBarChart.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +1 -307
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkboxgroup/checkboxGroup.js +1 -404
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/datatable/DataTable.js +1 -3064
- package/public/components/datatable/DataTable.js.map +1 -1
- package/public/components/datatable/DataTableDefaultAction.nested.js +1 -4
- package/public/components/datatable/DataTableDefaultAction.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultEdtion.nested.js +1 -164
- package/public/components/datatable/DataTableDefaultEdtion.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js +1 -380
- package/public/components/datatable/DataTableDefaultFilterTags.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelection.nested.js +1 -424
- package/public/components/datatable/DataTableDefaultSelection.nested.js.map +1 -1
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js +1 -263
- package/public/components/datatable/DataTableDefaultSelectionLabel.nested.js.map +1 -1
- package/public/components/datatable/DataTableFooter.nested.js +1 -637
- package/public/components/datatable/DataTableFooter.nested.js.map +1 -1
- package/public/components/dropdown/Dropdown.js +1 -1426
- package/public/components/dropdown/Dropdown.js.map +1 -1
- package/public/components/field/Field.js +1 -375
- package/public/components/field/Field.js.map +1 -1
- package/public/components/fileuploader/FileUploader.js +1 -555
- package/public/components/fileuploader/FileUploader.js.map +1 -1
- package/public/components/fileuploader/ResultFile.nested.js +1 -265
- package/public/components/fileuploader/ResultFile.nested.js.map +1 -1
- package/public/components/flag/Flag.js +1 -174
- package/public/components/flag/Flag.js.map +1 -1
- package/public/components/header/Header.js +1 -903
- package/public/components/header/Header.js.map +1 -1
- package/public/components/hero/Hero.js +1 -271
- package/public/components/hero/Hero.js.map +1 -1
- package/public/components/layer/Layer.js +1 -453
- package/public/components/layer/Layer.js.map +1 -1
- package/public/components/layer/Layer.svelte +2 -1
- package/public/components/link/Link.js +1 -380
- package/public/components/link/Link.js.map +1 -1
- package/public/components/listbox/Listbox.js +1 -595
- package/public/components/listbox/Listbox.js.map +1 -1
- package/public/components/listbox/Listbox.nested.js +1 -629
- package/public/components/listbox/Listbox.nested.js.map +1 -1
- package/public/components/loader/Loader.js +1 -246
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.nested.js +1 -176
- package/public/components/loader/Loader.nested.js.map +1 -1
- package/public/components/modal/Modal.js +1 -395
- package/public/components/modal/Modal.js.map +1 -1
- package/public/components/notification/Notification.js +1 -458
- package/public/components/notification/Notification.js.map +1 -1
- package/public/components/optionbutton/OptionButton.js +1 -316
- package/public/components/optionbutton/OptionButton.js.map +1 -1
- package/public/components/overlay/Overlay.js +1 -104
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/OverlayLoader.js +1 -151
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/pagination/Pagination.js +1 -613
- package/public/components/pagination/Pagination.js.map +1 -1
- package/public/components/passwordinput/PasswordInput.js +1 -291
- package/public/components/passwordinput/PasswordInput.js.map +1 -1
- package/public/components/phonenumber/PhoneNumber.js +1 -6894
- package/public/components/phonenumber/PhoneNumber.js.map +1 -1
- package/public/components/price/Price.js +1 -768
- package/public/components/price/Price.js.map +1 -1
- package/public/components/progressbar/ProgressBar.js +1 -278
- package/public/components/progressbar/ProgressBar.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.js +1 -333
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.svelte +6 -3
- package/public/components/radio/Radio.js +1 -273
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.js +1 -414
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/ratings/StarsInput.js +1 -292
- package/public/components/ratings/StarsInput.js.map +1 -1
- package/public/components/ratings/StarsResult.js +1 -246
- package/public/components/ratings/StarsResult.js.map +1 -1
- package/public/components/select/Select.js +1 -451
- package/public/components/select/Select.js.map +1 -1
- package/public/components/sidebar/Sidebar.js +1 -784
- package/public/components/sidebar/Sidebar.js.map +1 -1
- package/public/components/sidebar/sidebar-feature-group.nested.js +1 -594
- package/public/components/sidebar/sidebar-feature-group.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-feature.nested.js +1 -402
- package/public/components/sidebar/sidebar-feature.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-section.nested.js +1 -394
- package/public/components/sidebar/sidebar-section.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-segment.nested.js +1 -200
- package/public/components/sidebar/sidebar-segment.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-separator.nested.js +1 -49
- package/public/components/sidebar/sidebar-separator.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-sub-features.nested.js +1 -312
- package/public/components/sidebar/sidebar-sub-features.nested.js.map +1 -1
- package/public/components/sidebar/sidebar-user.nested.js +1 -733
- package/public/components/sidebar/sidebar-user.nested.js.map +1 -1
- package/public/components/stepper/Stepper.js +1 -371
- package/public/components/stepper/Stepper.js.map +1 -1
- package/public/components/tabs/Tabs.js +1 -615
- package/public/components/tabs/Tabs.js.map +1 -1
- package/public/components/tabs/Tabs.nested.js +1 -472
- package/public/components/tabs/Tabs.nested.js.map +1 -1
- package/public/components/tag/Tag.js +1 -665
- package/public/components/tag/Tag.js.map +1 -1
- package/public/components/tag/Tag.nested.js +1 -554
- package/public/components/tag/Tag.nested.js.map +1 -1
- package/public/components/taglist/TagList.js +1 -475
- package/public/components/taglist/TagList.js.map +1 -1
- package/public/components/textarea/Textarea.js +1 -303
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textinput/Textinput.js +1 -497
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.nested.js +1 -320
- package/public/components/textinput/Textinput.nested.js.map +1 -1
- package/public/components/toggle/Toggle.js +1 -278
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/tooltip/Tooltip.js +1 -173
- package/public/components/tooltip/Tooltip.js.map +1 -1
- package/public/index-c33b3772.js +1 -873
- package/public/index-c33b3772.js.map +1 -1
- package/public/linear-f46d7e9e.js +1 -700
- package/public/linear-f46d7e9e.js.map +1 -1
- package/public/path-1b5da959.js +1 -186
- package/public/path-1b5da959.js.map +1 -1
- package/public/sidebar-service-275bf9ef.js +1 -129
- package/public/sidebar-service-275bf9ef.js.map +1 -1
- package/public/symbol-b05a6e2b.js +1 -169
- package/public/symbol-b05a6e2b.js.map +1 -1
- package/public/transform-15d69d5d.js +1 -2743
- package/public/transform-15d69d5d.js.map +1 -1
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
|
@@ -1,266 +1,2 @@
|
|
|
1
|
-
import { P as SvelteComponent, i as init, s as safe_not_equal, Q as append_styles, e as element, g as attr, b as insert, n as noop, o as detach, J as destroy_each, c as assign, q as exclude_internal_props, t as text, d as space, j as append, l as listen, k as set_data } from '../../index-c33b3772.js';
|
|
2
|
-
import { E as EventHandler } from '../../EventHandler-02058705.js';
|
|
3
|
-
|
|
4
|
-
/* src/components/fileuploader/ResultFile.nested.svelte generated by Svelte v3.58.0 */
|
|
5
|
-
|
|
6
|
-
function add_css(target) {
|
|
7
|
-
append_styles(target, "svelte-10zpszp", ".mc-fileuploader.svelte-10zpszp.svelte-10zpszp{position:relative;display:block}.mc-fileuploader__input.svelte-10zpszp.svelte-10zpszp{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;visibility:visible;white-space:nowrap}.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp{font-family:\"LeroyMerlin\", sans-serif;font-weight:600;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;color:#188803;border-color:#188803;background-color:#ffffff;margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;-webkit-box-sizing:border-box;box-sizing:border-box}.mc-fileuploader__label.is-hover.svelte-10zpszp.svelte-10zpszp,.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:hover{background-color:#ebf5de;color:#006902}.mc-fileuploader__label.is-active.svelte-10zpszp.svelte-10zpszp,.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:active{background-color:#c5e39e;color:#035010}.mc-fileuploader__label.is-active.svelte-10zpszp.svelte-10zpszp,.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:active{background-color:#c5e39e;color:#035010}.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:disabled,.mc-fileuploader__label.is-disabled.svelte-10zpszp.svelte-10zpszp{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp::before{content:\"\";width:1.5rem;height:1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjMTg4ODAzIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjx0aXRsZT5NZWRpYV9VcGxvYWRfMjRweDwvdGl0bGU+PHBhdGggZD0iTTguNzEsNy43MSwxMSw1LjQxVjE2YTEsMSwwLDAsMCwyLDBWNS40MWwyLjI5LDIuM2ExLDEsMCwwLDAsMS40MiwwLDEsMSwwLDAsMCwwLTEuNDJsLTQtNGExLDEsMCwwLDAtMS40MiwwbC00LDRBMSwxLDAsMSwwLDguNzEsNy43MVoiLz48cGF0aCBkPSJNMTYuMjIsMTIuNDRhMSwxLDAsMCwwLTEuMi43NywxLDEsMCwwLDAsLjc2LDEuMTlDMTguNTUsMTUsMjAsMTYuMTcsMjAsMTdjMCwxLjIyLTMuMTIsMy04LDNzLTgtMS43OC04LTNjMC0uODMsMS40NS0yLDQuMjItMi42QTEsMSwwLDAsMCw5LDEzLjIxYTEsMSwwLDAsMC0xLjItLjc3QzQuMTYsMTMuMjUsMiwxNSwyLDE3YzAsMi44NSw0LjMsNSwxMCw1czEwLTIuMTUsMTAtNUMyMiwxNSwxOS44NCwxMy4yNSwxNi4yMiwxMi40NFoiLz48L3N2Zz4=\") no-repeat;background-size:1.5rem;margin-right:0.5rem;margin-left:-0.5rem}.is-focus.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp,.svelte-10zpszp:focus+.mc-fileuploader__label.svelte-10zpszp{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.is-hover.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp,.svelte-10zpszp:hover+.mc-fileuploader__label.svelte-10zpszp{color:#006902;background-color:#ebf5de}.is-disabled.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp,.svelte-10zpszp:disabled+.mc-fileuploader__label.svelte-10zpszp{color:#666666;background-color:#cccccc;border-color:transparent;cursor:not-allowed}.is-disabled.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp::before,.svelte-10zpszp:disabled+.mc-fileuploader__label.svelte-10zpszp::before{background:transparent url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNjY2NjY2IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjx0aXRsZT5NZWRpYV9VcGxvYWRfMjRweDwvdGl0bGU+PHBhdGggZD0iTTguNzEsNy43MSwxMSw1LjQxVjE2YTEsMSwwLDAsMCwyLDBWNS40MWwyLjI5LDIuM2ExLDEsMCwwLDAsMS40MiwwLDEsMSwwLDAsMCwwLTEuNDJsLTQtNGExLDEsMCwwLDAtMS40MiwwbC00LDRBMSwxLDAsMSwwLDguNzEsNy43MVoiLz48cGF0aCBkPSJNMTYuMjIsMTIuNDRhMSwxLDAsMCwwLTEuMi43NywxLDEsMCwwLDAsLjc2LDEuMTlDMTguNTUsMTUsMjAsMTYuMTcsMjAsMTdjMCwxLjIyLTMuMTIsMy04LDNzLTgtMS43OC04LTNjMC0uODMsMS40NS0yLDQuMjItMi42QTEsMSwwLDAsMCw5LDEzLjIxYTEsMSwwLDAsMC0xLjItLjc3QzQuMTYsMTMuMjUsMiwxNSwyLDE3YzAsMi44NSw0LjMsNSwxMCw1czEwLTIuMTUsMTAtNUMyMiwxNSwxOS44NCwxMy4yNSwxNi4yMiwxMi40NFoiLz48L3N2Zz4=\") no-repeat}.mc-fileuploader__files.svelte-10zpszp.svelte-10zpszp{list-style:none;padding:0;margin:1rem 0 0 0}.mc-fileuploader__file.svelte-10zpszp.svelte-10zpszp{font-family:\"LeroyMerlin\", sans-serif;font-weight:400;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#e6e6e6;-webkit-box-sizing:content-box;box-sizing:content-box;color:#000000;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap}.mc-fileuploader__file.svelte-10zpszp.svelte-10zpszp:not(:last-child){margin-bottom:0.25rem}.mc-fileuploader__file-name.svelte-10zpszp.svelte-10zpszp{font-size:1rem;line-height:1.375;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding-left:0.75rem;padding-right:0.75rem;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 7.5rem)}.mc-fileuploader__file-icon.svelte-10zpszp.svelte-10zpszp{background-color:transparent;background-position:center right;background-repeat:no-repeat;background-size:1.5rem;display:block;height:1.5rem;margin-left:1rem;margin-right:1rem;width:1.5rem}.mc-fileuploader__file--is-valid.svelte-10zpszp .mc-fileuploader__file-icon.svelte-10zpszp{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDEgMS04IDggOCA4IDAgMCAxIDgtOG0wLTJhMTAgMTAgMCAxIDAgMTAgMTBBMTAgMTAgMCAwIDAgMTIgMnoiLz48cGF0aCBkPSJNMTAuNTkgMTYuMTJhMSAxIDAgMCAxLS42OC0uMjZsLTMuODQtMy41NWExIDEgMCAwIDEgMS4zNi0xLjQ3bDMuMTMgMi44OUwxNiA4LjE3YTEgMSAwIDAgMSAxLjQzIDEuNDFsLTYuMTMgNi4yNWExIDEgMCAwIDEtLjcxLjI5eiIvPjwvc3ZnPg==\")}.mc-fileuploader__file--is-invalid.svelte-10zpszp .mc-fileuploader__file-icon.svelte-10zpszp{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjYzYxMTEyIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMSAwIDEwIDEwQTEwIDEwIDAgMCAwIDEyIDJ6bTAgMThhOCA4IDAgMSAxIDgtOCA4IDggMCAwIDEtOCA4eiIvPjxwYXRoIGQ9Ik0xMiA3YTEgMSAwIDAgMC0xIDF2NC4zOGExIDEgMCAwIDAgMiAwVjhhMSAxIDAgMCAwLTEtMXoiLz48Y2lyY2xlIGN4PSIxMiIgY3k9IjE2IiByPSIxIi8+PC9zdmc+\")}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp{position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#cccccc;border:none;cursor:pointer;padding:0.5rem}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp::before{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:\"\";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease;top:-0.125rem;right:-0.125rem;bottom:-0.125rem;left:-0.125rem}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp::after{content:\"\";width:1.5rem;height:1.5rem;background:transparent url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjMDAwMDAwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOC4wOCA4YTEgMSAwIDAgMC0xLjA4LjkyTDE2LjA4IDIwSDcuOTJMNyA4LjkyYTEgMSAwIDEgMC0yIC4xNmwxIDEyQTEgMSAwIDAgMCA3IDIyaDEwYTEgMSAwIDAgMCAxLS45MmwxLTEyQTEgMSAwIDAgMCAxOC4wOCA4eiIvPjxwYXRoIGQ9Ik0xOSA1aC0zLjc3bC0uNjUtMi4yN2ExIDEgMCAwIDAtMS0uNzNoLTMuMmExIDEgMCAwIDAtMSAuNzNMOC43NyA1SDVhMSAxIDAgMCAwIDAgMmgxNGExIDEgMCAwIDAgMC0yem0tOC42Mi0yaDMuMjRsLjU3IDJIOS44MXpNMTIuNSAxOHYtOGEuNS41IDAgMCAwLTEgMHY4YS41LjUgMCAwIDAgMSAwek0xNC4yNSAxOC41YS41LjUgMCAwIDAgLjUtLjQ3bC41LThhLjUuNSAwIDAgMC0uNDctLjUzLjQ5LjQ5IDAgMCAwLS41My40N2wtLjUgOGEuNS41IDAgMCAwIC40Ny41M3pNOS43NSAxOC41YS41LjUgMCAwIDAgLjQ3LS41M2wtLjUtOGEuNDkuNDkgMCAwIDAtLjUzLS40Ny41LjUgMCAwIDAtLjQ3LjUzbC41IDhhLjUuNSAwIDAgMCAuNTMuNDd6Ii8+PC9zdmc+\") no-repeat;background-size:1.5rem;display:block}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp:focus{outline:none}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp:focus::before{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;-webkit-box-shadow:0 0 0 0.125rem #0b96cc;box-shadow:0 0 0 0.125rem #0b96cc}");
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function get_each_context(ctx, list, i) {
|
|
11
|
-
const child_ctx = ctx.slice();
|
|
12
|
-
child_ctx[13] = list[i];
|
|
13
|
-
child_ctx[15] = i;
|
|
14
|
-
return child_ctx;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// (52:2) {#each files as file, index}
|
|
18
|
-
function create_each_block(ctx) {
|
|
19
|
-
let li;
|
|
20
|
-
let span0;
|
|
21
|
-
let t0_value = /*file*/ ctx[13].name + "";
|
|
22
|
-
let t0;
|
|
23
|
-
let t1;
|
|
24
|
-
let span1;
|
|
25
|
-
let t3;
|
|
26
|
-
let button;
|
|
27
|
-
let t4;
|
|
28
|
-
let li_class_value;
|
|
29
|
-
let mounted;
|
|
30
|
-
let dispose;
|
|
31
|
-
|
|
32
|
-
function click_handler() {
|
|
33
|
-
return /*click_handler*/ ctx[8](/*file*/ ctx[13]);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
c() {
|
|
38
|
-
li = element("li");
|
|
39
|
-
span0 = element("span");
|
|
40
|
-
t0 = text(t0_value);
|
|
41
|
-
t1 = space();
|
|
42
|
-
span1 = element("span");
|
|
43
|
-
span1.textContent = " ";
|
|
44
|
-
t3 = space();
|
|
45
|
-
button = element("button");
|
|
46
|
-
t4 = space();
|
|
47
|
-
attr(span0, "class", "mc-fileuploader__file-name svelte-10zpszp");
|
|
48
|
-
attr(span1, "class", "mc-fileuploader__file-icon svelte-10zpszp");
|
|
49
|
-
attr(button, "type", "button");
|
|
50
|
-
attr(button, "class", "mc-fileuploader__delete svelte-10zpszp");
|
|
51
|
-
attr(button, "aria-label", /*removelabel*/ ctx[2]);
|
|
52
|
-
button.disabled = /*disabled*/ ctx[1];
|
|
53
|
-
attr(li, "id", `file-${/*index*/ ctx[15]}`);
|
|
54
|
-
attr(li, "class", li_class_value = "" + (/*setClasses*/ ctx[3](/*file*/ ctx[13]) + " " + /*$$props*/ ctx[5].class + " svelte-10zpszp"));
|
|
55
|
-
},
|
|
56
|
-
m(target, anchor) {
|
|
57
|
-
insert(target, li, anchor);
|
|
58
|
-
append(li, span0);
|
|
59
|
-
append(span0, t0);
|
|
60
|
-
append(li, t1);
|
|
61
|
-
append(li, span1);
|
|
62
|
-
append(li, t3);
|
|
63
|
-
append(li, button);
|
|
64
|
-
append(li, t4);
|
|
65
|
-
|
|
66
|
-
if (!mounted) {
|
|
67
|
-
dispose = listen(button, "click", click_handler);
|
|
68
|
-
mounted = true;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
p(new_ctx, dirty) {
|
|
72
|
-
ctx = new_ctx;
|
|
73
|
-
if (dirty & /*files*/ 1 && t0_value !== (t0_value = /*file*/ ctx[13].name + "")) set_data(t0, t0_value);
|
|
74
|
-
|
|
75
|
-
if (dirty & /*removelabel*/ 4) {
|
|
76
|
-
attr(button, "aria-label", /*removelabel*/ ctx[2]);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (dirty & /*disabled*/ 2) {
|
|
80
|
-
button.disabled = /*disabled*/ ctx[1];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (dirty & /*files, $$props*/ 33 && li_class_value !== (li_class_value = "" + (/*setClasses*/ ctx[3](/*file*/ ctx[13]) + " " + /*$$props*/ ctx[5].class + " svelte-10zpszp"))) {
|
|
84
|
-
attr(li, "class", li_class_value);
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
d(detaching) {
|
|
88
|
-
if (detaching) detach(li);
|
|
89
|
-
mounted = false;
|
|
90
|
-
dispose();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function create_fragment(ctx) {
|
|
96
|
-
let ul;
|
|
97
|
-
let each_value = /*files*/ ctx[0];
|
|
98
|
-
let each_blocks = [];
|
|
99
|
-
|
|
100
|
-
for (let i = 0; i < each_value.length; i += 1) {
|
|
101
|
-
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return {
|
|
105
|
-
c() {
|
|
106
|
-
ul = element("ul");
|
|
107
|
-
|
|
108
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
109
|
-
each_blocks[i].c();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
attr(ul, "class", "mc-fileuploader__files svelte-10zpszp");
|
|
113
|
-
},
|
|
114
|
-
m(target, anchor) {
|
|
115
|
-
insert(target, ul, anchor);
|
|
116
|
-
|
|
117
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
118
|
-
if (each_blocks[i]) {
|
|
119
|
-
each_blocks[i].m(ul, null);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
p(ctx, [dirty]) {
|
|
124
|
-
if (dirty & /*setClasses, files, $$props, removelabel, disabled, deleteFile*/ 63) {
|
|
125
|
-
each_value = /*files*/ ctx[0];
|
|
126
|
-
let i;
|
|
127
|
-
|
|
128
|
-
for (i = 0; i < each_value.length; i += 1) {
|
|
129
|
-
const child_ctx = get_each_context(ctx, each_value, i);
|
|
130
|
-
|
|
131
|
-
if (each_blocks[i]) {
|
|
132
|
-
each_blocks[i].p(child_ctx, dirty);
|
|
133
|
-
} else {
|
|
134
|
-
each_blocks[i] = create_each_block(child_ctx);
|
|
135
|
-
each_blocks[i].c();
|
|
136
|
-
each_blocks[i].m(ul, null);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
for (; i < each_blocks.length; i += 1) {
|
|
141
|
-
each_blocks[i].d(1);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
each_blocks.length = each_value.length;
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
i: noop,
|
|
148
|
-
o: noop,
|
|
149
|
-
d(detaching) {
|
|
150
|
-
if (detaching) detach(ul);
|
|
151
|
-
destroy_each(each_blocks, detaching);
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function instance($$self, $$props, $$invalidate) {
|
|
157
|
-
let { allowedExtensions } = $$props;
|
|
158
|
-
let { maxSize } = $$props;
|
|
159
|
-
let { disabled = false } = $$props;
|
|
160
|
-
let { files } = $$props;
|
|
161
|
-
let { removelabel = 'Remove' } = $$props;
|
|
162
|
-
let eventHandler = new EventHandler();
|
|
163
|
-
|
|
164
|
-
function setClasses(file) {
|
|
165
|
-
let classes = ['mc-fileuploader__file'];
|
|
166
|
-
if (checkFileStatus(file)) classes.push('mc-fileuploader__file--is-valid'); else classes.push('mc-fileuploader__file--is-invalid');
|
|
167
|
-
return classes.join(' ');
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function checkFileExtension(fileName) {
|
|
171
|
-
if (allowedExtensions && allowedExtensions.length > 0) {
|
|
172
|
-
const extension = fileName.slice((fileName.lastIndexOf('.') - 1 >>> 0) + 2);
|
|
173
|
-
|
|
174
|
-
if (allowedExtensions && !allowedExtensions.includes(String(extension))) {
|
|
175
|
-
return false;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function checkFileSize(fileSize) {
|
|
183
|
-
const fileSizeMB = fileSize / 1024 / 1024;
|
|
184
|
-
|
|
185
|
-
if (maxSize && fileSizeMB > maxSize) {
|
|
186
|
-
return false;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function checkFileStatus(file) {
|
|
193
|
-
const validExtension = allowedExtensions ? checkFileExtension(file.name) : true;
|
|
194
|
-
const validSize = checkFileSize(file.size);
|
|
195
|
-
|
|
196
|
-
if (!validExtension || !validSize) {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return true;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function deleteFile(file) {
|
|
204
|
-
eventHandler.dispatch('file-removed', file);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const click_handler = file => deleteFile(file);
|
|
208
|
-
|
|
209
|
-
$$self.$$set = $$new_props => {
|
|
210
|
-
$$invalidate(5, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
|
|
211
|
-
if ('allowedExtensions' in $$new_props) $$invalidate(7, allowedExtensions = $$new_props.allowedExtensions);
|
|
212
|
-
if ('maxSize' in $$new_props) $$invalidate(6, maxSize = $$new_props.maxSize);
|
|
213
|
-
if ('disabled' in $$new_props) $$invalidate(1, disabled = $$new_props.disabled);
|
|
214
|
-
if ('files' in $$new_props) $$invalidate(0, files = $$new_props.files);
|
|
215
|
-
if ('removelabel' in $$new_props) $$invalidate(2, removelabel = $$new_props.removelabel);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
$$self.$$.update = () => {
|
|
219
|
-
if ($$self.$$.dirty & /*files*/ 1) {
|
|
220
|
-
$$invalidate(0, files = files ? files : []);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if ($$self.$$.dirty & /*maxSize*/ 64) {
|
|
224
|
-
$$invalidate(6, maxSize = maxSize ? maxSize : undefined);
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
$$props = exclude_internal_props($$props);
|
|
229
|
-
|
|
230
|
-
return [
|
|
231
|
-
files,
|
|
232
|
-
disabled,
|
|
233
|
-
removelabel,
|
|
234
|
-
setClasses,
|
|
235
|
-
deleteFile,
|
|
236
|
-
$$props,
|
|
237
|
-
maxSize,
|
|
238
|
-
allowedExtensions,
|
|
239
|
-
click_handler
|
|
240
|
-
];
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
class ResultFile_nested extends SvelteComponent {
|
|
244
|
-
constructor(options) {
|
|
245
|
-
super();
|
|
246
|
-
|
|
247
|
-
init(
|
|
248
|
-
this,
|
|
249
|
-
options,
|
|
250
|
-
instance,
|
|
251
|
-
create_fragment,
|
|
252
|
-
safe_not_equal,
|
|
253
|
-
{
|
|
254
|
-
allowedExtensions: 7,
|
|
255
|
-
maxSize: 6,
|
|
256
|
-
disabled: 1,
|
|
257
|
-
files: 0,
|
|
258
|
-
removelabel: 2
|
|
259
|
-
},
|
|
260
|
-
add_css
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export { ResultFile_nested as default };
|
|
1
|
+
import{P as e,i as s,s as l,Q as i,e as t,g as o,b as a,n as r,o as n,J as p,c,q as M,t as d,d as w,j as z,l as m,k as g}from"../../index-c33b3772.js";import{E as u}from"../../EventHandler-02058705.js";function b(e){i(e,"svelte-10zpszp",'.mc-fileuploader.svelte-10zpszp.svelte-10zpszp{position:relative;display:block}.mc-fileuploader__input.svelte-10zpszp.svelte-10zpszp{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;visibility:visible;white-space:nowrap}.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp{font-family:"LeroyMerlin", sans-serif;font-weight:600;cursor:pointer;border-radius:4px;text-align:center;border:2px solid transparent;-webkit-transition:all ease 200ms;-o-transition:all ease 200ms;transition:all ease 200ms;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;vertical-align:middle;font-size:1rem;line-height:1.375;padding:0.6875rem 1.5rem;min-height:3rem;min-width:3rem;color:#188803;border-color:#188803;background-color:#ffffff;margin:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none;outline:none;-webkit-box-sizing:border-box;box-sizing:border-box}.mc-fileuploader__label.is-hover.svelte-10zpszp.svelte-10zpszp,.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:hover{background-color:#ebf5de;color:#006902}.mc-fileuploader__label.is-active.svelte-10zpszp.svelte-10zpszp,.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:active{background-color:#c5e39e;color:#035010}.mc-fileuploader__label.is-active.svelte-10zpszp.svelte-10zpszp,.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:active{background-color:#c5e39e;color:#035010}.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp:disabled,.mc-fileuploader__label.is-disabled.svelte-10zpszp.svelte-10zpszp{background-color:#cccccc;border-color:transparent;color:#666666;cursor:not-allowed}.mc-fileuploader__label.svelte-10zpszp.svelte-10zpszp::before{content:"";width:1.5rem;height:1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjMTg4ODAzIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjx0aXRsZT5NZWRpYV9VcGxvYWRfMjRweDwvdGl0bGU+PHBhdGggZD0iTTguNzEsNy43MSwxMSw1LjQxVjE2YTEsMSwwLDAsMCwyLDBWNS40MWwyLjI5LDIuM2ExLDEsMCwwLDAsMS40MiwwLDEsMSwwLDAsMCwwLTEuNDJsLTQtNGExLDEsMCwwLDAtMS40MiwwbC00LDRBMSwxLDAsMSwwLDguNzEsNy43MVoiLz48cGF0aCBkPSJNMTYuMjIsMTIuNDRhMSwxLDAsMCwwLTEuMi43NywxLDEsMCwwLDAsLjc2LDEuMTlDMTguNTUsMTUsMjAsMTYuMTcsMjAsMTdjMCwxLjIyLTMuMTIsMy04LDNzLTgtMS43OC04LTNjMC0uODMsMS40NS0yLDQuMjItMi42QTEsMSwwLDAsMCw5LDEzLjIxYTEsMSwwLDAsMC0xLjItLjc3QzQuMTYsMTMuMjUsMiwxNSwyLDE3YzAsMi44NSw0LjMsNSwxMCw1czEwLTIuMTUsMTAtNUMyMiwxNSwxOS44NCwxMy4yNSwxNi4yMiwxMi40NFoiLz48L3N2Zz4=") no-repeat;background-size:1.5rem;margin-right:0.5rem;margin-left:-0.5rem}.is-focus.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp,.svelte-10zpszp:focus+.mc-fileuploader__label.svelte-10zpszp{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc}.is-hover.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp,.svelte-10zpszp:hover+.mc-fileuploader__label.svelte-10zpszp{color:#006902;background-color:#ebf5de}.is-disabled.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp,.svelte-10zpszp:disabled+.mc-fileuploader__label.svelte-10zpszp{color:#666666;background-color:#cccccc;border-color:transparent;cursor:not-allowed}.is-disabled.svelte-10zpszp+.mc-fileuploader__label.svelte-10zpszp::before,.svelte-10zpszp:disabled+.mc-fileuploader__label.svelte-10zpszp::before{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNjY2NjY2IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjx0aXRsZT5NZWRpYV9VcGxvYWRfMjRweDwvdGl0bGU+PHBhdGggZD0iTTguNzEsNy43MSwxMSw1LjQxVjE2YTEsMSwwLDAsMCwyLDBWNS40MWwyLjI5LDIuM2ExLDEsMCwwLDAsMS40MiwwLDEsMSwwLDAsMCwwLTEuNDJsLTQtNGExLDEsMCwwLDAtMS40MiwwbC00LDRBMSwxLDAsMSwwLDguNzEsNy43MVoiLz48cGF0aCBkPSJNMTYuMjIsMTIuNDRhMSwxLDAsMCwwLTEuMi43NywxLDEsMCwwLDAsLjc2LDEuMTlDMTguNTUsMTUsMjAsMTYuMTcsMjAsMTdjMCwxLjIyLTMuMTIsMy04LDNzLTgtMS43OC04LTNjMC0uODMsMS40NS0yLDQuMjItMi42QTEsMSwwLDAsMCw5LDEzLjIxYTEsMSwwLDAsMC0xLjItLjc3QzQuMTYsMTMuMjUsMiwxNSwyLDE3YzAsMi44NSw0LjMsNSwxMCw1czEwLTIuMTUsMTAtNUMyMiwxNSwxOS44NCwxMy4yNSwxNi4yMiwxMi40NFoiLz48L3N2Zz4=") no-repeat}.mc-fileuploader__files.svelte-10zpszp.svelte-10zpszp{list-style:none;padding:0;margin:1rem 0 0 0}.mc-fileuploader__file.svelte-10zpszp.svelte-10zpszp{font-family:"LeroyMerlin", sans-serif;font-weight:400;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#e6e6e6;-webkit-box-sizing:content-box;box-sizing:content-box;color:#000000;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap}.mc-fileuploader__file.svelte-10zpszp.svelte-10zpszp:not(:last-child){margin-bottom:0.25rem}.mc-fileuploader__file-name.svelte-10zpszp.svelte-10zpszp{font-size:1rem;line-height:1.375;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding-left:0.75rem;padding-right:0.75rem;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 7.5rem)}.mc-fileuploader__file-icon.svelte-10zpszp.svelte-10zpszp{background-color:transparent;background-position:center right;background-repeat:no-repeat;background-size:1.5rem;display:block;height:1.5rem;margin-left:1rem;margin-right:1rem;width:1.5rem}.mc-fileuploader__file--is-valid.svelte-10zpszp .mc-fileuploader__file-icon.svelte-10zpszp{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjNDZhNjEwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiA0YTggOCAwIDEgMS04IDggOCA4IDAgMCAxIDgtOG0wLTJhMTAgMTAgMCAxIDAgMTAgMTBBMTAgMTAgMCAwIDAgMTIgMnoiLz48cGF0aCBkPSJNMTAuNTkgMTYuMTJhMSAxIDAgMCAxLS42OC0uMjZsLTMuODQtMy41NWExIDEgMCAwIDEgMS4zNi0xLjQ3bDMuMTMgMi44OUwxNiA4LjE3YTEgMSAwIDAgMSAxLjQzIDEuNDFsLTYuMTMgNi4yNWExIDEgMCAwIDEtLjcxLjI5eiIvPjwvc3ZnPg==")}.mc-fileuploader__file--is-invalid.svelte-10zpszp .mc-fileuploader__file-icon.svelte-10zpszp{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjYzYxMTEyIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMiAyYTEwIDEwIDAgMSAwIDEwIDEwQTEwIDEwIDAgMCAwIDEyIDJ6bTAgMThhOCA4IDAgMSAxIDgtOCA4IDggMCAwIDEtOCA4eiIvPjxwYXRoIGQ9Ik0xMiA3YTEgMSAwIDAgMC0xIDF2NC4zOGExIDEgMCAwIDAgMiAwVjhhMSAxIDAgMCAwLTEtMXoiLz48Y2lyY2xlIGN4PSIxMiIgY3k9IjE2IiByPSIxIi8+PC9zdmc+")}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp{position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#cccccc;border:none;cursor:pointer;padding:0.5rem}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp::before{border-radius:2px;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent;content:"";display:block;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-transition:-webkit-box-shadow 200ms ease;transition:-webkit-box-shadow 200ms ease;-o-transition:box-shadow 200ms ease;transition:box-shadow 200ms ease;transition:box-shadow 200ms ease, -webkit-box-shadow 200ms ease;top:-0.125rem;right:-0.125rem;bottom:-0.125rem;left:-0.125rem}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp::after{content:"";width:1.5rem;height:1.5rem;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMS41cmVtIiB3aWR0aD0iMS41cmVtIiBmaWxsPSIjMDAwMDAwIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOC4wOCA4YTEgMSAwIDAgMC0xLjA4LjkyTDE2LjA4IDIwSDcuOTJMNyA4LjkyYTEgMSAwIDEgMC0yIC4xNmwxIDEyQTEgMSAwIDAgMCA3IDIyaDEwYTEgMSAwIDAgMCAxLS45MmwxLTEyQTEgMSAwIDAgMCAxOC4wOCA4eiIvPjxwYXRoIGQ9Ik0xOSA1aC0zLjc3bC0uNjUtMi4yN2ExIDEgMCAwIDAtMS0uNzNoLTMuMmExIDEgMCAwIDAtMSAuNzNMOC43NyA1SDVhMSAxIDAgMCAwIDAgMmgxNGExIDEgMCAwIDAgMC0yem0tOC42Mi0yaDMuMjRsLjU3IDJIOS44MXpNMTIuNSAxOHYtOGEuNS41IDAgMCAwLTEgMHY4YS41LjUgMCAwIDAgMSAwek0xNC4yNSAxOC41YS41LjUgMCAwIDAgLjUtLjQ3bC41LThhLjUuNSAwIDAgMC0uNDctLjUzLjQ5LjQ5IDAgMCAwLS41My40N2wtLjUgOGEuNS41IDAgMCAwIC40Ny41M3pNOS43NSAxOC41YS41LjUgMCAwIDAgLjQ3LS41M2wtLjUtOGEuNDkuNDkgMCAwIDAtLjUzLS40Ny41LjUgMCAwIDAtLjQ3LjUzbC41IDhhLjUuNSAwIDAgMCAuNTMuNDd6Ii8+PC9zdmc+") no-repeat;background-size:1.5rem;display:block}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp:focus{outline:none}.mc-fileuploader__delete.svelte-10zpszp.svelte-10zpszp:focus::before{-webkit-box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;box-shadow:0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #0b96cc;-webkit-box-shadow:0 0 0 0.125rem #0b96cc;box-shadow:0 0 0 0.125rem #0b96cc}')}function x(e,s,l){const i=e.slice();return i[13]=s[l],i[15]=l,i}function f(e){let s,l,i,r,p,c,M,u,b,x,f,D=e[13].name+"";function I(){return e[8](e[13])}return{c(){s=t("li"),l=t("span"),i=d(D),r=w(),p=t("span"),p.textContent=" ",c=w(),M=t("button"),u=w(),o(l,"class","mc-fileuploader__file-name svelte-10zpszp"),o(p,"class","mc-fileuploader__file-icon svelte-10zpszp"),o(M,"type","button"),o(M,"class","mc-fileuploader__delete svelte-10zpszp"),o(M,"aria-label",e[2]),M.disabled=e[1],o(s,"id",`file-${e[15]}`),o(s,"class",b=e[3](e[13])+" "+e[5].class+" svelte-10zpszp")},m(e,t){a(e,s,t),z(s,l),z(l,i),z(s,r),z(s,p),z(s,c),z(s,M),z(s,u),x||(f=m(M,"click",I),x=!0)},p(l,t){e=l,1&t&&D!==(D=e[13].name+"")&&g(i,D),4&t&&o(M,"aria-label",e[2]),2&t&&(M.disabled=e[1]),33&t&&b!==(b=e[3](e[13])+" "+e[5].class+" svelte-10zpszp")&&o(s,"class",b)},d(e){e&&n(s),x=!1,f()}}}function D(e){let s,l=e[0],i=[];for(let s=0;s<l.length;s+=1)i[s]=f(x(e,l,s));return{c(){s=t("ul");for(let e=0;e<i.length;e+=1)i[e].c();o(s,"class","mc-fileuploader__files svelte-10zpszp")},m(e,l){a(e,s,l);for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(s,null)},p(e,[t]){if(63&t){let o;for(l=e[0],o=0;o<l.length;o+=1){const a=x(e,l,o);i[o]?i[o].p(a,t):(i[o]=f(a),i[o].c(),i[o].m(s,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=l.length}},i:r,o:r,d(e){e&&n(s),p(i,e)}}}function I(e,s,l){let{allowedExtensions:i}=s,{maxSize:t}=s,{disabled:o=!1}=s,{files:a}=s,{removelabel:r="Remove"}=s,n=new u;function p(e){n.dispatch("file-removed",e)}return e.$$set=e=>{l(5,s=c(c({},s),M(e))),"allowedExtensions"in e&&l(7,i=e.allowedExtensions),"maxSize"in e&&l(6,t=e.maxSize),"disabled"in e&&l(1,o=e.disabled),"files"in e&&l(0,a=e.files),"removelabel"in e&&l(2,r=e.removelabel)},e.$$.update=()=>{1&e.$$.dirty&&l(0,a=a||[]),64&e.$$.dirty&&l(6,t=t||void 0)},s=M(s),[a,o,r,function(e){let s=["mc-fileuploader__file"];return!function(e){const s=!i||function(e){if(i&&i.length>0){const s=e.slice(2+(e.lastIndexOf(".")-1>>>0));if(i&&!i.includes(String(s)))return!1}return!0}(e.name),l=function(e){const s=e/1024/1024;if(t&&s>t)return!1;return!0}(e.size);if(!s||!l)return!1;return!0}(e)?s.push("mc-fileuploader__file--is-invalid"):s.push("mc-fileuploader__file--is-valid"),s.join(" ")},p,s,t,i,e=>p(e)]}class A extends e{constructor(e){super(),s(this,e,I,D,l,{allowedExtensions:7,maxSize:6,disabled:1,files:0,removelabel:2},b)}}export{A as default};
|
|
266
2
|
//# sourceMappingURL=ResultFile.nested.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultFile.nested.js","sources":["../../../src/components/fileuploader/ResultFile.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n // @ts-nocheck\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let allowedExtensions: [];\n export let maxSize: number;\n export let disabled = false;\n export let files: FileList;\n export let removelabel = 'Remove';\n\n let eventHandler = new EventHandler();\n $: files = files ? (files as FileList) : [];\n $: maxSize = maxSize ? maxSize : undefined;\n\n function setClasses(file: File): string {\n let classes = ['mc-fileuploader__file'];\n\n if (checkFileStatus(file)) classes.push('mc-fileuploader__file--is-valid');\n else classes.push('mc-fileuploader__file--is-invalid');\n return classes.join(' ');\n }\n\n function checkFileExtension(fileName: string): boolean {\n if (allowedExtensions && allowedExtensions.length > 0) {\n const extension: string = fileName.slice(\n ((fileName.lastIndexOf('.') - 1) >>> 0) + 2,\n );\n if (allowedExtensions && !allowedExtensions.includes(String(extension))) {\n return false; // invalid\n }\n }\n\n return true; // valid\n }\n\n function checkFileSize(fileSize: number): boolean {\n const fileSizeMB = fileSize / 1024 / 1024; // in MB\n if (maxSize && fileSizeMB > maxSize) {\n return false; // invalid\n }\n\n return true; // valid\n }\n function checkFileStatus(file: File): boolean {\n const validExtension = allowedExtensions\n ? checkFileExtension(file.name)\n : true;\n const validSize = checkFileSize(file.size);\n\n if (!validExtension || !validSize) {\n return false; // invalid\n }\n\n return true; // valid\n }\n\n function deleteFile(file) {\n eventHandler.dispatch('file-removed', file);\n }\n</script>\n\n<ul class=\"mc-fileuploader__files\">\n {#each files as file, index}\n <li id={`file-${index}`} class=\"{setClasses(file)} {$$props.class}\">\n <span class=\"mc-fileuploader__file-name\">{file.name}</span>\n <span class=\"mc-fileuploader__file-icon\"> </span>\n <button\n type=\"button\"\n class=\"mc-fileuploader__delete\"\n aria-label={removelabel}\n {disabled}\n on:click={() => deleteFile(file)}\n />\n </li>\n {/each}\n</ul>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.file-uploader';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"ResultFile.nested.js","sources":["../../../src/components/fileuploader/ResultFile.nested.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n // @ts-nocheck\n import { EventHandler } from '../../utilities/EventHandler';\n\n export let allowedExtensions: [];\n export let maxSize: number;\n export let disabled = false;\n export let files: FileList;\n export let removelabel = 'Remove';\n\n let eventHandler = new EventHandler();\n $: files = files ? (files as FileList) : [];\n $: maxSize = maxSize ? maxSize : undefined;\n\n function setClasses(file: File): string {\n let classes = ['mc-fileuploader__file'];\n\n if (checkFileStatus(file)) classes.push('mc-fileuploader__file--is-valid');\n else classes.push('mc-fileuploader__file--is-invalid');\n return classes.join(' ');\n }\n\n function checkFileExtension(fileName: string): boolean {\n if (allowedExtensions && allowedExtensions.length > 0) {\n const extension: string = fileName.slice(\n ((fileName.lastIndexOf('.') - 1) >>> 0) + 2,\n );\n if (allowedExtensions && !allowedExtensions.includes(String(extension))) {\n return false; // invalid\n }\n }\n\n return true; // valid\n }\n\n function checkFileSize(fileSize: number): boolean {\n const fileSizeMB = fileSize / 1024 / 1024; // in MB\n if (maxSize && fileSizeMB > maxSize) {\n return false; // invalid\n }\n\n return true; // valid\n }\n function checkFileStatus(file: File): boolean {\n const validExtension = allowedExtensions\n ? checkFileExtension(file.name)\n : true;\n const validSize = checkFileSize(file.size);\n\n if (!validExtension || !validSize) {\n return false; // invalid\n }\n\n return true; // valid\n }\n\n function deleteFile(file) {\n eventHandler.dispatch('file-removed', file);\n }\n</script>\n\n<ul class=\"mc-fileuploader__files\">\n {#each files as file, index}\n <li id={`file-${index}`} class=\"{setClasses(file)} {$$props.class}\">\n <span class=\"mc-fileuploader__file-name\">{file.name}</span>\n <span class=\"mc-fileuploader__file-icon\"> </span>\n <button\n type=\"button\"\n class=\"mc-fileuploader__delete\"\n aria-label={removelabel}\n {disabled}\n on:click={() => deleteFile(file)}\n />\n </li>\n {/each}\n</ul>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/all-settings';\n @import '@mozaic-ds/styles/components/c.file-uploader';\n</style>\n"],"names":["t0_value","ctx","name","attr","li","li_class_value","class","insert","target","anchor","append","span0","span1","button","dirty","set_data","t0","length","i","ul","allowedExtensions","$$props","maxSize","disabled","files","removelabel","eventHandler","EventHandler","deleteFile","file","dispatch","$$invalidate","undefined","classes","validExtension","fileName","extension","slice","lastIndexOf","includes","String","checkFileExtension","validSize","fileSize","fileSizeMB","checkFileSize","size","checkFileStatus","push","join"],"mappings":"w7RAkEgDA,EAAAC,MAAKC,KAAI,uVAKrCD,EAAW,qCANXA,EAAK,OAAYE,EAAAC,EAAA,QAAAC,EAAAJ,EAAW,GAAAA,EAAQ,KAAA,IAAAA,KAAQK,MAAK,2BAAjEC,EAUIC,EAAAJ,EAAAK,GATFC,EAA0DN,EAAAO,iBAC1DD,EAAqDN,EAAAQ,UACrDF,EAMCN,EAAAS,iDARyC,EAAAC,GAAAd,KAAAA,EAAAC,MAAKC,KAAI,KAAAa,EAAAC,EAAAhB,yBAKrCC,EAAW,2BANM,GAAAa,GAAAT,KAAAA,EAAAJ,EAAW,GAAAA,EAAQ,KAAA,IAAAA,KAAQK,MAAK,kFAD5DL,EAAK,wBAAVgB,OAAIC,GAAA,0IADRX,EAcIC,EAAAW,EAAAV,mFAbKR,EAAK,WAAVgB,OAAIC,GAAA,EAAA,iHAAJD,+EA1DSG,GAAqBC,WACrBC,GAAeD,GACfE,SAAAA,GAAW,GAAKF,SAChBG,GAAeH,GACfI,YAAAA,EAAc,UAAQJ,EAE7BK,MAAmBC,EA8Cd,SAAAC,EAAWC,GAClBH,EAAaI,SAAS,eAAgBD,uQA9CrCE,EAAA,EAAAP,EAAQA,GAA2B,uBACnCF,EAAUA,QAAoBU,kBAExB,SAAWH,GACd,IAAAI,GAAW,gCA4BR,SAAgBJ,SACjBK,GAAiBd,GAtBhB,SAAmBe,GACtB,GAAAf,GAAqBA,EAAkBH,OAAS,EAAC,CAC7C,MAAAmB,EAAoBD,EAASE,MACS,GAAxCF,EAASG,YAAY,KAAO,IAAO,IAEnC,GAAAlB,IAAsBA,EAAkBmB,SAASC,OAAOJ,WACnD,SAIJ,EAaHK,CAAmBZ,EAAK3B,MAEtBwC,EAZC,SAAcC,GACf,MAAAC,EAAaD,EAAW,KAAO,QACjCrB,GAAWsB,EAAatB,SACnB,SAGF,EAMWuB,CAAchB,EAAKiB,MAEhC,IAAAZ,IAAmBQ,SACf,SAGF,EApCHK,CAAgBlB,GACfI,EAAQe,KAAK,qCADSf,EAAQe,KAAK,mCAEjCf,EAAQgB,KAAK,cAoDApB,GAAAD,EAAWC"}
|
|
@@ -1,175 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/* src/components/flag/Flag.svelte generated by Svelte v3.58.0 */
|
|
4
|
-
|
|
5
|
-
function create_fragment(ctx) {
|
|
6
|
-
let div;
|
|
7
|
-
let span;
|
|
8
|
-
let t;
|
|
9
|
-
let div_class_value;
|
|
10
|
-
|
|
11
|
-
let div_levels = [
|
|
12
|
-
{
|
|
13
|
-
class: div_class_value = "" + (setClasses(/*theme*/ ctx[2], /*bordered*/ ctx[0]) + " " + /*userClass*/ ctx[4])
|
|
14
|
-
},
|
|
15
|
-
/*attributes*/ ctx[3]
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
let div_data = {};
|
|
19
|
-
|
|
20
|
-
for (let i = 0; i < div_levels.length; i += 1) {
|
|
21
|
-
div_data = assign(div_data, div_levels[i]);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
c() {
|
|
26
|
-
div = element("div");
|
|
27
|
-
span = element("span");
|
|
28
|
-
t = text(/*label*/ ctx[1]);
|
|
29
|
-
this.c = noop;
|
|
30
|
-
attr(span, "class", "mc-flag__label");
|
|
31
|
-
set_attributes(div, div_data);
|
|
32
|
-
},
|
|
33
|
-
m(target, anchor) {
|
|
34
|
-
insert(target, div, anchor);
|
|
35
|
-
append(div, span);
|
|
36
|
-
append(span, t);
|
|
37
|
-
},
|
|
38
|
-
p(ctx, [dirty]) {
|
|
39
|
-
if (dirty & /*label*/ 2) set_data(t, /*label*/ ctx[1]);
|
|
40
|
-
|
|
41
|
-
set_attributes(div, div_data = get_spread_update(div_levels, [
|
|
42
|
-
dirty & /*theme, bordered, userClass*/ 21 && div_class_value !== (div_class_value = "" + (setClasses(/*theme*/ ctx[2], /*bordered*/ ctx[0]) + " " + /*userClass*/ ctx[4])) && { class: div_class_value },
|
|
43
|
-
dirty & /*attributes*/ 8 && /*attributes*/ ctx[3]
|
|
44
|
-
]));
|
|
45
|
-
},
|
|
46
|
-
i: noop,
|
|
47
|
-
o: noop,
|
|
48
|
-
d(detaching) {
|
|
49
|
-
if (detaching) detach(div);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function getAppearanceClass(theme, isBordered) {
|
|
55
|
-
if (!isBordered && !theme) {
|
|
56
|
-
return '';
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const type = isBordered ? 'bordered' : 'solid';
|
|
60
|
-
|
|
61
|
-
if (theme) {
|
|
62
|
-
return `mc-flag--${type}-${theme}`;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return `mc-flag--${type}`;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function setClasses(theme, isBordered) {
|
|
69
|
-
const classes = ['mc-flag'];
|
|
70
|
-
const appearanceClass = getAppearanceClass(theme, isBordered);
|
|
71
|
-
|
|
72
|
-
if (appearanceClass) {
|
|
73
|
-
classes.push(appearanceClass);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return classes.join(' ');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function instance($$self, $$props, $$invalidate) {
|
|
80
|
-
let userClass;
|
|
81
|
-
let attributes;
|
|
82
|
-
const omit_props_names = ["bordered","label","theme"];
|
|
83
|
-
let $$restProps = compute_rest_props($$props, omit_props_names);
|
|
84
|
-
let { bordered = false } = $$props;
|
|
85
|
-
let { label } = $$props;
|
|
86
|
-
let { theme } = $$props;
|
|
87
|
-
|
|
88
|
-
$$self.$$set = $$new_props => {
|
|
89
|
-
$$invalidate(6, $$props = assign(assign({}, $$props), exclude_internal_props($$new_props)));
|
|
90
|
-
$$invalidate(5, $$restProps = compute_rest_props($$props, omit_props_names));
|
|
91
|
-
if ('bordered' in $$new_props) $$invalidate(0, bordered = $$new_props.bordered);
|
|
92
|
-
if ('label' in $$new_props) $$invalidate(1, label = $$new_props.label);
|
|
93
|
-
if ('theme' in $$new_props) $$invalidate(2, theme = $$new_props.theme);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
$$self.$$.update = () => {
|
|
97
|
-
$$invalidate(4, userClass = $$props.class);
|
|
98
|
-
$$invalidate(3, attributes = Object.assign({}, $$restProps));
|
|
99
|
-
|
|
100
|
-
if ($$self.$$.dirty & /*attributes*/ 8) {
|
|
101
|
-
delete attributes.class;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
$$props = exclude_internal_props($$props);
|
|
106
|
-
return [bordered, label, theme, attributes, userClass];
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
class Flag extends SvelteElement {
|
|
110
|
-
constructor(options) {
|
|
111
|
-
super();
|
|
112
|
-
const style = document.createElement('style');
|
|
113
|
-
style.textContent = `.mc-flag{display:inline-block;font-size:0.875rem;margin:0;vertical-align:middle;line-height:1.786;font-family:"LeroyMerlin", sans-serif;font-weight:600}.mc-flag__label{line-height:1.1428571429;border:1px solid transparent;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0.25rem 0.5rem}.mc-flag .mc-flag__label{color:#ffffff;border-color:#188803;background-color:#188803}.mc-flag--solid-primary-02 .mc-flag__label{color:#ffffff;border-color:#494f60;background-color:#494f60}.mc-flag--solid-dark .mc-flag__label{color:#ffffff;border-color:#000000;background-color:#000000}.mc-flag--solid-light .mc-flag__label{color:#000000;border-color:#ffffff;background-color:#ffffff}.mc-flag--solid-danger .mc-flag__label{color:#ffffff;border-color:#c61112;background-color:#c61112}.mc-flag--bordered .mc-flag__label{color:#188803;border-color:#188803;background-color:#ffffff}.mc-flag--bordered-primary-02 .mc-flag__label{color:#494f60;border-color:#494f60;background-color:#ffffff}.mc-flag--bordered-dark .mc-flag__label{color:#000000;border-color:#000000;background-color:#ffffff}.mc-flag--bordered-light .mc-flag__label{color:#ffffff;border-color:#ffffff;background-color:#000000}.mc-flag--bordered-danger .mc-flag__label{color:#c61112;border-color:#c61112;background-color:#ffffff}`;
|
|
114
|
-
this.shadowRoot.appendChild(style);
|
|
115
|
-
|
|
116
|
-
init(
|
|
117
|
-
this,
|
|
118
|
-
{
|
|
119
|
-
target: this.shadowRoot,
|
|
120
|
-
props: attribute_to_object(this.attributes),
|
|
121
|
-
customElement: true
|
|
122
|
-
},
|
|
123
|
-
instance,
|
|
124
|
-
create_fragment,
|
|
125
|
-
safe_not_equal,
|
|
126
|
-
{ bordered: 0, label: 1, theme: 2 },
|
|
127
|
-
null
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
if (options) {
|
|
131
|
-
if (options.target) {
|
|
132
|
-
insert(options.target, this, options.anchor);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (options.props) {
|
|
136
|
-
this.$set(options.props);
|
|
137
|
-
flush();
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
static get observedAttributes() {
|
|
143
|
-
return ["bordered", "label", "theme"];
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
get bordered() {
|
|
147
|
-
return this.$$.ctx[0];
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
set bordered(bordered) {
|
|
151
|
-
this.$$set({ bordered });
|
|
152
|
-
flush();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
get label() {
|
|
156
|
-
return this.$$.ctx[1];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
set label(label) {
|
|
160
|
-
this.$$set({ label });
|
|
161
|
-
flush();
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
get theme() {
|
|
165
|
-
return this.$$.ctx[2];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
set theme(theme) {
|
|
169
|
-
this.$$set({ theme });
|
|
170
|
-
flush();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export { Flag as default };
|
|
1
|
+
import{S as e,i as r,a as o,b as l,f as a,s as f,c as t,e as c,t as s,n as d,g as n,h as b,j as i,k as g,m,o as h,p as u,q as _}from"../../index-c33b3772.js";function p(e){let r,o,a,f,u=[{class:f=$(e[2],e[0])+" "+e[4]},e[3]],_={};for(let e=0;e<u.length;e+=1)_=t(_,u[e]);return{c(){r=c("div"),o=c("span"),a=s(e[1]),this.c=d,n(o,"class","mc-flag__label"),b(r,_)},m(e,f){l(e,r,f),i(r,o),i(o,a)},p(e,[o]){2&o&&g(a,e[1]),b(r,_=m(u,[21&o&&f!==(f=$(e[2],e[0])+" "+e[4])&&{class:f},8&o&&e[3]]))},i:d,o:d,d(e){e&&h(r)}}}function $(e,r){const o=["mc-flag"],l=function(e,r){if(!r&&!e)return"";const o=r?"bordered":"solid";return e?`mc-flag--${o}-${e}`:`mc-flag--${o}`}(e,r);return l&&o.push(l),o.join(" ")}function k(e,r,o){let l,a;const f=["bordered","label","theme"];let c=u(r,f),{bordered:s=!1}=r,{label:d}=r,{theme:n}=r;return e.$$set=e=>{o(6,r=t(t({},r),_(e))),o(5,c=u(r,f)),"bordered"in e&&o(0,s=e.bordered),"label"in e&&o(1,d=e.label),"theme"in e&&o(2,n=e.theme)},e.$$.update=()=>{o(4,l=r.class),o(3,a=Object.assign({},c)),8&e.$$.dirty&&delete a.class},r=_(r),[s,d,n,a,l]}class x extends e{constructor(e){super();const t=document.createElement("style");t.textContent='.mc-flag{display:inline-block;font-size:0.875rem;margin:0;vertical-align:middle;line-height:1.786;font-family:"LeroyMerlin", sans-serif;font-weight:600}.mc-flag__label{line-height:1.1428571429;border:1px solid transparent;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0.25rem 0.5rem}.mc-flag .mc-flag__label{color:#ffffff;border-color:#188803;background-color:#188803}.mc-flag--solid-primary-02 .mc-flag__label{color:#ffffff;border-color:#494f60;background-color:#494f60}.mc-flag--solid-dark .mc-flag__label{color:#ffffff;border-color:#000000;background-color:#000000}.mc-flag--solid-light .mc-flag__label{color:#000000;border-color:#ffffff;background-color:#ffffff}.mc-flag--solid-danger .mc-flag__label{color:#ffffff;border-color:#c61112;background-color:#c61112}.mc-flag--bordered .mc-flag__label{color:#188803;border-color:#188803;background-color:#ffffff}.mc-flag--bordered-primary-02 .mc-flag__label{color:#494f60;border-color:#494f60;background-color:#ffffff}.mc-flag--bordered-dark .mc-flag__label{color:#000000;border-color:#000000;background-color:#ffffff}.mc-flag--bordered-light .mc-flag__label{color:#ffffff;border-color:#ffffff;background-color:#000000}.mc-flag--bordered-danger .mc-flag__label{color:#c61112;border-color:#c61112;background-color:#ffffff}',this.shadowRoot.appendChild(t),r(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},k,p,f,{bordered:0,label:1,theme:2},null),e&&(e.target&&l(e.target,this,e.anchor),e.props&&(this.$set(e.props),a()))}static get observedAttributes(){return["bordered","label","theme"]}get bordered(){return this.$$.ctx[0]}set bordered(e){this.$$set({bordered:e}),a()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),a()}get theme(){return this.$$.ctx[2]}set theme(e){this.$$set({theme:e}),a()}}export{x as default};
|
|
175
2
|
//# sourceMappingURL=Flag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flag.js","sources":["../../../src/components/flag/Flag.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { FlagTheme } from './flag.types';\n\n export let bordered = false;\n export let label: string;\n export let theme: FlagTheme;\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function getAppearanceClass(theme: FlagTheme, isBordered: boolean): string {\n if (!isBordered && !theme) {\n return '';\n }\n\n const type = isBordered ? 'bordered' : 'solid';\n\n if (theme) {\n return `mc-flag--${type}-${theme}`;\n }\n return `mc-flag--${type}`;\n }\n\n function setClasses(theme: FlagTheme, isBordered: boolean) {\n const classes = ['mc-flag'];\n\n const appearanceClass = getAppearanceClass(theme, isBordered);\n if (appearanceClass) {\n classes.push(appearanceClass);\n }\n\n return classes.join(' ');\n }\n</script>\n\n<div class=\"{setClasses(theme, bordered)} {userClass}\" {...attributes}>\n <span class=\"mc-flag__label\">{label}</span>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.flag';\n</style>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"Flag.js","sources":["../../../src/components/flag/Flag.svelte"],"sourcesContent":["<svelte:options tag={null} />\n\n<script lang=\"ts\">\n import type { FlagTheme } from './flag.types';\n\n export let bordered = false;\n export let label: string;\n export let theme: FlagTheme;\n $: userClass = $$props.class;\n $: attributes = { ...$$restProps };\n $: delete attributes.class;\n\n function getAppearanceClass(theme: FlagTheme, isBordered: boolean): string {\n if (!isBordered && !theme) {\n return '';\n }\n\n const type = isBordered ? 'bordered' : 'solid';\n\n if (theme) {\n return `mc-flag--${type}-${theme}`;\n }\n return `mc-flag--${type}`;\n }\n\n function setClasses(theme: FlagTheme, isBordered: boolean) {\n const classes = ['mc-flag'];\n\n const appearanceClass = getAppearanceClass(theme, isBordered);\n if (appearanceClass) {\n classes.push(appearanceClass);\n }\n\n return classes.join(' ');\n }\n</script>\n\n<div class=\"{setClasses(theme, bordered)} {userClass}\" {...attributes}>\n <span class=\"mc-flag__label\">{label}</span>\n</div>\n\n<style lang=\"scss\">\n @import '@mozaic-ds/styles/settings-tools/_all-settings';\n @import '@mozaic-ds/styles/components/c.flag';\n</style>\n"],"names":["class","div_class_value","setClasses","ctx","insert","target","div","anchor","append","span","dirty","theme","isBordered","classes","appearanceClass","type","getAppearanceClass","push","join","bordered","$$props","label","$$invalidate","userClass","attributes","Object","assign","$$restProps"],"mappings":"4LAqCaA,MAAAC,EAAAC,EAAWC,EAAO,GAAAA,UAAYA,EAAS,IAAOA,EAAU,uFACrCA,EAAK,0DADrCC,EAEKC,EAAAC,EAAAC,GADHC,EAA0CF,EAAAG,6BAAZN,EAAK,eADxB,GAAAO,GAAAT,KAAAA,EAAAC,EAAWC,EAAO,GAAAA,UAAYA,EAAS,KAAA,CAAAH,MAAAC,QAAOE,EAAU,uCAZ1DD,EAAWS,EAAkBC,GAC9B,MAAAC,GAAW,WAEXC,WAhBoBH,EAAkBC,GACvC,IAAAA,IAAeD,QACX,GAGH,MAAAI,EAAOH,EAAa,WAAa,eAEnCD,EACiB,YAAAI,KAAQJ,gBAEVI,IAMKC,CAAmBL,EAAOC,UAC9CE,GACFD,EAAQI,KAAKH,GAGRD,EAAQK,KAAK,kFA5BXC,SAAAA,GAAW,GAAKC,SAChBC,GAAaD,SACbT,GAAgBS,sKACxBE,EAAA,EAAAC,EAAYH,EAAQpB,WACpBwB,EAALC,OAAAC,UAAuBC,yBACXH,EAAWxB"}
|