@sellmate/design-system 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +9 -12
- package/dist/cjs/sd-ghost-button_3.cjs.entry.js +11 -3
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.js +6 -9
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.css +2 -1
- package/dist/collection/components/sd-tag/sd-tag.js +31 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p--qAfho9a.js → p-0UeArSzN.js} +1 -1
- package/dist/components/{p-BvJuT-H0.js → p-1kjTqHez.js} +1 -1
- package/dist/components/{p-BlN03Cqm.js → p-B4ua22vZ.js} +1 -1
- package/dist/components/{p-CqivNcjh.js → p-BAIi5T00.js} +1 -1
- package/dist/components/{p-BQHbIUbt.js → p-BCLDTSO0.js} +1 -1
- package/dist/components/{p-PMD-Col0.js → p-BGIwu6m1.js} +1 -1
- package/dist/components/{p-DMvWCQfX.js → p-BOrdn-Js.js} +1 -1
- package/dist/components/{p-B8uvCE1e.js → p-BTWV2vRX.js} +1 -1
- package/dist/components/{p-BuuIkYiY.js → p-Bv_CVYp1.js} +1 -1
- package/dist/components/{p-CnEZJlEp.js → p-BwwpMQLA.js} +1 -1
- package/dist/components/{p-0U99W-3Z.js → p-C1vqL1Kl.js} +1 -1
- package/dist/components/{p-CtNDxhxx.js → p-C7sPq8UM.js} +1 -1
- package/dist/components/p-C7sUn4qb.js +1 -0
- package/dist/components/{p-Bls7CCxZ.js → p-CA2sZAsI.js} +1 -1
- package/dist/components/{p-BAsjJuJJ.js → p-CFqCJx9B.js} +1 -1
- package/dist/components/{p-lGr865w2.js → p-D0Xz7CoK.js} +1 -1
- package/dist/components/{p-DpHtcEDP.js → p-D15bTkjr.js} +1 -1
- package/dist/components/{p-BZUlNC0d.js → p-DPotN1QM.js} +1 -1
- package/dist/components/{p-DBw58vNP.js → p-DU2_jzh4.js} +1 -1
- package/dist/components/{p-BGpxtouI.js → p-DsGK3Aye.js} +1 -1
- package/dist/components/{p-DpYG9T3S.js → p-DznzJSU-.js} +1 -1
- package/dist/components/{p-BoH7ykYx.js → p-IBgCA-vo.js} +1 -1
- package/dist/components/{p-CNwoxvpg.js → p-JamWHNrr.js} +1 -1
- package/dist/components/p-UkSGSWSA.js +1 -0
- package/dist/components/{p-h9_f4fUW.js → p-aYmWxyum.js} +1 -1
- package/dist/components/{p-d3KpOGRC.js → p-tSYcqBKN.js} +1 -1
- package/dist/components/{p-DFp9nJnT.js → p-zGr4He38.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-chip-input.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-divider.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-9ea2fbec.entry.js → p-065cd2f4.entry.js} +1 -1
- package/dist/design-system/p-28e1cf94.entry.js +1 -0
- package/dist/design-system/{p-cb63d4cf.entry.js → p-2c704047.entry.js} +1 -1
- package/dist/design-system/{p-43d521c4.entry.js → p-4d747082.entry.js} +1 -1
- package/dist/design-system/{p-74e605c0.entry.js → p-4deb11d8.entry.js} +1 -1
- package/dist/design-system/p-681f8612.entry.js +1 -0
- package/dist/design-system/{p-9afc1f7c.entry.js → p-79d85b32.entry.js} +1 -1
- package/dist/design-system/{p-8862e3e3.entry.js → p-7c22de74.entry.js} +1 -1
- package/dist/design-system/{p-3b71d1d4.entry.js → p-8b4d246f.entry.js} +1 -1
- package/dist/design-system/{p-b4df75b9.entry.js → p-8da06c09.entry.js} +1 -1
- package/dist/design-system/{p-5a67c40d.entry.js → p-940de4ba.entry.js} +1 -1
- package/dist/design-system/{p-a1438f7d.entry.js → p-9c3f7c57.entry.js} +1 -1
- package/dist/design-system/{p-a8d69ab2.entry.js → p-a992c64b.entry.js} +1 -1
- package/dist/design-system/{p-21d8f192.entry.js → p-b127ac21.entry.js} +1 -1
- package/dist/design-system/{p-6f77fc76.entry.js → p-ba10c791.entry.js} +1 -1
- package/dist/design-system/{p-f1e0ba30.entry.js → p-bd700588.entry.js} +1 -1
- package/dist/design-system/p-c3b032a1.entry.js +1 -0
- package/dist/design-system/{p-6b20c76b.entry.js → p-d8bebc8e.entry.js} +1 -1
- package/dist/design-system/{p-a505459f.entry.js → p-dca19618.entry.js} +1 -1
- package/dist/design-system/{p-c0198e3a.entry.js → p-e45e6e56.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +2 -2
- package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
- package/dist/esm/sd-date-picker_7.entry.js +9 -9
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +9 -12
- package/dist/esm/sd-ghost-button_3.entry.js +12 -4
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-pagination_4.entry.js +8 -8
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +6 -6
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/types/components/sd-tag/sd-tag.d.ts +3 -0
- package/dist/types/components.d.ts +11 -0
- package/hydrate/index.js +75 -69
- package/hydrate/index.mjs +75 -69
- package/package.json +1 -1
- package/dist/components/p-0eogwabp.js +0 -1
- package/dist/components/p-D8T1XeGP.js +0 -1
- package/dist/design-system/p-0d5d2723.entry.js +0 -1
- package/dist/design-system/p-ad822c82.entry.js +0 -1
- package/dist/design-system/p-fb609583.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as d,h as s,t as i}from"./p-CEVDmQdt.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-C3rOud8J.js";import{d as o}from"./p-DMvWCQfX.js";import{d as r}from"./p-BlN03Cqm.js";import{d as a}from"./p-BnhzUsGP.js";import{d as f}from"./p-BckY1cBy.js";import{d as n}from"./p-D8T1XeGP.js";import{d as h}from"./p-BGpxtouI.js";const c={start:"flex-start",center:"center",end:"flex-end"},p=l.field.label.sm,b=l.field.label.md,m={sm:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight},md:{height:b.height,gap:b.gap,icon:b.icon,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],u=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in m?this.size:"sm",t=m[i],o={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},r={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":c[this.addonAlign]??c.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"45a5353fb451aa829092ca34f3212d6e62f1843a",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...o,...a,...f,...r}},s("div",{key:"75f3be0dae03f292b66980b7c92d574bd0bda988",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"69b9827a2599a2e01fad26224b4b9800fde6e347",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"ba0e98fd309c32ee73b2ba92f956358d51790f58",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"8f941150147145368d340c4be0e3636ef67060c3",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"78d5d092094c0f3e8562127d77821dadb2a21b6a",name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"b494ab4550ae739096957cad46cb95a8c71f5a0b"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(m[this.size in m?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function _(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),u);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||o();break;case"sd-ghost-button":customElements.get(i(e))||r();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-portal":customElements.get(i(e))||f();break;case"sd-tag":customElements.get(i(e))||n();break;case"sd-tooltip":customElements.get(i(e))||h()}}))}export{u as S,_ as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,h as n,t as i}from"./p-CEVDmQdt.js";import{d as s}from"./p-BnhzUsGP.js";var a={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},o={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},g={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},d={content:"#FB4444",bg:"#FCEFEF"},r={content:"#FF6B00",bg:"#FEF1EA"},c={content:"#916C0D",bg:"#FFF7DD"},l={content:"#00973C",bg:"#E8F9EF"},p={content:"#0075FF",bg:"#E6F1FF"},h={content:"#006AC1",bg:"#EAF5FE"},u={content:"#004290",bg:"#EFF6FF"},f={content:"#737373",bg:"#EEEEEE"};const b=["xs","sm","md"],x=["grey","red","orange","yellow","green","blue","darkblue","indigo"],m={grey:{background:f.bg,content:f.content,icon:f.content},red:{background:d.bg,content:d.content,icon:d.content},orange:{background:r.bg,content:r.content,icon:r.content},yellow:{background:c.bg,content:c.content,icon:c.content},green:{background:l.bg,content:l.content,icon:l.content},blue:{background:p.bg,content:p.content,icon:p.content},darkblue:{background:h.bg,content:h.content,icon:h.content},indigo:{background:u.bg,content:u.content,icon:u.content}},y={xs:{height:`${a.height}px`,paddingX:`${a.paddingX}px`,gap:`${a.gap}px`,fontSize:`${a.typography.fontSize}px`,fontWeight:a.typography.fontWeight,lineHeight:`${a.typography.lineHeight}px`,iconSize:12,radius:`${a.radius}px`},sm:{height:`${o.height}px`,paddingX:`${o.paddingX}px`,gap:`${o.gap}px`,fontSize:`${o.typography.fontSize}px`,fontWeight:o.typography.fontWeight,lineHeight:`${o.typography.lineHeight}px`,iconSize:16,radius:`${o.radius}px`},md:{height:`${g.height}px`,paddingX:`${g.paddingX}px`,gap:`${g.gap}px`,fontSize:`${g.typography.fontSize}px`,fontWeight:g.typography.fontWeight,lineHeight:`${g.typography.lineHeight}px`,iconSize:16,radius:`${g.radius}px`}},F={xs:{...y.xs,radius:"999px"},sm:{...y.sm,radius:"999px"},md:{...y.md,radius:"999px"}},E=Object.fromEntries(["square","pill"].flatMap((t=>b.flatMap((e=>x.map((n=>[`${t}_${e}_${n}`,{shape:t,size:e,color:n,..."square"===t?y[e]:F[e],...m[n]}]))))))),$=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}name="square_sm_grey";label="";icon;isLeft=!0;componentWillLoad(){this.name=this.name??"square_sm_grey"}get resolvedName(){if(!Object.prototype.hasOwnProperty.call(E,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return E[this.resolvedName]}renderIcon(t,e){return null==this.icon?null:n("sd-icon",{class:"sd-tag__icon",name:this.icon,size:e,color:t})}render(){const t=this.resolvedConfig,e=this.renderIcon(t.icon,t.iconSize);return n("span",{key:"6cbf6fb37f0e926e604b24d482c8d648079b41dd",class:"sd-tag",style:{"--sd-tag-background":t.background,"--sd-tag-content":t.content,"--sd-tag-height":t.height,"--sd-tag-padding-x":t.paddingX,"--sd-tag-gap":t.gap,"--sd-tag-font-size":t.fontSize,"--sd-tag-font-weight":t.fontWeight,"--sd-tag-line-height":t.lineHeight,"--sd-tag-radius":t.radius},"aria-label":this.label||"tag"},this.icon&&this.isLeft&&e,n("span",{key:"e0e9410afe716341dc7fb7891bb46c85cde9d51b",class:"sd-tag__label"},this.label),this.icon&&!this.isLeft&&e)}static get style(){return"sd-tag{display:inline-flex;width:fit-content;height:fit-content}.sd-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}"}},[512,"sd-tag",{name:[1],label:[1],icon:[1],isLeft:[4,"is-left"]}]);function k(){"undefined"!=typeof customElements&&["sd-tag","sd-icon"].forEach((t=>{switch(t){case"sd-tag":customElements.get(i(t))||customElements.define(i(t),$);break;case"sd-icon":customElements.get(i(t))||s()}}))}export{$ as S,k as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as r,H as e}from"./p-BZ5lcC25.js";import{s as d}from"./p-BJfiMC9H.js";const a={default:d.color.divider.default},s=class{constructor(r){i(this,r)}vertical=!1;render(){return r(e,{key:"2708ce362531fa5f3658280ba77733c5f9fb8fa6",style:{"--sd-divider-color":a.default}},r("hr",{key:"e38476a897aa2bae6500316d5961fc9d6d18780d","aria-orientation":this.vertical?"vertical":"horizontal"}))}};s.style="sd-divider{flex-shrink:0;line-height:0}:where(sd-divider:not([vertical])){display:block;width:100%;height:1px}:where(sd-divider[vertical]){display:inline-block;align-self:stretch;width:1px}sd-divider hr{display:block;width:100%;height:100%;margin:0;border:0;background-color:var(--sd-divider-color)}";export{s as sd_divider}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,a as i,h as s}from"./p-BZ5lcC25.js";var n={size:"16",icon:"12"},o={size:"24",icon:"16"},a={size:"28",icon:"20"},r={size:"36",icon:"24"},h={size:"62",icon:"32"},d={sm:"4",md:"6"},c={opacity:"5%"},l={disabled:"#BBBBBB"},g={content:"#888888",hover:{bg:"#222222"}},u={content:"#E30000",hover:{bg:"#E30000"}},b={content:"#025497",hover:{bg:"#0075FF"}},p={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const f={xxs:{size:Number(n.size),icon:Number(n.icon)},xs:{size:Number(o.size),icon:Number(o.icon)},sm:{size:Number(a.size),icon:Number(a.icon)},md:{size:Number(r.size),icon:Number(r.icon)},lg:{size:Number(h.size),icon:Number(h.icon)}},m={xxs:Number(d.sm),xs:Number(d.sm),sm:Number(d.sm),md:Number(d.md),lg:Number(d.md)},x=c.opacity,v={default:g.content,danger:u.content,action:b.content,inverse:p.content},y={default:g.hover.bg,danger:u.hover.bg,action:b.hover.bg,inverse:p.hover.bg},F=l.disabled,z={default:F,danger:F,action:F,inverse:p.disabled},w=class{constructor(i){t(this,i),this.click=e(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return i(this)}isTooltipOpen=!1;click;hasWarnedMissingAriaLabel=!1;componentWillLoad(){this.size??="sm",this.intent??="default",this.ariaLabel??=""}handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};handleMouseEnter=()=>{this.isTooltipOpen=!0};handleMouseLeave=()=>{this.isTooltipOpen=!1};handleFocus=()=>{this.isTooltipOpen=!0};handleBlur=()=>{this.isTooltipOpen=!1};componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===(this.ariaLabel??"").trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-ghost-button] icon-only buttons require \`ariaLabel\`. Received icon="${this.icon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const t=this.size??"sm",e=this.intent??"default",i=f[t]??f.sm,n=this.disabled?z[e]:v[e],o=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return s("button",{key:"9d2d352d36c7c34c67d8c57de6236d72727bd078",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button","aria-disabled":this.disabled?"true":void 0,tabIndex:this.disabled?-1:void 0,"aria-label":o,style:{"--sd-ghost-button-size":`${i.size}px`,"--sd-ghost-button-radius":`${m[t]}px`,"--sd-ghost-button-hover-bg":y[e],"--sd-ghost-button-hover-opacity":x,"--sd-ghost-button-accent":"#0075FF"},onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur},a.length>0&&this.isTooltipOpen&&s("sd-portal",{key:"1a73fb53be28a622d03e4f20be0b30e0e76bccd4",parentRef:this.hostEl,open:!0,offset:[i.size/2,4],placement:"top"},s("div",{key:"e4a349dbfbf2fd16eed9a46f5e2ed43935212cfe",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},s("sd-tag",{key:"4aa1525a6da6ee72daf1815f1440d665bd1cf2c8",name:"square_xs_grey",label:a}))),s("sd-icon",{key:"4caac22d0d888c1998032697043e3a3761e012aa",name:this.icon,size:i.icon,color:n}))}};w.style='sd-ghost-button{display:inline-flex;width:fit-content;height:fit-content}.sd-ghost-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--sd-ghost-button-size);height:var(--sd-ghost-button-size);padding:0;border:none;border-radius:var(--sd-ghost-button-radius);background:transparent;cursor:pointer;box-sizing:border-box;transition:box-shadow 0.2s ease;-webkit-user-select:none;user-select:none}.sd-ghost-button::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--sd-ghost-button-hover-bg);opacity:0;transition:opacity 0.2s ease;pointer-events:none}.sd-ghost-button:hover:not(.sd-ghost-button--disabled)::before{opacity:var(--sd-ghost-button-hover-opacity)}.sd-ghost-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-ghost-button-accent)}.sd-ghost-button--disabled{cursor:not-allowed}.sd-ghost-button__tooltip-inner{display:inline-flex;white-space:nowrap;transform:translateX(-50%)}[data-align=right] .sd-ghost-button__tooltip-inner{transform:none}';const k=class{constructor(i){t(this,i),this.close=e(this,"sdClose",3)}get hostEl(){return i(this)}to="body";parentRef=null;offset=[0,4];viewportPadding=0;zIndex=996;open=!1;placement="bottom";close;container;wrapper;rafId;isInsideClick=!1;closeTransitionTimer;handleObservedScroll=()=>this.updatePosition();resizeObserver;mutationObserver;scrollParents=[];isObserved=!1;handleOpenChange(){this.syncPortalState()}componentDidLoad(){this.container=this.resolveContainer(),this.syncPortalState()}componentDidRender(){this.syncPortalState()}disconnectedCallback(){if(this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.unobserveParent(),this.wrapper?.parentNode)try{this.wrapper.parentNode.removeChild(this.wrapper)}catch{}}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof HTMLElement?t:document.body}resolveZIndex(){const t=this.zIndex??996,e=this.parentRef?.closest(".sd-modal-container__layer");if(!e)return t;const i=e.closest(".sd-modal-container"),s=i instanceof HTMLElement?parseInt(getComputedStyle(i).zIndex,10):NaN,n=Number.isFinite(s)?s:997;return Math.max(t,n+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",top:"0",left:"0",zIndex:this.resolveZIndex().toString(),opacity:"0",transition:"opacity 0.15s ease-out",boxSizing:"border-box",visibility:"hidden"}),this.container.appendChild(this.wrapper)}ensureWrapper(){this.wrapper||(this.container||=this.resolveContainer(),this.createWrapper(),this.moveSlotContent())}syncPortalState(){if(!this.open)return this.wrapper&&(this.wrapper.style.transition="opacity 0.15s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="none",this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.closeTransitionTimer=setTimeout((()=>{this.wrapper&&!this.open&&(this.wrapper.style.display="none")}),150)),void this.unobserveParent();this.closeTransitionTimer&&clearTimeout(this.closeTransitionTimer),this.ensureWrapper(),this.wrapper&&(this.wrapper.style.display="block",this.wrapper.style.transition="opacity 0.25s ease-out",this.wrapper.style.opacity="0",this.wrapper.style.pointerEvents="",this.observeParent(),this.updatePosition())}moveSlotContent(){this.wrapper&&Array.from(this.hostEl.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect(),e=window.innerWidth,i=window.innerHeight,s=this.offset??[0,4],n=Math.max(0,this.viewportPadding??0),o=Math.max(e-2*n,0),a=Math.max(i-2*n,0);this.wrapper.style.maxWidth=`${o}px`,this.wrapper.style.maxHeight=`${a}px`;const r=this.wrapper.getBoundingClientRect(),h=i-t.bottom-s[1]-n,d=t.top-s[1]-n;let c,l=t.left+s[0];"top"===(this.placement??"bottom")?(c=t.top-r.height-s[1],d<r.height&&h>d&&(c=t.bottom+s[1])):(c=t.bottom+s[1],h<r.height&&d>h&&(c=t.top-r.height-s[1]));const g=i-n-r.height;c=g<n?n:Math.min(Math.max(c,n),g);const u=l+r.width>e-n,b=n,p=e-n-r.width;this.wrapper.style.top=`${c}px`,p<b?(this.wrapper.style.left=`${b}px`,this.wrapper.style.right="auto",delete this.wrapper.dataset.align):u?(this.wrapper.style.left="auto",this.wrapper.style.right=e-t.right+"px",this.wrapper.dataset.align="right"):(this.wrapper.style.right="auto",delete this.wrapper.dataset.align,l=Math.min(Math.max(l,b),p),this.wrapper.style.left=`${l}px`),this.wrapper.style.visibility="visible",this.wrapper.style.opacity="1"}))}observeParent(){this.parentRef&&!this.isObserved&&(this.observeScrollParents(this.parentRef),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef)),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0})),this.isObserved=!0)}unobserveParent(){this.isObserved&&(this.unobserveScrollParents(),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0,this.isObserved=!1)}observeScrollParents(t){const e=this.getScrollParents(t);e.forEach((t=>{t.addEventListener("scroll",this.handleObservedScroll,{passive:!0})})),this.scrollParents=e}unobserveScrollParents(){this.scrollParents.forEach((t=>{t.removeEventListener("scroll",this.handleObservedScroll)})),this.scrollParents=[]}getScrollParents(t){const e=[];let i=t.parentElement;for(;i;){const{overflow:t,overflowX:s,overflowY:n}=getComputedStyle(i);[t,s,n].some((t=>/(auto|scroll|overlay)/.test(t)))&&e.push(i),i=i.parentElement}return e}isInsideTarget(t){return!(!this.wrapper?.contains(t)&&!this.parentRef?.contains(t))}handleMouseDown(t){this.open&&(this.isInsideClick=this.isInsideTarget(t.target))}handleWindowClick(t){this.open&&(this.isInsideClick?this.isInsideClick=!1:this.isInsideTarget(t.target)||this.close.emit())}render(){return s("slot",{key:"0b01050e7c1ab2b648bf1118aec27140ff1aed4c"})}static get watchers(){return{open:[{handleOpenChange:0}]}}};k.style=":host { display: none !important; }";var $={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},E={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},_={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},N={content:"#FB4444",bg:"#FCEFEF"},C={content:"#FF6B00",bg:"#FEF1EA"},M={content:"#916C0D",bg:"#FFF7DD"},S={content:"#00973C",bg:"#E8F9EF"},O={content:"#0075FF",bg:"#E6F1FF"},L={content:"#006AC1",bg:"#EAF5FE"},W={content:"#004290",bg:"#EFF6FF"},B={content:"#737373",bg:"#EEEEEE"};const I=["xs","sm","md"],T=["grey","red","orange","yellow","green","blue","darkblue","indigo"],P={grey:{background:B.bg,content:B.content,icon:B.content},red:{background:N.bg,content:N.content,icon:N.content},orange:{background:C.bg,content:C.content,icon:C.content},yellow:{background:M.bg,content:M.content,icon:M.content},green:{background:S.bg,content:S.content,icon:S.content},blue:{background:O.bg,content:O.content,icon:O.content},darkblue:{background:L.bg,content:L.content,icon:L.content},indigo:{background:W.bg,content:W.content,icon:W.content}},j={xs:{height:`${$.height}px`,paddingX:`${$.paddingX}px`,gap:`${$.gap}px`,fontSize:`${$.typography.fontSize}px`,fontWeight:$.typography.fontWeight,lineHeight:`${$.typography.lineHeight}px`,iconSize:12,radius:`${$.radius}px`},sm:{height:`${E.height}px`,paddingX:`${E.paddingX}px`,gap:`${E.gap}px`,fontSize:`${E.typography.fontSize}px`,fontWeight:E.typography.fontWeight,lineHeight:`${E.typography.lineHeight}px`,iconSize:16,radius:`${E.radius}px`},md:{height:`${_.height}px`,paddingX:`${_.paddingX}px`,gap:`${_.gap}px`,fontSize:`${_.typography.fontSize}px`,fontWeight:_.typography.fontWeight,lineHeight:`${_.typography.lineHeight}px`,iconSize:16,radius:`${_.radius}px`}},A={xs:{...j.xs,radius:"999px"},sm:{...j.sm,radius:"999px"},md:{...j.md,radius:"999px"}},H=Object.fromEntries(["square","pill"].flatMap((t=>I.flatMap((e=>T.map((i=>[`${t}_${e}_${i}`,{shape:t,size:e,color:i,..."square"===t?j[e]:A[e],...P[i]}]))))))),X=class{constructor(e){t(this,e)}name="square_sm_grey";label="";icon;isLeft=!0;componentWillLoad(){this.name=this.name??"square_sm_grey"}get resolvedName(){if(!Object.prototype.hasOwnProperty.call(H,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return H[this.resolvedName]}renderIcon(t,e){return null==this.icon?null:s("sd-icon",{class:"sd-tag__icon",name:this.icon,size:e,color:t})}render(){const t=this.resolvedConfig,e=this.renderIcon(t.icon,t.iconSize);return s("span",{key:"6cbf6fb37f0e926e604b24d482c8d648079b41dd",class:"sd-tag",style:{"--sd-tag-background":t.background,"--sd-tag-content":t.content,"--sd-tag-height":t.height,"--sd-tag-padding-x":t.paddingX,"--sd-tag-gap":t.gap,"--sd-tag-font-size":t.fontSize,"--sd-tag-font-weight":t.fontWeight,"--sd-tag-line-height":t.lineHeight,"--sd-tag-radius":t.radius},"aria-label":this.label||"tag"},this.icon&&this.isLeft&&e,s("span",{key:"e0e9410afe716341dc7fb7891bb46c85cde9d51b",class:"sd-tag__label"},this.label),this.icon&&!this.isLeft&&e)}};X.style="sd-tag{display:inline-flex;width:fit-content;height:fit-content}.sd-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}";export{w as sd_ghost_button,k as sd_portal,X as sd_tag}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,a as e,h as i,c as s,F as o}from"./p-BZ5lcC25.js";import{f as d}from"./p-BOJJ_sQS.js";import{T as a}from"./p-GXE2lEVj.js";const n={start:"flex-start",center:"center",end:"flex-end"},l=d.field.label.sm,r=d.field.label.md,f={sm:{height:l.height,gap:l.gap,icon:l.icon,fontSize:l.typography.fontSize,lineHeight:l.typography.lineHeight,fontWeight:l.typography.fontWeight},md:{height:r.height,gap:r.gap,icon:r.icon,fontSize:r.typography.fontSize,lineHeight:r.typography.lineHeight,fontWeight:r.typography.fontWeight}},h=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],c=class{constructor(e){t(this,e)}get el(){return e(this)}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let t="";return this.disabled?(t="disabled",`sd-field--${t}`):this.readonly?(t="readonly",`sd-field--${t}`):this.focused?(t="focus",`sd-field--${t}`):(this.hovered&&(t="hover"),void 0!==this.status&&(t=this.status),this.error&&(t="error"),""!==t?`sd-field--${t}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const t of h){const e=this.el.closest(t);if(e&&"value"in e)return e}return null}registerToForm(){const t=this.el.closest("sd-form");t&&"function"==typeof t.componentOnReady&&t.componentOnReady().then((t=>{t.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const t=this.el.closest("sd-form");t?.componentOnReady().then((t=>{t.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const t of this.rules){const e=t(this.value??"");if(!0!==e)return this.setError(!0,e),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(t,e){this.errorMsg=e,this.hostElement&&(this.hostElement.error=t)}render(){const t=this.addonLabel,e=d.field.addonLabel,s=this.size in f?this.size:"sm",o=f[s],a={"--sd-field-wrapper-height":`var(--sd-system-size-field-${s}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${s})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${s}-gap)`},l={"--sd-field-error-message-color":d.field.errorMessage.color,"--sd-field-error-message-font-size":`${d.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${d.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":d.field.hint.color,"--sd-field-hint-font-size":`${d.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${d.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${d.field.contents.gap}px`},r=""!==this.label?{"--sd-field-label-height":`${o.height}px`,"--sd-field-label-gap":`${o.gap}px`,"--sd-field-label-font-size":`${o.fontSize}px`,"--sd-field-label-line-height":`${o.lineHeight}px`,"--sd-field-label-font-weight":o.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},h=""!==t?{"--sd-field-addon-padding-x":`${e.paddingX}px`,"--sd-field-addon-font-size":`${e.typography.fontSize}px`,"--sd-field-addon-line-height":`${e.typography.lineHeight}px`,"--sd-field-addon-font-weight":e.typography.fontWeight,"--sd-field-addon-bg":e.bg,"--sd-field-addon-border-color":this.disabled?e.border.disabled:e.border.default,"--sd-field-addon-gap":`${e.gap}px`,"--sd-field-addon-border-width":`${e.border.width}px`,"--sd-field-addon-justify":n[this.addonAlign]??n.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return i("div",{key:"45a5353fb451aa829092ca34f3212d6e62f1843a",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==t,[this.fieldStatus]:""!==this.fieldStatus},style:{...a,...r,...h,...l}},i("div",{key:"75f3be0dae03f292b66980b7c92d574bd0bda988",class:"sd-field__wrapper"},this.renderLabel(this.label),i("div",{key:"69b9827a2599a2e01fad26224b4b9800fde6e347",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},i("div",{key:"ba0e98fd309c32ee73b2ba92f956358d51790f58",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==t}},t&&i("div",{key:"8f941150147145368d340c4be0e3636ef67060c3",class:"sd-field__addon"},this.icon&&i("sd-icon",{key:"78d5d092094c0f3e8562127d77821dadb2a21b6a",name:this.icon.name,size:this.icon.size??Number(f[this.size in f?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),t),i("slot",{key:"b494ab4550ae739096957cad46cb95a8c71f5a0b"})),""!==this.errorMsg||""!==this.errorMessage?i("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&i("div",{class:"sd-field__hint"},this.hint))))}renderLabel(t){return null==t||""===t?null:i("label",{class:"sd-field__label"},this.icon&&i("sd-icon",{name:this.icon.name,size:this.icon.size??Number(f[this.size in f?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),i("div",{class:"sd-field__label__text"},t),this.labelTooltip&&i("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}};c.style="sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}";const g=class{constructor(e){t(this,e),this.close=s(this,"sdClose",7)}get el(){return e(this)}to="body";parentRef=null;offset=[0,0];zIndex=996;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;scrollHandler=()=>this.updatePosition();static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent(),window.addEventListener("scroll",this.scrollHandler,!0)}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),window.removeEventListener("scroll",this.scrollHandler,!0),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof HTMLElement?t:document.body}resolveZIndex(){const t=this.zIndex??996,e=this.parentRef?.closest(".sd-modal-container__layer");if(!e)return t;const i=e.closest(".sd-modal-container"),s=i instanceof HTMLElement?parseInt(getComputedStyle(i).zIndex,10):NaN,o=Number.isFinite(s)?s:997;return Math.max(t,o+1)}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",zIndex:this.resolveZIndex().toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const t=this.parentRef.getBoundingClientRect();if(0===t.width&&0===t.height)return;const[e,i]=this.offset??[0,0],s=g.ARROW_SIZE;let o=0,d=0;switch(this.placement??"bottom"){case"top":o=t.top-this.wrapper.offsetHeight+i-s,d=t.left+t.width/2-this.wrapper.offsetWidth/2+e;break;case"bottom":o=t.bottom+i+s,d=t.left+t.width/2-this.wrapper.offsetWidth/2+e;break;case"left":o=t.top+t.height/2-this.wrapper.offsetHeight/2+i,d=t.left-this.wrapper.offsetWidth-e-s;break;case"right":o=t.top+t.height/2-this.wrapper.offsetHeight/2+i,d=t.right+e+s}Object.assign(this.wrapper.style,{top:`${o}px`,left:`${d}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return i("slot",{key:"a560d8d46ef03688ce16a984c54ae23f740e7ef8"})}};g.style=".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu--has-close .sd-floating-menu__content{padding-right:28px}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}";var p={bg:"#07284A",content:"#FFFFFF"},m={bg:"#FCEFEF",content:"#FB4444"},u={bg:"#FEF1EA",content:"#FF6B00"},b={bg:"#E6F1FF",content:"#0075FF"};const _={default:{bg:p.bg,content:p.content},danger:{bg:m.bg,content:m.content},warning:{bg:u.bg,content:u.content},accent:{bg:b.bg,content:b.content}},v=class{constructor(e){t(this,e)}get el(){return e(this)}trigger="hover";placement="top";color="#01BB4B";tooltipType="default";icon="helpOutline";iconSize=12;label="";name="primary_sm";rightIcon;ariaLabel="";disabled=!1;type="button";useClose=!1;sdClass="";message=[];triggerClass="";triggerStyle="";showTooltip=!1;slotContentHTML="";buttonEl;triggerEl;isAnchorMode=!1;menuEl;hideTimeout;closeTimeout;static CLOSE_ANIM_MS=150;openTooltip=()=>{this.cancelHideTimer(),this.showTooltip=!0,this.menuEl&&this.menuEl.classList.remove("sd-floating-menu--closing")};closeTooltip=()=>{this.menuEl&&this.menuEl.classList.add("sd-floating-menu--closing"),this.closeTimeout=setTimeout((()=>{this.showTooltip=!1}),v.CLOSE_ANIM_MS)};startHideTimer=()=>{this.hideTimeout=setTimeout((()=>this.closeTooltip()),100)};cancelHideTimer=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=void 0)};get tooltipOffset(){switch(this.placement??"top"){case"top":return[0,-4];case"bottom":return[0,4];case"left":case"right":return[4,0]}}handleClose=()=>!this.useClose&&this.closeTooltip();async show(){this.openTooltip()}async hide(){this.closeTooltip()}componentWillLoad(){this.isAnchorMode=Array.from(this.el.children).some((t=>"anchor"===t.getAttribute("slot"))),this.isAnchorMode||(this.slotContentHTML=this.el.innerHTML,this.el.replaceChildren()),this.el.classList.toggle("visible",!0)}componentDidRender(){this.triggerEl&&""!==this.triggerStyle&&this.triggerEl.setAttribute("style",this.triggerStyle)}render(){const t=this.trigger??"hover",e=this.placement??"top",s=this.tooltipType??"default",d=this.icon??"helpOutline",n=this.color??"#01BB4B",l=_[s]??_.default,r=()=>this.showTooltip=!this.showTooltip,f=void 0!==this.label&&""!==this.label,h=this.isAnchorMode,c="hover"===t?{onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()}:h||!f?{onClick:r}:{},g="click"===t&&!h&&f?{onSdClick:r}:{},p=["sd-tooltip-trigger",this.sdClass,this.triggerClass].filter((t=>void 0!==t&&""!==t)).join(" "),m=this.message&&this.message.length>0?this.message.map((t=>`<div>${t}</div>`)).join(""):this.slotContentHTML;return i(o,{key:"81d582c4c8847a0f57abf632d975461cdf07b535"},i("div",{key:"c7515fb866fa85749405bb10512e27575850eb27",ref:t=>this.triggerEl=t,class:p,...c},h?i("slot",{name:"anchor"}):f?i("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:d,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",...g}):i("sd-icon",{ref:t=>this.buttonEl=t,name:d,size:this.iconSize??12,color:n,class:"sd-tooltip"})),this.showTooltip&&i("sd-floating-portal",{key:"903aaa3723a119687e5af8120d54fb1b9e43c584",parentRef:h?this.triggerEl:this.buttonEl,onSdClose:this.handleClose,placement:e,offset:this.tooltipOffset},i("div",{key:"813e1dbf7f2d8e0378f4fcac1225341aafbd9948",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${s}`]:!0,[`sd-floating-menu--${e}`]:!0,"sd-floating-menu--has-close":this.useClose},style:{"--sd-floating-bg":l.bg,"--sd-floating-content":l.content},onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()},i("i",{key:"d74071d3d236382bc952ad03a05ebd77219b4ddb",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${e}`},i(a,{key:"91c35bd2bc22294b7e7998965930219a43799310"})),i("div",{key:"16edd2fc6e9ad02b646c05c6404d3eb79e2a7a71",class:"sd-floating-menu__content",innerHTML:m}),this.useClose&&i("sd-ghost-button",{key:"d234906f7a4a603a8e18cef6da49f9d893adb731",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xxs",onClick:()=>this.closeTooltip()}))))}};v.style="sd-tooltip{visibility:hidden !important;display:inline-flex}sd-tooltip.visible{visibility:visible !important}sd-tooltip .sd-tooltip-trigger{display:inline-flex;position:relative;cursor:pointer;align-items:center;justify-content:center}";export{c as sd_field,g as sd_floating_portal,v as sd_tooltip}
|