@sellmate/design-system 1.20.0 → 1.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
  2. package/dist/cjs/sd-modal-container.cjs.entry.js +49 -1
  3. package/dist/collection/components/assets/Close.js +1 -1
  4. package/dist/collection/components/sd-modal-container/sd-modal-container.js +49 -1
  5. package/dist/components/{p-Cfko62rU.js → p-5imde6N9.js} +1 -1
  6. package/dist/components/{p-DpfXh55-.js → p-B5bya7Gp.js} +1 -1
  7. package/dist/components/{p-DAJIg-VD.js → p-BZfVV3gu.js} +1 -1
  8. package/dist/components/{p-nruUh8p1.js → p-BiBLp9_a.js} +1 -1
  9. package/dist/components/{p-BHW1fnDC.js → p-BjcGzaFR.js} +1 -1
  10. package/dist/components/{p-DaMzYzXI.js → p-Bz93hWXV.js} +1 -1
  11. package/dist/components/{p-CiEAVQT4.js → p-CB2A3pJ5.js} +1 -1
  12. package/dist/components/{p-E5buAge1.js → p-CJ69QmR3.js} +1 -1
  13. package/dist/components/p-CLlAhEDc.js +1 -0
  14. package/dist/components/{p-Df1g_kVH.js → p-CRwvv7YM.js} +1 -1
  15. package/dist/components/{p-CEhI4kUA.js → p-CTPImLDQ.js} +1 -1
  16. package/dist/components/{p-BzUU-npj.js → p-CUR9smP5.js} +1 -1
  17. package/dist/components/{p-DbLQoVx6.js → p-CXeOxSQ-.js} +1 -1
  18. package/dist/components/p-CZfsknba.js +1 -0
  19. package/dist/components/{p-CtWfOIxb.js → p-CoqA9KgU.js} +1 -1
  20. package/dist/components/{p-ChncPmp-.js → p-CrT06Uwc.js} +1 -1
  21. package/dist/components/{p-pSthmtsz.js → p-D99vy8Ip.js} +1 -1
  22. package/dist/components/{p-BZjIn1hr.js → p-DDAA-zcg.js} +1 -1
  23. package/dist/components/{p-BeYMZ1fR.js → p-DIlNesBH.js} +1 -1
  24. package/dist/components/{p-vTnMooAF.js → p-DNnI3Nru.js} +1 -1
  25. package/dist/components/{p-DRgPF0Fp.js → p-DZTxHJlP.js} +1 -1
  26. package/dist/components/{p-5GcM22aW.js → p-DertIGhs.js} +1 -1
  27. package/dist/components/{p-Bd-fDbVE.js → p-Dl89_4C3.js} +1 -1
  28. package/dist/components/{p-lmVlfugh.js → p-FTvXz0-a.js} +1 -1
  29. package/dist/components/{p-DrSHJYop.js → p-Rwc_ltPn.js} +1 -1
  30. package/dist/components/{p-CjYYBlrZ.js → p-ZvI5A-_t.js} +1 -1
  31. package/dist/components/{p-BuFzlA0M.js → p-gOIeNT-Z.js} +1 -1
  32. package/dist/components/{p-De7UsPPk.js → p-uSEbiD29.js} +1 -1
  33. package/dist/components/{p-DDR0VcRU.js → p-xkRWGISE.js} +1 -1
  34. package/dist/components/sd-action-modal.js +1 -1
  35. package/dist/components/sd-barcode-input.js +1 -1
  36. package/dist/components/sd-button.js +1 -1
  37. package/dist/components/sd-calendar.js +1 -1
  38. package/dist/components/sd-callout.js +1 -1
  39. package/dist/components/sd-checkbox.js +1 -1
  40. package/dist/components/sd-chip-input.js +1 -1
  41. package/dist/components/sd-chip.js +1 -1
  42. package/dist/components/sd-confirm-modal.js +1 -1
  43. package/dist/components/sd-date-picker-trigger.js +1 -1
  44. package/dist/components/sd-date-picker.js +1 -1
  45. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  46. package/dist/components/sd-date-range-picker.js +1 -1
  47. package/dist/components/sd-dropdown-button.js +1 -1
  48. package/dist/components/sd-field.js +1 -1
  49. package/dist/components/sd-file-picker.js +1 -1
  50. package/dist/components/sd-ghost-button.js +1 -1
  51. package/dist/components/sd-guide.js +1 -1
  52. package/dist/components/sd-icon.js +1 -1
  53. package/dist/components/sd-input.js +1 -1
  54. package/dist/components/sd-key-value-table.js +1 -1
  55. package/dist/components/sd-loading-modal.js +1 -1
  56. package/dist/components/sd-modal-container.js +1 -1
  57. package/dist/components/sd-number-input.js +1 -1
  58. package/dist/components/sd-pagination.js +1 -1
  59. package/dist/components/sd-popover.js +1 -1
  60. package/dist/components/sd-popup.js +1 -1
  61. package/dist/components/sd-select-list-item-search.js +1 -1
  62. package/dist/components/sd-select-list-item.js +1 -1
  63. package/dist/components/sd-select-listbox.js +1 -1
  64. package/dist/components/sd-select-trigger.js +1 -1
  65. package/dist/components/sd-select.js +1 -1
  66. package/dist/components/sd-table.js +1 -1
  67. package/dist/components/sd-tabs.js +1 -1
  68. package/dist/components/sd-tag.js +1 -1
  69. package/dist/components/sd-text-link.js +1 -1
  70. package/dist/components/sd-textarea.js +1 -1
  71. package/dist/components/sd-thead.js +1 -1
  72. package/dist/components/sd-toast-container.js +1 -1
  73. package/dist/components/sd-toast.js +1 -1
  74. package/dist/components/sd-tooltip.js +1 -1
  75. package/dist/components/sd-tr.js +1 -1
  76. package/dist/design-system/design-system.esm.js +1 -1
  77. package/dist/design-system/p-17dcf0e4.entry.js +1 -0
  78. package/dist/design-system/p-7ed8c8f1.entry.js +1 -0
  79. package/dist/esm/sd-button_2.entry.js +1 -1
  80. package/dist/esm/sd-modal-container.entry.js +49 -1
  81. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +9 -0
  82. package/hydrate/index.js +50 -2
  83. package/hydrate/index.mjs +50 -2
  84. package/package.json +1 -1
  85. package/dist/components/p-ClKABgST.js +0 -1
  86. package/dist/components/p-DYOyb7rq.js +0 -1
  87. package/dist/design-system/p-3f7349ae.entry.js +0 -1
  88. package/dist/design-system/p-aa312937.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as t,H as e,h as s,d as i,t as r}from"./p-Bg9XySrz.js";import{T as o}from"./p-sZMi_32I.js";import{T as l,j as a,c as n,b as h}from"./p-Cmg10jpN.js";import{d}from"./p-DbLQoVx6.js";import{d as c}from"./p-ClKABgST.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}columns;selectable;stickyColumn;rowKey="";row={};separator=null;tableId="";columnWidths=[];isVisible=!0;spansVersion=0;_columns=[];_selectable=!1;_stickyColumn={left:0,right:0};_scrolledLeft=!1;_scrolledRight=!1;_dense=!1;tableEl=null;componentWillLoad(){this.row=this.row??{},this.syncTableContext(),this.columnWidths=this.columnWidths??[],this.resolveConfig(),this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.updateVisibilitySync()}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),s=e instanceof ShadowRoot?e.host:null,i=t??s;this.tableEl=i;const r=i?.getTableIdSync?.(),l=i?.getAttribute(o),a=(null!=r&&""!==r&&"undefined"!==r?r:null)??(null!=l&&""!==l&&"undefined"!==l?l:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.();this._columns=this.columns??t?.columns??[],this._selectable=this.selectable??t?.selectable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._scrolledLeft=t?.scrolledLeft??!1,this._scrolledRight=t?.scrolledRight??!1,this._dense=t?.dense??!1,t?.columnWidths&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths])}async refreshConfig(){this.resolveConfig()}async bumpSpansVersion(){this.spansVersion=this.spansVersion+1}async updateVisibility(){this.updateVisibilitySync()}updateVisibilitySync(){const t=parseInt(this.rowKey,10),e=this.tableEl?.getPaginationInfoSync?.();this.isVisible=!e||t>=e.startIndex&&t<e.endIndex}async setColumnWidths(t){this.columnWidths=t}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.isSelected())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}formatValue(t){return null==t?"":"number"==typeof t?t.toLocaleString():String(t)}getCellValue(t){const{field:e,format:s,name:i}=t,r="function"==typeof e?e(this.row):""!==e?this.row[e]:this.row[i];return s?s(r,this.row):this.formatValue(r)}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?52:0),s=this.columnWidths.filter(((e,s)=>s>=this.visibleColumns.length-(this._stickyColumn.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.visibleColumns[t],r={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(r.width=`${this.columnWidths[t]}px`,r.minWidth=`${this.columnWidths[t]}px`,r.maxWidth=`${this.columnWidths[t]}px`),r}isSelected(){return!!this.tableEl?.isRowSelectedSync&&this.tableEl.isRowSelectedSync(this.row)}handleSelect(){this.tableEl?.updateRowSelectSync&&this.tableEl.updateRowSelectSync(this.row)}getSpanFor(t){if(this.tableEl?.getSpanSync)return this.tableEl.getSpanSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isCovered(t){return!!this.tableEl?.isCoveredSync&&this.tableEl.isCoveredSync(this.rowKey,t,this._columns)}getCellClassFor(t){if(this.tableEl?.getCellClassSync)return this.tableEl.getCellClassSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}getFramePaddingStyle(t){if(this.tableEl?.isCellUseFrameSync?.(this.rowKey,t))return{padding:`${l.framePadding}px`}}expandCellClass(t){return null==t||""===t?{}:Object.fromEntries(t.split(/\s+/).filter(Boolean).map((t=>[t,!0])))}render(){const t=this._stickyColumn.left||0,e=this._stickyColumn.right||0,r=this.visibleColumns.slice(0,t),o=this.visibleColumns.slice(t,this.visibleColumns.length-e),d=this.visibleColumns.slice(this.visibleColumns.length-e),c=this.tableEl?.hasRowspanSync?.()??!1,p=this.tableEl?.hasUseFrameInRowSync?.(this.rowKey)??!1,b=this._dense&&!p?l.dense:l.default,f={display:this.isVisible?"":"none","--table-body-height":`${b.height}px`,"--table-body-padding-y":`${b.paddingY}px`,"--table-body-padding-x":`${l.paddingX}px`,"--table-body-font-family":h.fontFamily,"--table-body-font-weight":h.fontWeight,"--table-body-font-size":`${h.fontSize}px`,"--table-body-line-height":`${h.lineHeight}px`,"--table-body-text-decoration":h.textDecoration,"--table-border-color":n.color,"--table-border-width":`${n.width}px`,"--table-separator-color":a.color,"--table-separator-width":`${a.width}px`,"--table-separator-dense-width":`${a.denseWidth}px`};return s(i,{style:f},null!=this.separator?s("tr",{class:{tr:!0,"tr--separator":!0,"tr--separator--dense":4===this.separator}},s("td",{colSpan:this.visibleColumns.length+(this._selectable?1:0),class:"td td--separator"})):s("tr",{class:{tr:!0,"tr--no-hover":c}},this._selectable&&s("td",{class:{td:!0,"td--selected":!0,"sticky-left":!0,"sticky-left-edge":0===t,"is-scrolled-left":0===t&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},s("sd-checkbox",{value:this.isSelected(),onSdUpdate:()=>this.handleSelect()})),r.map(((e,i)=>{if(this.isCovered(i))return null;const r="string"==typeof e.field?e.field:e.name,o=this.getSpanFor(e),l=this.getCellClassFor(e);return s("td",{key:e.name,rowSpan:o?.rowspan,colSpan:o?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,"sticky-left":!0,"sticky-left-edge":i===t-1,"is-scrolled-left":i===t-1&&this._scrolledLeft,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(l)},style:{...this.getStickyStyle(i),...this.getFramePaddingStyle(r)}},s("slot",{name:`${this.tableId}-${r}-${this.rowKey}`},s("span",null,this.getCellValue(e))))})),o.map(((e,i)=>{const r=t+i;if(this.isCovered(r))return null;const o="string"==typeof e.field?e.field:e.name,l=this.getSpanFor(e),a=this.getCellClassFor(e);return s("td",{key:e.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(a)},style:{...this.getStickyStyle(r),...this.getFramePaddingStyle(o)}},s("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},s("span",null,this.getCellValue(e))))})),d.map(((t,i)=>{const r=this.visibleColumns.length-e+i;if(this.isCovered(r))return null;const o="string"==typeof t.field?t.field:t.name,l=this.getSpanFor(t),a=this.getCellClassFor(t);return s("td",{key:t.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${t.align||"left"}`]:!0,"sticky-right":!0,"sticky-right-edge":0===i,"is-scrolled-right":0===i&&this._scrolledRight,[`${t.tdClass}`]:Boolean(t.tdClass),...this.expandCellClass(a)},style:{...this.getStickyStyle(r),...this.getFramePaddingStyle(o)}},s("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},s("span",null,this.getCellValue(t))))}))))}static get style(){return'sd-tr{display:contents}sd-tr *{box-sizing:border-box}.tr{display:table-row}.tr:hover .td{background-color:#F9F9F9}.tr--no-hover:hover .td{background-color:white}.tr--separator:hover .td{background-color:var(--table-separator-color, #eeeeee)}.td{display:table-cell;height:var(--table-body-height, 44px);padding:var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);background:white;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.td--left{text-align:left}.td--center{text-align:center}.td--right{text-align:right}.td--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.td--selected sd-checkbox label{position:relative}.td--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.td.sticky-left{position:sticky;background-color:white;z-index:100 !important;left:var(--sticky-left-offset, 0)}.td.sticky-right{position:sticky;background-color:white;z-index:100 !important;right:var(--sticky-right-offset, 0)}.td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-left-edge.is-scrolled-left{overflow:visible}.td.sticky-left-edge.is-scrolled-left:after{opacity:1}.td.sticky-right-edge.is-scrolled-right{overflow:visible}.td.sticky-right-edge.is-scrolled-right:after{opacity:1}.tr:hover .td.sticky-left,.tr:hover .td.sticky-right{background-color:#F9F9F9}.tr--no-hover:hover .td.sticky-left,.tr--no-hover:hover .td.sticky-right{background-color:white}.tr--separator:hover .td.sticky-left,.tr--separator:hover .td.sticky-right{background-color:var(--table-separator-color, #eeeeee)}.tr--separator .td--separator{height:var(--table-separator-width, 6px);padding:0;background-color:var(--table-separator-color, #eeeeee);border-bottom:none}.tr--separator--dense .td--separator{height:var(--table-separator-dense-width, 4px)}.td--divider-left{border-left:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}.td--divider-right{border-right:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}'}},[772,"sd-tr",{columns:[16],selectable:[4],stickyColumn:[16],rowKey:[1,"row-key"],row:[16],separator:[8],tableId:[32],columnWidths:[32],isVisible:[32],spansVersion:[32],_columns:[32],_selectable:[32],_stickyColumn:[32],_scrolledLeft:[32],_scrolledRight:[32],_dense:[32],refreshConfig:[64],bumpSpansVersion:[64],updateVisibility:[64],setColumnWidths:[64],refreshSelection:[64]}]);function b(){"undefined"!=typeof customElements&&["sd-tr","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-tr":customElements.get(r(t))||customElements.define(r(t),p);break;case"sd-checkbox":customElements.get(r(t))||d();break;case"sd-icon":customElements.get(r(t))||c()}}))}export{p as S,b as d}
1
+ import{p as t,H as e,h as s,d as i,t as r}from"./p-Bg9XySrz.js";import{T as o}from"./p-sZMi_32I.js";import{T as l,j as a,c as n,b as h}from"./p-Cmg10jpN.js";import{d}from"./p-CXeOxSQ-.js";import{d as c}from"./p-CZfsknba.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}columns;selectable;stickyColumn;rowKey="";row={};separator=null;tableId="";columnWidths=[];isVisible=!0;spansVersion=0;_columns=[];_selectable=!1;_stickyColumn={left:0,right:0};_scrolledLeft=!1;_scrolledRight=!1;_dense=!1;tableEl=null;componentWillLoad(){this.row=this.row??{},this.syncTableContext(),this.columnWidths=this.columnWidths??[],this.resolveConfig(),this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.updateVisibilitySync()}componentDidLoad(){this.syncTableContext()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),s=e instanceof ShadowRoot?e.host:null,i=t??s;this.tableEl=i;const r=i?.getTableIdSync?.(),l=i?.getAttribute(o),a=(null!=r&&""!==r&&"undefined"!==r?r:null)??(null!=l&&""!==l&&"undefined"!==l?l:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.();this._columns=this.columns??t?.columns??[],this._selectable=this.selectable??t?.selectable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._scrolledLeft=t?.scrolledLeft??!1,this._scrolledRight=t?.scrolledRight??!1,this._dense=t?.dense??!1,t?.columnWidths&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths])}async refreshConfig(){this.resolveConfig()}async bumpSpansVersion(){this.spansVersion=this.spansVersion+1}async updateVisibility(){this.updateVisibilitySync()}updateVisibilitySync(){const t=parseInt(this.rowKey,10),e=this.tableEl?.getPaginationInfoSync?.();this.isVisible=!e||t>=e.startIndex&&t<e.endIndex}async setColumnWidths(t){this.columnWidths=t}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.isSelected())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}formatValue(t){return null==t?"":"number"==typeof t?t.toLocaleString():String(t)}getCellValue(t){const{field:e,format:s,name:i}=t,r="function"==typeof e?e(this.row):""!==e?this.row[e]:this.row[i];return s?s(r,this.row):this.formatValue(r)}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?52:0),s=this.columnWidths.filter(((e,s)=>s>=this.visibleColumns.length-(this._stickyColumn.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.visibleColumns[t],r={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(r.width=`${this.columnWidths[t]}px`,r.minWidth=`${this.columnWidths[t]}px`,r.maxWidth=`${this.columnWidths[t]}px`),r}isSelected(){return!!this.tableEl?.isRowSelectedSync&&this.tableEl.isRowSelectedSync(this.row)}handleSelect(){this.tableEl?.updateRowSelectSync&&this.tableEl.updateRowSelectSync(this.row)}getSpanFor(t){if(this.tableEl?.getSpanSync)return this.tableEl.getSpanSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}isCovered(t){return!!this.tableEl?.isCoveredSync&&this.tableEl.isCoveredSync(this.rowKey,t,this._columns)}getCellClassFor(t){if(this.tableEl?.getCellClassSync)return this.tableEl.getCellClassSync(this.rowKey,"string"==typeof t.field?t.field:t.name)}getFramePaddingStyle(t){if(this.tableEl?.isCellUseFrameSync?.(this.rowKey,t))return{padding:`${l.framePadding}px`}}expandCellClass(t){return null==t||""===t?{}:Object.fromEntries(t.split(/\s+/).filter(Boolean).map((t=>[t,!0])))}render(){const t=this._stickyColumn.left||0,e=this._stickyColumn.right||0,r=this.visibleColumns.slice(0,t),o=this.visibleColumns.slice(t,this.visibleColumns.length-e),d=this.visibleColumns.slice(this.visibleColumns.length-e),c=this.tableEl?.hasRowspanSync?.()??!1,p=this.tableEl?.hasUseFrameInRowSync?.(this.rowKey)??!1,b=this._dense&&!p?l.dense:l.default,f={display:this.isVisible?"":"none","--table-body-height":`${b.height}px`,"--table-body-padding-y":`${b.paddingY}px`,"--table-body-padding-x":`${l.paddingX}px`,"--table-body-font-family":h.fontFamily,"--table-body-font-weight":h.fontWeight,"--table-body-font-size":`${h.fontSize}px`,"--table-body-line-height":`${h.lineHeight}px`,"--table-body-text-decoration":h.textDecoration,"--table-border-color":n.color,"--table-border-width":`${n.width}px`,"--table-separator-color":a.color,"--table-separator-width":`${a.width}px`,"--table-separator-dense-width":`${a.denseWidth}px`};return s(i,{style:f},null!=this.separator?s("tr",{class:{tr:!0,"tr--separator":!0,"tr--separator--dense":4===this.separator}},s("td",{colSpan:this.visibleColumns.length+(this._selectable?1:0),class:"td td--separator"})):s("tr",{class:{tr:!0,"tr--no-hover":c}},this._selectable&&s("td",{class:{td:!0,"td--selected":!0,"sticky-left":!0,"sticky-left-edge":0===t,"is-scrolled-left":0===t&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},s("sd-checkbox",{value:this.isSelected(),onSdUpdate:()=>this.handleSelect()})),r.map(((e,i)=>{if(this.isCovered(i))return null;const r="string"==typeof e.field?e.field:e.name,o=this.getSpanFor(e),l=this.getCellClassFor(e);return s("td",{key:e.name,rowSpan:o?.rowspan,colSpan:o?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,"sticky-left":!0,"sticky-left-edge":i===t-1,"is-scrolled-left":i===t-1&&this._scrolledLeft,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(l)},style:{...this.getStickyStyle(i),...this.getFramePaddingStyle(r)}},s("slot",{name:`${this.tableId}-${r}-${this.rowKey}`},s("span",null,this.getCellValue(e))))})),o.map(((e,i)=>{const r=t+i;if(this.isCovered(r))return null;const o="string"==typeof e.field?e.field:e.name,l=this.getSpanFor(e),a=this.getCellClassFor(e);return s("td",{key:e.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${e.align||"left"}`]:!0,[`${e.tdClass}`]:Boolean(e.tdClass),...this.expandCellClass(a)},style:{...this.getStickyStyle(r),...this.getFramePaddingStyle(o)}},s("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},s("span",null,this.getCellValue(e))))})),d.map(((t,i)=>{const r=this.visibleColumns.length-e+i;if(this.isCovered(r))return null;const o="string"==typeof t.field?t.field:t.name,l=this.getSpanFor(t),a=this.getCellClassFor(t);return s("td",{key:t.name,rowSpan:l?.rowspan,colSpan:l?.colspan,class:{td:!0,[`td--${t.align||"left"}`]:!0,"sticky-right":!0,"sticky-right-edge":0===i,"is-scrolled-right":0===i&&this._scrolledRight,[`${t.tdClass}`]:Boolean(t.tdClass),...this.expandCellClass(a)},style:{...this.getStickyStyle(r),...this.getFramePaddingStyle(o)}},s("slot",{name:`${this.tableId}-${o}-${this.rowKey}`},s("span",null,this.getCellValue(t))))}))))}static get style(){return'sd-tr{display:contents}sd-tr *{box-sizing:border-box}.tr{display:table-row}.tr:hover .td{background-color:#F9F9F9}.tr--no-hover:hover .td{background-color:white}.tr--separator:hover .td{background-color:var(--table-separator-color, #eeeeee)}.td{display:table-cell;height:var(--table-body-height, 44px);padding:var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);background:white;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.td--left{text-align:left}.td--center{text-align:center}.td--right{text-align:right}.td--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.td--selected sd-checkbox label{position:relative}.td--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.td.sticky-left{position:sticky;background-color:white;z-index:100 !important;left:var(--sticky-left-offset, 0)}.td.sticky-right{position:sticky;background-color:white;z-index:100 !important;right:var(--sticky-right-offset, 0)}.td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-left-edge.is-scrolled-left{overflow:visible}.td.sticky-left-edge.is-scrolled-left:after{opacity:1}.td.sticky-right-edge.is-scrolled-right{overflow:visible}.td.sticky-right-edge.is-scrolled-right:after{opacity:1}.tr:hover .td.sticky-left,.tr:hover .td.sticky-right{background-color:#F9F9F9}.tr--no-hover:hover .td.sticky-left,.tr--no-hover:hover .td.sticky-right{background-color:white}.tr--separator:hover .td.sticky-left,.tr--separator:hover .td.sticky-right{background-color:var(--table-separator-color, #eeeeee)}.tr--separator .td--separator{height:var(--table-separator-width, 6px);padding:0;background-color:var(--table-separator-color, #eeeeee);border-bottom:none}.tr--separator--dense .td--separator{height:var(--table-separator-dense-width, 4px)}.td--divider-left{border-left:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}.td--divider-right{border-right:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}'}},[772,"sd-tr",{columns:[16],selectable:[4],stickyColumn:[16],rowKey:[1,"row-key"],row:[16],separator:[8],tableId:[32],columnWidths:[32],isVisible:[32],spansVersion:[32],_columns:[32],_selectable:[32],_stickyColumn:[32],_scrolledLeft:[32],_scrolledRight:[32],_dense:[32],refreshConfig:[64],bumpSpansVersion:[64],updateVisibility:[64],setColumnWidths:[64],refreshSelection:[64]}]);function b(){"undefined"!=typeof customElements&&["sd-tr","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-tr":customElements.get(r(t))||customElements.define(r(t),p);break;case"sd-checkbox":customElements.get(r(t))||d();break;case"sd-icon":customElements.get(r(t))||c()}}))}export{p as S,b as d}
@@ -1 +1 @@
1
- import{p as t,H as i,c as n,h as a,F as e,t as s}from"./p-Bg9XySrz.js";import{d as o}from"./p-ClKABgST.js";var g={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},selected:{fontWeight:"700"}},r={bg:{hover:"#EEEEEE",selected:"#E6F1FF"},content:{default:"#555555",hover:"#004290",selected:"#004290"}};const d={height:`${"24"}px`,paddingX:`${"6"}px`,radius:`${"6"}px`,gap:`${"12"}px`,moveGap:`${{gap:"4"}.gap}px`,iconSize:Number("12")},p={fontFamily:g.default.fontFamily,fontSize:`${g.default.fontSize}px`,lineHeight:`${g.default.lineHeight}px`,fontWeightDefault:g.default.fontWeight,fontWeightSelected:g.selected.fontWeight},h={contentDefault:r.content.default,contentHover:r.content.hover,contentSelected:r.content.selected,bgHover:r.bg.hover,bgSelected:r.bg.selected,iconDefault:"#888888"},l=10,c={1:24,2:34,3:40,4:48,5:56},u=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.pageChange=n(this,"sdPageChange",7)}currentPage=1;lastPage=1;simple=!1;pageChange;get pageNumbers(){const t=Math.floor((this.currentPage-1)/l)*l+1,i=Math.min(t+l-1,this.lastPage);return Array.from({length:i-t+1},((i,n)=>t+n))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return c[t]||c[1]}get isFirstGroup(){return this.currentPage<=l}get isLastGroup(){return Math.floor((this.currentPage-1)/l)*l+1+l-1>=this.lastPage}handlePageChange=t=>{t<1||t>this.lastPage||(this.currentPage=t,this.pageChange.emit(t))};handleGroupChange=t=>{const i=Math.min(Math.max(this.currentPage+("forward"===t?l:-10),1),this.lastPage);this.handlePageChange(i)};renderNavButton(t,i,n){return a("button",{type:"button",class:"sd-pagination__nav","aria-label":i,onClick:n},a("sd-icon",{name:t,size:d.iconSize,color:h.iconDefault}))}renderPrevButtons(){return this.simple?this.currentPage<=1?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page",(()=>this.handlePageChange(this.currentPage-1)))):this.isFirstGroup?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page group",(()=>this.handleGroupChange("backward"))))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:a(e,null,this.renderNavButton("chevronRight","Go to next page",(()=>this.handlePageChange(this.currentPage+1))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage)))):this.isLastGroup?null:a(e,null,this.renderNavButton("chevronRight","Go to next page group",(()=>this.handleGroupChange("forward"))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage))))}render(){return a("div",{key:"8a2219bbc3a17951ed66501e7246f230f0495e74",class:{"sd-pagination":!0,"sd-pagination--simple":this.simple},style:{"--sd-pagination-height":d.height,"--sd-pagination-padding-x":d.paddingX,"--sd-pagination-radius":d.radius,"--sd-pagination-gap":d.gap,"--sd-pagination-move-gap":d.moveGap,"--sd-pagination-font-family":p.fontFamily,"--sd-pagination-font-size":p.fontSize,"--sd-pagination-line-height":p.lineHeight,"--sd-pagination-font-weight-default":p.fontWeightDefault,"--sd-pagination-font-weight-selected":p.fontWeightSelected,"--sd-pagination-content":h.contentDefault,"--sd-pagination-content-hover":h.contentHover,"--sd-pagination-content-selected":h.contentSelected,"--sd-pagination-bg-hover":h.bgHover,"--sd-pagination-bg-selected":h.bgSelected,"--sd-pagination-item-width":`${this.buttonWidth}px`}},a("div",{key:"7e9ddb98aff7506fc3b6053d84c1be211e3d1ff7",class:"sd-pagination__group sd-pagination__group--prev"},this.renderPrevButtons()),this.simple?a("div",{class:"sd-pagination__info"},a("span",{class:"sd-pagination__current"},this.currentPage),a("span",{class:"sd-pagination__divider"},"/"),a("span",{class:"sd-pagination__last"},this.lastPage)):a("div",{class:"sd-pagination__numbers"},this.pageNumbers.map((t=>a("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"sd-pagination__item":!0,"sd-pagination__item--selected":this.currentPage===t},onClick:()=>this.handlePageChange(t)},t)))),a("div",{key:"937554ea8d3ae71da85e2c1f49d82c99658141f0",class:"sd-pagination__group sd-pagination__group--next"},this.renderNextButtons()))}static get style(){return"sd-pagination{display:inline-flex}.sd-pagination{display:inline-flex;align-items:center;gap:var(--sd-pagination-gap);font-family:var(--sd-pagination-font-family)}.sd-pagination__group{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);min-width:calc(var(--sd-pagination-height) * 2 + var(--sd-pagination-move-gap))}.sd-pagination__group--prev{justify-content:flex-end}.sd-pagination__group--next{justify-content:flex-start}.sd-pagination__numbers{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap)}.sd-pagination__nav{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-height);height:var(--sd-pagination-height);padding:0;background:transparent;border:0;border-radius:var(--sd-pagination-radius);cursor:pointer;outline:none}.sd-pagination__nav:hover{background-color:var(--sd-pagination-bg-hover)}.sd-pagination__item{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-item-width);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);background:transparent;border:0;border-radius:var(--sd-pagination-radius);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height);cursor:pointer;outline:none;box-sizing:border-box}.sd-pagination__item:hover{background-color:var(--sd-pagination-bg-hover);color:var(--sd-pagination-content-hover)}.sd-pagination__item--selected{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}.sd-pagination__item--selected:hover{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected)}.sd-pagination__info{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height)}.sd-pagination__current{color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}"}},[512,"sd-pagination",{currentPage:[1026,"current-page"],lastPage:[2,"last-page"],simple:[4]}]);function v(){"undefined"!=typeof customElements&&["sd-pagination","sd-icon"].forEach((t=>{switch(t){case"sd-pagination":customElements.get(s(t))||customElements.define(s(t),u);break;case"sd-icon":customElements.get(s(t))||o()}}))}export{u as S,v as d}
1
+ import{p as t,H as i,c as n,h as a,F as e,t as s}from"./p-Bg9XySrz.js";import{d as o}from"./p-CZfsknba.js";var g={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},selected:{fontWeight:"700"}},r={bg:{hover:"#EEEEEE",selected:"#E6F1FF"},content:{default:"#555555",hover:"#004290",selected:"#004290"}};const d={height:`${"24"}px`,paddingX:`${"6"}px`,radius:`${"6"}px`,gap:`${"12"}px`,moveGap:`${{gap:"4"}.gap}px`,iconSize:Number("12")},p={fontFamily:g.default.fontFamily,fontSize:`${g.default.fontSize}px`,lineHeight:`${g.default.lineHeight}px`,fontWeightDefault:g.default.fontWeight,fontWeightSelected:g.selected.fontWeight},h={contentDefault:r.content.default,contentHover:r.content.hover,contentSelected:r.content.selected,bgHover:r.bg.hover,bgSelected:r.bg.selected,iconDefault:"#888888"},l=10,c={1:24,2:34,3:40,4:48,5:56},u=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.pageChange=n(this,"sdPageChange",7)}currentPage=1;lastPage=1;simple=!1;pageChange;get pageNumbers(){const t=Math.floor((this.currentPage-1)/l)*l+1,i=Math.min(t+l-1,this.lastPage);return Array.from({length:i-t+1},((i,n)=>t+n))}get buttonWidth(){const t=(this.pageNumbers.at(-1)??1).toString().length;return c[t]||c[1]}get isFirstGroup(){return this.currentPage<=l}get isLastGroup(){return Math.floor((this.currentPage-1)/l)*l+1+l-1>=this.lastPage}handlePageChange=t=>{t<1||t>this.lastPage||(this.currentPage=t,this.pageChange.emit(t))};handleGroupChange=t=>{const i=Math.min(Math.max(this.currentPage+("forward"===t?l:-10),1),this.lastPage);this.handlePageChange(i)};renderNavButton(t,i,n){return a("button",{type:"button",class:"sd-pagination__nav","aria-label":i,onClick:n},a("sd-icon",{name:t,size:d.iconSize,color:h.iconDefault}))}renderPrevButtons(){return this.simple?this.currentPage<=1?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page",(()=>this.handlePageChange(this.currentPage-1)))):this.isFirstGroup?null:a(e,null,this.renderNavButton("chevronLeftEnd","Go to first page",(()=>this.handlePageChange(1))),this.renderNavButton("chevronLeft","Go to previous page group",(()=>this.handleGroupChange("backward"))))}renderNextButtons(){return this.simple?this.currentPage>=this.lastPage?null:a(e,null,this.renderNavButton("chevronRight","Go to next page",(()=>this.handlePageChange(this.currentPage+1))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage)))):this.isLastGroup?null:a(e,null,this.renderNavButton("chevronRight","Go to next page group",(()=>this.handleGroupChange("forward"))),this.renderNavButton("chevronRightEnd","Go to last page",(()=>this.handlePageChange(this.lastPage))))}render(){return a("div",{key:"8a2219bbc3a17951ed66501e7246f230f0495e74",class:{"sd-pagination":!0,"sd-pagination--simple":this.simple},style:{"--sd-pagination-height":d.height,"--sd-pagination-padding-x":d.paddingX,"--sd-pagination-radius":d.radius,"--sd-pagination-gap":d.gap,"--sd-pagination-move-gap":d.moveGap,"--sd-pagination-font-family":p.fontFamily,"--sd-pagination-font-size":p.fontSize,"--sd-pagination-line-height":p.lineHeight,"--sd-pagination-font-weight-default":p.fontWeightDefault,"--sd-pagination-font-weight-selected":p.fontWeightSelected,"--sd-pagination-content":h.contentDefault,"--sd-pagination-content-hover":h.contentHover,"--sd-pagination-content-selected":h.contentSelected,"--sd-pagination-bg-hover":h.bgHover,"--sd-pagination-bg-selected":h.bgSelected,"--sd-pagination-item-width":`${this.buttonWidth}px`}},a("div",{key:"7e9ddb98aff7506fc3b6053d84c1be211e3d1ff7",class:"sd-pagination__group sd-pagination__group--prev"},this.renderPrevButtons()),this.simple?a("div",{class:"sd-pagination__info"},a("span",{class:"sd-pagination__current"},this.currentPage),a("span",{class:"sd-pagination__divider"},"/"),a("span",{class:"sd-pagination__last"},this.lastPage)):a("div",{class:"sd-pagination__numbers"},this.pageNumbers.map((t=>a("button",{type:"button","aria-current":this.currentPage===t?"page":void 0,class:{"sd-pagination__item":!0,"sd-pagination__item--selected":this.currentPage===t},onClick:()=>this.handlePageChange(t)},t)))),a("div",{key:"937554ea8d3ae71da85e2c1f49d82c99658141f0",class:"sd-pagination__group sd-pagination__group--next"},this.renderNextButtons()))}static get style(){return"sd-pagination{display:inline-flex}.sd-pagination{display:inline-flex;align-items:center;gap:var(--sd-pagination-gap);font-family:var(--sd-pagination-font-family)}.sd-pagination__group{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);min-width:calc(var(--sd-pagination-height) * 2 + var(--sd-pagination-move-gap))}.sd-pagination__group--prev{justify-content:flex-end}.sd-pagination__group--next{justify-content:flex-start}.sd-pagination__numbers{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap)}.sd-pagination__nav{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-height);height:var(--sd-pagination-height);padding:0;background:transparent;border:0;border-radius:var(--sd-pagination-radius);cursor:pointer;outline:none}.sd-pagination__nav:hover{background-color:var(--sd-pagination-bg-hover)}.sd-pagination__item{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-item-width);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);background:transparent;border:0;border-radius:var(--sd-pagination-radius);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height);cursor:pointer;outline:none;box-sizing:border-box}.sd-pagination__item:hover{background-color:var(--sd-pagination-bg-hover);color:var(--sd-pagination-content-hover)}.sd-pagination__item--selected{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}.sd-pagination__item--selected:hover{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected)}.sd-pagination__info{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height)}.sd-pagination__current{color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}"}},[512,"sd-pagination",{currentPage:[1026,"current-page"],lastPage:[2,"last-page"],simple:[4]}]);function v(){"undefined"!=typeof customElements&&["sd-pagination","sd-icon"].forEach((t=>{switch(t){case"sd-pagination":customElements.get(s(t))||customElements.define(s(t),u);break;case"sd-icon":customElements.get(s(t))||o()}}))}export{u as S,v as d}
@@ -1 +1 @@
1
- import{p as t,H as s,c as e,h as a,t as o}from"./p-Bg9XySrz.js";import{d as n}from"./p-DDR0VcRU.js";import{d as i}from"./p-CjYYBlrZ.js";import{d}from"./p-ClKABgST.js";import{d as c}from"./p-B7PHGGFH.js";import{d as l}from"./p-De7UsPPk.js";var r={bg:"#07284A",content:"#FFFFFF"},b={bg:"#FB4444",content:"#FFFFFF"},p={bg:"#FFC700",content:"#222222"},u={bg:"#00973C",content:"#FFFFFF"},f={bg:"#005CC9",content:"#FFFFFF"},m={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const g={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},h={default:{bg:r.bg,content:r.content},danger:{bg:b.bg,content:b.content},caution:{bg:p.bg,content:p.content},complete:{bg:u.bg,content:u.content},accent:{bg:f.bg,content:f.content},info:{bg:m.bg,content:m.text,icon:m.icon,linkColor:m.textLink}},k={iconSize:"16"},_=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose",7),this.buttonClick=e(this,"sdButtonClick",7)}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="default";close;buttonClick;render(){const t=h[this.type]??h.default,s=Number(k.iconSize),e=t.icon??t.content,o=t.linkColor??t.content,n=["default","caution","info"].includes(this.type),i=g[this.type]??g.default;return a("div",{key:"45a278a76dde70b17794763fa35365ac8d634194",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content,"--sd-toast-icon":e,"--sd-toast-link":o}},a("div",{key:"eb00957c65514153867322942ed111d24622c75b",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&a("div",{key:"d30f442041ea963e86f8558f3ed07ceb28049ae9",class:"sd-toast__icon"},a("sd-icon",{key:"04e57935a4fe4344f3eb1338cfc436bef449805e",name:this.icon,size:s,color:e})),a("div",{key:"02270cd25d409d44bbd1d7932b074494d2cbeca1",class:"sd-toast__content"},a("span",{key:"5f180c70d130fc04b16901c69a399f6effa328b9",class:"sd-toast__message"},this.message)),this.link&&a("a",{key:"4fd2adab87dbdaae94c21483f66256ce773ae965",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&a("sd-button",{key:"2c60553150114d6d5b99a2e86b35b4a85c4a34a4",class:"sd-toast__button",name:i,label:this.buttonLabel,onSdClick:t=>this.buttonClick.emit(t.detail)}),this.useClose&&a("sd-ghost-button",{key:"c3e01391b713286b65a05352dd39ab98790564f8",class:"sd-toast__close",icon:"close",intent:n?"default":"inverse",ariaLabel:"close",size:"xs",onClick:()=>this.close.emit()})))}static get style(){return"sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:var(--sd-toast-gap, 16px);padding:var(--sd-toast-padding-y, 12px) var(--sd-toast-padding-x, 24px);border-radius:var(--sd-toast-radius, 8px);background-color:var(--sd-toast-bg);color:var(--sd-toast-text);box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:24px;font-weight:500;white-space:nowrap}sd-toast .sd-toast__link{font-size:14px;line-height:24px;font-weight:700;color:var(--sd-toast-link, var(--sd-toast-text));text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px;white-space:nowrap}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__close{flex-shrink:0}"}},[512,"sd-toast",{icon:[1],message:[1],link:[1],linkLabel:[1,"link-label"],buttonLabel:[1,"button-label"],useClose:[4,"use-close"],type:[1]}]);function F(){"undefined"!=typeof customElements&&["sd-toast","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-toast":customElements.get(o(t))||customElements.define(o(t),_);break;case"sd-button":customElements.get(o(t))||n();break;case"sd-ghost-button":customElements.get(o(t))||i();break;case"sd-icon":customElements.get(o(t))||d();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-tag":customElements.get(o(t))||l()}}))}export{_ as S,F as d}
1
+ import{p as t,H as s,c as e,h as a,t as o}from"./p-Bg9XySrz.js";import{d as n}from"./p-xkRWGISE.js";import{d as i}from"./p-ZvI5A-_t.js";import{d}from"./p-CZfsknba.js";import{d as c}from"./p-B7PHGGFH.js";import{d as l}from"./p-uSEbiD29.js";var r={bg:"#07284A",content:"#FFFFFF"},b={bg:"#FB4444",content:"#FFFFFF"},p={bg:"#FFC700",content:"#222222"},u={bg:"#00973C",content:"#FFFFFF"},f={bg:"#005CC9",content:"#FFFFFF"},m={bg:"#E6F1FF",icon:"#0075FF",text:"#222222",textLink:"#555555"};const g={default:"secondary_sm",danger:"danger_outline_sm",caution:"neutral_outline_sm",complete:"neutral_outline_sm",accent:"neutral_outline_sm",info:"secondary_sm"},h={default:{bg:r.bg,content:r.content},danger:{bg:b.bg,content:b.content},caution:{bg:p.bg,content:p.content},complete:{bg:u.bg,content:u.content},accent:{bg:f.bg,content:f.content},info:{bg:m.bg,content:m.text,icon:m.icon,linkColor:m.textLink}},k={iconSize:"16"},_=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=e(this,"sdClose",7),this.buttonClick=e(this,"sdButtonClick",7)}icon;message;link;linkLabel;buttonLabel;useClose=!1;type="default";close;buttonClick;render(){const t=h[this.type]??h.default,s=Number(k.iconSize),e=t.icon??t.content,o=t.linkColor??t.content,n=["default","caution","info"].includes(this.type),i=g[this.type]??g.default;return a("div",{key:"45a278a76dde70b17794763fa35365ac8d634194",style:{"--sd-toast-bg":t.bg,"--sd-toast-text":t.content,"--sd-toast-icon":e,"--sd-toast-link":o}},a("div",{key:"eb00957c65514153867322942ed111d24622c75b",class:"sd-toast",role:"status","aria-live":"polite","aria-atomic":"true"},this.icon&&a("div",{key:"d30f442041ea963e86f8558f3ed07ceb28049ae9",class:"sd-toast__icon"},a("sd-icon",{key:"04e57935a4fe4344f3eb1338cfc436bef449805e",name:this.icon,size:s,color:e})),a("div",{key:"02270cd25d409d44bbd1d7932b074494d2cbeca1",class:"sd-toast__content"},a("span",{key:"5f180c70d130fc04b16901c69a399f6effa328b9",class:"sd-toast__message"},this.message)),this.link&&a("a",{key:"4fd2adab87dbdaae94c21483f66256ce773ae965",href:this.link,class:"sd-toast__link",target:"_blank",rel:"noopener noreferrer"},this.linkLabel||this.link),this.buttonLabel&&a("sd-button",{key:"2c60553150114d6d5b99a2e86b35b4a85c4a34a4",class:"sd-toast__button",name:i,label:this.buttonLabel,onSdClick:t=>this.buttonClick.emit(t.detail)}),this.useClose&&a("sd-ghost-button",{key:"c3e01391b713286b65a05352dd39ab98790564f8",class:"sd-toast__close",icon:"close",intent:n?"default":"inverse",ariaLabel:"close",size:"xs",onClick:()=>this.close.emit()})))}static get style(){return"sd-toast{display:block;width:fit-content;height:fit-content}sd-toast .sd-toast{display:flex;width:fit-content;align-items:center;gap:var(--sd-toast-gap, 16px);padding:var(--sd-toast-padding-y, 12px) var(--sd-toast-padding-x, 24px);border-radius:var(--sd-toast-radius, 8px);background-color:var(--sd-toast-bg);color:var(--sd-toast-text);box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}sd-toast .sd-toast__icon{display:flex;align-items:center;flex-shrink:0}sd-toast .sd-toast__content{display:flex;flex:1}sd-toast .sd-toast__message{font-size:14px;line-height:24px;font-weight:500;white-space:nowrap}sd-toast .sd-toast__link{font-size:14px;line-height:24px;font-weight:700;color:var(--sd-toast-link, var(--sd-toast-text));text-decoration:underline;cursor:pointer;transition:opacity 0.2s ease;margin-left:4px;white-space:nowrap}sd-toast .sd-toast__link:hover{opacity:0.8}sd-toast .sd-toast__button{flex-shrink:0}sd-toast .sd-toast__close{flex-shrink:0}"}},[512,"sd-toast",{icon:[1],message:[1],link:[1],linkLabel:[1,"link-label"],buttonLabel:[1,"button-label"],useClose:[4,"use-close"],type:[1]}]);function F(){"undefined"!=typeof customElements&&["sd-toast","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-toast":customElements.get(o(t))||customElements.define(o(t),_);break;case"sd-button":customElements.get(o(t))||n();break;case"sd-ghost-button":customElements.get(o(t))||i();break;case"sd-icon":customElements.get(o(t))||d();break;case"sd-portal":customElements.get(o(t))||c();break;case"sd-tag":customElements.get(o(t))||l()}}))}export{_ as S,F as d}
@@ -1 +1 @@
1
- import{p as t,H as s,c as e,h as i,t as o}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-DDR0VcRU.js";import{d as a}from"./p-DbLQoVx6.js";import{d as h}from"./p-CiEAVQT4.js";import{d}from"./p-P2jWtk8J.js";import{d as n}from"./p-CjYYBlrZ.js";import{d as c}from"./p-ClKABgST.js";import{d as p}from"./p-B7PHGGFH.js";import{d as u}from"./p-5GcM22aW.js";import{d as m}from"./p-BuFzlA0M.js";import{d as f}from"./p-DaMzYzXI.js";import{d as b}from"./p-BHW1fnDC.js";import{d as g}from"./p-De7UsPPk.js";import{d as w}from"./p-vTnMooAF.js";const T=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),s=this.getSelectedOptions();if(t.length>0&&t.every((t=>s.some((s=>s.value===t.value)))))return this.allSelectedLabel??"전체";const e=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const s=t;return s.label??e.find((t=>t.value===s.value))?.label??""}return e.find((s=>s.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,s){const e=Number.parseFloat(t);return Number.isFinite(e)?e:s}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const s=this.triggerRef.getBoundingClientRect(),e=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-s.bottom-e-i,0),a=Math.max(s.top-e-i,0),h=Math.max(l,a),d=Math.max(window.innerWidth-2*e,0);this.resolvedDropdownHeight=`${Math.min(o,h)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,s){for(const e of s){if(e.value===t)return e;if(e.children){const s=this.findOriginalOption(t,e.children);if(s)return s}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:s,leaves:e}=t;if(this.isMulti)this.handleMultiSelect(s,e);else{this.closeDropdown(),this.value=this.emitValue?s.value:s;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,s){const e=this.getSelectedOptions();let i;if(t.children)if(s.every((t=>e.some((s=>s.value===t.value))))){const t=new Set(s.map((t=>t.value)));i=e.filter((s=>!t.has(s.value)))}else{const t=new Set(e.map((t=>t.value))),o=s.filter((s=>!t.has(s.value)));i=[...e,...o]}else i=e.some((s=>s.value===t.value))?e.filter((s=>s.value!==t.value)):[...e,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const s={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"f95dc4008dd1f252f8cb41637aa817bdd4d72ba0",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"f12b88dc846a01fc2076242623ac1376ebc0105c",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"8cef3403ca0a0430c3ce9f8255c98f0e28142d80",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"417194938ff7aac0b22abbba621342dbe767b146",...s},i("sd-select-listbox",{key:"0c311407fdc72f37fa7dddf48fdfbaab668a18f4",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),T);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||a();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||f();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{T as S,x as d}
1
+ import{p as t,H as s,c as e,h as i,t as o}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{d as a}from"./p-xkRWGISE.js";import{d as l}from"./p-CXeOxSQ-.js";import{d as h}from"./p-CB2A3pJ5.js";import{d}from"./p-P2jWtk8J.js";import{d as n}from"./p-ZvI5A-_t.js";import{d as c}from"./p-CZfsknba.js";import{d as p}from"./p-B7PHGGFH.js";import{d as u}from"./p-DertIGhs.js";import{d as m}from"./p-gOIeNT-Z.js";import{d as f}from"./p-Bz93hWXV.js";import{d as b}from"./p-BjcGzaFR.js";import{d as g}from"./p-uSEbiD29.js";import{d as w}from"./p-DNnI3Nru.js";const S=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=e(this,"sdUpdate",7),this.dropDownShow=e(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),s=this.getSelectedOptions();if(t.length>0&&t.every((t=>s.some((s=>s.value===t.value)))))return this.allSelectedLabel??"전체";const e=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const s=t;return s.label??e.find((t=>t.value===s.value))?.label??""}return e.find((s=>s.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,s){const e=Number.parseFloat(t);return Number.isFinite(e)?e:s}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const s=this.triggerRef.getBoundingClientRect(),e=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),a=Math.max(window.innerHeight-s.bottom-e-i,0),l=Math.max(s.top-e-i,0),h=Math.max(a,l),d=Math.max(window.innerWidth-2*e,0);this.resolvedDropdownHeight=`${Math.min(o,h)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,s){for(const e of s){if(e.value===t)return e;if(e.children){const s=this.findOriginalOption(t,e.children);if(s)return s}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:s,leaves:e}=t;if(this.isMulti)this.handleMultiSelect(s,e);else{this.closeDropdown(),this.value=this.emitValue?s.value:s;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,s){const e=this.getSelectedOptions();let i;if(t.children)if(s.every((t=>e.some((s=>s.value===t.value))))){const t=new Set(s.map((t=>t.value)));i=e.filter((s=>!t.has(s.value)))}else{const t=new Set(e.map((t=>t.value))),o=s.filter((s=>!t.has(s.value)));i=[...e,...o]}else i=e.some((s=>s.value===t.value))?e.filter((s=>s.value!==t.value)):[...e,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const s={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"f95dc4008dd1f252f8cb41637aa817bdd4d72ba0",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,onMouseEnter:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"f12b88dc846a01fc2076242623ac1376ebc0105c",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"8cef3403ca0a0430c3ce9f8255c98f0e28142d80",ref:t=>{this.triggerComponentRef=t},displayText:this.displayText,placeholder:this.placeholder??"선택",disabled:this.disabled,isOpen:this.isOpen,onSdTriggerClick:this.handleTriggerClick,onSdTriggerFocus:this.handleTriggerFocus,onSdTriggerBlur:this.handleTriggerBlur})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"417194938ff7aac0b22abbba621342dbe767b146",...s},i("sd-select-listbox",{key:"0c311407fdc72f37fa7dddf48fdfbaab668a18f4",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),S);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-checkbox":customElements.get(o(t))||l();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||f();break;case"sd-select-trigger":customElements.get(o(t))||b();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{S,x as d}
@@ -1 +1 @@
1
- import{p as t,H as i,c as s,h as e,t as h}from"./p-Bg9XySrz.js";import{d as n}from"./p-CjYYBlrZ.js";import{d as o}from"./p-ClKABgST.js";import{d as a}from"./p-B7PHGGFH.js";import{d}from"./p-De7UsPPk.js";var r={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},focus:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"400",lineHeight:"20"}},c={default:"#F6F6F6",error:"#FCEFEF"},l={default:"#555555",error:"#E30000",focus:"#222222"};const p={height:`${"24"}px`,paddingX:`${"8"}px`,gap:`${"4"}px`,radius:`${"9999"}px`,borderWidth:`${{width:"1"}.width}px`},u={bg:{default:c.default,error:c.error},content:{default:l.default,error:l.error,focus:l.focus}},f={default:{fontFamily:r.default.fontFamily,fontSize:`${r.default.fontSize}px`,fontWeight:r.default.fontWeight,lineHeight:`${r.default.lineHeight}px`},focus:{fontFamily:r.focus.fontFamily,fontSize:`${r.focus.fontSize}px`,fontWeight:r.focus.fontWeight,lineHeight:`${r.focus.lineHeight}px`}},m=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.delete=s(this,"sdRemove",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}name="";value="";error=!1;disabled=!1;editable=!0;placeholder="";rules=[];internalValue="";isEditing=!1;update;delete;focus;blur;inputEl;draftValue="";shouldInitInput=!1;valueChanged(t){const i=t??"",s=this.isEditing;this.internalValue=i,this.draftValue=i,s&&(this.isEditing=!1,this.shouldInitInput=!1,this.inputEl?.blur(),this.blur.emit())}componentWillLoad(){this.internalValue=this.value??""}componentDidLoad(){this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}async sdValidate(){if(!this.rules||0===this.rules.length)return this.error=!1,!0;for(const t of this.rules)if(!0!==t(this.internalValue??""))return this.error=!0,!1;return this.error=!1,!0}async sdReset(){this.internalValue="",this.value="",this.error=!1,this.draftValue="",this.isEditing=!1,this.shouldInitInput=!1}async sdResetValidate(){this.error=!1}async sdResetValidation(){this.error=!1}async sdFocus(){this.disabled||this.enterEditMode()}async sdGetNativeElement(){return this.inputEl??null}get isEditable(){return!1!==this.editable}enterEditMode=()=>{this.disabled||this.isEditing||!this.isEditable||(this.draftValue=this.internalValue,this.shouldInitInput=!0,this.isEditing=!0,this.focus.emit())};commitEdit=async()=>{if(!this.isEditing)return;const t=(this.inputEl?.textContent??this.draftValue).trim(),i=t!==this.draftValue;this.internalValue=t,this.isEditing=!1,this.shouldInitInput=!1,this.value=t,i&&this.update.emit(t),await this.sdValidate(),this.blur.emit()};cancelEdit=()=>{this.isEditing&&(this.internalValue=this.draftValue,this.isEditing=!1,this.shouldInitInput=!1,this.blur.emit())};handleChipClick=()=>{this.disabled||this.isEditing||!this.isEditable||this.enterEditMode()};handleChipKeyDown=t=>{this.disabled||this.isEditing||!this.isEditable||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.enterEditMode())};handleInputChange=t=>{this.internalValue=t.target.textContent??""};handleInputKeyDown=t=>{"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),this.commitEdit()):"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.cancelEdit())};handleInputBlur=()=>{this.commitEdit()};handlePaste=t=>{t.preventDefault();const i=t.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,i)};handleRemoveClick=t=>{t.stopPropagation(),this.disabled||this.delete.emit()};syncInputValue(t){if(!this.inputEl)return;this.inputEl.textContent=t;const i=document.createRange();i.selectNodeContents(this.inputEl),i.collapse(!1);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(i)}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)}))}componentDidUpdate(){this.isEditing&&this.inputEl&&this.shouldInitInput&&(this.inputEl.focus(),this.syncInputValue(this.internalValue),this.shouldInitInput=!1)}resolveState(){return this.isEditing?"focus":this.error?"error":"default"}render(){const t=this.resolveState(),i=f.default,s={"--sd-chip-height":p.height,"--sd-chip-padding-x":p.paddingX,"--sd-chip-gap":p.gap,"--sd-chip-radius":p.radius,"--sd-chip-border-width":p.borderWidth,"--sd-chip-bg":"error"===t?u.bg.error:u.bg.default,"--sd-chip-content":"error"===t?u.content.error:u.content.default,"--sd-chip-border-color":"transparent","--sd-chip-font-family":i.fontFamily,"--sd-chip-font-size":i.fontSize,"--sd-chip-font-weight":i.fontWeight,"--sd-chip-line-height":i.lineHeight};return e("span",{key:"a51c874d8f2ce5abea1dbcf878b4f1ceda0952a3",class:{"sd-chip":!0,[`sd-chip--${t}`]:!0,"sd-chip--disabled":this.disabled,"sd-chip--editable":!this.disabled&&this.isEditable},role:this.disabled||!this.isEditable?void 0:"button",tabIndex:this.disabled||this.isEditing||!this.isEditable?-1:0,"aria-disabled":this.disabled?"true":void 0,style:s,onClick:this.handleChipClick,onKeyDown:this.handleChipKeyDown},this.isEditing?e("span",{key:"chip-input",ref:t=>this.inputEl=t,class:"sd-chip__input",role:"textbox",tabindex:this.disabled?-1:0,contentEditable:!this.disabled,"data-placeholder":this.placeholder,spellcheck:!1,onInput:this.handleInputChange,onKeyDown:this.handleInputKeyDown,onBlur:this.handleInputBlur,onPaste:this.handlePaste,onClick:t=>t.stopPropagation()}):[e("span",{key:"chip-label",class:"sd-chip__label"},this.internalValue),!this.disabled&&e("sd-ghost-button",{key:"chip-remove",class:"sd-chip__remove",icon:"close",size:"xxs",ariaLabel:"remove",onClick:this.handleRemoveClick})])}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-chip{display:inline-flex;width:fit-content;max-width:100%;height:fit-content}sd-chip .sd-chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-chip-gap);max-width:100%;height:var(--sd-chip-height);padding:0 var(--sd-chip-padding-x);border-radius:var(--sd-chip-radius);background:var(--sd-chip-bg);color:var(--sd-chip-content);border:var(--sd-chip-border-width) solid var(--sd-chip-border-color);font-family:var(--sd-chip-font-family);font-size:var(--sd-chip-font-size);font-weight:var(--sd-chip-font-weight);line-height:var(--sd-chip-line-height);box-sizing:border-box;white-space:nowrap;overflow:hidden;-webkit-user-select:none;user-select:none}sd-chip .sd-chip--editable:not(.sd-chip--focus){cursor:text}sd-chip .sd-chip--disabled{cursor:not-allowed;opacity:0.6}sd-chip .sd-chip__label{display:inline-flex;align-items:center;min-width:0;overflow:hidden;text-overflow:ellipsis}sd-chip .sd-chip__input{display:inline-block;min-width:1ch;outline:none;background:transparent;color:inherit;font:inherit;white-space:nowrap;cursor:text}sd-chip .sd-chip__input:empty::before{content:attr(data-placeholder);color:inherit;opacity:0.6;pointer-events:none}sd-chip .sd-chip__remove{flex-shrink:0}"}},[512,"sd-chip",{name:[1],value:[1025],error:[1028],disabled:[4],editable:[4],placeholder:[1],rules:[16],internalValue:[32],isEditing:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdResetValidation:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["sd-chip","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-chip":customElements.get(h(t))||customElements.define(h(t),m);break;case"sd-ghost-button":customElements.get(h(t))||n();break;case"sd-icon":customElements.get(h(t))||o();break;case"sd-portal":customElements.get(h(t))||a();break;case"sd-tag":customElements.get(h(t))||d()}}))}export{f as C,m as S,u as a,p as b,g as d}
1
+ import{p as t,H as i,c as s,h as e,t as h}from"./p-Bg9XySrz.js";import{d as n}from"./p-ZvI5A-_t.js";import{d as o}from"./p-CZfsknba.js";import{d as a}from"./p-B7PHGGFH.js";import{d}from"./p-uSEbiD29.js";var r={default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",lineHeight:"20"},focus:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"400",lineHeight:"20"}},c={default:"#F6F6F6",error:"#FCEFEF"},l={default:"#555555",error:"#E30000",focus:"#222222"};const p={height:`${"24"}px`,paddingX:`${"8"}px`,gap:`${"4"}px`,radius:`${"9999"}px`,borderWidth:`${{width:"1"}.width}px`},u={bg:{default:c.default,error:c.error},content:{default:l.default,error:l.error,focus:l.focus}},f={default:{fontFamily:r.default.fontFamily,fontSize:`${r.default.fontSize}px`,fontWeight:r.default.fontWeight,lineHeight:`${r.default.lineHeight}px`},focus:{fontFamily:r.focus.fontFamily,fontSize:`${r.focus.fontSize}px`,fontWeight:r.focus.fontWeight,lineHeight:`${r.focus.lineHeight}px`}},m=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.delete=s(this,"sdRemove",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}name="";value="";error=!1;disabled=!1;editable=!0;placeholder="";rules=[];internalValue="";isEditing=!1;update;delete;focus;blur;inputEl;draftValue="";shouldInitInput=!1;valueChanged(t){const i=t??"",s=this.isEditing;this.internalValue=i,this.draftValue=i,s&&(this.isEditing=!1,this.shouldInitInput=!1,this.inputEl?.blur(),this.blur.emit())}componentWillLoad(){this.internalValue=this.value??""}componentDidLoad(){this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}async sdValidate(){if(!this.rules||0===this.rules.length)return this.error=!1,!0;for(const t of this.rules)if(!0!==t(this.internalValue??""))return this.error=!0,!1;return this.error=!1,!0}async sdReset(){this.internalValue="",this.value="",this.error=!1,this.draftValue="",this.isEditing=!1,this.shouldInitInput=!1}async sdResetValidate(){this.error=!1}async sdResetValidation(){this.error=!1}async sdFocus(){this.disabled||this.enterEditMode()}async sdGetNativeElement(){return this.inputEl??null}get isEditable(){return!1!==this.editable}enterEditMode=()=>{this.disabled||this.isEditing||!this.isEditable||(this.draftValue=this.internalValue,this.shouldInitInput=!0,this.isEditing=!0,this.focus.emit())};commitEdit=async()=>{if(!this.isEditing)return;const t=(this.inputEl?.textContent??this.draftValue).trim(),i=t!==this.draftValue;this.internalValue=t,this.isEditing=!1,this.shouldInitInput=!1,this.value=t,i&&this.update.emit(t),await this.sdValidate(),this.blur.emit()};cancelEdit=()=>{this.isEditing&&(this.internalValue=this.draftValue,this.isEditing=!1,this.shouldInitInput=!1,this.blur.emit())};handleChipClick=()=>{this.disabled||this.isEditing||!this.isEditable||this.enterEditMode()};handleChipKeyDown=t=>{this.disabled||this.isEditing||!this.isEditable||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.enterEditMode())};handleInputChange=t=>{this.internalValue=t.target.textContent??""};handleInputKeyDown=t=>{"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),this.commitEdit()):"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.cancelEdit())};handleInputBlur=()=>{this.commitEdit()};handlePaste=t=>{t.preventDefault();const i=t.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,i)};handleRemoveClick=t=>{t.stopPropagation(),this.disabled||this.delete.emit()};syncInputValue(t){if(!this.inputEl)return;this.inputEl.textContent=t;const i=document.createRange();i.selectNodeContents(this.inputEl),i.collapse(!1);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(i)}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)}))}componentDidUpdate(){this.isEditing&&this.inputEl&&this.shouldInitInput&&(this.inputEl.focus(),this.syncInputValue(this.internalValue),this.shouldInitInput=!1)}resolveState(){return this.isEditing?"focus":this.error?"error":"default"}render(){const t=this.resolveState(),i=f.default,s={"--sd-chip-height":p.height,"--sd-chip-padding-x":p.paddingX,"--sd-chip-gap":p.gap,"--sd-chip-radius":p.radius,"--sd-chip-border-width":p.borderWidth,"--sd-chip-bg":"error"===t?u.bg.error:u.bg.default,"--sd-chip-content":"error"===t?u.content.error:u.content.default,"--sd-chip-border-color":"transparent","--sd-chip-font-family":i.fontFamily,"--sd-chip-font-size":i.fontSize,"--sd-chip-font-weight":i.fontWeight,"--sd-chip-line-height":i.lineHeight};return e("span",{key:"a51c874d8f2ce5abea1dbcf878b4f1ceda0952a3",class:{"sd-chip":!0,[`sd-chip--${t}`]:!0,"sd-chip--disabled":this.disabled,"sd-chip--editable":!this.disabled&&this.isEditable},role:this.disabled||!this.isEditable?void 0:"button",tabIndex:this.disabled||this.isEditing||!this.isEditable?-1:0,"aria-disabled":this.disabled?"true":void 0,style:s,onClick:this.handleChipClick,onKeyDown:this.handleChipKeyDown},this.isEditing?e("span",{key:"chip-input",ref:t=>this.inputEl=t,class:"sd-chip__input",role:"textbox",tabindex:this.disabled?-1:0,contentEditable:!this.disabled,"data-placeholder":this.placeholder,spellcheck:!1,onInput:this.handleInputChange,onKeyDown:this.handleInputKeyDown,onBlur:this.handleInputBlur,onPaste:this.handlePaste,onClick:t=>t.stopPropagation()}):[e("span",{key:"chip-label",class:"sd-chip__label"},this.internalValue),!this.disabled&&e("sd-ghost-button",{key:"chip-remove",class:"sd-chip__remove",icon:"close",size:"xxs",ariaLabel:"remove",onClick:this.handleRemoveClick})])}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-chip{display:inline-flex;width:fit-content;max-width:100%;height:fit-content}sd-chip .sd-chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-chip-gap);max-width:100%;height:var(--sd-chip-height);padding:0 var(--sd-chip-padding-x);border-radius:var(--sd-chip-radius);background:var(--sd-chip-bg);color:var(--sd-chip-content);border:var(--sd-chip-border-width) solid var(--sd-chip-border-color);font-family:var(--sd-chip-font-family);font-size:var(--sd-chip-font-size);font-weight:var(--sd-chip-font-weight);line-height:var(--sd-chip-line-height);box-sizing:border-box;white-space:nowrap;overflow:hidden;-webkit-user-select:none;user-select:none}sd-chip .sd-chip--editable:not(.sd-chip--focus){cursor:text}sd-chip .sd-chip--disabled{cursor:not-allowed;opacity:0.6}sd-chip .sd-chip__label{display:inline-flex;align-items:center;min-width:0;overflow:hidden;text-overflow:ellipsis}sd-chip .sd-chip__input{display:inline-block;min-width:1ch;outline:none;background:transparent;color:inherit;font:inherit;white-space:nowrap;cursor:text}sd-chip .sd-chip__input:empty::before{content:attr(data-placeholder);color:inherit;opacity:0.6;pointer-events:none}sd-chip .sd-chip__remove{flex-shrink:0}"}},[512,"sd-chip",{name:[1],value:[1025],error:[1028],disabled:[4],editable:[4],placeholder:[1],rules:[16],internalValue:[32],isEditing:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdResetValidation:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}]}]);function g(){"undefined"!=typeof customElements&&["sd-chip","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-chip":customElements.get(h(t))||customElements.define(h(t),m);break;case"sd-ghost-button":customElements.get(h(t))||n();break;case"sd-icon":customElements.get(h(t))||o();break;case"sd-portal":customElements.get(h(t))||a();break;case"sd-tag":customElements.get(h(t))||d()}}))}export{f as C,m as S,u as a,p as b,g as d}
@@ -1 +1 @@
1
- import{p as t,H as s,h as e,F as i,t as o}from"./p-Bg9XySrz.js";import{T as n}from"./p-0VCXAYrh.js";import{d as a}from"./p-DDR0VcRU.js";import{d as l}from"./p-P2jWtk8J.js";import{d as r}from"./p-CjYYBlrZ.js";import{d as c}from"./p-ClKABgST.js";import{d}from"./p-B7PHGGFH.js";import{d as h}from"./p-De7UsPPk.js";var m={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},b={bg:"#E6F1FF",content:"#0075FF"};const u={default:{bg:m.bg,content:m.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:b.bg,content:b.content}},f=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return 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}),t.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",s=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",r=u[o]??u.default,c=()=>this.showTooltip=!this.showTooltip,d=void 0!==this.label&&""!==this.label,h=this.isAnchorMode,m="hover"===t?{onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()}:h||!d?{onClick:c}:{},p="click"===t&&!h&&d?{onSdClick:c}:{},g=["sd-tooltip-trigger",this.sdClass,this.triggerClass].filter((t=>void 0!==t&&""!==t)).join(" "),b=this.message&&this.message.length>0?this.message.map((t=>`<div>${t}</div>`)).join(""):this.slotContentHTML;return e(i,{key:"da2904e5cc41627283ff383366548453ef892dbc"},e("div",{key:"e94184fa6a51524f0dc5d3ba0610a3fa63663b4f",ref:t=>this.triggerEl=t,class:g,...m},h?e("slot",{name:"anchor"}):d?e("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:a,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",...p}):e("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&e("sd-floating-portal",{key:"52b86274d938e67a89018839812b4d26108f0921",parentRef:h?this.triggerEl:this.buttonEl,onSdClose:this.handleClose,placement:s,offset:this.tooltipOffset},e("div",{key:"177149d153ca4659a1dc4b71cd9d98cf36e19cd9",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${s}`]:!0,"sd-floating-menu--has-close":this.useClose},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()},e("i",{key:"6412bc25156af7a4bc276bc29f46458df7ac123b",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${s}`},e(n,{key:"af6b98e12d0ce7816b9888614d7f70e93c9accd6"})),e("div",{key:"4b3bdb5eda8a67374a68e2ef3dbc51d630720c08",class:"sd-floating-menu__content",innerHTML:b}),this.useClose&&e("sd-ghost-button",{key:"2bbe32da05ec4e84dba7b00d12826d9fb2492dfe",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xxs",onClick:()=>this.closeTooltip()}))))}static get style(){return"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}"}},[772,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],name:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1],useClose:[4,"use-close"],sdClass:[1,"sd-class"],message:[16],triggerClass:[1,"trigger-class"],triggerStyle:[1,"trigger-style"],showTooltip:[32],slotContentHTML:[32],show:[64],hide:[64]}]);function y(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),f);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-ghost-button":customElements.get(o(t))||r();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||d();break;case"sd-tag":customElements.get(o(t))||h()}}))}export{f as S,y as d}
1
+ import{p as t,H as s,h as e,F as i,t as o}from"./p-Bg9XySrz.js";import{T as n}from"./p-0VCXAYrh.js";import{d as a}from"./p-xkRWGISE.js";import{d as l}from"./p-P2jWtk8J.js";import{d as r}from"./p-ZvI5A-_t.js";import{d as c}from"./p-CZfsknba.js";import{d}from"./p-B7PHGGFH.js";import{d as h}from"./p-uSEbiD29.js";var m={bg:"#07284A",content:"#FFFFFF"},p={bg:"#FCEFEF",content:"#FB4444"},g={bg:"#FEF1EA",content:"#FF6B00"},b={bg:"#E6F1FF",content:"#0075FF"};const u={default:{bg:m.bg,content:m.content},danger:{bg:p.bg,content:p.content},warning:{bg:g.bg,content:g.content},accent:{bg:b.bg,content:b.content}},f=t(class t extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return 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}),t.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",s=this.placement??"top",o=this.tooltipType??"default",a=this.icon??"helpOutline",l=this.color??"#01BB4B",r=u[o]??u.default,c=()=>this.showTooltip=!this.showTooltip,d=void 0!==this.label&&""!==this.label,h=this.isAnchorMode,m="hover"===t?{onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()}:h||!d?{onClick:c}:{},p="click"===t&&!h&&d?{onSdClick:c}:{},g=["sd-tooltip-trigger",this.sdClass,this.triggerClass].filter((t=>void 0!==t&&""!==t)).join(" "),b=this.message&&this.message.length>0?this.message.map((t=>`<div>${t}</div>`)).join(""):this.slotContentHTML;return e(i,{key:"da2904e5cc41627283ff383366548453ef892dbc"},e("div",{key:"e94184fa6a51524f0dc5d3ba0610a3fa63663b4f",ref:t=>this.triggerEl=t,class:g,...m},h?e("slot",{name:"anchor"}):d?e("sd-button",{ref:t=>this.buttonEl=t,name:this.name??"primary_sm",label:this.label,icon:a,rightIcon:this.rightIcon,ariaLabel:this.ariaLabel,disabled:this.disabled,type:this.type??"button",class:"sd-tooltip",...p}):e("sd-icon",{ref:t=>this.buttonEl=t,name:a,size:this.iconSize??12,color:l,class:"sd-tooltip"})),this.showTooltip&&e("sd-floating-portal",{key:"52b86274d938e67a89018839812b4d26108f0921",parentRef:h?this.triggerEl:this.buttonEl,onSdClose:this.handleClose,placement:s,offset:this.tooltipOffset},e("div",{key:"177149d153ca4659a1dc4b71cd9d98cf36e19cd9",ref:t=>this.menuEl=t,class:{"sd-floating-menu":!0,[`sd-floating-menu--${o}`]:!0,[`sd-floating-menu--${s}`]:!0,"sd-floating-menu--has-close":this.useClose},style:{"--sd-floating-bg":r.bg,"--sd-floating-content":r.content},onMouseEnter:()=>this.openTooltip(),onMouseLeave:()=>!this.useClose&&this.startHideTimer()},e("i",{key:"6412bc25156af7a4bc276bc29f46458df7ac123b",class:`sd-floating-menu__arrow sd-floating-menu__arrow--${s}`},e(n,{key:"af6b98e12d0ce7816b9888614d7f70e93c9accd6"})),e("div",{key:"4b3bdb5eda8a67374a68e2ef3dbc51d630720c08",class:"sd-floating-menu__content",innerHTML:b}),this.useClose&&e("sd-ghost-button",{key:"2bbe32da05ec4e84dba7b00d12826d9fb2492dfe",class:"sd-floating-menu__close-button",icon:"close",ariaLabel:"close",size:"xxs",onClick:()=>this.closeTooltip()}))))}static get style(){return"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}"}},[772,"sd-tooltip",{trigger:[1],placement:[1],color:[1],tooltipType:[1,"tooltip-type"],icon:[1],iconSize:[2,"icon-size"],label:[1],name:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1],useClose:[4,"use-close"],sdClass:[1,"sd-class"],message:[16],triggerClass:[1,"trigger-class"],triggerStyle:[1,"trigger-style"],showTooltip:[32],slotContentHTML:[32],show:[64],hide:[64]}]);function y(){"undefined"!=typeof customElements&&["sd-tooltip","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-tooltip":customElements.get(o(t))||customElements.define(o(t),f);break;case"sd-button":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||l();break;case"sd-ghost-button":customElements.get(o(t))||r();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||d();break;case"sd-tag":customElements.get(o(t))||h()}}))}export{f as S,y as d}
@@ -1 +1 @@
1
- import{p as t,H as o,c as s,h as a,t as e}from"./p-Bg9XySrz.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-DDR0VcRU.js";import{d as l}from"./p-CjYYBlrZ.js";import{d as m}from"./p-ClKABgST.js";import{d as c}from"./p-B7PHGGFH.js";import{d as r}from"./p-De7UsPPk.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},b={positive:"notificationOutline",negative:"warningOutline",default:null},h={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},p=Number(d.modal.confirm.title.icon),g=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=b[t],s=h[t];return a("div",{key:"689c6d50f52e1a4c5b8f501fcc1e14f0da42fcfc",class:"sd-confirm-modal"},a("sd-ghost-button",{key:"fc3aedaa2b6aa3b95b9c0ce1e766df69af86c82f",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&a("sd-icon",{key:"4560ad7ee0d8929221a47b6c1b00cac04c7b387a",class:"sd-confirm-modal__icon",name:o,size:p,color:s}),a("h2",{key:"8689d86f85c72a9f36e94f083842fc3354d3d82c",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),a("div",{key:"5828e937b3b1d3f34c389e73a3d953388dd30cd0",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&a("div",{key:"0f64cda9195807dbf637a463ba2bc8acc8c1ff3a",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&a("div",{key:"a090330cab2dbbc99127e616f3e50420bd44b9e4",class:"sd-confirm-modal__content-box"},this.tagContents?a("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):a("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&a("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&a("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&a("div",{key:"a665a0ea56685496adf7c306b4a940762a8a2b3a",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),a("div",{key:"0ad69928a260ed78edd7606f89790e6afa6b2d76",class:"sd-confirm-modal__button"},this.subButtonLabel&&a("sd-button",{key:"1f835e091b4d96cb6c95dbda88d93ce86828da2c",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),a("sd-button",{key:"8e3cb23cb7207e402543b009b49d23a50521db24",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(e(t))||customElements.define(e(t),g);break;case"sd-button":customElements.get(e(t))||n();break;case"sd-ghost-button":customElements.get(e(t))||l();break;case"sd-icon":customElements.get(e(t))||m();break;case"sd-portal":customElements.get(e(t))||c();break;case"sd-tag":customElements.get(e(t))||r()}}))}export{g as S,u as d}
1
+ import{p as t,H as o,c as s,h as a,t as e}from"./p-Bg9XySrz.js";import{s as i}from"./p-BE4tnQ2Z.js";import{m as d}from"./p-DOXMJi-V.js";import{d as n}from"./p-xkRWGISE.js";import{d as l}from"./p-ZvI5A-_t.js";import{d as m}from"./p-CZfsknba.js";import{d as c}from"./p-B7PHGGFH.js";import{d as r}from"./p-uSEbiD29.js";const f={positive:"primary_md",negative:"danger_md",default:"neutral_outline_md"},b={positive:"notificationOutline",negative:"warningOutline",default:null},h={positive:d.modal.confirm.positive.icon,negative:d.modal.confirm.negative.icon,default:""},p=Number(d.modal.confirm.title.icon),g=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=s(this,"sdClose",7),this.cancel=s(this,"sdCancel",7),this.ok=s(this,"sdOk",7)}get el(){return this}hasSlottedContent=!1;customContentRef;slotObserver;type="positive";modalTitle="";titleClass="";topMessage=[];bottomMessage=[];mainButtonName;mainButtonLabel="확인";subButtonLabel="";tagPreset="square_sm_grey";tagLabel="";slotLabel="";tagContents;close;cancel;ok;componentWillLoad(){this.syncHasSlottedContent()}componentDidLoad(){"undefined"!=typeof MutationObserver&&(this.slotObserver=new MutationObserver((()=>this.syncHasSlottedContent())),this.slotObserver.observe(this.el,{childList:!0,characterData:!0}))}componentDidRender(){this.customContentRef&&this.tagContents instanceof o&&("function"==typeof this.customContentRef.replaceChildren?this.customContentRef.replaceChildren(this.tagContents):(this.customContentRef.innerHTML="",this.customContentRef.appendChild(this.tagContents)))}disconnectedCallback(){this.slotObserver?.disconnect()}get resolvedType(){return this.type??"positive"}get resolvedMainButton(){return this.mainButtonName??f[this.resolvedType]}get hasTagContent(){return void 0!==this.tagLabel&&""!==this.tagLabel||void 0!==this.slotLabel&&""!==this.slotLabel}get showContentBox(){return null!=this.tagContents||this.hasTagContent||this.hasSlottedContent}syncHasSlottedContent(){const t=Array.from(this.el.childNodes).some((t=>!(t.nodeType===Node.ELEMENT_NODE&&t.classList.contains("sd-confirm-modal"))&&(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())));t!==this.hasSlottedContent&&(this.hasSlottedContent=t)}render(){const t=this.resolvedType,o=b[t],s=h[t];return a("div",{key:"689c6d50f52e1a4c5b8f501fcc1e14f0da42fcfc",class:"sd-confirm-modal"},a("sd-ghost-button",{key:"fc3aedaa2b6aa3b95b9c0ce1e766df69af86c82f",class:"sd-confirm-modal__close-button",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()}),o&&a("sd-icon",{key:"4560ad7ee0d8929221a47b6c1b00cac04c7b387a",class:"sd-confirm-modal__icon",name:o,size:p,color:s}),a("h2",{key:"8689d86f85c72a9f36e94f083842fc3354d3d82c",class:`sd-confirm-modal__title ${this.titleClass??""}`},this.modalTitle),a("div",{key:"5828e937b3b1d3f34c389e73a3d953388dd30cd0",class:"sd-confirm-modal__body"},(this.topMessage??[]).length>0&&a("div",{key:"0f64cda9195807dbf637a463ba2bc8acc8c1ff3a",class:"sd-confirm-modal__message"},(this.topMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)})))),this.showContentBox&&a("div",{key:"a090330cab2dbbc99127e616f3e50420bd44b9e4",class:"sd-confirm-modal__content-box"},this.tagContents?a("div",{class:"sd-confirm-modal__custom-content",ref:t=>{this.customContentRef=t}}):a("slot",{onSlotchange:()=>this.syncHasSlottedContent()},this.tagLabel&&a("sd-tag",{name:this.tagPreset??"square_sm_grey",label:this.tagLabel}),this.slotLabel&&a("span",{class:"sd-confirm-modal__slot-label"},this.slotLabel))),(this.bottomMessage??[]).length>0&&a("div",{key:"a665a0ea56685496adf7c306b4a940762a8a2b3a",class:"sd-confirm-modal__message"},(this.bottomMessage??[]).map((t=>a("p",{class:"sd-confirm-modal__message-text",innerHTML:i(t)}))))),a("div",{key:"0ad69928a260ed78edd7606f89790e6afa6b2d76",class:"sd-confirm-modal__button"},this.subButtonLabel&&a("sd-button",{key:"1f835e091b4d96cb6c95dbda88d93ce86828da2c",name:"neutral_outline_md",label:this.subButtonLabel,onSdClick:()=>this.cancel.emit()}),a("sd-button",{key:"8e3cb23cb7207e402543b009b49d23a50521db24",name:this.resolvedMainButton,label:this.mainButtonLabel??"확인",onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-confirm-modal{display:block;width:fit-content;min-width:520px}sd-confirm-modal .sd-confirm-modal{position:relative;padding:var(--sd-modal-modal-confirm-padding-y) var(--sd-modal-modal-confirm-padding-x);border-radius:var(--sd-modal-modal-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);background:var(--sd-modal-modal-bg)}sd-confirm-modal .sd-confirm-modal__close-button{position:absolute;top:12px;right:12px}sd-confirm-modal .sd-confirm-modal__icon{display:block;width:var(--sd-modal-modal-confirm-title-icon);height:var(--sd-modal-modal-confirm-title-icon);margin:0 auto var(--sd-modal-modal-confirm-title-gap) auto}sd-confirm-modal .sd-confirm-modal__title{color:var(--sd-modal-modal-confirm-title-color);font-size:var(--sd-modal-modal-confirm-title-typography-font-size);font-weight:var(--sd-modal-modal-confirm-title-typography-font-weight);line-height:var(--sd-modal-modal-confirm-title-typography-line-height);text-align:center;margin:0 0 var(--sd-modal-modal-confirm-body-gap) 0}sd-confirm-modal .sd-confirm-modal__body{display:flex;flex-direction:column;gap:var(--sd-modal-modal-confirm-body-gap)}sd-confirm-modal .sd-confirm-modal__message-text{color:var(--sd-modal-modal-confirm-message-color);font-size:12px;font-weight:400;line-height:20px;text-align:center;margin:0}sd-confirm-modal .sd-confirm-modal__content-box{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border:1px solid #e1e1e1;border-radius:8px;background:white}sd-confirm-modal .sd-confirm-modal__slot-label{font-size:14px;font-weight:700;line-height:22px;color:var(--sd-modal-modal-confirm-message-color)}sd-confirm-modal .sd-confirm-modal__button{display:flex;justify-content:center;gap:var(--sd-modal-modal-confirm-button-gap);margin-top:40px}"}},[772,"sd-confirm-modal",{type:[1],modalTitle:[1,"modal-title"],titleClass:[1,"title-class"],topMessage:[16],bottomMessage:[16],mainButtonName:[1,"main-button-name"],mainButtonLabel:[1,"main-button-label"],subButtonLabel:[1,"sub-button-label"],tagPreset:[1,"tag-preset"],tagLabel:[1,"tag-label"],slotLabel:[1,"slot-label"],tagContents:[16],hasSlottedContent:[32]}]);function u(){"undefined"!=typeof customElements&&["sd-confirm-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-confirm-modal":customElements.get(e(t))||customElements.define(e(t),g);break;case"sd-button":customElements.get(e(t))||n();break;case"sd-ghost-button":customElements.get(e(t))||l();break;case"sd-icon":customElements.get(e(t))||m();break;case"sd-portal":customElements.get(e(t))||c();break;case"sd-tag":customElements.get(e(t))||r()}}))}export{g as S,u as d}
@@ -1 +1 @@
1
- import{p as e,H as t,c as s,h as i,t as l}from"./p-Bg9XySrz.js";import{L as c,i as d,a as o,b as r}from"./p-DvvGi4J_.js";import{s as a}from"./p-BE4tnQ2Z.js";import{d as m}from"./p-DbLQoVx6.js";import{d as h}from"./p-ClKABgST.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.listItemClick=s(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${c.paddingLeft[this.depthKey]}px`}handleClick=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=e=>{e.stopPropagation()};handleCheckboxUpdate=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const e=this.isGroup,t=e&&1===this.depth,s=e&&2===this.depth,l={"--list-item-padding-y":`${c.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${c.paddingRight}px`,"--list-item-gap":`${c.gap}px`,"--list-item-font-size":`${r.fontSize}px`,"--list-item-line-height":`${r.lineHeight}px`,"--list-item-font-weight":r.fontWeight,"--list-item-bg":t?o.depth1.bg:s?o.depth2.bg:o.bg.default,"--list-item-bg-hover":o.bg.hover,"--list-item-color":o.content.default,"--list-item-color-hover":o.content.hover,"--list-item-color-disabled":o.content.disabled,"--list-item-color-selected":o.content.selected,"--list-item-font-weight-selected":r.selectedFontWeight};return t&&(l["--list-item-border-top"]=`${o.depth1.borderWidth}px solid ${o.depth1.border}`),i("div",{key:"4322a04d65e4b2e1d82d0a6b09fdf6a57cce79ca",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":e,"sd-select-list-item--depth1-group":t,"sd-select-list-item--depth2-group":s,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:l,onClick:this.handleClick},this.useCheckbox&&i("sd-checkbox",{key:"47ae4bbe3c2fd960dcee0f1157ae8003dc45f205",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),d(this.option.label)?i("span",{class:"sd-select-list-item__label",ref:e=>e&&(e.innerHTML=a(this.option.label))}):i("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&i("span",{key:"c89ba1e3ef52a1809d1252aaee5a18c40ff7cd61",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}static get style(){return"sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}"}},[512,"sd-select-list-item",{option:[16],depth:[2],isSelected:[4,"is-selected"],isFocused:[4,"is-focused"],useCheckbox:[4,"use-checkbox"],countInfo:[16]}]);function p(){"undefined"!=typeof customElements&&["sd-select-list-item","sd-checkbox","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item":customElements.get(l(e))||customElements.define(l(e),n);break;case"sd-checkbox":customElements.get(l(e))||m();break;case"sd-icon":customElements.get(l(e))||h()}}))}export{n as S,p as d}
1
+ import{p as e,H as t,c as s,h as i,t as l}from"./p-Bg9XySrz.js";import{L as c,i as d,a as o,b as r}from"./p-DvvGi4J_.js";import{s as a}from"./p-BE4tnQ2Z.js";import{d as m}from"./p-CXeOxSQ-.js";import{d as h}from"./p-CZfsknba.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.listItemClick=s(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${c.paddingLeft[this.depthKey]}px`}handleClick=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=e=>{e.stopPropagation()};handleCheckboxUpdate=e=>{e.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const e=this.isGroup,t=e&&1===this.depth,s=e&&2===this.depth,l={"--list-item-padding-y":`${c.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${c.paddingRight}px`,"--list-item-gap":`${c.gap}px`,"--list-item-font-size":`${r.fontSize}px`,"--list-item-line-height":`${r.lineHeight}px`,"--list-item-font-weight":r.fontWeight,"--list-item-bg":t?o.depth1.bg:s?o.depth2.bg:o.bg.default,"--list-item-bg-hover":o.bg.hover,"--list-item-color":o.content.default,"--list-item-color-hover":o.content.hover,"--list-item-color-disabled":o.content.disabled,"--list-item-color-selected":o.content.selected,"--list-item-font-weight-selected":r.selectedFontWeight};return t&&(l["--list-item-border-top"]=`${o.depth1.borderWidth}px solid ${o.depth1.border}`),i("div",{key:"4322a04d65e4b2e1d82d0a6b09fdf6a57cce79ca",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":e,"sd-select-list-item--depth1-group":t,"sd-select-list-item--depth2-group":s,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:l,onClick:this.handleClick},this.useCheckbox&&i("sd-checkbox",{key:"47ae4bbe3c2fd960dcee0f1157ae8003dc45f205",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),d(this.option.label)?i("span",{class:"sd-select-list-item__label",ref:e=>e&&(e.innerHTML=a(this.option.label))}):i("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&i("span",{key:"c89ba1e3ef52a1809d1252aaee5a18c40ff7cd61",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}static get style(){return"sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}"}},[512,"sd-select-list-item",{option:[16],depth:[2],isSelected:[4,"is-selected"],isFocused:[4,"is-focused"],useCheckbox:[4,"use-checkbox"],countInfo:[16]}]);function p(){"undefined"!=typeof customElements&&["sd-select-list-item","sd-checkbox","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item":customElements.get(l(e))||customElements.define(l(e),n);break;case"sd-checkbox":customElements.get(l(e))||m();break;case"sd-icon":customElements.get(l(e))||h()}}))}export{n as S,p as d}
@@ -1 +1 @@
1
- import{p as a,H as d,c as s,h as e,d as o,t as i}from"./p-Bg9XySrz.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-DDR0VcRU.js";import{d as n}from"./p-CvSqieCH.js";import{d as m}from"./p-ClKABgST.js";const r={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},g={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,h=Number(t.modal.loading.message.typography.fontSize),u=Number(t.modal.loading.message.typography.fontWeight),b=Number(t.modal.loading.message.typography.lineHeight),p={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},f={loading:"작업 취소",error:"다시 시도"},v=a(class extends d{constructor(a){super(),!1!==a&&this.__registerHost(),this.click=s(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;progress;click;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||p[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||f[this.resolvedState]}handleClick=()=>{this.click.emit()};toCssSize(a){if(null!=a&&""!==a)return"number"==typeof a?`${a}px`:a}render(){const a={"--sd-loading-modal-min-width":`${r.minWidth}px`,"--sd-loading-modal-min-height":`${r.minHeight}px`,"--sd-loading-modal-gap":`${r.gap}px`,"--sd-loading-modal-content-size":`${r.contentSize}px`,"--sd-loading-modal-radius":`${r.radius}px`,"--sd-loading-modal-bg":g.bg,"--sd-loading-modal-message-color":g.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${h}px`,"--sd-loading-modal-message-font-weight":`${u}`,"--sd-loading-modal-message-line-height":`${b}px`,"--sd-loading-modal-error-color":g.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${r.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${r.minHeight}px`};return e(o,{key:"12e8bb40871556dddad6bf3e9daa1703f3a29fc3",style:a},e("div",{key:"b1f0282746a8a4ceabd120a1c366b836edb805c1",class:"sd-loading-modal"},e("div",{key:"496c034608b3d31557f154f77aa7cb7c2cb9558a",class:"sd-loading-modal__content"},"loading"===this.resolvedState?e("sd-circle-progress",void 0!==this.progress?{value:this.progress}:{indeterminate:!0}):e("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:r.contentSize,color:g.errorIcon})),e("div",{key:"e0a57ee49f6fe46680a8e2393a00014edd76d36f",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((a=>e("p",{class:"sd-loading-modal__message"},a))):e("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.useButton&&e("div",{key:"bd0c91c279a7cd4d58a18f7bfd6e8c345ae00fcf",class:"sd-loading-modal__button"},e("sd-button",{key:"0d03006a668333de256b2142efc9d0c374bfef45",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8],progress:[2]}]);function x(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button","sd-circle-progress","sd-icon"].forEach((a=>{switch(a){case"sd-loading-modal":customElements.get(i(a))||customElements.define(i(a),v);break;case"sd-button":customElements.get(i(a))||l();break;case"sd-circle-progress":customElements.get(i(a))||n();break;case"sd-icon":customElements.get(i(a))||m()}}))}export{v as S,x as d}
1
+ import{p as a,H as d,c as s,h as e,d as o,t as i}from"./p-Bg9XySrz.js";import{m as t}from"./p-DOXMJi-V.js";import{d as l}from"./p-xkRWGISE.js";import{d as n}from"./p-CvSqieCH.js";import{d as m}from"./p-CZfsknba.js";const r={minWidth:Number(t.modal.loading.width),minHeight:Number(t.modal.loading.height),gap:Number(t.modal.loading.gap),contentSize:Number(t.modal.loading.content),radius:Number(t.modal.radius)},g={bg:t.modal.bg,messageColor:t.modal.loading.message.color,errorIcon:t.modal.confirm.negative.icon},c=t.modal.loading.message.typography.fontFamily,h=Number(t.modal.loading.message.typography.fontSize),u=Number(t.modal.loading.message.typography.fontWeight),b=Number(t.modal.loading.message.typography.lineHeight),f={loading:"작업을 진행하고 있습니다. 잠시만 기다려 주세요.",error:"작업에 실패하였습니다. 다시 시도해 주세요."},p={loading:"작업 취소",error:"다시 시도"},v=a(class extends d{constructor(a){super(),!1!==a&&this.__registerHost(),this.click=s(this,"sdClick",7)}state="loading";message="";useButton=!1;buttonLabel="";width;height;progress;click;get resolvedState(){return this.state??"loading"}get resolvedMessage(){return this.message||f[this.resolvedState]}get resolvedButtonLabel(){return this.buttonLabel||p[this.resolvedState]}handleClick=()=>{this.click.emit()};toCssSize(a){if(null!=a&&""!==a)return"number"==typeof a?`${a}px`:a}render(){const a={"--sd-loading-modal-min-width":`${r.minWidth}px`,"--sd-loading-modal-min-height":`${r.minHeight}px`,"--sd-loading-modal-gap":`${r.gap}px`,"--sd-loading-modal-content-size":`${r.contentSize}px`,"--sd-loading-modal-radius":`${r.radius}px`,"--sd-loading-modal-bg":g.bg,"--sd-loading-modal-message-color":g.messageColor,"--sd-loading-modal-message-font-family":c,"--sd-loading-modal-message-font-size":`${h}px`,"--sd-loading-modal-message-font-weight":`${u}`,"--sd-loading-modal-message-line-height":`${b}px`,"--sd-loading-modal-error-color":g.errorIcon,"--sd-loading-modal-width":this.toCssSize(this.width)??`${r.minWidth}px`,"--sd-loading-modal-height":this.toCssSize(this.height)??`${r.minHeight}px`};return e(o,{key:"12e8bb40871556dddad6bf3e9daa1703f3a29fc3",style:a},e("div",{key:"b1f0282746a8a4ceabd120a1c366b836edb805c1",class:"sd-loading-modal"},e("div",{key:"496c034608b3d31557f154f77aa7cb7c2cb9558a",class:"sd-loading-modal__content"},"loading"===this.resolvedState?e("sd-circle-progress",void 0!==this.progress?{value:this.progress}:{indeterminate:!0}):e("sd-icon",{class:"sd-loading-modal__icon",name:"warningOutline",size:r.contentSize,color:g.errorIcon})),e("div",{key:"e0a57ee49f6fe46680a8e2393a00014edd76d36f",class:"sd-loading-modal__message-wrapper"},Array.isArray(this.resolvedMessage)?this.resolvedMessage.map((a=>e("p",{class:"sd-loading-modal__message"},a))):e("p",{class:"sd-loading-modal__message"},this.resolvedMessage)),this.useButton&&e("div",{key:"bd0c91c279a7cd4d58a18f7bfd6e8c345ae00fcf",class:"sd-loading-modal__button"},e("sd-button",{key:"0d03006a668333de256b2142efc9d0c374bfef45",name:"neutral_outline_sm",label:this.resolvedButtonLabel,onSdClick:this.handleClick}))))}static get style(){return"sd-loading-modal{display:inline-block}sd-loading-modal .sd-loading-modal{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sd-loading-modal-gap);min-width:var(--sd-loading-modal-min-width);min-height:var(--sd-loading-modal-min-height);width:var(--sd-loading-modal-width, auto);height:var(--sd-loading-modal-height, auto);border-radius:var(--sd-loading-modal-radius);background:var(--sd-loading-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2)}sd-loading-modal .sd-loading-modal__content{display:flex;align-items:center;justify-content:center;width:var(--sd-loading-modal-content-size);height:var(--sd-loading-modal-content-size)}sd-loading-modal .sd-loading-modal__message{margin:0;color:var(--sd-loading-modal-message-color);font-family:var(--sd-loading-modal-message-font-family);font-size:var(--sd-loading-modal-message-font-size);font-weight:var(--sd-loading-modal-message-font-weight);line-height:var(--sd-loading-modal-message-line-height);text-align:center}sd-loading-modal .sd-loading-modal__button{display:flex;justify-content:center}"}},[512,"sd-loading-modal",{state:[513],message:[1],useButton:[516,"use-button"],buttonLabel:[1,"button-label"],width:[8],height:[8],progress:[2]}]);function x(){"undefined"!=typeof customElements&&["sd-loading-modal","sd-button","sd-circle-progress","sd-icon"].forEach((a=>{switch(a){case"sd-loading-modal":customElements.get(i(a))||customElements.define(i(a),v);break;case"sd-button":customElements.get(i(a))||l();break;case"sd-circle-progress":customElements.get(i(a))||n();break;case"sd-icon":customElements.get(i(a))||m()}}))}export{v as S,x as d}
@@ -1 +1 @@
1
- import{p as e,H as s,c as t,h as i,t as a}from"./p-Bg9XySrz.js";import{n as d}from"./p-CCwNgVmC.js";import{d as o,D as r,a as l}from"./p-BzUU-npj.js";import{d as n}from"./p-DDR0VcRU.js";import{d as h}from"./p-nruUh8p1.js";import{d as c}from"./p-CiEAVQT4.js";import{d as p}from"./p-P2jWtk8J.js";import{d as m}from"./p-CjYYBlrZ.js";import{d as b}from"./p-ClKABgST.js";import{d as f}from"./p-B7PHGGFH.js";import{d as u}from"./p-De7UsPPk.js";import{d as g}from"./p-vTnMooAF.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD";selectable;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{e.stopPropagation(),this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"cbd8e081f56fb2fb53854cd0937fe24e5d6d9b97",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":r.border.default,"--sd-system-color-field-border-focus":r.border.focus,"--sd-system-color-field-bg-default":r.bg.default}},i("div",{key:"e7798ec50f7d22628a17a953ac87882160248de4",class:"sd-date-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"ce203f70a001f9caa9071fb667d9bf58f57748ec",displayText:this.value??"",placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"c5f875bc826fa1f899205cfefe2db57da3dd34b4",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-calendar",{key:"8626faebafac8201979e02c444279124c3261b67",elevated:!0,value:this.value,selectable:this.selectable,onSdUpdate:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-picker{display:inline-flex}sd-date-picker sd-portal{display:none}sd-date-picker .sd-date-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-picker",{value:[1025],size:[513],placeholder:[513],selectable:[16],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-picker","sd-button","sd-calendar","sd-date-picker-trigger","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-calendar":customElements.get(a(e))||h();break;case"sd-date-picker-trigger":customElements.get(a(e))||o();break;case"sd-field":customElements.get(a(e))||c();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||b();break;case"sd-portal":customElements.get(a(e))||f();break;case"sd-tag":customElements.get(a(e))||u();break;case"sd-tooltip":customElements.get(a(e))||g()}}))}export{k as S,y as d}
1
+ import{p as e,H as s,c as t,h as i,t as a}from"./p-Bg9XySrz.js";import{n as d}from"./p-CCwNgVmC.js";import{d as o,D as r,a as l}from"./p-CUR9smP5.js";import{d as n}from"./p-xkRWGISE.js";import{d as h}from"./p-BiBLp9_a.js";import{d as c}from"./p-CB2A3pJ5.js";import{d as p}from"./p-P2jWtk8J.js";import{d as m}from"./p-ZvI5A-_t.js";import{d as b}from"./p-CZfsknba.js";import{d as f}from"./p-B7PHGGFH.js";import{d as u}from"./p-uSEbiD29.js";import{d as g}from"./p-DNnI3Nru.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD";selectable;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{e.stopPropagation(),this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"cbd8e081f56fb2fb53854cd0937fe24e5d6d9b97",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":r.border.default,"--sd-system-color-field-border-focus":r.border.focus,"--sd-system-color-field-bg-default":r.bg.default}},i("div",{key:"e7798ec50f7d22628a17a953ac87882160248de4",class:"sd-date-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"ce203f70a001f9caa9071fb667d9bf58f57748ec",displayText:this.value??"",placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"c5f875bc826fa1f899205cfefe2db57da3dd34b4",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-calendar",{key:"8626faebafac8201979e02c444279124c3261b67",elevated:!0,value:this.value,selectable:this.selectable,onSdUpdate:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-picker{display:inline-flex}sd-date-picker sd-portal{display:none}sd-date-picker .sd-date-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-picker",{value:[1025],size:[513],placeholder:[513],selectable:[16],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-picker","sd-button","sd-calendar","sd-date-picker-trigger","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-calendar":customElements.get(a(e))||h();break;case"sd-date-picker-trigger":customElements.get(a(e))||o();break;case"sd-field":customElements.get(a(e))||c();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||b();break;case"sd-portal":customElements.get(a(e))||f();break;case"sd-tag":customElements.get(a(e))||u();break;case"sd-tooltip":customElements.get(a(e))||g()}}))}export{k as S,y as d}
@@ -1 +1 @@
1
- import{p as e,H as t,c as i,h as n,t as o}from"./p-Bg9XySrz.js";import{d as s}from"./p-ClKABgST.js";var l={textLink:{sm:{gap:"4",icon:"16",typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"underline",lineHeight:"20"}}},md:{gap:"8",icon:"16",typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"14",fontWeight:"500",textDecoration:"none",lineHeight:"24"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"14",fontWeight:"500",textDecoration:"underline",lineHeight:"24"}}},content:{disabled:"#888888"},icon:{default:"#006AC1",disabled:"#BBBBBB"},lg:{typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"16",fontWeight:"500",textDecoration:"none",lineHeight:"26"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"16",fontWeight:"500",textDecoration:"underline",lineHeight:"26"}},gap:"8",icon:"20"}}};const a={sm:{gap:Number(l.textLink.sm.gap),iconSize:Number(l.textLink.sm.icon),typography:{default:l.textLink.sm.typography.default,underline:l.textLink.sm.typography.underline}},md:{gap:Number(l.textLink.md.gap),iconSize:Number(l.textLink.md.icon),typography:{default:l.textLink.md.typography.default,underline:l.textLink.md.typography.underline}},lg:{gap:Number(l.textLink.lg.gap),iconSize:Number(l.textLink.lg.icon),typography:{default:l.textLink.lg.typography.default,underline:l.textLink.lg.typography.underline}}},r={content:l.textLink.content,icon:l.textLink.icon},d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.click=i(this,"sdClick",7)}label="";icon="";iconColor="";labelClass="";rightArrow="none";underline=!1;disabled=!1;size="sm";click;handleClick=()=>{this.disabled||this.click.emit()};render(){const e=a[this.size]??a.sm,t=this.underline?e.typography.underline:e.typography.default,i=["sd-text-link__label",this.labelClass].filter(Boolean).join(" "),o=this.disabled?r.icon.disabled:"#888888",s={"--sd-text-link-gap":`${e.gap}px`,"--sd-text-link-font-size":`${t.fontSize}px`,"--sd-text-link-line-height":`${t.lineHeight}px`,"--sd-text-link-text-decoration":t.textDecoration,...this.disabled?{"--sd-text-link-color":r.content.disabled}:{}};return n("span",{key:"74e9dd05f3efa3ecfec4edca1b74c29bb7207894",role:"button",tabindex:this.disabled?-1:0,class:{"sd-text-link":!0,"sd-text-link--disabled":this.disabled},style:s,onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},this.icon&&n("sd-icon",{key:"e60be0764adf889af988fd887582776d44239e07",name:this.icon,size:e.iconSize,color:this.disabled?r.icon.disabled:this.iconColor||r.icon.default,class:"sd-text-link__icon"}),n("span",{key:"17996ef0620948fe1660945e68c9bb55e62fc982",class:i},this.label),this.rightArrow&&"none"!==this.rightArrow&&n("span",{key:"b9cfc03d4295beb9956f661032ea3fd1d9acfbe9",class:"sd-text-link__arrow",style:{width:"16px",height:"16px",display:"inline-flex",alignItems:"center",justifyContent:"center"}},n("sd-icon",{key:"6c2e4640a767acd5e66089e7e78f27c0fb8a0955",name:"chevron"===this.rightArrow?"chevronRight":"caretRight",size:12,color:o})))}static get style(){return"sd-text-link{display:inline-flex}sd-text-link .sd-text-link{display:inline-flex;align-items:center;gap:var(--sd-text-link-gap);cursor:pointer;user-select:none}sd-text-link .sd-text-link__label{font-size:var(--sd-text-link-font-size, 12px);line-height:var(--sd-text-link-line-height, 20px);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color, inherit)}sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__label{text-decoration:underline}sd-text-link .sd-text-link--disabled{cursor:not-allowed}"}},[512,"sd-text-link",{label:[1],icon:[1],iconColor:[1,"icon-color"],labelClass:[1,"label-class"],rightArrow:[1,"right-arrow"],underline:[516],disabled:[516],size:[513]}]);function c(){"undefined"!=typeof customElements&&["sd-text-link","sd-icon"].forEach((e=>{switch(e){case"sd-text-link":customElements.get(o(e))||customElements.define(o(e),d);break;case"sd-icon":customElements.get(o(e))||s()}}))}export{d as S,c as d}
1
+ import{p as e,H as t,c as i,h as n,t as o}from"./p-Bg9XySrz.js";import{d as s}from"./p-CZfsknba.js";var l={textLink:{sm:{gap:"4",icon:"16",typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"none",lineHeight:"20"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"12",fontWeight:"500",textDecoration:"underline",lineHeight:"20"}}},md:{gap:"8",icon:"16",typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"14",fontWeight:"500",textDecoration:"none",lineHeight:"24"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"14",fontWeight:"500",textDecoration:"underline",lineHeight:"24"}}},content:{disabled:"#888888"},icon:{default:"#006AC1",disabled:"#BBBBBB"},lg:{typography:{default:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"16",fontWeight:"500",textDecoration:"none",lineHeight:"26"},underline:{fontFamily:"Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",fontSize:"16",fontWeight:"500",textDecoration:"underline",lineHeight:"26"}},gap:"8",icon:"20"}}};const a={sm:{gap:Number(l.textLink.sm.gap),iconSize:Number(l.textLink.sm.icon),typography:{default:l.textLink.sm.typography.default,underline:l.textLink.sm.typography.underline}},md:{gap:Number(l.textLink.md.gap),iconSize:Number(l.textLink.md.icon),typography:{default:l.textLink.md.typography.default,underline:l.textLink.md.typography.underline}},lg:{gap:Number(l.textLink.lg.gap),iconSize:Number(l.textLink.lg.icon),typography:{default:l.textLink.lg.typography.default,underline:l.textLink.lg.typography.underline}}},r={content:l.textLink.content,icon:l.textLink.icon},d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.click=i(this,"sdClick",7)}label="";icon="";iconColor="";labelClass="";rightArrow="none";underline=!1;disabled=!1;size="sm";click;handleClick=()=>{this.disabled||this.click.emit()};render(){const e=a[this.size]??a.sm,t=this.underline?e.typography.underline:e.typography.default,i=["sd-text-link__label",this.labelClass].filter(Boolean).join(" "),o=this.disabled?r.icon.disabled:"#888888",s={"--sd-text-link-gap":`${e.gap}px`,"--sd-text-link-font-size":`${t.fontSize}px`,"--sd-text-link-line-height":`${t.lineHeight}px`,"--sd-text-link-text-decoration":t.textDecoration,...this.disabled?{"--sd-text-link-color":r.content.disabled}:{}};return n("span",{key:"74e9dd05f3efa3ecfec4edca1b74c29bb7207894",role:"button",tabindex:this.disabled?-1:0,class:{"sd-text-link":!0,"sd-text-link--disabled":this.disabled},style:s,onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},this.icon&&n("sd-icon",{key:"e60be0764adf889af988fd887582776d44239e07",name:this.icon,size:e.iconSize,color:this.disabled?r.icon.disabled:this.iconColor||r.icon.default,class:"sd-text-link__icon"}),n("span",{key:"17996ef0620948fe1660945e68c9bb55e62fc982",class:i},this.label),this.rightArrow&&"none"!==this.rightArrow&&n("span",{key:"b9cfc03d4295beb9956f661032ea3fd1d9acfbe9",class:"sd-text-link__arrow",style:{width:"16px",height:"16px",display:"inline-flex",alignItems:"center",justifyContent:"center"}},n("sd-icon",{key:"6c2e4640a767acd5e66089e7e78f27c0fb8a0955",name:"chevron"===this.rightArrow?"chevronRight":"caretRight",size:12,color:o})))}static get style(){return"sd-text-link{display:inline-flex}sd-text-link .sd-text-link{display:inline-flex;align-items:center;gap:var(--sd-text-link-gap);cursor:pointer;user-select:none}sd-text-link .sd-text-link__label{font-size:var(--sd-text-link-font-size, 12px);line-height:var(--sd-text-link-line-height, 20px);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color, inherit)}sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__label{text-decoration:underline}sd-text-link .sd-text-link--disabled{cursor:not-allowed}"}},[512,"sd-text-link",{label:[1],icon:[1],iconColor:[1,"icon-color"],labelClass:[1,"label-class"],rightArrow:[1,"right-arrow"],underline:[516],disabled:[516],size:[513]}]);function c(){"undefined"!=typeof customElements&&["sd-text-link","sd-icon"].forEach((e=>{switch(e){case"sd-text-link":customElements.get(o(e))||customElements.define(o(e),d);break;case"sd-icon":customElements.get(o(e))||s()}}))}export{d as S,c as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as o,t as i}from"./p-Bg9XySrz.js";import{d as n}from"./p-ClKABgST.js";import{d as a}from"./p-B7PHGGFH.js";import{d as r}from"./p-De7UsPPk.js";var d={size:"16",icon:"12"},b={size:"24",icon:"16"},c={size:"28",icon:"20"},h={size:"36",icon:"24"},l={size:"62",icon:"32"},u={sm:"4",md:"6"},g={opacity:"5%"},m={disabled:"#BBBBBB"},p={content:"#888888",hover:{bg:"#222222"}},f={content:"#E30000",hover:{bg:"#E30000"}},v={content:"#025497",hover:{bg:"#0075FF"}},x={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const y={xxs:{size:Number(d.size),icon:Number(d.icon)},xs:{size:Number(b.size),icon:Number(b.icon)},sm:{size:Number(c.size),icon:Number(c.icon)},md:{size:Number(h.size),icon:Number(h.icon)},lg:{size:Number(l.size),icon:Number(l.icon)}},F={xxs:Number(u.sm),xs:Number(u.sm),sm:Number(u.sm),md:Number(u.md),lg:Number(u.md)},z=g.opacity,k={default:p.content,danger:f.content,action:v.content,inverse:x.content},N={default:p.hover.bg,danger:f.hover.bg,action:v.hover.bg,inverse:x.hover.bg},E=m.disabled,B={default:E,danger:E,action:E,inverse:x.disabled},w=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=s(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return 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",s=y[t]??y.sm,i=this.disabled?B[e]:k[e],n=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return o("button",{key:"59b95275f6acd737d4b0d5c2187e1d40b3a6543f",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button",disabled:this.disabled,"aria-label":n,style:{"--sd-ghost-button-size":`${s.size}px`,"--sd-ghost-button-radius":`${F[t]}px`,"--sd-ghost-button-hover-bg":N[e],"--sd-ghost-button-hover-opacity":z,"--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&&!this.disabled&&o("sd-portal",{key:"d8ca94b6a931208c2c56eb2dbfee843935c6b666",parentRef:this.hostEl,open:!0,offset:[s.size/2,4],placement:"top"},o("div",{key:"450d5dc528ad4eeb4a2a0d2920fe4553ab3f91f8",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},o("sd-tag",{key:"cc25d0e2794d3d4dc418b0c0aa1a57e4b76b56e1",name:"square_xs_grey",label:a}))),o("sd-icon",{key:"bf9bf8bcc779011635fd34566ec7320d76f8d16b",name:this.icon,size:s.icon,color:i}))}static get style(){return'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%)}'}},[512,"sd-ghost-button",{icon:[1],size:[1],intent:[1],ariaLabel:[1,"aria-label"],tooltipText:[1,"tooltip-text"],disabled:[4],isTooltipOpen:[32]}]);function L(){"undefined"!=typeof customElements&&["sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-ghost-button":customElements.get(i(t))||customElements.define(i(t),w);break;case"sd-icon":customElements.get(i(t))||n();break;case"sd-portal":customElements.get(i(t))||a();break;case"sd-tag":customElements.get(i(t))||r()}}))}export{w as S,L as d}
1
+ import{p as t,H as e,c as s,h as o,t as i}from"./p-Bg9XySrz.js";import{d as n}from"./p-CZfsknba.js";import{d as a}from"./p-B7PHGGFH.js";import{d as r}from"./p-uSEbiD29.js";var d={size:"16",icon:"12"},b={size:"24",icon:"16"},c={size:"28",icon:"20"},h={size:"36",icon:"24"},u={size:"62",icon:"32"},l={sm:"4",md:"6"},g={opacity:"5%"},m={disabled:"#BBBBBB"},p={content:"#888888",hover:{bg:"#222222"}},f={content:"#E30000",hover:{bg:"#E30000"}},v={content:"#025497",hover:{bg:"#0075FF"}},x={content:"#FFFFFF",disabled:"#E1E1E1",hover:{bg:"#FFFFFF"}};const y={xxs:{size:Number(d.size),icon:Number(d.icon)},xs:{size:Number(b.size),icon:Number(b.icon)},sm:{size:Number(c.size),icon:Number(c.icon)},md:{size:Number(h.size),icon:Number(h.icon)},lg:{size:Number(u.size),icon:Number(u.icon)}},F={xxs:Number(l.sm),xs:Number(l.sm),sm:Number(l.sm),md:Number(l.md),lg:Number(l.md)},z=g.opacity,k={default:p.content,danger:f.content,action:v.content,inverse:x.content},E={default:p.hover.bg,danger:f.hover.bg,action:v.hover.bg,inverse:x.hover.bg},N=m.disabled,w={default:N,danger:N,action:N,inverse:x.disabled},B=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=s(this,"sdClick",7)}icon;size="sm";intent="default";ariaLabel="";tooltipText;disabled=!1;get hostEl(){return 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",s=y[t]??y.sm,i=this.disabled?w[e]:k[e],n=(this.ariaLabel??"").trim()||void 0,a=(this.tooltipText??"").trim();return o("button",{key:"59b95275f6acd737d4b0d5c2187e1d40b3a6543f",class:{"sd-ghost-button":!0,"sd-ghost-button--disabled":this.disabled},type:"button",disabled:this.disabled,"aria-label":n,style:{"--sd-ghost-button-size":`${s.size}px`,"--sd-ghost-button-radius":`${F[t]}px`,"--sd-ghost-button-hover-bg":E[e],"--sd-ghost-button-hover-opacity":z,"--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&&!this.disabled&&o("sd-portal",{key:"d8ca94b6a931208c2c56eb2dbfee843935c6b666",parentRef:this.hostEl,open:!0,offset:[s.size/2,4],placement:"top"},o("div",{key:"450d5dc528ad4eeb4a2a0d2920fe4553ab3f91f8",class:"sd-ghost-button__tooltip-inner","aria-hidden":"true"},o("sd-tag",{key:"cc25d0e2794d3d4dc418b0c0aa1a57e4b76b56e1",name:"square_xs_grey",label:a}))),o("sd-icon",{key:"bf9bf8bcc779011635fd34566ec7320d76f8d16b",name:this.icon,size:s.icon,color:i}))}static get style(){return'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%)}'}},[512,"sd-ghost-button",{icon:[1],size:[1],intent:[1],ariaLabel:[1,"aria-label"],tooltipText:[1,"tooltip-text"],disabled:[4],isTooltipOpen:[32]}]);function L(){"undefined"!=typeof customElements&&["sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((t=>{switch(t){case"sd-ghost-button":customElements.get(i(t))||customElements.define(i(t),B);break;case"sd-icon":customElements.get(i(t))||n();break;case"sd-portal":customElements.get(i(t))||a();break;case"sd-tag":customElements.get(i(t))||r()}}))}export{B as S,L as d}
@@ -1 +1 @@
1
- import{p as e,H as s,c as t,h as i,t as c}from"./p-Bg9XySrz.js";import{S as a}from"./p-DvvGi4J_.js";import{d as l}from"./p-ClKABgST.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"94215143f5e47887943c726147739cdb1a9fcbf7",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},i("div",{key:"0ff422b93d0e15f2425ef760706ae0e6e2cb79f6",class:"sd-select-list-item-search__inner"},i("sd-icon",{key:"cc3468339c8b76103b67182309fa3aa2baf24380",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),i("input",{key:"acc468ede845d0f5890c7908311443ea2aa156cf",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),i("button",{key:"b1f1539aea4eb76458794dcb041e53c7af7b91e2",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},i("sd-icon",{key:"a137986e0c801a6cf95e279edeb6a9b21cf00170",name:"close",size:12,color:"#888888"}))))}static get style(){return"sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}"}},[512,"sd-select-list-item-search",{isScrolled:[4,"is-scrolled"],searchText:[32],sdFocus:[64]}]);function d(){"undefined"!=typeof customElements&&["sd-select-list-item-search","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item-search":customElements.get(c(e))||customElements.define(c(e),r);break;case"sd-icon":customElements.get(c(e))||l()}}))}export{r as S,d}
1
+ import{p as e,H as s,c as t,h as i,t as c}from"./p-Bg9XySrz.js";import{S as a}from"./p-DvvGi4J_.js";import{d as l}from"./p-CZfsknba.js";const r=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.searchFilter=t(this,"sdSearchFilter",7),this.searchFocus=t(this,"sdSearchFocus",7)}isScrolled=!1;searchText="";searchFilter;searchFocus;inputEl;debounceTimer;focusRafId;componentDidLoad(){requestAnimationFrame((()=>{this.focusRafId=requestAnimationFrame((()=>{this.inputEl?.focus()}))}))}async sdFocus(){this.inputEl?.focus()}handleInput=e=>{this.searchText=e.target.value,this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{this.searchFilter.emit(this.searchText)}),a)};handleClear=e=>{e.stopPropagation(),this.searchText="",this.debounceTimer&&clearTimeout(this.debounceTimer),this.searchFilter.emit(""),this.inputEl?.focus()};disconnectedCallback(){void 0!==this.focusRafId&&cancelAnimationFrame(this.focusRafId),void 0!==this.debounceTimer&&clearTimeout(this.debounceTimer)}render(){return i("div",{key:"94215143f5e47887943c726147739cdb1a9fcbf7",class:{"sd-select-list-item-search":!0,"sd-select-list-item-search--scrolled":this.isScrolled}},i("div",{key:"0ff422b93d0e15f2425ef760706ae0e6e2cb79f6",class:"sd-select-list-item-search__inner"},i("sd-icon",{key:"cc3468339c8b76103b67182309fa3aa2baf24380",name:"search",size:16,color:"grey_70",class:"sd-select-list-item-search__icon"}),i("input",{key:"acc468ede845d0f5890c7908311443ea2aa156cf",ref:e=>{this.inputEl=e},type:"text",class:"sd-select-list-item-search__input",placeholder:"검색어 입력",value:this.searchText,onInput:this.handleInput,onFocus:()=>this.searchFocus.emit()}),i("button",{key:"b1f1539aea4eb76458794dcb041e53c7af7b91e2",type:"button",class:{"sd-select-list-item-search__clear":!0,"sd-select-list-item-search__clear--hidden":""===this.searchText},onClick:this.handleClear,tabindex:""!==this.searchText?0:-1,"aria-hidden":""!==this.searchText?"false":"true"},i("sd-icon",{key:"a137986e0c801a6cf95e279edeb6a9b21cf00170",name:"close",size:12,color:"#888888"}))))}static get style(){return"sd-select-list-item-search{display:block}sd-select-list-item-search .sd-select-list-item-search{padding:4px 8px;position:sticky;top:0;z-index:1;background:white}sd-select-list-item-search .sd-select-list-item-search--scrolled{box-shadow:0 2px 4px rgba(0, 0, 0, 0.08)}sd-select-list-item-search .sd-select-list-item-search__inner{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid #cccccc;border-radius:4px;background:white}sd-select-list-item-search .sd-select-list-item-search__inner:focus-within{border-color:#0075ff}sd-select-list-item-search .sd-select-list-item-search__icon{flex-shrink:0}sd-select-list-item-search .sd-select-list-item-search__input{flex:1;border:none;outline:none;font-size:12px;line-height:20px;color:#222222;background:transparent;min-width:0}sd-select-list-item-search .sd-select-list-item-search__input::placeholder{color:#aaaaaa}sd-select-list-item-search .sd-select-list-item-search__clear{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:2px;border:none;background:transparent;cursor:pointer;border-radius:2px}sd-select-list-item-search .sd-select-list-item-search__clear:hover{background:#f0f0f0}sd-select-list-item-search .sd-select-list-item-search__clear--hidden{visibility:hidden;pointer-events:none}"}},[512,"sd-select-list-item-search",{isScrolled:[4,"is-scrolled"],searchText:[32],sdFocus:[64]}]);function d(){"undefined"!=typeof customElements&&["sd-select-list-item-search","sd-icon"].forEach((e=>{switch(e){case"sd-select-list-item-search":customElements.get(c(e))||customElements.define(c(e),r);break;case"sd-icon":customElements.get(c(e))||l()}}))}export{r as S,d}
@@ -1 +1 @@
1
- import{p as t,H as e,h as n,t as i}from"./p-Bg9XySrz.js";import{d as a}from"./p-ClKABgST.js";var s={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},g={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},o={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:`${s.height}px`,paddingX:`${s.paddingX}px`,gap:`${s.gap}px`,fontSize:`${s.typography.fontSize}px`,fontWeight:s.typography.fontWeight,lineHeight:`${s.typography.lineHeight}px`,iconSize:12,radius:`${s.radius}px`},sm:{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`},md:{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`}},F={xs:{...y.xs,radius:"999px"},sm:{...y.sm,radius:"999px"},md:{...y.md,radius:"999px"}},$=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]}]))))))),E=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($,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return $[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:"3117d8d5f3d9751dc193e426dbab7e0ead9fb369",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:"8c299f140dc5bd026ed52d3f0921939bbf69fdd5",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),E);break;case"sd-icon":customElements.get(i(t))||a()}}))}export{E as S,k as d}
1
+ import{p as t,H as e,h as n,t as i}from"./p-Bg9XySrz.js";import{d as a}from"./p-CZfsknba.js";var s={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},g={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},o={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:`${s.height}px`,paddingX:`${s.paddingX}px`,gap:`${s.gap}px`,fontSize:`${s.typography.fontSize}px`,fontWeight:s.typography.fontWeight,lineHeight:`${s.typography.lineHeight}px`,iconSize:12,radius:`${s.radius}px`},sm:{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`},md:{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`}},F={xs:{...y.xs,radius:"999px"},sm:{...y.sm,radius:"999px"},md:{...y.md,radius:"999px"}},$=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]}]))))))),E=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($,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return $[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:"3117d8d5f3d9751dc193e426dbab7e0ead9fb369",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:"8c299f140dc5bd026ed52d3f0921939bbf69fdd5",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),E);break;case"sd-icon":customElements.get(i(t))||a()}}))}export{E as S,k as d}
@@ -1 +1 @@
1
- import{p as t,H as n,c as o,h as s,t as d}from"./p-Bg9XySrz.js";import{I as i,d as b}from"./p-ClKABgST.js";import{i as e,g as a,B as u,f as r,e as h,a as l,c,P as g,d as p}from"./p-Dp6NByuZ.js";const v=t=>null!=t&&t in i,f=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=o(this,"sdClick",7)}name="primary_sm";label="";icon;rightIcon;ariaLabel="";disabled=!1;type="button";click;hasWarnedMissingAriaLabel=!1;handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};get resolvedName(){const t=this.name||"primary_sm";if(!e(t))throw new Error(`Invalid sd-button name: "${t}"`);return t}get resolvedConfig(){const t=this.resolvedName;return{config:u[t],preset:a(t)}}getButtonClasses(t,n,o,s){const d=["sd-button",`sd-button--${t}`,`sd-button--${n}`];return this.disabled&&d.push("sd-button--disabled"),s&&d.push("sd-button--icon-only"),o&&d.push("sd-button--has-label"),d.join(" ")}componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===this.label&&(v(this.icon)||v(this.rightIcon))&&""===this.ariaLabel.trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-button] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon??this.rightIcon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const{config:t,preset:n}=this.resolvedConfig,o=Boolean(this.label),d=v(this.icon)?this.icon:void 0,i=v(this.rightIcon)?this.rightIcon:void 0,b=!o&&Boolean(d)!==Boolean(i),e=b&&""!==this.ariaLabel.trim()?this.ariaLabel:void 0;return s("button",{key:"da3228e64ba27430283d55a49d3e13b2112929b6",class:this.getButtonClasses(n,t.size,o,b),type:this.type??"button",disabled:this.disabled,"aria-label":e,style:{"--sd-button-bg":t.color,"--sd-button-bg-hover":p[n],"--sd-button-border":g[n],"--sd-button-text":c[n],"--sd-button-icon":l[n],"--sd-button-accent":h},onClick:this.handleClick},s("span",{key:"22f4dac854314abb3edf3f6d4746057337d2d1c6",class:"sd-button__content"},d&&s("sd-icon",{key:"cd88155fa1783071fe6bee390df47daa96133eab",class:"sd-button__icon",name:d,size:r[t.size],color:"var(--sd-button-current-icon)"}),this.label&&s("span",{key:"27798d8db1d633ef99572982bddf40fbca415ed7",class:"sd-button__label"},this.label),i&&s("sd-icon",{key:"6393eb128f66a88b7ad1b5f2c1cec5654af07fae",class:"sd-button__icon sd-button__icon--right",name:i,size:r[t.size],color:"var(--sd-button-current-icon)"})))}static get style(){return"sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:36px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);--sd-button-bg:#025497;--sd-button-bg-hover:#004177;--sd-button-border:transparent;--sd-button-text:#FFFFFF;--sd-button-icon:var(--sd-button-text);--sd-button-current-text:var(--sd-button-text);--sd-button-current-icon:var(--sd-button-icon);display:inline-flex;align-items:center;justify-content:center;min-height:var(--sd-button-height);min-width:var(--sd-button-min-width, auto);padding:0 var(--sd-button-padding-x);border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-button-bg);color:var(--sd-button-current-text);cursor:pointer;box-sizing:border-box;font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);line-height:1;text-decoration:var(--sd-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-button:hover:not(.sd-button--disabled){background:var(--sd-button-bg-hover)}.sd-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-button-accent)}.sd-button--xs{--sd-button-height:var(--sd-button-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, 36px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-xs-width, var(--sd-button-height))}.sd-button--sm{--sd-button-height:var(--sd-button-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, 70px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-sm-width, var(--sd-button-height))}.sd-button--md{--sd-button-height:var(--sd-button-button-md-height, 36px);--sd-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, 100px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-md-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--lg{--sd-button-height:var(--sd-button-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, 120px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-lg-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--icon-only{width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height));padding:0}.sd-button--icon-only .sd-button__content{gap:0}.sd-button--disabled{border-color:var(--sd-button-button-border-disabled, #CCCCCC);background:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-button-current-text:var(--sd-button-button-text-disabled, #888888);--sd-button-current-icon:var(--sd-button-button-icon-disabled, #BBBBBB);cursor:not-allowed}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap)}.sd-button .sd-button__label{font:inherit}"}},[512,"sd-button",{name:[1],label:[1],icon:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1]}]);function y(){"undefined"!=typeof customElements&&["sd-button","sd-icon"].forEach((t=>{switch(t){case"sd-button":customElements.get(d(t))||customElements.define(d(t),f);break;case"sd-icon":customElements.get(d(t))||b()}}))}export{f as S,y as d}
1
+ import{p as t,H as n,c as o,h as s,t as d}from"./p-Bg9XySrz.js";import{I as b,d as i}from"./p-CZfsknba.js";import{i as e,g as a,B as u,f as r,e as h,a as l,c,P as p,d as g}from"./p-Dp6NByuZ.js";const v=t=>null!=t&&t in b,f=t(class extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.click=o(this,"sdClick",7)}name="primary_sm";label="";icon;rightIcon;ariaLabel="";disabled=!1;type="button";click;hasWarnedMissingAriaLabel=!1;handleClick=t=>{this.disabled?t.preventDefault():this.click.emit(t)};get resolvedName(){const t=this.name||"primary_sm";if(!e(t))throw new Error(`Invalid sd-button name: "${t}"`);return t}get resolvedConfig(){const t=this.resolvedName;return{config:u[t],preset:a(t)}}getButtonClasses(t,n,o,s){const d=["sd-button",`sd-button--${t}`,`sd-button--${n}`];return this.disabled&&d.push("sd-button--disabled"),s&&d.push("sd-button--icon-only"),o&&d.push("sd-button--has-label"),d.join(" ")}componentWillRender(){this.warnIfMissingAriaLabel()}warnIfMissingAriaLabel(){""===this.label&&(v(this.icon)||v(this.rightIcon))&&""===this.ariaLabel.trim()?this.hasWarnedMissingAriaLabel||(console.warn(`[sd-button] icon-only buttons require \`ariaLabel\`. Received name="${this.name}" icon="${this.icon??this.rightIcon}".`),this.hasWarnedMissingAriaLabel=!0):this.hasWarnedMissingAriaLabel=!1}render(){const{config:t,preset:n}=this.resolvedConfig,o=Boolean(this.label),d=v(this.icon)?this.icon:void 0,b=v(this.rightIcon)?this.rightIcon:void 0,i=!o&&Boolean(d)!==Boolean(b),e=i&&""!==this.ariaLabel.trim()?this.ariaLabel:void 0;return s("button",{key:"da3228e64ba27430283d55a49d3e13b2112929b6",class:this.getButtonClasses(n,t.size,o,i),type:this.type??"button",disabled:this.disabled,"aria-label":e,style:{"--sd-button-bg":t.color,"--sd-button-bg-hover":g[n],"--sd-button-border":p[n],"--sd-button-text":c[n],"--sd-button-icon":l[n],"--sd-button-accent":h},onClick:this.handleClick},s("span",{key:"22f4dac854314abb3edf3f6d4746057337d2d1c6",class:"sd-button__content"},d&&s("sd-icon",{key:"cd88155fa1783071fe6bee390df47daa96133eab",class:"sd-button__icon",name:d,size:r[t.size],color:"var(--sd-button-current-icon)"}),this.label&&s("span",{key:"27798d8db1d633ef99572982bddf40fbca415ed7",class:"sd-button__label"},this.label),b&&s("sd-icon",{key:"6393eb128f66a88b7ad1b5f2c1cec5654af07fae",class:"sd-button__icon sd-button__icon--right",name:b,size:r[t.size],color:"var(--sd-button-current-icon)"})))}static get style(){return"sd-button{display:inline-flex;width:fit-content;height:fit-content}.sd-button{--sd-button-height:36px;--sd-button-padding-x:20px;--sd-button-gap:8px;--sd-button-font-family:inherit;--sd-button-font-size:16px;--sd-button-font-weight:500;--sd-button-text-decoration:none;--sd-button-label-min-width:auto;--sd-button-icon-only-size:var(--sd-button-height);--sd-button-bg:#025497;--sd-button-bg-hover:#004177;--sd-button-border:transparent;--sd-button-text:#FFFFFF;--sd-button-icon:var(--sd-button-text);--sd-button-current-text:var(--sd-button-text);--sd-button-current-icon:var(--sd-button-icon);display:inline-flex;align-items:center;justify-content:center;min-height:var(--sd-button-height);min-width:var(--sd-button-min-width, auto);padding:0 var(--sd-button-padding-x);border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-button-bg);color:var(--sd-button-current-text);cursor:pointer;box-sizing:border-box;font-family:var(--sd-button-font-family);font-size:var(--sd-button-font-size);font-weight:var(--sd-button-font-weight);line-height:1;text-decoration:var(--sd-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-button:hover:not(.sd-button--disabled){background:var(--sd-button-bg-hover)}.sd-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-button-accent)}.sd-button--xs{--sd-button-height:var(--sd-button-button-xs-height, 24px);--sd-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-xs-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-xs-min-width, 36px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-xs-width, var(--sd-button-height))}.sd-button--sm{--sd-button-height:var(--sd-button-button-sm-height, 28px);--sd-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-sm-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-sm-min-width, 70px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-sm-width, var(--sd-button-height))}.sd-button--md{--sd-button-height:var(--sd-button-button-md-height, 36px);--sd-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-button-gap:var(--sd-button-button-md-gap, 8px);--sd-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-md-min-width, 100px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-md-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--lg{--sd-button-height:var(--sd-button-button-lg-height, 62px);--sd-button-padding-x:var(--sd-button-button-lg-padding-x, 28px);--sd-button-gap:var(--sd-button-button-lg-gap, 12px);--sd-button-font-family:var(--sd-button-button-lg-typography-font-family, inherit);--sd-button-font-size:var(--sd-button-button-lg-typography-font-size, 18px);--sd-button-font-weight:var(--sd-button-button-lg-typography-font-weight, 500);--sd-button-text-decoration:var(--sd-button-button-lg-typography-text-decoration, none);--sd-button-label-min-width:var(--sd-button-label-lg-min-width, 120px);--sd-button-icon-only-size:var(--sd-button-button-icon-only-lg-width, var(--sd-button-height));border-radius:var(--sd-button-button-radius-md, 6px)}.sd-button--has-label{--sd-button-min-width:var(--sd-button-label-min-width, auto)}.sd-button--icon-only{width:var(--sd-button-icon-only-size, var(--sd-button-height));min-width:var(--sd-button-icon-only-size, var(--sd-button-height));height:var(--sd-button-icon-only-size, var(--sd-button-height));padding:0}.sd-button--icon-only .sd-button__content{gap:0}.sd-button--disabled{border-color:var(--sd-button-button-border-disabled, #CCCCCC);background:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-button-current-text:var(--sd-button-button-text-disabled, #888888);--sd-button-current-icon:var(--sd-button-button-icon-disabled, #BBBBBB);cursor:not-allowed}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-button-gap)}.sd-button .sd-button__label{font:inherit}"}},[512,"sd-button",{name:[1],label:[1],icon:[1],rightIcon:[1,"right-icon"],ariaLabel:[1,"aria-label"],disabled:[4],type:[1]}]);function y(){"undefined"!=typeof customElements&&["sd-button","sd-icon"].forEach((t=>{switch(t){case"sd-button":customElements.get(d(t))||customElements.define(d(t),f);break;case"sd-icon":customElements.get(d(t))||i()}}))}export{f as S,y as d}
@@ -1 +1 @@
1
- import{p as a,t as o,H as d,c as t,h as e}from"./p-Bg9XySrz.js";import{m as i}from"./p-DOXMJi-V.js";import{d as s}from"./p-DDR0VcRU.js";import{d as n}from"./p-CjYYBlrZ.js";import{d as l}from"./p-ClKABgST.js";import{d as c}from"./p-B7PHGGFH.js";import{d as r}from"./p-De7UsPPk.js";const{modal:m}=i,f=m.action,p={radius:Number(m.radius),bg:m.bg,headerPaddingX:Number(f.header.paddingX),headerPaddingY:Number(f.header.paddingY),headerGap:Number(f.header.gap),bodyPaddingX:Number(f.body.paddingX),bodyPaddingBottom:Number(f.body.paddingBottom),footerPaddingX:Number(f.footer.paddingX),footerPaddingY:Number(f.footer.paddingY),footerGap:Number(f.footer.gap),footerBg:f.footer.bg,footerBorder:f.footer.border},b={color:f.title.color,fontFamily:f.title.typography.fontFamily,fontWeight:f.title.typography.fontWeight,fontSize:Number(f.title.typography.fontSize),lineHeight:Number(f.title.typography.lineHeight)},h={name:"primary_md",label:"확인"},g=a(class extends d{constructor(a){super(),!1!==a&&this.__registerHost(),this.close=t(this,"sdClose",7),this.ok=t(this,"sdOk",7)}modalTitle="";buttonProps;width;height;close;ok;render(){const a={"--sd-action-modal-radius":p.radius+"px","--sd-action-modal-bg":p.bg,"--sd-action-modal-header-padding-x":p.headerPaddingX+"px","--sd-action-modal-header-padding-y":p.headerPaddingY+"px","--sd-action-modal-header-gap":p.headerGap+"px","--sd-action-modal-body-padding-x":p.bodyPaddingX+"px","--sd-action-modal-body-padding-bottom":p.bodyPaddingBottom+"px","--sd-action-modal-footer-padding-x":p.footerPaddingX+"px","--sd-action-modal-footer-padding-y":p.footerPaddingY+"px","--sd-action-modal-footer-gap":p.footerGap+"px","--sd-action-modal-footer-bg":p.footerBg,"--sd-action-modal-footer-border":p.footerBorder,"--sd-action-modal-title-color":b.color,"--sd-action-modal-title-font-family":b.fontFamily,"--sd-action-modal-title-font-weight":b.fontWeight,"--sd-action-modal-title-font-size":b.fontSize+"px","--sd-action-modal-title-line-height":b.lineHeight+"px"},o={};return null!=this.width&&""!==this.width&&(o.width="number"==typeof this.width?this.width+"px":this.width,o.minWidth="0"),null!=this.height&&""!==this.height&&(o.height="number"==typeof this.height?this.height+"px":this.height),e("div",{key:"91a94a7058a38f4433809705cf2fefdc3bbaefa9",class:"sd-action-modal",style:{...a,...o}},e("header",{key:"e47efbc4183c9cff34d0ed66aab69521efb9e9e5",class:"sd-action-modal__header"},e("h2",{key:"7a54d5f4decb8d6d599808feafca68e548cf173e",class:"sd-action-modal__title"},this.modalTitle),e("div",{key:"621c4a86ef0ba69833b84515c74d4972f0a6cc42",class:"sd-action-modal__header-sub"},e("slot",{key:"f7453ed96822804094c239cef05638934aed288e",name:"header-sub-title"})),e("sd-ghost-button",{key:"29cee49b27b6f261d719e6856f8b38a9fa590bf4",class:"sd-action-modal__close",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()})),e("div",{key:"610840c291b3a26a82146549220ff1be470eafc2",class:"sd-action-modal__body"},e("slot",{key:"7d390550e2ba1ae27409fb64beccf4f33f744aad",name:"body"})),(null!=this.buttonProps||null!=this.buttonProps)&&e("footer",{key:"c835a2fb96066b393a8833d492d03adc2806cb07",class:"sd-action-modal__footer"},e("div",{key:"b46ed9f18f9e760bd5159260e2cf4b3f27d8dd23",class:"sd-action-modal__footer-sub"},e("slot",{key:"4b9cce3c5b44b7921e82cb813a87ca5e76cd4928",name:"bottom-sub-content"})),e("sd-button",{key:"6cf14c10ef064a1c5993a48ef9f921069d6d70f6",...h,...this.buttonProps,onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-action-modal{display:block}sd-action-modal .sd-action-modal{position:relative;display:flex;flex-direction:column;width:fit-content;min-width:520px;border-radius:var(--sd-action-modal-radius);background:var(--sd-action-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);overflow:hidden}sd-action-modal .sd-action-modal__header{display:flex;align-items:center;flex-shrink:0;gap:var(--sd-action-modal-header-gap);padding:var(--sd-action-modal-header-padding-y) calc(var(--sd-action-modal-header-padding-x) + 20px) var(--sd-action-modal-header-padding-y) var(--sd-action-modal-header-padding-x)}sd-action-modal .sd-action-modal__title{margin:0;color:var(--sd-action-modal-title-color);font-family:var(--sd-action-modal-title-font-family);font-weight:var(--sd-action-modal-title-font-weight);font-size:var(--sd-action-modal-title-font-size);line-height:var(--sd-action-modal-title-line-height);white-space:nowrap}sd-action-modal .sd-action-modal__header-sub{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px}sd-action-modal .sd-action-modal__header-sub:empty{display:none}sd-action-modal .sd-action-modal__close{position:absolute;top:16px;right:16px;cursor:pointer}sd-action-modal .sd-action-modal__body{flex:1 1 auto;min-height:0;padding:0 var(--sd-action-modal-body-padding-x) var(--sd-action-modal-body-padding-bottom);overflow:auto}sd-action-modal .sd-action-modal__footer{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;gap:var(--sd-action-modal-footer-gap);padding:var(--sd-action-modal-footer-padding-y) var(--sd-action-modal-footer-padding-x);background:var(--sd-action-modal-footer-bg);border-top:1px solid var(--sd-action-modal-footer-border)}sd-action-modal .sd-action-modal__footer-sub{flex:1 1 auto;display:flex;align-items:center;gap:8px;min-width:0}sd-action-modal .sd-action-modal__footer-sub:empty{display:none}"}},[772,"sd-action-modal",{modalTitle:[1,"modal-title"],buttonProps:[16],width:[8],height:[8]}]),u=g,y=function(){"undefined"!=typeof customElements&&["sd-action-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((a=>{switch(a){case"sd-action-modal":customElements.get(o(a))||customElements.define(o(a),g);break;case"sd-button":customElements.get(o(a))||s();break;case"sd-ghost-button":customElements.get(o(a))||n();break;case"sd-icon":customElements.get(o(a))||l();break;case"sd-portal":customElements.get(o(a))||c();break;case"sd-tag":customElements.get(o(a))||r()}}))};export{u as SdActionModal,y as defineCustomElement}
1
+ import{p as a,t as o,H as d,c as t,h as e}from"./p-Bg9XySrz.js";import{m as i}from"./p-DOXMJi-V.js";import{d as s}from"./p-xkRWGISE.js";import{d as n}from"./p-ZvI5A-_t.js";import{d as l}from"./p-CZfsknba.js";import{d as c}from"./p-B7PHGGFH.js";import{d as r}from"./p-uSEbiD29.js";const{modal:m}=i,f=m.action,p={radius:Number(m.radius),bg:m.bg,headerPaddingX:Number(f.header.paddingX),headerPaddingY:Number(f.header.paddingY),headerGap:Number(f.header.gap),bodyPaddingX:Number(f.body.paddingX),bodyPaddingBottom:Number(f.body.paddingBottom),footerPaddingX:Number(f.footer.paddingX),footerPaddingY:Number(f.footer.paddingY),footerGap:Number(f.footer.gap),footerBg:f.footer.bg,footerBorder:f.footer.border},b={color:f.title.color,fontFamily:f.title.typography.fontFamily,fontWeight:f.title.typography.fontWeight,fontSize:Number(f.title.typography.fontSize),lineHeight:Number(f.title.typography.lineHeight)},h={name:"primary_md",label:"확인"},g=a(class extends d{constructor(a){super(),!1!==a&&this.__registerHost(),this.close=t(this,"sdClose",7),this.ok=t(this,"sdOk",7)}modalTitle="";buttonProps;width;height;close;ok;render(){const a={"--sd-action-modal-radius":p.radius+"px","--sd-action-modal-bg":p.bg,"--sd-action-modal-header-padding-x":p.headerPaddingX+"px","--sd-action-modal-header-padding-y":p.headerPaddingY+"px","--sd-action-modal-header-gap":p.headerGap+"px","--sd-action-modal-body-padding-x":p.bodyPaddingX+"px","--sd-action-modal-body-padding-bottom":p.bodyPaddingBottom+"px","--sd-action-modal-footer-padding-x":p.footerPaddingX+"px","--sd-action-modal-footer-padding-y":p.footerPaddingY+"px","--sd-action-modal-footer-gap":p.footerGap+"px","--sd-action-modal-footer-bg":p.footerBg,"--sd-action-modal-footer-border":p.footerBorder,"--sd-action-modal-title-color":b.color,"--sd-action-modal-title-font-family":b.fontFamily,"--sd-action-modal-title-font-weight":b.fontWeight,"--sd-action-modal-title-font-size":b.fontSize+"px","--sd-action-modal-title-line-height":b.lineHeight+"px"},o={};return null!=this.width&&""!==this.width&&(o.width="number"==typeof this.width?this.width+"px":this.width,o.minWidth="0"),null!=this.height&&""!==this.height&&(o.height="number"==typeof this.height?this.height+"px":this.height),e("div",{key:"91a94a7058a38f4433809705cf2fefdc3bbaefa9",class:"sd-action-modal",style:{...a,...o}},e("header",{key:"e47efbc4183c9cff34d0ed66aab69521efb9e9e5",class:"sd-action-modal__header"},e("h2",{key:"7a54d5f4decb8d6d599808feafca68e548cf173e",class:"sd-action-modal__title"},this.modalTitle),e("div",{key:"621c4a86ef0ba69833b84515c74d4972f0a6cc42",class:"sd-action-modal__header-sub"},e("slot",{key:"f7453ed96822804094c239cef05638934aed288e",name:"header-sub-title"})),e("sd-ghost-button",{key:"29cee49b27b6f261d719e6856f8b38a9fa590bf4",class:"sd-action-modal__close",icon:"close",ariaLabel:"close",onClick:()=>this.close.emit()})),e("div",{key:"610840c291b3a26a82146549220ff1be470eafc2",class:"sd-action-modal__body"},e("slot",{key:"7d390550e2ba1ae27409fb64beccf4f33f744aad",name:"body"})),(null!=this.buttonProps||null!=this.buttonProps)&&e("footer",{key:"c835a2fb96066b393a8833d492d03adc2806cb07",class:"sd-action-modal__footer"},e("div",{key:"b46ed9f18f9e760bd5159260e2cf4b3f27d8dd23",class:"sd-action-modal__footer-sub"},e("slot",{key:"4b9cce3c5b44b7921e82cb813a87ca5e76cd4928",name:"bottom-sub-content"})),e("sd-button",{key:"6cf14c10ef064a1c5993a48ef9f921069d6d70f6",...h,...this.buttonProps,onSdClick:()=>this.ok.emit()})))}static get style(){return"sd-action-modal{display:block}sd-action-modal .sd-action-modal{position:relative;display:flex;flex-direction:column;width:fit-content;min-width:520px;border-radius:var(--sd-action-modal-radius);background:var(--sd-action-modal-bg);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.2);overflow:hidden}sd-action-modal .sd-action-modal__header{display:flex;align-items:center;flex-shrink:0;gap:var(--sd-action-modal-header-gap);padding:var(--sd-action-modal-header-padding-y) calc(var(--sd-action-modal-header-padding-x) + 20px) var(--sd-action-modal-header-padding-y) var(--sd-action-modal-header-padding-x)}sd-action-modal .sd-action-modal__title{margin:0;color:var(--sd-action-modal-title-color);font-family:var(--sd-action-modal-title-font-family);font-weight:var(--sd-action-modal-title-font-weight);font-size:var(--sd-action-modal-title-font-size);line-height:var(--sd-action-modal-title-line-height);white-space:nowrap}sd-action-modal .sd-action-modal__header-sub{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px}sd-action-modal .sd-action-modal__header-sub:empty{display:none}sd-action-modal .sd-action-modal__close{position:absolute;top:16px;right:16px;cursor:pointer}sd-action-modal .sd-action-modal__body{flex:1 1 auto;min-height:0;padding:0 var(--sd-action-modal-body-padding-x) var(--sd-action-modal-body-padding-bottom);overflow:auto}sd-action-modal .sd-action-modal__footer{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;gap:var(--sd-action-modal-footer-gap);padding:var(--sd-action-modal-footer-padding-y) var(--sd-action-modal-footer-padding-x);background:var(--sd-action-modal-footer-bg);border-top:1px solid var(--sd-action-modal-footer-border)}sd-action-modal .sd-action-modal__footer-sub{flex:1 1 auto;display:flex;align-items:center;gap:8px;min-width:0}sd-action-modal .sd-action-modal__footer-sub:empty{display:none}"}},[772,"sd-action-modal",{modalTitle:[1,"modal-title"],buttonProps:[16],width:[8],height:[8]}]),u=g,y=function(){"undefined"!=typeof customElements&&["sd-action-modal","sd-button","sd-ghost-button","sd-icon","sd-portal","sd-tag"].forEach((a=>{switch(a){case"sd-action-modal":customElements.get(o(a))||customElements.define(o(a),g);break;case"sd-button":customElements.get(o(a))||s();break;case"sd-ghost-button":customElements.get(o(a))||n();break;case"sd-icon":customElements.get(o(a))||l();break;case"sd-portal":customElements.get(o(a))||c();break;case"sd-tag":customElements.get(o(a))||r()}}))};export{u as SdActionModal,y as defineCustomElement}