@sellmate/design-system 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +2 -2
- package/dist/cjs/sd-calendar_2.cjs.entry.js +5 -5
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +10 -10
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-ghost-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-guide.cjs.entry.js +2 -2
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/sd-popover.cjs.entry.js +3 -3
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-portal.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +6 -6
- package/dist/cjs/sd-select_3.cjs.entry.js +8 -8
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +6 -6
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +2 -2
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +3 -3
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -2
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.css +2 -3
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
- package/dist/collection/components/sd-button/sd-button.js +2 -2
- package/dist/collection/components/sd-calendar/sd-calendar.js +3 -3
- package/dist/collection/components/sd-callout/sd-callout.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-divider/sd-divider.js +1 -1
- package/dist/collection/components/sd-field/sd-field.js +5 -5
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.js +2 -2
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +3 -3
- package/dist/collection/components/sd-popup/sd-popup.js +1 -1
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
- package/dist/collection/components/sd-select/sd-select.js +4 -4
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.js +6 -6
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
- package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +2 -2
- package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/components/{p-DeHt0RYQ.js → p-2z2c2umH.js} +1 -1
- package/dist/components/{p-BDJJQALT.js → p-B45aOf4I.js} +1 -1
- package/dist/components/{p-CSbyXQa9.js → p-B6G64i5a.js} +1 -1
- package/dist/components/{p-CRq8zgt_.js → p-B6JOxZKP.js} +1 -1
- package/dist/components/{p-CAP-9lnL.js → p-B6L3bPm2.js} +1 -1
- package/dist/components/{p-C1Fk1556.js → p-BWJtQGYo.js} +1 -1
- package/dist/components/{p-DAAHX92J.js → p-Bhh7ig9Q.js} +1 -1
- package/dist/components/{p-DR1f1cS9.js → p-C8c6MuKQ.js} +1 -1
- package/dist/components/{p-Dq38kgOY.js → p-CARYLqH9.js} +1 -1
- package/dist/components/{p-BYRvYsiC.js → p-CTuKWVTh.js} +1 -1
- package/dist/components/{p-CJRGLvgC.js → p-CkR5oiLy.js} +1 -1
- package/dist/components/{p-5_BC8C6x.js → p-CwQTEZWO.js} +1 -1
- package/dist/components/{p-CK6jFkqR.js → p-CwRItc2J.js} +1 -1
- package/dist/components/{p-CtXad9by.js → p-D6cUtm8p.js} +1 -1
- package/dist/components/{p-2aQ4cVXp.js → p-DCFqtVBm.js} +1 -1
- package/dist/components/{p-D4mjSR0u.js → p-DISZkQqT.js} +1 -1
- package/dist/components/{p-vZLoby4N.js → p-DMrXwfmf.js} +1 -1
- package/dist/components/{p-DwKYjjIC.js → p-DP0Dp12H.js} +1 -1
- package/dist/components/{p-DY1iQfib.js → p-DhmsCQrB.js} +1 -1
- package/dist/components/{p-DfKa36bs.js → p-DhtKHJ7-.js} +1 -1
- package/dist/components/{p-DK4Jvax0.js → p-DmDGMDzt.js} +1 -1
- package/dist/components/p-DoREs-rv.js +1 -0
- package/dist/components/{p-BNXKU1BW.js → p-EcuI_UmK.js} +1 -1
- package/dist/components/{p-CnbeQ2DI.js → p-I9SoAcVO.js} +1 -1
- package/dist/components/{p-BVvVDIo0.js → p-ZSGGRCNc.js} +1 -1
- package/dist/components/{p-F7yyGdIc.js → p-cX2DD74L.js} +1 -1
- package/dist/components/{p-CWGbMz0J.js → p-f10Mw7qM.js} +1 -1
- package/dist/components/{p-D155awu4.js → p-lOVBaLB7.js} +1 -1
- package/dist/components/p-p4bNikji.js +1 -0
- package/dist/components/{p-EbF6qsnG.js → p-uVZjhyvS.js} +1 -1
- package/dist/components/{p-B_2U9h3P.js → p-wLoP3KMv.js} +1 -1
- package/dist/components/p-y_6iWhDy.js +1 -0
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-divider.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-popup.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-32d96a70.entry.js → p-07b0d118.entry.js} +1 -1
- package/dist/design-system/{p-e159f70d.entry.js → p-0de5a53b.entry.js} +1 -1
- package/dist/design-system/{p-e1350f4d.entry.js → p-1219699a.entry.js} +1 -1
- package/dist/design-system/p-18057222.entry.js +1 -0
- package/dist/design-system/{p-08798232.entry.js → p-18d3ae55.entry.js} +1 -1
- package/dist/design-system/{p-643c004a.entry.js → p-1aafbc7b.entry.js} +1 -1
- package/dist/design-system/{p-0060136e.entry.js → p-2c0a8333.entry.js} +1 -1
- package/dist/design-system/{p-ea17a361.entry.js → p-2d3d25bd.entry.js} +1 -1
- package/dist/design-system/p-3e2b5e01.entry.js +1 -0
- package/dist/design-system/{p-840f592d.entry.js → p-46faa7ed.entry.js} +1 -1
- package/dist/design-system/{p-b08ca29b.entry.js → p-4c3ead1b.entry.js} +1 -1
- package/dist/design-system/{p-a6c9baa5.entry.js → p-5c4fd9c1.entry.js} +1 -1
- package/dist/design-system/{p-eef5f8d7.entry.js → p-5d5d8220.entry.js} +1 -1
- package/dist/design-system/p-60b80bf3.entry.js +1 -0
- package/dist/design-system/{p-8d2815cf.entry.js → p-74b3e95b.entry.js} +1 -1
- package/dist/design-system/{p-0964c79a.entry.js → p-78b0b759.entry.js} +1 -1
- package/dist/design-system/p-78c2fd6d.entry.js +1 -0
- package/dist/design-system/p-8674d868.entry.js +1 -0
- package/dist/design-system/{p-10f579ba.entry.js → p-95bbba4f.entry.js} +1 -1
- package/dist/design-system/{p-b5e9320f.entry.js → p-969665c0.entry.js} +1 -1
- package/dist/design-system/{p-adce8704.entry.js → p-97b405aa.entry.js} +1 -1
- package/dist/design-system/{p-4ef942a8.entry.js → p-9d34518e.entry.js} +1 -1
- package/dist/design-system/{p-d1da969d.entry.js → p-a5930cbd.entry.js} +1 -1
- package/dist/design-system/{p-102c2153.entry.js → p-bd4e5141.entry.js} +1 -1
- package/dist/design-system/{p-70f47e43.entry.js → p-c1bac61e.entry.js} +1 -1
- package/dist/design-system/{p-f172920e.entry.js → p-c73cadc7.entry.js} +1 -1
- package/dist/design-system/p-cce38339.entry.js +1 -0
- package/dist/design-system/{p-7444d475.entry.js → p-cffa6da7.entry.js} +1 -1
- package/dist/design-system/{p-914d74c4.entry.js → p-deec1ef0.entry.js} +1 -1
- package/dist/design-system/{p-2e4d1fe1.entry.js → p-e6bd8ab1.entry.js} +1 -1
- package/dist/design-system/{p-1743651a.entry.js → p-e81cb8c9.entry.js} +1 -1
- package/dist/design-system/{p-e9079238.entry.js → p-ea586c5e.entry.js} +1 -1
- package/dist/design-system/{p-733aa107.entry.js → p-f14962bd.entry.js} +1 -1
- package/dist/design-system/{p-521e5d2e.entry.js → p-f3dff8b8.entry.js} +1 -1
- package/dist/design-system/{p-282b1260.entry.js → p-ff33d019.entry.js} +1 -1
- package/dist/esm/sd-action-modal.entry.js +2 -2
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-button_2.entry.js +2 -2
- package/dist/esm/sd-calendar_2.entry.js +5 -5
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
- package/dist/esm/sd-date-picker_7.entry.js +10 -10
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +8 -8
- package/dist/esm/sd-ghost-button.entry.js +2 -2
- package/dist/esm/sd-guide.entry.js +2 -2
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-pagination_4.entry.js +8 -8
- package/dist/esm/sd-popover.entry.js +3 -3
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +6 -6
- package/dist/esm/sd-select_3.entry.js +8 -8
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/sd-table.entry.js +6 -6
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +2 -2
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-text-link.entry.js +3 -3
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -2
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/hydrate/index.js +92 -92
- package/hydrate/index.mjs +92 -92
- package/package.json +1 -1
- package/dist/components/p-BFAQ4nY2.js +0 -1
- package/dist/components/p-LZKaKr8O.js +0 -1
- package/dist/components/p-pTx5xpqU.js +0 -1
- package/dist/design-system/p-17ec576c.entry.js +0 -1
- package/dist/design-system/p-4cf1c8ae.entry.js +0 -1
- package/dist/design-system/p-69a208c0.entry.js +0 -1
- package/dist/design-system/p-9c74571a.entry.js +0 -1
- package/dist/design-system/p-afdca5bb.entry.js +0 -1
- package/dist/design-system/p-f97b75d3.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as n,t as i}from"./p-pwNG5WaX.js";import{d as a}from"./p-DQj-S8AC.js";var s={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},o={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},g={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},d={content:"#FB4444",bg:"#FCEFEF"},r={content:"#FF6B00",bg:"#FEF1EA"},c={content:"#916C0D",bg:"#FFF7DD"},p={content:"#00973C",bg:"#E8F9EF"},l={content:"#0075FF",bg:"#E6F1FF"},h={content:"#006AC1",bg:"#EAF5FE"},u={content:"#004290",bg:"#EFF6FF"},
|
|
1
|
+
import{p as t,H as e,h as n,t as i}from"./p-pwNG5WaX.js";import{d as a}from"./p-DQj-S8AC.js";var s={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},o={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},g={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},d={content:"#FB4444",bg:"#FCEFEF"},r={content:"#FF6B00",bg:"#FEF1EA"},c={content:"#916C0D",bg:"#FFF7DD"},p={content:"#00973C",bg:"#E8F9EF"},l={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:p.bg,content:p.content,icon:p.content},blue:{background:l.bg,content:l.content,icon:l.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:`${o.height}px`,paddingX:`${o.paddingX}px`,gap:`${o.gap}px`,fontSize:`${o.typography.fontSize}px`,fontWeight:o.typography.fontWeight,lineHeight:`${o.typography.lineHeight}px`,iconSize:16,radius:`${o.radius}px`},md:{height:`${g.height}px`,paddingX:`${g.paddingX}px`,gap:`${g.gap}px`,fontSize:`${g.typography.fontSize}px`,fontWeight:g.typography.fontWeight,lineHeight:`${g.typography.lineHeight}px`,iconSize:16,radius:`${g.radius}px`}},F={xs:{...y.xs,radius:"999px"},sm:{...y.sm,radius:"999px"},md:{...y.md,radius:"999px"}},$=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:"945a8a13f4891b5174e48e262b2a108674da7198",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:"441932c2eb85eea471838db541fb95302527df23",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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,c as s,h as i,d as o,t as l}from"./p-pwNG5WaX.js";import{T as r}from"./p-sZMi_32I.js";import{a,r as h,e as n,c,f as d,g as p,h as b,i as f}from"./p-DGyTYauz.js";import{d as y}from"./p-B6L3bPm2.js";import{d as g}from"./p-Cye8r1MG.js";import{d as u}from"./p-CwQTEZWO.js";import{d as m}from"./p-DQj-S8AC.js";import{d as x}from"./p-D6cUtm8p.js";const k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.sdColumnSort=s(this,"sdColumnSort",7)}get el(){return this}columns;selectable;resizable;stickyColumn;stickyHeader;scrolledLeft;scrolledRight;rows=[];columnWidths=[];sdColumnSort;tableId="";_columns=[];_selectable=!1;_resizable=!1;_stickyColumn={left:0,right:0};_stickyHeader=!1;_scrolledLeft=!1;_scrolledRight=!1;tableEl=null;handleColumnsChange(t){Array.isArray(t)&&0===(this.columnWidths??[]).length&&(this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentWillLoad(){this.syncTableContext(),this.columnWidths=Array.isArray(this.columnWidths)?this.columnWidths:[],this.resolveConfig(),0===(this.columnWidths??[]).length&&(this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentDidLoad(){this.syncTableContext(),this.resolveConfig()}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 o=i?.getTableIdSync?.(),l=i?.getAttribute(r),a=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=l&&""!==l&&"undefined"!==l?l:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.(),e=Array.isArray(this.columns)?this.columns:Array.isArray(t?.columns)?t.columns:[];this._columns=e,this._selectable=this.selectable??t?.selectable??!1,this._resizable=this.resizable??t?.resizable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._stickyHeader=this.stickyHeader??t?.stickyHeader??!1,this._scrolledLeft=this.scrolledLeft??t?.scrolledLeft??!1,this._scrolledRight=this.scrolledRight??t?.scrolledRight??!1,Array.isArray(t?.columnWidths)&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths]),Array.isArray(this.columnWidths)||(this.columnWidths=[])}async refreshConfig(){this.resolveConfig()}async setColumnWidths(t){this.columnWidths=Array.isArray(t)?t:[]}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.getIsAllChecked())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}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?a: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],o={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}handleResize(t,e,s=!1){this.tableEl?.handleResize&&this.tableEl.handleResize(t,e,s)}handleColumnSort=t=>{this.sdColumnSort.emit({column:t})};handleSelectAll(t){const e=!!t,s=Array.isArray(this.rows)?this.rows:[];this.tableEl?.toggleSelectAllSync&&this.tableEl.toggleSelectAllSync(e,s)}getIsAllChecked(){const t=Array.isArray(this.rows)?this.rows:[];return!!(this.tableEl?.getIsAllCheckedSync&&t.length>0)&&this.tableEl.getIsAllCheckedSync(t)}render(){const t=Array.isArray(this.rows)?this.rows:[],e=this._stickyColumn.left||0,s=this._stickyColumn.right||0,l=this.visibleColumns.slice(0,e),r=this.visibleColumns.slice(e,this.visibleColumns.length-s),a=this.visibleColumns.slice(this.visibleColumns.length-s),y=this.visibleColumns.length-1;return i(o,{key:"2b949f43561a2cd36b82de324d3d8c0d8a1d8431",slot:`${this.tableId}-head`,style:{"--table-header-height":`${f.height}px`,"--table-header-padding-x":`${f.paddingX}px`,"--table-header-gap":`${f.gap}px`,"--table-header-bg":b.bg,"--table-header-font-family":p.fontFamily,"--table-header-font-weight":p.fontWeight,"--table-header-font-size":`${p.fontSize}px`,"--table-header-line-height":`${p.lineHeight}px`,"--table-header-text-decoration":p.textDecoration,"--table-header-resizer-color":d.color,"--table-header-resizer-height":`${d.height}px`,"--table-border-color":c.color,"--table-border-width":`${c.width}px`}},i("thead",{key:"45918bfb1dc44bb0f45a0f1646bf2276b1ca74ec",class:{thead:!0,"thead--sticky":this._stickyHeader}},i("tr",{key:"3802f86a730041ca405071b243a99c28e04558d2",class:"tr"},this._selectable&&i("th",{key:"d60e1323fca90516f38cedfa6fc8bf17840fad5d",class:{th:!0,"th--selected":!0,"sticky-left":!0,"sticky-left-edge":0===e,"is-scrolled-left":0===e&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},i("sd-checkbox",{key:"0c0b61405a8624cfc1d803f8ae8905d74d6c10f1",value:this.getIsAllChecked(),disabled:0===t.length,onSdUpdate:t=>this.handleSelectAll(t.detail)}),i("div",{key:"b808a627e740a9c3a9f6f03e32cf90e598fd506f",class:"th__bar"})),l.map(((t,s)=>i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-left":!0,"sticky-left-edge":s===e-1,"is-scrolled-left":s===e-1&&this._scrolledLeft},style:{...t.thStyle,...this.getStickyStyle(s)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&s!==y&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(s,t)})))),r.map(((t,s)=>{const o=e+s;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass)},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&o!==y&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(o,t)}))})),a.map(((t,e)=>{const o=this.visibleColumns.length-s+e;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-right":!0,"sticky-right-edge":0===e,"is-scrolled-right":0===e&&this._scrolledRight},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&i("div",{class:"th__resizer th__resizer--left",onMouseDown:t=>this.handleResize(o,t,!0)}))})))))}static get watchers(){return{columns:[{handleColumnsChange:0}]}}static get style(){return'sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--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}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.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}.th.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}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}'}},[512,"sd-thead",{columns:[16],selectable:[4],resizable:[4],stickyColumn:[16],stickyHeader:[4,"sticky-header"],scrolledLeft:[4,"scrolled-left"],scrolledRight:[4,"scrolled-right"],rows:[16],columnWidths:[1040],tableId:[32],_columns:[32],_selectable:[32],_resizable:[32],_stickyColumn:[32],_stickyHeader:[32],_scrolledLeft:[32],_scrolledRight:[32],refreshConfig:[64],setColumnWidths:[64],refreshSelection:[64]},void 0,{columns:[{handleColumnsChange:0}]}]);function _(){"undefined"!=typeof customElements&&["sd-thead","sd-button","sd-checkbox","sd-floating-portal","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-thead":customElements.get(l(t))||customElements.define(l(t),k);break;case"sd-button":customElements.get(l(t))||y();break;case"sd-checkbox":customElements.get(l(t))||g();break;case"sd-floating-portal":customElements.get(l(t))||u();break;case"sd-icon":customElements.get(l(t))||m();break;case"sd-tooltip":customElements.get(l(t))||x()}}))}export{k as S,_ as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,t as o,H as d,c as t,h as e}from"./p-pwNG5WaX.js";import{m as i}from"./p-DOXMJi-V.js";import{d as s}from"./p-
|
|
1
|
+
import{p as a,t as o,H as d,c as t,h as e}from"./p-pwNG5WaX.js";import{m as i}from"./p-DOXMJi-V.js";import{d as s}from"./p-B6L3bPm2.js";import{d as n}from"./p-DhtKHJ7-.js";import{d as l}from"./p-DQj-S8AC.js";const{modal:c}=i,r=c.action,m={radius:Number(c.radius),bg:c.bg,headerPaddingX:Number(r.header.paddingX),headerPaddingY:Number(r.header.paddingY),headerGap:Number(r.header.gap),bodyPaddingX:Number(r.body.paddingX),bodyPaddingBottom:Number(r.body.paddingBottom),footerPaddingX:Number(r.footer.paddingX),footerPaddingY:Number(r.footer.paddingY),footerGap:Number(r.footer.gap),footerBg:r.footer.bg,footerBorder:r.footer.border},f={color:r.title.color,fontFamily:r.title.typography.fontFamily,fontWeight:r.title.typography.fontWeight,fontSize:Number(r.title.typography.fontSize),lineHeight:Number(r.title.typography.lineHeight)},b={name:"primary_md",label:"확인"},p=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":m.radius+"px","--sd-action-modal-bg":m.bg,"--sd-action-modal-header-padding-x":m.headerPaddingX+"px","--sd-action-modal-header-padding-y":m.headerPaddingY+"px","--sd-action-modal-header-gap":m.headerGap+"px","--sd-action-modal-body-padding-x":m.bodyPaddingX+"px","--sd-action-modal-body-padding-bottom":m.bodyPaddingBottom+"px","--sd-action-modal-footer-padding-x":m.footerPaddingX+"px","--sd-action-modal-footer-padding-y":m.footerPaddingY+"px","--sd-action-modal-footer-gap":m.footerGap+"px","--sd-action-modal-footer-bg":m.footerBg,"--sd-action-modal-footer-border":m.footerBorder,"--sd-action-modal-title-color":f.color,"--sd-action-modal-title-font-family":f.fontFamily,"--sd-action-modal-title-font-weight":f.fontWeight,"--sd-action-modal-title-font-size":f.fontSize+"px","--sd-action-modal-title-line-height":f.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",...b,...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]}]),h=p,g=function(){"undefined"!=typeof customElements&&["sd-action-modal","sd-button","sd-ghost-button","sd-icon"].forEach((a=>{switch(a){case"sd-action-modal":customElements.get(o(a))||customElements.define(o(a),p);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()}}))};export{h as SdActionModal,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as d,h as s,t
|
|
1
|
+
import{p as e,H as d,h as s,t}from"./p-pwNG5WaX.js";const a={red:"#FB4444",orange:"#FF6B00",yellow:"#FFC700",green:"#00973C",blue:"#0075FF",darkblue:"#006AC1",indigo:"#004290",grey:"#737373"},o=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}color="blue";render(){return s("div",{key:"5fec3220f60c6567d1aa5de6aa3d1c7c9f9e605b",class:"sd-badge",style:{"--sd-badge-color":a[this.color]??a.blue}},s("div",{key:"892f2c5c1d004d172c06bc0871688d30e449e80f",class:"sd-badge__dot"}))}static get style(){return"sd-badge{display:inline-flex}sd-badge .sd-badge{display:flex;align-items:center;justify-content:center}sd-badge .sd-badge .sd-badge__dot{width:6px;height:6px;min-width:6px;min-height:6px;border-radius:9999px;background:var(--sd-badge-color, #0075FF)}sd-badge .sd-badge .sd-badge__label{margin-left:8px;font-size:12px;font-weight:500;line-height:20px;color:#333333}"}},[512,"sd-badge",{color:[1]}]),n=o,r=function(){"undefined"!=typeof customElements&&["sd-badge"].forEach((e=>{"sd-badge"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))};export{n as SdBadge,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as s,h as i,t as a}from"./p-pwNG5WaX.js";import{n as o}from"./p-CCwNgVmC.js";import{i as
|
|
1
|
+
import{p as t,H as e,c as s,h as i,t as a}from"./p-pwNG5WaX.js";import{n as o}from"./p-CCwNgVmC.js";import{i as n}from"./p-ByhWX2NK.js";import{d}from"./p-B6L3bPm2.js";import{d as l}from"./p-DmDGMDzt.js";import{d as r}from"./p-CwQTEZWO.js";import{d as c}from"./p-DhtKHJ7-.js";import{d as u}from"./p-DQj-S8AC.js";import{d as h}from"./p-D6cUtm8p.js";const p=n.textinput.sm,b=n.textinput.md,f={sm:{height:p.height,paddingX:p.paddingX,gap:p.gap,radius:p.radius,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight},md:{height:b.height,paddingX:b.paddingX,gap:b.gap,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},m={bg:n.textinput.bg,text:n.textinput.text,icon:n.textinput.icon},g=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=s(this,"sdUpdate",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get host(){return this}value=null;size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){void 0!==this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,e)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(e)):this.focus?.emit(e)};render(){const t=f[this.size]??f.sm;return i("sd-field",{key:"c009f4c33b31e9498c230e9a0f4064925a1e5757",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,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-barcode-input-font-size":t.fontSize+"px","--sd-barcode-input-line-height":t.lineHeight+"px","--sd-barcode-input-font-weight":t.fontWeight,"--sd-barcode-input-padding-x":t.paddingX+"px","--sd-barcode-input-gap":t.gap+"px","--sd-barcode-input-text-color":m.text.default,"--sd-barcode-input-placeholder-color":m.text.placeholder,"--sd-barcode-input-disabled-color":m.text.disabled,"--sd-barcode-input-icon-color":m.icon.default,"--sd-system-size-field-sm-height":t.height+"px","--sd-system-radius-field-sm":t.radius+"px","--sd-system-color-field-bg-default":m.bg.barcode}},i("label",{key:"a614817eab514a80f7132ebb92ebb0b8bb8009e4",class:"sd-barcode-input__content"},i("slot",{key:"16a0bf4c55eafec3fb827ba8fe54f61e546fbbca",name:"prefix"}),i("input",{key:"de9e2abcfe4b8f34084feb8691ef6c8183568932",name:this.name,ref:t=>this.nativeEl=t,class:"sd-barcode-input__native "+this.inputClass,type:"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),i("slot",{key:"dbfc3e2c03b20da68e80cc3855cace42aae268ec",name:"suffix"}),this.clearable&&this.internalValue&&i("sd-ghost-button",{key:"05670236ffb93c7b894bdea9763d11adcab75e05",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-barcode-input__clear-icon",onClick:async()=>{this.disabled||(this.internalValue="",await(this.formField?.sdValidate()))}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fafaa1 inset;box-shadow:0 0 0px 1000px #fafaa1 inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fafaa1 inset;box-shadow:0 0 0px 1000px #fafaa1 inset;transition:background-color 5000s ease-in-out 0s}sd-barcode-input{display:inline-flex}sd-barcode-input .sd-barcode-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-barcode-input-text-color);font-size:var(--sd-barcode-input-font-size);line-height:var(--sd-barcode-input-line-height);font-weight:var(--sd-barcode-input-font-weight);padding:0 var(--sd-barcode-input-padding-x);gap:var(--sd-barcode-input-gap)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[disabled]{cursor:not-allowed;color:var(--sd-barcode-input-disabled-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[readonly]{color:var(--sd-barcode-input-disabled-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native::placeholder{color:var(--sd-barcode-input-placeholder-color)}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__clear-icon{flex-shrink:0}sd-barcode-input .sd-barcode-input__content .sd-barcode-input__native[disabled]~.sd-barcode-input__clear-icon{cursor:not-allowed;pointer-events:none}"}},[772,"sd-barcode-input",{value:[1032],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]),v=g,x=function(){"undefined"!=typeof customElements&&["sd-barcode-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tooltip"].forEach((t=>{switch(t){case"sd-barcode-input":customElements.get(a(t))||customElements.define(a(t),g);break;case"sd-button":customElements.get(a(t))||d();break;case"sd-field":customElements.get(a(t))||l();break;case"sd-floating-portal":customElements.get(a(t))||r();break;case"sd-ghost-button":customElements.get(a(t))||c();break;case"sd-icon":customElements.get(a(t))||u();break;case"sd-tooltip":customElements.get(a(t))||h()}}))};export{v as SdBarcodeInput,x as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-B6L3bPm2.js";const m=o,p=s;export{m as SdButton,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-B6JOxZKP.js";const p=o,r=s;export{p as SdCalendar,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as l,h as e,t as o}from"./p-pwNG5WaX.js";import{s as a}from"./p-DopVneZA.js";import{d
|
|
1
|
+
import{p as t,H as l,h as e,t as o}from"./p-pwNG5WaX.js";import{s as a}from"./p-DopVneZA.js";import{d}from"./p-DQj-S8AC.js";const{callout:i}={callout:{radius:"8",border:{width:"1"},body:{gap:"2",typography:{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"},paddingX:"12",paddingY:"8"},default:{bg:"#F9F9F9",border:"#E1E1E1",content:"#555555"},danger:{bg:"#FCEFEF",border:"#FFB5B5",content:"#222222",title:{bg:"#FB4444",paddingX:"24",gap:"2",typography:{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",fontWeight:"700",fontSize:"16",lineHeight:"26"},color:"#FFFFFF",icon:"24"}}}},s={radius:i.radius+"px",borderWidth:i.border.width+"px",bodyPaddingX:i.body.paddingX+"px",bodyPaddingY:i.body.paddingY+"px",bodyGap:i.body.gap+"px",titlePaddingX:i.danger.title.paddingX+"px",titleGap:i.danger.title.gap+"px",titleIconSize:Number(i.danger.title.icon)},n={body:{fontFamily:i.body.typography.fontFamily,fontSize:i.body.typography.fontSize+"px",fontWeight:i.body.typography.fontWeight,lineHeight:i.body.typography.lineHeight+"px"},title:{fontFamily:i.danger.title.typography.fontFamily,fontSize:i.danger.title.typography.fontSize+"px",fontWeight:i.danger.title.typography.fontWeight,lineHeight:i.danger.title.typography.lineHeight+"px"}},c={default:{bg:i.default.bg,border:i.default.border,content:i.default.content},danger:{bg:i.danger.bg,border:i.danger.border,content:i.danger.content,titleBg:i.danger.title.bg,titleColor:i.danger.title.color}},r={default:void 0,danger:"warningFill"},u=t(class extends l{constructor(t){super(),!1!==t&&this.__registerHost()}type="default";message=[];get calloutStyle(){const t=c[this.type]??c.default;return{"--sd-callout-bg":t.bg,"--sd-callout-border":t.border,"--sd-callout-border-width":s.borderWidth,"--sd-callout-content":t.content,"--sd-callout-radius":s.radius,"--sd-callout-body-padding-x":s.bodyPaddingX,"--sd-callout-body-padding-y":s.bodyPaddingY,"--sd-callout-body-gap":s.bodyGap,"--sd-callout-body-font-family":n.body.fontFamily,"--sd-callout-body-font-size":n.body.fontSize,"--sd-callout-body-font-weight":n.body.fontWeight,"--sd-callout-body-line-height":n.body.lineHeight,"--sd-callout-title-bg":t.titleBg??"transparent","--sd-callout-title-color":t.titleColor??"inherit","--sd-callout-title-padding-x":s.titlePaddingX,"--sd-callout-title-gap":s.titleGap,"--sd-callout-title-font-family":n.title.fontFamily,"--sd-callout-title-font-size":n.title.fontSize,"--sd-callout-title-font-weight":n.title.fontWeight,"--sd-callout-title-line-height":n.title.lineHeight}}renderListItem(t,l=0){return Array.isArray(t)?t.flatMap((t=>this.renderListItem(t,l+1))):[this.renderLi(t,l)]}renderLi=(t,l)=>e("li",{class:"sd-callout__list__item sd-callout__list__item--depth-"+Math.min(Math.max(l,1),2)},e("p",{innerHTML:a(t)}));renderBody(){return e("ul",{class:"sd-callout__list"},this.renderListItem(this.message))}renderTitle(){const t=r[this.type];return e("div",{class:"sd-callout__title"},t&&e("sd-icon",{name:t,size:s.titleIconSize,color:c[this.type].titleColor}),e("span",{class:"sd-callout__title-text"},"주의사항"))}render(){return e("div",{key:"b11c9ade2fcd2a17704b4d8965e53cc80ddd4a15",class:"sd-callout",style:this.calloutStyle,role:"note"},"danger"===this.type&&this.renderTitle(),e("div",{key:"0c5712690ab2141820f444092a63ac4c11d33c80",class:"sd-callout__body"},this.renderBody()))}static get style(){return'@charset "UTF-8";sd-callout{display:block;width:fit-content}sd-callout .sd-callout{display:inline-flex;align-items:stretch;width:fit-content;border:var(--sd-callout-border-width) solid var(--sd-callout-border);border-radius:var(--sd-callout-radius);background-color:var(--sd-callout-bg);color:var(--sd-callout-content);overflow:hidden}sd-callout .sd-callout__title{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;gap:var(--sd-callout-title-gap);padding:8px var(--sd-callout-title-padding-x);background-color:var(--sd-callout-title-bg);color:var(--sd-callout-title-color);font-family:var(--sd-callout-title-font-family);font-size:var(--sd-callout-title-font-size);font-weight:var(--sd-callout-title-font-weight);line-height:var(--sd-callout-title-line-height);flex-shrink:0}sd-callout .sd-callout__title-text{white-space:nowrap}sd-callout .sd-callout__body{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:var(--sd-callout-body-gap);padding:var(--sd-callout-body-padding-y) var(--sd-callout-body-padding-x);font-family:var(--sd-callout-body-font-family);font-size:var(--sd-callout-body-font-size);font-weight:var(--sd-callout-body-font-weight);line-height:var(--sd-callout-body-line-height)}sd-callout .sd-callout__list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;justify-content:center;gap:var(--sd-callout-body-gap)}sd-callout .sd-callout__list__item{display:flex;align-items:flex-start;color:var(--sd-callout-content)}sd-callout .sd-callout__list__item p{margin:0;padding:0;flex:1;min-width:0;word-break:break-word}sd-callout .sd-callout__list__item::before{display:block;flex-shrink:0;text-align:center;color:var(--sd-callout-content);font-size:var(--sd-callout-body-font-size);font-weight:var(--sd-callout-body-font-weight);line-height:var(--sd-callout-body-line-height)}sd-callout .sd-callout__list__item--depth-1::before{content:"-";width:24px}sd-callout .sd-callout__list__item--depth-2{padding-left:32px}sd-callout .sd-callout__list__item--depth-2::before{content:"•";width:24px}'}},[512,"sd-callout",{type:[513],message:[16]}]),p=u,g=function(){"undefined"!=typeof customElements&&["sd-callout","sd-icon"].forEach((t=>{switch(t){case"sd-callout":customElements.get(o(t))||customElements.define(o(t),u);break;case"sd-icon":customElements.get(o(t))||d()}}))};export{p as SdCallout,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as d,H as s,h as e,F as r,t
|
|
1
|
+
import{p as d,H as s,h as e,F as r,t}from"./p-pwNG5WaX.js";const a=d(class extends s{constructor(d){super(),!1!==d&&this.__registerHost()}bordered=!1;sdClass="";render(){return e(r,{key:"366604b2ca458d2b9b26f61c1cb282543b27a699"},e("div",{key:"889e8ec8d359eb26713762ebb9990ea07dfaf0ba",class:`sd-card ${this.bordered?"sd-card--bordered":""} ${this.sdClass}`},e("slot",{key:"d680bfe14dc135da77e35440587f089781ef383f"})))}static get style(){return"sd-card{display:block;height:fit-content}sd-card .sd-card{border-radius:8px;background:white}sd-card .sd-card--bordered{border:1px solid #E1E1E1}"}},[772,"sd-card",{bordered:[4],sdClass:[1,"sd-class"]}]),c=a,o=function(){"undefined"!=typeof customElements&&["sd-card"].forEach((d=>{"sd-card"===d&&(customElements.get(t(d))||customElements.define(t(d),a))}))};export{c as SdCard,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as
|
|
1
|
+
import{S as o,d as r}from"./p-DMrXwfmf.js";const s=o,f=r;export{s as SdChip,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as o,d as p}from"./p-p4bNikji.js";const s=o,i=p;export{s as SdCircleProgress,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-CwRItc2J.js";const t=o,p=s;export{t as SdConfirmModal,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-DISZkQqT.js";const p=o,r=s;export{p as SdDatePickerTrigger,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-f10Mw7qM.js";const p=o,r=s;export{p as SdDatePicker,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-B6G64i5a.js";const a=o,p=s;export{a as SdDateRangePickerCalendar,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-cX2DD74L.js";const p=o,r=s;export{p as SdDateRangePicker,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as i,h as
|
|
1
|
+
import{p as e,H as i,h as d,d as r,t}from"./p-pwNG5WaX.js";import{s}from"./p-j2khhcHY.js";const a={default:s.color.divider.default},o=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost()}vertical=!1;render(){return d(r,{key:"92e9f5ef8d6d382e1e2a62f3421feaf1bc27aab7",style:{"--sd-divider-color":a.default}},d("hr",{key:"40827e6308a258e6de4a438c53d4de9465a6d0a1","aria-orientation":this.vertical?"vertical":"horizontal"}))}static get style(){return"sd-divider{flex-shrink:0;line-height:0}:where(sd-divider:not([vertical])){display:block;width:100%;height:1px}:where(sd-divider[vertical]){display:inline-block;align-self:stretch;width:1px}sd-divider hr{display:block;width:100%;height:100%;margin:0;border:0;background-color:var(--sd-divider-color)}"}},[512,"sd-divider",{vertical:[516]}]),l=o,c=function(){"undefined"!=typeof customElements&&["sd-divider"].forEach((e=>{"sd-divider"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))};export{l as SdDivider,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as t,p as o,c as n,h as d,t as r}from"./p-pwNG5WaX.js";import{s}from"./p-DopVneZA.js";import{B as e,g as i,b as a,P as p,a as u,c as b,d as l}from"./p-CvfW21oo.js";import{s as h}from"./p-j2khhcHY.js";import{d as c}from"./p-DQj-S8AC.js";import{d as w}from"./p-2aQ4cVXp.js";class g{static instance;activeDropdowns=new Set;static getInstance(){return void 0===g.instance&&(g.instance=new g),g.instance}register(t){this.activeDropdowns.add(t)}unregister(t){this.activeDropdowns.delete(t)}openDropdown(t){this.activeDropdowns.forEach((o=>{o!==t&&o.isOpen&&o.closeDropdown()}))}closeAllDropdowns(){this.activeDropdowns.forEach((t=>{t.isOpen&&t.closeDropdown()}))}}const m=g.getInstance(),v=class extends t{constructor(){super(!1)}documentClickHandler;documentKeydownHandler;initializeEvent(){m.register(this),this.initializeEventHandlers()}cleanupEvent(){m.unregister(this),this.cleanup()}initializeEventHandlers(){this.documentClickHandler=t=>this.handleDocumentClick(t),this.documentKeydownHandler=t=>this.handleDocumentKeydown(t)}addGlobalEventListeners(){this.documentClickHandler&&document.addEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.addEventListener("keydown",this.documentKeydownHandler)}removeGlobalEventListeners(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.removeEventListener("keydown",this.documentKeydownHandler)}onDropdownToggle(t){t&&!this.disabled?(m.openDropdown(this),this.addGlobalEventListeners()):this.removeGlobalEventListeners()}cleanup(){this.removeGlobalEventListeners()}closeDropdown(){this.isOpen=!1}},_=(()=>{const t=Object.keys(e).filter((t=>!t.endsWith("_lg")));return Object.fromEntries(t.map((t=>[t,e[t]])))})(),x=b,f=u,y=p,C={primary:a.button.dropdown.brand.strong.split,secondary:a.button.dropdown.brand.subtle.split,primary_outline:y.primary_outline,neutral_outline:y.neutral_outline,danger:a.button.dropdown.danger.strong.split,danger_outline:y.danger_outline},k=h.color.fg.secondary,E=h.color.bg.accent.default,D=h.color.fg.inverse,z={primary:k,secondary:k,primary_outline:k,neutral_outline:k,danger:k,danger_outline:k},O={primary:E,secondary:E,primary_outline:E,neutral_outline:E,danger:E,danger_outline:E},A={primary:D,secondary:D,primary_outline:D,neutral_outline:D,danger:D,danger_outline:D},F={xs:12,sm:12,md:16},j=a.button.bg.disabled,T=a.button.text.disabled,I=a.button.border.disabled,S=t=>i(t),N=o(class t extends v{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.click=n(this,"sdClick",7),this.buttonClick=n(this,"sdButtonClick",7),this.dropDownShow=n(this,"sdDropDownShow",7)}get el(){return this}name="primary_sm";label="";items=[];disabled=!1;split=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;buttonClick;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedName(){if(!(()=>this.name in _)())throw Error(`Invalid sd-dropdown-button name: "${this.name}"`);return this.name}get resolvedConfig(){const t=this.resolvedName;return{config:_[t],preset:S(t)}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,n)=>(o.disabled||t.push(n),t)),[]);if(0===o.length)return-1;const n=o.indexOf(this.itemIndex);return-1===n?1===t?o[0]:o[o.length-1]:o[(n+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleButtonClick=t=>{t.stopPropagation(),this.disabled||(this.buttonClick.emit(),this.closeDropdown())};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,n,d,r){const s=["sd-dropdown-button__trigger","sd-dropdown-button__trigger--"+t,"sd-dropdown-button__trigger--"+o];return n&&s.push("sd-dropdown-button__trigger--disabled"),d&&s.push("sd-dropdown-button__trigger--open"),void 0!==r&&s.push(`sd-dropdown-button__trigger--${r}-part`),s.join(" ")}getTriggerStyle(t,o){return{"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":x[o],"--sd-dropdown-button-border":y[o],"--sd-dropdown-button-content":f[o],"--sd-dropdown-button-divider":C[o],"--sd-dropdown-button-accent":l,"--sd-dropdown-button-disabled-bg":j,"--sd-dropdown-button-disabled-content":T,"--sd-dropdown-button-disabled-border":I}}getMenuItemClasses(t,o){const n=["sd-dropdown-button__menu-item"];return t&&n.push("sd-dropdown-button__menu-item--active"),o&&n.push("sd-dropdown-button__menu-item--disabled"),n.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?d("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},d("div",{style:{position:"absolute",width:"0px",height:"0px"}},d("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":this.triggerRef.offsetWidth+"px","--sd-dropdown-button-menu-item-color":z[t],"--sd-dropdown-button-menu-item-active-bg":O[t],"--sd-dropdown-button-menu-item-active-color":A[t],"--sd-dropdown-button-menu-border":"transparent"===y[t]?C[t]:y[t]}},this.items.map(((t,o)=>d("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,!!t.disabled),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&d("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),d("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:s(t.label)}))))))):null}renderChevron(t){return d("span",{class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen&&!this.split},"aria-hidden":"true"},d("sd-icon",{name:this.split?"etc":"caretDown",size:F[t],color:"var(--sd-dropdown-button-current-content)"}))}render(){const{config:t,preset:o}=this.resolvedConfig,n=this.getTriggerStyle(t,o);return this.split?d("div",{class:"sd-dropdown-button sd-dropdown-button--split"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"label"),disabled:this.disabled,onClick:this.handleButtonClick,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label)),d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"chevron"),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"","aria-label":"dropdown toggle",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},this.renderChevron(t.size)),this.renderDropdown(o)):d("div",{class:"sd-dropdown-button"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label),this.renderChevron(t.size)),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}static get style(){return"sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#FFFFFF;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006AC1;--sd-dropdown-button-accent:#0075FF;--sd-dropdown-button-disabled-bg:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-dropdown-button-disabled-content:var(--sd-button-button-text-disabled, #888888);--sd-dropdown-button-disabled-border:var(--sd-button-button-border-disabled, #CCCCCC);display:inline-flex;align-items:stretch;justify-content:space-between;min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-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}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-xs-typography-text-decoration, none )}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-sm-typography-text-decoration, none )}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-md-typography-text-decoration, none );border-radius:var(--sd-button-button-radius-md, 6px)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger{gap:var(--sd-dropdown-button-gap);padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-label{padding:0}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-icon{min-width:0;padding:0}.sd-dropdown-button--split{display:inline-flex;align-items:stretch}.sd-dropdown-button--split .sd-dropdown-button__trigger--label-part{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part{border-top-left-radius:0;border-bottom-left-radius:0;border-left:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-divider)}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part.sd-dropdown-button__trigger--disabled{border-left-color:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}"}},[512,"sd-dropdown-button",{name:[1],label:[1],items:[16],disabled:[4],split:[4],isOpen:[32],isAnimatingOut:[32],itemIndex:[32],sdOpen:[64],sdClose:[64]},void 0,{isOpen:[{handleOpenChange:0}]}]),H=N,L=function(){"undefined"!=typeof customElements&&["sd-dropdown-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-dropdown-button":customElements.get(r(t))||customElements.define(r(t),N);break;case"sd-icon":customElements.get(r(t))||c();break;case"sd-portal":customElements.get(r(t))||w()}}))};export{H as SdDropdownButton,L as defineCustomElement}
|
|
1
|
+
import{H as t,p as o,c as n,h as d,t as r}from"./p-pwNG5WaX.js";import{s}from"./p-DopVneZA.js";import{B as e,g as i,b as a,P as p,a as u,c as b,d as l}from"./p-CvfW21oo.js";import{s as h}from"./p-j2khhcHY.js";import{d as c}from"./p-DQj-S8AC.js";import{d as w}from"./p-DCFqtVBm.js";class g{static instance;activeDropdowns=new Set;static getInstance(){return void 0===g.instance&&(g.instance=new g),g.instance}register(t){this.activeDropdowns.add(t)}unregister(t){this.activeDropdowns.delete(t)}openDropdown(t){this.activeDropdowns.forEach((o=>{o!==t&&o.isOpen&&o.closeDropdown()}))}closeAllDropdowns(){this.activeDropdowns.forEach((t=>{t.isOpen&&t.closeDropdown()}))}}const m=g.getInstance(),v=class extends t{constructor(){super(!1)}documentClickHandler;documentKeydownHandler;initializeEvent(){m.register(this),this.initializeEventHandlers()}cleanupEvent(){m.unregister(this),this.cleanup()}initializeEventHandlers(){this.documentClickHandler=t=>this.handleDocumentClick(t),this.documentKeydownHandler=t=>this.handleDocumentKeydown(t)}addGlobalEventListeners(){this.documentClickHandler&&document.addEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.addEventListener("keydown",this.documentKeydownHandler)}removeGlobalEventListeners(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.removeEventListener("keydown",this.documentKeydownHandler)}onDropdownToggle(t){t&&!this.disabled?(m.openDropdown(this),this.addGlobalEventListeners()):this.removeGlobalEventListeners()}cleanup(){this.removeGlobalEventListeners()}closeDropdown(){this.isOpen=!1}},_=(()=>{const t=Object.keys(e).filter((t=>!t.endsWith("_lg")));return Object.fromEntries(t.map((t=>[t,e[t]])))})(),x=b,f=u,y=p,C={primary:a.button.dropdown.brand.strong.split,secondary:a.button.dropdown.brand.subtle.split,primary_outline:y.primary_outline,neutral_outline:y.neutral_outline,danger:a.button.dropdown.danger.strong.split,danger_outline:y.danger_outline},k=h.color.fg.secondary,E=h.color.bg.accent.default,D=h.color.fg.inverse,z={primary:k,secondary:k,primary_outline:k,neutral_outline:k,danger:k,danger_outline:k},O={primary:E,secondary:E,primary_outline:E,neutral_outline:E,danger:E,danger_outline:E},F={primary:D,secondary:D,primary_outline:D,neutral_outline:D,danger:D,danger_outline:D},A={xs:12,sm:12,md:16},j=a.button.bg.disabled,T=a.button.text.disabled,I=a.button.border.disabled,S=t=>i(t),N=o(class t extends v{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.click=n(this,"sdClick",7),this.buttonClick=n(this,"sdButtonClick",7),this.dropDownShow=n(this,"sdDropDownShow",7)}get el(){return this}name="primary_sm";label="";items=[];disabled=!1;split=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;buttonClick;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedName(){if(!(()=>this.name in _)())throw Error(`Invalid sd-dropdown-button name: "${this.name}"`);return this.name}get resolvedConfig(){const t=this.resolvedName;return{config:_[t],preset:S(t)}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,n)=>(o.disabled||t.push(n),t)),[]);if(0===o.length)return-1;const n=o.indexOf(this.itemIndex);return-1===n?1===t?o[0]:o[o.length-1]:o[(n+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleButtonClick=t=>{t.stopPropagation(),this.disabled||(this.buttonClick.emit(),this.closeDropdown())};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,n,d,r){const s=["sd-dropdown-button__trigger","sd-dropdown-button__trigger--"+t,"sd-dropdown-button__trigger--"+o];return n&&s.push("sd-dropdown-button__trigger--disabled"),d&&s.push("sd-dropdown-button__trigger--open"),void 0!==r&&s.push(`sd-dropdown-button__trigger--${r}-part`),s.join(" ")}getTriggerStyle(t,o){return{"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":x[o],"--sd-dropdown-button-border":y[o],"--sd-dropdown-button-content":f[o],"--sd-dropdown-button-divider":C[o],"--sd-dropdown-button-accent":l,"--sd-dropdown-button-disabled-bg":j,"--sd-dropdown-button-disabled-content":T,"--sd-dropdown-button-disabled-border":I}}getMenuItemClasses(t,o){const n=["sd-dropdown-button__menu-item"];return t&&n.push("sd-dropdown-button__menu-item--active"),o&&n.push("sd-dropdown-button__menu-item--disabled"),n.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?d("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},d("div",{style:{position:"absolute",width:"0px",height:"0px"}},d("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":this.triggerRef.offsetWidth+"px","--sd-dropdown-button-menu-item-color":z[t],"--sd-dropdown-button-menu-item-active-bg":O[t],"--sd-dropdown-button-menu-item-active-color":F[t],"--sd-dropdown-button-menu-border":"transparent"===y[t]?C[t]:y[t]}},this.items.map(((t,o)=>d("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,!!t.disabled),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&d("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),d("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:s(t.label)}))))))):null}renderChevron(t){return d("span",{class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen&&!this.split},"aria-hidden":"true"},d("sd-icon",{name:this.split?"etc":"caretDown",size:A[t],color:"var(--sd-dropdown-button-current-content)"}))}render(){const{config:t,preset:o}=this.resolvedConfig,n=this.getTriggerStyle(t,o);return this.split?d("div",{class:"sd-dropdown-button sd-dropdown-button--split"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"label"),disabled:this.disabled,onClick:this.handleButtonClick,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label)),d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"chevron"),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"","aria-label":"dropdown toggle",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},this.renderChevron(t.size)),this.renderDropdown(o)):d("div",{class:"sd-dropdown-button"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label),this.renderChevron(t.size)),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}static get style(){return"sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#FFFFFF;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006AC1;--sd-dropdown-button-accent:#0075FF;--sd-dropdown-button-disabled-bg:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-dropdown-button-disabled-content:var(--sd-button-button-text-disabled, #888888);--sd-dropdown-button-disabled-border:var(--sd-button-button-border-disabled, #CCCCCC);display:inline-flex;align-items:stretch;justify-content:space-between;min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-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}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-xs-typography-text-decoration, none )}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-sm-typography-text-decoration, none )}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-md-typography-text-decoration, none );border-radius:var(--sd-button-button-radius-md, 6px)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger{gap:var(--sd-dropdown-button-gap);padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-label{padding:0}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-icon{min-width:0;padding:0}.sd-dropdown-button--split{display:inline-flex;align-items:stretch}.sd-dropdown-button--split .sd-dropdown-button__trigger--label-part{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part{border-top-left-radius:0;border-bottom-left-radius:0;border-left:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-divider)}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part.sd-dropdown-button__trigger--disabled{border-left-color:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}"}},[512,"sd-dropdown-button",{name:[1],label:[1],items:[16],disabled:[4],split:[4],isOpen:[32],isAnimatingOut:[32],itemIndex:[32],sdOpen:[64],sdClose:[64]},void 0,{isOpen:[{handleOpenChange:0}]}]),H=N,L=function(){"undefined"!=typeof customElements&&["sd-dropdown-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-dropdown-button":customElements.get(r(t))||customElements.define(r(t),N);break;case"sd-icon":customElements.get(r(t))||c();break;case"sd-portal":customElements.get(r(t))||w()}}))};export{H as SdDropdownButton,L as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-DmDGMDzt.js";const t=o,m=s;export{t as SdField,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-C8c6MuKQ.js";const p=o,r=s;export{p as SdFilePicker,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-CwQTEZWO.js";const p=o,r=s;export{p as SdFloatingPortal,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as o,d as s}from"./p-DhtKHJ7-.js";const t=o,p=s;export{t as SdGhostButton,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,t as d}from"./p-pwNG5WaX.js";import{s as o}from"./p-j2khhcHY.js";import{s as n}from"./p-DopVneZA.js";import{d as s}from"./p-CAP-9lnL.js";import{d as u}from"./p-DfKa36bs.js";import{d as a}from"./p-DQj-S8AC.js";import{d as g}from"./p-2aQ4cVXp.js";const{button:p,contents:r}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},b=o.color.fg.primary,c={button:{height:p.height+"px",paddingX:p.paddingX+"px",radius:p.radius+"px",gap:p.gap+"px",fontSize:p.typography.fontSize+"px",fontWeight:p.typography.fontWeight,lineHeight:p.typography.lineHeight+"px",iconColorDefault:p.icon.default,iconColorActive:p.icon.active,iconColorNotion:b,borderWidth:p.border.width+"px",borderColor:p.border.default,bgDefault:p.bg.default,bgTip:p.bg.tip,bgNotion:p.bg.notion,textDefault:p.text.default,textActive:p.text.active},contents:{paddingX:r.paddingX+"px",paddingY:r.paddingY+"px",gap:r.gap+"px",rowGap:r.row.gap+"px",bodyGap:r.body.gap+"px",titleGap:r.title.gap+"px",radius:r.radius+"px",iconColor:r.icon,iconColorNotion:b,titleFontSize:r.typography.title.fontSize+"px",titleFontWeight:r.typography.title.fontWeight,titleLineHeight:r.typography.title.lineHeight+"px",bodyFontSize:r.typography.body.fontSize+"px",bodyFontWeight:r.typography.body.fontWeight,bodyLineHeight:r.typography.body.lineHeight+"px",textColor:r.typography.color}},l={tip:"활용 TIP",notion:"사용법 안내"},_={tip:"helpOutline",notion:"notion"},h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=c;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=c,e=this.popupShow,d=l[this.type??"tip"],o=_[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button","sd-guide__button--type-"+(this.type??"tip")];return e&&s.push("sd-guide__button--active"),i("div",{key:"ea4f220faf6165f7650360f74a19d9f781b81489",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"c90eaa6cc42a9a2f20b8fc79db16697db0cf2ff2",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||d,icon:o,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"21f57a739141ffa36f3b799a2688ca5b3c1bd428",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"2a803402b120509ef8b6de361f360a7b5b96e9db",style:{position:"absolute",width:"0px",height:"0px"}},i("div",{key:"3e591b85ac24ea1db37bdaaf130f983d70ef2f36",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"1aa20f7bd3a1ba45c4932a67a8c1e67d6e068702",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"e48378d1731e0b9fcd5990cb908ae3af236d0346",class:"sd-guide__popup__header"},i("sd-icon",{key:"c8c71c7c2f0fdb25e3741415c1f1fae1a8d4d3d2",name:o,size:24,color:n}),i("h3",{key:"4996225c27fbeae4fd9b4d68d6e493d87225d427",class:"sd-guide__popup__title"},this.popupTitle||d)),i("ul",{key:"edb2d35594b47f19f2e847ba546fac0fc19b21b4",class:"sd-guide__popup__list"},this.renderListItem(this.message))))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const d=t.map((t=>this.renderListItem(t,e+1)));i.push(...d.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+e},i("p",{innerHTML:n(t)}));static get style(){return'@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[513],label:[513],message:[1],url:[1],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),f=h,m=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-ghost-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(d(t))||customElements.define(d(t),h);break;case"sd-button":customElements.get(d(t))||s();break;case"sd-ghost-button":customElements.get(d(t))||u();break;case"sd-icon":customElements.get(d(t))||a();break;case"sd-portal":customElements.get(d(t))||g()}}))};export{f as SdGuide,m as defineCustomElement}
|
|
1
|
+
import{p as t,H as e,h as i,t as o}from"./p-pwNG5WaX.js";import{s as d}from"./p-j2khhcHY.js";import{s as n}from"./p-DopVneZA.js";import{d as s}from"./p-B6L3bPm2.js";import{d as u}from"./p-DhtKHJ7-.js";import{d as g}from"./p-DQj-S8AC.js";import{d as a}from"./p-DCFqtVBm.js";const{button:p,contents:r}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},c=d.color.fg.primary,b={button:{height:p.height+"px",paddingX:p.paddingX+"px",radius:p.radius+"px",gap:p.gap+"px",fontSize:p.typography.fontSize+"px",fontWeight:p.typography.fontWeight,lineHeight:p.typography.lineHeight+"px",iconColorDefault:p.icon.default,iconColorActive:p.icon.active,iconColorNotion:c,borderWidth:p.border.width+"px",borderColor:p.border.default,bgDefault:p.bg.default,bgTip:p.bg.tip,bgNotion:p.bg.notion,textDefault:p.text.default,textActive:p.text.active},contents:{paddingX:r.paddingX+"px",paddingY:r.paddingY+"px",gap:r.gap+"px",rowGap:r.row.gap+"px",bodyGap:r.body.gap+"px",titleGap:r.title.gap+"px",radius:r.radius+"px",iconColor:r.icon,iconColorNotion:c,titleFontSize:r.typography.title.fontSize+"px",titleFontWeight:r.typography.title.fontWeight,titleLineHeight:r.typography.title.lineHeight+"px",bodyFontSize:r.typography.body.fontSize+"px",bodyFontWeight:r.typography.body.fontWeight,bodyLineHeight:r.typography.body.lineHeight+"px",textColor:r.typography.color}},l={tip:"활용 TIP",notion:"사용법 안내"},_={tip:"helpOutline",notion:"notion"},h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=b;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=b,e=this.popupShow,o=l[this.type??"tip"],d=_[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button","sd-guide__button--type-"+(this.type??"tip")];return e&&s.push("sd-guide__button--active"),i("div",{key:"ea4f220faf6165f7650360f74a19d9f781b81489",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"c90eaa6cc42a9a2f20b8fc79db16697db0cf2ff2",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||o,icon:d,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"21f57a739141ffa36f3b799a2688ca5b3c1bd428",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"94e12fa797748a02334b97e13c5012ab95bc2bce",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"6fc71032016e7a3be0581508ef0ecc6772981185",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"385c0c18bc888be6a654525dc6f4359a56ad6de9",class:"sd-guide__popup__header"},i("sd-icon",{key:"34624d2ac3397ba15b2dc7ba23dc460a87cb878b",name:d,size:24,color:n}),i("h3",{key:"dd3527ec329698b0fd1ec82f2a7d0cf5865802c2",class:"sd-guide__popup__title"},this.popupTitle||o)),i("ul",{key:"429357d0203acdf31177353ceb45d9ac41fadae7",class:"sd-guide__popup__list"},this.renderListItem(this.message)))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const o=t.map((t=>this.renderListItem(t,e+1)));i.push(...o.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+e},i("p",{innerHTML:n(t)}));static get style(){return'@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[513],label:[513],message:[1],url:[1],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),f=h,m=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-ghost-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(o(t))||customElements.define(o(t),h);break;case"sd-button":customElements.get(o(t))||s();break;case"sd-ghost-button":customElements.get(o(t))||u();break;case"sd-icon":customElements.get(o(t))||g();break;case"sd-portal":customElements.get(o(t))||a()}}))};export{f as SdGuide,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-I9SoAcVO.js";const p=o,r=s;export{p as SdInput,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as a,t as d}from"./p-pwNG5WaX.js";import{s as l}from"./p-j2khhcHY.js";import{t as r}from"./p-D6GUzecR.js";import{d as i}from"./p-CAP-9lnL.js";import{d as o}from"./p-CRq8zgt_.js";import{d as n}from"./p-Cye8r1MG.js";import{d as u}from"./p-vZLoby4N.js";import{d as c}from"./p-CWGbMz0J.js";import{d as b}from"./p-D4mjSR0u.js";import{d as p}from"./p-F7yyGdIc.js";import{d as k}from"./p-CSbyXQa9.js";import{d as v}from"./p-DK4Jvax0.js";import{d as m}from"./p-DR1f1cS9.js";import{d as h}from"./p-5_BC8C6x.js";import{d as y}from"./p-DfKa36bs.js";import{d as f}from"./p-DQj-S8AC.js";import{d as g}from"./p-CnbeQ2DI.js";import{d as _}from"./p-DAAHX92J.js";import{d as x}from"./p-2aQ4cVXp.js";import{d as w}from"./p-BYRvYsiC.js";import{d as j}from"./p-BDJJQALT.js";import{d as E}from"./p-BVvVDIo0.js";import{d as S}from"./p-DwKYjjIC.js";import{d as C}from"./p-BNXKU1BW.js";import{d as N}from"./p-Dq38kgOY.js";import{d as z}from"./p-BFAQ4nY2.js";import{d as D}from"./p-C1Fk1556.js";import{d as F}from"./p-CtXad9by.js";const U=r.table,B=Number(U.keyValue.height),A=Number(U.radius),q=Number(U.body.paddingX),T=Number(U.keyValue.body.padding),I=Number(U.header.gap),L=Number(U.content.gap),Q=Number(U.border.width),X=Number(U.keyValue.search.paddingX),Y={border:U.border.color,thBg:U.header.bg,thLabel:l.color.fg.primary,required:l.color.fg.accent,helpIcon:l.color.fg.success,tdBg:l.color.bg.frame,tdText:l.color.fg.primary,searchBg:U.keyValue.search.bg},G={labelFontFamily:U.header.typography.fontFamily,labelFontSize:Number(U.header.typography.fontSize),labelFontWeight:Number(U.header.typography.fontWeight),labelLineHeight:Number(U.header.typography.lineHeight),tdFontFamily:U.body.typography.fontFamily,tdFontSize:Number(U.body.typography.fontSize),tdFontWeight:Number(U.body.typography.fontWeight),tdLineHeight:Number(U.body.typography.lineHeight)},H=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.change=s(this,"sdChange",7),this.searchEvent=s(this,"sdSearch",7)}fields=[];search=!1;useTop=!1;change;searchEvent;emit=(e,t)=>{this.change.emit({name:e,value:t})};handleSearchClick=()=>{this.searchEvent.emit()};renderField(e){const t=t=>this.emit(e.name,t.detail);switch(e.type){case"input":return a("sd-input",{width:"100%",...e.options??{},onSdUpdate:t});case"textarea":return a("sd-textarea",{width:"100%",...e.options??{},onSdUpdate:t});case"number-input":return a("sd-number-input",{width:"100%",...e.options??{},onSdUpdate:t});case"select":return a("sd-select",{width:"100%",...e.options??{},onSdUpdate:t});case"radio":{const{value:s,direction:d,...l}=e.options??{};return a("sd-radio-group",{...l,value:s,direction:d??"horizontal",onSdUpdate:t})}case"checkbox":{const{value:s,...d}=e.options??{};return a("sd-checkbox",{...d,value:s,onSdUpdate:t})}case"date-picker":return a("sd-date-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"date-range-picker":return a("sd-date-range-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"file-picker":return a("sd-file-picker",{width:"100%",...e.options??{},onSdUpdate:t});default:return a("span",{class:"sd-key-value-table__text"},e.options?.value??"")}}renderHelpIcon(e){return a("span",{class:"sd-key-value-table__help"},a("sd-tooltip",{icon:"helpOutline",iconSize:16,color:Y.helpIcon,trigger:"hover"},e))}computeAutoSkipTh(){const e=this.fields.map((e=>e.map((()=>!1))));return this.fields.forEach(((t,s)=>{t.forEach(((t,a)=>{const d=null!=t.thRowSpan&&t.thRowSpan>1?t.thRowSpan:1;if(!(d<=1))for(let t=1;t<d;t++){const d=e[s+t];d&&a<d.length&&(d[a]=!0)}}))})),e}computeMaxCols(e){let t=0;return this.fields.forEach(((s,a)=>{let d=0;s.forEach(((t,s)=>{let l;l=t.hideTh?0:e[a]?.[s]?1:null!=t.thColSpan&&t.thColSpan>1?t.thColSpan:1,d+=l+(null!=t.tdColSpan&&t.tdColSpan>1?t.tdColSpan:1)})),d>t&&(t=d)})),t}renderTh(e,t,s){const d=null!=e.thRowSpan&&e.thRowSpan>1?e.thRowSpan:void 0,l=null!=e.thColSpan&&e.thColSpan>1?e.thColSpan:void 0,r={"sd-key-value-table__th":!0};return"string"==typeof e.thClass?r[e.thClass]=!0:Array.isArray(e.thClass)&&e.thClass.forEach((e=>r[e]=!0)),a("th",{key:`th-${t}-${s}`,class:r,style:e.thStyle,scope:"row",rowSpan:d,colSpan:l},a("div",{class:"sd-key-value-table__th-inner"},a("span",{class:"sd-key-value-table__label"},e.label,e.required&&a("sd-icon",{class:"sd-key-value-table__required",name:"star",size:12,color:Y.required,label:"required"})),e.helpText&&this.renderHelpIcon(e.helpText)))}renderTd(e,t,s){return a("td",{key:`td-${t}-${s}`,class:"sd-key-value-table__td",rowSpan:null!=e.tdRowSpan&&e.tdRowSpan>1?e.tdRowSpan:void 0,colSpan:null!=e.tdColSpan&&e.tdColSpan>1?e.tdColSpan:void 0},a("div",{class:"sd-key-value-table__td-inner"},a("slot",{name:"field-"+e.name},this.renderField(e))))}warnDuplicateNames(){const e=new Set,t=new Set;this.fields.forEach((s=>s.forEach((s=>{e.has(s.name)?t.add(s.name):e.add(s.name)})))),t.size>0&&console.warn(`[sd-key-value-table] Duplicate field name(s) detected: ${[...t].join(", ")}. Slot names ("field-{name}") and sdChange events rely on unique names.`)}render(){if(0===this.fields.length)return null;const e={"--sd-kvt-row-height":B+"px","--sd-kvt-th-width":"120px","--sd-kvt-radius":A+"px","--sd-kvt-padding-x":q+"px","--sd-kvt-padding-y":T+"px","--sd-kvt-gap":I+"px","--sd-kvt-label-gap":L+"px","--sd-kvt-border-width":Q+"px","--sd-kvt-border-color":Y.border,"--sd-kvt-th-bg":Y.thBg,"--sd-kvt-th-color":Y.thLabel,"--sd-kvt-required-color":Y.required,"--sd-kvt-td-bg":Y.tdBg,"--sd-kvt-td-color":Y.tdText,"--sd-kvt-label-font-family":G.labelFontFamily,"--sd-kvt-label-font-size":G.labelFontSize+"px","--sd-kvt-label-font-weight":""+G.labelFontWeight,"--sd-kvt-label-line-height":G.labelLineHeight+"px","--sd-kvt-td-font-family":G.tdFontFamily,"--sd-kvt-td-font-size":G.tdFontSize+"px","--sd-kvt-td-font-weight":""+G.tdFontWeight,"--sd-kvt-td-line-height":G.tdLineHeight+"px","--sd-kvt-search-bg":Y.searchBg,"--sd-kvt-search-padding-x":X+"px"};this.warnDuplicateNames();const t=this.computeAutoSkipTh(),s=this.computeMaxCols(t),d=a("table",{class:{"sd-key-value-table":!0,"sd-key-value-table--use-top":this.useTop},style:e},a("colgroup",null,Array.from({length:s},((e,t)=>a("col",{key:"col-"+t,style:t%2==0?{width:"120px"}:void 0})))),a("tbody",null,this.fields.map(((e,s)=>a("tr",{class:"sd-key-value-table__row",key:"row-"+s},e.map(((e,a)=>[e.hideTh||t[s][a]?null:this.renderTh(e,s,a),this.renderTd(e,s,a)])))))));return this.search?a("div",{class:{"sd-key-value-table__wrapper":!0,"sd-key-value-table__wrapper--use-top":this.useTop},style:e},d,a("div",{class:"sd-key-value-table__search-panel"},a("sd-button",{label:"검색",name:"neutral_outline_md",onSdClick:this.handleSearchClick}))):d}static get style(){return"sd-key-value-table{display:block}sd-key-value-table .sd-key-value-table__wrapper{display:flex;align-items:stretch;width:100%;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);overflow:hidden}sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table{flex:1 1 auto;border:0;border-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__search-panel{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:var(--sd-kvt-padding-y) var(--sd-kvt-search-padding-x);background:var(--sd-kvt-search-bg);border-left:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table{width:100%;table-layout:fixed;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);border-collapse:separate;border-spacing:0;overflow:hidden}sd-key-value-table .sd-key-value-table.sd-key-value-table--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__th,sd-key-value-table .sd-key-value-table__td{height:var(--sd-kvt-row-height);padding:var(--sd-kvt-padding-y) var(--sd-kvt-padding-x);box-sizing:border-box;vertical-align:middle;text-align:left;font-weight:normal;border-top:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__th,sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__td{border-top:0}sd-key-value-table .sd-key-value-table__th{width:var(--sd-kvt-th-width);background:var(--sd-kvt-th-bg);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__th-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--sd-kvt-gap);width:100%;height:100%}sd-key-value-table .sd-key-value-table__label{display:inline-flex;align-items:center;gap:var(--sd-kvt-label-gap);font-family:var(--sd-kvt-label-font-family);font-size:var(--sd-kvt-label-font-size);font-weight:var(--sd-kvt-label-font-weight);line-height:var(--sd-kvt-label-line-height);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__required{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__help{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__td{background:var(--sd-kvt-td-bg);color:var(--sd-kvt-td-color)}sd-key-value-table .sd-key-value-table__td-inner{display:flex;align-items:center;width:100%;height:100%}sd-key-value-table .sd-key-value-table__td-inner>slot{display:block;flex:1 1 auto;min-width:0}sd-key-value-table .sd-key-value-table__td-inner sd-input,sd-key-value-table .sd-key-value-table__td-inner sd-textarea,sd-key-value-table .sd-key-value-table__td-inner sd-number-input,sd-key-value-table .sd-key-value-table__td-inner sd-select,sd-key-value-table .sd-key-value-table__td-inner sd-date-picker,sd-key-value-table .sd-key-value-table__td-inner sd-date-range-picker,sd-key-value-table .sd-key-value-table__td-inner sd-file-picker{width:100%}sd-key-value-table .sd-key-value-table__text{font-family:var(--sd-kvt-td-font-family);font-size:var(--sd-kvt-td-font-size);font-weight:var(--sd-kvt-td-font-weight);line-height:var(--sd-kvt-td-line-height);color:var(--sd-kvt-td-color)}"}},[772,"sd-key-value-table",{fields:[16],search:[4],useTop:[4,"use-top"]}]),J=H,R=function(){"undefined"!=typeof customElements&&["sd-key-value-table","sd-button","sd-calendar","sd-checkbox","sd-chip","sd-date-picker","sd-date-picker-trigger","sd-date-range-picker","sd-date-range-picker-calendar","sd-field","sd-file-picker","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-number-input","sd-portal","sd-radio","sd-radio-group","sd-select","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-textarea","sd-tooltip"].forEach((e=>{switch(e){case"sd-key-value-table":customElements.get(d(e))||customElements.define(d(e),H);break;case"sd-button":customElements.get(d(e))||i();break;case"sd-calendar":customElements.get(d(e))||o();break;case"sd-checkbox":customElements.get(d(e))||n();break;case"sd-chip":customElements.get(d(e))||u();break;case"sd-date-picker":customElements.get(d(e))||c();break;case"sd-date-picker-trigger":customElements.get(d(e))||b();break;case"sd-date-range-picker":customElements.get(d(e))||p();break;case"sd-date-range-picker-calendar":customElements.get(d(e))||k();break;case"sd-field":customElements.get(d(e))||v();break;case"sd-file-picker":customElements.get(d(e))||m();break;case"sd-floating-portal":customElements.get(d(e))||h();break;case"sd-ghost-button":customElements.get(d(e))||y();break;case"sd-icon":customElements.get(d(e))||f();break;case"sd-input":customElements.get(d(e))||g();break;case"sd-number-input":customElements.get(d(e))||_();break;case"sd-portal":customElements.get(d(e))||x();break;case"sd-radio":customElements.get(d(e))||w();break;case"sd-radio-group":customElements.get(d(e))||j();break;case"sd-select":customElements.get(d(e))||E();break;case"sd-select-list-item":customElements.get(d(e))||S();break;case"sd-select-list-item-search":customElements.get(d(e))||C();break;case"sd-select-listbox":customElements.get(d(e))||N();break;case"sd-select-trigger":customElements.get(d(e))||z();break;case"sd-textarea":customElements.get(d(e))||D();break;case"sd-tooltip":customElements.get(d(e))||F()}}))};export{J as SdKeyValueTable,R as defineCustomElement}
|
|
1
|
+
import{p as e,H as t,c as s,h as a,t as d}from"./p-pwNG5WaX.js";import{s as l}from"./p-j2khhcHY.js";import{t as r}from"./p-D6GUzecR.js";import{d as i}from"./p-B6L3bPm2.js";import{d as o}from"./p-B6JOxZKP.js";import{d as n}from"./p-Cye8r1MG.js";import{d as c}from"./p-DMrXwfmf.js";import{d as u}from"./p-f10Mw7qM.js";import{d as p}from"./p-DISZkQqT.js";import{d as b}from"./p-cX2DD74L.js";import{d as k}from"./p-B6G64i5a.js";import{d as v}from"./p-DmDGMDzt.js";import{d as m}from"./p-C8c6MuKQ.js";import{d as h}from"./p-CwQTEZWO.js";import{d as y}from"./p-DhtKHJ7-.js";import{d as f}from"./p-DQj-S8AC.js";import{d as g}from"./p-I9SoAcVO.js";import{d as _}from"./p-Bhh7ig9Q.js";import{d as w}from"./p-DCFqtVBm.js";import{d as x}from"./p-CTuKWVTh.js";import{d as j}from"./p-B45aOf4I.js";import{d as E}from"./p-ZSGGRCNc.js";import{d as S}from"./p-DP0Dp12H.js";import{d as D}from"./p-EcuI_UmK.js";import{d as N}from"./p-CARYLqH9.js";import{d as z}from"./p-DoREs-rv.js";import{d as C}from"./p-BWJtQGYo.js";import{d as U}from"./p-D6cUtm8p.js";const q=r.table,B=Number(q.keyValue.height),F=Number(q.radius),T=Number(q.body.paddingX),G=Number(q.keyValue.body.padding),H=Number(q.header.gap),M=Number(q.content.gap),A=Number(q.border.width),I=Number(q.keyValue.search.paddingX),L={border:q.border.color,thBg:q.header.bg,thLabel:l.color.fg.primary,required:l.color.fg.accent,helpIcon:l.color.fg.success,tdBg:l.color.bg.frame,tdText:l.color.fg.primary,searchBg:q.keyValue.search.bg},Q={labelFontFamily:q.header.typography.fontFamily,labelFontSize:Number(q.header.typography.fontSize),labelFontWeight:Number(q.header.typography.fontWeight),labelLineHeight:Number(q.header.typography.lineHeight),tdFontFamily:q.body.typography.fontFamily,tdFontSize:Number(q.body.typography.fontSize),tdFontWeight:Number(q.body.typography.fontWeight),tdLineHeight:Number(q.body.typography.lineHeight)},W=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.change=s(this,"sdChange",7),this.searchEvent=s(this,"sdSearch",7)}fields=[];search=!1;useTop=!1;change;searchEvent;emit=(e,t)=>{this.change.emit({name:e,value:t})};handleSearchClick=()=>{this.searchEvent.emit()};renderField(e){const t=t=>this.emit(e.name,t.detail);switch(e.type){case"input":return a("sd-input",{width:"100%",...e.options??{},onSdUpdate:t});case"textarea":return a("sd-textarea",{width:"100%",...e.options??{},onSdUpdate:t});case"number-input":return a("sd-number-input",{width:"100%",...e.options??{},onSdUpdate:t});case"select":return a("sd-select",{width:"100%",...e.options??{},onSdUpdate:t});case"radio":{const{value:s,direction:d,...l}=e.options??{};return a("sd-radio-group",{...l,value:s,direction:d??"horizontal",onSdUpdate:t})}case"checkbox":{const{value:s,...d}=e.options??{};return a("sd-checkbox",{...d,value:s,onSdUpdate:t})}case"date-picker":return a("sd-date-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"date-range-picker":return a("sd-date-range-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"file-picker":return a("sd-file-picker",{width:"100%",...e.options??{},onSdUpdate:t});default:return a("span",{class:"sd-key-value-table__text"},e.options?.value??"")}}renderHelpIcon(e){return a("span",{class:"sd-key-value-table__help"},a("sd-tooltip",{icon:"helpOutline",iconSize:16,color:L.helpIcon,trigger:"hover"},e))}computeAutoSkipTh(){const e=this.fields.map((e=>e.map((()=>!1))));return this.fields.forEach(((t,s)=>{t.forEach(((t,a)=>{const d=null!=t.thRowSpan&&t.thRowSpan>1?t.thRowSpan:1;if(!(d<=1))for(let t=1;t<d;t++){const d=e[s+t];d&&a<d.length&&(d[a]=!0)}}))})),e}computeMaxCols(e){let t=0;return this.fields.forEach(((s,a)=>{let d=0;s.forEach(((t,s)=>{let l;l=t.hideTh?0:e[a]?.[s]?1:null!=t.thColSpan&&t.thColSpan>1?t.thColSpan:1,d+=l+(null!=t.tdColSpan&&t.tdColSpan>1?t.tdColSpan:1)})),d>t&&(t=d)})),t}renderTh(e,t,s){const d=null!=e.thRowSpan&&e.thRowSpan>1?e.thRowSpan:void 0,l=null!=e.thColSpan&&e.thColSpan>1?e.thColSpan:void 0,r={"sd-key-value-table__th":!0};return"string"==typeof e.thClass?r[e.thClass]=!0:Array.isArray(e.thClass)&&e.thClass.forEach((e=>r[e]=!0)),a("th",{key:`th-${t}-${s}`,class:r,style:e.thStyle,scope:"row",rowSpan:d,colSpan:l},a("div",{class:"sd-key-value-table__th-inner"},a("span",{class:"sd-key-value-table__label"},e.label,e.required&&a("sd-icon",{class:"sd-key-value-table__required",name:"star",size:12,color:L.required,label:"required"})),e.helpText&&this.renderHelpIcon(e.helpText)))}renderTd(e,t,s){return a("td",{key:`td-${t}-${s}`,class:"sd-key-value-table__td",rowSpan:null!=e.tdRowSpan&&e.tdRowSpan>1?e.tdRowSpan:void 0,colSpan:null!=e.tdColSpan&&e.tdColSpan>1?e.tdColSpan:void 0},a("div",{class:"sd-key-value-table__td-inner"},a("slot",{name:"field-"+e.name},this.renderField(e))))}warnDuplicateNames(){const e=new Set,t=new Set;this.fields.forEach((s=>s.forEach((s=>{e.has(s.name)?t.add(s.name):e.add(s.name)})))),t.size>0&&console.warn(`[sd-key-value-table] Duplicate field name(s) detected: ${[...t].join(", ")}. Slot names ("field-{name}") and sdChange events rely on unique names.`)}render(){if(0===this.fields.length)return null;const e={"--sd-kvt-row-height":B+"px","--sd-kvt-th-width":"120px","--sd-kvt-radius":F+"px","--sd-kvt-padding-x":T+"px","--sd-kvt-padding-y":G+"px","--sd-kvt-gap":H+"px","--sd-kvt-label-gap":M+"px","--sd-kvt-border-width":A+"px","--sd-kvt-border-color":L.border,"--sd-kvt-th-bg":L.thBg,"--sd-kvt-th-color":L.thLabel,"--sd-kvt-required-color":L.required,"--sd-kvt-td-bg":L.tdBg,"--sd-kvt-td-color":L.tdText,"--sd-kvt-label-font-family":Q.labelFontFamily,"--sd-kvt-label-font-size":Q.labelFontSize+"px","--sd-kvt-label-font-weight":""+Q.labelFontWeight,"--sd-kvt-label-line-height":Q.labelLineHeight+"px","--sd-kvt-td-font-family":Q.tdFontFamily,"--sd-kvt-td-font-size":Q.tdFontSize+"px","--sd-kvt-td-font-weight":""+Q.tdFontWeight,"--sd-kvt-td-line-height":Q.tdLineHeight+"px","--sd-kvt-search-bg":L.searchBg,"--sd-kvt-search-padding-x":I+"px"};this.warnDuplicateNames();const t=this.computeAutoSkipTh(),s=this.computeMaxCols(t),d=a("table",{class:{"sd-key-value-table":!0,"sd-key-value-table--use-top":this.useTop},style:e},a("colgroup",null,Array.from({length:s},((e,t)=>a("col",{key:"col-"+t,style:t%2==0?{width:"120px"}:void 0})))),a("tbody",null,this.fields.map(((e,s)=>a("tr",{class:"sd-key-value-table__row",key:"row-"+s},e.map(((e,a)=>[e.hideTh||t[s][a]?null:this.renderTh(e,s,a),this.renderTd(e,s,a)])))))));return this.search?a("div",{class:{"sd-key-value-table__wrapper":!0,"sd-key-value-table__wrapper--use-top":this.useTop},style:e},d,a("div",{class:"sd-key-value-table__search-panel"},a("sd-button",{label:"검색",name:"neutral_outline_md",onSdClick:this.handleSearchClick}))):d}static get style(){return"sd-key-value-table{display:block}sd-key-value-table .sd-key-value-table__wrapper{display:flex;align-items:stretch;width:100%;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);overflow:hidden}sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table{flex:1 1 auto;border:0;border-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__search-panel{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:var(--sd-kvt-padding-y) var(--sd-kvt-search-padding-x);background:var(--sd-kvt-search-bg);border-left:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table{width:100%;table-layout:fixed;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);border-collapse:separate;border-spacing:0;overflow:hidden}sd-key-value-table .sd-key-value-table.sd-key-value-table--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__th,sd-key-value-table .sd-key-value-table__td{height:var(--sd-kvt-row-height);padding:var(--sd-kvt-padding-y) var(--sd-kvt-padding-x);box-sizing:border-box;vertical-align:middle;text-align:left;font-weight:normal;border-top:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__th,sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__td{border-top:0}sd-key-value-table .sd-key-value-table__th{width:var(--sd-kvt-th-width);background:var(--sd-kvt-th-bg);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__th-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--sd-kvt-gap);width:100%;height:100%}sd-key-value-table .sd-key-value-table__label{display:inline-flex;align-items:center;gap:var(--sd-kvt-label-gap);font-family:var(--sd-kvt-label-font-family);font-size:var(--sd-kvt-label-font-size);font-weight:var(--sd-kvt-label-font-weight);line-height:var(--sd-kvt-label-line-height);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__required{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__help{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__td{background:var(--sd-kvt-td-bg);color:var(--sd-kvt-td-color)}sd-key-value-table .sd-key-value-table__td-inner{display:flex;align-items:center;width:100%;height:100%}sd-key-value-table .sd-key-value-table__td-inner>slot{display:block;flex:1 1 auto;min-width:0}sd-key-value-table .sd-key-value-table__td-inner sd-input,sd-key-value-table .sd-key-value-table__td-inner sd-textarea,sd-key-value-table .sd-key-value-table__td-inner sd-number-input,sd-key-value-table .sd-key-value-table__td-inner sd-select,sd-key-value-table .sd-key-value-table__td-inner sd-date-picker,sd-key-value-table .sd-key-value-table__td-inner sd-date-range-picker,sd-key-value-table .sd-key-value-table__td-inner sd-file-picker{width:100%}sd-key-value-table .sd-key-value-table__text{font-family:var(--sd-kvt-td-font-family);font-size:var(--sd-kvt-td-font-size);font-weight:var(--sd-kvt-td-font-weight);line-height:var(--sd-kvt-td-line-height);color:var(--sd-kvt-td-color)}"}},[772,"sd-key-value-table",{fields:[16],search:[4],useTop:[4,"use-top"]}]),K=W,O=function(){"undefined"!=typeof customElements&&["sd-key-value-table","sd-button","sd-calendar","sd-checkbox","sd-chip","sd-date-picker","sd-date-picker-trigger","sd-date-range-picker","sd-date-range-picker-calendar","sd-field","sd-file-picker","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-number-input","sd-portal","sd-radio","sd-radio-group","sd-select","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-textarea","sd-tooltip"].forEach((e=>{switch(e){case"sd-key-value-table":customElements.get(d(e))||customElements.define(d(e),W);break;case"sd-button":customElements.get(d(e))||i();break;case"sd-calendar":customElements.get(d(e))||o();break;case"sd-checkbox":customElements.get(d(e))||n();break;case"sd-chip":customElements.get(d(e))||c();break;case"sd-date-picker":customElements.get(d(e))||u();break;case"sd-date-picker-trigger":customElements.get(d(e))||p();break;case"sd-date-range-picker":customElements.get(d(e))||b();break;case"sd-date-range-picker-calendar":customElements.get(d(e))||k();break;case"sd-field":customElements.get(d(e))||v();break;case"sd-file-picker":customElements.get(d(e))||m();break;case"sd-floating-portal":customElements.get(d(e))||h();break;case"sd-ghost-button":customElements.get(d(e))||y();break;case"sd-icon":customElements.get(d(e))||f();break;case"sd-input":customElements.get(d(e))||g();break;case"sd-number-input":customElements.get(d(e))||_();break;case"sd-portal":customElements.get(d(e))||w();break;case"sd-radio":customElements.get(d(e))||x();break;case"sd-radio-group":customElements.get(d(e))||j();break;case"sd-select":customElements.get(d(e))||E();break;case"sd-select-list-item":customElements.get(d(e))||S();break;case"sd-select-list-item-search":customElements.get(d(e))||D();break;case"sd-select-listbox":customElements.get(d(e))||N();break;case"sd-select-trigger":customElements.get(d(e))||z();break;case"sd-textarea":customElements.get(d(e))||C();break;case"sd-tooltip":customElements.get(d(e))||U()}}))};export{K as SdKeyValueTable,O as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as r,h as s,d as a,t as l}from"./p-pwNG5WaX.js";import{p as i}from"./p-D1vaasIp.js";import{s as o}from"./p-j2khhcHY.js";const t={track:i.progress.color.track,label:i.progress.color.label,valueOnFill:i.progress.bar.text,valueZero:o.color.fg.tertiary},n={primary:i.progress.active.color,error:i.progress.error.color,complete:i.progress.success.color},d=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const e=n[this.type]??n.primary,r={"--sd-linear-progress-track-color":t.track,"--sd-linear-progress-fill-color":e,"--sd-linear-progress-value-color":0===this.clampedValue?t.valueZero:e,"--sd-linear-progress-value-on-fill":t.valueOnFill,"--sd-linear-progress-label-color":t.label},l=this.indeterminate?{}:{width:this.clampedValue+"%"},i={clipPath:`inset(0 ${100-this.clampedValue}% 0 0)`},o=Math.round(this.clampedValue)+"%";return s(a,{key:"
|
|
1
|
+
import{p as e,H as r,h as s,d as a,t as l}from"./p-pwNG5WaX.js";import{p as i}from"./p-D1vaasIp.js";import{s as o}from"./p-j2khhcHY.js";const t={track:i.progress.color.track,label:i.progress.color.label,valueOnFill:i.progress.bar.text,valueZero:o.color.fg.tertiary},n={primary:i.progress.active.color,error:i.progress.error.color,complete:i.progress.success.color},d=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const e=n[this.type]??n.primary,r={"--sd-linear-progress-track-color":t.track,"--sd-linear-progress-fill-color":e,"--sd-linear-progress-value-color":0===this.clampedValue?t.valueZero:e,"--sd-linear-progress-value-on-fill":t.valueOnFill,"--sd-linear-progress-label-color":t.label},l=this.indeterminate?{}:{width:this.clampedValue+"%"},i={clipPath:`inset(0 ${100-this.clampedValue}% 0 0)`},o=Math.round(this.clampedValue)+"%";return s(a,{key:"41d89c01b35a6edba09a3ef9f848458d284d491a",style:r},s("div",{key:"79d7490c934437aa0075e39aea0f352dec61eae0",class:"sd-linear-progress__track"},s("div",{key:"d6743f9b4f5a086e11a368989fd0f52a10bdc2ef",class:"sd-linear-progress__fill",style:l}),!this.indeterminate&&s("span",{key:"2d013c7cdf438e069d00c6fcddfca12ff55490e6",class:"sd-linear-progress__value sd-linear-progress__value--on-track"},o),!this.indeterminate&&s("span",{key:"4f473a670cab7b0d104f9c455c28e415d5863a86",class:"sd-linear-progress__value sd-linear-progress__value--on-fill",style:i},o)),this.label&&s("span",{key:"6581d326a1d05413587b44715613a4d878e4f658",class:"sd-linear-progress__label"},this.label))}static get style(){return'sd-linear-progress{display:inline-flex;flex-direction:column;gap:12px;width:100%}sd-linear-progress .sd-linear-progress__track{position:relative;width:100%;height:20px;border-radius:9999px;background-color:var(--sd-linear-progress-track-color);overflow:hidden}sd-linear-progress .sd-linear-progress__fill{position:absolute;inset:0 auto 0 0;height:100%;background-color:var(--sd-linear-progress-fill-color);border-radius:inherit;transition:width 0.4s linear}sd-linear-progress .sd-linear-progress__value{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);text-align:center;font-family:"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;font-size:12px;font-weight:700;line-height:20px;pointer-events:none;user-select:none}sd-linear-progress .sd-linear-progress__value--on-track{color:var(--sd-linear-progress-value-color)}sd-linear-progress .sd-linear-progress__value--on-fill{color:var(--sd-linear-progress-value-on-fill)}sd-linear-progress .sd-linear-progress__label{text-align:center;color:var(--sd-linear-progress-label-color);font-family:"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;font-size:12px;font-weight:400;line-height:20px}sd-linear-progress[indeterminate] .sd-linear-progress__fill{inset:0;width:auto;transform-origin:left center;transition:none;animation:sd-linear-progress-indeterminate 1.2s linear infinite}@keyframes sd-linear-progress-indeterminate{0%{transform:translateX(-100%) scaleX(0.2)}50%{transform:translateX(20%) scaleX(0.6)}100%{transform:translateX(120%) scaleX(0.2)}}'}},[512,"sd-linear-progress",{indeterminate:[516],value:[2],type:[513],label:[1]}]),p=d,c=function(){"undefined"!=typeof customElements&&["sd-linear-progress"].forEach((e=>{"sd-linear-progress"===e&&(customElements.get(l(e))||customElements.define(l(e),d))}))};export{p as SdLinearProgress,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as i,h as n,t as s}from"./p-pwNG5WaX.js";import{d as t}from"./p-
|
|
1
|
+
import{p as e,H as i,h as n,t as s}from"./p-pwNG5WaX.js";import{d as t}from"./p-p4bNikji.js";const a=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost()}visible=!1;message="";async show(e={}){this.message=e.message??"",this.visible=!0}async hide(){this.visible=!1}render(){return n("div",{key:"99c6d9e798862f41142f246f371a357cd604aa44",class:{"sd-loading-container":!0,"sd-loading-container--visible":this.visible},"aria-hidden":this.visible?"false":"true"},n("div",{key:"b836c7d283113e57d0947a178035591521dc8ee2",class:"sd-loading-container__backdrop"}),n("div",{key:"02f1ae9b17eedb29f24d0170c65ef4217f38a5b5",class:"sd-loading-container__content"},n("sd-circle-progress",{key:"3d9c1b33693e823c4c55967d00a63eff8a2a805e",indeterminate:!0,type:"inverse"}),this.message&&n("p",{key:"46c060f444506a9771507b09fd0867f763a95680",class:"sd-loading-container__message"},this.message)))}static get style(){return"sd-loading-container .sd-loading-container{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:var(--sd-loading-container-z-index, 999);opacity:0;visibility:hidden;transition:opacity 0.2s ease, visibility 0s linear 0.2s;pointer-events:none}sd-loading-container .sd-loading-container--visible{opacity:1;visibility:visible;transition:opacity 0.2s ease, visibility 0s linear 0s;pointer-events:auto}sd-loading-container .sd-loading-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4)}sd-loading-container .sd-loading-container__content{position:relative;display:flex;flex-direction:column;align-items:center;gap:16px}sd-loading-container .sd-loading-container__message{margin:0;color:#ffffff;font-size:14px;font-weight:500;line-height:22px;text-align:center;max-width:400px;word-break:keep-all}"}},[512,"sd-loading-container",{visible:[32],message:[32],show:[64],hide:[64]}]),o=a,d=function(){"undefined"!=typeof customElements&&["sd-loading-container","sd-circle-progress"].forEach((e=>{switch(e){case"sd-loading-container":customElements.get(s(e))||customElements.define(s(e),a);break;case"sd-circle-progress":customElements.get(s(e))||t()}}))};export{o as SdLoadingContainer,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as s,d as o}from"./p-DhmsCQrB.js";const r=s,m=o;export{r as SdLoadingModal,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,H as t,h as e,t as o}from"./p-pwNG5WaX.js";import{u as i,r as a,s as n,i as d,a as r}from"./p-DRVnqiWc.js";import{d as l}from"./p-
|
|
1
|
+
import{p as s,H as t,h as e,t as o}from"./p-pwNG5WaX.js";import{u as i,r as a,s as n,i as d,a as r}from"./p-DRVnqiWc.js";import{d as l}from"./p-B6L3bPm2.js";import{d as c}from"./p-p4bNikji.js";import{d as m}from"./p-CwRItc2J.js";import{d as h}from"./p-DhtKHJ7-.js";import{d as u}from"./p-DQj-S8AC.js";import{d as p}from"./p-DhmsCQrB.js";import{d as b}from"./p-wLoP3KMv.js";let f=0;const g=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost()}get el(){return this}autoRemove=!1;entries=[];layerRefs=new Map;async open(s,t){const e="modal-"+ ++f,o=this.createConfirmModal(e,s);return this.attachModalEventListeners(e,o),this.mountEntry({id:e,modalEl:o,modalRef:t,persistent:!!s.persistent,closing:!1,backdropVisible:!1}),e}async openLoading(s,t){const e="modal-"+ ++f,o=this.createLoadingModal(e,s);return this.attachLoadingModalEventListeners(e,o),this.mountEntry({id:e,modalEl:o,modalRef:t,persistent:!!s.persistent,closing:!1,backdropVisible:!1}),e}async createCustom(s,t,e){const o="modal-"+ ++f;return s.setAttribute("data-modal-id",o),s.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(o,s),this.mountEntry({id:o,modalEl:s,modalRef:e,persistent:!!t.persistent,closing:!1,backdropVisible:!1}),o}componentDidRender(){if(Array.isArray(this.entries))for(const s of this.entries){if(s.closing||s.modalEl.isConnected)continue;const t=this.layerRefs.get(s.id);if(!t)continue;const{id:e,modalEl:o}=s;t.appendChild(o),this.waitForModalReady(o).then((()=>{requestAnimationFrame((()=>{const s=this.entries.find((s=>s.id===e));s&&!s.closing&&o.isConnected&&(this.entries=this.entries.map((s=>s.id===e?{...s,backdropVisible:!0}:s)),o.classList.add("sd-modal-container__modal--visible"))}))}))}}disconnectedCallback(){for(const s of this.entries??[])s.dismissTimerId&&clearTimeout(s.dismissTimerId),i(s.id)}async dismissById(s,t){this.entries.find((t=>t.id===s))&&this.requestDismiss(s,t)}async update(s,t){const e=this.entries.find((t=>t.id===s&&!t.closing));e&&("sd-loading-modal"!==e.modalEl.tagName.toLowerCase()?this.applyProps(e.modalEl,t):this.applyLoadingProps(e.modalEl,t))}mountEntry(s){this.entries=[...this.entries??[],s],a({id:s.id,persistent:s.persistent,requestClose:()=>this.dispatchClose(s.id),shake:()=>this.shakeModal(s.modalEl),setZIndex:s=>{this.el.style.setProperty("--sd-modal-container-z-index",s+"")}})}attachModalEventListeners(s,t){t.addEventListener("sdOk",(()=>this.requestDismiss(s,"confirm"))),t.addEventListener("sdCancel",(()=>this.requestDismiss(s,"cancel"))),t.addEventListener("sdClose",(()=>this.requestDismiss(s,"close")))}attachLoadingModalEventListeners(s,t){t.addEventListener("sdClick",(()=>{const t=this.entries.find((t=>t.id===s));t?.modalRef._triggerClick?.()}))}dispatchClose(s){const t=this.entries.find((t=>t.id===s));t?.modalEl.dispatchEvent(new CustomEvent("sdClose"))}requestDismiss(s,t){const e=this.entries.find((t=>t.id===s));if(!e||e.closing)return;e.modalEl.classList.remove("sd-modal-container__modal--visible");const o=setTimeout((()=>{this.finalizeDismiss(s)}),350);n(s,!1),this.entries=(this.entries??[]).map((t=>t.id===s?{...t,closing:!0,dismissTimerId:o,backdropVisible:!1}:t)),"confirm"===t?e.modalRef._triggerOk():"cancel"===t?e.modalRef._triggerCancel():"close"===t&&e.modalRef._triggerClose()}finalizeDismiss(s){const t=this.entries.find((t=>t.id===s));t&&(t.dismissTimerId&&clearTimeout(t.dismissTimerId),t.modalEl.remove(),i(s),t.modalRef._triggerDismissed(),this.layerRefs.delete(s),this.entries=(this.entries??[]).filter((t=>t.id!==s)),this.autoRemove&&0===this.entries.length&&this.el.remove())}createConfirmModal(s,t){const e=document.createElement("sd-confirm-modal");return e.setAttribute("data-modal-id",s),e.classList.add("sd-modal-container__modal"),this.applyProps(e,t),e}createLoadingModal(s,t){const e=document.createElement("sd-loading-modal");return e.setAttribute("data-modal-id",s),e.classList.add("sd-modal-container__modal"),this.applyLoadingProps(e,t),e}applyLoadingProps(s,t){this.hasOwnProp(t,"state")&&this.setAttr(s,"state",t.state),this.hasOwnProp(t,"message")&&(Array.isArray(t.message)?s.message=t.message:this.setAttr(s,"message",t.message)),this.hasOwnProp(t,"useButton")&&(t.useButton?s.setAttribute("use-button",""):s.removeAttribute("use-button")),this.hasOwnProp(t,"buttonLabel")&&this.setAttr(s,"button-label",t.buttonLabel),this.hasOwnProp(t,"width")&&this.setAttr(s,"width",null!=t.width?t.width+"":void 0),this.hasOwnProp(t,"height")&&this.setAttr(s,"height",null!=t.height?t.height+"":void 0),this.hasOwnProp(t,"progress")&&(s.progress=t.progress)}applyProps(s,t){this.hasOwnProp(t,"type")&&this.setAttr(s,"type",t.type),this.hasOwnProp(t,"title")&&this.setAttr(s,"modal-title",t.title),this.hasOwnProp(t,"titleClass")&&this.setAttr(s,"title-class",t.titleClass),this.hasOwnProp(t,"mainButtonLabel")&&this.setAttr(s,"main-button-label",t.mainButtonLabel),this.hasOwnProp(t,"mainButtonName")&&this.setAttr(s,"main-button-name",t.mainButtonName),this.hasOwnProp(t,"subButtonLabel")&&this.setAttr(s,"sub-button-label",t.subButtonLabel),this.hasOwnProp(t,"tagPreset")&&this.setAttr(s,"tag-preset",t.tagPreset),this.hasOwnProp(t,"tagLabel")&&this.setAttr(s,"tag-label",t.tagLabel),this.hasOwnProp(t,"slotLabel")&&this.setAttr(s,"slot-label",t.slotLabel),this.hasOwnProp(t,"topMessage")&&(s.topMessage=t.topMessage??[]),this.hasOwnProp(t,"bottomMessage")&&(s.bottomMessage=t.bottomMessage??[]),this.hasOwnProp(t,"tagContents")&&(s.tagContents=t.tagContents)}handleBackdropClick(s){d(s)&&r(s)}shakeModal(s){const t="sd-modal-container__modal--shake";s.classList.remove(t),s.addEventListener("animationend",(()=>s.classList.remove(t)),{once:!0}),requestAnimationFrame((()=>{s.classList.add(t)}))}waitForModalReady(s){const t=s.componentOnReady;return"function"==typeof t?t.call(s).then((()=>{})):new Promise((s=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>s()))}))}))}hasOwnProp(s,t){return Object.prototype.hasOwnProperty.call(s,t)}setAttr(s,t,e){null!=e&&s.setAttribute(t,e)}render(){return 0===(this.entries?.length??0)?null:e("div",{class:"sd-modal-container"},this.entries.map(((s,t)=>e("div",{key:s.id,class:"sd-modal-container__layer",style:{zIndex:t+1+""},"data-modal-id":s.id,ref:t=>{t&&this.layerRefs.set(s.id,t)}},e("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":s.backdropVisible},onClick:()=>this.handleBackdropClick(s.id)})))))}static get style(){return"sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 997);pointer-events:none}sd-modal-container .sd-modal-container__layer{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out;pointer-events:none}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1;pointer-events:auto}sd-modal-container .sd-modal-container__modal{position:relative;z-index:1;opacity:0;transform:scale(0);pointer-events:auto;transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}"}},[512,"sd-modal-container",{autoRemove:[4,"auto-remove"],entries:[32],open:[64],openLoading:[64],createCustom:[64],dismissById:[64],update:[64]}]),k=g,y=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button","sd-circle-progress","sd-confirm-modal","sd-ghost-button","sd-icon","sd-loading-modal","sd-tag"].forEach((s=>{switch(s){case"sd-modal-container":customElements.get(o(s))||customElements.define(o(s),g);break;case"sd-button":customElements.get(o(s))||l();break;case"sd-circle-progress":customElements.get(o(s))||c();break;case"sd-confirm-modal":customElements.get(o(s))||m();break;case"sd-ghost-button":customElements.get(o(s))||h();break;case"sd-icon":customElements.get(o(s))||u();break;case"sd-loading-modal":customElements.get(o(s))||p();break;case"sd-tag":customElements.get(o(s))||b()}}))};export{k as SdModalContainer,y as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-Bhh7ig9Q.js";const p=o,r=s;export{p as SdNumberInput,r as defineCustomElement}
|