scb-wc 0.1.78 → 0.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -22
- package/all.js +0 -2
- package/index.js +88 -90
- package/mvc/components/all.js +0 -2
- package/mvc/components/scb-accordion/scb-accordion-item.js +3 -173
- package/mvc/components/scb-accordion/scb-accordion.js +4 -33
- package/mvc/components/scb-app-bar/scb-app-bar.js +2 -110
- package/mvc/components/scb-avatar/scb-avatar.js +2 -94
- package/mvc/components/scb-badge/scb-badge.js +2 -72
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -12
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +4 -91
- package/mvc/components/scb-button/scb-button.js +47 -309
- package/mvc/components/scb-calendar/scb-calendar-event.js +2 -6
- package/mvc/components/scb-calendar/scb-calendar.js +6 -120
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +21 -350
- package/mvc/components/scb-card/scb-card.js +54 -819
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +3 -31
- package/mvc/components/scb-checkbox/scb-checkbox.js +5 -127
- package/mvc/components/scb-chip/scb-chip.js +2 -76
- package/mvc/components/scb-collapse/scb-collapse.js +2 -44
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +7 -73
- package/mvc/components/scb-dialog/scb-dialog.js +2 -213
- package/mvc/components/scb-divider/scb-divider.js +1 -69
- package/mvc/components/scb-drawer/scb-drawer.js +6 -102
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +2 -410
- package/mvc/components/scb-dropdown/scb-dropdown.js +17 -222
- package/mvc/components/scb-fab/scb-fab.js +7 -95
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +2 -69
- package/mvc/components/scb-fact-card/scb-fact-card.js +2 -214
- package/mvc/components/scb-footer/scb-footer-section.js +1 -3
- package/mvc/components/scb-footer/scb-footer.js +3 -172
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +2 -112
- package/mvc/components/scb-grid/scb-grid-item.js +1 -32
- package/mvc/components/scb-grid/scb-grid.js +1 -99
- package/mvc/components/scb-grid/scb-stack.js +1 -33
- package/mvc/components/scb-header/scb-header-menu-item.js +1 -5
- package/mvc/components/scb-header/scb-header-tab.js +1 -5
- package/mvc/components/scb-header/scb-header.js +75 -888
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +43 -168
- package/mvc/components/scb-icon-button/scb-icon-button.js +59 -171
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +17 -218
- package/mvc/components/scb-link/scb-link.js +4 -55
- package/mvc/components/scb-list/scb-list-item.js +23 -126
- package/mvc/components/scb-list/scb-list.js +5 -26
- package/mvc/components/scb-menu/scb-menu-item.js +16 -190
- package/mvc/components/scb-menu/scb-menu-section.js +4 -36
- package/mvc/components/scb-menu/scb-menu.js +5 -69
- package/mvc/components/scb-menu/scb-sub-menu.js +2 -7
- package/mvc/components/scb-nav/scb-nav-item.js +1 -28
- package/mvc/components/scb-nav/scb-nav.js +5 -98
- package/mvc/components/scb-notification-card/scb-notification-card.js +7 -364
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +3 -50
- package/mvc/components/scb-options-menu/scb-options-menu.js +2 -82
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +2 -31
- package/mvc/components/scb-overlay/scb-overlay.js +3 -43
- package/mvc/components/scb-pagination/scb-pagination.js +19 -221
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +2 -67
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +4 -121
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +2 -56
- package/mvc/components/scb-radio-button/scb-radio-button.js +5 -116
- package/mvc/components/scb-radio-button/scb-radio-group.js +2 -32
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +2 -61
- package/mvc/components/scb-search/scb-search.js +5 -249
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +1 -32
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +2 -70
- package/mvc/components/scb-select/scb-select-option.js +2 -54
- package/mvc/components/scb-select/scb-select.js +4 -244
- package/mvc/components/scb-skeleton/scb-skeleton.js +2 -35
- package/mvc/components/scb-slider/scb-slider.js +5 -9
- package/mvc/components/scb-snackbar/scb-snackbar.js +9 -84
- package/mvc/components/scb-status-pill/scb-status-pill.js +2 -43
- package/mvc/components/scb-stepper/scb-step.js +8 -186
- package/mvc/components/scb-stepper/scb-stepper.js +2 -130
- package/mvc/components/scb-switch/scb-switch.js +4 -49
- package/mvc/components/scb-table/scb-table.js +2 -48
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +2 -53
- package/mvc/components/scb-tabs/scb-primary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-secondary-tab.js +2 -7
- package/mvc/components/scb-tabs/scb-tabs.js +4 -31
- package/mvc/components/scb-textfield/scb-textfield.js +142 -388
- package/mvc/components/scb-toc/scb-toc-item.js +3 -251
- package/mvc/components/scb-toc/scb-toc.js +2 -16
- package/mvc/components/scb-tooltip/scb-tooltip.js +8 -155
- package/mvc/components/scb-viz/scb-viz.js +4 -619
- package/mvc/scb-wc-core.css +1 -1
- package/mvc/scb-wc-selfhost.css +1 -1
- package/mvc/scb-wc.css +1 -1
- package/mvc/vendor/assist-chip.js +3 -3
- package/mvc/vendor/chip-set.js +1 -1
- package/mvc/vendor/chip.js +2 -2
- package/mvc/vendor/elevation.js +2 -2
- package/mvc/vendor/filter-chip.js +1 -1
- package/mvc/vendor/focusable.js +1 -1
- package/mvc/vendor/form-associated.js +1 -1
- package/mvc/vendor/icon.js +2 -2
- package/mvc/vendor/lazy-focus-ring.js +2 -0
- package/mvc/vendor/lazy-ripple.js +2 -0
- package/mvc/vendor/md-focus-ring.js +2 -2
- package/mvc/vendor/ripple.js +2 -2
- package/mvc/vendor/scb-card-variants.internal.js +284 -0
- package/mvc/vendor/scb-chevron.js +10 -0
- package/mvc/vendor/scb-header-drawer.internal.js +71 -0
- package/mvc/vendor/shared-styles.js +1 -1
- package/mvc/vendor/tab-styles.js +3 -3
- package/mvc/vendor/validator.js +1 -1
- package/mvc/vendor/vendor.js +3 -4
- package/package.json +2 -2
- package/scb-accordion/scb-accordion-item.js +33 -32
- package/scb-app-bar/scb-app-bar.js +1 -1
- package/scb-button/scb-button.js +287 -259
- package/scb-calendar/scb-calendar.js +49 -49
- package/scb-calendar-card/scb-calendar-card.js +105 -59
- package/scb-card/scb-card-variants.internal.js +230 -0
- package/scb-card/scb-card.js +387 -528
- package/scb-checkbox/scb-checkbox.js +0 -1
- package/scb-chevron/scb-chevron.js +0 -1
- package/scb-components/scb-button/scb-button.d.ts +14 -2
- package/scb-components/scb-calendar/scb-calendar.d.ts +1 -0
- package/scb-components/scb-calendar-card/scb-calendar-card.d.ts +16 -4
- package/scb-components/scb-card/scb-card-variants.internal.d.ts +15 -0
- package/scb-components/scb-card/scb-card.d.ts +26 -9
- package/scb-components/scb-cookies-consent/scb-cookies-consent.d.ts +3 -0
- package/scb-components/scb-header/scb-header-drawer.internal.d.ts +31 -0
- package/scb-components/scb-header/scb-header.d.ts +1 -2
- package/scb-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +6 -1
- package/scb-components/scb-icon-button/scb-icon-button.d.ts +28 -29
- package/scb-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +13 -4
- package/scb-components/scb-list/scb-list-item.d.ts +20 -2
- package/scb-components/scb-list/scb-list.d.ts +1 -2
- package/scb-components/scb-nav/scb-nav.d.ts +2 -0
- package/scb-components/scb-segmented-button/scb-segmented-item.d.ts +1 -0
- package/scb-components/scb-select/scb-select-option.d.ts +2 -0
- package/scb-components/scb-toc/scb-toc-item.d.ts +1 -0
- package/scb-components/scb-tooltip/scb-tooltip.d.ts +2 -0
- package/scb-cookies-consent/scb-cookies-consent.js +43 -31
- package/scb-datepicker/scb-datepicker.js +27 -25
- package/scb-dialog/scb-dialog.js +1 -1
- package/scb-dropdown/scb-dropdown.js +29 -28
- package/scb-header/scb-header-drawer.internal.js +78 -0
- package/scb-header/scb-header.js +41 -89
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +181 -88
- package/scb-icon-button/scb-icon-button.js +293 -205
- package/scb-keyfigure-card/scb-keyfigure-card.js +96 -43
- package/scb-list/scb-list-item.js +117 -52
- package/scb-list/scb-list.js +9 -9
- package/scb-nav/scb-nav.js +26 -23
- package/scb-notification-card/scb-notification-card.js +0 -2
- package/scb-options-menu/scb-options-menu-item.js +20 -20
- package/scb-pagination/scb-pagination.js +0 -1
- package/scb-progress-stepper/scb-progress-step.js +19 -17
- package/scb-radio-button/scb-radio-button.js +0 -1
- package/scb-search/scb-search.js +29 -28
- package/scb-segmented-button/scb-segmented-item.js +22 -19
- package/scb-select/scb-select-option.js +20 -14
- package/scb-select/scb-select.js +26 -26
- package/scb-stepper/scb-step.js +34 -31
- package/scb-textfield/scb-textfield.js +39 -39
- package/scb-toc/scb-toc-item.js +26 -26
- package/scb-tooltip/scb-tooltip.js +5 -4
- package/scb-viz/scb-viz.js +1 -1
- package/scb-wc-core.css +1 -1
- package/scb-wc-public-entry/index.d.ts +97 -0
- package/scb-wc-selfhost.css +1 -1
- package/scb-wc.bundle.js +1873 -1476
- package/scb-wc.css +1 -1
- package/scb-wc.d.ts +194 -198
- package/mvc/components/scb-chevron/scb-chevron.js +0 -41
- package/mvc/components/scb-datepicker/scb-datepicker.js +0 -296
- package/mvc/vendor/element-internals.js +0 -1
- package/mvc/vendor/filled-icon-button.js +0 -2
- package/mvc/vendor/filled-tonal-icon-button.js +0 -2
- package/mvc/vendor/form-label-activation.js +0 -1
- package/mvc/vendor/form-submitter.js +0 -1
- package/mvc/vendor/icon-button.js +0 -2
- package/mvc/vendor/list.js +0 -8
- package/mvc/vendor/outlined-icon-button.js +0 -2
- package/mvc/vendor/shared-styles2.js +0 -30
- package/scb-components/index.d.ts +0 -99
- package/scb-components/scb-chevron/scb-chevron.d.ts +0 -11
- package/scb-components/scb-datepicker/scb-datepicker.d.ts +0 -39
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as g,b as f,g as b,h as l,m as p,y as n}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as a}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";(function(){try{var m=typeof globalThis<"u"?globalThis:window;if(!m.__scb_ce_guard_installed__){m.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,t,r){try{customElements.get(i)||e(i,t,r)}catch(d){var o=String(d||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var v,s=(v=class extends g{constructor(){super(),this._internals=null,this.type="default",this.name="",this.multiple=!1,this.label="",this.supportingText="",this.metaText="",this.buttonLabel="",this.replaceButtonLabel="",this.removeButtonLabel="",this.previewEyebrow="",this.emptyPreviewTitle="",this.emptyPreviewMeta="",this.accept="",this.hidePreview=!1,this.showExistingPreview=!1,this.disabled=!1,this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this.existingValue="",this.existingValueName="",this.removeValueName="",this._isDragOver=!1,this._selectedPreviewKind="empty",this._selectedPreviewSrc="",this._selectedPreviewAlt="",this._selectedPreviewTitle="",this._selectedPreviewMeta="",this._selectedPreviewItems=[],this._markedForRemoval=!1,this._dragDepth=0,this._previewSource="external",this._form=null,this._formDataHandler=null,"attachInternals"in this&&(this._internals=this.attachInternals())}get _resolvedAccept(){return this.accept.trim()||(this.type==="image"?"image/*,.png,.jpg,.jpeg,.webp,.svg,.gif,.bmp,.avif":"")}get _hasExistingPreview(){return this.multiple||this._markedForRemoval||!(this.existingValue.trim()||this.previewSrc.trim()||this.previewTitle.trim()||this.previewMeta.trim())?!1:this.showExistingPreview||!!this.previewSrc.trim()}get _resolvedPreviewKind(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewSrc.trim()?"image":"file":this._selectedPreviewKind}get _hasPreview(){return this._resolvedPreviewKind!=="empty"}get _resolvedLabel(){return this.label||(this.type==="image"?"Ladda upp bild":"Ladda upp fil")}get _resolvedSupportingText(){return this.multiple?this.supportingText||(this.type==="image"?"Dra och släpp en eller flera bilder här, eller välj bilder från din dator.":"Dra och släpp en eller flera filer här, eller välj filer från din dator."):this.supportingText||(this.type==="image"?"Dra och släpp en bild här, eller välj en bild från din dator.":"Dra och släpp en fil här, eller välj en fil från din dator.")}get _resolvedMetaText(){return this.metaText?this.metaText:this.type==="image"?"PNG, JPG, SVG, GIF, BMP, AVIF och WebP stöds.":"Alla filtyper stöds."}get _resolvedButtonLabel(){return this.buttonLabel||(this.type==="image"?"Välj bild":"Välj fil")}get _resolvedReplaceButtonLabel(){return this.replaceButtonLabel?this.replaceButtonLabel:this.multiple||this._resolvedPreviewKind==="multi"?"Lägg till fler filer":this._previewSource==="external"&&this._hasExistingPreview?this._resolvedPreviewKind==="image"?"Ersätt bild":"Ersätt fil":this._resolvedPreviewKind==="image"?"Byt bild":"Byt fil"}get _resolvedRemoveButtonLabel(){return this.removeButtonLabel?this.removeButtonLabel:this._resolvedPreviewKind==="multi"?"Ta bort filer":this._previewSource==="external"&&this._hasExistingPreview?this._resolvedPreviewKind==="image"?"Ta bort befintlig bild":"Ta bort befintlig fil":this._resolvedPreviewKind==="image"?"Ta bort bild":"Ta bort fil"}get _resolvedPreviewEyebrow(){return this.previewEyebrow?this.previewEyebrow:this._hasPreview?this._resolvedPreviewKind==="multi"?"Uppladdade filer":this._previewSource==="external"&&this._hasExistingPreview?this._resolvedPreviewKind==="image"?"Befintlig bild":"Befintlig fil":this._resolvedPreviewKind==="image"?"Uppladdad bild":"Uppladdad fil":"Förhandsvisning"}get _resolvedEmptyPreviewTitle(){return this.emptyPreviewTitle?this.emptyPreviewTitle:this.multiple?this.type==="image"?"Inga bilder uppladdade":"Inga filer uppladdade":this.type==="image"?"Ingen bild uppladdad":"Ingen fil uppladdad"}get _resolvedEmptyPreviewMeta(){return this.emptyPreviewMeta?this.emptyPreviewMeta:this.multiple?this.type==="image"?"Förhandsvisningen visas här när du har laddat upp bilder.":"Förhandsvisningen visas här när du har laddat upp filer.":this.type==="image"?"Förhandsvisningen visas här när du har laddat upp en bild.":"Förhandsvisningen visas här när du har laddat upp en fil."}get _resolvedPreviewSrc(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewSrc.trim():this._selectedPreviewSrc}get _resolvedPreviewAlt(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewAlt:this._selectedPreviewAlt}get _resolvedPreviewTitle(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewTitle||(this._resolvedPreviewKind==="image"?"Befintlig bild":"Befintlig fil"):this._selectedPreviewTitle}get _resolvedPreviewMeta(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewMeta:this._selectedPreviewMeta}connectedCallback(){super.connectedCallback(),this._syncFormValue(),this._form=this.closest("form"),this._form&&(this._formDataHandler=e=>{const i=e.formData;i&&this._appendToFormData(i)},this._form.addEventListener("formdata",this._formDataHandler))}disconnectedCallback(){this._form&&this._formDataHandler&&this._form.removeEventListener("formdata",this._formDataHandler),this._formDataHandler=null,this._form=null,this._revokeObjectUrl(),super.disconnectedCallback()}updated(e){e.has("type")&&this.type==="image"&&this._selectedPreviewKind==="file"&&this._clearSelectedFileState(),(e.has("disabled")||e.has("name")||e.has("multiple")||e.has("existingValueName")||e.has("removeValueName")||e.has("existingValue"))&&this._syncFormValue()}formDisabledCallback(e){this.disabled=e}formResetCallback(){this._clearSelectedFileState(),this._markedForRemoval=!1,this._previewSource="external",this._clearNativeInputValue(),this._syncFormValue()}_syncFormValue(){if(!this._internals)return;const e=this.name.trim(),i=this.existingValueName.trim(),t=this.removeValueName.trim(),r=new FormData;if(!this.disabled&&e&&this._selectedPreviewItems.length&&this._selectedPreviewItems.forEach(o=>{r.append(e,o.file,o.file.name)}),!this.disabled&&!this.multiple&&i&&this.existingValue.trim()&&r.append(i,this.existingValue),!this.disabled&&!this.multiple&&t&&r.append(t,this._markedForRemoval?"true":"false"),[...r.keys()].length===0){this._internals.setFormValue(null);return}this._internals.setFormValue(r)}_appendToFormData(e){if(this.disabled)return;const i=this.name.trim();if(i&&this._selectedPreviewItems.length&&(e.getAll(i).some(t=>t instanceof File&&this._selectedPreviewItems.some(r=>r.file===t))||this._selectedPreviewItems.forEach(t=>{e.append(i,t.file,t.file.name)})),!this.multiple){const t=this.existingValueName.trim();t&&this.existingValue.trim()&&!e.has(t)&&e.append(t,this.existingValue);const r=this.removeValueName.trim();r&&!e.has(r)&&e.append(r,this._markedForRemoval?"true":"false")}}openPicker(){if(this.disabled)return;const e=this.renderRoot.querySelector('[data-role="native-input"]');if(e){try{e.value=""}catch{}e.click()}}setPreviewState(e){this.previewSrc=e?.src??"",this.previewAlt=e?.alt??"",this.previewTitle=e?.title??"",this.previewMeta=e?.meta??"",this._markedForRemoval=!1,this._previewSource=this._selectedPreviewItems.length?"internal":"external",this._syncFormValue()}setExistingFileState(e){if(this.multiple){this.existingValue="",this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this._markedForRemoval=!1,this._syncFormValue();return}this.existingValue=e?.value??"",this.previewSrc=e?.src??"",this.previewAlt=e?.alt??"",this.previewTitle=e?.title??"",this.previewMeta=e?.meta??"",this._markedForRemoval=!1,this._previewSource=this._selectedPreviewItems.length?"internal":"external",this._syncFormValue()}clearPreviewState(){this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this._markedForRemoval=!1,this._previewSource="external",this._clearSelectedFileState(),this._clearNativeInputValue(),this._syncFormValue()}clearExistingFileState(){this.existingValue="",this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this._markedForRemoval=!1,this._selectedPreviewItems.length||(this._previewSource="external"),this._syncFormValue()}_dispatch(e,i={},t=!1){const r=new CustomEvent(e,{detail:i,bubbles:!0,composed:!0,cancelable:t});return this.dispatchEvent(r),r}_handleFiles(e){const i=Array.from(e??[]).filter(o=>this._isAcceptedFile(o));if(!i.length)return;const t=this.multiple?i:[i[0]];this._setSelectedFilesState(t,this.multiple);const r=this._selectedPreviewItems.map(o=>o.file);this._dispatch("file-selected",{file:r[0],files:r,addedFiles:t,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval}),this._dispatch("change",{file:r[0],files:r,addedFiles:t,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval})}_onZoneClick(e){this.disabled||e.composedPath().some(i=>i instanceof HTMLElement&&i.getAttribute("data-role")==="choose-button")||this.openPicker()}_onZoneKeydown(e){this.disabled||(e.key==="Enter"||e.key===" "||e.key==="Spacebar")&&(e.preventDefault(),this.openPicker())}_preventDefaultDrag(e){e.preventDefault(),e.stopPropagation()}_onDragEnter(e){this.disabled||(this._preventDefaultDrag(e),this._dragDepth+=1,this._isDragOver=!0)}_onDragOver(e){this.disabled||(this._preventDefaultDrag(e),this._isDragOver=!0)}_onDragLeave(e){this.disabled||(this._preventDefaultDrag(e),this._dragDepth=Math.max(0,this._dragDepth-1),this._dragDepth||(this._isDragOver=!1))}_onDrop(e){this.disabled||(this._preventDefaultDrag(e),this._dragDepth=0,this._isDragOver=!1,this._handleFiles(e.dataTransfer?.files??null))}_onNativeInputChange(e){const i=e.currentTarget;this._handleFiles(i?.files??null)}_onChooseButtonClick(e){e.preventDefault(),e.stopPropagation(),this.openPicker()}_onReplaceButtonClick(e){e.preventDefault(),e.stopPropagation(),this.openPicker()}_onRemoveButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this._dispatch("clear-request",{file:this._selectedPreviewItems[0]?.file??null,files:this._selectedPreviewItems.map(i=>i.file),existingValue:this.existingValue,markedForRemoval:this._markedForRemoval},!0).defaultPrevented){if(this._selectedPreviewItems.length){this._clearSelectedFileState(),this._clearNativeInputValue(),this._previewSource=this._hasExistingPreview?"external":"internal",this._dispatch("change",{file:null,files:[],existingValue:this.existingValue,markedForRemoval:this._markedForRemoval});return}if(this._hasExistingPreview){this._markedForRemoval=!0,this._previewSource="external",this._syncFormValue(),this.requestUpdate(),this._dispatch("change",{file:null,files:[],existingValue:this.existingValue,markedForRemoval:!0});return}this.clearPreviewState()}}_onRemoveSelectedItemClick(e){if(e.preventDefault(),e.stopPropagation(),this.disabled)return;const i=e.currentTarget?.getAttribute("data-index")||"",t=Number.parseInt(i,10);Number.isInteger(t)&&this._removeSelectedItemAt(t)}_isAcceptedFile(e){const i=this._resolvedAccept.trim();if(!i)return!0;const t=e.name.toLowerCase(),r=(e.type||"").toLowerCase(),o=i.split(",").map(d=>d.trim().toLowerCase()).filter(Boolean);return o.length?o.some(d=>d==="*/*"?!0:d.endsWith("/*")?r.startsWith(d.slice(0,-1)):d.startsWith(".")?t.endsWith(d):r===d):!0}_setSelectedFilesState(e,i){const t=e.filter(Boolean);if(!t.length)return;const r=i?this._selectedPreviewItems:[],o=t.map(c=>{const h=this._getPreviewKindForFile(c),u=this._getFileTypeLabel(c),_=this._formatFileSize(c.size);return{file:c,kind:h,src:h==="image"?URL.createObjectURL(c):"",alt:h==="image"?c.name||"Uppladdad bild":"",title:c.name||(h==="image"?"Uppladdad bild":"Uppladdad fil"),meta:[u,_].filter(Boolean).join(" • ")}});i||this._revokeObjectUrl();const d=this.multiple?[...r,...o]:[o[0]];!this.multiple&&r.length&&this._revokeObjectUrlsForItems(r),this._markedForRemoval=!1,this._applySelectedPreviewItems(d)}_clearSelectedFileState(){this._revokeObjectUrl(),this._applySelectedPreviewItems([])}_applySelectedPreviewItems(e){this._selectedPreviewItems=e;const i=e[0];if(!i){this._selectedPreviewKind="empty",this._selectedPreviewTitle="",this._selectedPreviewMeta="",this._selectedPreviewAlt="",this._selectedPreviewSrc="",this._previewSource="internal",this._syncFormValue();return}if(e.length>1){const t=e.reduce((r,o)=>r+(Number.isFinite(o.file.size)?o.file.size:0),0);this._selectedPreviewKind="multi",this._selectedPreviewTitle=`${e.length} filer valda`,this._selectedPreviewMeta=`Totalt ${this._formatFileSize(t)}`,this._selectedPreviewAlt="",this._selectedPreviewSrc=""}else this._selectedPreviewKind=i.kind,this._selectedPreviewTitle=i.title,this._selectedPreviewMeta=i.meta,this._selectedPreviewAlt=i.alt,this._selectedPreviewSrc=i.src;this._previewSource="internal",this._syncFormValue()}_removeSelectedItemAt(e){if(e<0||e>=this._selectedPreviewItems.length)return;const i=this._selectedPreviewItems[e];i.src&&URL.revokeObjectURL(i.src);const t=this._selectedPreviewItems.filter((r,o)=>o!==e);this._applySelectedPreviewItems(t),this._dispatch("file-removed",{file:i.file,files:t.map(r=>r.file),index:e,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval}),this._dispatch("change",{file:t[0]?.file??null,files:t.map(r=>r.file),removedFile:i.file,removedIndex:e,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval})}_renderSelectedImageCards(){return!this.multiple||this.type!=="image"||this.hidePreview||!this._selectedPreviewItems.some(e=>e.kind==="image"&&e.src)?null:n`
|
|
1
|
+
import{f as p,h as g,m as f,p as l,v as n,y as b}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as a}from"../../vendor/decorate.js";import"../scb-button/scb-button.js";(function(){try{var m=typeof globalThis<"u"?globalThis:window;if(!m.__scb_ce_guard_installed__){m.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,t,r){try{customElements.get(i)||e(i,t,r)}catch(d){var o=String(d||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var v,s=(v=class extends g{constructor(){super(),this._internals=null,this.type="default",this.name="",this.multiple=!1,this.label="",this.supportingText="",this.metaText="",this.buttonLabel="",this.replaceButtonLabel="",this.removeButtonLabel="",this.previewEyebrow="",this.emptyPreviewTitle="",this.emptyPreviewMeta="",this.accept="",this.hidePreview=!1,this.showExistingPreview=!1,this.disabled=!1,this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this.existingValue="",this.existingValueName="",this.removeValueName="",this._isDragOver=!1,this._selectedPreviewKind="empty",this._selectedPreviewSrc="",this._selectedPreviewAlt="",this._selectedPreviewTitle="",this._selectedPreviewMeta="",this._selectedPreviewItems=[],this._markedForRemoval=!1,this._dragDepth=0,this._previewSource="external",this._form=null,this._formDataHandler=null,"attachInternals"in this&&(this._internals=this.attachInternals())}get _resolvedAccept(){return this.accept.trim()||(this.type==="image"?"image/*,.png,.jpg,.jpeg,.webp,.svg,.gif,.bmp,.avif":"")}get _hasExistingPreview(){return this.multiple||this._markedForRemoval||!(this.existingValue.trim()||this.previewSrc.trim()||this.previewTitle.trim()||this.previewMeta.trim())?!1:this.showExistingPreview||!!this.previewSrc.trim()}get _resolvedPreviewKind(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewSrc.trim()?"image":"file":this._selectedPreviewKind}get _hasPreview(){return this._resolvedPreviewKind!=="empty"}get _resolvedLabel(){return this.label||(this.type==="image"?"Ladda upp bild":"Ladda upp fil")}get _resolvedSupportingText(){return this.multiple?this.supportingText||(this.type==="image"?"Dra och släpp en eller flera bilder här, eller välj bilder från din dator.":"Dra och släpp en eller flera filer här, eller välj filer från din dator."):this.supportingText||(this.type==="image"?"Dra och släpp en bild här, eller välj en bild från din dator.":"Dra och släpp en fil här, eller välj en fil från din dator.")}get _resolvedMetaText(){return this.metaText?this.metaText:this.type==="image"?"PNG, JPG, SVG, GIF, BMP, AVIF och WebP stöds.":"Alla filtyper stöds."}get _resolvedButtonLabel(){return this.buttonLabel||(this.type==="image"?"Välj bild":"Välj fil")}get _resolvedReplaceButtonLabel(){return this.replaceButtonLabel?this.replaceButtonLabel:this.multiple||this._resolvedPreviewKind==="multi"?"Lägg till fler filer":this._previewSource==="external"&&this._hasExistingPreview?this._resolvedPreviewKind==="image"?"Ersätt bild":"Ersätt fil":this._resolvedPreviewKind==="image"?"Byt bild":"Byt fil"}get _resolvedRemoveButtonLabel(){return this.removeButtonLabel?this.removeButtonLabel:this._resolvedPreviewKind==="multi"?"Ta bort filer":this._previewSource==="external"&&this._hasExistingPreview?this._resolvedPreviewKind==="image"?"Ta bort befintlig bild":"Ta bort befintlig fil":this._resolvedPreviewKind==="image"?"Ta bort bild":"Ta bort fil"}get _resolvedPreviewEyebrow(){return this.previewEyebrow?this.previewEyebrow:this._hasPreview?this._resolvedPreviewKind==="multi"?"Uppladdade filer":this._previewSource==="external"&&this._hasExistingPreview?this._resolvedPreviewKind==="image"?"Befintlig bild":"Befintlig fil":this._resolvedPreviewKind==="image"?"Uppladdad bild":"Uppladdad fil":"Förhandsvisning"}get _resolvedEmptyPreviewTitle(){return this.emptyPreviewTitle?this.emptyPreviewTitle:this.multiple?this.type==="image"?"Inga bilder uppladdade":"Inga filer uppladdade":this.type==="image"?"Ingen bild uppladdad":"Ingen fil uppladdad"}get _resolvedEmptyPreviewMeta(){return this.emptyPreviewMeta?this.emptyPreviewMeta:this.multiple?this.type==="image"?"Förhandsvisningen visas här när du har laddat upp bilder.":"Förhandsvisningen visas här när du har laddat upp filer.":this.type==="image"?"Förhandsvisningen visas här när du har laddat upp en bild.":"Förhandsvisningen visas här när du har laddat upp en fil."}get _resolvedPreviewSrc(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewSrc.trim():this._selectedPreviewSrc}get _resolvedPreviewAlt(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewAlt:this._selectedPreviewAlt}get _resolvedPreviewTitle(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewTitle||(this._resolvedPreviewKind==="image"?"Befintlig bild":"Befintlig fil"):this._selectedPreviewTitle}get _resolvedPreviewMeta(){return this._previewSource==="external"&&this._hasExistingPreview?this.previewMeta:this._selectedPreviewMeta}connectedCallback(){super.connectedCallback(),this._syncFormValue(),this._form=this.closest("form"),this._form&&(this._formDataHandler=e=>{const i=e.formData;i&&this._appendToFormData(i)},this._form.addEventListener("formdata",this._formDataHandler))}disconnectedCallback(){this._form&&this._formDataHandler&&this._form.removeEventListener("formdata",this._formDataHandler),this._formDataHandler=null,this._form=null,this._revokeObjectUrl(),super.disconnectedCallback()}updated(e){e.has("type")&&this.type==="image"&&this._selectedPreviewKind==="file"&&this._clearSelectedFileState(),(e.has("disabled")||e.has("name")||e.has("multiple")||e.has("existingValueName")||e.has("removeValueName")||e.has("existingValue"))&&this._syncFormValue()}formDisabledCallback(e){this.disabled=e}formResetCallback(){this._clearSelectedFileState(),this._markedForRemoval=!1,this._previewSource="external",this._clearNativeInputValue(),this._syncFormValue()}_syncFormValue(){if(!this._internals)return;const e=this.name.trim(),i=this.existingValueName.trim(),t=this.removeValueName.trim(),r=new FormData;if(!this.disabled&&e&&this._selectedPreviewItems.length&&this._selectedPreviewItems.forEach(o=>{r.append(e,o.file,o.file.name)}),!this.disabled&&!this.multiple&&i&&this.existingValue.trim()&&r.append(i,this.existingValue),!this.disabled&&!this.multiple&&t&&r.append(t,this._markedForRemoval?"true":"false"),[...r.keys()].length===0){this._internals.setFormValue(null);return}this._internals.setFormValue(r)}_appendToFormData(e){if(this.disabled)return;const i=this.name.trim();if(i&&this._selectedPreviewItems.length&&(e.getAll(i).some(t=>t instanceof File&&this._selectedPreviewItems.some(r=>r.file===t))||this._selectedPreviewItems.forEach(t=>{e.append(i,t.file,t.file.name)})),!this.multiple){const t=this.existingValueName.trim();t&&this.existingValue.trim()&&!e.has(t)&&e.append(t,this.existingValue);const r=this.removeValueName.trim();r&&!e.has(r)&&e.append(r,this._markedForRemoval?"true":"false")}}openPicker(){if(this.disabled)return;const e=this.renderRoot.querySelector('[data-role="native-input"]');if(e){try{e.value=""}catch{}e.click()}}setPreviewState(e){this.previewSrc=e?.src??"",this.previewAlt=e?.alt??"",this.previewTitle=e?.title??"",this.previewMeta=e?.meta??"",this._markedForRemoval=!1,this._previewSource=this._selectedPreviewItems.length?"internal":"external",this._syncFormValue()}setExistingFileState(e){if(this.multiple){this.existingValue="",this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this._markedForRemoval=!1,this._syncFormValue();return}this.existingValue=e?.value??"",this.previewSrc=e?.src??"",this.previewAlt=e?.alt??"",this.previewTitle=e?.title??"",this.previewMeta=e?.meta??"",this._markedForRemoval=!1,this._previewSource=this._selectedPreviewItems.length?"internal":"external",this._syncFormValue()}clearPreviewState(){this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this._markedForRemoval=!1,this._previewSource="external",this._clearSelectedFileState(),this._clearNativeInputValue(),this._syncFormValue()}clearExistingFileState(){this.existingValue="",this.previewSrc="",this.previewAlt="",this.previewTitle="",this.previewMeta="",this._markedForRemoval=!1,this._selectedPreviewItems.length||(this._previewSource="external"),this._syncFormValue()}_dispatch(e,i={},t=!1){const r=new CustomEvent(e,{detail:i,bubbles:!0,composed:!0,cancelable:t});return this.dispatchEvent(r),r}_handleFiles(e){const i=Array.from(e??[]).filter(o=>this._isAcceptedFile(o));if(!i.length)return;const t=this.multiple?i:[i[0]];this._setSelectedFilesState(t,this.multiple);const r=this._selectedPreviewItems.map(o=>o.file);this._dispatch("file-selected",{file:r[0],files:r,addedFiles:t,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval}),this._dispatch("change",{file:r[0],files:r,addedFiles:t,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval})}_onZoneClick(e){this.disabled||e.composedPath().some(i=>i instanceof HTMLElement&&i.getAttribute("data-role")==="choose-button")||this.openPicker()}_onZoneKeydown(e){this.disabled||(e.key==="Enter"||e.key===" "||e.key==="Spacebar")&&(e.preventDefault(),this.openPicker())}_preventDefaultDrag(e){e.preventDefault(),e.stopPropagation()}_onDragEnter(e){this.disabled||(this._preventDefaultDrag(e),this._dragDepth+=1,this._isDragOver=!0)}_onDragOver(e){this.disabled||(this._preventDefaultDrag(e),this._isDragOver=!0)}_onDragLeave(e){this.disabled||(this._preventDefaultDrag(e),this._dragDepth=Math.max(0,this._dragDepth-1),this._dragDepth||(this._isDragOver=!1))}_onDrop(e){this.disabled||(this._preventDefaultDrag(e),this._dragDepth=0,this._isDragOver=!1,this._handleFiles(e.dataTransfer?.files??null))}_onNativeInputChange(e){const i=e.currentTarget;this._handleFiles(i?.files??null)}_onChooseButtonClick(e){e.preventDefault(),e.stopPropagation(),this.openPicker()}_onReplaceButtonClick(e){e.preventDefault(),e.stopPropagation(),this.openPicker()}_onRemoveButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this._dispatch("clear-request",{file:this._selectedPreviewItems[0]?.file??null,files:this._selectedPreviewItems.map(i=>i.file),existingValue:this.existingValue,markedForRemoval:this._markedForRemoval},!0).defaultPrevented){if(this._selectedPreviewItems.length){this._clearSelectedFileState(),this._clearNativeInputValue(),this._previewSource=this._hasExistingPreview?"external":"internal",this._dispatch("change",{file:null,files:[],existingValue:this.existingValue,markedForRemoval:this._markedForRemoval});return}if(this._hasExistingPreview){this._markedForRemoval=!0,this._previewSource="external",this._syncFormValue(),this.requestUpdate(),this._dispatch("change",{file:null,files:[],existingValue:this.existingValue,markedForRemoval:!0});return}this.clearPreviewState()}}_onRemoveSelectedItemClick(e){if(e.preventDefault(),e.stopPropagation(),this.disabled)return;const i=e.currentTarget?.getAttribute("data-index")||"",t=Number.parseInt(i,10);Number.isInteger(t)&&this._removeSelectedItemAt(t)}_isAcceptedFile(e){const i=this._resolvedAccept.trim();if(!i)return!0;const t=e.name.toLowerCase(),r=(e.type||"").toLowerCase(),o=i.split(",").map(d=>d.trim().toLowerCase()).filter(Boolean);return o.length?o.some(d=>d==="*/*"?!0:d.endsWith("/*")?r.startsWith(d.slice(0,-1)):d.startsWith(".")?t.endsWith(d):r===d):!0}_setSelectedFilesState(e,i){const t=e.filter(Boolean);if(!t.length)return;const r=i?this._selectedPreviewItems:[],o=t.map(c=>{const h=this._getPreviewKindForFile(c),_=this._getFileTypeLabel(c),u=this._formatFileSize(c.size);return{file:c,kind:h,src:h==="image"?URL.createObjectURL(c):"",alt:h==="image"?c.name||"Uppladdad bild":"",title:c.name||(h==="image"?"Uppladdad bild":"Uppladdad fil"),meta:[_,u].filter(Boolean).join(" • ")}});i||this._revokeObjectUrl();const d=this.multiple?[...r,...o]:[o[0]];!this.multiple&&r.length&&this._revokeObjectUrlsForItems(r),this._markedForRemoval=!1,this._applySelectedPreviewItems(d)}_clearSelectedFileState(){this._revokeObjectUrl(),this._applySelectedPreviewItems([])}_applySelectedPreviewItems(e){this._selectedPreviewItems=e;const i=e[0];if(!i){this._selectedPreviewKind="empty",this._selectedPreviewTitle="",this._selectedPreviewMeta="",this._selectedPreviewAlt="",this._selectedPreviewSrc="",this._previewSource="internal",this._syncFormValue();return}if(e.length>1){const t=e.reduce((r,o)=>r+(Number.isFinite(o.file.size)?o.file.size:0),0);this._selectedPreviewKind="multi",this._selectedPreviewTitle=`${e.length} filer valda`,this._selectedPreviewMeta=`Totalt ${this._formatFileSize(t)}`,this._selectedPreviewAlt="",this._selectedPreviewSrc=""}else this._selectedPreviewKind=i.kind,this._selectedPreviewTitle=i.title,this._selectedPreviewMeta=i.meta,this._selectedPreviewAlt=i.alt,this._selectedPreviewSrc=i.src;this._previewSource="internal",this._syncFormValue()}_removeSelectedItemAt(e){if(e<0||e>=this._selectedPreviewItems.length)return;const i=this._selectedPreviewItems[e];i.src&&URL.revokeObjectURL(i.src);const t=this._selectedPreviewItems.filter((r,o)=>o!==e);this._applySelectedPreviewItems(t),this._dispatch("file-removed",{file:i.file,files:t.map(r=>r.file),index:e,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval}),this._dispatch("change",{file:t[0]?.file??null,files:t.map(r=>r.file),removedFile:i.file,removedIndex:e,existingValue:this.existingValue,markedForRemoval:this._markedForRemoval})}_renderSelectedImageCards(){return!this.multiple||this.type!=="image"||this.hidePreview||!this._selectedPreviewItems.some(e=>e.kind==="image"&&e.src)?null:n`
|
|
2
2
|
<div class="scb-drop-zone__selected-images" aria-label="Valda bilder">
|
|
3
3
|
${this._selectedPreviewItems.map((e,i)=>e.kind!=="image"||!e.src?null:n`
|
|
4
4
|
<article class="scb-drop-zone__selected-image-card" aria-label=${`${e.title}, ${e.meta}`}>
|
|
@@ -144,412 +144,4 @@ import{_ as g,b as f,g as b,h as l,m as p,y as n}from"../../vendor/vendor.js";im
|
|
|
144
144
|
|
|
145
145
|
${this._renderSelectedImageCards()}
|
|
146
146
|
</div>
|
|
147
|
-
`}},v.formAssociated=!0,v.styles=f`
|
|
148
|
-
:host {
|
|
149
|
-
display: block;
|
|
150
|
-
width: 100%;
|
|
151
|
-
min-width: 0;
|
|
152
|
-
font-family: var(--brand-font, Inter, sans-serif);
|
|
153
|
-
color: var(--md-sys-color-on-surface, #111111);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.scb-drop-zone {
|
|
157
|
-
display: block;
|
|
158
|
-
width: 100%;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.scb-drop-zone__layout {
|
|
162
|
-
display: grid;
|
|
163
|
-
gap: var(--spacing-5, 16px);
|
|
164
|
-
align-items: stretch;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.scb-drop-zone__layout--with-preview {
|
|
168
|
-
grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:host([multiple]) .scb-drop-zone__layout--with-preview {
|
|
172
|
-
grid-template-columns: 1fr;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.scb-drop-zone__surface,
|
|
176
|
-
.scb-drop-zone__preview {
|
|
177
|
-
min-width: 0;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.scb-drop-zone__main {
|
|
181
|
-
min-width: 0;
|
|
182
|
-
display: grid;
|
|
183
|
-
gap: var(--spacing-4, 12px);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.scb-drop-zone__surface {
|
|
187
|
-
box-sizing: border-box;
|
|
188
|
-
width: 100%;
|
|
189
|
-
min-height: var(--scb-drop-zone-min-height, min(46vh, 420px));
|
|
190
|
-
height: 100%;
|
|
191
|
-
display: flex;
|
|
192
|
-
align-items: center;
|
|
193
|
-
justify-content: center;
|
|
194
|
-
padding: var(--spacing-8, 32px);
|
|
195
|
-
border: 2px dashed var(--md-sys-color-outline-variant, #cccccc);
|
|
196
|
-
border-radius: var(--radius-l, 16px);
|
|
197
|
-
background: var(--md-sys-color-surface-container-lowest, #ffffff);
|
|
198
|
-
cursor: pointer;
|
|
199
|
-
transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
|
|
200
|
-
outline: none;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
:host([multiple]) .scb-drop-zone__surface {
|
|
204
|
-
min-height: var(--scb-drop-zone-multi-min-height, min(32vh, 280px));
|
|
205
|
-
padding: var(--spacing-6, 20px);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.scb-drop-zone__surface:hover,
|
|
209
|
-
.scb-drop-zone__surface:focus-visible,
|
|
210
|
-
.scb-drop-zone__surface.is-dragover {
|
|
211
|
-
border-color: var(--md-sys-color-primary, #005799);
|
|
212
|
-
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
213
|
-
box-shadow: 0 0 0 1px var(--md-sys-color-primary, #005799);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
:host([disabled]) .scb-drop-zone__surface {
|
|
217
|
-
cursor: default;
|
|
218
|
-
opacity: 0.6;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.scb-drop-zone__inner {
|
|
222
|
-
width: min(760px, 100%);
|
|
223
|
-
text-align: center;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.scb-drop-zone__title {
|
|
227
|
-
margin: 0 0 var(--spacing-3, 8px) 0;
|
|
228
|
-
font-size: var(--md-sys-typescale-headline-medium-size, 24px);
|
|
229
|
-
line-height: var(--md-sys-typescale-headline-medium-line-height, 30px);
|
|
230
|
-
color: var(--md-sys-color-on-surface, #111111);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.scb-drop-zone__lead {
|
|
234
|
-
margin: 0;
|
|
235
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
236
|
-
line-height: 1.6;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.scb-drop-zone__meta {
|
|
240
|
-
margin: var(--spacing-4, 12px) 0 0 0;
|
|
241
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
242
|
-
line-height: 1.6;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.scb-drop-zone__actions {
|
|
246
|
-
display: flex;
|
|
247
|
-
justify-content: center;
|
|
248
|
-
margin-top: var(--spacing-6, 20px);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.scb-drop-zone__native-input {
|
|
252
|
-
display: none;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.scb-drop-zone__preview {
|
|
256
|
-
display: grid;
|
|
257
|
-
grid-template-columns: 1fr;
|
|
258
|
-
grid-template-rows: minmax(0, 1fr) auto;
|
|
259
|
-
gap: var(--spacing-6, 20px);
|
|
260
|
-
min-height: var(--scb-drop-zone-min-height, min(46vh, 420px));
|
|
261
|
-
height: 100%;
|
|
262
|
-
padding: var(--spacing-6, 20px);
|
|
263
|
-
box-sizing: border-box;
|
|
264
|
-
border: 1px solid var(--md-sys-color-outline-variant, #cccccc);
|
|
265
|
-
border-radius: var(--radius-l, 16px);
|
|
266
|
-
background: var(--md-sys-color-surface-container-lowest, #ffffff);
|
|
267
|
-
align-items: stretch;
|
|
268
|
-
align-content: stretch;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
.scb-drop-zone__preview-media {
|
|
273
|
-
width: 100%;
|
|
274
|
-
height: 100%;
|
|
275
|
-
min-height: 0;
|
|
276
|
-
display: flex;
|
|
277
|
-
align-items: center;
|
|
278
|
-
justify-content: center;
|
|
279
|
-
padding: 0;
|
|
280
|
-
box-sizing: border-box;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.scb-drop-zone__preview-image {
|
|
284
|
-
display: block;
|
|
285
|
-
max-width: 100%;
|
|
286
|
-
max-height: var(--scb-drop-zone-preview-max-height, 240px);
|
|
287
|
-
width: auto;
|
|
288
|
-
height: auto;
|
|
289
|
-
object-fit: contain;
|
|
290
|
-
border-radius: var(--radius-m, 12px);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.scb-drop-zone__preview-image--thumb {
|
|
294
|
-
width: 40px;
|
|
295
|
-
height: 40px;
|
|
296
|
-
max-width: 40px;
|
|
297
|
-
max-height: 40px;
|
|
298
|
-
border-radius: var(--radius-s, 8px);
|
|
299
|
-
object-fit: cover;
|
|
300
|
-
flex: 0 0 auto;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.scb-drop-zone__preview-placeholder,
|
|
304
|
-
.scb-drop-zone__preview-file-card {
|
|
305
|
-
box-sizing: border-box;
|
|
306
|
-
width: 100%;
|
|
307
|
-
height: 100%;
|
|
308
|
-
display: flex;
|
|
309
|
-
align-items: center;
|
|
310
|
-
justify-content: center;
|
|
311
|
-
padding: var(--spacing-6, 20px);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.scb-drop-zone__preview-placeholder-inner,
|
|
315
|
-
.scb-drop-zone__preview-file-card-inner {
|
|
316
|
-
box-sizing: border-box;
|
|
317
|
-
width: 100%;
|
|
318
|
-
max-width: 320px;
|
|
319
|
-
height: 100%;
|
|
320
|
-
min-height: 180px;
|
|
321
|
-
display: flex;
|
|
322
|
-
flex-direction: column;
|
|
323
|
-
align-items: center;
|
|
324
|
-
justify-content: center;
|
|
325
|
-
gap: var(--spacing-4, 12px);
|
|
326
|
-
padding: var(--spacing-6, 20px);
|
|
327
|
-
border: 2px dashed var(--md-sys-color-outline-variant, #cccccc);
|
|
328
|
-
border-radius: var(--radius-m, 12px);
|
|
329
|
-
background: var(--md-sys-color-surface-container-lowest, #ffffff);
|
|
330
|
-
text-align: center;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.scb-drop-zone__preview-file-card-inner {
|
|
334
|
-
border-style: solid;
|
|
335
|
-
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.scb-drop-zone__preview-placeholder-label,
|
|
339
|
-
.scb-drop-zone__preview-file-extension {
|
|
340
|
-
display: inline-flex;
|
|
341
|
-
align-items: center;
|
|
342
|
-
justify-content: center;
|
|
343
|
-
min-width: 72px;
|
|
344
|
-
min-height: 72px;
|
|
345
|
-
padding: var(--spacing-3, 8px);
|
|
346
|
-
border-radius: var(--radius-m, 12px);
|
|
347
|
-
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
348
|
-
color: var(--md-sys-color-on-surface, #111111);
|
|
349
|
-
font-size: var(--md-sys-typescale-title-medium-size, 16px);
|
|
350
|
-
line-height: var(--md-sys-typescale-title-medium-line-height, 24px);
|
|
351
|
-
font-weight: 700;
|
|
352
|
-
letter-spacing: 0.06em;
|
|
353
|
-
text-transform: uppercase;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.scb-drop-zone__preview-file-extension {
|
|
357
|
-
background: var(--md-sys-color-primary-container, #d9e2ff);
|
|
358
|
-
color: var(--md-sys-color-on-primary-container, #001944);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.scb-drop-zone__preview-file-label {
|
|
362
|
-
margin: 0;
|
|
363
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
364
|
-
line-height: 1.6;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.scb-drop-zone__preview-list {
|
|
368
|
-
width: 100%;
|
|
369
|
-
max-height: 300px;
|
|
370
|
-
margin: 0;
|
|
371
|
-
padding: 0;
|
|
372
|
-
list-style: none;
|
|
373
|
-
display: grid;
|
|
374
|
-
gap: var(--spacing-2, 4px);
|
|
375
|
-
overflow: auto;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
.scb-drop-zone__preview-list-item {
|
|
380
|
-
display: flex;
|
|
381
|
-
align-items: center;
|
|
382
|
-
gap: var(--spacing-3, 8px);
|
|
383
|
-
min-width: 0;
|
|
384
|
-
padding: var(--spacing-3, 8px);
|
|
385
|
-
border-radius: var(--radius-s, 8px);
|
|
386
|
-
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.scb-drop-zone__preview-list-extension {
|
|
390
|
-
display: inline-flex;
|
|
391
|
-
align-items: center;
|
|
392
|
-
justify-content: center;
|
|
393
|
-
flex: 0 0 auto;
|
|
394
|
-
border-radius: var(--radius-s, 8px);
|
|
395
|
-
color: var(--md-sys-color-on-primary-container, #001944);
|
|
396
|
-
font-size: var(--md-sys-typescale-label-medium-size, 12px);
|
|
397
|
-
line-height: var(--md-sys-typescale-label-medium-line-height, 16px);
|
|
398
|
-
font-weight: 700;
|
|
399
|
-
letter-spacing: 0.04em;
|
|
400
|
-
text-transform: uppercase;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.scb-drop-zone__preview-list-content {
|
|
404
|
-
display: flex;
|
|
405
|
-
flex-direction: column;
|
|
406
|
-
min-width: 0;
|
|
407
|
-
text-align: left;
|
|
408
|
-
flex: 1 1 auto;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.scb-drop-zone__preview-list-item-action {
|
|
412
|
-
flex: 0 0 auto;
|
|
413
|
-
margin-left: auto;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.scb-drop-zone__preview-list-title,
|
|
417
|
-
.scb-drop-zone__preview-list-meta {
|
|
418
|
-
white-space: nowrap;
|
|
419
|
-
overflow: hidden;
|
|
420
|
-
text-overflow: ellipsis;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.scb-drop-zone__preview-list-title {
|
|
424
|
-
font-size: var(--md-sys-typescale-body-medium-size, 16px);
|
|
425
|
-
line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
|
|
426
|
-
color: var(--md-sys-color-on-surface, #111111);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.scb-drop-zone__preview-list-meta {
|
|
430
|
-
font-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
431
|
-
line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
432
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.scb-drop-zone__sr-only {
|
|
436
|
-
position: absolute;
|
|
437
|
-
width: 1px;
|
|
438
|
-
height: 1px;
|
|
439
|
-
padding: 0;
|
|
440
|
-
margin: -1px;
|
|
441
|
-
overflow: hidden;
|
|
442
|
-
clip: rect(0, 0, 0, 0);
|
|
443
|
-
white-space: nowrap;
|
|
444
|
-
border: 0;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.scb-drop-zone__preview-body {
|
|
448
|
-
display: flex;
|
|
449
|
-
flex-direction: column;
|
|
450
|
-
min-width: 0;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.scb-drop-zone__preview-eyebrow {
|
|
454
|
-
margin: 0 0 var(--spacing-2, 4px) 0;
|
|
455
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
456
|
-
font-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
457
|
-
line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
458
|
-
letter-spacing: var(--md-sys-typescale-body-small-tracking, 0.1px);
|
|
459
|
-
text-transform: uppercase;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.scb-drop-zone__preview-title {
|
|
463
|
-
margin: 0;
|
|
464
|
-
color: var(--md-sys-color-on-surface, #111111);
|
|
465
|
-
font-size: var(--md-sys-typescale-title-large-size, 20px);
|
|
466
|
-
line-height: var(--md-sys-typescale-title-large-line-height, 28px);
|
|
467
|
-
word-break: break-word;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.scb-drop-zone__preview-meta {
|
|
471
|
-
margin: var(--spacing-3, 8px) 0 0 0;
|
|
472
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
473
|
-
line-height: 1.6;
|
|
474
|
-
word-break: break-word;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.scb-drop-zone__preview-actions {
|
|
478
|
-
display: flex;
|
|
479
|
-
flex-wrap: wrap;
|
|
480
|
-
gap: var(--spacing-3, 8px);
|
|
481
|
-
margin-top: auto;
|
|
482
|
-
padding-top: var(--spacing-5, 16px);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
.scb-drop-zone__selected-images {
|
|
486
|
-
display: grid;
|
|
487
|
-
grid-template-columns: repeat(4, minmax(180px, 1fr));
|
|
488
|
-
gap: var(--spacing-3, 8px);
|
|
489
|
-
margin-top: var(--spacing-4, 12px);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
.scb-drop-zone__selected-image-card {
|
|
493
|
-
display: grid;
|
|
494
|
-
gap: var(--spacing-2, 4px);
|
|
495
|
-
border: 1px solid var(--md-sys-color-outline-variant, #cccccc);
|
|
496
|
-
border-radius: var(--radius-m, 12px);
|
|
497
|
-
background: var(--md-sys-color-surface-container-lowest, #ffffff);
|
|
498
|
-
padding: var(--spacing-3, 8px);
|
|
499
|
-
min-width: 0;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.scb-drop-zone__selected-image {
|
|
503
|
-
display: block;
|
|
504
|
-
width: 100%;
|
|
505
|
-
aspect-ratio: 4 / 3;
|
|
506
|
-
object-fit: cover;
|
|
507
|
-
border-radius: var(--radius-s, 8px);
|
|
508
|
-
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.scb-drop-zone__selected-image-title,
|
|
512
|
-
.scb-drop-zone__selected-image-meta {
|
|
513
|
-
white-space: nowrap;
|
|
514
|
-
overflow: hidden;
|
|
515
|
-
text-overflow: ellipsis;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.scb-drop-zone__selected-image-title {
|
|
519
|
-
font-size: var(--md-sys-typescale-body-medium-size, 16px);
|
|
520
|
-
line-height: var(--md-sys-typescale-body-medium-line-height, 24px);
|
|
521
|
-
color: var(--md-sys-color-on-surface, #111111);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
.scb-drop-zone__selected-image-meta {
|
|
525
|
-
font-size: var(--md-sys-typescale-body-small-size, 14px);
|
|
526
|
-
line-height: var(--md-sys-typescale-body-small-line-height, 20px);
|
|
527
|
-
color: var(--md-sys-color-on-surface-variant, #444444);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.scb-drop-zone__selected-image-action {
|
|
531
|
-
justify-self: end;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
@media (max-width: 1280px) {
|
|
535
|
-
.scb-drop-zone__selected-images {
|
|
536
|
-
grid-template-columns: repeat(3, minmax(180px, 1fr));
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
@media (max-width: 900px) {
|
|
541
|
-
.scb-drop-zone__layout--with-preview {
|
|
542
|
-
grid-template-columns: 1fr;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
.scb-drop-zone__selected-images {
|
|
546
|
-
grid-template-columns: repeat(2, minmax(180px, 1fr));
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
@media (max-width: 640px) {
|
|
551
|
-
.scb-drop-zone__selected-images {
|
|
552
|
-
grid-template-columns: 1fr;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
`,v);a([l({type:String,reflect:!0})],s.prototype,"type",void 0);a([l({type:String})],s.prototype,"name",void 0);a([l({type:Boolean,reflect:!0})],s.prototype,"multiple",void 0);a([l({type:String})],s.prototype,"label",void 0);a([l({type:String,attribute:"supporting-text"})],s.prototype,"supportingText",void 0);a([l({type:String,attribute:"meta-text"})],s.prototype,"metaText",void 0);a([l({type:String,attribute:"button-label"})],s.prototype,"buttonLabel",void 0);a([l({type:String,attribute:"replace-button-label"})],s.prototype,"replaceButtonLabel",void 0);a([l({type:String,attribute:"remove-button-label"})],s.prototype,"removeButtonLabel",void 0);a([l({type:String,attribute:"preview-eyebrow"})],s.prototype,"previewEyebrow",void 0);a([l({type:String,attribute:"empty-preview-title"})],s.prototype,"emptyPreviewTitle",void 0);a([l({type:String,attribute:"empty-preview-meta"})],s.prototype,"emptyPreviewMeta",void 0);a([l({type:String})],s.prototype,"accept",void 0);a([l({type:Boolean,attribute:"hide-preview",reflect:!0})],s.prototype,"hidePreview",void 0);a([l({type:Boolean,attribute:"show-existing-preview",reflect:!0})],s.prototype,"showExistingPreview",void 0);a([l({type:Boolean,reflect:!0})],s.prototype,"disabled",void 0);a([l({type:String,attribute:"preview-src"})],s.prototype,"previewSrc",void 0);a([l({type:String,attribute:"preview-alt"})],s.prototype,"previewAlt",void 0);a([l({type:String,attribute:"preview-title"})],s.prototype,"previewTitle",void 0);a([l({type:String,attribute:"preview-meta"})],s.prototype,"previewMeta",void 0);a([l({type:String,attribute:"existing-value"})],s.prototype,"existingValue",void 0);a([l({type:String,attribute:"existing-value-name"})],s.prototype,"existingValueName",void 0);a([l({type:String,attribute:"remove-value-name"})],s.prototype,"removeValueName",void 0);a([p()],s.prototype,"_isDragOver",void 0);a([p()],s.prototype,"_selectedPreviewKind",void 0);a([p()],s.prototype,"_selectedPreviewSrc",void 0);a([p()],s.prototype,"_selectedPreviewAlt",void 0);a([p()],s.prototype,"_selectedPreviewTitle",void 0);a([p()],s.prototype,"_selectedPreviewMeta",void 0);a([p()],s.prototype,"_selectedPreviewItems",void 0);a([p()],s.prototype,"_markedForRemoval",void 0);s=a([b("scb-drop-zone")],s);
|
|
147
|
+
`}},v.formAssociated=!0,v.styles=b`:host{display:block;width:100%;min-width:0;font-family:var(--brand-font, Inter, sans-serif);color:var(--md-sys-color-on-surface, #111111)}.scb-drop-zone{display:block;width:100%}.scb-drop-zone__layout{display:grid;gap:var(--spacing-5, 16px);align-items:stretch}.scb-drop-zone__layout--with-preview{grid-template-columns:minmax(0,7fr) minmax(280px,3fr)}:host([multiple]) .scb-drop-zone__layout--with-preview{grid-template-columns:1fr}.scb-drop-zone__preview,.scb-drop-zone__surface{min-width:0}.scb-drop-zone__main{min-width:0;display:grid;gap:var(--spacing-4, 12px)}.scb-drop-zone__surface{box-sizing:border-box;width:100%;min-height:var(--scb-drop-zone-min-height, min(46vh, 420px));height:100%;display:flex;align-items:center;justify-content:center;padding:var(--spacing-8, 32px);border:2px dashed var(--md-sys-color-outline-variant, #cccccc);border-radius:var(--radius-l, 16px);background:var(--md-sys-color-surface-container-lowest, #ffffff);cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease;outline:0}:host([multiple]) .scb-drop-zone__surface{min-height:var(--scb-drop-zone-multi-min-height, min(32vh, 280px));padding:var(--spacing-6, 20px)}.scb-drop-zone__surface.is-dragover,.scb-drop-zone__surface:focus-visible,.scb-drop-zone__surface:hover{border-color:var(--md-sys-color-primary, #005799);background:var(--md-sys-color-surface-container, #f5f5f5);box-shadow:0 0 0 1px var(--md-sys-color-primary, #005799)}:host([disabled]) .scb-drop-zone__surface{cursor:default;opacity:.6}.scb-drop-zone__inner{width:min(760px,100%);text-align:center}.scb-drop-zone__title{margin:0 0 var(--spacing-3, 8px)0;font-size:var(--md-sys-typescale-headline-medium-size, 24px);line-height:var(--md-sys-typescale-headline-medium-line-height, 30px);color:var(--md-sys-color-on-surface, #111111)}.scb-drop-zone__lead,.scb-drop-zone__meta{color:var(--md-sys-color-on-surface-variant, #444444);line-height:1.6}.scb-drop-zone__lead{margin:0}.scb-drop-zone__meta{margin:var(--spacing-4, 12px)0 0 0}.scb-drop-zone__actions{display:flex;justify-content:center;margin-top:var(--spacing-6, 20px)}.scb-drop-zone__native-input{display:none}.scb-drop-zone__preview{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:var(--spacing-6, 20px);min-height:var(--scb-drop-zone-min-height, min(46vh, 420px));height:100%;padding:var(--spacing-6, 20px);box-sizing:border-box;border:1px solid var(--md-sys-color-outline-variant, #cccccc);border-radius:var(--radius-l, 16px);background:var(--md-sys-color-surface-container-lowest, #ffffff);align-items:stretch;align-content:stretch}.scb-drop-zone__preview-media{width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center;padding:0;box-sizing:border-box}.scb-drop-zone__preview-image{display:block;max-width:100%;max-height:var(--scb-drop-zone-preview-max-height, 240px);width:auto;height:auto;object-fit:contain;border-radius:var(--radius-m, 12px)}.scb-drop-zone__preview-image--thumb{width:40px;height:40px;max-width:40px;max-height:40px;border-radius:var(--radius-s, 8px);object-fit:cover;flex:0 0 auto}.scb-drop-zone__preview-file-card,.scb-drop-zone__preview-file-card-inner,.scb-drop-zone__preview-placeholder,.scb-drop-zone__preview-placeholder-inner{box-sizing:border-box;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:var(--spacing-6, 20px)}.scb-drop-zone__preview-file-card-inner,.scb-drop-zone__preview-placeholder-inner{max-width:320px;min-height:180px;flex-direction:column;gap:var(--spacing-4, 12px);border:2px dashed var(--md-sys-color-outline-variant, #cccccc);border-radius:var(--radius-m, 12px);background:var(--md-sys-color-surface-container-lowest, #ffffff);text-align:center}.scb-drop-zone__preview-file-card-inner{border-style:solid;background:var(--md-sys-color-surface-container, #f5f5f5)}.scb-drop-zone__preview-file-extension,.scb-drop-zone__preview-placeholder-label{display:inline-flex;align-items:center;justify-content:center;min-width:72px;min-height:72px;padding:var(--spacing-3, 8px);border-radius:var(--radius-m, 12px);background:var(--md-sys-color-surface-container, #f5f5f5);color:var(--md-sys-color-on-surface, #111111);font-size:var(--md-sys-typescale-title-medium-size, 16px);line-height:var(--md-sys-typescale-title-medium-line-height, 24px);font-weight:700;letter-spacing:.06em;text-transform:uppercase}.scb-drop-zone__preview-file-extension{background:var(--md-sys-color-primary-container, #d9e2ff);color:var(--md-sys-color-on-primary-container, #001944)}.scb-drop-zone__preview-file-label{margin:0;color:var(--md-sys-color-on-surface-variant, #444444);line-height:1.6}.scb-drop-zone__preview-list{width:100%;max-height:300px;margin:0;padding:0;list-style:none;display:grid;gap:var(--spacing-2, 4px);overflow:auto}.scb-drop-zone__preview-list-item{display:flex;align-items:center;gap:var(--spacing-3, 8px);min-width:0;padding:var(--spacing-3, 8px);border-radius:var(--radius-s, 8px);background:var(--md-sys-color-surface-container, #f5f5f5)}.scb-drop-zone__preview-list-extension{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:var(--radius-s, 8px);color:var(--md-sys-color-on-primary-container, #001944);font-size:var(--md-sys-typescale-label-medium-size, 12px);line-height:var(--md-sys-typescale-label-medium-line-height, 16px);font-weight:700;letter-spacing:.04em;text-transform:uppercase}.scb-drop-zone__preview-list-content{display:flex;flex-direction:column;min-width:0;text-align:left;flex:1 1 auto}.scb-drop-zone__preview-list-item-action{flex:0 0 auto;margin-left:auto}.scb-drop-zone__preview-list-meta,.scb-drop-zone__preview-list-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scb-drop-zone__preview-list-title{font-size:var(--md-sys-typescale-body-medium-size, 16px);line-height:var(--md-sys-typescale-body-medium-line-height, 24px);color:var(--md-sys-color-on-surface, #111111)}.scb-drop-zone__preview-list-meta{font-size:var(--md-sys-typescale-body-small-size, 14px);line-height:var(--md-sys-typescale-body-small-line-height, 20px);color:var(--md-sys-color-on-surface-variant, #444444)}.scb-drop-zone__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.scb-drop-zone__preview-body{display:flex;flex-direction:column;min-width:0}.scb-drop-zone__preview-eyebrow{margin:0 0 var(--spacing-2, 4px)0;color:var(--md-sys-color-on-surface-variant, #444444);font-size:var(--md-sys-typescale-body-small-size, 14px);line-height:var(--md-sys-typescale-body-small-line-height, 20px);letter-spacing:var(--md-sys-typescale-body-small-tracking, 0.1px);text-transform:uppercase}.scb-drop-zone__preview-title{margin:0;color:var(--md-sys-color-on-surface, #111111);font-size:var(--md-sys-typescale-title-large-size, 20px);line-height:var(--md-sys-typescale-title-large-line-height, 28px);word-break:break-word}.scb-drop-zone__preview-meta{margin:var(--spacing-3, 8px)0 0 0;color:var(--md-sys-color-on-surface-variant, #444444);line-height:1.6;word-break:break-word}.scb-drop-zone__preview-actions{display:flex;flex-wrap:wrap;gap:var(--spacing-3, 8px);margin-top:auto;padding-top:var(--spacing-5, 16px)}.scb-drop-zone__selected-images{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:var(--spacing-3, 8px);margin-top:var(--spacing-4, 12px)}.scb-drop-zone__selected-image-card{display:grid;gap:var(--spacing-2, 4px);border:1px solid var(--md-sys-color-outline-variant, #cccccc);border-radius:var(--radius-m, 12px);background:var(--md-sys-color-surface-container-lowest, #ffffff);padding:var(--spacing-3, 8px);min-width:0}.scb-drop-zone__selected-image{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius-s, 8px);background:var(--md-sys-color-surface-container, #f5f5f5)}.scb-drop-zone__selected-image-meta,.scb-drop-zone__selected-image-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scb-drop-zone__selected-image-title{font-size:var(--md-sys-typescale-body-medium-size, 16px);line-height:var(--md-sys-typescale-body-medium-line-height, 24px);color:var(--md-sys-color-on-surface, #111111)}.scb-drop-zone__selected-image-meta{font-size:var(--md-sys-typescale-body-small-size, 14px);line-height:var(--md-sys-typescale-body-small-line-height, 20px);color:var(--md-sys-color-on-surface-variant, #444444)}.scb-drop-zone__selected-image-action{justify-self:end}@media (max-width:1280px){.scb-drop-zone__selected-images{grid-template-columns:repeat(3,minmax(180px,1fr))}}@media (max-width:900px){.scb-drop-zone__layout--with-preview{grid-template-columns:1fr}.scb-drop-zone__selected-images{grid-template-columns:repeat(2,minmax(180px,1fr))}}@media (max-width:640px){.scb-drop-zone__selected-images{grid-template-columns:1fr}}`,v);a([l({type:String,reflect:!0})],s.prototype,"type",void 0);a([l({type:String})],s.prototype,"name",void 0);a([l({type:Boolean,reflect:!0})],s.prototype,"multiple",void 0);a([l({type:String})],s.prototype,"label",void 0);a([l({type:String,attribute:"supporting-text"})],s.prototype,"supportingText",void 0);a([l({type:String,attribute:"meta-text"})],s.prototype,"metaText",void 0);a([l({type:String,attribute:"button-label"})],s.prototype,"buttonLabel",void 0);a([l({type:String,attribute:"replace-button-label"})],s.prototype,"replaceButtonLabel",void 0);a([l({type:String,attribute:"remove-button-label"})],s.prototype,"removeButtonLabel",void 0);a([l({type:String,attribute:"preview-eyebrow"})],s.prototype,"previewEyebrow",void 0);a([l({type:String,attribute:"empty-preview-title"})],s.prototype,"emptyPreviewTitle",void 0);a([l({type:String,attribute:"empty-preview-meta"})],s.prototype,"emptyPreviewMeta",void 0);a([l({type:String})],s.prototype,"accept",void 0);a([l({type:Boolean,attribute:"hide-preview",reflect:!0})],s.prototype,"hidePreview",void 0);a([l({type:Boolean,attribute:"show-existing-preview",reflect:!0})],s.prototype,"showExistingPreview",void 0);a([l({type:Boolean,reflect:!0})],s.prototype,"disabled",void 0);a([l({type:String,attribute:"preview-src"})],s.prototype,"previewSrc",void 0);a([l({type:String,attribute:"preview-alt"})],s.prototype,"previewAlt",void 0);a([l({type:String,attribute:"preview-title"})],s.prototype,"previewTitle",void 0);a([l({type:String,attribute:"preview-meta"})],s.prototype,"previewMeta",void 0);a([l({type:String,attribute:"existing-value"})],s.prototype,"existingValue",void 0);a([l({type:String,attribute:"existing-value-name"})],s.prototype,"existingValueName",void 0);a([l({type:String,attribute:"remove-value-name"})],s.prototype,"removeValueName",void 0);a([p()],s.prototype,"_isDragOver",void 0);a([p()],s.prototype,"_selectedPreviewKind",void 0);a([p()],s.prototype,"_selectedPreviewSrc",void 0);a([p()],s.prototype,"_selectedPreviewAlt",void 0);a([p()],s.prototype,"_selectedPreviewTitle",void 0);a([p()],s.prototype,"_selectedPreviewMeta",void 0);a([p()],s.prototype,"_selectedPreviewItems",void 0);a([p()],s.prototype,"_markedForRemoval",void 0);s=a([f("scb-drop-zone")],s);
|